/* ===================================
   DESIGN SYSTEM & VARIABLES
   =================================== */
:root {
    /* Couleurs */
    --bg:        #0A0E1A;   /* Fond principal — bleu nuit très sombre */
    --bg2:       #0D1120;   /* Fond alternatif légèrement plus clair */
    --cream:     #F5E6C8;   /* Texte principal — crème chaud */
    --muted:     #C4B89A;   /* Texte secondaire — beige sourd */
    --dim:       rgba(245, 230, 200, 0.5);
    --line:      #1A1F30;   /* Lignes de grille, séparateurs subtils */
    --line-num:  #2A3050;   /* Numéros de grille, labels discrets */
    --accent:    #1E2233;   /* Accents, bordures */

    /* Typographies */
    --serif:     'Playfair Display', serif;
    --sans:      'Space Grotesk', sans-serif;
    --mono:      'JetBrains Mono', monospace;

    /* Espacements */
    --padding-x-section:    2rem;       /* 32px */
    --padding-y-section:    4rem;       /* 32px */
    --gap-section:          1rem;       /* 16px */

    --padding-navbar:       0.75rem;    /* 12px */
    --padding-inverse:      -2rem;      /* -32px */

    --gap-texte:            0.5rem;     /* 8px */
    --gap-projets:          1.75rem;    /* 28px */

    /* Tailles de police */
    --h2:                   2rem;       /* 32px */
    --role:                 1.75rem;    /* 28px */

    /* Réserve (en em, donc alignée sur --role) pour les débords d'encre
       (jambages, dépassements de capitales en italique) que le trim
       text-box cap/alphabetic exclut de la boîte de layout de .role-item.
       Utilisée à la fois comme demi-gap entre .role-item (pour ne jamais
       laisser apparaître le voisin) et comme correction de la marge de
       .hero-role (pour ne pas changer l'écart baseline → image du titre). */
    --role-overshoot:       0.3em;

    /* ─── Système base + coefficients ───
       --base ne doit JAMAIS être redéfinie dans un @media : c'est la
       racine fixe dont dérivent --bouton (constant) et --paragraphe
       (en cascade mobile → tablette → desktop). */
    --base:                 1rem;       /* 16px — racine fixe, ne pas toucher */
    --bouton:               calc(var(--base) * 0.875);  /* 16 × 0.875 = 14px, constant sur les 3 formats */

    /* Chaîne d'étapes à noms distincts : évite toute auto-référence
       (--paragraphe: calc(var(--paragraphe) * x) est un cycle invalide
       en CSS, même réparti dans des @media différents — voir plus bas). */
    --paragraphe-mobile:    var(--base);                          /* 16 × 1 = 16px */
    --paragraphe-tablette:  calc(var(--paragraphe-mobile) * 1.125);   /* 16 × 1.125 = 18px */
    --paragraphe-desktop:   calc(var(--paragraphe-tablette) * 1.125); /* 18 × 1.125 ≈ 20.25px (≈ 20px) */

    --paragraphe:           var(--paragraphe-mobile);       /* palier actif : mobile */
    --email:                calc(var(--paragraphe) * 1.25); /* dérivée de --paragraphe, suit automatiquement chaque palier */
    --caption:              calc(var(--paragraphe) * 0.75); /* texte secondaire (footer...), dérivée de --paragraphe */

    --grid:                 0.5rem;     /* 8px */

    /* Autres */
    --img-corner:           1vw;

    /* ─── Tablet ─── */
    @media (min-width: 768px) {
        /* Espacements */
        --padding-x-section:    3rem;       /* 48px */
        --padding-y-section:    6rem;       /* 96px */
        --gap-section:          1.5rem;     /* 24px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -3rem;      /* -48px */

        --gap-texte:            0.75rem;    /* 12px */
        --gap-projets:          2.25rem;    /* 36px */

        /* Tailles de police */
        --h2:                   4rem;       /* 64px */
        --role:                 2.25rem;    /* 48px */
        --paragraphe:           var(--paragraphe-tablette); /* palier actif : tablette */
        --grid:                 0.625rem;   /* 10px */
    }

    /* ─── Laptop ─── */
    @media (min-width: 1024px) {
        /* Espacements */
        --padding-x-section:    8rem;       /* 128px */
        --padding-y-section:    8rem;       /* 128px */
        --gap-section:          2rem;       /* 32px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -4rem;      /* -64px */

        --gap-texte:            1rem;       /* 16px */
        --gap-projets:          3rem;       /* 48px */

        /* Tailles de police */
        --h2:                   4.5rem;     /* 72px */
        --role:                 4rem;       /* 64px */
        --paragraphe:           var(--paragraphe-desktop); /* palier actif : desktop */
        --grid:                 0.75rem;    /* 12px */
    }

    /* ─── Desktop ─── */
    @media (min-width: 1440px) {

    }
}


/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ─── Body ─── */
body {
    background: var(--bg);
    color: var(--cream);
    font-family: var(--sans);
    font-size: var(--paragraphe);
    font-weight: 300;
    line-height: 1.5;
    overflow-x: hidden;
    cursor: none;
}

/* Grain global — fixed, couvre toute la page sans perturber le layout */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3C/filter%3E%3Crect width='400' height='400' fill='white' filter='url(%23noiseFilter)' /%3E%3C/svg%3E");
    opacity: 0.1;
    pointer-events: none;
    z-index: 9999;
}

/* ─── Typographie ─── */
h1, h2, h3, h4, h5, h6, strong {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1;
}

strong {
    font-weight: 600;
}

ul {
    list-style-type: none;
}
li {
    display: flex;
    height: fit-content;
}

a {
    color: var(--cream);
    text-decoration: none;
}

/* ─── Boutons ─── */
.btn,
.btn-style {
    position: relative;
    width: fit-content;
    color: var(--muted);
    font-size: var(--bouton);
    letter-spacing: 0.075em;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.2s ease;
}
.btn:not(.project-item-link, .proj-hero-back)::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 1px;
    background-color: var(--muted);
    transition: 0.2s ease;
}
.btn:hover {
    color: var(--cream);
    transition: 0.5s ease;
}
.btn:hover::after {
    width: 100%;
    left: 0;
    right: auto;
    transition: 0.5s ease;
}

/* ─── Boutons Style ─── */
.btn-style:hover{
    color: var(--muted);
}

/* ─── Images et vidéos ─── */
img,
video {
    width: 100%;
}


/* ===================================
    UTILITIES
    =================================== */
.text-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap-section);
    width: 100%;
}

/* ─── Eyebrow ─── */
[class*="eyebrow"] {
    position: relative;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    width: 100%;
    margin-bottom: calc(var(--gap-section));
    color: var(--dim);
    font-family: var(--mono);
    font-size:calc(var(--grid) * 1.25);
    text-align: center;
    text-transform: uppercase;
}
.eyebrow-center {
    justify-content: center;
}
.eyebrow-left::after,
.eyebrow-center::before,
.eyebrow-center::after {
    content: '';
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: var(--line);
}


/* ===================================
   CUSTOM CURSOR
   =================================== */
.cursor {
    position: fixed;
    display: none;
    width: 8px;
    height: 8px;
    background: var(--cream);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.cursor-ring {
    position: fixed;
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(245, 230, 200, .4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
}


/* ===================================
   NAVBAR
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--padding-navbar) var(--gap-section);
    z-index: 1000;
}
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}
.logo {
    width: 8rem;
    line-height: 0;
}
.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) / 2);
    padding-top: var(--padding-navbar);
}
.nav-links li {
    padding-right: var(--gap-section);
    transform: translateX(100%);
}

/* ─── Menu Hamburger ─── */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--cream);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
}


/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100vh;
}
/* Image de fond du hero — élément fixe séparé, et non un fond de .hero.
   Deux raisons : son opacité doit pouvoir être animée sans emporter le
   contenu, et .hero est épinglée par ScrollTrigger (donc transformée, donc
   contexte d'empilement) — un fond placé à l'intérieur masquerait la grille
   globale. z-index -1 : sous la grille et sous le contenu, au-dessus du fond
   de page. Opacité pilotée par --hero-bg ; 1 par défaut, pour un affichage
   correct sans JS. */
.hero-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(180deg, rgba(10, 14, 26, 0.85) 70%, var(--bg) 100%), url(../images/hero.webp);
    background-size: cover;
    background-position: center center;
    opacity: var(--hero-bg, 1);
    pointer-events: none;
}
.hero-main {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    gap: 0;
    width: 100%;
    padding: var(--gap-section);
    font-size: var(--h2);
    z-index: 2;
}
.hero-content {
    position: relative;
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    padding: var(--gap-section);
    z-index: 2;
}
/* Ex-`border-top` : passé en pseudo-élément car un `border` n'est pas
   animable. Le tracé se pilote via --line-draw (0 → 1), que GSAP anime
   sur l'élément parent. Valeur par défaut 1 : ligne pleine si le JS
   n'a pas la main (pas de JS, prefers-reduced-motion). */
.hero-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--cream);
    transform: scaleX(var(--line-draw, 1));
    transform-origin: left center;
}

/* ─── Hero Title ─── */
.hero-title {
    line-height: 0;
}
.hero-role {
    overflow: hidden;
    /* height posée par le JS = hauteur d'un .role-item + le gap de
       .role-inner (dépend du text-box trim, non calculable en CSS pur) */
    font-size: var(--role);
    line-height: 1;
    /* margin, pas padding : un padding serait à l'intérieur de la zone
       overflow:hidden et agrandirait la fenêtre visible au-delà de la
       hauteur d'un .role-item, laissant apparaître le rôle suivant.
       On retranche --role-overshoot car le JS agrandit la fenêtre de ce
       montant (des deux côtés) pour ne pas couper les débords d'encre du
       rôle actif : l'écart baseline → image du titre reste égal à
       --gap-section malgré cet agrandissement. */
    margin: calc(var(--gap-section) - var(--role-overshoot)) 0;
}
.role-inner {
    display: flex;
    flex-direction: column;
    /* écarte les .role-item entre eux pour que le débord d'encre de l'un
       n'entre jamais dans la fenêtre de son voisin (le JS lit ce gap pour
       calculer la hauteur de .hero-role et le pas de rotation) */
    gap: calc(var(--role-overshoot) * 2);
}
.role-item {
    font-family: var(--serif);
    font-size: var(--role);
    line-height: 1;
    /* pas de padding : text-box trim-both ... alphabetic arrête déjà la
       box exactement sur la baseline, un padding-bottom ajouterait un
       espace vide sous la baseline */
    text-box: trim-both cap alphabetic;
}
.hero-text p {
    max-width: 56rem;
}

/* ─── Hero Video ─── */
.hero-video-container {
    max-width: 28rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    z-index: 5;
}
.hero-video {
    position: relative;
    cursor: pointer;
}

.hero-video-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, transparent 60%, var(--bg) 97%);
    transition: 0.4s ease;
    inset: 0;
}
.hero-video:hover .hero-video-overlay {
    background: linear-gradient(180deg, transparent -60%, var(--bg) 97%);
    transition: 0.4s ease;
}

.hero-video-label {
    font-family: var(--serif);
    opacity: 0;
    transition: 0.4s ease;
    transform: translateY(8px);
}
.hero-video:hover .hero-video-label {
    opacity: 1;
    transform: translateY(0);
    transition: 0.4s ease;
}

/* Fullscreen (FLIP target) state */
.hero-video.is-open {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    padding: var(--gap-section);
    z-index: 1001;
    cursor: default;
}
.hero-video.is-open::after {
    display: none;
}

.hero-video.is-open video {
    max-width: none;
}

.hero-video.is-open .hero-video-overlay,
.hero-video.is-open .hero-video-label {
    display: none;
}

.hero-video.is-open .hero-video-close {
    display: flex;
}

.hero-video-close {
    position: absolute;
    top: calc(var(--gap-section) - 36px - 10px);
    right: calc(var(--gap-section));
    width: 36px;
    height: 36px;
    display: none;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(245,230,200,.3);
    color: var(--cream);
    font-size: var(--bouton);
    border-radius: 50%;
    background: var(--bg);
    opacity: 0.8;
    cursor: pointer;
    z-index: 2;
    transform: scale(0);
    transition: background .3s;
}
.hero-video-close:hover {
    background: var(--bg);
    opacity: 0.8;
}

.video-backdrop {
    position: fixed;
    background: var(--bg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
    inset: 0;
}
.video-backdrop.is-visible {
    opacity: 0.9;
    visibility: visible;
}


/* ===================================
   STATEMENT SECTION (First)
   =================================== */
.statement {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.statement-title,
.proj-statement-text {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 900px;
}
.statement-text {
    max-width: 720px;
    color: var(--muted);
}


/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
}
.about-container {
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    max-width: 1280px;
}
.about-img-left {
    display: none;
    max-width: 28rem;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.about-img-right {
    max-width: 28rem;
}
.skills-title {
    justify-content: flex-start;
    padding-bottom: var(--gap-section);
    border-bottom: 1px solid var(--line);
}
.skills-title::before,
.skills-title::after {
    display: none;
}
.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--gap-section) * 0.75);
}


/* ===================================
   PARCOURS SECTION (Horizontal Scroll)
   =================================== */

/* Section height = 100vh, GSAP ajoute l'espace de scroll via pin */
.parcours {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--padding-x-section);
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
    z-index: 10;
}

/* "Parcours" watermark — centré absolument, z-index bas */
.parcours-hero-text {
    position: relative;
    font-size: 4.5rem;
    text-align: center;
} 

/* Track horizontal */
.parcours-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--padding-x-section);
}

/* ---- Carte individuelle — une par viewport ---- */
.parcours-bloc {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Wrapper interne — flex colonne : image en haut, textes en bas */
.parcours-bloc-inner {
    width: 100%;
}

/* Image — format 4:3, taille fixe identique pour tous les blocs */
.parcours-bloc-img {
    position: relative;
    max-width: 28rem;
    border: 1px solid var(--accent);
    aspect-ratio: 16/9;
    overflow: visible; /* wrapper now handles overflow */
}

/* Wrapper that exactly matches the image dimensions; receives the overlay */
.parcours-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Gradient overlay at bottom of the image — applied to the wrapper */
.parcours-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(10, 14, 26, 0.9) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.parcours-img-ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Textes — chevauchent légèrement le bas de l'image */
.parcours-bloc-texts {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) / 2);
    margin-top: calc(var(--gap-section) * (-2));
    z-index: 2;
}

.parcours-bloc-title {
    font-size: clamp(3rem, 7vw, 5.75rem);
    padding-left: var(--gap-section);
}

.parcours-bloc-year {
    justify-content: flex-start;
    margin: 0;
    padding-left: var(--gap-section);
    padding-bottom: calc(var(--gap-section) / 2);
    border-bottom: 1px solid var(--line);
}
.parcours-bloc-year::before,
.parcours-bloc-year::after {
    display: none;
}

.parcours-bloc-text {
    color: var(--muted);
}


/* ===================================
   PROJECTS SECTION
   =================================== */
.projects {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: var(--padding-y-section);
    height: 100vh;
    padding: var(--gap-section);
    padding-top: 0;
    overflow: hidden;
}
/* Fonds des projets — sortis de la section (cf. index.html) et donc fixes,
   sur le même plan que .hero-bg : z-index -1, sous la grille globale et sous
   le contenu. La section projets étant épinglée (donc transformée, donc
   contexte d'empilement), des fonds placés à l'intérieur masqueraient la
   grille au survol. Ils restent invisibles hors survol (opacité 0). */
.projects-bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.project-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
}
.projects-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg);
    opacity: 0;   /* apparaît avec le fond survolé, piloté par home.js */
    pointer-events: none;
}
.projects-heading-mask {
    order: 1;
    z-index: 1;
}
.projects-heading {
    text-box: trim-both cap alphabetic;
}
.projects-list-clip {
    position: relative;
    height: 100%;
    padding: var(--gap-section) 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    z-index: 2;
}
.projects-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) * 0.75);
    padding-top: 4rem;
    text-align: right;
}
.project-item-link {
    color: var(--cream);
    font-size: clamp(1.75rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    text-box: trim-both cap alphabetic;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}


/* ===================================
   MARQUEE SECTION
   =================================== */
.marquee-section {
    position: relative;
    padding-top: var(--padding-y-section);
    overflow: hidden;
}
.marquee {
    position: relative;
    width: 100%;
}
.marquee.reveal{
    display: flex;
}
.marquee-content {
    display: flex;
    gap: 1.25rem;
    white-space: nowrap;
    padding-right: 1.25rem;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 2rem;
    animation: marquee 20s linear infinite;
}

/* ─── Animation ─── */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}


/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    position: relative;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.contact-container {
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) * 2);
    align-items: center;
    max-width: 1064px;
    margin: 0 auto;
}
.contact-title {
    font-size: clamp(3rem, 10vw, 6rem);
}
.contact-subtitle {
    color: var(--muted);
}
.contact-email {
    font-size: var(--email);
    border-bottom: 1px solid var(--cream);
    transition: opacity 0.3s ease;
}
.contact-email:hover {
    opacity: 0.7;
}
.contact-socials {
    display: flex;
    justify-content: center;
    gap: calc(var(--gap-section) * 2);
}
.social-link:hover {
    color: var(--cream);
}


/* ===================================
   FOOTER
   =================================== */
.footer {
    position: relative;
    padding: var(--padding-navbar) var(--gap-section);
    /* border-top: 1px solid var(--accent); */
}
.footer p {
    text-align: center;
    font-size: var(--caption);
    color: var(--muted);
}


/* ===================================
   TABLET STYLES
   =================================== */
@media (min-width: 768px) {
    /* ===================================
       NAVBAR
       =================================== */
    .logo {
        width: 10rem;
    }
    .nav-links {
        position: relative;
        flex-direction: row;
        gap: 3vw;
        padding: 0;
    }
    .nav-links li {
        padding: 0;
        transform: none;
    }
    /* ─── Menu Hamburger ─── */
    .nav-hamburger {
        display: none;
    }


    /* ===================================
       HERO SECTION
       =================================== */
    .hero-content {
        grid-template-columns: 3fr 2fr;
        gap: 0;
        padding: 0;
    }

    /* ─── Hero Title ─── */
    .hero-title {
        max-width: 96rem;
    }
    .hero-text {
        position: relative;
        padding: calc(var(--gap-section) * 2) var(--gap-section);
    }
    /* Ex-`border-right`, même principe que .hero-content::after */
    .hero-text::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 1px;
        height: 100%;
        background: var(--cream);
        transform: scaleY(var(--line-draw, 1));
        transform-origin: center top;
    }

    /* ─── Hero Video ─── */
    .hero-video-container {
        margin: var(--gap-section);
    }
    .hero-video.is-open {
        max-width: 72rem;
        padding: var(--gap-section);
    }
    .hero-video-close {
        top: calc(var(--gap-section) + 18px);
        right: calc(var(--gap-section) + 18px);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-text {
        max-width: 580px;
    }
    .about-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .about-skills {
        padding-top: var(--gap-section);
    }


    /* ===================================
      PARCOURS SECTION (Horizontal Scroll)
      =================================== */
    .parcours {
        height: 100vh;
        padding: 0;
    }
    .parcours-hero {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        z-index: 1;
        pointer-events: none;
    }
    .parcours-hero-text {
        font-size: clamp(9rem, 20vw, 20rem);
    }
    .parcours-track-wrap {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: 2;
        display: flex;        /* ← ajouté */
        align-items: center;  /* ← centre .parcours-track verticalement */
    }
    .parcours-track {
        flex-direction: row;
        gap: 0;
        width: fit-content;
    }
    .parcours-bloc {
        width: 100vw;
    }
    .parcours-bloc-inner {
        width: 60%;
        max-width: 36rem;
    }
    .parcours-bloc-img {
        max-width: 100%;
    }
    .parcours-bloc-title {
        padding: 0;
    }
}


/* ===================================
   VERTICAL TABLET STYLES
   =================================== */ 
@media (min-width: 768px) and (max-width: 1064px) and (min-height: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: calc(var(--gap-section) * 2);
        padding: calc(var(--gap-section) * 2);
    }
    .hero-text {
        padding: 0;
        border: none;
    }
    .hero-video-container {
        width: 50vh;
        /*max-width: fit-content;*/
        margin: 0;
        /*aspect-ratio: 16/9;*/
    }

    .about-img-left {
        display: block;
        max-width: 100%;
        height: 20vh;
        aspect-ratio: auto;
        object-position: center 20%;
    }
}


/* ===================================
   LAPTOP STYLES
   =================================== */
@media (min-width: 1024px) {
    /* ===================================
       CUSTOM CURSOR
       =================================== */
    .cursor,
    .cursor-ring {
        display: block;
    }
    .hero-video-container {
        max-width: 28rem;
    }


    /* ===================================
       NAVBAR
       =================================== */
    .navbar{
        padding: 1.5rem var(--gap-section);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-container {
        grid-template-columns: 1fr 1fr;
    }
    .about-left {
        padding-top: var(--gap-section);
    }
    .about-right {
        grid-template-columns: 1fr;
        height: fit-content;
    }
    .about-img-left,
    .about-img-right {
        max-width: 100%;
    }
    .about-img-left {
        display: block;
        height: auto;
        aspect-ratio: 16/9;
    }
    .about-skills {
        padding: 0;
    }


    /* ===================================
       PARCOURS SECTION (Horizontal Scroll)
       =================================== */
    .parcours-bloc-img {
        aspect-ratio: 4/3;
    }


    /* ===================================
       PROJECTS SECTION
       =================================== */
    .projects-list {
        gap: calc(var(--gap-section) * 1.5);
        padding: 0;
    }
}

/* ===================================
   ACCESSIBILITÉ
   =================================== */

/* Focus clavier cohérent avec la palette (au lieu du contour bleu
   par défaut du navigateur, peu lisible sur fond sombre). Utilise
   :focus-visible pour ne s'afficher qu'au clavier, pas au clic souris. */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--cream);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Lien d'évitement — masqué visuellement tant qu'il n'a pas le focus,
   pour permettre à un utilisateur clavier de sauter directement au
   contenu principal sans repasser par toute la navbar à chaque page. */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background: var(--cream);
    color: var(--bg);
    font-family: var(--sans);
    font-size: var(--bouton);
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

/* ===================================
   LOADER
   ===================================
   Couvre la page pendant que le JS pose les états de départ des
   animations. Remplace l'ancien systeme de masquage element par element
   (classe .js + visibility:hidden), plus simple : un seul element a gerer.

   Le repli est ici en CSS pur : si le JS ne prend jamais la main (erreur,
   fichier manquant), l'animation ci-dessous efface le loader toute seule
   au bout de 3 s. Sans elle, une panne de JS laisserait un ecran opaque. */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    animation: loader-fallback 0.6s ease 3s forwards;
}
@keyframes loader-fallback {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Masque du titre : l'image monte depuis le bas, coupee par ce conteneur */
.hero-title {
    overflow: hidden;
}

/* Reduction de mouvement : pas de fondu differe, le loader disparait tout
   de suite (le JS fait de meme de son cote). */
@media (prefers-reduced-motion: reduce) {
    #loader {
        animation-delay: 0s;
        animation-duration: 0.01s;
    }
}/* ===================================
   DESIGN SYSTEM & VARIABLES
   =================================== */
:root {
    /* Couleurs */
    --bg:        #0A0E1A;   /* Fond principal — bleu nuit très sombre */
    --bg2:       #0D1120;   /* Fond alternatif légèrement plus clair */
    --cream:     #F5E6C8;   /* Texte principal — crème chaud */
    --muted:     #C4B89A;   /* Texte secondaire — beige sourd */
    --dim:       rgba(245, 230, 200, 0.5);
    --line:      #1A1F30;   /* Lignes de grille, séparateurs subtils */
    --line-num:  #2A3050;   /* Numéros de grille, labels discrets */
    --accent:    #1E2233;   /* Accents, bordures */

    /* Typographies */
    --serif:     'Playfair Display', serif;
    --sans:      'Space Grotesk', sans-serif;
    --mono:      'JetBrains Mono', monospace;

    /* Espacements */
    --padding-x-section:    2rem;       /* 32px */
    --padding-y-section:    4rem;       /* 32px */
    --gap-section:          1rem;       /* 16px */

    --padding-navbar:       0.75rem;    /* 12px */
    --padding-inverse:      -2rem;      /* -32px */

    --gap-texte:            0.5rem;     /* 8px */
    --gap-projets:          1.75rem;    /* 28px */

    /* Tailles de police */
    --h2:                   2rem;       /* 32px */
    --role:                 1.75rem;    /* 28px */

    /* Réserve (en em, donc alignée sur --role) pour les débords d'encre
       (jambages, dépassements de capitales en italique) que le trim
       text-box cap/alphabetic exclut de la boîte de layout de .role-item.
       Utilisée à la fois comme demi-gap entre .role-item (pour ne jamais
       laisser apparaître le voisin) et comme correction de la marge de
       .hero-role (pour ne pas changer l'écart baseline → image du titre). */
    --role-overshoot:       0.3em;

    /* ─── Système base + coefficients ───
       --base ne doit JAMAIS être redéfinie dans un @media : c'est la
       racine fixe dont dérivent --bouton (constant) et --paragraphe
       (en cascade mobile → tablette → desktop). */
    --base:                 1rem;       /* 16px — racine fixe, ne pas toucher */
    --bouton:               calc(var(--base) * 0.875);  /* 16 × 0.875 = 14px, constant sur les 3 formats */

    /* Chaîne d'étapes à noms distincts : évite toute auto-référence
       (--paragraphe: calc(var(--paragraphe) * x) est un cycle invalide
       en CSS, même réparti dans des @media différents — voir plus bas). */
    --paragraphe-mobile:    var(--base);                          /* 16 × 1 = 16px */
    --paragraphe-tablette:  calc(var(--paragraphe-mobile) * 1.125);   /* 16 × 1.125 = 18px */
    --paragraphe-desktop:   calc(var(--paragraphe-tablette) * 1.125); /* 18 × 1.125 ≈ 20.25px (≈ 20px) */

    --paragraphe:           var(--paragraphe-mobile);       /* palier actif : mobile */
    --email:                calc(var(--paragraphe) * 1.25); /* dérivée de --paragraphe, suit automatiquement chaque palier */
    --caption:              calc(var(--paragraphe) * 0.75); /* texte secondaire (footer...), dérivée de --paragraphe */

    --grid:                 0.5rem;     /* 8px */

    /* Autres */
    --img-corner:           1vw;

    /* ─── Tablet ─── */
    @media (min-width: 768px) {
        /* Espacements */
        --padding-x-section:    3rem;       /* 48px */
        --padding-y-section:    6rem;       /* 96px */
        --gap-section:          1.5rem;     /* 24px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -3rem;      /* -48px */

        --gap-texte:            0.75rem;    /* 12px */
        --gap-projets:          2.25rem;    /* 36px */

        /* Tailles de police */
        --h2:                   4rem;       /* 64px */
        --role:                 2.25rem;    /* 48px */
        --paragraphe:           var(--paragraphe-tablette); /* palier actif : tablette */
        --grid:                 0.625rem;   /* 10px */
    }

    /* ─── Laptop ─── */
    @media (min-width: 1024px) {
        /* Espacements */
        --padding-x-section:    8rem;       /* 128px */
        --padding-y-section:    8rem;       /* 128px */
        --gap-section:          2rem;       /* 32px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -4rem;      /* -64px */

        --gap-texte:            1rem;       /* 16px */
        --gap-projets:          3rem;       /* 48px */

        /* Tailles de police */
        --h2:                   4.5rem;     /* 72px */
        --role:                 4rem;       /* 64px */
        --paragraphe:           var(--paragraphe-desktop); /* palier actif : desktop */
        --grid:                 0.75rem;    /* 12px */
    }

    /* ─── Desktop ─── */
    @media (min-width: 1440px) {

    }
}


/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ─── Body ─── */
body {
    background: var(--bg);
    color: var(--cream);
    font-family: var(--sans);
    font-size: var(--paragraphe);
    font-weight: 300;
    line-height: 1.5;
    overflow-x: hidden;
    cursor: none;
}

/* Grain global — fixed, couvre toute la page sans perturber le layout */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3C/filter%3E%3Crect width='400' height='400' fill='white' filter='url(%23noiseFilter)' /%3E%3C/svg%3E");
    opacity: 0.1;
    pointer-events: none;
    z-index: 9999;
}

/* ─── Typographie ─── */
h1, h2, h3, h4, h5, h6, strong {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1;
}

strong {
    font-weight: 600;
}

ul {
    list-style-type: none;
}
li {
    display: flex;
    height: fit-content;
}

a {
    color: var(--cream);
    text-decoration: none;
}

/* ─── Boutons ─── */
.btn,
.btn-style {
    position: relative;
    width: fit-content;
    color: var(--muted);
    font-size: var(--bouton);
    letter-spacing: 0.075em;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.2s ease;
}
.btn:not(.project-item-link, .proj-hero-back)::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 1px;
    background-color: var(--muted);
    transition: 0.2s ease;
}
.btn:hover {
    color: var(--cream);
    transition: 0.5s ease;
}
.btn:hover::after {
    width: 100%;
    left: 0;
    right: auto;
    transition: 0.5s ease;
}

/* ─── Boutons Style ─── */
.btn-style:hover{
    color: var(--muted);
}

/* ─── Images et vidéos ─── */
img,
video {
    width: 100%;
}


/* ===================================
    UTILITIES
    =================================== */
.text-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap-section);
    width: 100%;
}

/* ─── Eyebrow ─── */
[class*="eyebrow"] {
    position: relative;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    width: 100%;
    margin-bottom: calc(var(--gap-section));
    color: var(--dim);
    font-family: var(--mono);
    font-size:calc(var(--grid) * 1.25);
    text-align: center;
    text-transform: uppercase;
}
.eyebrow-center {
    justify-content: center;
}
.eyebrow-left::after,
.eyebrow-center::before,
.eyebrow-center::after {
    content: '';
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: var(--line);
}


/* ===================================
   CUSTOM CURSOR
   =================================== */
.cursor {
    position: fixed;
    display: none;
    width: 8px;
    height: 8px;
    background: var(--cream);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.cursor-ring {
    position: fixed;
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(245, 230, 200, .4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
}


/* ===================================
   NAVBAR
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--padding-navbar) var(--gap-section);
    z-index: 1000;
}
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}
.logo {
    width: 8rem;
    line-height: 0;
}
.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) / 2);
    padding-top: var(--padding-navbar);
}
.nav-links li {
    padding-right: var(--gap-section);
    transform: translateX(100%);
}

/* ─── Menu Hamburger ─── */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--cream);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
}


/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100vh;
}
/* Image de fond du hero — élément fixe séparé, et non un fond de .hero.
   Deux raisons : son opacité doit pouvoir être animée sans emporter le
   contenu, et .hero est épinglée par ScrollTrigger (donc transformée, donc
   contexte d'empilement) — un fond placé à l'intérieur masquerait la grille
   globale. z-index -1 : sous la grille et sous le contenu, au-dessus du fond
   de page. Opacité pilotée par --hero-bg ; 1 par défaut, pour un affichage
   correct sans JS. */
.hero-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(180deg, rgba(10, 14, 26, 0.85) 70%, var(--bg) 100%), url(../images/hero.webp);
    background-size: cover;
    background-position: center center;
    opacity: var(--hero-bg, 1);
    pointer-events: none;
}
.hero-main {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    gap: 0;
    width: 100%;
    padding: var(--gap-section);
    font-size: var(--h2);
    z-index: 2;
}
.hero-content {
    position: relative;
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    padding: var(--gap-section);
    z-index: 2;
}
/* Ex-`border-top` : passé en pseudo-élément car un `border` n'est pas
   animable. Le tracé se pilote via --line-draw (0 → 1), que GSAP anime
   sur l'élément parent. Valeur par défaut 1 : ligne pleine si le JS
   n'a pas la main (pas de JS, prefers-reduced-motion). */
.hero-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--cream);
    transform: scaleX(var(--line-draw, 1));
    transform-origin: left center;
}

/* ─── Hero Title ─── */
.hero-title {
    line-height: 0;
}
.hero-role {
    overflow: hidden;
    /* height posée par le JS = hauteur d'un .role-item + le gap de
       .role-inner (dépend du text-box trim, non calculable en CSS pur) */
    font-size: var(--role);
    line-height: 1;
    /* margin, pas padding : un padding serait à l'intérieur de la zone
       overflow:hidden et agrandirait la fenêtre visible au-delà de la
       hauteur d'un .role-item, laissant apparaître le rôle suivant.
       On retranche --role-overshoot car le JS agrandit la fenêtre de ce
       montant (des deux côtés) pour ne pas couper les débords d'encre du
       rôle actif : l'écart baseline → image du titre reste égal à
       --gap-section malgré cet agrandissement. */
    margin: calc(var(--gap-section) - var(--role-overshoot)) 0;
}
.role-inner {
    display: flex;
    flex-direction: column;
    /* écarte les .role-item entre eux pour que le débord d'encre de l'un
       n'entre jamais dans la fenêtre de son voisin (le JS lit ce gap pour
       calculer la hauteur de .hero-role et le pas de rotation) */
    gap: calc(var(--role-overshoot) * 2);
}
.role-item {
    font-family: var(--serif);
    font-size: var(--role);
    line-height: 1;
    /* pas de padding : text-box trim-both ... alphabetic arrête déjà la
       box exactement sur la baseline, un padding-bottom ajouterait un
       espace vide sous la baseline */
    text-box: trim-both cap alphabetic;
}
.hero-text p {
    max-width: 56rem;
}

/* ─── Hero Video ─── */
.hero-video-container {
    max-width: 28rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    z-index: 5;
}
.hero-video {
    position: relative;
    cursor: pointer;
}

.hero-video-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, transparent 60%, var(--bg) 97%);
    transition: 0.4s ease;
    inset: 0;
}
.hero-video:hover .hero-video-overlay {
    background: linear-gradient(180deg, transparent -60%, var(--bg) 97%);
    transition: 0.4s ease;
}

.hero-video-label {
    font-family: var(--serif);
    opacity: 0;
    transition: 0.4s ease;
    transform: translateY(8px);
}
.hero-video:hover .hero-video-label {
    opacity: 1;
    transform: translateY(0);
    transition: 0.4s ease;
}

/* Fullscreen (FLIP target) state */
.hero-video.is-open {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    padding: var(--gap-section);
    z-index: 1001;
    cursor: default;
}
.hero-video.is-open::after {
    display: none;
}

.hero-video.is-open video {
    max-width: none;
}

.hero-video.is-open .hero-video-overlay,
.hero-video.is-open .hero-video-label {
    display: none;
}

.hero-video.is-open .hero-video-close {
    display: flex;
}

.hero-video-close {
    position: absolute;
    top: calc(var(--gap-section) - 36px - 10px);
    right: calc(var(--gap-section));
    width: 36px;
    height: 36px;
    display: none;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(245,230,200,.3);
    color: var(--cream);
    font-size: var(--bouton);
    border-radius: 50%;
    background: var(--bg);
    opacity: 0.8;
    cursor: pointer;
    z-index: 2;
    transform: scale(0);
    transition: background .3s;
}
.hero-video-close:hover {
    background: var(--bg);
    opacity: 0.8;
}

.video-backdrop {
    position: fixed;
    background: var(--bg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
    inset: 0;
}
.video-backdrop.is-visible {
    opacity: 0.9;
    visibility: visible;
}


/* ===================================
   STATEMENT SECTION (First)
   =================================== */
.statement {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.statement-title,
.proj-statement-text {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 900px;
}
.statement-text {
    max-width: 720px;
    color: var(--muted);
}


/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
}
.about-container {
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    max-width: 1280px;
}
.about-img-left {
    display: none;
    max-width: 28rem;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.about-img-right {
    max-width: 28rem;
}
.skills-title {
    justify-content: flex-start;
    padding-bottom: var(--gap-section);
    border-bottom: 1px solid var(--line);
}
.skills-title::before,
.skills-title::after {
    display: none;
}
.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--gap-section) * 0.75);
}


/* ===================================
   PARCOURS SECTION (Horizontal Scroll)
   =================================== */

/* Section height = 100vh, GSAP ajoute l'espace de scroll via pin */
.parcours {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--padding-x-section);
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
    z-index: 10;
}

/* "Parcours" watermark — centré absolument, z-index bas */
.parcours-hero-text {
    position: relative;
    font-size: 4.5rem;
    text-align: center;
} 

/* Track horizontal */
.parcours-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--padding-x-section);
}

/* ---- Carte individuelle — une par viewport ---- */
.parcours-bloc {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Wrapper interne — flex colonne : image en haut, textes en bas */
.parcours-bloc-inner {
    width: 100%;
}

/* Image — format 4:3, taille fixe identique pour tous les blocs */
.parcours-bloc-img {
    position: relative;
    max-width: 28rem;
    border: 1px solid var(--accent);
    aspect-ratio: 16/9;
    overflow: visible; /* wrapper now handles overflow */
}

/* Wrapper that exactly matches the image dimensions; receives the overlay */
.parcours-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Gradient overlay at bottom of the image — applied to the wrapper */
.parcours-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(10, 14, 26, 0.9) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.parcours-img-ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Textes — chevauchent légèrement le bas de l'image */
.parcours-bloc-texts {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) / 2);
    margin-top: calc(var(--gap-section) * (-2));
    z-index: 2;
}

.parcours-bloc-title {
    font-size: clamp(3rem, 7vw, 5.75rem);
    padding-left: var(--gap-section);
}

.parcours-bloc-year {
    justify-content: flex-start;
    margin: 0;
    padding-left: var(--gap-section);
    padding-bottom: calc(var(--gap-section) / 2);
    border-bottom: 1px solid var(--line);
}
.parcours-bloc-year::before,
.parcours-bloc-year::after {
    display: none;
}

.parcours-bloc-text {
    color: var(--muted);
}


/* ===================================
   PROJECTS SECTION
   =================================== */
.projects {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: var(--padding-y-section);
    height: 100vh;
    padding: var(--gap-section);
    padding-top: 0;
    overflow: hidden;
}
/* Fonds des projets — sortis de la section (cf. index.html) et donc fixes,
   sur le même plan que .hero-bg : z-index -1, sous la grille globale et sous
   le contenu. La section projets étant épinglée (donc transformée, donc
   contexte d'empilement), des fonds placés à l'intérieur masqueraient la
   grille au survol. Ils restent invisibles hors survol (opacité 0). */
.projects-bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.project-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
}
.projects-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg);
    opacity: 0;   /* apparaît avec le fond survolé, piloté par home.js */
    pointer-events: none;
}
.projects-heading-mask {
    order: 1;
    z-index: 1;
}
.projects-heading {
    text-box: trim-both cap alphabetic;
}
.projects-list-clip {
    position: relative;
    height: 100%;
    padding: var(--gap-section) 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    z-index: 2;
}
.projects-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) * 0.75);
    padding-top: 4rem;
    text-align: right;
}
.project-item-link {
    color: var(--cream);
    font-size: clamp(1.75rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    text-box: trim-both cap alphabetic;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}


/* ===================================
   MARQUEE SECTION
   =================================== */
.marquee-section {
    position: relative;
    padding-top: var(--padding-y-section);
    overflow: hidden;
}
.marquee {
    position: relative;
    width: 100%;
}
.marquee.reveal{
    display: flex;
}
.marquee-content {
    display: flex;
    gap: 1.25rem;
    white-space: nowrap;
    padding-right: 1.25rem;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 2rem;
    animation: marquee 20s linear infinite;
}

/* ─── Animation ─── */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}


/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    position: relative;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.contact-container {
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) * 2);
    align-items: center;
    max-width: 1064px;
    margin: 0 auto;
}
.contact-title {
    font-size: clamp(3rem, 10vw, 6rem);
}
.contact-subtitle {
    color: var(--muted);
}
.contact-email {
    font-size: var(--email);
    border-bottom: 1px solid var(--cream);
    transition: opacity 0.3s ease;
}
.contact-email:hover {
    opacity: 0.7;
}
.contact-socials {
    display: flex;
    justify-content: center;
    gap: calc(var(--gap-section) * 2);
}
.social-link:hover {
    color: var(--cream);
}


/* ===================================
   FOOTER
   =================================== */
.footer {
    position: relative;
    padding: var(--padding-navbar) var(--gap-section);
    /* border-top: 1px solid var(--accent); */
}
.footer p {
    text-align: center;
    font-size: var(--caption);
    color: var(--muted);
}


/* ===================================
   TABLET STYLES
   =================================== */
@media (min-width: 768px) {
    /* ===================================
       NAVBAR
       =================================== */
    .logo {
        width: 10rem;
    }
    .nav-links {
        position: relative;
        flex-direction: row;
        gap: 3vw;
        padding: 0;
    }
    .nav-links li {
        padding: 0;
        transform: none;
    }
    /* ─── Menu Hamburger ─── */
    .nav-hamburger {
        display: none;
    }


    /* ===================================
       HERO SECTION
       =================================== */
    .hero-content {
        grid-template-columns: 3fr 2fr;
        gap: 0;
        padding: 0;
    }

    /* ─── Hero Title ─── */
    .hero-title {
        max-width: 96rem;
    }
    .hero-text {
        position: relative;
        padding: calc(var(--gap-section) * 2) var(--gap-section);
    }
    /* Ex-`border-right`, même principe que .hero-content::after */
    .hero-text::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 1px;
        height: 100%;
        background: var(--cream);
        transform: scaleY(var(--line-draw, 1));
        transform-origin: center top;
    }

    /* ─── Hero Video ─── */
    .hero-video-container {
        margin: var(--gap-section);
    }
    .hero-video.is-open {
        max-width: 72rem;
        padding: var(--gap-section);
    }
    .hero-video-close {
        top: calc(var(--gap-section) + 18px);
        right: calc(var(--gap-section) + 18px);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-text {
        max-width: 580px;
    }
    .about-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .about-skills {
        padding-top: var(--gap-section);
    }


    /* ===================================
      PARCOURS SECTION (Horizontal Scroll)
      =================================== */
    .parcours {
        height: 100vh;
        padding: 0;
    }
    .parcours-hero {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        z-index: 1;
        pointer-events: none;
    }
    .parcours-hero-text {
        font-size: clamp(9rem, 20vw, 20rem);
    }
    .parcours-track-wrap {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: 2;
        display: flex;        /* ← ajouté */
        align-items: center;  /* ← centre .parcours-track verticalement */
    }
    .parcours-track {
        flex-direction: row;
        gap: 0;
        width: fit-content;
    }
    .parcours-bloc {
        width: 100vw;
    }
    .parcours-bloc-inner {
        width: 60%;
        max-width: 36rem;
    }
    .parcours-bloc-img {
        max-width: 100%;
    }
    .parcours-bloc-title {
        padding: 0;
    }
}


/* ===================================
   VERTICAL TABLET STYLES
   =================================== */ 
@media (min-width: 768px) and (max-width: 1064px) and (min-height: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: calc(var(--gap-section) * 2);
        padding: calc(var(--gap-section) * 2);
    }
    .hero-text {
        padding: 0;
        border: none;
    }
    .hero-video-container {
        width: 50vh;
        /*max-width: fit-content;*/
        margin: 0;
        /*aspect-ratio: 16/9;*/
    }

    .about-img-left {
        display: block;
        max-width: 100%;
        height: 20vh;
        aspect-ratio: auto;
        object-position: center 20%;
    }
}


/* ===================================
   LAPTOP STYLES
   =================================== */
@media (min-width: 1024px) {
    /* ===================================
       CUSTOM CURSOR
       =================================== */
    .cursor,
    .cursor-ring {
        display: block;
    }
    .hero-video-container {
        max-width: 28rem;
    }


    /* ===================================
       NAVBAR
       =================================== */
    .navbar{
        padding: 1.5rem var(--gap-section);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-container {
        grid-template-columns: 1fr 1fr;
    }
    .about-left {
        padding-top: var(--gap-section);
    }
    .about-right {
        grid-template-columns: 1fr;
        height: fit-content;
    }
    .about-img-left,
    .about-img-right {
        max-width: 100%;
    }
    .about-img-left {
        display: block;
        height: auto;
        aspect-ratio: 16/9;
    }
    .about-skills {
        padding: 0;
    }


    /* ===================================
       PARCOURS SECTION (Horizontal Scroll)
       =================================== */
    .parcours-bloc-img {
        aspect-ratio: 4/3;
    }


    /* ===================================
       PROJECTS SECTION
       =================================== */
    .projects-list {
        gap: calc(var(--gap-section) * 1.5);
        padding: 0;
    }
}

/* ===================================
   ACCESSIBILITÉ
   =================================== */

/* Focus clavier cohérent avec la palette (au lieu du contour bleu
   par défaut du navigateur, peu lisible sur fond sombre). Utilise
   :focus-visible pour ne s'afficher qu'au clavier, pas au clic souris. */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--cream);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Lien d'évitement — masqué visuellement tant qu'il n'a pas le focus,
   pour permettre à un utilisateur clavier de sauter directement au
   contenu principal sans repasser par toute la navbar à chaque page. */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background: var(--cream);
    color: var(--bg);
    font-family: var(--sans);
    font-size: var(--bouton);
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

/* ===================================
   LOADER
   ===================================
   Couvre la page pendant que le JS pose les états de départ des
   animations. Remplace l'ancien systeme de masquage element par element
   (classe .js + visibility:hidden), plus simple : un seul element a gerer.

   Le repli est ici en CSS pur : si le JS ne prend jamais la main (erreur,
   fichier manquant), l'animation ci-dessous efface le loader toute seule
   au bout de 3 s. Sans elle, une panne de JS laisserait un ecran opaque. */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    animation: loader-fallback 0.6s ease 3s forwards;
}
@keyframes loader-fallback {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Masque du titre : l'image monte depuis le bas, coupee par ce conteneur */
.hero-title {
    overflow: hidden;
}

/* Reduction de mouvement : pas de fondu differe, le loader disparait tout
   de suite (le JS fait de meme de son cote). */
@media (prefers-reduced-motion: reduce) {
    #loader {
        animation-delay: 0s;
        animation-duration: 0.01s;
    }
}/* ===================================
   DESIGN SYSTEM & VARIABLES
   =================================== */
:root {
    /* Couleurs */
    --bg:        #0A0E1A;   /* Fond principal — bleu nuit très sombre */
    --bg2:       #0D1120;   /* Fond alternatif légèrement plus clair */
    --cream:     #F5E6C8;   /* Texte principal — crème chaud */
    --muted:     #C4B89A;   /* Texte secondaire — beige sourd */
    --dim:       rgba(245, 230, 200, 0.5);
    --line:      #1A1F30;   /* Lignes de grille, séparateurs subtils */
    --line-num:  #2A3050;   /* Numéros de grille, labels discrets */
    --accent:    #1E2233;   /* Accents, bordures */

    /* Typographies */
    --serif:     'Playfair Display', serif;
    --sans:      'Space Grotesk', sans-serif;
    --mono:      'JetBrains Mono', monospace;

    /* Espacements */
    --padding-x-section:    2rem;       /* 32px */
    --padding-y-section:    4rem;       /* 32px */
    --gap-section:          1rem;       /* 16px */

    --padding-navbar:       0.75rem;    /* 12px */
    --padding-inverse:      -2rem;      /* -32px */

    --gap-texte:            0.5rem;     /* 8px */
    --gap-projets:          1.75rem;    /* 28px */

    /* Tailles de police */
    --h2:                   2rem;       /* 32px */
    --role:                 1.75rem;    /* 28px */

    /* Réserve (en em, donc alignée sur --role) pour les débords d'encre
       (jambages, dépassements de capitales en italique) que le trim
       text-box cap/alphabetic exclut de la boîte de layout de .role-item.
       Utilisée à la fois comme demi-gap entre .role-item (pour ne jamais
       laisser apparaître le voisin) et comme correction de la marge de
       .hero-role (pour ne pas changer l'écart baseline → image du titre). */
    --role-overshoot:       0.3em;

    /* ─── Système base + coefficients ───
       --base ne doit JAMAIS être redéfinie dans un @media : c'est la
       racine fixe dont dérivent --bouton (constant) et --paragraphe
       (en cascade mobile → tablette → desktop). */
    --base:                 1rem;       /* 16px — racine fixe, ne pas toucher */
    --bouton:               calc(var(--base) * 0.875);  /* 16 × 0.875 = 14px, constant sur les 3 formats */

    /* Chaîne d'étapes à noms distincts : évite toute auto-référence
       (--paragraphe: calc(var(--paragraphe) * x) est un cycle invalide
       en CSS, même réparti dans des @media différents — voir plus bas). */
    --paragraphe-mobile:    var(--base);                          /* 16 × 1 = 16px */
    --paragraphe-tablette:  calc(var(--paragraphe-mobile) * 1.125);   /* 16 × 1.125 = 18px */
    --paragraphe-desktop:   calc(var(--paragraphe-tablette) * 1.125); /* 18 × 1.125 ≈ 20.25px (≈ 20px) */

    --paragraphe:           var(--paragraphe-mobile);       /* palier actif : mobile */
    --email:                calc(var(--paragraphe) * 1.25); /* dérivée de --paragraphe, suit automatiquement chaque palier */
    --caption:              calc(var(--paragraphe) * 0.75); /* texte secondaire (footer...), dérivée de --paragraphe */

    --grid:                 0.5rem;     /* 8px */

    /* Autres */
    --img-corner:           1vw;

    /* ─── Tablet ─── */
    @media (min-width: 768px) {
        /* Espacements */
        --padding-x-section:    3rem;       /* 48px */
        --padding-y-section:    6rem;       /* 96px */
        --gap-section:          1.5rem;     /* 24px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -3rem;      /* -48px */

        --gap-texte:            0.75rem;    /* 12px */
        --gap-projets:          2.25rem;    /* 36px */

        /* Tailles de police */
        --h2:                   4rem;       /* 64px */
        --role:                 2.25rem;    /* 48px */
        --paragraphe:           var(--paragraphe-tablette); /* palier actif : tablette */
        --grid:                 0.625rem;   /* 10px */
    }

    /* ─── Laptop ─── */
    @media (min-width: 1024px) {
        /* Espacements */
        --padding-x-section:    8rem;       /* 128px */
        --padding-y-section:    8rem;       /* 128px */
        --gap-section:          2rem;       /* 32px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -4rem;      /* -64px */

        --gap-texte:            1rem;       /* 16px */
        --gap-projets:          3rem;       /* 48px */

        /* Tailles de police */
        --h2:                   4.5rem;     /* 72px */
        --role:                 4rem;       /* 64px */
        --paragraphe:           var(--paragraphe-desktop); /* palier actif : desktop */
        --grid:                 0.75rem;    /* 12px */
    }

    /* ─── Desktop ─── */
    @media (min-width: 1440px) {

    }
}


/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ─── Body ─── */
body {
    background: var(--bg);
    color: var(--cream);
    font-family: var(--sans);
    font-size: var(--paragraphe);
    font-weight: 300;
    line-height: 1.5;
    overflow-x: hidden;
    cursor: none;
}

/* Grain global — fixed, couvre toute la page sans perturber le layout */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3C/filter%3E%3Crect width='400' height='400' fill='white' filter='url(%23noiseFilter)' /%3E%3C/svg%3E");
    opacity: 0.1;
    pointer-events: none;
    z-index: 9999;
}

/* ─── Typographie ─── */
h1, h2, h3, h4, h5, h6, strong {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1;
}

strong {
    font-weight: 600;
}

ul {
    list-style-type: none;
}
li {
    display: flex;
    height: fit-content;
}

a {
    color: var(--cream);
    text-decoration: none;
}

/* ─── Boutons ─── */
.btn,
.btn-style {
    position: relative;
    width: fit-content;
    color: var(--muted);
    font-size: var(--bouton);
    letter-spacing: 0.075em;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.2s ease;
}
.btn:not(.project-item-link, .proj-hero-back)::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 1px;
    background-color: var(--muted);
    transition: 0.2s ease;
}
.btn:hover {
    color: var(--cream);
    transition: 0.5s ease;
}
.btn:hover::after {
    width: 100%;
    left: 0;
    right: auto;
    transition: 0.5s ease;
}

/* ─── Boutons Style ─── */
.btn-style:hover{
    color: var(--muted);
}

/* ─── Images et vidéos ─── */
img,
video {
    width: 100%;
}


/* ===================================
    UTILITIES
    =================================== */
.text-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap-section);
    width: 100%;
}

/* ─── Eyebrow ─── */
[class*="eyebrow"] {
    position: relative;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    width: 100%;
    margin-bottom: calc(var(--gap-section));
    color: var(--dim);
    font-family: var(--mono);
    font-size:calc(var(--grid) * 1.25);
    text-align: center;
    text-transform: uppercase;
}
.eyebrow-center {
    justify-content: center;
}
.eyebrow-left::after,
.eyebrow-center::before,
.eyebrow-center::after {
    content: '';
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: var(--line);
}


/* ===================================
   CUSTOM CURSOR
   =================================== */
.cursor {
    position: fixed;
    display: none;
    width: 8px;
    height: 8px;
    background: var(--cream);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.cursor-ring {
    position: fixed;
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(245, 230, 200, .4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
}


/* ===================================
   NAVBAR
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--padding-navbar) var(--gap-section);
    z-index: 1000;
}
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}
.logo {
    width: 8rem;
    line-height: 0;
}
.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) / 2);
    padding-top: var(--padding-navbar);
}
.nav-links li {
    padding-right: var(--gap-section);
    transform: translateX(100%);
}

/* ─── Menu Hamburger ─── */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--cream);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
}


/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100vh;
}
/* Image de fond du hero — élément fixe séparé, et non un fond de .hero.
   Deux raisons : son opacité doit pouvoir être animée sans emporter le
   contenu, et .hero est épinglée par ScrollTrigger (donc transformée, donc
   contexte d'empilement) — un fond placé à l'intérieur masquerait la grille
   globale. z-index -1 : sous la grille et sous le contenu, au-dessus du fond
   de page. Opacité pilotée par --hero-bg ; 1 par défaut, pour un affichage
   correct sans JS. */
.hero-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(180deg, rgba(10, 14, 26, 0.85) 70%, var(--bg) 100%), url(../images/hero.webp);
    background-size: cover;
    background-position: center center;
    opacity: var(--hero-bg, 1);
    pointer-events: none;
}
.hero-main {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    gap: 0;
    width: 100%;
    padding: var(--gap-section);
    font-size: var(--h2);
    z-index: 2;
}
.hero-content {
    position: relative;
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    padding: var(--gap-section);
    z-index: 2;
}
/* Ex-`border-top` : passé en pseudo-élément car un `border` n'est pas
   animable. Le tracé se pilote via --line-draw (0 → 1), que GSAP anime
   sur l'élément parent. Valeur par défaut 1 : ligne pleine si le JS
   n'a pas la main (pas de JS, prefers-reduced-motion). */
.hero-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--cream);
    transform: scaleX(var(--line-draw, 1));
    transform-origin: left center;
}

/* ─── Hero Title ─── */
.hero-title {
    line-height: 0;
}
.hero-role {
    overflow: hidden;
    /* height posée par le JS = hauteur d'un .role-item + le gap de
       .role-inner (dépend du text-box trim, non calculable en CSS pur) */
    font-size: var(--role);
    line-height: 1;
    /* margin, pas padding : un padding serait à l'intérieur de la zone
       overflow:hidden et agrandirait la fenêtre visible au-delà de la
       hauteur d'un .role-item, laissant apparaître le rôle suivant.
       On retranche --role-overshoot car le JS agrandit la fenêtre de ce
       montant (des deux côtés) pour ne pas couper les débords d'encre du
       rôle actif : l'écart baseline → image du titre reste égal à
       --gap-section malgré cet agrandissement. */
    margin: calc(var(--gap-section) - var(--role-overshoot)) 0;
}
.role-inner {
    display: flex;
    flex-direction: column;
    /* écarte les .role-item entre eux pour que le débord d'encre de l'un
       n'entre jamais dans la fenêtre de son voisin (le JS lit ce gap pour
       calculer la hauteur de .hero-role et le pas de rotation) */
    gap: calc(var(--role-overshoot) * 2);
}
.role-item {
    font-family: var(--serif);
    font-size: var(--role);
    line-height: 1;
    /* pas de padding : text-box trim-both ... alphabetic arrête déjà la
       box exactement sur la baseline, un padding-bottom ajouterait un
       espace vide sous la baseline */
    text-box: trim-both cap alphabetic;
}
.hero-text p {
    max-width: 56rem;
}

/* ─── Hero Video ─── */
.hero-video-container {
    max-width: 28rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    z-index: 5;
}
.hero-video {
    position: relative;
    cursor: pointer;
}

.hero-video-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, transparent 60%, var(--bg) 97%);
    transition: 0.4s ease;
    inset: 0;
}
.hero-video:hover .hero-video-overlay {
    background: linear-gradient(180deg, transparent -60%, var(--bg) 97%);
    transition: 0.4s ease;
}

.hero-video-label {
    font-family: var(--serif);
    opacity: 0;
    transition: 0.4s ease;
    transform: translateY(8px);
}
.hero-video:hover .hero-video-label {
    opacity: 1;
    transform: translateY(0);
    transition: 0.4s ease;
}

/* Fullscreen (FLIP target) state */
.hero-video.is-open {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    padding: var(--gap-section);
    z-index: 1001;
    cursor: default;
}
.hero-video.is-open::after {
    display: none;
}

.hero-video.is-open video {
    max-width: none;
}

.hero-video.is-open .hero-video-overlay,
.hero-video.is-open .hero-video-label {
    display: none;
}

.hero-video.is-open .hero-video-close {
    display: flex;
}

.hero-video-close {
    position: absolute;
    top: calc(var(--gap-section) - 36px - 10px);
    right: calc(var(--gap-section));
    width: 36px;
    height: 36px;
    display: none;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(245,230,200,.3);
    color: var(--cream);
    font-size: var(--bouton);
    border-radius: 50%;
    background: var(--bg);
    opacity: 0.8;
    cursor: pointer;
    z-index: 2;
    transform: scale(0);
    transition: background .3s;
}
.hero-video-close:hover {
    background: var(--bg);
    opacity: 0.8;
}

.video-backdrop {
    position: fixed;
    background: var(--bg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
    inset: 0;
}
.video-backdrop.is-visible {
    opacity: 0.9;
    visibility: visible;
}


/* ===================================
   STATEMENT SECTION (First)
   =================================== */
.statement {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.statement-title,
.proj-statement-text {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 900px;
}
.statement-text {
    max-width: 720px;
    color: var(--muted);
}


/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
}
.about-container {
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    max-width: 1280px;
}
.about-img-left {
    display: none;
    max-width: 28rem;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.about-img-right {
    max-width: 28rem;
}
.skills-title {
    justify-content: flex-start;
    padding-bottom: var(--gap-section);
    border-bottom: 1px solid var(--line);
}
.skills-title::before,
.skills-title::after {
    display: none;
}
.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--gap-section) * 0.75);
}


/* ===================================
   PARCOURS SECTION (Horizontal Scroll)
   =================================== */

/* Section height = 100vh, GSAP ajoute l'espace de scroll via pin */
.parcours {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--padding-x-section);
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
    z-index: 10;
}

/* "Parcours" watermark — centré absolument, z-index bas */
.parcours-hero-text {
    position: relative;
    font-size: 4.5rem;
    text-align: center;
} 

/* Track horizontal */
.parcours-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--padding-x-section);
}

/* ---- Carte individuelle — une par viewport ---- */
.parcours-bloc {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Wrapper interne — flex colonne : image en haut, textes en bas */
.parcours-bloc-inner {
    width: 100%;
}

/* Image — format 4:3, taille fixe identique pour tous les blocs */
.parcours-bloc-img {
    position: relative;
    max-width: 28rem;
    border: 1px solid var(--accent);
    aspect-ratio: 16/9;
    overflow: visible; /* wrapper now handles overflow */
}

/* Wrapper that exactly matches the image dimensions; receives the overlay */
.parcours-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Gradient overlay at bottom of the image — applied to the wrapper */
.parcours-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(10, 14, 26, 0.9) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.parcours-img-ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Textes — chevauchent légèrement le bas de l'image */
.parcours-bloc-texts {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) / 2);
    margin-top: calc(var(--gap-section) * (-2));
    z-index: 2;
}

.parcours-bloc-title {
    font-size: clamp(3rem, 7vw, 5.75rem);
    padding-left: var(--gap-section);
}

.parcours-bloc-year {
    justify-content: flex-start;
    margin: 0;
    padding-left: var(--gap-section);
    padding-bottom: calc(var(--gap-section) / 2);
    border-bottom: 1px solid var(--line);
}
.parcours-bloc-year::before,
.parcours-bloc-year::after {
    display: none;
}

.parcours-bloc-text {
    color: var(--muted);
}


/* ===================================
   PROJECTS SECTION
   =================================== */
.projects {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: var(--padding-y-section);
    height: 100vh;
    padding: var(--gap-section);
    padding-top: 0;
    overflow: hidden;
}
/* Fonds des projets — sortis de la section (cf. index.html) et donc fixes,
   sur le même plan que .hero-bg : z-index -1, sous la grille globale et sous
   le contenu. La section projets étant épinglée (donc transformée, donc
   contexte d'empilement), des fonds placés à l'intérieur masqueraient la
   grille au survol. Ils restent invisibles hors survol (opacité 0). */
.projects-bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.project-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
}
.projects-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg);
    opacity: 0;   /* apparaît avec le fond survolé, piloté par home.js */
    pointer-events: none;
}
.projects-heading-mask {
    order: 1;
    z-index: 1;
}
.projects-heading {
    text-box: trim-both cap alphabetic;
}
.projects-list-clip {
    position: relative;
    height: 100%;
    padding: var(--gap-section) 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    z-index: 2;
}
.projects-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) * 0.75);
    padding-top: 4rem;
    text-align: right;
}
.project-item-link {
    color: var(--cream);
    font-size: clamp(1.75rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    text-box: trim-both cap alphabetic;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}


/* ===================================
   MARQUEE SECTION
   =================================== */
.marquee-section {
    position: relative;
    padding-top: var(--padding-y-section);
    overflow: hidden;
}
.marquee {
    position: relative;
    width: 100%;
}
.marquee.reveal{
    display: flex;
}
.marquee-content {
    display: flex;
    gap: 1.25rem;
    white-space: nowrap;
    padding-right: 1.25rem;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 2rem;
    animation: marquee 20s linear infinite;
}

/* ─── Animation ─── */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}


/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    position: relative;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.contact-container {
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) * 2);
    align-items: center;
    max-width: 1064px;
    margin: 0 auto;
}
.contact-title {
    font-size: clamp(3rem, 10vw, 6rem);
}
.contact-subtitle {
    color: var(--muted);
}
.contact-email {
    font-size: var(--email);
    border-bottom: 1px solid var(--cream);
    transition: opacity 0.3s ease;
}
.contact-email:hover {
    opacity: 0.7;
}
.contact-socials {
    display: flex;
    justify-content: center;
    gap: calc(var(--gap-section) * 2);
}
.social-link:hover {
    color: var(--cream);
}


/* ===================================
   FOOTER
   =================================== */
.footer {
    position: relative;
    padding: var(--padding-navbar) var(--gap-section);
    /* border-top: 1px solid var(--accent); */
}
.footer p {
    text-align: center;
    font-size: var(--caption);
    color: var(--muted);
}


/* ===================================
   TABLET STYLES
   =================================== */
@media (min-width: 768px) {
    /* ===================================
       NAVBAR
       =================================== */
    .logo {
        width: 10rem;
    }
    .nav-links {
        position: relative;
        flex-direction: row;
        gap: 3vw;
        padding: 0;
    }
    .nav-links li {
        padding: 0;
        transform: none;
    }
    /* ─── Menu Hamburger ─── */
    .nav-hamburger {
        display: none;
    }


    /* ===================================
       HERO SECTION
       =================================== */
    .hero-content {
        grid-template-columns: 3fr 2fr;
        gap: 0;
        padding: 0;
    }

    /* ─── Hero Title ─── */
    .hero-title {
        max-width: 96rem;
    }
    .hero-text {
        position: relative;
        padding: calc(var(--gap-section) * 2) var(--gap-section);
    }
    /* Ex-`border-right`, même principe que .hero-content::after */
    .hero-text::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 1px;
        height: 100%;
        background: var(--cream);
        transform: scaleY(var(--line-draw, 1));
        transform-origin: center top;
    }

    /* ─── Hero Video ─── */
    .hero-video-container {
        margin: var(--gap-section);
    }
    .hero-video.is-open {
        max-width: 72rem;
        padding: var(--gap-section);
    }
    .hero-video-close {
        top: calc(var(--gap-section) + 18px);
        right: calc(var(--gap-section) + 18px);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-text {
        max-width: 580px;
    }
    .about-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .about-skills {
        padding-top: var(--gap-section);
    }


    /* ===================================
      PARCOURS SECTION (Horizontal Scroll)
      =================================== */
    .parcours {
        height: 100vh;
        padding: 0;
    }
    .parcours-hero {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        z-index: 1;
        pointer-events: none;
    }
    .parcours-hero-text {
        font-size: clamp(9rem, 20vw, 20rem);
    }
    .parcours-track-wrap {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: 2;
        display: flex;        /* ← ajouté */
        align-items: center;  /* ← centre .parcours-track verticalement */
    }
    .parcours-track {
        flex-direction: row;
        gap: 0;
        width: fit-content;
    }
    .parcours-bloc {
        width: 100vw;
    }
    .parcours-bloc-inner {
        width: 60%;
        max-width: 36rem;
    }
    .parcours-bloc-img {
        max-width: 100%;
    }
    .parcours-bloc-title {
        padding: 0;
    }
}


/* ===================================
   VERTICAL TABLET STYLES
   =================================== */ 
@media (min-width: 768px) and (max-width: 1064px) and (min-height: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: calc(var(--gap-section) * 2);
        padding: calc(var(--gap-section) * 2);
    }
    .hero-text {
        padding: 0;
        border: none;
    }
    .hero-video-container {
        width: 50vh;
        /*max-width: fit-content;*/
        margin: 0;
        /*aspect-ratio: 16/9;*/
    }

    .about-img-left {
        display: block;
        max-width: 100%;
        height: 20vh;
        aspect-ratio: auto;
        object-position: center 20%;
    }
}


/* ===================================
   LAPTOP STYLES
   =================================== */
@media (min-width: 1024px) {
    /* ===================================
       CUSTOM CURSOR
       =================================== */
    .cursor,
    .cursor-ring {
        display: block;
    }
    .hero-video-container {
        max-width: 28rem;
    }


    /* ===================================
       NAVBAR
       =================================== */
    .navbar{
        padding: 1.5rem var(--gap-section);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-container {
        grid-template-columns: 1fr 1fr;
    }
    .about-left {
        padding-top: var(--gap-section);
    }
    .about-right {
        grid-template-columns: 1fr;
        height: fit-content;
    }
    .about-img-left,
    .about-img-right {
        max-width: 100%;
    }
    .about-img-left {
        display: block;
        height: auto;
        aspect-ratio: 16/9;
    }
    .about-skills {
        padding: 0;
    }


    /* ===================================
       PARCOURS SECTION (Horizontal Scroll)
       =================================== */
    .parcours-bloc-img {
        aspect-ratio: 4/3;
    }


    /* ===================================
       PROJECTS SECTION
       =================================== */
    .projects-list {
        gap: calc(var(--gap-section) * 1.5);
        padding: 0;
    }
}

/* ===================================
   ACCESSIBILITÉ
   =================================== */

/* Focus clavier cohérent avec la palette (au lieu du contour bleu
   par défaut du navigateur, peu lisible sur fond sombre). Utilise
   :focus-visible pour ne s'afficher qu'au clavier, pas au clic souris. */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--cream);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Lien d'évitement — masqué visuellement tant qu'il n'a pas le focus,
   pour permettre à un utilisateur clavier de sauter directement au
   contenu principal sans repasser par toute la navbar à chaque page. */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background: var(--cream);
    color: var(--bg);
    font-family: var(--sans);
    font-size: var(--bouton);
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

/* ===================================
   LOADER
   ===================================
   Couvre la page pendant que le JS pose les états de départ des
   animations. Remplace l'ancien systeme de masquage element par element
   (classe .js + visibility:hidden), plus simple : un seul element a gerer.

   Le repli est ici en CSS pur : si le JS ne prend jamais la main (erreur,
   fichier manquant), l'animation ci-dessous efface le loader toute seule
   au bout de 3 s. Sans elle, une panne de JS laisserait un ecran opaque. */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    animation: loader-fallback 0.6s ease 3s forwards;
}
@keyframes loader-fallback {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Masque du titre : l'image monte depuis le bas, coupee par ce conteneur */
.hero-title {
    overflow: hidden;
}

/* Reduction de mouvement : pas de fondu differe, le loader disparait tout
   de suite (le JS fait de meme de son cote). */
@media (prefers-reduced-motion: reduce) {
    #loader {
        animation-delay: 0s;
        animation-duration: 0.01s;
    }
}/* ===================================
   DESIGN SYSTEM & VARIABLES
   =================================== */
:root {
    /* Couleurs */
    --bg:        #0A0E1A;   /* Fond principal — bleu nuit très sombre */
    --bg2:       #0D1120;   /* Fond alternatif légèrement plus clair */
    --cream:     #F5E6C8;   /* Texte principal — crème chaud */
    --muted:     #C4B89A;   /* Texte secondaire — beige sourd */
    --dim:       rgba(245, 230, 200, 0.5);
    --line:      #1A1F30;   /* Lignes de grille, séparateurs subtils */
    --line-num:  #2A3050;   /* Numéros de grille, labels discrets */
    --accent:    #1E2233;   /* Accents, bordures */

    /* Typographies */
    --serif:     'Playfair Display', serif;
    --sans:      'Space Grotesk', sans-serif;
    --mono:      'JetBrains Mono', monospace;

    /* Espacements */
    --padding-x-section:    2rem;       /* 32px */
    --padding-y-section:    4rem;       /* 32px */
    --gap-section:          1rem;       /* 16px */

    --padding-navbar:       0.75rem;    /* 12px */
    --padding-inverse:      -2rem;      /* -32px */

    --gap-texte:            0.5rem;     /* 8px */
    --gap-projets:          1.75rem;    /* 28px */

    /* Tailles de police */
    --h2:                   2rem;       /* 32px */
    --role:                 1.75rem;    /* 28px */

    /* Réserve (en em, donc alignée sur --role) pour les débords d'encre
       (jambages, dépassements de capitales en italique) que le trim
       text-box cap/alphabetic exclut de la boîte de layout de .role-item.
       Utilisée à la fois comme demi-gap entre .role-item (pour ne jamais
       laisser apparaître le voisin) et comme correction de la marge de
       .hero-role (pour ne pas changer l'écart baseline → image du titre). */
    --role-overshoot:       0.3em;

    /* ─── Système base + coefficients ───
       --base ne doit JAMAIS être redéfinie dans un @media : c'est la
       racine fixe dont dérivent --bouton (constant) et --paragraphe
       (en cascade mobile → tablette → desktop). */
    --base:                 1rem;       /* 16px — racine fixe, ne pas toucher */
    --bouton:               calc(var(--base) * 0.875);  /* 16 × 0.875 = 14px, constant sur les 3 formats */

    /* Chaîne d'étapes à noms distincts : évite toute auto-référence
       (--paragraphe: calc(var(--paragraphe) * x) est un cycle invalide
       en CSS, même réparti dans des @media différents — voir plus bas). */
    --paragraphe-mobile:    var(--base);                          /* 16 × 1 = 16px */
    --paragraphe-tablette:  calc(var(--paragraphe-mobile) * 1.125);   /* 16 × 1.125 = 18px */
    --paragraphe-desktop:   calc(var(--paragraphe-tablette) * 1.125); /* 18 × 1.125 ≈ 20.25px (≈ 20px) */

    --paragraphe:           var(--paragraphe-mobile);       /* palier actif : mobile */
    --email:                calc(var(--paragraphe) * 1.25); /* dérivée de --paragraphe, suit automatiquement chaque palier */
    --caption:              calc(var(--paragraphe) * 0.75); /* texte secondaire (footer...), dérivée de --paragraphe */

    --grid:                 0.5rem;     /* 8px */

    /* Autres */
    --img-corner:           1vw;

    /* ─── Tablet ─── */
    @media (min-width: 768px) {
        /* Espacements */
        --padding-x-section:    3rem;       /* 48px */
        --padding-y-section:    6rem;       /* 96px */
        --gap-section:          1.5rem;     /* 24px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -3rem;      /* -48px */

        --gap-texte:            0.75rem;    /* 12px */
        --gap-projets:          2.25rem;    /* 36px */

        /* Tailles de police */
        --h2:                   4rem;       /* 64px */
        --role:                 2.25rem;    /* 48px */
        --paragraphe:           var(--paragraphe-tablette); /* palier actif : tablette */
        --grid:                 0.625rem;   /* 10px */
    }

    /* ─── Laptop ─── */
    @media (min-width: 1024px) {
        /* Espacements */
        --padding-x-section:    8rem;       /* 128px */
        --padding-y-section:    8rem;       /* 128px */
        --gap-section:          2rem;       /* 32px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -4rem;      /* -64px */

        --gap-texte:            1rem;       /* 16px */
        --gap-projets:          3rem;       /* 48px */

        /* Tailles de police */
        --h2:                   4.5rem;     /* 72px */
        --role:                 4rem;       /* 64px */
        --paragraphe:           var(--paragraphe-desktop); /* palier actif : desktop */
        --grid:                 0.75rem;    /* 12px */
    }

    /* ─── Desktop ─── */
    @media (min-width: 1440px) {

    }
}


/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ─── Body ─── */
body {
    background: var(--bg);
    color: var(--cream);
    font-family: var(--sans);
    font-size: var(--paragraphe);
    font-weight: 300;
    line-height: 1.5;
    overflow-x: hidden;
    cursor: none;
}

/* Grain global — fixed, couvre toute la page sans perturber le layout */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3C/filter%3E%3Crect width='400' height='400' fill='white' filter='url(%23noiseFilter)' /%3E%3C/svg%3E");
    opacity: 0.1;
    pointer-events: none;
    z-index: 9999;
}

/* ─── Typographie ─── */
h1, h2, h3, h4, h5, h6, strong {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1;
}

strong {
    font-weight: 600;
}

ul {
    list-style-type: none;
}
li {
    display: flex;
    height: fit-content;
}

a {
    color: var(--cream);
    text-decoration: none;
}

/* ─── Boutons ─── */
.btn,
.btn-style {
    position: relative;
    width: fit-content;
    color: var(--muted);
    font-size: var(--bouton);
    letter-spacing: 0.075em;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.2s ease;
}
.btn:not(.project-item-link, .proj-hero-back)::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 1px;
    background-color: var(--muted);
    transition: 0.2s ease;
}
.btn:hover {
    color: var(--cream);
    transition: 0.5s ease;
}
.btn:hover::after {
    width: 100%;
    left: 0;
    right: auto;
    transition: 0.5s ease;
}

/* ─── Boutons Style ─── */
.btn-style:hover{
    color: var(--muted);
}

/* ─── Images et vidéos ─── */
img,
video {
    width: 100%;
}


/* ===================================
    UTILITIES
    =================================== */
.text-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap-section);
    width: 100%;
}

/* ─── Eyebrow ─── */
[class*="eyebrow"] {
    position: relative;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    width: 100%;
    margin-bottom: calc(var(--gap-section));
    color: var(--dim);
    font-family: var(--mono);
    font-size:calc(var(--grid) * 1.25);
    text-align: center;
    text-transform: uppercase;
}
.eyebrow-center {
    justify-content: center;
}
.eyebrow-left::after,
.eyebrow-center::before,
.eyebrow-center::after {
    content: '';
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: var(--line);
}


/* ===================================
   CUSTOM CURSOR
   =================================== */
.cursor {
    position: fixed;
    display: none;
    width: 8px;
    height: 8px;
    background: var(--cream);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.cursor-ring {
    position: fixed;
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(245, 230, 200, .4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
}


/* ===================================
   NAVBAR
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--padding-navbar) var(--gap-section);
    z-index: 1000;
}
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}
.logo {
    width: 8rem;
    line-height: 0;
}
.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) / 2);
    padding-top: var(--padding-navbar);
}
.nav-links li {
    padding-right: var(--gap-section);
    transform: translateX(100%);
}

/* ─── Menu Hamburger ─── */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--cream);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
}


/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100vh;
}
/* Image de fond du hero — élément fixe séparé, et non un fond de .hero.
   Deux raisons : son opacité doit pouvoir être animée sans emporter le
   contenu, et .hero est épinglée par ScrollTrigger (donc transformée, donc
   contexte d'empilement) — un fond placé à l'intérieur masquerait la grille
   globale. z-index -1 : sous la grille et sous le contenu, au-dessus du fond
   de page. Opacité pilotée par --hero-bg ; 1 par défaut, pour un affichage
   correct sans JS. */
.hero-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(180deg, rgba(10, 14, 26, 0.85) 70%, var(--bg) 100%), url(../images/hero.webp);
    background-size: cover;
    background-position: center center;
    opacity: var(--hero-bg, 1);
    pointer-events: none;
}
.hero-main {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    gap: 0;
    width: 100%;
    padding: var(--gap-section);
    font-size: var(--h2);
    z-index: 2;
}
.hero-content {
    position: relative;
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    padding: var(--gap-section);
    z-index: 2;
}
/* Ex-`border-top` : passé en pseudo-élément car un `border` n'est pas
   animable. Le tracé se pilote via --line-draw (0 → 1), que GSAP anime
   sur l'élément parent. Valeur par défaut 1 : ligne pleine si le JS
   n'a pas la main (pas de JS, prefers-reduced-motion). */
.hero-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--cream);
    transform: scaleX(var(--line-draw, 1));
    transform-origin: left center;
}

/* ─── Hero Title ─── */
.hero-title {
    line-height: 0;
}
.hero-role {
    overflow: hidden;
    /* height posée par le JS = hauteur d'un .role-item + le gap de
       .role-inner (dépend du text-box trim, non calculable en CSS pur) */
    font-size: var(--role);
    line-height: 1;
    /* margin, pas padding : un padding serait à l'intérieur de la zone
       overflow:hidden et agrandirait la fenêtre visible au-delà de la
       hauteur d'un .role-item, laissant apparaître le rôle suivant.
       On retranche --role-overshoot car le JS agrandit la fenêtre de ce
       montant (des deux côtés) pour ne pas couper les débords d'encre du
       rôle actif : l'écart baseline → image du titre reste égal à
       --gap-section malgré cet agrandissement. */
    margin: calc(var(--gap-section) - var(--role-overshoot)) 0;
}
.role-inner {
    display: flex;
    flex-direction: column;
    /* écarte les .role-item entre eux pour que le débord d'encre de l'un
       n'entre jamais dans la fenêtre de son voisin (le JS lit ce gap pour
       calculer la hauteur de .hero-role et le pas de rotation) */
    gap: calc(var(--role-overshoot) * 2);
}
.role-item {
    font-family: var(--serif);
    font-size: var(--role);
    line-height: 1;
    /* pas de padding : text-box trim-both ... alphabetic arrête déjà la
       box exactement sur la baseline, un padding-bottom ajouterait un
       espace vide sous la baseline */
    text-box: trim-both cap alphabetic;
}
.hero-text p {
    max-width: 56rem;
}

/* ─── Hero Video ─── */
.hero-video-container {
    max-width: 28rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    z-index: 5;
}
.hero-video {
    position: relative;
    cursor: pointer;
}

.hero-video-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, transparent 60%, var(--bg) 97%);
    transition: 0.4s ease;
    inset: 0;
}
.hero-video:hover .hero-video-overlay {
    background: linear-gradient(180deg, transparent -60%, var(--bg) 97%);
    transition: 0.4s ease;
}

.hero-video-label {
    font-family: var(--serif);
    opacity: 0;
    transition: 0.4s ease;
    transform: translateY(8px);
}
.hero-video:hover .hero-video-label {
    opacity: 1;
    transform: translateY(0);
    transition: 0.4s ease;
}

/* Fullscreen (FLIP target) state */
.hero-video.is-open {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    padding: var(--gap-section);
    z-index: 1001;
    cursor: default;
}
.hero-video.is-open::after {
    display: none;
}

.hero-video.is-open video {
    max-width: none;
}

.hero-video.is-open .hero-video-overlay,
.hero-video.is-open .hero-video-label {
    display: none;
}

.hero-video.is-open .hero-video-close {
    display: flex;
}

.hero-video-close {
    position: absolute;
    top: calc(var(--gap-section) - 36px - 10px);
    right: calc(var(--gap-section));
    width: 36px;
    height: 36px;
    display: none;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(245,230,200,.3);
    color: var(--cream);
    font-size: var(--bouton);
    border-radius: 50%;
    background: var(--bg);
    opacity: 0.8;
    cursor: pointer;
    z-index: 2;
    transform: scale(0);
    transition: background .3s;
}
.hero-video-close:hover {
    background: var(--bg);
    opacity: 0.8;
}

.video-backdrop {
    position: fixed;
    background: var(--bg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
    inset: 0;
}
.video-backdrop.is-visible {
    opacity: 0.9;
    visibility: visible;
}


/* ===================================
   STATEMENT SECTION (First)
   =================================== */
.statement {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.statement-title,
.proj-statement-text {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 900px;
}
.statement-text {
    max-width: 720px;
    color: var(--muted);
}


/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
}
.about-container {
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    max-width: 1280px;
}
.about-img-left {
    display: none;
    max-width: 28rem;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.about-img-right {
    max-width: 28rem;
}
.skills-title {
    justify-content: flex-start;
    padding-bottom: var(--gap-section);
    border-bottom: 1px solid var(--line);
}
.skills-title::before,
.skills-title::after {
    display: none;
}
.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--gap-section) * 0.75);
}


/* ===================================
   PARCOURS SECTION (Horizontal Scroll)
   =================================== */

/* Section height = 100vh, GSAP ajoute l'espace de scroll via pin */
.parcours {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--padding-x-section);
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
    z-index: 10;
}

/* "Parcours" watermark — centré absolument, z-index bas */
.parcours-hero-text {
    position: relative;
    font-size: 4.5rem;
    text-align: center;
} 

/* Track horizontal */
.parcours-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--padding-x-section);
}

/* ---- Carte individuelle — une par viewport ---- */
.parcours-bloc {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Wrapper interne — flex colonne : image en haut, textes en bas */
.parcours-bloc-inner {
    width: 100%;
}

/* Image — format 4:3, taille fixe identique pour tous les blocs */
.parcours-bloc-img {
    position: relative;
    max-width: 28rem;
    border: 1px solid var(--accent);
    aspect-ratio: 16/9;
    overflow: visible; /* wrapper now handles overflow */
}

/* Wrapper that exactly matches the image dimensions; receives the overlay */
.parcours-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Gradient overlay at bottom of the image — applied to the wrapper */
.parcours-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(10, 14, 26, 0.9) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.parcours-img-ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Textes — chevauchent légèrement le bas de l'image */
.parcours-bloc-texts {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) / 2);
    margin-top: calc(var(--gap-section) * (-2));
    z-index: 2;
}

.parcours-bloc-title {
    font-size: clamp(3rem, 7vw, 5.75rem);
    padding-left: var(--gap-section);
}

.parcours-bloc-year {
    justify-content: flex-start;
    margin: 0;
    padding-left: var(--gap-section);
    padding-bottom: calc(var(--gap-section) / 2);
    border-bottom: 1px solid var(--line);
}
.parcours-bloc-year::before,
.parcours-bloc-year::after {
    display: none;
}

.parcours-bloc-text {
    color: var(--muted);
}


/* ===================================
   PROJECTS SECTION
   =================================== */
.projects {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: var(--padding-y-section);
    height: 100vh;
    padding: var(--gap-section);
    padding-top: 0;
    overflow: hidden;
}
/* Fonds des projets — sortis de la section (cf. index.html) et donc fixes,
   sur le même plan que .hero-bg : z-index -1, sous la grille globale et sous
   le contenu. La section projets étant épinglée (donc transformée, donc
   contexte d'empilement), des fonds placés à l'intérieur masqueraient la
   grille au survol. Ils restent invisibles hors survol (opacité 0). */
.projects-bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.project-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
}
.projects-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg);
    opacity: 0;   /* apparaît avec le fond survolé, piloté par home.js */
    pointer-events: none;
}
.projects-heading-mask {
    order: 1;
    z-index: 1;
}
.projects-heading {
    text-box: trim-both cap alphabetic;
}
.projects-list-clip {
    position: relative;
    height: 100%;
    padding: var(--gap-section) 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    z-index: 2;
}
.projects-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) * 0.75);
    padding-top: 4rem;
    text-align: right;
}
.project-item-link {
    color: var(--cream);
    font-size: clamp(1.75rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    text-box: trim-both cap alphabetic;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}


/* ===================================
   MARQUEE SECTION
   =================================== */
.marquee-section {
    position: relative;
    padding-top: var(--padding-y-section);
    overflow: hidden;
}
.marquee {
    position: relative;
    width: 100%;
}
.marquee.reveal{
    display: flex;
}
.marquee-content {
    display: flex;
    gap: 1.25rem;
    white-space: nowrap;
    padding-right: 1.25rem;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 2rem;
    animation: marquee 20s linear infinite;
}

/* ─── Animation ─── */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}


/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    position: relative;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.contact-container {
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) * 2);
    align-items: center;
    max-width: 1064px;
    margin: 0 auto;
}
.contact-title {
    font-size: clamp(3rem, 10vw, 6rem);
}
.contact-subtitle {
    color: var(--muted);
}
.contact-email {
    font-size: var(--email);
    border-bottom: 1px solid var(--cream);
    transition: opacity 0.3s ease;
}
.contact-email:hover {
    opacity: 0.7;
}
.contact-socials {
    display: flex;
    justify-content: center;
    gap: calc(var(--gap-section) * 2);
}
.social-link:hover {
    color: var(--cream);
}


/* ===================================
   FOOTER
   =================================== */
.footer {
    position: relative;
    padding: var(--padding-navbar) var(--gap-section);
    /* border-top: 1px solid var(--accent); */
}
.footer p {
    text-align: center;
    font-size: var(--caption);
    color: var(--muted);
}


/* ===================================
   TABLET STYLES
   =================================== */
@media (min-width: 768px) {
    /* ===================================
       NAVBAR
       =================================== */
    .logo {
        width: 10rem;
    }
    .nav-links {
        position: relative;
        flex-direction: row;
        gap: 3vw;
        padding: 0;
    }
    .nav-links li {
        padding: 0;
        transform: none;
    }
    /* ─── Menu Hamburger ─── */
    .nav-hamburger {
        display: none;
    }


    /* ===================================
       HERO SECTION
       =================================== */
    .hero-content {
        grid-template-columns: 3fr 2fr;
        gap: 0;
        padding: 0;
    }

    /* ─── Hero Title ─── */
    .hero-title {
        max-width: 96rem;
    }
    .hero-text {
        position: relative;
        padding: calc(var(--gap-section) * 2) var(--gap-section);
    }
    /* Ex-`border-right`, même principe que .hero-content::after */
    .hero-text::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 1px;
        height: 100%;
        background: var(--cream);
        transform: scaleY(var(--line-draw, 1));
        transform-origin: center top;
    }

    /* ─── Hero Video ─── */
    .hero-video-container {
        margin: var(--gap-section);
    }
    .hero-video.is-open {
        max-width: 72rem;
        padding: var(--gap-section);
    }
    .hero-video-close {
        top: calc(var(--gap-section) + 18px);
        right: calc(var(--gap-section) + 18px);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-text {
        max-width: 580px;
    }
    .about-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .about-skills {
        padding-top: var(--gap-section);
    }


    /* ===================================
      PARCOURS SECTION (Horizontal Scroll)
      =================================== */
    .parcours {
        height: 100vh;
        padding: 0;
    }
    .parcours-hero {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        z-index: 1;
        pointer-events: none;
    }
    .parcours-hero-text {
        font-size: clamp(9rem, 20vw, 20rem);
    }
    .parcours-track-wrap {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: 2;
        display: flex;        /* ← ajouté */
        align-items: center;  /* ← centre .parcours-track verticalement */
    }
    .parcours-track {
        flex-direction: row;
        gap: 0;
        width: fit-content;
    }
    .parcours-bloc {
        width: 100vw;
    }
    .parcours-bloc-inner {
        width: 60%;
        max-width: 36rem;
    }
    .parcours-bloc-img {
        max-width: 100%;
    }
    .parcours-bloc-title {
        padding: 0;
    }
}


/* ===================================
   VERTICAL TABLET STYLES
   =================================== */ 
@media (min-width: 768px) and (max-width: 1064px) and (min-height: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: calc(var(--gap-section) * 2);
        padding: calc(var(--gap-section) * 2);
    }
    .hero-text {
        padding: 0;
        border: none;
    }
    .hero-video-container {
        width: 50vh;
        /*max-width: fit-content;*/
        margin: 0;
        /*aspect-ratio: 16/9;*/
    }

    .about-img-left {
        display: block;
        max-width: 100%;
        height: 20vh;
        aspect-ratio: auto;
        object-position: center 20%;
    }
}


/* ===================================
   LAPTOP STYLES
   =================================== */
@media (min-width: 1024px) {
    /* ===================================
       CUSTOM CURSOR
       =================================== */
    .cursor,
    .cursor-ring {
        display: block;
    }
    .hero-video-container {
        max-width: 28rem;
    }


    /* ===================================
       NAVBAR
       =================================== */
    .navbar{
        padding: 1.5rem var(--gap-section);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-container {
        grid-template-columns: 1fr 1fr;
    }
    .about-left {
        padding-top: var(--gap-section);
    }
    .about-right {
        grid-template-columns: 1fr;
        height: fit-content;
    }
    .about-img-left,
    .about-img-right {
        max-width: 100%;
    }
    .about-img-left {
        display: block;
        height: auto;
        aspect-ratio: 16/9;
    }
    .about-skills {
        padding: 0;
    }


    /* ===================================
       PARCOURS SECTION (Horizontal Scroll)
       =================================== */
    .parcours-bloc-img {
        aspect-ratio: 4/3;
    }


    /* ===================================
       PROJECTS SECTION
       =================================== */
    .projects-list {
        gap: calc(var(--gap-section) * 1.5);
        padding: 0;
    }
}

/* ===================================
   ACCESSIBILITÉ
   =================================== */

/* Focus clavier cohérent avec la palette (au lieu du contour bleu
   par défaut du navigateur, peu lisible sur fond sombre). Utilise
   :focus-visible pour ne s'afficher qu'au clavier, pas au clic souris. */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--cream);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Lien d'évitement — masqué visuellement tant qu'il n'a pas le focus,
   pour permettre à un utilisateur clavier de sauter directement au
   contenu principal sans repasser par toute la navbar à chaque page. */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background: var(--cream);
    color: var(--bg);
    font-family: var(--sans);
    font-size: var(--bouton);
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

/* ===================================
   LOADER
   ===================================
   Couvre la page pendant que le JS pose les états de départ des
   animations. Remplace l'ancien systeme de masquage element par element
   (classe .js + visibility:hidden), plus simple : un seul element a gerer.

   Le repli est ici en CSS pur : si le JS ne prend jamais la main (erreur,
   fichier manquant), l'animation ci-dessous efface le loader toute seule
   au bout de 3 s. Sans elle, une panne de JS laisserait un ecran opaque. */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    animation: loader-fallback 0.6s ease 3s forwards;
}
@keyframes loader-fallback {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Masque du titre : l'image monte depuis le bas, coupee par ce conteneur */
.hero-title {
    overflow: hidden;
}

/* Reduction de mouvement : pas de fondu differe, le loader disparait tout
   de suite (le JS fait de meme de son cote). */
@media (prefers-reduced-motion: reduce) {
    #loader {
        animation-delay: 0s;
        animation-duration: 0.01s;
    }
}/* ===================================
   DESIGN SYSTEM & VARIABLES
   =================================== */
:root {
    /* Couleurs */
    --bg:        #0A0E1A;   /* Fond principal — bleu nuit très sombre */
    --bg2:       #0D1120;   /* Fond alternatif légèrement plus clair */
    --cream:     #F5E6C8;   /* Texte principal — crème chaud */
    --muted:     #C4B89A;   /* Texte secondaire — beige sourd */
    --dim:       rgba(245, 230, 200, 0.5);
    --line:      #1A1F30;   /* Lignes de grille, séparateurs subtils */
    --line-num:  #2A3050;   /* Numéros de grille, labels discrets */
    --accent:    #1E2233;   /* Accents, bordures */

    /* Typographies */
    --serif:     'Playfair Display', serif;
    --sans:      'Space Grotesk', sans-serif;
    --mono:      'JetBrains Mono', monospace;

    /* Espacements */
    --padding-x-section:    2rem;       /* 32px */
    --padding-y-section:    4rem;       /* 32px */
    --gap-section:          1rem;       /* 16px */

    --padding-navbar:       0.75rem;    /* 12px */
    --padding-inverse:      -2rem;      /* -32px */

    --gap-texte:            0.5rem;     /* 8px */
    --gap-projets:          1.75rem;    /* 28px */

    /* Tailles de police */
    --h2:                   2rem;       /* 32px */
    --role:                 1.75rem;    /* 28px */

    /* Réserve (en em, donc alignée sur --role) pour les débords d'encre
       (jambages, dépassements de capitales en italique) que le trim
       text-box cap/alphabetic exclut de la boîte de layout de .role-item.
       Utilisée à la fois comme demi-gap entre .role-item (pour ne jamais
       laisser apparaître le voisin) et comme correction de la marge de
       .hero-role (pour ne pas changer l'écart baseline → image du titre). */
    --role-overshoot:       0.3em;

    /* ─── Système base + coefficients ───
       --base ne doit JAMAIS être redéfinie dans un @media : c'est la
       racine fixe dont dérivent --bouton (constant) et --paragraphe
       (en cascade mobile → tablette → desktop). */
    --base:                 1rem;       /* 16px — racine fixe, ne pas toucher */
    --bouton:               calc(var(--base) * 0.875);  /* 16 × 0.875 = 14px, constant sur les 3 formats */

    /* Chaîne d'étapes à noms distincts : évite toute auto-référence
       (--paragraphe: calc(var(--paragraphe) * x) est un cycle invalide
       en CSS, même réparti dans des @media différents — voir plus bas). */
    --paragraphe-mobile:    var(--base);                          /* 16 × 1 = 16px */
    --paragraphe-tablette:  calc(var(--paragraphe-mobile) * 1.125);   /* 16 × 1.125 = 18px */
    --paragraphe-desktop:   calc(var(--paragraphe-tablette) * 1.125); /* 18 × 1.125 ≈ 20.25px (≈ 20px) */

    --paragraphe:           var(--paragraphe-mobile);       /* palier actif : mobile */
    --email:                calc(var(--paragraphe) * 1.25); /* dérivée de --paragraphe, suit automatiquement chaque palier */
    --caption:              calc(var(--paragraphe) * 0.75); /* texte secondaire (footer...), dérivée de --paragraphe */

    --grid:                 0.5rem;     /* 8px */

    /* Autres */
    --img-corner:           1vw;

    /* ─── Tablet ─── */
    @media (min-width: 768px) {
        /* Espacements */
        --padding-x-section:    3rem;       /* 48px */
        --padding-y-section:    6rem;       /* 96px */
        --gap-section:          1.5rem;     /* 24px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -3rem;      /* -48px */

        --gap-texte:            0.75rem;    /* 12px */
        --gap-projets:          2.25rem;    /* 36px */

        /* Tailles de police */
        --h2:                   4rem;       /* 64px */
        --role:                 2.25rem;    /* 48px */
        --paragraphe:           var(--paragraphe-tablette); /* palier actif : tablette */
        --grid:                 0.625rem;   /* 10px */
    }

    /* ─── Laptop ─── */
    @media (min-width: 1024px) {
        /* Espacements */
        --padding-x-section:    8rem;       /* 128px */
        --padding-y-section:    8rem;       /* 128px */
        --gap-section:          2rem;       /* 32px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -4rem;      /* -64px */

        --gap-texte:            1rem;       /* 16px */
        --gap-projets:          3rem;       /* 48px */

        /* Tailles de police */
        --h2:                   4.5rem;     /* 72px */
        --role:                 4rem;       /* 64px */
        --paragraphe:           var(--paragraphe-desktop); /* palier actif : desktop */
        --grid:                 0.75rem;    /* 12px */
    }

    /* ─── Desktop ─── */
    @media (min-width: 1440px) {

    }
}


/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ─── Body ─── */
body {
    background: var(--bg);
    color: var(--cream);
    font-family: var(--sans);
    font-size: var(--paragraphe);
    font-weight: 300;
    line-height: 1.5;
    overflow-x: hidden;
    cursor: none;
}

/* Grain global — fixed, couvre toute la page sans perturber le layout */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3C/filter%3E%3Crect width='400' height='400' fill='white' filter='url(%23noiseFilter)' /%3E%3C/svg%3E");
    opacity: 0.1;
    pointer-events: none;
    z-index: 9999;
}

/* ─── Typographie ─── */
h1, h2, h3, h4, h5, h6, strong {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1;
}

strong {
    font-weight: 600;
}

ul {
    list-style-type: none;
}
li {
    display: flex;
    height: fit-content;
}

a {
    color: var(--cream);
    text-decoration: none;
}

/* ─── Boutons ─── */
.btn,
.btn-style {
    position: relative;
    width: fit-content;
    color: var(--muted);
    font-size: var(--bouton);
    letter-spacing: 0.075em;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.2s ease;
}
.btn:not(.project-item-link, .proj-hero-back)::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 1px;
    background-color: var(--muted);
    transition: 0.2s ease;
}
.btn:hover {
    color: var(--cream);
    transition: 0.5s ease;
}
.btn:hover::after {
    width: 100%;
    left: 0;
    right: auto;
    transition: 0.5s ease;
}

/* ─── Boutons Style ─── */
.btn-style:hover{
    color: var(--muted);
}

/* ─── Images et vidéos ─── */
img,
video {
    width: 100%;
}


/* ===================================
    UTILITIES
    =================================== */
.text-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap-section);
    width: 100%;
}

/* ─── Eyebrow ─── */
[class*="eyebrow"] {
    position: relative;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    width: 100%;
    margin-bottom: calc(var(--gap-section));
    color: var(--dim);
    font-family: var(--mono);
    font-size:calc(var(--grid) * 1.25);
    text-align: center;
    text-transform: uppercase;
}
.eyebrow-center {
    justify-content: center;
}
.eyebrow-left::after,
.eyebrow-center::before,
.eyebrow-center::after {
    content: '';
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: var(--line);
}


/* ===================================
   CUSTOM CURSOR
   =================================== */
.cursor {
    position: fixed;
    display: none;
    width: 8px;
    height: 8px;
    background: var(--cream);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.cursor-ring {
    position: fixed;
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(245, 230, 200, .4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
}


/* ===================================
   NAVBAR
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--padding-navbar) var(--gap-section);
    z-index: 1000;
}
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}
.logo {
    width: 8rem;
    line-height: 0;
}
.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) / 2);
    padding-top: var(--padding-navbar);
}
.nav-links li {
    padding-right: var(--gap-section);
    transform: translateX(100%);
}

/* ─── Menu Hamburger ─── */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--cream);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
}


/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100vh;
}
/* Image de fond du hero — élément fixe séparé, et non un fond de .hero.
   Deux raisons : son opacité doit pouvoir être animée sans emporter le
   contenu, et .hero est épinglée par ScrollTrigger (donc transformée, donc
   contexte d'empilement) — un fond placé à l'intérieur masquerait la grille
   globale. z-index -1 : sous la grille et sous le contenu, au-dessus du fond
   de page. Opacité pilotée par --hero-bg ; 1 par défaut, pour un affichage
   correct sans JS. */
.hero-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(180deg, rgba(10, 14, 26, 0.85) 70%, var(--bg) 100%), url(../images/hero.webp);
    background-size: cover;
    background-position: center center;
    opacity: var(--hero-bg, 1);
    pointer-events: none;
}
.hero-main {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    gap: 0;
    width: 100%;
    padding: var(--gap-section);
    font-size: var(--h2);
    z-index: 2;
}
.hero-content {
    position: relative;
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    padding: var(--gap-section);
    z-index: 2;
}
/* Ex-`border-top` : passé en pseudo-élément car un `border` n'est pas
   animable. Le tracé se pilote via --line-draw (0 → 1), que GSAP anime
   sur l'élément parent. Valeur par défaut 1 : ligne pleine si le JS
   n'a pas la main (pas de JS, prefers-reduced-motion). */
.hero-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--cream);
    transform: scaleX(var(--line-draw, 1));
    transform-origin: left center;
}

/* ─── Hero Title ─── */
.hero-title {
    line-height: 0;
}
.hero-role {
    overflow: hidden;
    /* height posée par le JS = hauteur d'un .role-item + le gap de
       .role-inner (dépend du text-box trim, non calculable en CSS pur) */
    font-size: var(--role);
    line-height: 1;
    /* margin, pas padding : un padding serait à l'intérieur de la zone
       overflow:hidden et agrandirait la fenêtre visible au-delà de la
       hauteur d'un .role-item, laissant apparaître le rôle suivant.
       On retranche --role-overshoot car le JS agrandit la fenêtre de ce
       montant (des deux côtés) pour ne pas couper les débords d'encre du
       rôle actif : l'écart baseline → image du titre reste égal à
       --gap-section malgré cet agrandissement. */
    margin: calc(var(--gap-section) - var(--role-overshoot)) 0;
}
.role-inner {
    display: flex;
    flex-direction: column;
    /* écarte les .role-item entre eux pour que le débord d'encre de l'un
       n'entre jamais dans la fenêtre de son voisin (le JS lit ce gap pour
       calculer la hauteur de .hero-role et le pas de rotation) */
    gap: calc(var(--role-overshoot) * 2);
}
.role-item {
    font-family: var(--serif);
    font-size: var(--role);
    line-height: 1;
    /* pas de padding : text-box trim-both ... alphabetic arrête déjà la
       box exactement sur la baseline, un padding-bottom ajouterait un
       espace vide sous la baseline */
    text-box: trim-both cap alphabetic;
}
.hero-text p {
    max-width: 56rem;
}

/* ─── Hero Video ─── */
.hero-video-container {
    max-width: 28rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    z-index: 5;
}
.hero-video {
    position: relative;
    cursor: pointer;
}

.hero-video-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, transparent 60%, var(--bg) 97%);
    transition: 0.4s ease;
    inset: 0;
}
.hero-video:hover .hero-video-overlay {
    background: linear-gradient(180deg, transparent -60%, var(--bg) 97%);
    transition: 0.4s ease;
}

.hero-video-label {
    font-family: var(--serif);
    opacity: 0;
    transition: 0.4s ease;
    transform: translateY(8px);
}
.hero-video:hover .hero-video-label {
    opacity: 1;
    transform: translateY(0);
    transition: 0.4s ease;
}

/* Fullscreen (FLIP target) state */
.hero-video.is-open {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    padding: var(--gap-section);
    z-index: 1001;
    cursor: default;
}
.hero-video.is-open::after {
    display: none;
}

.hero-video.is-open video {
    max-width: none;
}

.hero-video.is-open .hero-video-overlay,
.hero-video.is-open .hero-video-label {
    display: none;
}

.hero-video.is-open .hero-video-close {
    display: flex;
}

.hero-video-close {
    position: absolute;
    top: calc(var(--gap-section) - 36px - 10px);
    right: calc(var(--gap-section));
    width: 36px;
    height: 36px;
    display: none;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(245,230,200,.3);
    color: var(--cream);
    font-size: var(--bouton);
    border-radius: 50%;
    background: var(--bg);
    opacity: 0.8;
    cursor: pointer;
    z-index: 2;
    transform: scale(0);
    transition: background .3s;
}
.hero-video-close:hover {
    background: var(--bg);
    opacity: 0.8;
}

.video-backdrop {
    position: fixed;
    background: var(--bg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
    inset: 0;
}
.video-backdrop.is-visible {
    opacity: 0.9;
    visibility: visible;
}


/* ===================================
   STATEMENT SECTION (First)
   =================================== */
.statement {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.statement-title,
.proj-statement-text {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 900px;
}
.statement-text {
    max-width: 720px;
    color: var(--muted);
}


/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
}
.about-container {
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    max-width: 1280px;
}
.about-img-left {
    display: none;
    max-width: 28rem;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.about-img-right {
    max-width: 28rem;
}
.skills-title {
    justify-content: flex-start;
    padding-bottom: var(--gap-section);
    border-bottom: 1px solid var(--line);
}
.skills-title::before,
.skills-title::after {
    display: none;
}
.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--gap-section) * 0.75);
}


/* ===================================
   PARCOURS SECTION (Horizontal Scroll)
   =================================== */

/* Section height = 100vh, GSAP ajoute l'espace de scroll via pin */
.parcours {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--padding-x-section);
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
    z-index: 10;
}

/* "Parcours" watermark — centré absolument, z-index bas */
.parcours-hero-text {
    position: relative;
    font-size: 4.5rem;
    text-align: center;
} 

/* Track horizontal */
.parcours-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--padding-x-section);
}

/* ---- Carte individuelle — une par viewport ---- */
.parcours-bloc {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Wrapper interne — flex colonne : image en haut, textes en bas */
.parcours-bloc-inner {
    width: 100%;
}

/* Image — format 4:3, taille fixe identique pour tous les blocs */
.parcours-bloc-img {
    position: relative;
    max-width: 28rem;
    border: 1px solid var(--accent);
    aspect-ratio: 16/9;
    overflow: visible; /* wrapper now handles overflow */
}

/* Wrapper that exactly matches the image dimensions; receives the overlay */
.parcours-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Gradient overlay at bottom of the image — applied to the wrapper */
.parcours-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(10, 14, 26, 0.9) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.parcours-img-ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Textes — chevauchent légèrement le bas de l'image */
.parcours-bloc-texts {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) / 2);
    margin-top: calc(var(--gap-section) * (-2));
    z-index: 2;
}

.parcours-bloc-title {
    font-size: clamp(3rem, 7vw, 5.75rem);
    padding-left: var(--gap-section);
}

.parcours-bloc-year {
    justify-content: flex-start;
    margin: 0;
    padding-left: var(--gap-section);
    padding-bottom: calc(var(--gap-section) / 2);
    border-bottom: 1px solid var(--line);
}
.parcours-bloc-year::before,
.parcours-bloc-year::after {
    display: none;
}

.parcours-bloc-text {
    color: var(--muted);
}


/* ===================================
   PROJECTS SECTION
   =================================== */
.projects {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: var(--padding-y-section);
    height: 100vh;
    padding: var(--gap-section);
    padding-top: 0;
    overflow: hidden;
}
/* Fonds des projets — sortis de la section (cf. index.html) et donc fixes,
   sur le même plan que .hero-bg : z-index -1, sous la grille globale et sous
   le contenu. La section projets étant épinglée (donc transformée, donc
   contexte d'empilement), des fonds placés à l'intérieur masqueraient la
   grille au survol. Ils restent invisibles hors survol (opacité 0). */
.projects-bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.project-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
}
.projects-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg);
    opacity: 0;   /* apparaît avec le fond survolé, piloté par home.js */
    pointer-events: none;
}
.projects-heading-mask {
    order: 1;
    z-index: 1;
}
.projects-heading {
    text-box: trim-both cap alphabetic;
}
.projects-list-clip {
    position: relative;
    height: 100%;
    padding: var(--gap-section) 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    z-index: 2;
}
.projects-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) * 0.75);
    padding-top: 4rem;
    text-align: right;
}
.project-item-link {
    color: var(--cream);
    font-size: clamp(1.75rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    text-box: trim-both cap alphabetic;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}


/* ===================================
   MARQUEE SECTION
   =================================== */
.marquee-section {
    position: relative;
    padding-top: var(--padding-y-section);
    overflow: hidden;
}
.marquee {
    position: relative;
    width: 100%;
}
.marquee.reveal{
    display: flex;
}
.marquee-content {
    display: flex;
    gap: 1.25rem;
    white-space: nowrap;
    padding-right: 1.25rem;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 2rem;
    animation: marquee 20s linear infinite;
}

/* ─── Animation ─── */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}


/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    position: relative;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.contact-container {
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) * 2);
    align-items: center;
    max-width: 1064px;
    margin: 0 auto;
}
.contact-title {
    font-size: clamp(3rem, 10vw, 6rem);
}
.contact-subtitle {
    color: var(--muted);
}
.contact-email {
    font-size: var(--email);
    border-bottom: 1px solid var(--cream);
    transition: opacity 0.3s ease;
}
.contact-email:hover {
    opacity: 0.7;
}
.contact-socials {
    display: flex;
    justify-content: center;
    gap: calc(var(--gap-section) * 2);
}
.social-link:hover {
    color: var(--cream);
}


/* ===================================
   FOOTER
   =================================== */
.footer {
    position: relative;
    padding: var(--padding-navbar) var(--gap-section);
    /* border-top: 1px solid var(--accent); */
}
.footer p {
    text-align: center;
    font-size: var(--caption);
    color: var(--muted);
}


/* ===================================
   TABLET STYLES
   =================================== */
@media (min-width: 768px) {
    /* ===================================
       NAVBAR
       =================================== */
    .logo {
        width: 10rem;
    }
    .nav-links {
        position: relative;
        flex-direction: row;
        gap: 3vw;
        padding: 0;
    }
    .nav-links li {
        padding: 0;
        transform: none;
    }
    /* ─── Menu Hamburger ─── */
    .nav-hamburger {
        display: none;
    }


    /* ===================================
       HERO SECTION
       =================================== */
    .hero-content {
        grid-template-columns: 3fr 2fr;
        gap: 0;
        padding: 0;
    }

    /* ─── Hero Title ─── */
    .hero-title {
        max-width: 96rem;
    }
    .hero-text {
        position: relative;
        padding: calc(var(--gap-section) * 2) var(--gap-section);
    }
    /* Ex-`border-right`, même principe que .hero-content::after */
    .hero-text::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 1px;
        height: 100%;
        background: var(--cream);
        transform: scaleY(var(--line-draw, 1));
        transform-origin: center top;
    }

    /* ─── Hero Video ─── */
    .hero-video-container {
        margin: var(--gap-section);
    }
    .hero-video.is-open {
        max-width: 72rem;
        padding: var(--gap-section);
    }
    .hero-video-close {
        top: calc(var(--gap-section) + 18px);
        right: calc(var(--gap-section) + 18px);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-text {
        max-width: 580px;
    }
    .about-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .about-skills {
        padding-top: var(--gap-section);
    }


    /* ===================================
      PARCOURS SECTION (Horizontal Scroll)
      =================================== */
    .parcours {
        height: 100vh;
        padding: 0;
    }
    .parcours-hero {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        z-index: 1;
        pointer-events: none;
    }
    .parcours-hero-text {
        font-size: clamp(9rem, 20vw, 20rem);
    }
    .parcours-track-wrap {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: 2;
        display: flex;        /* ← ajouté */
        align-items: center;  /* ← centre .parcours-track verticalement */
    }
    .parcours-track {
        flex-direction: row;
        gap: 0;
        width: fit-content;
    }
    .parcours-bloc {
        width: 100vw;
    }
    .parcours-bloc-inner {
        width: 60%;
        max-width: 36rem;
    }
    .parcours-bloc-img {
        max-width: 100%;
    }
    .parcours-bloc-title {
        padding: 0;
    }
}


/* ===================================
   VERTICAL TABLET STYLES
   =================================== */ 
@media (min-width: 768px) and (max-width: 1064px) and (min-height: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: calc(var(--gap-section) * 2);
        padding: calc(var(--gap-section) * 2);
    }
    .hero-text {
        padding: 0;
        border: none;
    }
    .hero-video-container {
        width: 50vh;
        /*max-width: fit-content;*/
        margin: 0;
        /*aspect-ratio: 16/9;*/
    }

    .about-img-left {
        display: block;
        max-width: 100%;
        height: 20vh;
        aspect-ratio: auto;
        object-position: center 20%;
    }
}


/* ===================================
   LAPTOP STYLES
   =================================== */
@media (min-width: 1024px) {
    /* ===================================
       CUSTOM CURSOR
       =================================== */
    .cursor,
    .cursor-ring {
        display: block;
    }
    .hero-video-container {
        max-width: 28rem;
    }


    /* ===================================
       NAVBAR
       =================================== */
    .navbar{
        padding: 1.5rem var(--gap-section);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-container {
        grid-template-columns: 1fr 1fr;
    }
    .about-left {
        padding-top: var(--gap-section);
    }
    .about-right {
        grid-template-columns: 1fr;
        height: fit-content;
    }
    .about-img-left,
    .about-img-right {
        max-width: 100%;
    }
    .about-img-left {
        display: block;
        height: auto;
        aspect-ratio: 16/9;
    }
    .about-skills {
        padding: 0;
    }


    /* ===================================
       PARCOURS SECTION (Horizontal Scroll)
       =================================== */
    .parcours-bloc-img {
        aspect-ratio: 4/3;
    }


    /* ===================================
       PROJECTS SECTION
       =================================== */
    .projects-list {
        gap: calc(var(--gap-section) * 1.5);
        padding: 0;
    }
}

/* ===================================
   ACCESSIBILITÉ
   =================================== */

/* Focus clavier cohérent avec la palette (au lieu du contour bleu
   par défaut du navigateur, peu lisible sur fond sombre). Utilise
   :focus-visible pour ne s'afficher qu'au clavier, pas au clic souris. */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--cream);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Lien d'évitement — masqué visuellement tant qu'il n'a pas le focus,
   pour permettre à un utilisateur clavier de sauter directement au
   contenu principal sans repasser par toute la navbar à chaque page. */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background: var(--cream);
    color: var(--bg);
    font-family: var(--sans);
    font-size: var(--bouton);
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

/* ===================================
   LOADER
   ===================================
   Couvre la page pendant que le JS pose les états de départ des
   animations. Remplace l'ancien systeme de masquage element par element
   (classe .js + visibility:hidden), plus simple : un seul element a gerer.

   Le repli est ici en CSS pur : si le JS ne prend jamais la main (erreur,
   fichier manquant), l'animation ci-dessous efface le loader toute seule
   au bout de 3 s. Sans elle, une panne de JS laisserait un ecran opaque. */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    animation: loader-fallback 0.6s ease 3s forwards;
}
@keyframes loader-fallback {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Masque du titre : l'image monte depuis le bas, coupee par ce conteneur */
.hero-title {
    overflow: hidden;
}

/* Reduction de mouvement : pas de fondu differe, le loader disparait tout
   de suite (le JS fait de meme de son cote). */
@media (prefers-reduced-motion: reduce) {
    #loader {
        animation-delay: 0s;
        animation-duration: 0.01s;
    }
}/* ===================================
   DESIGN SYSTEM & VARIABLES
   =================================== */
:root {
    /* Couleurs */
    --bg:        #0A0E1A;   /* Fond principal — bleu nuit très sombre */
    --bg2:       #0D1120;   /* Fond alternatif légèrement plus clair */
    --cream:     #F5E6C8;   /* Texte principal — crème chaud */
    --muted:     #C4B89A;   /* Texte secondaire — beige sourd */
    --dim:       rgba(245, 230, 200, 0.5);
    --line:      #1A1F30;   /* Lignes de grille, séparateurs subtils */
    --line-num:  #2A3050;   /* Numéros de grille, labels discrets */
    --accent:    #1E2233;   /* Accents, bordures */

    /* Typographies */
    --serif:     'Playfair Display', serif;
    --sans:      'Space Grotesk', sans-serif;
    --mono:      'JetBrains Mono', monospace;

    /* Espacements */
    --padding-x-section:    2rem;       /* 32px */
    --padding-y-section:    4rem;       /* 32px */
    --gap-section:          1rem;       /* 16px */

    --padding-navbar:       0.75rem;    /* 12px */
    --padding-inverse:      -2rem;      /* -32px */

    --gap-texte:            0.5rem;     /* 8px */
    --gap-projets:          1.75rem;    /* 28px */

    /* Tailles de police */
    --h2:                   2rem;       /* 32px */
    --role:                 1.75rem;    /* 28px */

    /* Réserve (en em, donc alignée sur --role) pour les débords d'encre
       (jambages, dépassements de capitales en italique) que le trim
       text-box cap/alphabetic exclut de la boîte de layout de .role-item.
       Utilisée à la fois comme demi-gap entre .role-item (pour ne jamais
       laisser apparaître le voisin) et comme correction de la marge de
       .hero-role (pour ne pas changer l'écart baseline → image du titre). */
    --role-overshoot:       0.3em;

    /* ─── Système base + coefficients ───
       --base ne doit JAMAIS être redéfinie dans un @media : c'est la
       racine fixe dont dérivent --bouton (constant) et --paragraphe
       (en cascade mobile → tablette → desktop). */
    --base:                 1rem;       /* 16px — racine fixe, ne pas toucher */
    --bouton:               calc(var(--base) * 0.875);  /* 16 × 0.875 = 14px, constant sur les 3 formats */

    /* Chaîne d'étapes à noms distincts : évite toute auto-référence
       (--paragraphe: calc(var(--paragraphe) * x) est un cycle invalide
       en CSS, même réparti dans des @media différents — voir plus bas). */
    --paragraphe-mobile:    var(--base);                          /* 16 × 1 = 16px */
    --paragraphe-tablette:  calc(var(--paragraphe-mobile) * 1.125);   /* 16 × 1.125 = 18px */
    --paragraphe-desktop:   calc(var(--paragraphe-tablette) * 1.125); /* 18 × 1.125 ≈ 20.25px (≈ 20px) */

    --paragraphe:           var(--paragraphe-mobile);       /* palier actif : mobile */
    --email:                calc(var(--paragraphe) * 1.25); /* dérivée de --paragraphe, suit automatiquement chaque palier */
    --caption:              calc(var(--paragraphe) * 0.75); /* texte secondaire (footer...), dérivée de --paragraphe */

    --grid:                 0.5rem;     /* 8px */

    /* Autres */
    --img-corner:           1vw;

    /* ─── Tablet ─── */
    @media (min-width: 768px) {
        /* Espacements */
        --padding-x-section:    3rem;       /* 48px */
        --padding-y-section:    6rem;       /* 96px */
        --gap-section:          1.5rem;     /* 24px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -3rem;      /* -48px */

        --gap-texte:            0.75rem;    /* 12px */
        --gap-projets:          2.25rem;    /* 36px */

        /* Tailles de police */
        --h2:                   4rem;       /* 64px */
        --role:                 2.25rem;    /* 48px */
        --paragraphe:           var(--paragraphe-tablette); /* palier actif : tablette */
        --grid:                 0.625rem;   /* 10px */
    }

    /* ─── Laptop ─── */
    @media (min-width: 1024px) {
        /* Espacements */
        --padding-x-section:    8rem;       /* 128px */
        --padding-y-section:    8rem;       /* 128px */
        --gap-section:          2rem;       /* 32px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -4rem;      /* -64px */

        --gap-texte:            1rem;       /* 16px */
        --gap-projets:          3rem;       /* 48px */

        /* Tailles de police */
        --h2:                   4.5rem;     /* 72px */
        --role:                 4rem;       /* 64px */
        --paragraphe:           var(--paragraphe-desktop); /* palier actif : desktop */
        --grid:                 0.75rem;    /* 12px */
    }

    /* ─── Desktop ─── */
    @media (min-width: 1440px) {

    }
}


/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ─── Body ─── */
body {
    background: var(--bg);
    color: var(--cream);
    font-family: var(--sans);
    font-size: var(--paragraphe);
    font-weight: 300;
    line-height: 1.5;
    overflow-x: hidden;
    cursor: none;
}

/* Grain global — fixed, couvre toute la page sans perturber le layout */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3C/filter%3E%3Crect width='400' height='400' fill='white' filter='url(%23noiseFilter)' /%3E%3C/svg%3E");
    opacity: 0.1;
    pointer-events: none;
    z-index: 9999;
}

/* ─── Typographie ─── */
h1, h2, h3, h4, h5, h6, strong {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1;
}

strong {
    font-weight: 600;
}

ul {
    list-style-type: none;
}
li {
    display: flex;
    height: fit-content;
}

a {
    color: var(--cream);
    text-decoration: none;
}

/* ─── Boutons ─── */
.btn,
.btn-style {
    position: relative;
    width: fit-content;
    color: var(--muted);
    font-size: var(--bouton);
    letter-spacing: 0.075em;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.2s ease;
}
.btn:not(.project-item-link, .proj-hero-back)::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 1px;
    background-color: var(--muted);
    transition: 0.2s ease;
}
.btn:hover {
    color: var(--cream);
    transition: 0.5s ease;
}
.btn:hover::after {
    width: 100%;
    left: 0;
    right: auto;
    transition: 0.5s ease;
}

/* ─── Boutons Style ─── */
.btn-style:hover{
    color: var(--muted);
}

/* ─── Images et vidéos ─── */
img,
video {
    width: 100%;
}


/* ===================================
    UTILITIES
    =================================== */
.text-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap-section);
    width: 100%;
}

/* ─── Eyebrow ─── */
[class*="eyebrow"] {
    position: relative;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    width: 100%;
    margin-bottom: calc(var(--gap-section));
    color: var(--dim);
    font-family: var(--mono);
    font-size:calc(var(--grid) * 1.25);
    text-align: center;
    text-transform: uppercase;
}
.eyebrow-center {
    justify-content: center;
}
.eyebrow-left::after,
.eyebrow-center::before,
.eyebrow-center::after {
    content: '';
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: var(--line);
}


/* ===================================
   CUSTOM CURSOR
   =================================== */
.cursor {
    position: fixed;
    display: none;
    width: 8px;
    height: 8px;
    background: var(--cream);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.cursor-ring {
    position: fixed;
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(245, 230, 200, .4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
}


/* ===================================
   NAVBAR
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--padding-navbar) var(--gap-section);
    z-index: 1000;
}
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}
.logo {
    width: 8rem;
    line-height: 0;
}
.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) / 2);
    padding-top: var(--padding-navbar);
}
.nav-links li {
    padding-right: var(--gap-section);
    transform: translateX(100%);
}

/* ─── Menu Hamburger ─── */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--cream);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
}


/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100vh;
}
/* Image de fond du hero — élément fixe séparé, et non un fond de .hero.
   Deux raisons : son opacité doit pouvoir être animée sans emporter le
   contenu, et .hero est épinglée par ScrollTrigger (donc transformée, donc
   contexte d'empilement) — un fond placé à l'intérieur masquerait la grille
   globale. z-index -1 : sous la grille et sous le contenu, au-dessus du fond
   de page. Opacité pilotée par --hero-bg ; 1 par défaut, pour un affichage
   correct sans JS. */
.hero-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(180deg, rgba(10, 14, 26, 0.85) 70%, var(--bg) 100%), url(../images/hero.webp);
    background-size: cover;
    background-position: center center;
    opacity: var(--hero-bg, 1);
    pointer-events: none;
}
.hero-main {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    gap: 0;
    width: 100%;
    padding: var(--gap-section);
    font-size: var(--h2);
    z-index: 2;
}
.hero-content {
    position: relative;
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    padding: var(--gap-section);
    z-index: 2;
}
/* Ex-`border-top` : passé en pseudo-élément car un `border` n'est pas
   animable. Le tracé se pilote via --line-draw (0 → 1), que GSAP anime
   sur l'élément parent. Valeur par défaut 1 : ligne pleine si le JS
   n'a pas la main (pas de JS, prefers-reduced-motion). */
.hero-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--cream);
    transform: scaleX(var(--line-draw, 1));
    transform-origin: left center;
}

/* ─── Hero Title ─── */
.hero-title {
    line-height: 0;
}
.hero-role {
    overflow: hidden;
    /* height posée par le JS = hauteur d'un .role-item + le gap de
       .role-inner (dépend du text-box trim, non calculable en CSS pur) */
    font-size: var(--role);
    line-height: 1;
    /* margin, pas padding : un padding serait à l'intérieur de la zone
       overflow:hidden et agrandirait la fenêtre visible au-delà de la
       hauteur d'un .role-item, laissant apparaître le rôle suivant.
       On retranche --role-overshoot car le JS agrandit la fenêtre de ce
       montant (des deux côtés) pour ne pas couper les débords d'encre du
       rôle actif : l'écart baseline → image du titre reste égal à
       --gap-section malgré cet agrandissement. */
    margin: calc(var(--gap-section) - var(--role-overshoot)) 0;
}
.role-inner {
    display: flex;
    flex-direction: column;
    /* écarte les .role-item entre eux pour que le débord d'encre de l'un
       n'entre jamais dans la fenêtre de son voisin (le JS lit ce gap pour
       calculer la hauteur de .hero-role et le pas de rotation) */
    gap: calc(var(--role-overshoot) * 2);
}
.role-item {
    font-family: var(--serif);
    font-size: var(--role);
    line-height: 1;
    /* pas de padding : text-box trim-both ... alphabetic arrête déjà la
       box exactement sur la baseline, un padding-bottom ajouterait un
       espace vide sous la baseline */
    text-box: trim-both cap alphabetic;
}
.hero-text p {
    max-width: 56rem;
}

/* ─── Hero Video ─── */
.hero-video-container {
    max-width: 28rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    z-index: 5;
}
.hero-video {
    position: relative;
    cursor: pointer;
}

.hero-video-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, transparent 60%, var(--bg) 97%);
    transition: 0.4s ease;
    inset: 0;
}
.hero-video:hover .hero-video-overlay {
    background: linear-gradient(180deg, transparent -60%, var(--bg) 97%);
    transition: 0.4s ease;
}

.hero-video-label {
    font-family: var(--serif);
    opacity: 0;
    transition: 0.4s ease;
    transform: translateY(8px);
}
.hero-video:hover .hero-video-label {
    opacity: 1;
    transform: translateY(0);
    transition: 0.4s ease;
}

/* Fullscreen (FLIP target) state */
.hero-video.is-open {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    padding: var(--gap-section);
    z-index: 1001;
    cursor: default;
}
.hero-video.is-open::after {
    display: none;
}

.hero-video.is-open video {
    max-width: none;
}

.hero-video.is-open .hero-video-overlay,
.hero-video.is-open .hero-video-label {
    display: none;
}

.hero-video.is-open .hero-video-close {
    display: flex;
}

.hero-video-close {
    position: absolute;
    top: calc(var(--gap-section) - 36px - 10px);
    right: calc(var(--gap-section));
    width: 36px;
    height: 36px;
    display: none;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(245,230,200,.3);
    color: var(--cream);
    font-size: var(--bouton);
    border-radius: 50%;
    background: var(--bg);
    opacity: 0.8;
    cursor: pointer;
    z-index: 2;
    transform: scale(0);
    transition: background .3s;
}
.hero-video-close:hover {
    background: var(--bg);
    opacity: 0.8;
}

.video-backdrop {
    position: fixed;
    background: var(--bg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
    inset: 0;
}
.video-backdrop.is-visible {
    opacity: 0.9;
    visibility: visible;
}


/* ===================================
   STATEMENT SECTION (First)
   =================================== */
.statement {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.statement-title,
.proj-statement-text {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 900px;
}
.statement-text {
    max-width: 720px;
    color: var(--muted);
}


/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
}
.about-container {
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    max-width: 1280px;
}
.about-img-left {
    display: none;
    max-width: 28rem;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.about-img-right {
    max-width: 28rem;
}
.skills-title {
    justify-content: flex-start;
    padding-bottom: var(--gap-section);
    border-bottom: 1px solid var(--line);
}
.skills-title::before,
.skills-title::after {
    display: none;
}
.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--gap-section) * 0.75);
}


/* ===================================
   PARCOURS SECTION (Horizontal Scroll)
   =================================== */

/* Section height = 100vh, GSAP ajoute l'espace de scroll via pin */
.parcours {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--padding-x-section);
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
    z-index: 10;
}

/* "Parcours" watermark — centré absolument, z-index bas */
.parcours-hero-text {
    position: relative;
    font-size: 4.5rem;
    text-align: center;
} 

/* Track horizontal */
.parcours-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--padding-x-section);
}

/* ---- Carte individuelle — une par viewport ---- */
.parcours-bloc {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Wrapper interne — flex colonne : image en haut, textes en bas */
.parcours-bloc-inner {
    width: 100%;
}

/* Image — format 4:3, taille fixe identique pour tous les blocs */
.parcours-bloc-img {
    position: relative;
    max-width: 28rem;
    border: 1px solid var(--accent);
    aspect-ratio: 16/9;
    overflow: visible; /* wrapper now handles overflow */
}

/* Wrapper that exactly matches the image dimensions; receives the overlay */
.parcours-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Gradient overlay at bottom of the image — applied to the wrapper */
.parcours-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(10, 14, 26, 0.9) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.parcours-img-ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Textes — chevauchent légèrement le bas de l'image */
.parcours-bloc-texts {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) / 2);
    margin-top: calc(var(--gap-section) * (-2));
    z-index: 2;
}

.parcours-bloc-title {
    font-size: clamp(3rem, 7vw, 5.75rem);
    padding-left: var(--gap-section);
}

.parcours-bloc-year {
    justify-content: flex-start;
    margin: 0;
    padding-left: var(--gap-section);
    padding-bottom: calc(var(--gap-section) / 2);
    border-bottom: 1px solid var(--line);
}
.parcours-bloc-year::before,
.parcours-bloc-year::after {
    display: none;
}

.parcours-bloc-text {
    color: var(--muted);
}


/* ===================================
   PROJECTS SECTION
   =================================== */
.projects {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: var(--padding-y-section);
    height: 100vh;
    padding: var(--gap-section);
    padding-top: 0;
    overflow: hidden;
}
/* Fonds des projets — sortis de la section (cf. index.html) et donc fixes,
   sur le même plan que .hero-bg : z-index -1, sous la grille globale et sous
   le contenu. La section projets étant épinglée (donc transformée, donc
   contexte d'empilement), des fonds placés à l'intérieur masqueraient la
   grille au survol. Ils restent invisibles hors survol (opacité 0). */
.projects-bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.project-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
}
.projects-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg);
    opacity: 0;   /* apparaît avec le fond survolé, piloté par home.js */
    pointer-events: none;
}
.projects-heading-mask {
    order: 1;
    z-index: 1;
}
.projects-heading {
    text-box: trim-both cap alphabetic;
}
.projects-list-clip {
    position: relative;
    height: 100%;
    padding: var(--gap-section) 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    z-index: 2;
}
.projects-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) * 0.75);
    padding-top: 4rem;
    text-align: right;
}
.project-item-link {
    color: var(--cream);
    font-size: clamp(1.75rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    text-box: trim-both cap alphabetic;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}


/* ===================================
   MARQUEE SECTION
   =================================== */
.marquee-section {
    position: relative;
    padding-top: var(--padding-y-section);
    overflow: hidden;
}
.marquee {
    position: relative;
    width: 100%;
}
.marquee.reveal{
    display: flex;
}
.marquee-content {
    display: flex;
    gap: 1.25rem;
    white-space: nowrap;
    padding-right: 1.25rem;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 2rem;
    animation: marquee 20s linear infinite;
}

/* ─── Animation ─── */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}


/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    position: relative;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.contact-container {
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) * 2);
    align-items: center;
    max-width: 1064px;
    margin: 0 auto;
}
.contact-title {
    font-size: clamp(3rem, 10vw, 6rem);
}
.contact-subtitle {
    color: var(--muted);
}
.contact-email {
    font-size: var(--email);
    border-bottom: 1px solid var(--cream);
    transition: opacity 0.3s ease;
}
.contact-email:hover {
    opacity: 0.7;
}
.contact-socials {
    display: flex;
    justify-content: center;
    gap: calc(var(--gap-section) * 2);
}
.social-link:hover {
    color: var(--cream);
}


/* ===================================
   FOOTER
   =================================== */
.footer {
    position: relative;
    padding: var(--padding-navbar) var(--gap-section);
    /* border-top: 1px solid var(--accent); */
}
.footer p {
    text-align: center;
    font-size: var(--caption);
    color: var(--muted);
}


/* ===================================
   TABLET STYLES
   =================================== */
@media (min-width: 768px) {
    /* ===================================
       NAVBAR
       =================================== */
    .logo {
        width: 10rem;
    }
    .nav-links {
        position: relative;
        flex-direction: row;
        gap: 3vw;
        padding: 0;
    }
    .nav-links li {
        padding: 0;
        transform: none;
    }
    /* ─── Menu Hamburger ─── */
    .nav-hamburger {
        display: none;
    }


    /* ===================================
       HERO SECTION
       =================================== */
    .hero-content {
        grid-template-columns: 3fr 2fr;
        gap: 0;
        padding: 0;
    }

    /* ─── Hero Title ─── */
    .hero-title {
        max-width: 96rem;
    }
    .hero-text {
        position: relative;
        padding: calc(var(--gap-section) * 2) var(--gap-section);
    }
    /* Ex-`border-right`, même principe que .hero-content::after */
    .hero-text::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 1px;
        height: 100%;
        background: var(--cream);
        transform: scaleY(var(--line-draw, 1));
        transform-origin: center top;
    }

    /* ─── Hero Video ─── */
    .hero-video-container {
        margin: var(--gap-section);
    }
    .hero-video.is-open {
        max-width: 72rem;
        padding: var(--gap-section);
    }
    .hero-video-close {
        top: calc(var(--gap-section) + 18px);
        right: calc(var(--gap-section) + 18px);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-text {
        max-width: 580px;
    }
    .about-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .about-skills {
        padding-top: var(--gap-section);
    }


    /* ===================================
      PARCOURS SECTION (Horizontal Scroll)
      =================================== */
    .parcours {
        height: 100vh;
        padding: 0;
    }
    .parcours-hero {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        z-index: 1;
        pointer-events: none;
    }
    .parcours-hero-text {
        font-size: clamp(9rem, 20vw, 20rem);
    }
    .parcours-track-wrap {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: 2;
        display: flex;        /* ← ajouté */
        align-items: center;  /* ← centre .parcours-track verticalement */
    }
    .parcours-track {
        flex-direction: row;
        gap: 0;
        width: fit-content;
    }
    .parcours-bloc {
        width: 100vw;
    }
    .parcours-bloc-inner {
        width: 60%;
        max-width: 36rem;
    }
    .parcours-bloc-img {
        max-width: 100%;
    }
    .parcours-bloc-title {
        padding: 0;
    }
}


/* ===================================
   VERTICAL TABLET STYLES
   =================================== */ 
@media (min-width: 768px) and (max-width: 1064px) and (min-height: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: calc(var(--gap-section) * 2);
        padding: calc(var(--gap-section) * 2);
    }
    .hero-text {
        padding: 0;
        border: none;
    }
    .hero-video-container {
        width: 50vh;
        /*max-width: fit-content;*/
        margin: 0;
        /*aspect-ratio: 16/9;*/
    }

    .about-img-left {
        display: block;
        max-width: 100%;
        height: 20vh;
        aspect-ratio: auto;
        object-position: center 20%;
    }
}


/* ===================================
   LAPTOP STYLES
   =================================== */
@media (min-width: 1024px) {
    /* ===================================
       CUSTOM CURSOR
       =================================== */
    .cursor,
    .cursor-ring {
        display: block;
    }
    .hero-video-container {
        max-width: 28rem;
    }


    /* ===================================
       NAVBAR
       =================================== */
    .navbar{
        padding: 1.5rem var(--gap-section);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-container {
        grid-template-columns: 1fr 1fr;
    }
    .about-left {
        padding-top: var(--gap-section);
    }
    .about-right {
        grid-template-columns: 1fr;
        height: fit-content;
    }
    .about-img-left,
    .about-img-right {
        max-width: 100%;
    }
    .about-img-left {
        display: block;
        height: auto;
        aspect-ratio: 16/9;
    }
    .about-skills {
        padding: 0;
    }


    /* ===================================
       PARCOURS SECTION (Horizontal Scroll)
       =================================== */
    .parcours-bloc-img {
        aspect-ratio: 4/3;
    }


    /* ===================================
       PROJECTS SECTION
       =================================== */
    .projects-list {
        gap: calc(var(--gap-section) * 1.5);
        padding: 0;
    }
}

/* ===================================
   ACCESSIBILITÉ
   =================================== */

/* Focus clavier cohérent avec la palette (au lieu du contour bleu
   par défaut du navigateur, peu lisible sur fond sombre). Utilise
   :focus-visible pour ne s'afficher qu'au clavier, pas au clic souris. */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--cream);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Lien d'évitement — masqué visuellement tant qu'il n'a pas le focus,
   pour permettre à un utilisateur clavier de sauter directement au
   contenu principal sans repasser par toute la navbar à chaque page. */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background: var(--cream);
    color: var(--bg);
    font-family: var(--sans);
    font-size: var(--bouton);
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

/* ===================================
   LOADER
   ===================================
   Couvre la page pendant que le JS pose les états de départ des
   animations. Remplace l'ancien systeme de masquage element par element
   (classe .js + visibility:hidden), plus simple : un seul element a gerer.

   Le repli est ici en CSS pur : si le JS ne prend jamais la main (erreur,
   fichier manquant), l'animation ci-dessous efface le loader toute seule
   au bout de 3 s. Sans elle, une panne de JS laisserait un ecran opaque. */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    animation: loader-fallback 0.6s ease 3s forwards;
}
@keyframes loader-fallback {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Masque du titre : l'image monte depuis le bas, coupee par ce conteneur */
.hero-title {
    overflow: hidden;
}

/* Reduction de mouvement : pas de fondu differe, le loader disparait tout
   de suite (le JS fait de meme de son cote). */
@media (prefers-reduced-motion: reduce) {
    #loader {
        animation-delay: 0s;
        animation-duration: 0.01s;
    }
}/* ===================================
   DESIGN SYSTEM & VARIABLES
   =================================== */
:root {
    /* Couleurs */
    --bg:        #0A0E1A;   /* Fond principal — bleu nuit très sombre */
    --bg2:       #0D1120;   /* Fond alternatif légèrement plus clair */
    --cream:     #F5E6C8;   /* Texte principal — crème chaud */
    --muted:     #C4B89A;   /* Texte secondaire — beige sourd */
    --dim:       rgba(245, 230, 200, 0.5);
    --line:      #1A1F30;   /* Lignes de grille, séparateurs subtils */
    --line-num:  #2A3050;   /* Numéros de grille, labels discrets */
    --accent:    #1E2233;   /* Accents, bordures */

    /* Typographies */
    --serif:     'Playfair Display', serif;
    --sans:      'Space Grotesk', sans-serif;
    --mono:      'JetBrains Mono', monospace;

    /* Espacements */
    --padding-x-section:    2rem;       /* 32px */
    --padding-y-section:    4rem;       /* 32px */
    --gap-section:          1rem;       /* 16px */

    --padding-navbar:       0.75rem;    /* 12px */
    --padding-inverse:      -2rem;      /* -32px */

    --gap-texte:            0.5rem;     /* 8px */
    --gap-projets:          1.75rem;    /* 28px */

    /* Tailles de police */
    --h2:                   2rem;       /* 32px */
    --role:                 1.75rem;    /* 28px */

    /* Réserve (en em, donc alignée sur --role) pour les débords d'encre
       (jambages, dépassements de capitales en italique) que le trim
       text-box cap/alphabetic exclut de la boîte de layout de .role-item.
       Utilisée à la fois comme demi-gap entre .role-item (pour ne jamais
       laisser apparaître le voisin) et comme correction de la marge de
       .hero-role (pour ne pas changer l'écart baseline → image du titre). */
    --role-overshoot:       0.3em;

    /* ─── Système base + coefficients ───
       --base ne doit JAMAIS être redéfinie dans un @media : c'est la
       racine fixe dont dérivent --bouton (constant) et --paragraphe
       (en cascade mobile → tablette → desktop). */
    --base:                 1rem;       /* 16px — racine fixe, ne pas toucher */
    --bouton:               calc(var(--base) * 0.875);  /* 16 × 0.875 = 14px, constant sur les 3 formats */

    /* Chaîne d'étapes à noms distincts : évite toute auto-référence
       (--paragraphe: calc(var(--paragraphe) * x) est un cycle invalide
       en CSS, même réparti dans des @media différents — voir plus bas). */
    --paragraphe-mobile:    var(--base);                          /* 16 × 1 = 16px */
    --paragraphe-tablette:  calc(var(--paragraphe-mobile) * 1.125);   /* 16 × 1.125 = 18px */
    --paragraphe-desktop:   calc(var(--paragraphe-tablette) * 1.125); /* 18 × 1.125 ≈ 20.25px (≈ 20px) */

    --paragraphe:           var(--paragraphe-mobile);       /* palier actif : mobile */
    --email:                calc(var(--paragraphe) * 1.25); /* dérivée de --paragraphe, suit automatiquement chaque palier */
    --caption:              calc(var(--paragraphe) * 0.75); /* texte secondaire (footer...), dérivée de --paragraphe */

    --grid:                 0.5rem;     /* 8px */

    /* Autres */
    --img-corner:           1vw;

    /* ─── Tablet ─── */
    @media (min-width: 768px) {
        /* Espacements */
        --padding-x-section:    3rem;       /* 48px */
        --padding-y-section:    6rem;       /* 96px */
        --gap-section:          1.5rem;     /* 24px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -3rem;      /* -48px */

        --gap-texte:            0.75rem;    /* 12px */
        --gap-projets:          2.25rem;    /* 36px */

        /* Tailles de police */
        --h2:                   4rem;       /* 64px */
        --role:                 2.25rem;    /* 48px */
        --paragraphe:           var(--paragraphe-tablette); /* palier actif : tablette */
        --grid:                 0.625rem;   /* 10px */
    }

    /* ─── Laptop ─── */
    @media (min-width: 1024px) {
        /* Espacements */
        --padding-x-section:    8rem;       /* 128px */
        --padding-y-section:    8rem;       /* 128px */
        --gap-section:          2rem;       /* 32px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -4rem;      /* -64px */

        --gap-texte:            1rem;       /* 16px */
        --gap-projets:          3rem;       /* 48px */

        /* Tailles de police */
        --h2:                   4.5rem;     /* 72px */
        --role:                 4rem;       /* 64px */
        --paragraphe:           var(--paragraphe-desktop); /* palier actif : desktop */
        --grid:                 0.75rem;    /* 12px */
    }

    /* ─── Desktop ─── */
    @media (min-width: 1440px) {

    }
}


/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ─── Body ─── */
body {
    background: var(--bg);
    color: var(--cream);
    font-family: var(--sans);
    font-size: var(--paragraphe);
    font-weight: 300;
    line-height: 1.5;
    overflow-x: hidden;
    cursor: none;
}

/* Grain global — fixed, couvre toute la page sans perturber le layout */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3C/filter%3E%3Crect width='400' height='400' fill='white' filter='url(%23noiseFilter)' /%3E%3C/svg%3E");
    opacity: 0.1;
    pointer-events: none;
    z-index: 9999;
}

/* ─── Typographie ─── */
h1, h2, h3, h4, h5, h6, strong {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1;
}

strong {
    font-weight: 600;
}

ul {
    list-style-type: none;
}
li {
    display: flex;
    height: fit-content;
}

a {
    color: var(--cream);
    text-decoration: none;
}

/* ─── Boutons ─── */
.btn,
.btn-style {
    position: relative;
    width: fit-content;
    color: var(--muted);
    font-size: var(--bouton);
    letter-spacing: 0.075em;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.2s ease;
}
.btn:not(.project-item-link, .proj-hero-back)::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 1px;
    background-color: var(--muted);
    transition: 0.2s ease;
}
.btn:hover {
    color: var(--cream);
    transition: 0.5s ease;
}
.btn:hover::after {
    width: 100%;
    left: 0;
    right: auto;
    transition: 0.5s ease;
}

/* ─── Boutons Style ─── */
.btn-style:hover{
    color: var(--muted);
}

/* ─── Images et vidéos ─── */
img,
video {
    width: 100%;
}


/* ===================================
    UTILITIES
    =================================== */
.text-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap-section);
    width: 100%;
}

/* ─── Eyebrow ─── */
[class*="eyebrow"] {
    position: relative;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    width: 100%;
    margin-bottom: calc(var(--gap-section));
    color: var(--dim);
    font-family: var(--mono);
    font-size:calc(var(--grid) * 1.25);
    text-align: center;
    text-transform: uppercase;
}
.eyebrow-center {
    justify-content: center;
}
.eyebrow-left::after,
.eyebrow-center::before,
.eyebrow-center::after {
    content: '';
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: var(--line);
}


/* ===================================
   CUSTOM CURSOR
   =================================== */
.cursor {
    position: fixed;
    display: none;
    width: 8px;
    height: 8px;
    background: var(--cream);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.cursor-ring {
    position: fixed;
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(245, 230, 200, .4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
}


/* ===================================
   NAVBAR
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--padding-navbar) var(--gap-section);
    z-index: 1000;
}
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}
.logo {
    width: 8rem;
    line-height: 0;
}
.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) / 2);
    padding-top: var(--padding-navbar);
}
.nav-links li {
    padding-right: var(--gap-section);
    transform: translateX(100%);
}

/* ─── Menu Hamburger ─── */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--cream);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
}


/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100vh;
}
/* Image de fond du hero — élément fixe séparé, et non un fond de .hero.
   Deux raisons : son opacité doit pouvoir être animée sans emporter le
   contenu, et .hero est épinglée par ScrollTrigger (donc transformée, donc
   contexte d'empilement) — un fond placé à l'intérieur masquerait la grille
   globale. z-index -1 : sous la grille et sous le contenu, au-dessus du fond
   de page. Opacité pilotée par --hero-bg ; 1 par défaut, pour un affichage
   correct sans JS. */
.hero-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(180deg, rgba(10, 14, 26, 0.85) 70%, var(--bg) 100%), url(../images/hero.webp);
    background-size: cover;
    background-position: center center;
    opacity: var(--hero-bg, 1);
    pointer-events: none;
}
.hero-main {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    gap: 0;
    width: 100%;
    padding: var(--gap-section);
    font-size: var(--h2);
    z-index: 2;
}
.hero-content {
    position: relative;
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    padding: var(--gap-section);
    z-index: 2;
}
/* Ex-`border-top` : passé en pseudo-élément car un `border` n'est pas
   animable. Le tracé se pilote via --line-draw (0 → 1), que GSAP anime
   sur l'élément parent. Valeur par défaut 1 : ligne pleine si le JS
   n'a pas la main (pas de JS, prefers-reduced-motion). */
.hero-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--cream);
    transform: scaleX(var(--line-draw, 1));
    transform-origin: left center;
}

/* ─── Hero Title ─── */
.hero-title {
    line-height: 0;
}
.hero-role {
    overflow: hidden;
    /* height posée par le JS = hauteur d'un .role-item + le gap de
       .role-inner (dépend du text-box trim, non calculable en CSS pur) */
    font-size: var(--role);
    line-height: 1;
    /* margin, pas padding : un padding serait à l'intérieur de la zone
       overflow:hidden et agrandirait la fenêtre visible au-delà de la
       hauteur d'un .role-item, laissant apparaître le rôle suivant.
       On retranche --role-overshoot car le JS agrandit la fenêtre de ce
       montant (des deux côtés) pour ne pas couper les débords d'encre du
       rôle actif : l'écart baseline → image du titre reste égal à
       --gap-section malgré cet agrandissement. */
    margin: calc(var(--gap-section) - var(--role-overshoot)) 0;
}
.role-inner {
    display: flex;
    flex-direction: column;
    /* écarte les .role-item entre eux pour que le débord d'encre de l'un
       n'entre jamais dans la fenêtre de son voisin (le JS lit ce gap pour
       calculer la hauteur de .hero-role et le pas de rotation) */
    gap: calc(var(--role-overshoot) * 2);
}
.role-item {
    font-family: var(--serif);
    font-size: var(--role);
    line-height: 1;
    /* pas de padding : text-box trim-both ... alphabetic arrête déjà la
       box exactement sur la baseline, un padding-bottom ajouterait un
       espace vide sous la baseline */
    text-box: trim-both cap alphabetic;
}
.hero-text p {
    max-width: 56rem;
}

/* ─── Hero Video ─── */
.hero-video-container {
    max-width: 28rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    z-index: 5;
}
.hero-video {
    position: relative;
    cursor: pointer;
}

.hero-video-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, transparent 60%, var(--bg) 97%);
    transition: 0.4s ease;
    inset: 0;
}
.hero-video:hover .hero-video-overlay {
    background: linear-gradient(180deg, transparent -60%, var(--bg) 97%);
    transition: 0.4s ease;
}

.hero-video-label {
    font-family: var(--serif);
    opacity: 0;
    transition: 0.4s ease;
    transform: translateY(8px);
}
.hero-video:hover .hero-video-label {
    opacity: 1;
    transform: translateY(0);
    transition: 0.4s ease;
}

/* Fullscreen (FLIP target) state */
.hero-video.is-open {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    padding: var(--gap-section);
    z-index: 1001;
    cursor: default;
}
.hero-video.is-open::after {
    display: none;
}

.hero-video.is-open video {
    max-width: none;
}

.hero-video.is-open .hero-video-overlay,
.hero-video.is-open .hero-video-label {
    display: none;
}

.hero-video.is-open .hero-video-close {
    display: flex;
}

.hero-video-close {
    position: absolute;
    top: calc(var(--gap-section) - 36px - 10px);
    right: calc(var(--gap-section));
    width: 36px;
    height: 36px;
    display: none;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(245,230,200,.3);
    color: var(--cream);
    font-size: var(--bouton);
    border-radius: 50%;
    background: var(--bg);
    opacity: 0.8;
    cursor: pointer;
    z-index: 2;
    transform: scale(0);
    transition: background .3s;
}
.hero-video-close:hover {
    background: var(--bg);
    opacity: 0.8;
}

.video-backdrop {
    position: fixed;
    background: var(--bg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
    inset: 0;
}
.video-backdrop.is-visible {
    opacity: 0.9;
    visibility: visible;
}


/* ===================================
   STATEMENT SECTION (First)
   =================================== */
.statement {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.statement-title,
.proj-statement-text {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 900px;
}
.statement-text {
    max-width: 720px;
    color: var(--muted);
}


/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
}
.about-container {
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    max-width: 1280px;
}
.about-img-left {
    display: none;
    max-width: 28rem;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.about-img-right {
    max-width: 28rem;
}
.skills-title {
    justify-content: flex-start;
    padding-bottom: var(--gap-section);
    border-bottom: 1px solid var(--line);
}
.skills-title::before,
.skills-title::after {
    display: none;
}
.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--gap-section) * 0.75);
}


/* ===================================
   PARCOURS SECTION (Horizontal Scroll)
   =================================== */

/* Section height = 100vh, GSAP ajoute l'espace de scroll via pin */
.parcours {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--padding-x-section);
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
    z-index: 10;
}

/* "Parcours" watermark — centré absolument, z-index bas */
.parcours-hero-text {
    position: relative;
    font-size: 4.5rem;
    text-align: center;
} 

/* Track horizontal */
.parcours-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--padding-x-section);
}

/* ---- Carte individuelle — une par viewport ---- */
.parcours-bloc {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Wrapper interne — flex colonne : image en haut, textes en bas */
.parcours-bloc-inner {
    width: 100%;
}

/* Image — format 4:3, taille fixe identique pour tous les blocs */
.parcours-bloc-img {
    position: relative;
    max-width: 28rem;
    border: 1px solid var(--accent);
    aspect-ratio: 16/9;
    overflow: visible; /* wrapper now handles overflow */
}

/* Wrapper that exactly matches the image dimensions; receives the overlay */
.parcours-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Gradient overlay at bottom of the image — applied to the wrapper */
.parcours-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(10, 14, 26, 0.9) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.parcours-img-ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Textes — chevauchent légèrement le bas de l'image */
.parcours-bloc-texts {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) / 2);
    margin-top: calc(var(--gap-section) * (-2));
    z-index: 2;
}

.parcours-bloc-title {
    font-size: clamp(3rem, 7vw, 5.75rem);
    padding-left: var(--gap-section);
}

.parcours-bloc-year {
    justify-content: flex-start;
    margin: 0;
    padding-left: var(--gap-section);
    padding-bottom: calc(var(--gap-section) / 2);
    border-bottom: 1px solid var(--line);
}
.parcours-bloc-year::before,
.parcours-bloc-year::after {
    display: none;
}

.parcours-bloc-text {
    color: var(--muted);
}


/* ===================================
   PROJECTS SECTION
   =================================== */
.projects {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: var(--padding-y-section);
    height: 100vh;
    padding: var(--gap-section);
    padding-top: 0;
    overflow: hidden;
}
/* Fonds des projets — sortis de la section (cf. index.html) et donc fixes,
   sur le même plan que .hero-bg : z-index -1, sous la grille globale et sous
   le contenu. La section projets étant épinglée (donc transformée, donc
   contexte d'empilement), des fonds placés à l'intérieur masqueraient la
   grille au survol. Ils restent invisibles hors survol (opacité 0). */
.projects-bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.project-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
}
.projects-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg);
    opacity: 0;   /* apparaît avec le fond survolé, piloté par home.js */
    pointer-events: none;
}
.projects-heading-mask {
    order: 1;
    z-index: 1;
}
.projects-heading {
    text-box: trim-both cap alphabetic;
}
.projects-list-clip {
    position: relative;
    height: 100%;
    padding: var(--gap-section) 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    z-index: 2;
}
.projects-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) * 0.75);
    padding-top: 4rem;
    text-align: right;
}
.project-item-link {
    color: var(--cream);
    font-size: clamp(1.75rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    text-box: trim-both cap alphabetic;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}


/* ===================================
   MARQUEE SECTION
   =================================== */
.marquee-section {
    position: relative;
    padding-top: var(--padding-y-section);
    overflow: hidden;
}
.marquee {
    position: relative;
    width: 100%;
}
.marquee.reveal{
    display: flex;
}
.marquee-content {
    display: flex;
    gap: 1.25rem;
    white-space: nowrap;
    padding-right: 1.25rem;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 2rem;
    animation: marquee 20s linear infinite;
}

/* ─── Animation ─── */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}


/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    position: relative;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.contact-container {
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) * 2);
    align-items: center;
    max-width: 1064px;
    margin: 0 auto;
}
.contact-title {
    font-size: clamp(3rem, 10vw, 6rem);
}
.contact-subtitle {
    color: var(--muted);
}
.contact-email {
    font-size: var(--email);
    border-bottom: 1px solid var(--cream);
    transition: opacity 0.3s ease;
}
.contact-email:hover {
    opacity: 0.7;
}
.contact-socials {
    display: flex;
    justify-content: center;
    gap: calc(var(--gap-section) * 2);
}
.social-link:hover {
    color: var(--cream);
}


/* ===================================
   FOOTER
   =================================== */
.footer {
    position: relative;
    padding: var(--padding-navbar) var(--gap-section);
    /* border-top: 1px solid var(--accent); */
}
.footer p {
    text-align: center;
    font-size: var(--caption);
    color: var(--muted);
}


/* ===================================
   TABLET STYLES
   =================================== */
@media (min-width: 768px) {
    /* ===================================
       NAVBAR
       =================================== */
    .logo {
        width: 10rem;
    }
    .nav-links {
        position: relative;
        flex-direction: row;
        gap: 3vw;
        padding: 0;
    }
    .nav-links li {
        padding: 0;
        transform: none;
    }
    /* ─── Menu Hamburger ─── */
    .nav-hamburger {
        display: none;
    }


    /* ===================================
       HERO SECTION
       =================================== */
    .hero-content {
        grid-template-columns: 3fr 2fr;
        gap: 0;
        padding: 0;
    }

    /* ─── Hero Title ─── */
    .hero-title {
        max-width: 96rem;
    }
    .hero-text {
        position: relative;
        padding: calc(var(--gap-section) * 2) var(--gap-section);
    }
    /* Ex-`border-right`, même principe que .hero-content::after */
    .hero-text::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 1px;
        height: 100%;
        background: var(--cream);
        transform: scaleY(var(--line-draw, 1));
        transform-origin: center top;
    }

    /* ─── Hero Video ─── */
    .hero-video-container {
        margin: var(--gap-section);
    }
    .hero-video.is-open {
        max-width: 72rem;
        padding: var(--gap-section);
    }
    .hero-video-close {
        top: calc(var(--gap-section) + 18px);
        right: calc(var(--gap-section) + 18px);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-text {
        max-width: 580px;
    }
    .about-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .about-skills {
        padding-top: var(--gap-section);
    }


    /* ===================================
      PARCOURS SECTION (Horizontal Scroll)
      =================================== */
    .parcours {
        height: 100vh;
        padding: 0;
    }
    .parcours-hero {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        z-index: 1;
        pointer-events: none;
    }
    .parcours-hero-text {
        font-size: clamp(9rem, 20vw, 20rem);
    }
    .parcours-track-wrap {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: 2;
        display: flex;        /* ← ajouté */
        align-items: center;  /* ← centre .parcours-track verticalement */
    }
    .parcours-track {
        flex-direction: row;
        gap: 0;
        width: fit-content;
    }
    .parcours-bloc {
        width: 100vw;
    }
    .parcours-bloc-inner {
        width: 60%;
        max-width: 36rem;
    }
    .parcours-bloc-img {
        max-width: 100%;
    }
    .parcours-bloc-title {
        padding: 0;
    }
}


/* ===================================
   VERTICAL TABLET STYLES
   =================================== */ 
@media (min-width: 768px) and (max-width: 1064px) and (min-height: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: calc(var(--gap-section) * 2);
        padding: calc(var(--gap-section) * 2);
    }
    .hero-text {
        padding: 0;
        border: none;
    }
    .hero-video-container {
        width: 50vh;
        /*max-width: fit-content;*/
        margin: 0;
        /*aspect-ratio: 16/9;*/
    }

    .about-img-left {
        display: block;
        max-width: 100%;
        height: 20vh;
        aspect-ratio: auto;
        object-position: center 20%;
    }
}


/* ===================================
   LAPTOP STYLES
   =================================== */
@media (min-width: 1024px) {
    /* ===================================
       CUSTOM CURSOR
       =================================== */
    .cursor,
    .cursor-ring {
        display: block;
    }
    .hero-video-container {
        max-width: 28rem;
    }


    /* ===================================
       NAVBAR
       =================================== */
    .navbar{
        padding: 1.5rem var(--gap-section);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-container {
        grid-template-columns: 1fr 1fr;
    }
    .about-left {
        padding-top: var(--gap-section);
    }
    .about-right {
        grid-template-columns: 1fr;
        height: fit-content;
    }
    .about-img-left,
    .about-img-right {
        max-width: 100%;
    }
    .about-img-left {
        display: block;
        height: auto;
        aspect-ratio: 16/9;
    }
    .about-skills {
        padding: 0;
    }


    /* ===================================
       PARCOURS SECTION (Horizontal Scroll)
       =================================== */
    .parcours-bloc-img {
        aspect-ratio: 4/3;
    }


    /* ===================================
       PROJECTS SECTION
       =================================== */
    .projects-list {
        gap: calc(var(--gap-section) * 1.5);
        padding: 0;
    }
}

/* ===================================
   ACCESSIBILITÉ
   =================================== */

/* Focus clavier cohérent avec la palette (au lieu du contour bleu
   par défaut du navigateur, peu lisible sur fond sombre). Utilise
   :focus-visible pour ne s'afficher qu'au clavier, pas au clic souris. */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--cream);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Lien d'évitement — masqué visuellement tant qu'il n'a pas le focus,
   pour permettre à un utilisateur clavier de sauter directement au
   contenu principal sans repasser par toute la navbar à chaque page. */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background: var(--cream);
    color: var(--bg);
    font-family: var(--sans);
    font-size: var(--bouton);
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

/* ===================================
   LOADER
   ===================================
   Couvre la page pendant que le JS pose les états de départ des
   animations. Remplace l'ancien systeme de masquage element par element
   (classe .js + visibility:hidden), plus simple : un seul element a gerer.

   Le repli est ici en CSS pur : si le JS ne prend jamais la main (erreur,
   fichier manquant), l'animation ci-dessous efface le loader toute seule
   au bout de 3 s. Sans elle, une panne de JS laisserait un ecran opaque. */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    animation: loader-fallback 0.6s ease 3s forwards;
}
@keyframes loader-fallback {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Masque du titre : l'image monte depuis le bas, coupee par ce conteneur */
.hero-title {
    overflow: hidden;
}

/* Reduction de mouvement : pas de fondu differe, le loader disparait tout
   de suite (le JS fait de meme de son cote). */
@media (prefers-reduced-motion: reduce) {
    #loader {
        animation-delay: 0s;
        animation-duration: 0.01s;
    }
}/* ===================================
   DESIGN SYSTEM & VARIABLES
   =================================== */
:root {
    /* Couleurs */
    --bg:        #0A0E1A;   /* Fond principal — bleu nuit très sombre */
    --bg2:       #0D1120;   /* Fond alternatif légèrement plus clair */
    --cream:     #F5E6C8;   /* Texte principal — crème chaud */
    --muted:     #C4B89A;   /* Texte secondaire — beige sourd */
    --dim:       rgba(245, 230, 200, 0.5);
    --line:      #1A1F30;   /* Lignes de grille, séparateurs subtils */
    --line-num:  #2A3050;   /* Numéros de grille, labels discrets */
    --accent:    #1E2233;   /* Accents, bordures */

    /* Typographies */
    --serif:     'Playfair Display', serif;
    --sans:      'Space Grotesk', sans-serif;
    --mono:      'JetBrains Mono', monospace;

    /* Espacements */
    --padding-x-section:    2rem;       /* 32px */
    --padding-y-section:    4rem;       /* 32px */
    --gap-section:          1rem;       /* 16px */

    --padding-navbar:       0.75rem;    /* 12px */
    --padding-inverse:      -2rem;      /* -32px */

    --gap-texte:            0.5rem;     /* 8px */
    --gap-projets:          1.75rem;    /* 28px */

    /* Tailles de police */
    --h2:                   2rem;       /* 32px */
    --role:                 1.75rem;    /* 28px */

    /* Réserve (en em, donc alignée sur --role) pour les débords d'encre
       (jambages, dépassements de capitales en italique) que le trim
       text-box cap/alphabetic exclut de la boîte de layout de .role-item.
       Utilisée à la fois comme demi-gap entre .role-item (pour ne jamais
       laisser apparaître le voisin) et comme correction de la marge de
       .hero-role (pour ne pas changer l'écart baseline → image du titre). */
    --role-overshoot:       0.3em;

    /* ─── Système base + coefficients ───
       --base ne doit JAMAIS être redéfinie dans un @media : c'est la
       racine fixe dont dérivent --bouton (constant) et --paragraphe
       (en cascade mobile → tablette → desktop). */
    --base:                 1rem;       /* 16px — racine fixe, ne pas toucher */
    --bouton:               calc(var(--base) * 0.875);  /* 16 × 0.875 = 14px, constant sur les 3 formats */

    /* Chaîne d'étapes à noms distincts : évite toute auto-référence
       (--paragraphe: calc(var(--paragraphe) * x) est un cycle invalide
       en CSS, même réparti dans des @media différents — voir plus bas). */
    --paragraphe-mobile:    var(--base);                          /* 16 × 1 = 16px */
    --paragraphe-tablette:  calc(var(--paragraphe-mobile) * 1.125);   /* 16 × 1.125 = 18px */
    --paragraphe-desktop:   calc(var(--paragraphe-tablette) * 1.125); /* 18 × 1.125 ≈ 20.25px (≈ 20px) */

    --paragraphe:           var(--paragraphe-mobile);       /* palier actif : mobile */
    --email:                calc(var(--paragraphe) * 1.25); /* dérivée de --paragraphe, suit automatiquement chaque palier */
    --caption:              calc(var(--paragraphe) * 0.75); /* texte secondaire (footer...), dérivée de --paragraphe */

    --grid:                 0.5rem;     /* 8px */

    /* Autres */
    --img-corner:           1vw;

    /* ─── Tablet ─── */
    @media (min-width: 768px) {
        /* Espacements */
        --padding-x-section:    3rem;       /* 48px */
        --padding-y-section:    6rem;       /* 96px */
        --gap-section:          1.5rem;     /* 24px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -3rem;      /* -48px */

        --gap-texte:            0.75rem;    /* 12px */
        --gap-projets:          2.25rem;    /* 36px */

        /* Tailles de police */
        --h2:                   4rem;       /* 64px */
        --role:                 2.25rem;    /* 48px */
        --paragraphe:           var(--paragraphe-tablette); /* palier actif : tablette */
        --grid:                 0.625rem;   /* 10px */
    }

    /* ─── Laptop ─── */
    @media (min-width: 1024px) {
        /* Espacements */
        --padding-x-section:    8rem;       /* 128px */
        --padding-y-section:    8rem;       /* 128px */
        --gap-section:          2rem;       /* 32px */

        --padding-navbar:       1.5rem;     /* 24px */
        --padding-inverse:      -4rem;      /* -64px */

        --gap-texte:            1rem;       /* 16px */
        --gap-projets:          3rem;       /* 48px */

        /* Tailles de police */
        --h2:                   4.5rem;     /* 72px */
        --role:                 4rem;       /* 64px */
        --paragraphe:           var(--paragraphe-desktop); /* palier actif : desktop */
        --grid:                 0.75rem;    /* 12px */
    }

    /* ─── Desktop ─── */
    @media (min-width: 1440px) {

    }
}


/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ─── Body ─── */
body {
    background: var(--bg);
    color: var(--cream);
    font-family: var(--sans);
    font-size: var(--paragraphe);
    font-weight: 300;
    line-height: 1.5;
    overflow-x: hidden;
    cursor: none;
}

/* Grain global — fixed, couvre toute la page sans perturber le layout */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3C/filter%3E%3Crect width='400' height='400' fill='white' filter='url(%23noiseFilter)' /%3E%3C/svg%3E");
    opacity: 0.1;
    pointer-events: none;
    z-index: 9999;
}

/* ─── Typographie ─── */
h1, h2, h3, h4, h5, h6, strong {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1;
}

strong {
    font-weight: 600;
}

ul {
    list-style-type: none;
}
li {
    display: flex;
    height: fit-content;
}

a {
    color: var(--cream);
    text-decoration: none;
}

/* ─── Boutons ─── */
.btn,
.btn-style {
    position: relative;
    width: fit-content;
    color: var(--muted);
    font-size: var(--bouton);
    letter-spacing: 0.075em;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.2s ease;
}
.btn:not(.project-item-link, .proj-hero-back)::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 1px;
    background-color: var(--muted);
    transition: 0.2s ease;
}
.btn:hover {
    color: var(--cream);
    transition: 0.5s ease;
}
.btn:hover::after {
    width: 100%;
    left: 0;
    right: auto;
    transition: 0.5s ease;
}

/* ─── Boutons Style ─── */
.btn-style:hover{
    color: var(--muted);
}

/* ─── Images et vidéos ─── */
img,
video {
    width: 100%;
}


/* ===================================
    UTILITIES
    =================================== */
.text-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap-section);
    width: 100%;
}

/* ─── Eyebrow ─── */
[class*="eyebrow"] {
    position: relative;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    width: 100%;
    margin-bottom: calc(var(--gap-section));
    color: var(--dim);
    font-family: var(--mono);
    font-size:calc(var(--grid) * 1.25);
    text-align: center;
    text-transform: uppercase;
}
.eyebrow-center {
    justify-content: center;
}
.eyebrow-left::after,
.eyebrow-center::before,
.eyebrow-center::after {
    content: '';
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: var(--line);
}


/* ===================================
   CUSTOM CURSOR
   =================================== */
.cursor {
    position: fixed;
    display: none;
    width: 8px;
    height: 8px;
    background: var(--cream);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.cursor-ring {
    position: fixed;
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(245, 230, 200, .4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
}


/* ===================================
   NAVBAR
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--padding-navbar) var(--gap-section);
    z-index: 1000;
}
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}
.logo {
    width: 8rem;
    line-height: 0;
}
.nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) / 2);
    padding-top: var(--padding-navbar);
}
.nav-links li {
    padding-right: var(--gap-section);
    transform: translateX(100%);
}

/* ─── Menu Hamburger ─── */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--cream);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
}


/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100vh;
}
/* Image de fond du hero — élément fixe séparé, et non un fond de .hero.
   Deux raisons : son opacité doit pouvoir être animée sans emporter le
   contenu, et .hero est épinglée par ScrollTrigger (donc transformée, donc
   contexte d'empilement) — un fond placé à l'intérieur masquerait la grille
   globale. z-index -1 : sous la grille et sous le contenu, au-dessus du fond
   de page. Opacité pilotée par --hero-bg ; 1 par défaut, pour un affichage
   correct sans JS. */
.hero-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(180deg, rgba(10, 14, 26, 0.85) 70%, var(--bg) 100%), url(../images/hero.webp);
    background-size: cover;
    background-position: center center;
    opacity: var(--hero-bg, 1);
    pointer-events: none;
}
.hero-main {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    gap: 0;
    width: 100%;
    padding: var(--gap-section);
    font-size: var(--h2);
    z-index: 2;
}
.hero-content {
    position: relative;
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    padding: var(--gap-section);
    z-index: 2;
}
/* Ex-`border-top` : passé en pseudo-élément car un `border` n'est pas
   animable. Le tracé se pilote via --line-draw (0 → 1), que GSAP anime
   sur l'élément parent. Valeur par défaut 1 : ligne pleine si le JS
   n'a pas la main (pas de JS, prefers-reduced-motion). */
.hero-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--cream);
    transform: scaleX(var(--line-draw, 1));
    transform-origin: left center;
}

/* ─── Hero Title ─── */
.hero-title {
    line-height: 0;
}
.hero-role {
    overflow: hidden;
    /* height posée par le JS = hauteur d'un .role-item + le gap de
       .role-inner (dépend du text-box trim, non calculable en CSS pur) */
    font-size: var(--role);
    line-height: 1;
    /* margin, pas padding : un padding serait à l'intérieur de la zone
       overflow:hidden et agrandirait la fenêtre visible au-delà de la
       hauteur d'un .role-item, laissant apparaître le rôle suivant.
       On retranche --role-overshoot car le JS agrandit la fenêtre de ce
       montant (des deux côtés) pour ne pas couper les débords d'encre du
       rôle actif : l'écart baseline → image du titre reste égal à
       --gap-section malgré cet agrandissement. */
    margin: calc(var(--gap-section) - var(--role-overshoot)) 0;
}
.role-inner {
    display: flex;
    flex-direction: column;
    /* écarte les .role-item entre eux pour que le débord d'encre de l'un
       n'entre jamais dans la fenêtre de son voisin (le JS lit ce gap pour
       calculer la hauteur de .hero-role et le pas de rotation) */
    gap: calc(var(--role-overshoot) * 2);
}
.role-item {
    font-family: var(--serif);
    font-size: var(--role);
    line-height: 1;
    /* pas de padding : text-box trim-both ... alphabetic arrête déjà la
       box exactement sur la baseline, un padding-bottom ajouterait un
       espace vide sous la baseline */
    text-box: trim-both cap alphabetic;
}
.hero-text p {
    max-width: 56rem;
}

/* ─── Hero Video ─── */
.hero-video-container {
    max-width: 28rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    z-index: 5;
}
.hero-video {
    position: relative;
    cursor: pointer;
}

.hero-video-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, transparent 60%, var(--bg) 97%);
    transition: 0.4s ease;
    inset: 0;
}
.hero-video:hover .hero-video-overlay {
    background: linear-gradient(180deg, transparent -60%, var(--bg) 97%);
    transition: 0.4s ease;
}

.hero-video-label {
    font-family: var(--serif);
    opacity: 0;
    transition: 0.4s ease;
    transform: translateY(8px);
}
.hero-video:hover .hero-video-label {
    opacity: 1;
    transform: translateY(0);
    transition: 0.4s ease;
}

/* Fullscreen (FLIP target) state */
.hero-video.is-open {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    padding: var(--gap-section);
    z-index: 1001;
    cursor: default;
}
.hero-video.is-open::after {
    display: none;
}

.hero-video.is-open video {
    max-width: none;
}

.hero-video.is-open .hero-video-overlay,
.hero-video.is-open .hero-video-label {
    display: none;
}

.hero-video.is-open .hero-video-close {
    display: flex;
}

.hero-video-close {
    position: absolute;
    top: calc(var(--gap-section) - 36px - 10px);
    right: calc(var(--gap-section));
    width: 36px;
    height: 36px;
    display: none;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(245,230,200,.3);
    color: var(--cream);
    font-size: var(--bouton);
    border-radius: 50%;
    background: var(--bg);
    opacity: 0.8;
    cursor: pointer;
    z-index: 2;
    transform: scale(0);
    transition: background .3s;
}
.hero-video-close:hover {
    background: var(--bg);
    opacity: 0.8;
}

.video-backdrop {
    position: fixed;
    background: var(--bg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
    inset: 0;
}
.video-backdrop.is-visible {
    opacity: 0.9;
    visibility: visible;
}


/* ===================================
   STATEMENT SECTION (First)
   =================================== */
.statement {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.statement-title,
.proj-statement-text {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 900px;
}
.statement-text {
    max-width: 720px;
    color: var(--muted);
}


/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
}
.about-container {
    display: grid;
    gap: var(--gap-section);
    width: 100%;
    max-width: 1280px;
}
.about-img-left {
    display: none;
    max-width: 28rem;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.about-img-right {
    max-width: 28rem;
}
.skills-title {
    justify-content: flex-start;
    padding-bottom: var(--gap-section);
    border-bottom: 1px solid var(--line);
}
.skills-title::before,
.skills-title::after {
    display: none;
}
.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--gap-section) * 0.75);
}


/* ===================================
   PARCOURS SECTION (Horizontal Scroll)
   =================================== */

/* Section height = 100vh, GSAP ajoute l'espace de scroll via pin */
.parcours {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--padding-x-section);
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--padding-y-section) var(--gap-section);
    overflow: hidden;
    z-index: 10;
}

/* "Parcours" watermark — centré absolument, z-index bas */
.parcours-hero-text {
    position: relative;
    font-size: 4.5rem;
    text-align: center;
} 

/* Track horizontal */
.parcours-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--padding-x-section);
}

/* ---- Carte individuelle — une par viewport ---- */
.parcours-bloc {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Wrapper interne — flex colonne : image en haut, textes en bas */
.parcours-bloc-inner {
    width: 100%;
}

/* Image — format 4:3, taille fixe identique pour tous les blocs */
.parcours-bloc-img {
    position: relative;
    max-width: 28rem;
    border: 1px solid var(--accent);
    aspect-ratio: 16/9;
    overflow: visible; /* wrapper now handles overflow */
}

/* Wrapper that exactly matches the image dimensions; receives the overlay */
.parcours-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Gradient overlay at bottom of the image — applied to the wrapper */
.parcours-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(10, 14, 26, 0.9) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.parcours-img-ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Textes — chevauchent légèrement le bas de l'image */
.parcours-bloc-texts {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) / 2);
    margin-top: calc(var(--gap-section) * (-2));
    z-index: 2;
}

.parcours-bloc-title {
    font-size: clamp(3rem, 7vw, 5.75rem);
    padding-left: var(--gap-section);
}

.parcours-bloc-year {
    justify-content: flex-start;
    margin: 0;
    padding-left: var(--gap-section);
    padding-bottom: calc(var(--gap-section) / 2);
    border-bottom: 1px solid var(--line);
}
.parcours-bloc-year::before,
.parcours-bloc-year::after {
    display: none;
}

.parcours-bloc-text {
    color: var(--muted);
}


/* ===================================
   PROJECTS SECTION
   =================================== */
.projects {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: var(--padding-y-section);
    height: 100vh;
    padding: var(--gap-section);
    padding-top: 0;
    overflow: hidden;
}
/* Fonds des projets — sortis de la section (cf. index.html) et donc fixes,
   sur le même plan que .hero-bg : z-index -1, sous la grille globale et sous
   le contenu. La section projets étant épinglée (donc transformée, donc
   contexte d'empilement), des fonds placés à l'intérieur masqueraient la
   grille au survol. Ils restent invisibles hors survol (opacité 0). */
.projects-bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.project-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
}
.projects-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg);
    opacity: 0;   /* apparaît avec le fond survolé, piloté par home.js */
    pointer-events: none;
}
.projects-heading-mask {
    order: 1;
    z-index: 1;
}
.projects-heading {
    text-box: trim-both cap alphabetic;
}
.projects-list-clip {
    position: relative;
    height: 100%;
    padding: var(--gap-section) 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
    z-index: 2;
}
.projects-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: calc(var(--gap-section) * 0.75);
    padding-top: 4rem;
    text-align: right;
}
.project-item-link {
    color: var(--cream);
    font-size: clamp(1.75rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    text-box: trim-both cap alphabetic;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}


/* ===================================
   MARQUEE SECTION
   =================================== */
.marquee-section {
    position: relative;
    padding-top: var(--padding-y-section);
    overflow: hidden;
}
.marquee {
    position: relative;
    width: 100%;
}
.marquee.reveal{
    display: flex;
}
.marquee-content {
    display: flex;
    gap: 1.25rem;
    white-space: nowrap;
    padding-right: 1.25rem;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 2rem;
    animation: marquee 20s linear infinite;
}

/* ─── Animation ─── */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}


/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    position: relative;
    padding: var(--padding-y-section) var(--padding-x-section);
    text-align: center;
}
.contact-container {
    display: flex;
    flex-direction: column;
    gap: calc(var(--gap-section) * 2);
    align-items: center;
    max-width: 1064px;
    margin: 0 auto;
}
.contact-title {
    font-size: clamp(3rem, 10vw, 6rem);
}
.contact-subtitle {
    color: var(--muted);
}
.contact-email {
    font-size: var(--email);
    border-bottom: 1px solid var(--cream);
    transition: opacity 0.3s ease;
}
.contact-email:hover {
    opacity: 0.7;
}
.contact-socials {
    display: flex;
    justify-content: center;
    gap: calc(var(--gap-section) * 2);
}
.social-link:hover {
    color: var(--cream);
}


/* ===================================
   FOOTER
   =================================== */
.footer {
    position: relative;
    padding: var(--padding-navbar) var(--gap-section);
    /* border-top: 1px solid var(--accent); */
}
.footer p {
    text-align: center;
    font-size: var(--caption);
    color: var(--muted);
}


/* ===================================
   TABLET STYLES
   =================================== */
@media (min-width: 768px) {
    /* ===================================
       NAVBAR
       =================================== */
    .logo {
        width: 10rem;
    }
    .nav-links {
        position: relative;
        flex-direction: row;
        gap: 3vw;
        padding: 0;
    }
    .nav-links li {
        padding: 0;
        transform: none;
    }
    /* ─── Menu Hamburger ─── */
    .nav-hamburger {
        display: none;
    }


    /* ===================================
       HERO SECTION
       =================================== */
    .hero-content {
        grid-template-columns: 3fr 2fr;
        gap: 0;
        padding: 0;
    }

    /* ─── Hero Title ─── */
    .hero-title {
        max-width: 96rem;
    }
    .hero-text {
        position: relative;
        padding: calc(var(--gap-section) * 2) var(--gap-section);
    }
    /* Ex-`border-right`, même principe que .hero-content::after */
    .hero-text::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 1px;
        height: 100%;
        background: var(--cream);
        transform: scaleY(var(--line-draw, 1));
        transform-origin: center top;
    }

    /* ─── Hero Video ─── */
    .hero-video-container {
        margin: var(--gap-section);
    }
    .hero-video.is-open {
        max-width: 72rem;
        padding: var(--gap-section);
    }
    .hero-video-close {
        top: calc(var(--gap-section) + 18px);
        right: calc(var(--gap-section) + 18px);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-text {
        max-width: 580px;
    }
    .about-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .about-skills {
        padding-top: var(--gap-section);
    }


    /* ===================================
      PARCOURS SECTION (Horizontal Scroll)
      =================================== */
    .parcours {
        height: 100vh;
        padding: 0;
    }
    .parcours-hero {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        z-index: 1;
        pointer-events: none;
    }
    .parcours-hero-text {
        font-size: clamp(9rem, 20vw, 20rem);
    }
    .parcours-track-wrap {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: 2;
        display: flex;        /* ← ajouté */
        align-items: center;  /* ← centre .parcours-track verticalement */
    }
    .parcours-track {
        flex-direction: row;
        gap: 0;
        width: fit-content;
    }
    .parcours-bloc {
        width: 100vw;
    }
    .parcours-bloc-inner {
        width: 60%;
        max-width: 36rem;
    }
    .parcours-bloc-img {
        max-width: 100%;
    }
    .parcours-bloc-title {
        padding: 0;
    }
}


/* ===================================
   VERTICAL TABLET STYLES
   =================================== */ 
@media (min-width: 768px) and (max-width: 1064px) and (min-height: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: calc(var(--gap-section) * 2);
        padding: calc(var(--gap-section) * 2);
    }
    .hero-text {
        padding: 0;
        border: none;
    }
    .hero-video-container {
        width: 50vh;
        /*max-width: fit-content;*/
        margin: 0;
        /*aspect-ratio: 16/9;*/
    }

    .about-img-left {
        display: block;
        max-width: 100%;
        height: 20vh;
        aspect-ratio: auto;
        object-position: center 20%;
    }
}


/* ===================================
   LAPTOP STYLES
   =================================== */
@media (min-width: 1024px) {
    /* ===================================
       CUSTOM CURSOR
       =================================== */
    .cursor,
    .cursor-ring {
        display: block;
    }
    .hero-video-container {
        max-width: 28rem;
    }


    /* ===================================
       NAVBAR
       =================================== */
    .navbar{
        padding: 1.5rem var(--gap-section);
    }


    /* ===================================
       ABOUT SECTION
       =================================== */
    .about-container {
        grid-template-columns: 1fr 1fr;
    }
    .about-left {
        padding-top: var(--gap-section);
    }
    .about-right {
        grid-template-columns: 1fr;
        height: fit-content;
    }
    .about-img-left,
    .about-img-right {
        max-width: 100%;
    }
    .about-img-left {
        display: block;
        height: auto;
        aspect-ratio: 16/9;
    }
    .about-skills {
        padding: 0;
    }


    /* ===================================
       PARCOURS SECTION (Horizontal Scroll)
       =================================== */
    .parcours-bloc-img {
        aspect-ratio: 4/3;
    }


    /* ===================================
       PROJECTS SECTION
       =================================== */
    .projects-list {
        gap: calc(var(--gap-section) * 1.5);
        padding: 0;
    }
}

/* ===================================
   ACCESSIBILITÉ
   =================================== */

/* Focus clavier cohérent avec la palette (au lieu du contour bleu
   par défaut du navigateur, peu lisible sur fond sombre). Utilise
   :focus-visible pour ne s'afficher qu'au clavier, pas au clic souris. */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--cream);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Lien d'évitement — masqué visuellement tant qu'il n'a pas le focus,
   pour permettre à un utilisateur clavier de sauter directement au
   contenu principal sans repasser par toute la navbar à chaque page. */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    background: var(--cream);
    color: var(--bg);
    font-family: var(--sans);
    font-size: var(--bouton);
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

/* ===================================
   LOADER
   ===================================
   Couvre la page pendant que le JS pose les états de départ des
   animations. Remplace l'ancien systeme de masquage element par element
   (classe .js + visibility:hidden), plus simple : un seul element a gerer.

   Le repli est ici en CSS pur : si le JS ne prend jamais la main (erreur,
   fichier manquant), l'animation ci-dessous efface le loader toute seule
   au bout de 3 s. Sans elle, une panne de JS laisserait un ecran opaque. */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    animation: loader-fallback 0.6s ease 3s forwards;
}
@keyframes loader-fallback {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Masque du titre : l'image monte depuis le bas, coupee par ce conteneur */
.hero-title {
    overflow: hidden;
}

/* Reduction de mouvement : pas de fondu differe, le loader disparait tout
   de suite (le JS fait de meme de son cote). */
@media (prefers-reduced-motion: reduce) {
    #loader {
        animation-delay: 0s;
        animation-duration: 0.01s;
    }
}