/* =========================================================================
   SOFIA KISELEVA — PORTFOLIO "FILM"
   Mise en page de base (lisible sans animation) + mode .motion (scènes plein écran)
   ========================================================================= */

:root {
  color-scheme: dark;
  --bg: #050b1f;
  --bg-2: #0a1430;
  --bg-3: #101d42;
  --ink: #eef3ff;
  --ink-2: #b8c4e0;
  --muted: #7d8bb0;
  --line: rgba(238, 243, 255, 0.14);
  --line-2: rgba(238, 243, 255, 0.28);
  --accent: #2a62f5;
  --accent-2: #8cc8ff;
  --accent-ink: #ffffff;
  --accent-grad: linear-gradient(135deg, #3a74ff 0%, #2a62f5 45%, #1a3fb0 100%);
  --rec: #ff4d5e;

  --f-display: 'Instrument Serif', 'Times New Roman', serif;
  --f-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: clamp(16px, 5vw, 72px);
  --hud-h: 64px;
  --radius: 18px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 300;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Bloc de langue affiché/masqué selon html[lang] */
html[lang="fr"] .only-en, html[lang="en"] .only-fr { display: none !important; }

/* ---------- Habillage pellicule ---------- */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at 85% -5%, rgba(42, 98, 245, .28), transparent 65%),
    radial-gradient(50vmax 40vmax at -10% 105%, rgba(30, 70, 200, .22), transparent 65%),
    radial-gradient(40vmax 30vmax at 50% 50%, rgba(140, 200, 255, .05), transparent 70%);
}
.grain {
  position: fixed; inset: -50%; z-index: 150; pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); } 80% { transform: translate(5%, 4%); } 100% { transform: translate(0, 0); }
}
.vignette {
  position: fixed; inset: 0; z-index: 140; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 3, 15, .6) 100%);
}
.cut-flash { position: fixed; inset: 0; z-index: 260; background: var(--ink); opacity: 0; pointer-events: none; }

/* ---------- Loader (amorce) ---------- */
.loader { display: none; }
.motion .loader {
  position: fixed; inset: 0; z-index: 250; display: grid; place-items: center;
  background: #040919;
}
.leader { position: relative; width: min(56vmin, 360px); aspect-ratio: 1; display: grid; place-items: center; }
.leader-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--line-2);
  box-shadow: inset 0 0 0 14px rgba(238, 243, 255, .03), 0 0 0 1px var(--line);
}
.leader-ring::after { content: ''; position: absolute; inset: 18%; border-radius: 50%; border: 1px solid var(--line); }
.leader-cross::before, .leader-cross::after { content: ''; position: absolute; background: var(--line); }
.leader-cross::before { left: -20%; right: -20%; top: 50%; height: 1px; }
.leader-cross::after { top: -20%; bottom: -20%; left: 50%; width: 1px; }
.leader-cross { position: absolute; inset: 0; }
.leader-hand {
  position: absolute; left: 50%; top: 50%; width: 50%; height: 50%; transform-origin: 0 0;
  background: conic-gradient(from 0deg at 0 0, rgba(238, 243, 255, .14), transparent 25%);
  border-radius: 0 0 100% 0;
}
.leader-num { position: relative; font-family: var(--f-display); font-size: min(30vmin, 200px); line-height: 1; color: var(--ink); }
.loader-actions {
  position: absolute; left: 0; right: 0; bottom: 32px; padding: 0 16px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.loader-skip, .loader-simple {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding: 10px 16px; border: 1px solid var(--line); border-radius: 99px;
  transition: color .2s, border-color .2s;
}
.loader-skip:hover, .loader-simple:hover { color: var(--ink); border-color: var(--line-2); }
.loader-simple { color: var(--accent-2); border-color: rgba(140, 200, 255, .4); }

/* ---------- HUD haut ---------- */
.hud-top {
  position: fixed; inset: 0 0 auto; z-index: 60; height: var(--hud-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(5, 11, 31, .85), rgba(5, 11, 31, 0));
  pointer-events: none;
}
.hud-top > * { pointer-events: auto; }
.hud-rec { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 12px var(--rec); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }
.rec-label { color: var(--rec); font-weight: 500; }
.hud-file { color: var(--muted); }
.hud-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  position: relative; display: flex; padding: 3px; border-radius: 99px;
  border: 1px solid var(--line-2); background: rgba(5, 11, 31, .6); backdrop-filter: blur(8px);
}
.lang-switch button {
  position: relative; z-index: 1; min-width: 44px; height: 32px; border-radius: 99px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; color: var(--muted);
  transition: color .3s;
}
.lang-switch button[aria-pressed="true"] { color: var(--bg); }
.lang-pill {
  position: absolute; z-index: 0; top: 3px; left: 3px; width: 44px; height: 32px; border-radius: 99px;
  background: var(--ink); transition: transform .45s var(--ease-out);
}
html[lang="en"] .lang-pill { transform: translateX(44px); }

.hud-cv {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
  border-radius: 99px; border: 1px solid var(--line-2); background: rgba(5, 11, 31, .6); backdrop-filter: blur(8px);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-decoration: none;
  transition: background .25s, color .25s, border-color .25s;
}
.hud-cv svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hud-cv:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Lecteur (HUD bas) ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  height: var(--hud-h); padding: 0 var(--gutter);
  background: linear-gradient(to top, rgba(5, 11, 31, .9), rgba(5, 11, 31, 0));
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em;
}
.pl-play {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); transition: background .25s, color .25s, border-color .25s;
}
.pl-play svg { width: 16px; height: 16px; fill: currentColor; }
.pl-play .i-pause { display: none; }
.pl-play.is-playing .i-play { display: none; }
.pl-play.is-playing .i-pause { display: block; }
.pl-play:hover, .pl-play.is-playing { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pl-speed {
  flex: none; min-width: 48px; height: 32px; padding: 0 8px; border-radius: 99px; border: 1px solid var(--line-2);
  font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums;
  transition: color .2s, border-color .2s, background .2s;
}
.pl-speed:hover { color: var(--ink); border-color: rgba(140, 200, 255, .6); }
.pl-speed.is-changed { color: var(--accent-2); border-color: rgba(140, 200, 255, .5); background: rgba(42, 98, 245, .15); }
.pl-time { flex: none; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pl-sep { margin: 0 6px; color: var(--muted); }
.pl-dur { color: var(--muted); }
.pl-bar { position: relative; flex: 1; height: 28px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.pl-track { position: relative; width: 100%; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; transition: height .2s; }
.pl-bar:hover .pl-track { height: 5px; }
.pl-progress { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.pl-thumb {
  position: absolute; left: 0; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 4px rgba(61, 123, 255, .25); pointer-events: none;
}
.pl-markers { position: absolute; inset: 0; pointer-events: none; }
.pl-marker {
  position: absolute; top: 50%; width: 14px; height: 22px; margin: -11px 0 0 -7px; pointer-events: auto;
  display: grid; place-items: center;
}
.pl-marker::before { content: ''; width: 2px; height: 9px; background: var(--ink-2); border-radius: 2px; }
.pl-marker span {
  position: absolute; bottom: 26px; left: 50%; transform: translate(-50%, 4px); white-space: nowrap;
  padding: 5px 9px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 11px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.pl-marker:hover span, .pl-marker:focus-visible span { opacity: 1; transform: translate(-50%, 0); }
.pl-chapter { flex: none; min-width: 112px; text-align: right; color: var(--accent-2); text-transform: uppercase; letter-spacing: .14em; }

.rewind-badge {
  position: fixed; top: 50%; left: 50%; z-index: 70; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 99px;
  background: rgba(5, 11, 31, .75); border: 1px solid var(--line-2); backdrop-filter: blur(10px);
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.rewind-badge svg { width: 20px; height: 20px; fill: var(--accent); }
.rewind-badge.on { opacity: 1; }

/* ---------- Éléments communs ---------- */
.scene { position: relative; padding: calc(var(--hud-h) + 8vh) var(--gutter) 10vh; }

.chapter-tag {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2);
}
.chapter-tag .ch-num { color: var(--accent-2); padding: 4px 8px; border: 1px solid rgba(61, 123, 255, .45); border-radius: 4px; }

.scene-title {
  font-family: var(--f-display); font-weight: 400; line-height: .95;
  font-size: clamp(3rem, 8vw, 7.5rem); letter-spacing: -.01em; margin-top: 18px;
}
.scene-lead { color: var(--ink-2); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 40ch; margin-top: 18px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .04em;
  padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2);
}

/* =========================================================================
   SCÈNE 0 · HERO
   ========================================================================= */
.hero-inner { display: flex; flex-direction: column; gap: 28px; }
.hero-kicker { font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.hero-name { font-family: var(--f-display); font-weight: 400; line-height: .82; letter-spacing: -.02em; font-size: clamp(4.5rem, 17vw, 17rem); }
.motion .hero-name { font-size: min(16vw, 23vh); }
.hero-line { display: block; }
.hero-line.l2 { font-style: italic; color: var(--accent-2); }
.hero-line .ch { display: inline-block; will-change: transform; }
.hero-frame { width: 100%; max-width: 760px; aspect-ratio: 2.14; border-radius: var(--radius); overflow: hidden; background: var(--bg-3); }
.hero-frame { aspect-ratio: auto; }
/* Écran (remplace la photo) : monogramme puis terminal */
.hero-screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(58, 116, 255, .55), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(26, 63, 176, .6), transparent 65%),
    linear-gradient(160deg, #0d1b46, #060d26);
}
.hero-screen::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(238, 243, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(238, 243, 255, .06) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 80%);
          mask-image: radial-gradient(circle at 50% 40%, #000, transparent 80%);
}
.hs-mono {
  display: none; position: absolute; inset: 0; align-items: center; justify-content: center;
  font-family: var(--f-display); line-height: 1; letter-spacing: -.04em; color: var(--ink);
  font-size: 11vmin; font-size: 46cqmin;
}
.hs-mono em { color: var(--accent-2); }
.hs-term { position: relative; display: grid; gap: .3em; padding: clamp(18px, 3vw, 36px); font-family: var(--f-mono); font-size: clamp(12px, 1.2vw, 17px); line-height: 1.55; }
.hs-bar { display: flex; align-items: center; gap: 7px; margin-bottom: .7em; color: var(--muted); font-size: .78em; }
.hs-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(238, 243, 255, .22); }
.hs-bar span { margin-left: 8px; }
.hs-prompt { color: var(--accent-2); }
.hs-type { display: inline-block; vertical-align: bottom; }
.hs-line.out { color: var(--ink-2); padding-bottom: .35em; }
.hs-line.hs-accent { color: #fff; font-weight: 500; }
.hs-caret { display: inline-block; width: .55em; height: 1.05em; margin-left: .25em; vertical-align: text-bottom; background: var(--accent-2); animation: blink 1s steps(2) infinite; }
.motion .hero-frame { container-type: size; }
.motion .hs-mono { display: flex; }
.motion .hs-term { font-size: clamp(12px, 1.45vw, 20px); }
.motion .hs-term { visibility: hidden; opacity: 0; }
.subtitles { display: grid; gap: 6px; }
.sub { font-weight: 600; font-size: clamp(1rem, 1.8vw, 1.45rem); color: #fff; }
.scroll-hint { display: none; }

.motion .hero { height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
.motion .hero-inner { position: relative; height: 100%; display: block; }
.motion .hero-kicker { position: absolute; top: calc(var(--hud-h) + 3vh); left: 0; right: 0; text-align: center; padding: 0 var(--gutter); }
.motion .hero-name {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gutter); gap: 20vmin;
}
.motion .hero-line { overflow: hidden; padding: .06em .04em .1em; margin: -.06em 0 -.1em; }
.motion .hero-line.l1 { align-self: flex-start; }
.motion .hero-line.l2 { align-self: flex-end; }
.motion .hero-frame-wrap { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2; }
.motion .hero-frame {
  width: 26vmin; height: 26vmin; max-width: none; aspect-ratio: auto; border-radius: 50%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.motion .subtitles { position: absolute; left: 0; right: 0; bottom: calc(var(--hud-h) + 7vh); z-index: 3; display: block; text-align: center; padding: 0 var(--gutter); }
.motion .sub {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0;
  visibility: hidden; text-shadow: 0 2px 12px rgba(0, 0, 0, .85), 0 0 2px #000;
}
.motion .hero-ui { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.motion .scroll-hint {
  position: absolute; bottom: calc(var(--hud-h) + 3vh); left: 0; right: 0; margin: 0 auto; width: max-content;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.scroll-hint i { width: 1px; height: 42px; background: linear-gradient(var(--ink), transparent); animation: drip 1.8s var(--ease-out) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* =========================================================================
   SCÈNE 1 · QUI JE SUIS
   ========================================================================= */
.about-inner { display: flex; flex-direction: column; gap: 32px; }
.about-stage { display: flex; flex-direction: column; gap: 48px; }
.about-text {
  font-family: var(--f-display); font-weight: 400; line-height: 1.12; letter-spacing: -.005em;
  font-size: clamp(1.75rem, 3.9vw, 3.6rem); max-width: 26ch;
}
.about-text .w { display: inline; }
.about-text .em { font-style: italic; color: var(--accent-2); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 1100px; }
.fact {
  padding: 24px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--bg-3), var(--bg-2));
}
.fact-title { font-family: var(--f-mono); font-weight: 400; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.fact-big { font-family: var(--f-display); font-size: clamp(1.8rem, 2.6vw, 2.4rem); line-height: 1.05; }
.fact-sub { color: var(--ink-2); margin-top: 8px; font-size: 14px; }
.fact-accent { background: var(--accent-grad); border-color: var(--accent); color: var(--accent-ink); }
.fact-accent .fact-title, .fact-accent .fact-sub { color: rgba(255, 255, 255, .8); }
.langs { display: grid; gap: 14px; }
.langs li { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: baseline; }
.lang-name { font-weight: 600; }
.lang-lvl { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-2); }
.lang-bar { grid-column: 1 / -1; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.lang-bar i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--accent-2); transform-origin: 0 50%; border-radius: 3px; }

.motion .about { height: 100vh; height: 100svh; padding-bottom: calc(var(--hud-h) + 4vh); }
.motion .about-inner { height: 100%; gap: 0; }
.motion .about-stage { position: relative; flex: 1; display: block; }
.motion .about-texts { position: absolute; inset: 0; display: flex; align-items: center; }
.motion .facts { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); perspective: 900px; }

/* =========================================================================
   SCÈNE 2 · PARCOURS (timeline horizontale)
   ========================================================================= */
.journey { --line-y: 50%; }
.journey-year, .film-holes, .journey-line { display: none; }
.journey-track { display: grid; gap: 20px; }
.journey-intro { margin-bottom: 24px; }
.journey-hint { display: none; }

.tl-card {
  position: relative; padding: 22px 22px 24px; border-radius: var(--radius);
  background: linear-gradient(165deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line);
  max-width: 520px;
}
.tl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.tl-date { font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); letter-spacing: .04em; }
.tl-type {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.tl-item[data-type="exp"] .tl-type { color: var(--accent-2); border-color: rgba(140, 200, 255, .45); }
.tl-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 2.2vw, 2.1rem); line-height: 1.05; }
.tl-org { color: var(--accent-2); font-size: 14px; font-weight: 600; margin-top: 8px; }
.tl-points { margin-top: 14px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; }
.tl-points li { position: relative; padding-left: 16px; }
.tl-points li::before { content: ''; position: absolute; left: 0; top: .62em; width: 6px; height: 1px; background: var(--accent); }
.tl-dot { display: none; }
.tl-item[data-type="next"] .tl-card { background: var(--accent-grad); border-color: var(--accent); color: var(--accent-ink); }
.tl-item[data-type="next"] .tl-date, .tl-item[data-type="next"] .tl-org { color: var(--accent-ink); }
.tl-item[data-type="next"] .tl-type { color: var(--accent-ink); border-color: rgba(255, 255, 255, .45); }
.tl-cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 10px 16px; border-radius: 99px;
  background: #fff; color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: none;
  transition: transform .25s var(--ease-out);
}
.tl-cta:hover { transform: translateX(4px); }

.motion .journey { height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
.motion .journey-year {
  display: block; position: absolute; left: 50%; top: 50%;
  font-family: var(--f-display); font-style: italic; line-height: 1; white-space: nowrap;
  font-size: clamp(10rem, 38vw, 34rem); color: transparent; -webkit-text-stroke: 1px rgba(238, 243, 255, .09);
  pointer-events: none; user-select: none;
}
.motion .film-holes {
  display: block; position: absolute; left: 0; right: 0; height: 18px; opacity: .5;
  background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(238, 243, 255, .12) 14px 30px, transparent 30px 44px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.motion .film-holes.top { top: calc(var(--hud-h) + 4px); }
.motion .film-holes.bottom { bottom: calc(var(--hud-h) + 4px); }
.motion .journey-line {
  display: block; position: absolute; left: 0; right: 0; top: var(--line-y); height: 1px; background: var(--line);
}
.journey-line-fill { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 10px var(--accent); }
.motion .journey-track {
  position: relative; display: flex; align-items: stretch; height: 100%; width: max-content;
  padding: 0 var(--gutter); gap: 0; will-change: transform;
}
.motion .journey-intro {
  flex: none; width: min(560px, 82vw); margin: 0 6vw 0 0; display: flex; flex-direction: column; justify-content: center;
  padding-bottom: 8vh;
}
.motion .journey-hint { display: block; margin-top: 28px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.motion .tl-item { position: relative; flex: none; width: 250px; height: 100%; }
.motion .tl-item:last-child { width: 520px; }
.motion .tl-card { position: absolute; left: 0; width: 360px; }
.motion .tl-item.up .tl-card { bottom: calc(100% - var(--line-y) + 38px); }
.motion .tl-item.down .tl-card { top: calc(var(--line-y) + 38px); }
.motion .tl-dot {
  display: block; position: absolute; left: 24px; top: var(--line-y); width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 0 6px rgba(61, 123, 255, .15);
}
.motion .tl-dot::after {
  content: ''; position: absolute; left: 50%; width: 1px; height: 26px; background: var(--line-2); transform: translateX(-50%);
}
.motion .tl-item.up .tl-dot::after { bottom: 100%; margin-bottom: 5px; }
.motion .tl-item.down .tl-dot::after { top: 100%; margin-top: 5px; }
.motion .tl-item[data-type="next"] .tl-dot { background: var(--accent); }

/* =========================================================================
   SCÈNE 3 · COMPÉTENCES (tunnel)
   ========================================================================= */
.warp { display: none; }
.skills-head { margin-bottom: 32px; }
.skills-lead { font-family: var(--f-display); font-style: italic; font-size: clamp(2.2rem, 5vw, 4rem); margin-top: 14px; line-height: 1; }
.skills-stage { display: grid; gap: 28px; }
.skill-item { display: grid; gap: 14px; }
.skill-cat { font-family: var(--f-display); font-size: clamp(2rem, 6vw, 4rem); line-height: 1; }
.skill-num { font-family: var(--f-mono); font-size: 12px; color: var(--accent-2); letter-spacing: .14em; display: block; margin-bottom: 6px; }
.skill-techs { display: flex; flex-wrap: wrap; gap: 10px; }
.tech {
  font-family: var(--f-mono); font-size: 13px; padding: 8px 14px; border-radius: 99px;
  border: 1px solid var(--line-2); background: rgba(5, 11, 31, .55); backdrop-filter: blur(6px);
}
.skills-counter { display: none; }

.motion .skills { height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
.motion .warp { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.motion .skills-head { position: absolute; top: calc(var(--hud-h) + 3vh); left: var(--gutter); right: var(--gutter); margin: 0; z-index: 2; }
.motion .skills-lead { font-size: clamp(1.4rem, 2.4vw, 2rem); color: var(--ink-2); }
.motion .skills-stage { position: absolute; inset: 0; display: block; }
.motion .skill-item {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 var(--gutter); visibility: hidden; will-change: transform, opacity;
}
.motion .skill-cat { font-size: clamp(3rem, 10vw, 9.5rem); letter-spacing: -.02em; }
.motion .skill-item:nth-child(even) .skill-cat { font-style: italic; color: var(--accent-2); }
.motion .skill-techs { justify-content: center; max-width: 760px; margin-top: 18px; }
.motion .skills-counter {
  display: block; position: absolute; right: var(--gutter); bottom: calc(var(--hud-h) + 3vh); z-index: 2;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; color: var(--muted);
}
.skills-counter .sc-cur { color: var(--ink); }

/* =========================================================================
   SCÈNE 4 · PROJETS (deck + pop-up)
   ========================================================================= */
.projects-head { margin-bottom: 40px; }
.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.p-card { display: block; width: 100%; text-align: left; border-radius: 22px; }
.p-card-inner {
  position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px; border: 1px solid var(--line-2); background: var(--bg-2);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
  transition: transform .5s var(--ease-out), border-color .3s;
}
.p-card:hover .p-card-inner, .p-card:focus-visible .p-card-inner { transform: translateY(-12px); border-color: rgba(238, 243, 255, .5); }
.p-art {
  position: relative; flex: 1; min-height: 170px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 10%, hsl(var(--h) 85% 62% / .9), transparent 60%),
    radial-gradient(90% 80% at 10% 100%, hsl(calc(var(--h) + 40) 70% 40% / .9), transparent 65%),
    hsl(var(--h) 30% 12%);
}
.p-art::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}
.p-num {
  position: absolute; left: 18px; top: 14px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em;
  color: rgba(255, 255, 255, .85);
}
.p-icon { position: absolute; right: 18px; bottom: 16px; width: 64px; height: 64px; color: #fff; opacity: .95; }
.p-icon svg, .modal-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.p-big {
  position: absolute; left: 12px; bottom: -.18em; font-family: var(--f-display); font-style: italic; line-height: 1;
  font-size: 9rem; color: rgba(255, 255, 255, .16);
}
.p-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.p-kicker { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.p-title { font-family: var(--f-display); font-weight: 400; font-size: 1.9rem; line-height: 1.02; }
.p-short { color: var(--ink-2); font-size: 14px; }
.p-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-weight: 600; font-size: 14px; color: var(--accent-2); }
.p-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .3s var(--ease-out); }
.p-card:hover .p-more svg { transform: translateX(4px); }
.projects-index { display: none; }
.p-group {
  grid-column: 1 / -1; margin-top: 24px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2);
}
.p-group:first-child { margin-top: 0; }
.motion .p-group { display: none; }
.pi-num { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.projects-index button[aria-current="true"] .pi-num { color: var(--accent-2); }

.motion .projects { height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
.motion .projects-head {
  position: absolute; top: calc(var(--hud-h) + 2vh); left: var(--gutter); right: var(--gutter); z-index: 2; margin: 0;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 32px; pointer-events: none;
}
.motion .projects-head .chapter-tag { width: 100%; }
.motion .projects-head .scene-title { font-size: clamp(2.6rem, 6vw, 5.5rem); margin-top: 10px; }
.motion .projects-head .scene-lead { margin: 0 0 .6em; }
/* Le deck occupe l'espace entre l'en-tête de scène et le lecteur ; les cartes y sont centrées (margin auto) */
.motion .deck { position: absolute; left: 0; right: 0; top: calc(var(--hud-h) + 120px); bottom: calc(var(--hud-h) + 8px); display: block; }
.motion .p-card {
  position: absolute; inset: 0; margin: auto;
  width: min(400px, 78vw); height: min(520px, calc(100% - 24px));
  will-change: transform;
}

/* ---------- Pop-up ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 20, .78); backdrop-filter: blur(10px); }
.modal-panel {
  position: relative; width: min(860px, 100%); max-height: min(88vh, 100%); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 24px; background: var(--bg-2); border: 1px solid var(--line-2);
  box-shadow: 0 50px 120px rgba(0, 0, 0, .6);
}
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(5, 11, 31, .55); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(6px);
  transition: transform .3s var(--ease-out), background .2s;
}
.modal-close:hover { transform: rotate(90deg); background: var(--ink); color: var(--bg); }
.modal-close svg, .modal-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.modal-art {
  position: relative; height: clamp(160px, 26vh, 240px); overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 10%, hsl(var(--h) 85% 62% / .9), transparent 60%),
    radial-gradient(90% 80% at 10% 100%, hsl(calc(var(--h) + 40) 70% 40% / .9), transparent 65%),
    hsl(var(--h) 30% 12%);
}
.modal-num { position: absolute; left: 24px; bottom: -.2em; font-family: var(--f-display); font-style: italic; font-size: clamp(7rem, 16vw, 11rem); line-height: 1; color: rgba(255, 255, 255, .18); }
.modal-icon { position: absolute; right: 28px; bottom: 24px; width: 80px; height: 80px; color: #fff; }
.modal-body { padding: clamp(22px, 4vw, 40px); display: grid; gap: 14px; }
.modal-kicker { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.modal-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; }
.modal-lead { color: var(--ink-2); font-size: 1.05rem; max-width: 60ch; }
.modal-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 10px 0 6px; }
.modal-meta > div { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-3); }
.modal-meta dt { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.modal-meta dd { font-size: 14px; }
.modal-body h4 { font-family: var(--f-mono); font-weight: 400; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.m-did { display: grid; gap: 8px; }
.m-did li { position: relative; padding-left: 22px; }
.m-did li::before { content: ''; position: absolute; left: 0; top: .7em; width: 10px; height: 1px; background: var(--accent); }
.m-learned { font-family: var(--f-display); font-style: italic; font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.25; color: var(--ink); }
.modal-nav {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px clamp(16px, 4vw, 40px); background: linear-gradient(to top, var(--bg-2) 70%, transparent);
  font-family: var(--f-mono); font-size: 12px; color: var(--muted);
}
.modal-nav button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); transition: background .2s, color .2s; }
.modal-nav button:hover { background: var(--ink); color: var(--bg); }

/* =========================================================================
   SCÈNE 5 · CONTACT
   ========================================================================= */
.contact { min-height: 100vh; display: flex; align-items: center; }
.contact-inner { width: 100%; max-width: 1200px; margin: 0 auto; }
.contact-title { font-family: var(--f-display); font-weight: 400; line-height: .95; font-size: clamp(3rem, 9vw, 8.5rem); margin-top: 20px; letter-spacing: -.015em; }
.ct-mask { display: block; overflow: hidden; padding-bottom: .08em; }
.ct-line { display: block; }
.ct-line.em { font-style: italic; color: var(--accent-2); }
.contact-lead { color: var(--ink-2); max-width: 52ch; margin-top: 24px; font-size: clamp(1rem, 1.3vw, 1.15rem); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 48px; border-top: 1px solid var(--line); }
.c-item {
  position: relative; display: grid; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) {
  .c-item { padding: 26px 24px 26px 0; }
  .c-item + .c-item { padding-left: 24px; border-left: 1px solid var(--line); }
}
.c-label { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.c-value { font-size: clamp(1.05rem, 1.6vw, 1.3rem); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
a.c-value { background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat; transition: background-size .4s var(--ease-out); justify-self: start; }
a.c-value:hover { background-size: 100% 1px; }
.c-copy {
  justify-self: start; margin-top: 4px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2); transition: background .2s, color .2s;
}
.c-copy:hover { background: var(--ink); color: var(--bg); }
.btn-cv {
  display: inline-flex; align-items: center; gap: 16px; margin-top: 44px; padding: 14px 26px 14px 14px; border-radius: 99px;
  background: var(--accent-grad); color: var(--accent-ink); text-decoration: none;
  transition: transform .4s var(--ease-out), box-shadow .4s;
  box-shadow: 0 16px 40px -12px rgba(61, 123, 255, .6);
}
.btn-cv:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 22px 50px -12px rgba(61, 123, 255, .8); }
.btn-cv-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-ink); color: var(--accent); }
.btn-cv-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-cv:hover .btn-cv-icon svg { animation: bounce .8s var(--ease-out) infinite; }
@keyframes bounce { 50% { transform: translateY(3px); } }
.btn-cv-text { display: grid; line-height: 1.2; }
.btn-cv-text strong { font-size: 1.05rem; }
.btn-cv-text small { font-family: var(--f-mono); font-size: 11px; opacity: .75; letter-spacing: .06em; }

/* =========================================================================
   SCÈNE 6 · GÉNÉRIQUE DE FIN
   ========================================================================= */
.credits { text-align: center; padding-bottom: calc(var(--hud-h) + 8vh); }
.credits-roll { display: grid; gap: 56px; padding: 10vh 0; }
.cr-block { display: grid; gap: 6px; }
.cr-role { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.cr-name { font-family: var(--f-display); font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.1; }
.cr-name.big { font-size: clamp(2.6rem, 6vw, 5rem); font-style: italic; color: var(--accent-2); }
.credits-end { display: grid; justify-items: center; gap: 10px; padding-top: 6vh; }
.cr-fin { font-family: var(--f-display); font-style: italic; font-size: clamp(5rem, 16vw, 13rem); line-height: .9; }
.cr-tbc { font-family: var(--f-mono); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.cr-rewind {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; padding: 12px 20px; border-radius: 99px;
  border: 1px solid var(--line-2); font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  transition: background .25s, color .25s;
}
.cr-rewind svg { width: 18px; height: 18px; fill: currentColor; }
.cr-rewind:hover { background: var(--ink); color: var(--bg); }
.cr-copy { margin-top: 24px; font-size: 12px; color: var(--muted); }

.motion .credits { height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
.motion .credits-roll { position: absolute; left: 0; right: 0; top: 0; padding: 0 var(--gutter); will-change: transform; }
.motion .credits-end { position: absolute; inset: 0; align-content: center; padding: 0 var(--gutter) var(--hud-h); }

/* ---------- Toast & curseur ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--hud-h) + 16px); z-index: 120; transform: translate(-50%, 20px);
  padding: 10px 16px; border-radius: 99px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease-out);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .motion.has-cursor .cursor {
    position: fixed; left: 0; top: 0; z-index: 280; display: grid; place-items: center;
    width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
    background: var(--ink); mix-blend-mode: difference; pointer-events: none;
    transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background .3s;
  }
  .motion.has-cursor .cursor.is-hover { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .motion.has-cursor .cursor.is-label {
    width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--accent); mix-blend-mode: normal;
  }
  .cursor-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); opacity: 0; transition: opacity .2s; }
  .cursor.is-label .cursor-label { opacity: 1; }
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 759.98px) {
  :root { --hud-h: 56px; }
  .hud-file { display: none; }
  .player { gap: 10px; }
  .pl-time .pl-sep, .pl-time .pl-dur { display: none; }
  .pl-chapter { display: none; }

  .motion .hero-name { font-size: 23vw; gap: 46vmin; }
  .motion .hero-frame { width: 42vmin; height: 42vmin; }
  .motion .facts { gap: 10px; }
  .fact { padding: 16px 18px; }
  .fact-title { margin-bottom: 8px; }
  .fact-big { font-size: 1.5rem; }
  .langs { gap: 8px; }

  .journey { --line-y: 30%; }
  .motion .tl-item, .motion .tl-item:last-child { width: 84vw; }
  .motion .tl-card { width: 76vw; }
  .motion .tl-item.up .tl-card { bottom: auto; top: calc(var(--line-y) + 38px); }
  .motion .tl-item.up .tl-dot::after { bottom: auto; top: 100%; margin: 5px 0 0; }
  .motion .journey-intro { padding-bottom: 0; }

  .motion .projects-head .scene-lead { display: none; }
  .motion .deck { top: calc(var(--hud-h) + 116px); bottom: calc(var(--hud-h) + 52px); }
  .motion .p-card { height: min(460px, calc(100% - 16px)); }
}

@media (min-width: 1000px) {
  .motion .deck { left: calc(var(--gutter) + 300px); }
  .motion .projects-index {
    display: flex; flex-direction: column; gap: 1px; position: absolute; z-index: 3;
    left: var(--gutter); width: 280px; top: calc(var(--hud-h) + 130px); bottom: calc(var(--hud-h) + 12px);
    overflow-y: auto; scrollbar-width: none;
  }
  .motion .projects-index::-webkit-scrollbar { display: none; }
  .motion .projects-index > :first-child { margin-top: auto; }
  .motion .projects-index > :last-child { margin-bottom: auto; }
  .projects-index .pi-group {
    margin: 12px 0 4px; padding-left: 10px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  }
  .projects-index .pi-group:first-child { margin-top: auto; }
  .projects-index button {
    display: flex; align-items: baseline; gap: 10px; padding: 5px 10px; border-radius: 8px; text-align: left;
    font-size: 13.5px; color: var(--ink-2); transition: background .2s, color .2s;
  }
  .projects-index button:hover { color: var(--ink); background: rgba(238, 243, 255, .06); }
  .projects-index button[aria-current="true"] { color: var(--ink); background: rgba(42, 98, 245, .3); }
}
@media (max-width: 999.98px) {
  .projects-index .pi-group, .projects-index .pi-num { display: none; }
  .projects-index button[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
  .motion .projects-index {
    display: flex; gap: 8px; position: absolute; left: 0; right: 0; bottom: calc(var(--hud-h) + 10px); z-index: 3;
    padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none;
  }
  .projects-index::-webkit-scrollbar { display: none; }
  .projects-index button {
    flex: none; font-family: var(--f-mono); font-size: 11px; padding: 8px 12px; border-radius: 99px;
    border: 1px solid var(--line-2); background: rgba(5, 11, 31, .7); white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .hud-cv span { display: none; }
  .hud-cv { width: 40px; padding: 0; justify-content: center; }
}

/* ---------- Bouton de mode (film ⇄ rapide) ---------- */
.mode-toggle {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: 99px; border: 1px solid var(--line-2); background: rgba(5, 11, 31, .6); backdrop-filter: blur(8px);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; white-space: nowrap;
  transition: color .25s, border-color .25s, background .25s;
}
.mode-toggle[hidden] { display: none; }
.mode-toggle svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mode-toggle .i-film { display: none; }
.mode-toggle.is-simple .i-bolt { display: none; }
.mode-toggle.is-simple .i-film { display: block; }
.mode-toggle:hover { color: var(--accent-2); border-color: rgba(140, 200, 255, .6); }

.brand, .simple-nav { display: none; }

/* =========================================================================
   MODE RAPIDE — site classique, sans animations
   ========================================================================= */
html:not(.motion) { scroll-behavior: smooth; }
html:not(.motion) .grain,
html:not(.motion) .vignette,
html:not(.motion) .player,
html:not(.motion) .hud-rec { display: none; }

html:not(.motion) .hud-top {
  background: rgba(5, 11, 31, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
html:not(.motion) .brand {
  display: inline-flex; gap: .25em; font-family: var(--f-display); font-size: 1.45rem; line-height: 1; text-decoration: none; white-space: nowrap;
}
.brand em { color: var(--accent-2); }
html:not(.motion) .simple-nav { display: flex; gap: 2px; }
.simple-nav a {
  padding: 8px 12px; border-radius: 99px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: color .2s, background .2s;
}
.simple-nav a:hover { color: var(--ink); background: rgba(238, 243, 255, .06); }
.simple-nav a[aria-current="true"] { color: var(--ink); background: rgba(42, 98, 245, .28); }

html:not(.motion) .scene { padding: 11vh var(--gutter) 3vh; scroll-margin-top: var(--hud-h); }
html:not(.motion) .scene > *, html:not(.motion) .journey-track { max-width: 1200px; margin-left: auto; margin-right: auto; }

/* Hero */
html:not(.motion) .hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-top: calc(var(--hud-h) + 5vh); padding-bottom: 6vh; }
html:not(.motion) .hero-inner {
  width: 100%; display: grid; grid-template-columns: 1.25fr 1fr; grid-template-areas: "ui photo" "name photo" "subs photo";
  align-content: center; align-items: center; column-gap: 5vw; row-gap: 20px;
}
html:not(.motion) .hero-ui { grid-area: ui; align-self: end; }
html:not(.motion) .hero-name { grid-area: name; font-size: clamp(3.4rem, 9vw, 9rem); }
html:not(.motion) .hero-frame-wrap { grid-area: photo; }
html:not(.motion) .subtitles { grid-area: subs; align-self: start; }
html:not(.motion) .hero-frame { max-width: 560px; margin-left: auto; border-radius: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px var(--line); }
html:not(.motion) .sub { color: var(--ink-2); font-weight: 500; font-size: clamp(1.05rem, 1.5vw, 1.3rem); }

/* Parcours : timeline verticale */
html:not(.motion) .journey-track { gap: 0; }
html:not(.motion) .journey-intro { margin-bottom: 40px; }
html:not(.motion) .tl-item { position: relative; padding: 0 0 18px 40px; max-width: 700px; }
html:not(.motion) .tl-item::before {
  content: ''; position: absolute; left: 7px; top: 30px; bottom: -30px; width: 2px;
  background: linear-gradient(var(--accent), rgba(42, 98, 245, .25));
}
html:not(.motion) .tl-item:last-child::before { display: none; }
html:not(.motion) .tl-dot {
  display: block; position: absolute; left: 0; top: 24px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 0 6px rgba(61, 123, 255, .15);
}
html:not(.motion) .tl-item[data-type="next"] .tl-dot { background: var(--accent); }
html:not(.motion) .tl-card { max-width: none; }

/* Compétences : grille */
html:not(.motion) .skills-lead { font-size: clamp(2.2rem, 5vw, 3.6rem); }
html:not(.motion) .skills-stage { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
html:not(.motion) .skill-item {
  align-content: start; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--bg-3), var(--bg-2));
}
html:not(.motion) .skill-cat { font-size: 1.9rem; }
html:not(.motion) .tech { font-size: 12px; padding: 6px 11px; }

/* Projets : grille */
html:not(.motion) .deck { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
html:not(.motion) .p-card { min-height: 360px; }
html:not(.motion) .p-art { min-height: 140px; }

/* Contact & pied de page */
html:not(.motion) .contact { min-height: 0; padding-bottom: 8vh; }
html:not(.motion) .credits-roll,
html:not(.motion) .cr-fin,
html:not(.motion) .cr-tbc { display: none; }
html:not(.motion) .credits { padding: 28px var(--gutter); border-top: 1px solid var(--line); }
html:not(.motion) .credits-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 0; max-width: 1200px; }
html:not(.motion) .cr-rewind, html:not(.motion) .cr-copy { margin: 0; }

@media (max-width: 999.98px) {
  html:not(.motion) { --hud-h: 108px; }
  html:not(.motion) .hud-top { height: auto; min-height: var(--hud-h); flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; row-gap: 6px; }
  html:not(.motion) .simple-nav {
    order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter);
    overflow-x: auto; scrollbar-width: none;
  }
  html:not(.motion) .simple-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 759.98px) {
  .mode-label { display: none; }
  .mode-toggle { width: 40px; padding: 0; justify-content: center; }
  html:not(.motion) .brand { font-size: 1.2rem; }
  html:not(.motion) .hero-inner { grid-template-columns: 1fr; grid-template-areas: "ui" "name" "photo" "subs"; }
  html:not(.motion) .hero-frame { max-width: none; margin: 0; }
  html:not(.motion) .hero-name { font-size: clamp(3.2rem, 17vw, 5.5rem); }
  html:not(.motion) .tl-item { padding-left: 32px; }
  html:not(.motion) .p-card { min-height: 0; }
  html:not(.motion) .credits-end { justify-content: center; text-align: center; }
}
@media (max-width: 360px) {
  .hud-actions { gap: 6px; }
  .lang-switch button { min-width: 38px; }
  .lang-pill { width: 38px; }
  html[lang="en"] .lang-pill { transform: translateX(38px); }
}

/* Frise : sur les écrans peu hauts (≥ 760 px de large), cartes plus larges donc moins hautes */
@media (max-height: 820px) and (min-width: 760px) {
  .motion .tl-card { width: 430px; padding: 16px 18px 18px; }
  .motion .tl-item.up .tl-card { bottom: calc(100% - var(--line-y) + 30px); }
  .motion .tl-item.down .tl-card { top: calc(var(--line-y) + 30px); }
  .motion .tl-title { font-size: 1.5rem; }
  .motion .tl-points { margin-top: 10px; font-size: 13px; gap: 4px; }
}

/* Écrans peu hauts en mode film (petits portables, tablettes à l'horizontale) */
@media (max-height: 700px) {
  .motion .about-text { font-size: clamp(1.5rem, min(3.6vw, 5.4vh), 3.2rem); }
  .motion .tl-title { font-size: 1.45rem; }
  .motion .tl-card { padding: 16px 18px; }
  .motion .tl-points { margin-top: 8px; font-size: 13px; }
  .motion .skill-cat { font-size: clamp(2.6rem, min(10vw, 14vh), 9rem); }
  .motion .projects-head .scene-title { font-size: clamp(2.2rem, 8vh, 4.5rem); }
  .motion .contact-title { font-size: clamp(2.6rem, min(9vw, 12vh), 8.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .rec-dot, .scroll-hint i { animation: none; }
  * { transition-duration: .01ms !important; }
}
