/* ==========================================================================
   Kernel Studio — base
   Tokens, reset, typographie, composants partagés (nav, curseur, diaphragme,
   boutons, plates, lecteur, contact, pied de page).
   ========================================================================== */

:root {
  /* Couleurs — thème clair « contraste élevé » (noms historiques conservés :
     --cream = texte, --walnut = fond). Le thème sombre est plus bas. */
  --cream: #000;      /* texte */
  --walnut: #fff;     /* fond */
  --bark: #f0f0f2;    /* surfaces */
  --bark-hi: #e3e3e8;
  --cork: #c7c7cc;    /* filets */
  --drift: #6e6e73;   /* texte secondaire */
  --ember: #000;      /* accent (crédits) */
  --rec: #ff3b30;     /* voyant REC */
  --glow: #e3e3e8;    /* halo de studio derrière la caméra */
  --pill-hover: #2c2c2e;
  --silver: linear-gradient(180deg, #000 0%, #2c2c2e 50%, #8e8e93 100%); /* lettres « métal » */
  --cream-a70: rgb(0 0 0 / .7);
  --cream-a45: rgb(0 0 0 / .45);
  --cream-a06: rgb(0 0 0 / .06);

  /* Typographie */
  --font: "Inter Tight", "Inter", "Helvetica Neue", Arial, sans-serif;
  --t-xs: 10px;
  --t-sm: 12px;
  --t-md: 14px;
  --t-hsm: clamp(18px, 1.67vw, 24px);
  --t-body: clamp(19px, 2.015vw, 29px);
  --t-heading: clamp(32px, 3.4vw, 58px);
  --t-display: clamp(40px, 4.6vw, 80px);
  --t-mega: clamp(64px, min(15.2vw, 27svh), 280px);

  /* Espacements & formes */
  --gx: clamp(16px, 1.67vw, 24px);
  --gx-r: calc(var(--gx) + 28px); /* marge droite : laisse la place au libellé vertical */
  --gap: 18px;
  --nav-h: 64px;
  --r-card: 12px;
  --r-ghost: 22.5px;
  --r-pill: 36px;

  /* Courbes */
  --ease: cubic-bezier(.19, 1, .22, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
}

/* Thème sombre : toute la page (<html data-theme="dark">), le manifeste de l'accueil
   (html.is-dark, puis tant que la plage de nuit est affichée) et les zones posées sur une
   image ou une vidéo (texte blanc sur l'image). */
:root[data-theme="dark"], :root.is-dark, .manifesto:has(.manifesto__beach.is-on),
.iris, .player, .plate, [data-hud-host], .float-preview, .pr-clip {
  --cream: #f5f5f7;
  --walnut: #000;
  --bark: #1d1d1f;
  --bark-hi: #2c2c2e;
  --cork: #333336;
  --drift: #6e6e73;
  --ember: #fff;
  --glow: rgb(29 29 31 / .6);
  --pill-hover: #d2d2d7;
  --silver: linear-gradient(180deg, #fff 0%, #e3e3e8 38%, #8e8e93 100%);
  --cream-a70: rgb(245 245 247 / .7);
  --cream-a45: rgb(245 245 247 / .45);
  --cream-a06: rgb(245 245 247 / .06);
}
.iris, .player, [data-hud-host], .float-preview, .pr-clip, .manifesto:has(.manifesto__beach.is-on) { color: var(--cream); }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* scrollbar-gutter : la place de la barre de défilement reste réservée quand le préchargeur
   bloque le défilement, sinon la page change de largeur (et de hauteur) à son ouverture
   et les repères des animations au défilement se décalent. */
html { background: var(--walnut); -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; transition: background-color .8s var(--ease-io); }
body {
  background: var(--walnut);
  color: var(--cream);
  transition: background-color .8s var(--ease-io), color .8s var(--ease-io);
  font-family: var(--font);
  font-size: var(--t-sm);
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-transform: inherit; text-align: inherit; letter-spacing: inherit; }
ul { list-style: none; }
h1, h2, h3, p { font-weight: 500; }
::selection { background: var(--bark); color: var(--cream); }
:focus-visible { outline: 1px dashed var(--cream); outline-offset: 4px; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- Utilitaires ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 9999; padding: 10px 16px;
  background: var(--cream); color: var(--walnut); border-radius: var(--r-ghost);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.body-copy {
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.26;
  text-transform: none;
}
.credit { color: var(--ember); }
.dash, [data-line] {
  display: block;
  border: 0;
  border-top: 1px dashed var(--cork);
  width: 100%;
  transform-origin: left center;
}

/* Masques SplitText */
.split-mask { padding-top: .12em; margin-top: -.12em; }

/* ---------- Texte roulant (survol lettre par lettre) ---------- */
.cr-word { display: inline-block; white-space: nowrap; }
.cr {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-top: .16em;
  margin-top: -.16em;
  padding-bottom: .06em;
  margin-bottom: -.06em;
}
.cr__in {
  display: block;
  position: relative;
  transition: transform .75s var(--ease);
  transition-delay: calc(var(--i) * 14ms);
}
.cr__in::after {
  content: attr(data-c);
  position: absolute;
  left: 0;
  top: calc(100% + .32em);
}
:is(a, button, [data-roll-host]):hover .cr__in,
.is-hover .cr__in { transform: translateY(calc(-100% - .32em)); }

/* ---------- Boutons & liens ---------- */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: var(--r-pill);
  background: var(--cream);
  color: var(--walnut);
  font-size: var(--t-md);
  line-height: 1;
  transition: background-color .5s var(--ease);
}
.btn-pill:hover { background: var(--pill-hover); }

.btn-ghost {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--cream);
  border-radius: var(--r-ghost);
  font-size: var(--t-sm);
  line-height: 1;
  transition: color .45s var(--ease);
}
.btn-ghost::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: var(--cream);
  transform: translateY(101%);
  transition: transform .6s var(--ease);
}
.btn-ghost:hover { color: var(--walnut); }
.btn-ghost:hover::before { transform: translateY(0); }

.link-u { position: relative; display: inline-block; }
.link-u::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: currentColor;
  transform-origin: left;
}
.link-u:hover::after { animation: line-swipe .9s var(--ease-io); }
@keyframes line-swipe {
  0% { transform: scaleX(1); transform-origin: right; }
  45% { transform: scaleX(0); transform-origin: right; }
  55% { transform: scaleX(0); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--nav-h);
  padding: 0 var(--gx-r) 0 var(--gx);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform .9s var(--ease);
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -28px 0;
  z-index: -1;
  background: linear-gradient(var(--walnut) 35%, transparent);
  opacity: 0;
  transition: opacity .6s var(--ease);
  pointer-events: none;
}
.nav.is-scrolled::before { opacity: .92; }
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { font-size: var(--t-md); }
.nav__links { display: flex; gap: 30px; }
.nav__links a { position: relative; padding: 6px 0; }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  border-bottom: 1px dashed var(--drift);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease);
}
.nav__links a.is-active::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__menu { display: none; }

/* Menu mobile */
.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 32px) var(--gx) 32px;
  background: var(--walnut);
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
}
.menu__links a { display: block; overflow: hidden; font-size: clamp(44px, 13vw, 84px); line-height: .95; padding: .05em 0; }
.menu__links a span { display: block; }
.menu__foot { display: flex; justify-content: space-between; gap: 18px; font-size: var(--t-sm); }

/* ---------- Libellé vertical ---------- */
.side-label {
  position: fixed;
  right: 12px;
  top: 50%;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: var(--t-xs);
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  pointer-events: none;
}
.side-label__progress { font-variant-numeric: tabular-nums; color: var(--drift); }

/* ---------- Curseur ---------- */
.cursor { display: none; }
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor .cursor {
  display: block;
  position: fixed;
  top: 0; left: 0;
  z-index: 9500;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.has-cursor .cursor.is-visible { opacity: 1; }
.cursor__dot, .cursor__ring, .cursor__label {
  position: absolute;
  top: 0; left: 0;
  transform: translate(-50%, -50%);
}
.cursor__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cream);
  transition: transform .45s var(--ease);
}
.cursor__ring {
  width: 44px; height: 44px;
  border: 1px solid var(--cream);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .5s var(--ease);
}
.cursor__label {
  padding: 10px 14px;
  border-radius: var(--r-ghost);
  background: var(--cream);
  color: var(--walnut);
  font-size: var(--t-xs);
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .5s var(--ease);
}
.cursor.is-link .cursor__ring { transform: translate(-50%, -50%) scale(1); }
.cursor.is-link .cursor__dot { transform: translate(-50%, -50%) scale(.5); }
.cursor.has-label .cursor__label { transform: translate(-50%, -50%) scale(1); }
.cursor.has-label .cursor__dot { transform: translate(-50%, -50%) scale(0); }
.cursor.is-down .cursor__dot { transform: translate(-50%, -50%) scale(.4); }

/* ---------- Grain pellicule ---------- */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 9000;
  pointer-events: none;
  opacity: .06;
  background-repeat: repeat;
  will-change: transform;
  animation: grain 1s steps(8) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  12% { transform: translate(-3%, 2%); }
  25% { transform: translate(2%, -4%); }
  37% { transform: translate(-4%, -1%); }
  50% { transform: translate(3%, 3%); }
  62% { transform: translate(-1%, 4%); }
  75% { transform: translate(4%, -2%); }
  87% { transform: translate(-2%, -3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Diaphragme (préchargeur / transitions) ---------- */
.iris {
  position: fixed;
  inset: 0;
  z-index: 8000;
  pointer-events: none;
  visibility: hidden;
}
.js .iris { visibility: visible; background: var(--walnut); pointer-events: auto; }
.js .iris.is-built { background: transparent; }
.js .iris.is-open { visibility: hidden; pointer-events: none; }
.iris svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.iris__ui {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px var(--gx-r) 22px var(--gx);
  font-size: var(--t-xs);
}
.iris__row { display: flex; justify-content: space-between; gap: 18px; }
.iris__center { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.iris__tc { font-size: var(--t-display); line-height: .9; font-variant-numeric: tabular-nums; }
[data-iris-pct] { font-variant-numeric: tabular-nums; }

/* ---------- Scène 3D ---------- */
.lens-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.lens-stage canvas { width: 100% !important; height: 100% !important; }
main, .footer { position: relative; z-index: 2; }

/* Repli si WebGL indisponible */
.lens-fallback { display: none; }
.no-webgl .lens-fallback {
  display: grid;
  place-items: center;
  width: min(34vw, 52vh);
  aspect-ratio: 1;
  margin: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, #040404 0 26%, transparent 27%),
    repeating-radial-gradient(circle, var(--bark) 0 2px, #141414 2px 7px);
  border: 1px solid var(--cork);
}
.no-webgl .lens-fallback span {
  width: 52%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgb(245 245 247 / .25), transparent 40%), conic-gradient(from 90deg, #1e1e1e, #1f1f1f, #1e1e1e, #1e1e1e);
  animation: spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Plates : visuels de démonstration animés ---------- */
.plate {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: #1a120c;
}
.plate::before, .plate::after { content: ""; position: absolute; inset: 0; }
.plate__hud {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 9px;
  line-height: 1;
  color: var(--cream);
  background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgb(10 6 3 / .62) 100%);
  pointer-events: none;
}
.plate__hud-row { display: flex; justify-content: space-between; gap: 12px; }
.plate__hud-rec { display: inline-flex; align-items: center; gap: 6px; }
.plate__hud-rec::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rec); opacity: 0; }
.plate.is-live .plate__hud-rec::before,
[data-hud-host]:has(.plate.is-live) .plate__hud-rec::before { opacity: 1; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* 1 — Néons (clip) */
.plate--1 {
  background:
    radial-gradient(60% 50% at 25% 70%, rgb(214 40 120 / .55), transparent 70%),
    radial-gradient(50% 60% at 80% 30%, rgb(84 46 190 / .55), transparent 70%),
    linear-gradient(160deg, #1b0b26 0%, #07040c 100%);
  background-size: 150% 150%, 150% 150%, 100% 100%;
  background-position: 0 0, 100% 100%, 0 0;
}
.plate--1::before {
  inset: -20%;
  background: repeating-linear-gradient(90deg, transparent 0 9%, rgb(255 120 190 / .3) 9% 9.7%, transparent 9.7% 21%);
  filter: blur(2px);
  mix-blend-mode: screen;
  transform: skewX(-14deg);
}
.plate--1::after {
  background:
    radial-gradient(9% 13% at 50% 52%, #06030a 96%, transparent 100%),
    radial-gradient(22% 30% at 50% 92%, #06030a 96%, transparent 100%),
    radial-gradient(35% 22% at 50% 100%, rgb(255 170 210 / .35), transparent 70%);
}
.plate--1.is-live { animation: p1-bg 6s ease-in-out infinite alternate; }
.plate--1.is-live::before { animation: p1-strips 3s linear infinite; }
@keyframes p1-bg { to { background-position: 60% 40%, 30% 60%, 0 0; } }
@keyframes p1-strips { to { transform: skewX(-14deg) translateX(10.5%); } }

/* 2 — Coucher de soleil (pub) */
.plate--2 {
  background:
    linear-gradient(180deg, #2b1206 0%, #7a2f0b 42%, #d0631a 58%, #1a0b04 58.2%, #0d0603 100%);
}
.plate--2::before {
  background: radial-gradient(circle at 50% 60%, #ffd9ab 0 5%, rgb(255 140 50 / .8) 5.6%, rgb(255 110 30 / .25) 16%, transparent 36%);
}
.plate--2::after {
  top: 58.2%;
  background:
    repeating-linear-gradient(180deg, rgb(255 150 60 / .16) 0 1px, transparent 1px 6px),
    radial-gradient(18% 70% at 50% 0%, rgb(255 140 50 / .45), transparent 70%),
    linear-gradient(180deg, #1c0c05, #070302);
}
.plate--2.is-live::before { animation: p2-sun 5s ease-in-out infinite alternate; }
@keyframes p2-sun { to { transform: translateY(-7%); } }

/* 3 — Établi (documentaire) */
.plate--3 {
  background:
    linear-gradient(rgb(255 237 215 / .08) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgb(255 237 215 / .08) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(135deg, #4b5a36, #2c361f 60%, #1b2113);
}
.plate--3::before {
  background:
    radial-gradient(circle at 36% 58%, #b8814e 0 13%, #8a5a33 13.4% 14.6%, transparent 15%),
    linear-gradient(28deg, transparent 62%, #d8c7a6 62.2% 63.4%, transparent 63.6%);
}
.plate--3::after {
  inset: -30%;
  background: radial-gradient(35% 32% at 62% 38%, rgb(255 205 150 / .42), transparent 70%);
  mix-blend-mode: screen;
}
.plate--3.is-live::after { animation: p3-light 5s ease-in-out infinite alternate; }
@keyframes p3-light { to { transform: translate(-14%, 12%); } }

/* 4 — Montagnes (paysage) */
.plate--4 {
  background:
    radial-gradient(80% 22% at 50% 66%, rgb(255 237 215 / .35), transparent 70%),
    linear-gradient(180deg, #ecc9a0 0%, #b98a63 32%, #5d4a3e 62%, #2a211b 100%);
}
.plate--4::before {
  inset: 0 -12%;
  background: #6e5a4c;
  opacity: .85;
  clip-path: polygon(0 62%, 12% 47%, 22% 56%, 35% 37%, 48% 54%, 60% 43%, 72% 58%, 85% 41%, 100% 55%, 100% 100%, 0 100%);
}
.plate--4::after {
  inset: 0 -12%;
  background: linear-gradient(180deg, #2b211b, #120c08);
  clip-path: polygon(0 79%, 15% 64%, 28% 74%, 42% 57%, 58% 77%, 70% 66%, 84% 81%, 100% 68%, 100% 100%, 0 100%);
}
.plate--4.is-live::before { animation: p4-far 8s ease-in-out infinite alternate; }
.plate--4.is-live::after { animation: p4-near 8s ease-in-out infinite alternate; }
@keyframes p4-far { to { transform: translateX(-4%); } }
@keyframes p4-near { to { transform: translateX(-9%); } }

/* 5 — Scène (événement) */
.plate--5 {
  background:
    radial-gradient(70% 30% at 50% 100%, rgb(255 190 130 / .28), transparent 70%),
    linear-gradient(180deg, #0a0604, #1d120b);
}
.plate--5::before {
  inset: -10% -10% 0;
  transform-origin: 50% 0;
  filter: blur(3px);
  background:
    conic-gradient(from 166deg at 28% 0%, transparent 0deg, rgb(255 215 170 / .34) 8deg, transparent 18deg),
    conic-gradient(from 176deg at 72% 0%, transparent 0deg, rgb(255 215 170 / .3) 9deg, transparent 18deg),
    conic-gradient(from 173deg at 50% -6%, transparent 0deg, rgb(255 150 80 / .26) 7deg, transparent 14deg);
}
.plate--5::after {
  top: auto;
  height: 26%;
  background: radial-gradient(circle at 50% 100%, #050302 0 58%, transparent 61%) 0 100% / 8% 70% repeat-x,
              radial-gradient(circle at 50% 100%, #0b0705 0 58%, transparent 61%) 4% 100% / 9% 90% repeat-x;
}
.plate--5.is-live::before { animation: p5-sweep 3.2s ease-in-out infinite alternate; }
@keyframes p5-sweep { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }

/* 6 — Ondes (motion design) */
.plate--6 { background: radial-gradient(circle at 50% 50%, #2e1c11, #100904 72%); }
.plate--6::before {
  inset: -40%;
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0 16px, rgb(255 237 215 / .18) 16px 17px);
}
.plate--6::after {
  inset: -40%;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0 290deg, rgb(220 80 0 / .5) 340deg, transparent 360deg);
}
.plate--6.is-live::before { animation: p6-rings 2.4s ease-in-out infinite alternate; }
.plate--6.is-live::after { animation: spin 3.6s linear infinite; }
@keyframes p6-rings { to { transform: scale(1.14); } }

/* 7 — Ville de nuit (bokeh, traînées de lumière) */
.plate--7 {
  background:
    radial-gradient(circle at 18% 30%, rgb(255 170 80 / .5) 0 1.5%, transparent 4.5%),
    radial-gradient(circle at 34% 22%, rgb(80 170 170 / .4) 0 2.5%, transparent 6%),
    radial-gradient(circle at 62% 34%, rgb(255 200 140 / .35) 0 3.5%, transparent 7.5%),
    radial-gradient(circle at 80% 18%, rgb(255 120 60 / .45) 0 1.8%, transparent 5%),
    radial-gradient(circle at 48% 12%, rgb(120 190 190 / .25) 0 4%, transparent 9%),
    linear-gradient(180deg, #0a0c10 0%, #120c09 70%, #070403 100%);
  background-size: 100% 100%;
}
.plate--7::before {
  filter: blur(6px);
  background:
    radial-gradient(circle at 26% 46%, rgb(255 190 110 / .5) 0 5%, transparent 9%),
    radial-gradient(circle at 70% 52%, rgb(90 180 180 / .4) 0 6%, transparent 10%);
}
.plate--7::after {
  top: 58%;
  background:
    linear-gradient(90deg, transparent 0 8%, rgb(255 120 40 / .75) 8% 46%, transparent 46%) 0 30% / 100% 2px no-repeat,
    linear-gradient(90deg, transparent 0 30%, rgb(255 220 180 / .6) 30% 86%, transparent 86%) 0 52% / 100% 2px no-repeat,
    linear-gradient(90deg, transparent 0 4%, rgb(220 60 30 / .7) 4% 38%, transparent 38%) 0 70% / 100% 3px no-repeat,
    linear-gradient(180deg, #120b07, #050302);
  filter: blur(.6px);
}
.plate--7.is-live::before { animation: p7-bokeh 4s ease-in-out infinite alternate; }
.plate--7.is-live::after { animation: p7-trails 1.6s linear infinite; }
@keyframes p7-bokeh { to { transform: translateX(-6%) scale(1.05); } }
@keyframes p7-trails { from { background-position: 0 30%, 0 52%, 0 70%, 0 0; } to { background-position: 120% 30%, -120% 52%, 140% 70%, 0 0; } }

/* 8 — Interview en studio (fond deux tons, silhouette, boîte à lumière) */
.plate--8 {
  background:
    radial-gradient(45% 60% at 18% 40%, rgb(255 214 170 / .28), transparent 70%),
    linear-gradient(90deg, #2b1c12 0%, #1a110b 55%, #0e0906 100%);
}
.plate--8::before {
  background:
    radial-gradient(9% 13% at 66% 40%, #070403 96%, transparent 100%),
    radial-gradient(24% 26% at 66% 92%, #070403 96%, transparent 100%),
    radial-gradient(9% 13% at 64.6% 39.4%, rgb(255 200 140 / .8) 96%, transparent 100%),
    radial-gradient(24% 26% at 64.8% 91.4%, rgb(255 200 140 / .45) 96%, transparent 100%);
}
.plate--8::after {
  inset: 12% auto auto 8%;
  width: 16%;
  height: 44%;
  border-radius: 4px;
  background: linear-gradient(180deg, rgb(255 236 210 / .5), rgb(255 200 150 / .18));
  filter: blur(8px);
}
.plate--8.is-live::after { animation: p8-light 3s ease-in-out infinite alternate; }
@keyframes p8-light { to { opacity: .6; transform: translateX(6%); } }

/* Variante : même univers, autre étalonnage et autre cadrage */
.plate--alt { filter: hue-rotate(-16deg) saturate(.82) brightness(.92) contrast(1.06); background-position: 30% 20%, 70% 80%, 0 0; }

/* Couvertures et aperçus Vimeo posés sur les visuels de démonstration */
img.vimeo-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .8s var(--ease), transform 1.2s var(--ease);
}
.has-cover > img.vimeo-cover { opacity: 1; }
/* Centré dans son cadre ; vimeo.js lui donne les proportions de la vidéo, en débordant (recadrage).
   « translate » (et non « transform ») : le zoom des vignettes au survol s'y ajoute sans casser le centrage. */
iframe.vimeo-loop {
  position: absolute;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  z-index: 2;
  translate: -50% -50%;
  border: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s var(--ease);
}
.is-looping > iframe.vimeo-loop { opacity: 1; }

/* Aperçu flottant qui suit le curseur (services, projets en liste) */
.float-preview {
  position: fixed;
  top: 0; left: 0;
  z-index: 30;
  width: clamp(240px, 22vw, 360px);
  aspect-ratio: 16 / 10;
  border-radius: var(--r-card);
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}
.float-preview [data-plate-id] { clip-path: inset(100% 0 0 0); transition: clip-path .8s var(--ease); }
.float-preview [data-plate-id].is-current { clip-path: inset(0 0 0 0); }
@media (max-width: 900px) { .float-preview { display: none; } }

/* ---------- Lecteur / fiche projet ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 7000;
  overflow-y: auto;
  background: var(--walnut);
  visibility: hidden;
  clip-path: inset(100% 0 0 0);
}
.modal.is-open { visibility: visible; }
.modal__inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 100%;
  padding: 24px var(--gx-r) 56px var(--gx);
}
.modal__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; }
.modal__kicker { font-size: var(--t-sm); margin-bottom: 14px; color: var(--cream-a70); }
.modal__title { font-size: var(--t-display); line-height: .9; }
.player {
  position: relative;
  width: min(100%, calc(70svh * 16 / 9));
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border-radius: var(--r-card);
  overflow: hidden;
  background: #000000;
}
.player__screen, .player__screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player__big {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 92px; height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cream);
  border-radius: 50%;
  transition: transform .6s var(--ease), opacity .4s;
}
.player__big svg { width: 26px; }
.player__big:hover { transform: scale(1.08); }
.player.is-playing .player__big { opacity: 0; transform: scale(.8); }
/* Vidéo Vimeo : lecteur chargé au clic, aux proportions réelles (vertical compris) */
.player.is-embedded .player__big, .player.is-embedded .player__bar { display: none; }
.player__screen .vimeo-player { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; border: 0; }
.player.has-ratio, .player.pr-player.has-ratio { aspect-ratio: var(--ratio); width: min(100%, calc(80svh * var(--ratio))); }
.player__bar {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  font-size: var(--t-xs);
  background: linear-gradient(transparent, rgb(0 0 0 / .85));
}
.player__track { position: relative; flex: 1; border-top: 1px dashed var(--drift); }
.player__track span { position: absolute; left: 0; top: -1px; width: 100%; height: 1px; background: var(--cream); transform-origin: left; transform: scaleX(0); }
.player__time { font-variant-numeric: tabular-nums; }
.modal__info {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px var(--gap);
  width: min(100%, calc(70svh * 16 / 9));
  margin: 0 auto;
}
.modal__meta { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; align-content: start; }
.modal__meta dt { color: var(--drift); }
.modal__meta dd.credit { color: var(--ember); }

/* ---------- Contact (partagé) ---------- */
.contact {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr minmax(0, 34%) 1fr;
  grid-template-rows: auto 1fr;
  gap: var(--gap);
  align-items: center;
  padding: calc(var(--nav-h) + 40px) var(--gx-r) 10vh var(--gx);
}
.contact__index { grid-column: 1 / -1; align-self: start; display: flex; justify-content: space-between; }
.contact__heading { grid-column: 1; grid-row: 2; font-size: var(--t-display); line-height: .9; }
.contact__center { grid-column: 2; grid-row: 2; }
.contact__side { grid-column: 3; grid-row: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 30px; }
.contact__side .body-copy { max-width: 14em; }

/* ---------- Pied de page ---------- */
.footer { padding: 0 var(--gx-r) 20px var(--gx); overflow: hidden; }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px var(--gap);
  padding: 44px 0 24px;
  border-top: 1px dashed var(--cork);
}
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer__head { color: var(--drift); margin-bottom: 8px; }
.footer__top { margin-top: 10px; }
[data-clock] { font-variant-numeric: tabular-nums; }
.footer__mega {
  display: flex;
  justify-content: space-between;
  overflow: hidden;
  font-size: 25.4vw;
  line-height: .78;
  padding-top: .06em;
  margin: 2vh 0 1.2vw;
}
.footer__mega span { display: block; }
/* Lettres « métal » : dégradé dans la lettre (KERNEL du pied de page) */
.footer__mega span {
  background: var(--silver);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--cork);
  font-size: var(--t-xs);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --gx-r: var(--gx); --nav-h: 58px; }
  .nav__links { display: none; }
  .nav__menu { display: inline-flex; }
  .side-label { display: none; }
  .contact {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(38vh, 1fr) auto;
    align-items: start;
  }
  .contact__heading { grid-column: 1; grid-row: 2; }
  .contact__center { grid-column: 1; grid-row: 3; align-self: center; }
  .contact__side { grid-column: 1; grid-row: 4; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .modal__info { grid-template-columns: 1fr; gap: 28px; }
  .no-webgl .lens-fallback { width: min(60vw, 40vh); }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .plate, .plate::before, .plate::after, .lens-fallback span { animation: none !important; }
  .cr__in { transition: none; }
}
.no-gsap .iris { display: none; }
