:root {
    --bg: #0a0c10;
    --surface: #111418;
    --surface2: #181c22;
    --border: rgba(255,255,255,0.07);
    --accent: #4f8ef7;
    --accent2: #7c3aed;
    --text: #e6edf3;
    --muted: #7d8590;
    --card-bg: rgba(255,255,255,0.03);
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Syne', sans-serif;
    overflow-x: hidden;
}

/* ─── CANVAS PARTICLES ─── */
#background-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* ─── NAV ─── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: rgba(10,12,16,0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 15px;
    color: var(--accent);
    letter-spacing: 0.04em;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-links { display: flex; gap: 6px; }

.lang-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.lang-toggle-btn:hover {
    border-color: rgba(79,142,247,0.4);
    background: rgba(79,142,247,0.08);
    transform: translateY(-1px);
}

.lang-toggle-btn .flag { font-size: 15px; line-height: 1; }

@media (max-width: 600px) {
    .lang-toggle-btn .lang-label { display: none; }
    .lang-toggle-btn { padding: 6px 9px; }
}

.nav-links a {
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* ─── SECTIONS (full screen) ─── */
section {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 60px 60px;
}

/* ─── PAGE 1 : ACCUEIL ─── */
#accueil {
    align-items: center;
    text-align: center;
    gap: 28px;
}

.avatar-ring {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    padding: 3px;
    flex-shrink: 0;
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
}

#accueil h1 {
    font-size: clamp(42px, 7vw, 80px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

#accueil h1 span { color: var(--accent); }

#accueil .tagline {
    font-family: 'Space Mono', monospace;
    font-size: 15px;
    color: var(--muted);
    max-width: 520px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.2s, opacity 0.2s;
    cursor: pointer;
}

.btn:hover { transform: translateY(-2px); opacity: 0.9; }

.btn-github {
    background: #21262d;
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.12);
}

.btn-linkedin {
    background: #0a66c2;
    color: #fff;
}

.btn svg { width: 18px; height: 18px; }

.scroll-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--muted);
    font-size: 12px;
    font-family: 'Space Mono', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ─── SECTION TITLE ─── */
.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-title .icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* ─── PAGE 2 : PROFIL ─── */
#profil {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.profil-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
}

.profil-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
}

.sidebar-card h4 {
    font-size: 11px;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 10px;
}

.sidebar-card p { font-size: 13px; color: var(--text); line-height: 1.6; }

.sidebar-card p strong { color: var(--text); font-weight: 700; }

.detail-list { display: flex; flex-direction: column; gap: 8px; }

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.detail-row .label { color: var(--muted); }
.detail-row .value { color: var(--text); font-weight: 600; text-align: right; }

.stack-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.skill-tag {
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(79,142,247,0.12);
    border: 1px solid rgba(79,142,247,0.25);
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.skill-tag.skill-tag--secondary {
    background: rgba(124,58,237,0.12);
    border-color: rgba(124,58,237,0.25);
    color: #a78bfa;
}

.profil-main { display: flex; flex-direction: column; gap: 28px; }

.profil-block h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--accent);
}

.formation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.formation-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
}

.formation-card h5 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.formation-card .school {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.experience-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s;
}

.experience-card:hover { border-color: rgba(79,142,247,0.3); }

.experience-card h5 { font-size: 14px; font-weight: 700; }

.experience-card p { font-size: 12px; color: var(--muted); line-height: 1.5; flex: 1; }

.interests-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.interest-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.interest-icon { font-size: 22px; margin-bottom: 6px; }
.interest-card h5 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.interest-card p { font-size: 12px; color: var(--muted); margin-bottom: 8px; }

/* ─── PAGE 3 : COMPÉTENCES ─── */
#competences { max-width: 900px; margin: 0 auto; width: 100%; min-height: auto; padding-top: 120px; padding-bottom: 60px; }

.skills-list { display: flex; flex-direction: column; gap: 20px; }

.skill-category {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.category-number {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    font-family: 'Space Mono', monospace;
    flex-shrink: 0;
}

.skill-category h4 { font-size: 16px; font-weight: 700; }

.skill-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-chip {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.2s, background 0.2s;
}

.skill-chip:hover {
    border-color: rgba(79,142,247,0.35);
    background: rgba(79,142,247,0.06);
}

.skill-chip .skill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ─── PAGE 4 : PROJETS ─── */
#projets { max-width: 1000px; margin: 0 auto; width: 100%; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.25s, transform 0.25s;
    cursor: pointer;
}

.project-card:hover {
    border-color: rgba(79,142,247,0.4);
    transform: translateY(-4px);
}

.project-card .project-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(79,142,247,0.15), rgba(124,58,237,0.15));
    border: 1px solid rgba(79,142,247,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.project-card h4 { font-size: 16px; font-weight: 700; }
.project-card p { font-size: 13px; color: var(--muted); line-height: 1.5; flex: 1; }

/* ─── PAGE 5 : CONTACT ─── */
#contact {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.contact-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px;
    max-width: 520px;
    width: 100%;
}

.contact-box h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.contact-box p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 28px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.contact-form label {
    font-size: 12px;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    display: block;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text);
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
}

.contact-form textarea { height: 120px; }

.form-field { display: flex; flex-direction: column; }

/* Champ anti-spam : caché hors écran, invisible pour un humain,
   mais toujours "présent" pour un bot qui remplit tout automatiquement */
.honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn-primary {
    margin-top: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

/* ─── FOOTER ─── */
footer {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-size: 12px;
    font-family: 'Space Mono', monospace;
    position: relative;
    z-index: 1;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
    section { padding: 100px 24px 60px; }
    .profil-layout { grid-template-columns: 1fr; }
    .formation-grid { grid-template-columns: 1fr; }
    .experience-grid { grid-template-columns: 1fr 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .interests-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    nav { padding: 12px 20px; }
    .nav-links a { padding: 5px 8px; font-size: 11px; }
    .experience-grid { grid-template-columns: 1fr; }
    .interests-grid { grid-template-columns: 1fr; }
}

/* ─── ANIMATIONS ─── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: none;
}


a.project-card {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.avatar-ring {
    overflow: hidden;
}

.avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}