/* Variables globales - Thème Sombre de base */
:root {
    --bg-color: #0b0f19;
    --card-bg: #151f32;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-color: #f59e0b;
    --accent-glow: rgba(245, 158, 11, 0.12);
    --border-color: #24324d;
    --tag-bg: #1e293b;
    --tag-text: #fef08a;
    --shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
}

/* Thème Clair propre et contrasté */
body.light-theme {
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --accent-color: #d97706;
    --accent-glow: rgba(217, 119, 6, 0.08);
    --border-color: #cbd5e1;
    --tag-bg: #f8fafc;
    --tag-text: #b45309;
    --shadow: 0 10px 25px -5px rgba(15,23,42,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
    font-size: 16px; /* Ajustement du zoom global de base */
}

/* Container agrandi et espacé */
.container {
    max-width: 1250px;
    margin: 50px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* Cartes modernisées */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 30px -10px var(--accent-glow);
}

.big { grid-column: span 2; }
.full { grid-column: span 3; }

/* En-tête de profil plus imposant (Zoomé) */
.profile-card { padding: 40px; }
.profile { display: flex; align-items: center; gap: 35px; }
.profile-img-container { position: relative; }
.profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    object-fit: cover;
    box-shadow: 0 0 15px var(--accent-glow);
}

h1 { font-size: 40px; font-weight: 800; letter-spacing: -1px; margin-bottom: 6px; }
.subtitle { font-size: 20px; font-weight: 500; color: var(--accent-color); margin-bottom: 12px; }

.search-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--tag-bg);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    color: var(--text-main);
    position: relative;
    padding-left: 12px;
}
h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background-color: var(--accent-color);
    border-radius: 4px;
}

p { color: var(--text-muted); font-size: 15.5px; margin-bottom: 14px; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.illustration {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

/* Badges / Pictos listes */
.tags-container { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
    background-color: var(--tag-bg);
    color: var(--tag-text);
    font-weight: 600;
    font-size: 13.5px;
    padding: 6px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.contact-list, .styled-list { list-style: none; }
.contact-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-weight: 500;
}
.contact-list svg { color: var(--accent-color); flex-shrink: 0; }

.styled-list li {
    position: relative;
    padding-left: 20px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.styled-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.formation-box { display: flex; flex-direction: column; gap: 16px; }
.formation-item { display: flex; align-items: flex-start; gap: 14px; }
.badge {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
}
.badge.accent { background: var(--accent-glow); color: var(--accent-color); }

/* Bouton flottant du Thème */
.theme-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.3s;
}
.theme-btn:hover { transform: scale(1.1); border-color: var(--accent-color); }
body.light-theme .icon-sun, body:not(.light-theme) .icon-moon { display: none; }

/* Bascule de logo/photo selon le thème */
.theme-img-light { display: none; }
body.light-theme .theme-img-dark { display: none; }
body.light-theme .theme-img-light { display: block; }

/* Animations fluides d'apparition */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Mode Responsive fluide */
@media (max-width: 1024px) {
    .container { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .big { grid-column: span 2; }
}

@media (max-width: 680px) {
    .container { grid-template-columns: 1fr; margin: 20px auto; gap: 20px; }
    .big, .full { grid-column: span 1; }
    .profile { flex-direction: column; text-align: center; gap: 20px; }
    h1 { font-size: 32px; }
    .profile-card { padding: 30px 20px; }
}

/* ============ Page Linktree ============ */
.linktree-container {
    max-width: 480px;
    margin: 60px auto;
    padding: 0 24px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.linktree-profile {
    text-align: center;
    margin-bottom: 32px;
}
.linktree-profile .profile-img {
    width: 110px;
    height: 110px;
    margin: 0 auto 16px;
}
.linktree-profile h1 { font-size: 26px; margin-bottom: 4px; }
.linktree-profile .subtitle { font-size: 16px; margin-bottom: 10px; }
.linktree-bio { font-size: 14.5px; max-width: 360px; margin: 0 auto; }

.link-list {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 18px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, border-color 0.3s, box-shadow 0.3s;
}
.link-btn:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: 0 15px 25px -8px var(--accent-glow);
}

/* Icônes des liens : taille contrainte (les SVG n'ont pas d'attribut width/height) */
.link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--accent-color);
}
.link-icon svg { width: 100%; height: 100%; }

.link-label { flex: 1; text-align: left; }

.link-arrow { flex-shrink: 0; color: var(--text-muted); }

.link-badge {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    background: var(--tag-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px 10px;
}

.link-btn.disabled {
    cursor: default;
    opacity: 0.6;
}
.link-btn.disabled:hover {
    transform: none;
    border-color: var(--border-color);
    box-shadow: var(--shadow);
}

.linktree-footer {
    margin-top: 36px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .linktree-container { margin: 40px auto; padding: 0 16px 40px; }
}
