/* ═══════════════════════════════════════════════
   SAM.WEBP — V2 · ONE-PAGE IMMERSIVE · 2026
   ═══════════════════════════════════════════════ */

:root {
    --bg: #07070b;
    --ink: #f2f0ea;
    --ink-dim: rgba(242, 240, 234, .55);
    --accent: #c8ff3e;          /* acid lime */
    --accent-2: #7b5cff;        /* electric violet */
    --font-display: "Syne", sans-serif;
    --font-body: "Inter", sans-serif;
    --ease: cubic-bezier(.76, 0, .24, 1);
}

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

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 300;
    overflow-x: hidden;
    cursor: none;
}
a { color: inherit; text-decoration: none; cursor: none; }
::selection { background: var(--accent); color: var(--bg); }

/* ═══ PRELOADER ═══ */
.loader {
    position: fixed; inset: 0; z-index: 1000;
    background: var(--bg);
    display: flex; flex-direction: column;
    justify-content: flex-end;
    padding: 4vw;
}
.loader-inner {
    display: flex; justify-content: space-between; align-items: flex-end;
    font-family: var(--font-display);
    margin-bottom: 1.2rem;
}
.loader-name { font-size: clamp(1rem, 2vw, 1.4rem); letter-spacing: .3em; color: var(--ink-dim); display: flex; align-items: center; gap: .9rem; }
.loader-cube { width: 46px; height: 46px; object-fit: contain; animation: cubefloat 1.6s ease-in-out infinite; }
@keyframes cubefloat { 50% { transform: translateY(-7px) rotate(-4deg); } }
.loader-count { font-size: clamp(4rem, 14vw, 11rem); font-weight: 800; line-height: .8; color: var(--accent); }
.loader-bar { height: 1px; background: rgba(242,240,234,.15); }
.loader-bar span { display: block; height: 100%; width: 0%; background: var(--accent); }

/* ═══ WEBGL CANVAS & GRAIN ═══ */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.grain {
    position: fixed; inset: 0; z-index: 2; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: .05;
    animation: grain .6s steps(4) infinite;
}
@keyframes grain {
    0%,100% { background-position: 0 0; } 25% { background-position: -40px 60px; }
    50% { background-position: 70px -30px; } 75% { background-position: -60px -50px; }
}

/* ═══ CURSOR ═══ */
.cursor {
    position: fixed; top: 0; left: 0; z-index: 999;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    display: flex; align-items: center; justify-content: center;
    transition: width .35s var(--ease), height .35s var(--ease), background .35s;
    will-change: transform;
}
.cursor.is-hover { width: 64px; height: 64px; background: rgba(200,255,62,.12); border: 1px solid var(--accent); }
.cursor.is-label { width: 96px; height: 96px; background: var(--accent); }
.cursor-label {
    font-family: var(--font-display); font-weight: 700; font-size: .72rem;
    letter-spacing: .08em; color: var(--bg); opacity: 0;
    white-space: nowrap;
}
.cursor.is-label .cursor-label { opacity: 1; }
@media (hover: none) { .cursor { display: none; } body, a { cursor: auto; } }

/* ═══ NAV ═══ */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.6rem 4vw;
    mix-blend-mode: difference;
}
.nav-logo { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: .05em; display: flex; align-items: center; gap: .55rem; }
.nav-logo-cube { width: 34px; height: 34px; object-fit: contain; }
.nav-logo sup { font-size: .55rem; font-weight: 400; color: var(--accent); mix-blend-mode: normal; }
.nav-links { display: flex; gap: 2.2rem; font-size: .85rem; letter-spacing: .05em; }
.nav-links a { position: relative; opacity: .7; transition: opacity .3s; }
.nav-links a:hover { opacity: 1; }
.nav-cta {
    display: flex; align-items: center; gap: .5rem;
    font-size: .8rem; letter-spacing: .05em;
    border: 1px solid rgba(242,240,234,.3); border-radius: 999px;
    padding: .55rem 1.1rem;
}
.nav-cta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* burger + menu mobile */
.nav-burger { display: none; }
.mobile-menu {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(7, 7, 11, .96);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    display: flex; flex-direction: column; justify-content: center; gap: 1.1rem;
    padding: 0 8vw;
    transform: translateY(-102%);
    transition: transform .65s var(--ease);
}
.mobile-menu.open { transform: none; }
.mobile-menu a {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(1.7rem, 8vw, 2.8rem); letter-spacing: -.01em;
}
.mobile-menu a:active { color: var(--accent); }
@media (max-width: 760px) {
    .nav-links, .nav-cta { display: none; }
    .nav-burger {
        display: flex; flex-direction: column; justify-content: center; gap: 7px;
        background: none; border: 0; padding: .7rem; cursor: pointer;
    }
    .nav-burger span { width: 27px; height: 2px; background: var(--ink); transition: transform .4s var(--ease); }
    .nav-burger.open span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
    .nav-burger.open span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }
}

/* ═══ SECTIONS — base ═══ */
section { position: relative; z-index: 3; padding: 18vh 4vw; }
.section-head { display: flex; align-items: baseline; gap: 2rem; margin-bottom: 7vh; }
.section-index { font-family: var(--font-display); color: var(--accent); font-size: .9rem; letter-spacing: .2em; }
.section-title {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(2.2rem, 7vw, 7rem);
    line-height: .9; letter-spacing: -.02em;
    overflow: hidden;
    white-space: nowrap; /* titre toujours sur une seule ligne */
}

/* split chars */
.char { display: inline-block; will-change: transform; }
.ht-line { display: block; overflow: hidden; white-space: nowrap; }
.ht-word { display: inline-block; } /* largeur mesurable pour l'ajustement auto */

/* ═══ HERO ═══ */
.hero {
    min-height: 100svh;
    display: flex; flex-direction: column; justify-content: space-between;
    padding-top: 16vh; padding-bottom: 5vh;
}
.hero-meta {
    position: relative; z-index: 2;
    display: flex; gap: 3vw; flex-wrap: wrap;
    font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
    color: var(--ink-dim);
}
.hero-title {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(4rem, 16.5vw, 15rem);
    line-height: .85; letter-spacing: -.03em;
    user-select: none;
    position: relative; z-index: 2;
}
.hero-video-fallback {
    /* intégrée à toute la page (principe v1) : la vidéo est le fond du site,
       pleine et nette dans le hero, estompée/floutée derrière les sections */
    position: fixed; inset: 0; z-index: 1;
    pointer-events: none;
}
.hero-video-fallback video {
    width: 100%; height: 100%; object-fit: cover;
    filter: url(#liquid); /* distorsion seule, image d'origine intacte */
    transform: scale(1.04); /* masque les bords rognés par la distorsion */
}
.hero-video-veil {
    position: absolute; inset: 0;
    background:
        linear-gradient(160deg, rgba(123,92,255,.12), transparent 45%, rgba(200,255,62,.06)),
        linear-gradient(180deg, rgba(7,7,11,.62), rgba(7,7,11,.15) 45%, rgba(7,7,11,.88));
}
.hero-portrait {
    position: absolute; right: 6vw; top: 13vh;
    width: clamp(140px, 16vw, 250px); aspect-ratio: 3/4;
    transform: rotate(4deg);
    border-radius: 14px; overflow: hidden;
    z-index: 1;
    box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
@media (max-height: 760px) and (min-width: 761px) {
    .hero-portrait { width: clamp(110px, 12vw, 170px); }
}
.hero-portrait img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(.85) contrast(1.05);
    transition: filter .6s var(--ease), transform .6s var(--ease);
}
.hero:hover .hero-portrait img { filter: none; transform: scale(1.04); }
@media (max-width: 760px) {
    .hero-portrait { position: static; transform: rotate(3deg); width: 150px; margin-bottom: 1.5rem; }
}
.ht-line-2 { margin-left: 8vw; }
.ht-outline {
    color: transparent;
    -webkit-text-stroke: 2px var(--ink);
}
.hero-bottom { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 3rem; }
.hero-desc { max-width: 34ch; font-size: clamp(1rem, 1.4vw, 1.25rem); line-height: 1.55; color: var(--ink-dim); }
.hero-desc em { font-style: normal; color: var(--accent); }
.hero-scroll {
    display: flex; flex-direction: column; align-items: center; gap: .8rem;
    font-size: .65rem; letter-spacing: .35em; color: var(--ink-dim);
}
.hero-scroll-line { width: 1px; height: 60px; background: linear-gradient(var(--accent), transparent); animation: scrollline 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes scrollline { 0% { transform: scaleY(0);} 50% { transform: scaleY(1);} 100% { transform: scaleY(0); transform-origin: bottom;} }

/* ═══ MARQUEE ═══ */
.marquee { position: relative; z-index: 3; overflow: hidden; padding: 1.6rem 0; border-top: 1px solid rgba(242,240,234,.12); border-bottom: 1px solid rgba(242,240,234,.12); }
.marquee-track {
    display: flex; white-space: nowrap; will-change: transform;
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(1.1rem, 2.4vw, 2rem); letter-spacing: .04em;
    color: transparent; -webkit-text-stroke: 1px rgba(242,240,234,.5);
}

/* ═══ ABOUT ═══ */
.about { max-width: 1200px; }
.about-text {
    font-family: var(--font-display); font-weight: 500;
    font-size: clamp(1.5rem, 3.4vw, 3rem); line-height: 1.25; letter-spacing: -.01em;
}
.about-text .w { opacity: .12; transition: opacity .4s; }
.about-text .w.on { opacity: 1; }
.about-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 2rem; margin-top: 10vh; }
.stat { border-top: 1px solid rgba(242,240,234,.18); padding-top: 1.2rem; }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1; display: block; color: var(--accent); }
.stat-label { font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-dim); }

/* ═══ PROJETS ═══ */
.project {
    display: grid; grid-template-columns: 60px 150px 1fr auto; align-items: center; gap: 2.5rem;
    padding: 2.6rem 0; border-top: 1px solid rgba(242,240,234,.15);
    position: relative; transition: padding-left .5s var(--ease);
}
.project:last-of-type { border-bottom: 1px solid rgba(242,240,234,.15); }
.project:hover { padding-left: 1.5rem; }
.project-num { font-size: .75rem; letter-spacing: .2em; color: var(--ink-dim); }
.project-body h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4.5vw, 3.6rem); line-height: 1; transition: color .4s; }
.project:hover .project-body h3 { color: var(--accent); }
.project-body p { margin-top: .7rem; color: var(--ink-dim); max-width: 50ch; font-size: .95rem; }
.project-tag { font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-dim); border: 1px solid rgba(242,240,234,.2); border-radius: 999px; padding: .5rem 1rem; white-space: nowrap; }
.project-img {
    width: 150px; height: 105px; border-radius: 10px; overflow: hidden;
    background: rgba(242,240,234,.06);
    display: flex; align-items: center; justify-content: center;
    transition: transform .45s var(--ease), background .45s;
}
.project-img img { max-width: 68%; max-height: 68%; object-fit: contain; transition: transform .45s var(--ease); }
.project:hover .project-img { transform: rotate(-3deg) scale(1.05); background: rgba(242,240,234,.1); }
.project:hover .project-img img { transform: scale(1.08); }
.project-img-empty { font-size: 1.6rem; color: var(--accent); }
.project-soon { opacity: .65; }
@media (max-width: 760px) {
    .project {
        display: flex; flex-direction: column; align-items: flex-start;
        gap: 1rem; padding: 2.4rem 0;
    }
    .project-img { width: 116px; height: 80px; }
    .project-body p { max-width: none; }
    .project-tag { font-size: .62rem; padding: .4rem .8rem; }
    .project:hover { padding-left: 0; }
}

/* ═══ SHOWREEL — horizontal ═══ */
.reel-section { padding: 0; }
.reel-pin { height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: 0 4vw; }
.reel-head { margin-bottom: 4vh; }
.reel-track { display: flex; gap: 3vw; will-change: transform; width: max-content; }
.reel-card { position: relative; flex: 0 0 auto; }
.reel-card video {
    height: 52svh; width: auto; aspect-ratio: 16/9; object-fit: cover;
    border-radius: 14px; display: block;
    filter: grayscale(.4) contrast(1.05);
    transition: filter .5s;
}
.reel-card:hover video, .reel-card.is-playing video { filter: none; }
.reel-card figcaption { margin-top: 1rem; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-dim); }
.reel-card-text { display: flex; flex-direction: column; justify-content: center; padding: 0 4vw; }
.reel-card-text p { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 3rem); line-height: 1.1; }

/* cartes YouTube — 16/9, lecteur chargé au clic */
.yt-frame {
    position: relative; height: 52svh; aspect-ratio: 16/9;
    border-radius: 14px; overflow: hidden; background: #101016;
}
.yt-frame img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    filter: grayscale(.4) contrast(1.05);
    transition: filter .5s, transform .5s var(--ease);
}
.reel-card-yt:hover .yt-frame img { filter: none; transform: scale(1.03); }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--accent);
    transition: transform .4s var(--ease);
    pointer-events: none;
}
.yt-play::after {
    content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
    border-style: solid; border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent var(--bg);
}
.reel-card-yt:hover .yt-play { transform: translate(-50%, -50%) scale(1.15); }
@media (max-width: 760px) { .yt-frame { height: auto; width: 78vw; aspect-ratio: 16/9; } }

/* ═══ SKILLS ═══ */
.skills-list { list-style: none; }
.skills-list li {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(1.3rem, 3.2vw, 2.6rem);
    white-space: nowrap; overflow: hidden; /* une ligne, taille auto-ajustée en JS */
    padding: 1.6rem 0; border-top: 1px solid rgba(242,240,234,.12);
    color: var(--ink-dim); transition: color .4s, padding-left .4s var(--ease);
}
.skills-list li:hover { color: var(--ink); padding-left: 1rem; }
.skills-list li:last-child { border-bottom: 1px solid rgba(242,240,234,.12); }
.skills-logos {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2.2rem;
    margin-top: 6vh;
}
.skills-logos img {
    height: 32px; width: auto; max-width: 90px; object-fit: contain;
    filter: grayscale(1) brightness(1.6); opacity: .55;
    transition: filter .4s, opacity .4s, transform .4s var(--ease);
}
.skills-logos img:hover { filter: none; opacity: 1; transform: translateY(-4px); }

/* ═══ MATÉRIEL ═══ */
.gear-list { list-style: none; max-width: 1000px; }
.gear-list li {
    display: flex; justify-content: space-between; align-items: baseline; gap: 2rem;
    padding: 1.3rem 0; border-bottom: 1px solid rgba(242,240,234,.12);
    font-family: var(--font-display); font-weight: 600; font-size: clamp(1.1rem, 2.2vw, 1.7rem);
}
.gear-type { font-family: var(--font-body); font-weight: 300; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); }

/* ═══ MATÉRIEL — GRILLE DE CARTES ═══ */
.gear-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
}
.gear-card {
    display: flex; flex-direction: column;
    background: rgba(242,240,234,.03);
    border: 1px solid rgba(242,240,234,.10);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .45s var(--ease), border-color .45s, background .45s;
}
.gear-card:hover {
    transform: translateY(-6px);
    border-color: rgba(200,255,62,.45);
    background: rgba(242,240,234,.05);
}
.gear-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background:
        radial-gradient(120% 120% at 50% 0%, rgba(123,92,255,.10), transparent 60%),
        #0d0d12;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.gear-card-media img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 12%;
    transition: transform .55s var(--ease);
}
.gear-card:hover .gear-card-media img { transform: scale(1.05); }
/* Placeholder affiché quand l'image manque (alt visible sur fond) */
.gear-card-media img:not([src]),
.gear-card-media img[src=""] { opacity: 0; }
.gear-card-ph {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700;
    font-size: 2.4rem; letter-spacing: .05em;
    color: rgba(242,240,234,.14);
    pointer-events: none;
}
.gear-card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; }
.gear-card-name {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.15; color: var(--ink);
}
.gear-card-type {
    font-family: var(--font-body); font-weight: 300; font-size: .72rem;
    letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); line-height: 1.4;
}

/* ═══ CONTACT ═══ */
.contact { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.contact-kicker { font-size: .8rem; letter-spacing: .25em; text-transform: uppercase; color: var(--accent); margin-bottom: 3vh; }
.contact-mail { display: block; }
.cm-line {
    display: block; overflow: hidden; white-space: nowrap;
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(2.4rem, 11.5vw, 10.5rem); line-height: .92; letter-spacing: -.02em;
    transition: letter-spacing .6s var(--ease);
}
.contact-mail:hover .cm-line { letter-spacing: .01em; }
.cm-outline { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.contact-mail:hover .cm-outline { -webkit-text-stroke-color: var(--accent); }
.contact-links { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: 8vh; font-size: .95rem; }
.contact-links a { border-bottom: 1px solid rgba(242,240,234,.25); padding-bottom: .3rem; transition: border-color .3s, color .3s; }
.contact-links a:hover { color: var(--accent); border-color: var(--accent); }

.footer {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
    margin-top: 12vh; padding-top: 2rem; border-top: 1px solid rgba(242,240,234,.12);
    font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim);
}
.footer-pages { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-pages a { transition: color .3s; }
.footer-pages a:hover { color: var(--accent); }

/* ═══ REVEALS (état initial géré en JS) ═══ */
[data-reveal] { will-change: transform, opacity; }

/* ═══ PAGES INTERNES — style v2 ═══ */
.page-head { padding-top: 22vh; padding-bottom: 4vh; }
.page-head[data-hero-video] {
    /* même principe que l'accueil : hero plein écran, vidéo en fond,
       titre en bas, le contenu arrive en scrollant */
    position: relative;
    min-height: 100svh;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding-bottom: 8vh;
}
.page-head > *:not(.hero-video-fallback) { position: relative; z-index: 2; }
.page-kicker { font-size: .8rem; letter-spacing: .25em; text-transform: uppercase; color: var(--accent); margin-bottom: 2.5vh; display: flex; align-items: center; gap: .6rem; }
.page-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
.page-title-xl {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(3rem, 12vw, 11rem); line-height: .9; letter-spacing: -.02em;
    overflow: hidden; white-space: nowrap;
}
.page-sub-v2 { margin-top: 2.5vh; color: var(--ink-dim); font-size: clamp(1rem, 1.4vw, 1.2rem); max-width: 50ch; }

.cv-profile { display: grid; grid-template-columns: auto 1fr; gap: 3rem; align-items: center; max-width: 1100px; }
.cv-profile-photo { width: clamp(120px, 14vw, 190px); aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; transform: rotate(-3deg); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.cv-profile-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.85); transition: filter .5s; }
.cv-profile-photo:hover img { filter: none; }
.cv-profile-text { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1rem, 2vw, 1.6rem); line-height: 1.4; }
.cv-profile-text strong { color: var(--accent); font-weight: 700; }
.cv-langs { margin-top: 1.2rem; font-family: var(--font-body); font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-dim); }

.cv-row {
    display: grid; grid-template-columns: 150px 1fr; gap: 2.5rem;
    padding: 2.4rem 0; border-top: 1px solid rgba(242,240,234,.15);
    transition: padding-left .4s var(--ease);
}
.cv-row:hover { padding-left: 1rem; }
.cv-rows .cv-row:last-child { border-bottom: 1px solid rgba(242,240,234,.15); }
.cv-date { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); padding-top: .5rem; white-space: nowrap; }
.cv-row h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2.3rem); line-height: 1.05; }
.cv-company { margin-top: .35rem; font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-dim); }
.cv-detail { margin-top: .9rem; color: var(--ink-dim); font-size: .95rem; line-height: 1.65; max-width: 65ch; }
.cv-pill-wrap { display: flex; flex-wrap: wrap; gap: .7rem; max-width: 900px; }
.cv-pill {
    font-size: .8rem; letter-spacing: .08em;
    border: 1px solid rgba(242,240,234,.25); border-radius: 999px;
    padding: .6rem 1.2rem; color: var(--ink-dim);
    transition: color .3s, border-color .3s, transform .3s var(--ease);
}
.cv-pill:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.cv-back {
    display: inline-flex; align-items: center; gap: .6rem;
    margin-top: 6vh;
    font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
    border: 1px solid rgba(242,240,234,.3); border-radius: 999px; padding: .9rem 1.6rem;
    transition: background .3s, color .3s, border-color .3s;
}
.cv-back:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
@media (max-width: 760px) {
    .cv-profile { grid-template-columns: 1fr; gap: 1.6rem; }
    .cv-row { grid-template-columns: 1fr; gap: .5rem; padding: 1.8rem 0; }
    .cv-row:hover { padding-left: 0; }
}

/* ═══ MOBILE — vraie passe responsive ═══ */
@media (max-width: 760px) {
    section { padding: 11vh 5vw; }
    .section-head { gap: 1rem; margin-bottom: 4.5vh; }

    /* hero recomposé : portrait compact, pile verticale lisible */
    .hero { padding-top: 12vh; padding-bottom: 4vh; gap: 1.6rem; }
    .hero-meta { font-size: .62rem; gap: .5rem 1.2rem; }
    .hero-portrait { width: 112px; margin-bottom: .4rem; border-radius: 10px; }
    .hero-bottom { flex-direction: column; align-items: flex-start; gap: 1.4rem; }
    .hero-desc { max-width: none; }
    .hero-scroll { display: none; }
    .ht-line-2 { margin-left: 6vw; }

    /* about */
    .about-stats { gap: 1.4rem; margin-top: 6vh; }

    /* showreel : swipe horizontal natif avec snap */
    .reel-section { padding: 11vh 0 11vh 5vw; }
    .reel-pin { height: auto; padding: 0; overflow: visible; }
    .reel-head { padding-right: 5vw; }
    .reel-track {
        width: auto; gap: 4vw;
        overflow-x: auto; -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding: 0 5vw 1rem 0;
        scrollbar-width: none;
    }
    .reel-track::-webkit-scrollbar { display: none; }
    .reel-card { scroll-snap-align: start; }
    .reel-card video { width: 82vw; height: auto; }
    .reel-card-text { padding: 0 6vw 0 2vw; }

    /* listes & contact */
    .skills-logos { gap: 1.4rem; }
    .skills-logos img { height: 26px; }
    .gear-list li { flex-direction: column; align-items: flex-start; gap: .25rem; }
    .gear-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
    .contact { padding-top: 14vh; }
    .contact-links { flex-direction: column; align-items: flex-start; gap: 1.3rem; margin-top: 6vh; }
    .footer { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
}

/* ═══════════════════════════════════════════════
   GALERIE HORIZONTALE — style GTA VI
   Suite de panneaux plein écran qui défilent latéralement
   ═══════════════════════════════════════════════ */
body.page-gallery { overflow-x: hidden; }

.hgal { position: relative; z-index: 3; }
.hgal-track {
    display: flex; flex-wrap: nowrap;
    width: max-content; height: 100svh;
    will-change: transform;
}

/* ── un panneau = une scène plein écran ── */
.hpanel {
    position: relative;
    flex: 0 0 100vw;
    width: 100vw; height: 100svh;
    overflow: hidden;
    display: flex; align-items: flex-end;
    padding: 0;
}
.hpanel-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hpanel-media img, .hpanel-media video {
    width: 100%; height: 100%; object-fit: cover; display: block;
    filter: contrast(1.05) brightness(.92);
}
/* voile dégradé pour lisibilité du texte (comme GTA VI) */
.hpanel-veil {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(7,7,11,.78) 0%, rgba(7,7,11,.25) 38%, transparent 62%),
        linear-gradient(180deg, transparent 40%, rgba(7,7,11,.82));
}
.hpanel-content {
    position: relative; z-index: 2;
    padding: 0 6vw 12vh;
    max-width: 56ch;
}
.hpanel-content-center {
    max-width: none; width: 100%;
    padding: 0 6vw; margin: auto 0;
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
}
.hpanel-kicker {
    display: flex; align-items: center; gap: .6rem;
    font-size: .8rem; letter-spacing: .25em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 1.8vh;
    white-space: nowrap;
}
.hpanel-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
.hpanel-title {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(2.6rem, 7vw, 6.5rem); line-height: .92; letter-spacing: -.02em;
    overflow: hidden;
    white-space: nowrap; /* toujours sur une seule ligne (taille auto-ajustée en JS) */
}
.hpanel-title-xl { font-size: clamp(3.5rem, 14vw, 13rem); }
.hpanel-desc {
    margin-top: 2.4vh; font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.55; color: var(--ink-dim); max-width: 46ch;
}
.hpanel-desc strong { color: var(--accent); font-weight: 600; }
.hpanel-cta {
    margin-top: 3vh;
    font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: .04em;
    color: var(--ink); background: none; cursor: none;
    border: 1px solid rgba(242,240,234,.4); border-radius: 999px;
    padding: .85rem 1.7rem;
    transition: background .35s, color .35s, border-color .35s, transform .35s var(--ease);
}
.hpanel-cta:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); transform: translateY(-2px); }

/* indice de scroll sur l'intro */
.hpanel-hint {
    display: flex; align-items: center; gap: 1rem; margin-top: 5vh;
    font-size: .7rem; letter-spacing: .35em; color: var(--ink-dim);
}
.hpanel-hint-arrow { font-size: 1.3rem; color: var(--accent); animation: hintslide 1.6s var(--ease) infinite; }
@keyframes hintslide { 0%,100% { transform: translateX(0); opacity: .4; } 50% { transform: translateX(10px); opacity: 1; } }

/* outro / contact */
.hpanel-mail {
    display: inline-block; color: transparent; -webkit-text-stroke: 2px var(--ink);
    transition: -webkit-text-stroke-color .5s;
}
.hpanel-mail:hover { -webkit-text-stroke-color: var(--accent); }
.hpanel-links { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 5vh; font-size: .95rem; }
.hpanel-links a { border-bottom: 1px solid rgba(242,240,234,.25); padding-bottom: .3rem; transition: color .3s, border-color .3s; }
.hpanel-links a:hover { color: var(--accent); border-color: var(--accent); }

/* ── UI : compteur + nom de scène + barre de progression ── */
.hgal-ui {
    position: fixed; left: 6vw; right: 6vw; bottom: 4vh; z-index: 50;
    display: flex; align-items: center; gap: 1.5rem;
    pointer-events: none; mix-blend-mode: difference;
}
.hgal-counter { font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .2em; }
.hgal-now { font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; color: var(--ink-dim); }
.hgal-bar { flex: 1; height: 2px; background: rgba(242,240,234,.18); border-radius: 2px; overflow: hidden; }
.hgal-bar-fill { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* ── MOBILE : swipe horizontal natif avec snap ── */
@media (max-width: 760px) {
    .hgal-track {
        width: auto; height: auto;
        overflow-x: auto; -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .hgal-track::-webkit-scrollbar { display: none; }
    .hpanel { scroll-snap-align: start; height: 100svh; }
    .hpanel-content { padding: 0 7vw 14vh; }
    .hpanel-veil { background:
        linear-gradient(180deg, rgba(7,7,11,.35) 0%, transparent 30%, rgba(7,7,11,.88)); }
    .hgal-ui { left: 5vw; right: 5vw; gap: 1rem; }
    .hgal-now { display: none; }
}

/* ═══ LIGHTBOX ═══ */
.lightbox {
    position: fixed; inset: 0; z-index: 1100;
    display: flex; align-items: center; justify-content: center;
    background: rgba(5, 5, 8, .94);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden;
    transition: opacity .45s var(--ease), visibility .45s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-stage {
    max-width: 86vw; max-height: 82vh;
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.lb-stage img {
    max-width: 86vw; max-height: 76vh; object-fit: contain;
    border-radius: 10px; box-shadow: 0 40px 100px rgba(0,0,0,.6);
}
.lb-stage figcaption {
    font-family: var(--font-display); font-weight: 600;
    font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-dim);
}
.lb-close, .lb-nav {
    position: fixed; z-index: 1101;
    background: none; border: 1px solid rgba(242,240,234,.25);
    color: var(--ink); cursor: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: color .3s, border-color .3s, background .3s, transform .3s var(--ease);
}
.lb-close { top: 4vh; right: 4vw; width: 54px; height: 54px; font-size: 1.8rem; line-height: 1; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 60px; height: 60px; font-size: 1.5rem; }
.lb-prev { left: 4vw; }
.lb-next { right: 4vw; }
.lb-close:hover, .lb-nav:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { transform: translateY(-50%) translateX(3px); }

@media (max-width: 760px) {
    .lb-close { top: 2.5vh; right: 4vw; width: 46px; height: 46px; }
}

/* ═══ ACCESSIBILITÉ ═══ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    body, a { cursor: auto; }
    .cursor, .grain { display: none; }
    .about-text .w { opacity: 1; }
}
