/* ==========================================================================
   STUDIO — NOMS À L'ESSAI · version épurée
   Mise en page inchangée ; le décor s'efface pour laisser la place aux médias.
   Deux thèmes : sombre (défaut) et clair, via data-theme sur <html>.
   ========================================================================== */
:root {
  /* Sombre */
  --bg: #0B0F17;
  --bg-2: #10151F;
  --surface: #161C28;
  --fg: #EEF1F6;
  --muted: #8C97AB;
  --line: rgba(238, 241, 246, .10);
  --line-strong: rgba(238, 241, 246, .24);
  --accent: #4361EE;          /* bleu roi */
  --accent-hover: #5A75F2;
  --accent-text: #8EA2FF;     /* bleu lisible en texte sur fond sombre */
  --on-accent: #FFFFFF;
  --header-bg: rgba(11, 15, 23, .82);
  --switch-bg: #06090F;
  --placeholder: #1A2130;
  --placeholder-fg: rgba(238, 241, 246, .35);
  --hero-shade-top: rgba(11, 15, 23, .55);
  --hero-shade-bottom: rgba(11, 15, 23, .9);
  color-scheme: dark;

  --f-display: "Figtree", "Avenir Next", Avenir, system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1440px;
  --header-h: 76px;
  --switch-h: 0px;   /* barre des noms à l'essai retirée */
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F4F5F7; --bg-2: #ECEEF2; --surface: #FFFFFF; --fg: #121826; --muted: #5C6678;
    --line: rgba(18, 24, 38, .10); --line-strong: rgba(18, 24, 38, .26);
    --accent: #4361EE; --accent-hover: #3550D6; --accent-text: #2F48C8; --on-accent: #FFFFFF;
    --header-bg: rgba(244, 245, 247, .86); --switch-bg: #E6E8EC;
    --placeholder: #E3E6EB; --placeholder-fg: rgba(18, 24, 38, .38);
    --hero-shade-top: rgba(244, 245, 247, .4); --hero-shade-bottom: rgba(244, 245, 247, .92);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F4F5F7; --bg-2: #ECEEF2; --surface: #FFFFFF; --fg: #121826; --muted: #5C6678;
  --line: rgba(18, 24, 38, .10); --line-strong: rgba(18, 24, 38, .26);
  --accent: #4361EE; --accent-hover: #3550D6; --accent-text: #2F48C8; --on-accent: #FFFFFF;
  --header-bg: rgba(244, 245, 247, .86); --switch-bg: #E6E8EC;
  --placeholder: #E3E6EB; --placeholder-fg: rgba(18, 24, 38, .38);
  --hero-shade-top: rgba(244, 245, 247, .4); --hero-shade-bottom: rgba(244, 245, 247, .92);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--switch-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .35s, color .35s;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: var(--on-accent); padding: 10px 16px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(72px, 8.5vw, 128px); }

/* ---------- Typo ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--f-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.sec-head { display: grid; gap: 14px; margin-bottom: clamp(36px, 4.5vw, 64px); max-width: 60rem; }
.sec-head--split { max-width: none; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; }
.sec-head--reel { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); align-items: end; column-gap: 40px; }
.sec-head--reel .eyebrow { grid-column: 1 / -1; }
.sec-title {
  font-family: var(--f-display); font-weight: 650;
  font-size: clamp(2rem, 4.2vw, 3.9rem); line-height: 1.04; letter-spacing: -.025em;
}
.sec-sub { color: var(--muted); max-width: 40rem; font-size: 1.1rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 50px; padding: 0 26px; border-radius: var(--radius);
  font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; background: none;
  transition: background .25s, border-color .25s, color .25s;
}
.btn > span { display: inline-flex; align-items: center; gap: .6em; }
.btn--coral { background: var(--accent); color: var(--on-accent); }
.btn--coral:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--fg); }
.btn--ghost:hover { border-color: var(--fg); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: .9rem; }
.ico { width: .62em; height: auto; fill: currentColor; }

/* ---------- Sélecteur de nom + thème (essais) ---------- */
.name-switch {
  position: fixed; inset: 0 0 auto; z-index: 95; height: var(--switch-h);
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 18px;
  background: var(--switch-bg); border-bottom: 1px solid var(--line);
  transition: background .35s;
}
.ns-label { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ns-options { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ns-options::-webkit-scrollbar { display: none; }
.ns-options button {
  flex: 0 0 auto; height: 58px; padding: 0 22px; cursor: pointer; border-radius: var(--radius);
  display: grid; place-items: center; background: transparent; border: 1px solid var(--line);
  transition: border-color .25s, background .25s;
}
.ns-options img { height: 34px; width: auto; opacity: .45; transition: opacity .25s; }
.ns-options button:hover img { opacity: .8; }
.ns-options button[aria-pressed="true"] { border-color: var(--accent); background: var(--bg); }
.ns-options button[aria-pressed="true"] img { opacity: 1; }
.theme-toggle { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; flex: 0 0 auto; position: relative; z-index: 2; }
.site-header .theme-toggle { margin-left: 4px; }
.site-header .nav { margin-left: auto; }
.site-header .theme-toggle button span { display: none; }
.site-header .theme-toggle button { padding: 7px 9px; }
.theme-toggle button {
  border: 0; background: none; cursor: pointer; border-radius: 999px; padding: 8px 14px;
  font-size: .85rem; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px;
}
.theme-toggle button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.theme-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- En-tête ---------- */
.site-header {
  position: fixed; inset: var(--switch-h) 0 auto; z-index: 80; height: var(--header-h);
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: transform .45s var(--ease), background .35s, border-color .35s;
}
.site-header.is-solid {
  background: var(--header-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.site-header.is-hidden { transform: translateY(calc(-100% - var(--switch-h))); }
.brand img { height: clamp(34px, 3.2vw, 44px); width: auto; max-width: 46vw; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); }
.nav > a:not(.btn) {
  position: relative; text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--muted);
  padding-block: 6px; transition: color .25s;
}
.nav > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav > a:not(.btn):hover, .nav > a.is-current { color: var(--fg); }
.nav > a:not(.btn):hover::after, .nav > a.is-current::after { transform: scaleX(1); }
.nav .btn { margin-left: 8px; }
.burger { display: none; }

/* ---------- Hero ---------- */
.hero {
  /* le hero reste « écran » : texte clair sur vidéo assombrie, quel que soit le thème */
  --fg: #F3F5F8; --muted: rgba(243, 245, 248, .8); --line-strong: rgba(243, 245, 248, .4);
  --hero-shade-top: rgba(5, 8, 14, .45); --hero-shade-bottom: rgba(5, 8, 14, .88);
  color: var(--fg);
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(600px, 94svh, 1000px);
  display: flex; align-items: flex-end;
  padding-block: calc(var(--header-h) + var(--switch-h) + 90px) clamp(72px, 9vw, 120px);
}
.leaks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; }
.hero-loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 8, 14, .6) 0%, rgba(5, 8, 14, .15) 60%, transparent 100%),
    linear-gradient(180deg, var(--hero-shade-top) 0%, transparent 30%, transparent 45%, var(--hero-shade-bottom) 100%);
}
.vf { position: absolute; inset: calc(var(--header-h) + var(--switch-h) + 14px) var(--gutter) 22px; pointer-events: none; z-index: 1; opacity: .7; }
.vf-c { position: absolute; width: 22px; height: 22px; border: 0 solid var(--line-strong); }
.vf-tl { left: 0; top: 0; border-top-width: 1px; border-left-width: 1px; }
.vf-tr { right: 0; top: 0; border-top-width: 1px; border-right-width: 1px; }
.vf-bl { left: 0; bottom: 0; border-bottom-width: 1px; border-left-width: 1px; }
.vf-br { right: 0; bottom: 0; border-bottom-width: 1px; border-right-width: 1px; }
.vf-row {
  position: absolute; left: 36px; right: 36px; display: flex; justify-content: space-between; gap: 18px;
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.vf-top { top: 3px; }
.vf-bottom { bottom: 3px; }
.vf-file { margin-right: auto; margin-left: 18px; }
.rec { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); }
.rec i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: rec 1.6s steps(2, jump-none) infinite; }
@keyframes rec { 50% { opacity: .2; } }

.hero-content { position: relative; z-index: 2; display: grid; gap: clamp(20px, 2.4vw, 30px); }
.hero-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2.6rem, 8.2vw, 8.8rem); line-height: 1; letter-spacing: -.035em;
  margin-left: -.03em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-title .line > span { display: inline-block; animation: rise 1s var(--ease) both; }
.hero-title .line:nth-child(2) > span { animation-delay: .1s; }
.hero-title b { color: var(--accent); font-weight: inherit; }
.hero-title .swap { display: inline-block; }
.hero-title .swap--accent { color: var(--accent); }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px 48px; flex-wrap: wrap; }
.hero-lead { max-width: 34rem; font-size: clamp(1.05rem, 1.3vw, 1.2rem); color: var(--muted); min-width: 0; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .eyebrow, .hero-foot { animation: fade .9s .35s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Bandeau ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: clamp(18px, 2vw, 26px); }
.marquee-track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-set { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 36px); padding-right: clamp(20px, 2.4vw, 36px); }
.marquee-set span {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  line-height: 1; letter-spacing: -.03em; white-space: nowrap; color: var(--fg);
}
.marquee-set span.o { color: transparent; -webkit-text-stroke: 1px var(--muted); }
.marquee-set .sep { width: clamp(10px, 1vw, 14px); height: clamp(10px, 1vw, 14px); border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; transform: rotate(-30deg); flex: 0 0 auto; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Showreel ---------- */
.reel-frame {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 16 / 9; max-width: 100%; background: #0B0F17; cursor: pointer;
}
.reel-media { position: absolute; inset: 0; }
.reel-media .leaks { z-index: 0; }
.reel-media video, .reel-media iframe, .reel-media img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; background: #000; }
.reel-media video { object-fit: contain; }
.reel-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: clamp(16px, 2.4vw, 28px); color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, .35), transparent 70%);
}
.reel-bar strong { display: block; font-size: clamp(1rem, 1.4vw, 1.2rem); font-weight: 650; }
.reel-bar small { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.reel-play {
  margin-left: auto; pointer-events: auto; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(255, 255, 255, .55); border-radius: 999px; background: rgba(0, 0, 0, .25);
  color: #fff; font-size: .88rem; font-weight: 600; padding: 9px 16px 9px 14px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .25s, border-color .25s;
}
.reel-play svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.reel-frame:hover .reel-play { background: rgba(0, 0, 0, .45); border-color: #fff; }
.reel-frame.is-playing { cursor: auto; }
.reel-frame.is-playing .reel-bar { display: none; }

/* ---------- Réalisations ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.filter {
  border: 1px solid var(--line); background: none; cursor: pointer; border-radius: 999px;
  padding: 7px 14px; font-weight: 500; font-size: .9rem; color: var(--muted);
  transition: color .2s, border-color .2s, background .2s;
}
.filter sup { font-family: var(--f-mono); font-size: .62rem; margin-left: 3px; opacity: .7; }
.filter:hover { color: var(--fg); border-color: var(--line-strong); }
.filter[aria-pressed="true"] { color: var(--bg); background: var(--fg); border-color: var(--fg); }

.works-grid { --row-h: clamp(220px, 24vw, 340px); display: flex; flex-wrap: wrap; gap: clamp(20px, 2vw, 28px) clamp(10px, 1.2vw, 16px); }
.works-grid::after { content: ""; flex-grow: 999; }
.works-grid.is-justified::after { display: none; }
.work {
  --r: 1.7778;
  display: block; min-width: 0; text-decoration: none; color: var(--fg);
  flex: var(--r) 1 calc(var(--r) * var(--row-h));
  animation: workIn .6s var(--ease) both;
}
.works-grid.is-justified .work { flex: none; }
@keyframes workIn { from { opacity: 0; transform: translateY(14px); } }
.work-frame {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: var(--r); background: var(--placeholder);
}
.works-grid.is-justified .work-frame { aspect-ratio: auto; }
.work-frame > img, .work-frame > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .4s; }
.work-frame > video { opacity: 0; }
.work.is-previewing .work-frame > video { opacity: 1; }
.work:hover .work-frame > img, .work:focus-visible .work-frame > img { transform: scale(1.03); }
.work-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--placeholder-fg);
}
.work-play {
  position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); display: grid; place-items: center;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s var(--ease);
}
.work-play svg { width: 11px; fill: #0B0F17; margin-left: 2px; }
.work:hover .work-play, .work:focus-visible .work-play { opacity: 1; transform: none; }
.work-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 10px; min-width: 0; }
.work-title { font-family: var(--f-body); font-weight: 600; font-size: .98rem; line-height: 1.3; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-meta { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .06em; color: var(--muted); white-space: nowrap; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.work.is-narrow .work-cap { flex-direction: column; gap: 2px; }
.work.is-narrow .work-title { white-space: normal; font-size: .9rem; }
.work:focus-visible { outline: none; }
.work:focus-visible .work-frame { outline: 2px solid var(--accent); outline-offset: 3px; }
.works-empty { color: var(--muted); padding: 40px 0; }

/* ---------- Expertises ---------- */
.svc-list { border-top: 1px solid var(--line); }
.svc {
  display: grid; grid-template-columns: 7rem minmax(0, 1.1fr) minmax(0, 1.4fr); grid-template-rows: auto auto;
  column-gap: clamp(20px, 3vw, 48px); row-gap: 12px; align-items: baseline;
  padding-block: clamp(22px, 2.4vw, 32px); border-bottom: 1px solid var(--line);
}
.svc-code { grid-row: 1 / span 2; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .14em; color: var(--muted); padding-top: .4em; }
.svc-name { grid-row: 1 / span 2; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -.02em; }
.svc-desc { color: var(--muted); max-width: 36rem; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 3; }
.svc-tags li { font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }

/* ---------- Méthode ---------- */
.process { background: var(--bg-2); }
.track { position: relative; padding-top: 34px; margin-bottom: clamp(36px, 4vw, 56px); }
.ruler {
  position: absolute; left: 0; right: 0; top: 0; height: 18px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 10%) top left / 100% 10px no-repeat;
  border-top: 1px solid var(--line-strong);
}
.clips { display: flex; gap: 3px; }
.clip {
  flex: var(--w) 1 0; min-width: 0; height: clamp(58px, 6vw, 74px); border: 0; border-radius: 3px; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; padding: 9px 12px;
  background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .3s, color .3s, box-shadow .3s;
}
.clip-n { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em; }
.clip-l { font-weight: 600; font-size: .92rem; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip.is-active { color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent); }
.playhead { position: absolute; top: 0; bottom: -8px; left: 0; width: 2px; background: var(--accent); pointer-events: none; transition: left .25s linear; }
.playhead span {
  position: absolute; top: -24px; left: 50%; translate: -50% 0; white-space: nowrap; border-radius: 3px;
  background: var(--accent); color: var(--on-accent); padding: 1px 7px; font-family: var(--f-mono); font-size: .66rem; font-variant-numeric: tabular-nums;
}
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); }
.step { display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 1px solid var(--line); opacity: .55; transition: opacity .3s, border-color .3s; }
.step.is-active { opacity: 1; border-top-color: var(--accent); }
.step-n { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); letter-spacing: .12em; }
.step h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; line-height: 1.2; }
.step p { color: var(--muted); font-size: .96rem; }

/* ---------- Fabrication : planches → prompt → plan final ---------- */
.fab-board {
  position: relative; display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, 1.35fr);
  gap: clamp(28px, 4vw, 72px);
}
.fab-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.fab-links path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.fab-links path.is-live { stroke: var(--accent); stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: fabDraw .9s var(--ease) forwards; }
.fab-links circle { fill: var(--accent); opacity: 0; transition: opacity .3s; }
.fab-links circle.is-live { opacity: 1; }
@keyframes fabDraw { to { stroke-dashoffset: 0; } }
.fab-assets { display: grid; gap: 14px; position: relative; z-index: 1; }
.fab-card, .fab-prompt, .fab-result {
  position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .3s;
}
.fab-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; overflow: hidden; }
.fab-sheet { aspect-ratio: 16 / 9; background: var(--placeholder); overflow: hidden; }
.fab-sheet img { width: 100%; height: 100%; object-fit: cover; }
.fab-card .fab-tag { padding: 10px 12px; display: grid; align-content: center; gap: 2px; min-width: 7.5rem; border-left: 1px solid var(--line); }
.fab-kind { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.fab-tag strong { font-size: .98rem; font-weight: 650; line-height: 1.2; }
.fab-tag code { font-family: var(--f-mono); font-size: .72rem; color: var(--accent-text); }
.fab-prompt { padding: 16px; display: grid; gap: 10px; }
.fab-text { font-family: var(--f-mono); font-size: .8rem; line-height: 1.6; min-height: 9.6em; color: var(--fg); }
.fab-text mark { background: none; color: var(--accent-text); font-weight: 500; }
.fab-text .caret { display: inline-block; width: .5em; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--accent); animation: rec 1s steps(2, jump-none) infinite; }
.fab-bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.fab-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.fab-status { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.fab-out { display: grid; gap: 14px; justify-items: start; position: relative; z-index: 1; }
.fab-result { width: 100%; overflow: hidden; }
.fab-video { position: relative; aspect-ratio: 16 / 9; background: var(--placeholder); }
.fab-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s var(--ease); }
.fab-result.is-done .fab-video video { opacity: 1; }
.fab-result .fab-tag { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
.fab-board .is-wait { opacity: .25; transform: translateY(8px); }
.fab-board .is-on { border-color: var(--accent); }
@media (max-width: 1000px) {
  .fab-board { grid-template-columns: minmax(0, 1fr); }
  .fab-links { display: none; }
  .fab-assets { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
}
@media (max-width: 640px) {
  .fab-card { grid-template-columns: minmax(0, 1fr); }
  .fab-card .fab-tag { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Studio ---------- */
.manifesto {
  margin-top: 18px; font-family: var(--f-display); font-weight: 600;
  font-size: clamp(2.2rem, 5.6vw, 5.4rem); line-height: 1.02; letter-spacing: -.035em;
}
.manifesto em { font-style: normal; color: var(--muted); }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(32px, 5vw, 80px); margin-top: clamp(44px, 5.5vw, 80px); }
.studio-lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55; max-width: 30rem; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.5vw, 36px); }
.pillar { display: grid; gap: 10px; align-content: start; padding-top: 16px; border-top: 1px solid var(--line-strong); }
.pillar h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.12rem; line-height: 1.2; }
.pillar p { color: var(--muted); font-size: .97rem; }
.atelier {
  margin-top: clamp(44px, 5.5vw, 72px); padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; font-size: .9rem; color: var(--muted);
}
.atelier span { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg); }

/* ---------- Contact ---------- */
.contact { background: var(--bg-2); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 100px); align-items: start; }
.contact-intro { display: grid; gap: 20px; align-content: start; }
.contact-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.2rem, 4.4vw, 4.2rem); line-height: 1.02; letter-spacing: -.03em; }
.contact-lead { color: var(--muted); max-width: 30rem; font-size: 1.08rem; }
.mail-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.mail { font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.6rem); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; overflow-wrap: anywhere; min-width: 0; }
.mail:hover { color: var(--accent-text); }
.copy { font-size: .8rem; font-weight: 500; background: none; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); padding: 5px 10px; cursor: pointer; }
.copy:hover { color: var(--fg); border-color: var(--line-strong); }
.contact-lines { display: grid; gap: 6px; color: var(--muted); }
.contact-lines a { text-decoration: none; }
.contact-lines a:hover { color: var(--accent-text); }

.form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: clamp(22px, 3vw, 36px);
}
.field { display: grid; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-size: .82rem; font-weight: 500; color: var(--muted); padding: 0; }
.field label span { opacity: .7; }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 12px; font-size: 1rem; transition: border-color .2s;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--surface); color: var(--fg); }
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #E5484D; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { width: 100%; margin-bottom: 7px; }
.field .chip { position: relative; cursor: pointer; font-size: inherit; color: var(--fg); }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; font-weight: 500; transition: background .2s, border-color .2s, color .2s; }
.chip input:checked + span { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip:hover span { border-color: var(--line-strong); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.form-status { font-size: .95rem; color: var(--muted); min-width: 0; flex: 1 1 14rem; }
.form-status.is-ok { color: var(--fg); }
.form-status.is-err { color: #E5484D; }

/* ---------- Pied de page ---------- */
.footer { border-top: 1px solid var(--line); padding-block: clamp(52px, 6vw, 88px) 28px; }
.footer-top { display: grid; grid-template-columns: auto 1fr auto; gap: 32px 48px; align-items: center; }
.footer-logo { height: clamp(52px, 5vw, 70px); width: auto; max-width: 100%; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; }
.footer-nav a, .footer-social a { text-decoration: none; color: var(--muted); font-weight: 500; }
.footer-nav a:hover, .footer-social a:hover { color: var(--fg); }
.footer-social { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom {
  margin-top: clamp(36px, 4.5vw, 56px); padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: .85rem; color: var(--muted);
}
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--fg); }

/* ---------- Visionneuse ---------- */
.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--fg); }
.lightbox::backdrop { background: var(--bg); }
.lightbox[open] { display: grid; place-items: center; animation: fade .3s var(--ease); }
.lb-inner { width: min(100% - 2 * var(--gutter), 1500px); max-height: calc(100% - 120px); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(20px, 3vw, 40px); align-items: center; }
.lb-stage { position: relative; display: grid; place-items: center; min-width: 0; }
.lb-stage > .lb-box { position: relative; overflow: hidden; border-radius: var(--radius); background: #000; aspect-ratio: var(--r, 1.7778); width: min(100%, calc((100vh - 140px) * var(--r, 1.7778))); max-width: 100%; }
.lb-box > * { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }
.lb-box.is-empty { background: var(--placeholder); }
.lb-box .lb-placeholder { display: grid; place-items: center; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--placeholder-fg); }
.lb-thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; max-width: 100%; }
.lb-thumbs button { border: 2px solid transparent; border-radius: 3px; padding: 0; background: none; cursor: pointer; flex: 0 0 auto; }
.lb-thumbs button[aria-current="true"] { border-color: var(--accent); }
.lb-thumbs img { width: 84px; height: 56px; object-fit: cover; }
.lb-thumbs button { position: relative; }
.lb-thumbs .is-film span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .9rem; background: rgba(0, 0, 0, .35); }
.lb-info { display: grid; gap: 10px; align-content: center; min-width: 0; }
.lb-cat { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lb-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.5rem, 2.2vw, 2.1rem); line-height: 1.1; letter-spacing: -.02em; }
.lb-meta { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); }
.lb-desc { color: var(--fg); opacity: .85; }
.lb-credits { font-size: .88rem; color: var(--muted); }
.lb-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.lb-nav button { background: none; border: 0; cursor: pointer; font-weight: 600; color: var(--fg); padding: 6px 0; }
.lb-nav button:hover { color: var(--accent-text); }
.lb-nav span { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-close { position: absolute; top: 18px; right: var(--gutter); background: none; border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg); cursor: pointer; font-size: .85rem; font-weight: 500; padding: 9px 14px; }
.lb-close:hover { border-color: var(--line-strong); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 130;
  translate: -50% 20px; opacity: 0; pointer-events: none; border-radius: var(--radius);
  background: var(--fg); color: var(--bg); padding: 12px 18px; font-weight: 600; font-size: .95rem; max-width: calc(100% - 32px);
  transition: opacity .3s, translate .3s var(--ease);
}
.toast.is-on { opacity: 1; translate: -50% 0; }

/* ---------- Apparition au scroll ---------- */
.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.pending { opacity: 0; transform: translateY(24px); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .lb-inner { grid-template-columns: minmax(0, 1fr); max-height: none; overflow-y: auto; padding-block: 80px 40px; align-content: start; height: 100%; }
  .lb-stage > .lb-box { width: min(100%, calc((100vh - 320px) * var(--r, 1.7778))); }
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:last-child { grid-column: 1 / -1; }
  .svc { grid-template-columns: 5rem minmax(0, 1fr); }
  .svc-name { grid-row: auto; grid-column: 2; }
  .svc-code { grid-row: 1 / span 3; }
  .svc-desc, .svc-tags { grid-column: 2; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .burger { display: grid; place-content: center; gap: 7px; width: 46px; height: 46px; border: 0; background: none; cursor: pointer; z-index: 2; }
  .burger span { display: block; width: 24px; height: 2px; background: var(--fg); transition: transform .35s var(--ease); }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px;
    padding: calc(var(--header-h) + var(--switch-h) + 20px) var(--gutter) 40px;
    background: var(--bg); opacity: 0; visibility: hidden;
    transition: opacity .3s, visibility 0s .3s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transition: opacity .3s; }
  .nav > a:not(.btn) { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.8rem, 8vw, 2.6rem); line-height: 1.2; color: var(--fg); }
  .nav .btn { margin: 20px 0 0; }
  .brand { position: relative; z-index: 2; }
  .site-header.menu-open { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sec-head--split, .sec-head--reel { grid-template-columns: minmax(0, 1fr); }
  .filters { justify-content: flex-start; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .footer-nav { justify-content: flex-start; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .theme-toggle button span { display: none; }
  .site-header .theme-toggle { margin-left: auto; }
}

@media (max-width: 640px) {
  .ns-label { display: none; }
  .name-switch { gap: 10px; }
  .ns-options { gap: 6px; }
  .ns-options button { height: 46px; padding: 0 12px; }
  .ns-options img { height: 22px; }
  .theme-toggle button { padding: 7px 9px; }
  .works-grid { --row-h: 150px; }
  .vf-row { left: 0; right: 0; font-size: .6rem; }
  .vf-top { top: 30px; padding-inline: 4px; }
  .vf-file, .vf-bottom span:last-child { display: none; }
  .vf-bottom { bottom: 30px; padding-inline: 4px; }
  .hero { padding-block: calc(var(--header-h) + var(--switch-h) + 80px) 96px; }
  .hero-title { font-size: clamp(2.3rem, 10.6vw, 4rem); }
  .hero-ctas { width: 100%; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .clip-l { display: none; }
  .clip { padding: 8px; }
  .playhead span { font-size: .58rem; padding: 1px 5px; }
  .svc { grid-template-columns: minmax(0, 1fr); }
  .svc-code, .svc-name, .svc-desc, .svc-tags { grid-column: 1; grid-row: auto; }
  .svc-code { padding-top: 0; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .work-meta { display: none; }
  .reel-play span { display: none; }
  .reel-play { padding: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; }
  .reveal.pending { opacity: 1; transform: none; }
}

/* ==========================================================================
   Retours Nicolas (26 oct.) : domaines dans l'accueil, vignettes titrées,
   filtres plus grands, outils maison, lien espace équipe
   ========================================================================== */
.hero-cat { font-size: clamp(3rem, 10vw, 10.5rem); }
.hero-cats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -6px 0 6px; padding: 0; list-style: none; }
.hero-cats li { font-size: clamp(.95rem, 1.2vw, 1.15rem); font-weight: 500; color: var(--fg); opacity: .5; transition: opacity .3s; }
.hero-cats li.is-on { opacity: 1; font-weight: 700; }
.hero-cats li + li::before { content: "·"; margin-right: 18px; color: var(--muted); }

.work-ovl {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none;
  display: grid; gap: 4px; padding: clamp(14px, 1.6vw, 22px);
  background: linear-gradient(0deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, 0) 100%);
  color: #fff;
}
.work-ovl .work-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.1rem, 1.7vw, 1.6rem); line-height: 1.1; letter-spacing: -.02em; white-space: normal; }
.work-ovl .work-kind { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.work.is-narrow .work-ovl .work-title { font-size: 1rem; }
.work-play { top: 14px; right: 14px; bottom: auto; }
.works-grid { row-gap: clamp(10px, 1.2vw, 16px); }

.filters { gap: 8px; }
.filter { border-radius: 6px; padding: 11px 20px; font-size: 1rem; font-weight: 600; }
.filter sup { font-size: .7rem; }

.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: clamp(20px, 2.4vw, 32px); display: grid; gap: 10px; align-content: start; }
.tool-k { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.tool h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.4rem, 2vw, 1.9rem); letter-spacing: -.02em; }
.tool p:last-child { color: var(--muted); }

.foot-links { display: inline-flex; gap: 22px; }
.foot-team { opacity: .55; }
.foot-team:hover { opacity: 1; }

@media (max-width: 900px) { .tools-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .hero .hero-cat { font-size: clamp(2.6rem, 11.5vw, 5rem); }
  .hero-cats { gap: 4px 14px; }
  .hero-cats li + li::before { content: none; }
}
