/* ───────── Tokens ───────── */
:root {
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --col: 680px;
  --pad: 32px;
  --band: 32px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --out: cubic-bezier(0.33, 1, 0.68, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  color-scheme: light;
  --bg: #FCFCFB;
  --fg: rgba(12, 12, 12, 0.92);
  --fg-soft: rgba(12, 12, 12, 0.5);
  --fg-dim: rgba(12, 12, 12, 0.3);
  --hairline: rgba(12, 12, 12, 0.09);
  --tick: rgba(12, 12, 12, 0.32);
  --hatch: rgba(12, 12, 12, 0.1);
  --chip: rgba(12, 12, 12, 0.055);
  --glass: rgba(252, 252, 251, 0.72);
  --glass-line: rgba(12, 12, 12, 0.08);
  --glass-hl: rgba(12, 12, 12, 0.07);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.08);
  --select: rgba(0, 120, 240, 0.22);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C0C0C;
  --fg: rgba(255, 255, 255, 0.92);
  --fg-soft: rgba(255, 255, 255, 0.5);
  --fg-dim: rgba(255, 255, 255, 0.28);
  --hairline: rgba(255, 255, 255, 0.09);
  --tick: rgba(255, 255, 255, 0.3);
  --hatch: rgba(255, 255, 255, 0.075);
  --chip: rgba(255, 255, 255, 0.08);
  --glass: rgba(24, 24, 24, 0.7);
  --glass-line: rgba(255, 255, 255, 0.08);
  --glass-hl: rgba(255, 255, 255, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.45);
}

@media (max-width: 820px) {
  :root { --pad: 20px; --band: 24px; }
}

/* ───────── Base ───────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
  scroll-behavior: smooth;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
body { min-height: 100vh; background: var(--bg); transition: background-color 0.4s var(--ease); }
body.is-locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { list-style: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--select); }

:focus-visible { outline: 1.5px solid #2F7CF6; outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-weight: 500; }

/* ───────── Colonne ───────── */
.col {
  position: relative;
  max-width: var(--col);
  margin: 0 auto;
  border-inline: 1px solid var(--hairline);
  min-height: 100vh;
}

/* Bande hachurée entre deux sections */
.band {
  height: var(--band);
  border-block: 1px solid var(--hairline);
  margin-block: -1px;
  background-image: repeating-linear-gradient(-45deg, transparent 0 5px, var(--hatch) 5px 6px);
}
.band--bottom { border-bottom: 0; height: calc(var(--band) * 3); }

/* Cellule avec équerres aux quatre coins.
   Tracées en bordures (même arrondi au pixel que les traits de la colonne
   et des bandes), posées pile sur ces traits : ::before = coins du haut,
   ::after = coins du bas, le milieu du trait est masqué. */
.cell {
  position: relative;
  padding: 48px var(--pad);
}
.cell::before,
.cell::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  height: 7px;
  border: 1px solid var(--tick);
  pointer-events: none;
  z-index: 2;
  -webkit-mask: linear-gradient(90deg, #000 7px, transparent 7px calc(100% - 7px), #000 calc(100% - 7px));
          mask: linear-gradient(90deg, #000 7px, transparent 7px calc(100% - 7px), #000 calc(100% - 7px));
}
.cell::before { top: 0; border-bottom: 0; }
.cell::after { bottom: 0; border-top: 0; }

.cell__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 20px;
}
.cell__head h2 {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--fg-soft);
  letter-spacing: -0.005em;
}
.cell__intro {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--fg-soft);
  margin: -6px 0 24px;
  max-width: 46ch;
}

/* ───────── Reveal (flou → net) ───────── */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(10px);
  }
  [data-reveal].is-in {
    opacity: 1;
    filter: blur(0);
    transform: none;
    transition:
      opacity 0.9s var(--ease) var(--d, 0ms),
      filter 0.9s var(--ease) var(--d, 0ms),
      transform 0.9s var(--ease) var(--d, 0ms);
  }
}

/* ───────── Loader ───────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__n {
  font-family: var(--font); font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  width: 44px;
  padding: 3px 0;
  text-align: center;
  border-radius: 5px;
  background: var(--chip);
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* ───────── Hero ───────── */
.hero { padding-top: 0; }

.field {
  position: relative;
  height: 260px;
  margin: 0 calc(var(--pad) * -1);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.field__canvas { display: block; width: 100%; height: 100%; }
.field .sticker { width: 72px; height: 72px; }
.field__hint { position: absolute; right: 14px; bottom: 12px; z-index: 3; font-size: 0.75rem; color: var(--fg-dim); pointer-events: none; transition: opacity 0.4s; }
.field.is-playing .field__hint { opacity: 0; }
@media (hover: none), (max-width: 820px) { .field__hint { display: none; } }

/* Stickers posés au repos dans le hero */
.sticker.sticker--rest { opacity: 1; }
.sticker--rest > span { transform: scale(0); }
.sticker--rest svg { animation: sticker-float var(--t, 5s) ease-in-out var(--d, 0s) infinite alternate; }
@keyframes sticker-float { to { transform: translateY(-5px) rotate(3deg); } }

.hero__id {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  margin-bottom: 32px;
}
.avatar {
  position: relative;
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, #3A3A3A 0%, #121212 70%);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--hairline);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero__name { padding-bottom: 4px; }
.hero__name h1 { font-size: 1.125rem; letter-spacing: -0.02em; line-height: 1.25; }
.hero__name p { font-size: 1rem; color: var(--fg-soft); letter-spacing: -0.01em; }

/* Texte d'accroche : gris, mots-clés en pleine couleur */
.statement {
  font-size: clamp(1.125rem, 2.1vw, 1.3125rem);
  line-height: 1.38;
  letter-spacing: -0.018em;
  color: var(--fg-soft);
}
.statement p + p { margin-top: 0.75em; }
.statement--sm { font-size: clamp(1.0625rem, 1.9vw, 1.1875rem); margin-bottom: 20px; }
.hl { color: var(--fg); }
@keyframes pulse { 0% { opacity: 0.7; } 40% { opacity: 0.45; } 100% { opacity: 1; } }
@media (hover: hover) { .hl:not(.link):hover { animation: pulse 0.55s ease-out forwards; } }

/* Lien avec flèche qui se déploie */
.link {
  display: inline-flex;
  align-items: center;
  border-radius: 0.35em;
  margin-inline: -0.02em;
  padding-inline: 0.02em;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 calc(100% - 0.06em);
  background-repeat: no-repeat;
  background-color: transparent;
  transition: background-color 0.45s var(--ease), padding 0.45s var(--ease), margin 0.45s var(--ease), background-size 0.3s var(--ease);
}
.link__arrow {
  display: inline-block;
  width: 0;
  height: 0.62em;
  opacity: 0;
  overflow: hidden;
  background: currentColor;
  -webkit-mask: var(--arrow) center / 0.62em no-repeat;
          mask: var(--arrow) center / 0.62em no-repeat;
  transition: width 0.45s var(--ease), margin 0.45s var(--ease), opacity 0.2s;
}
:root {
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9 9 3M4.2 3H9v4.8' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --arrow-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 2v8M2.6 6.6 6 10l3.4-3.4' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.link__arrow--down { -webkit-mask-image: var(--arrow-down); mask-image: var(--arrow-down); }
@media (hover: hover) {
  .link:hover {
    background-color: var(--chip);
    background-size: 0 1px;
    padding-inline: 0.28em 0.22em;
    margin-inline: -0.12em;
  }
  .link:hover .link__arrow { width: 0.7em; margin-left: 0.12em; opacity: 1; }
}

/* Infos clés */
.facts {
  margin-top: 32px;
  display: grid;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--fg);
}
.facts li { display: flex; align-items: center; gap: 0.5em; flex-wrap: wrap; }
.facts__k { color: var(--fg-soft); }
.facts__link {
  border-bottom: 1px solid var(--fg-dim);
  transition: border-color 0.25s var(--ease);
}
.facts__link:hover { border-color: var(--fg); }
.flag {
  width: 15px;
  height: 10.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, #1F3E8F 0 33.3%, #F5F5F5 33.3% 66.6%, #D2283A 66.6%);
  box-shadow: 0 0 0 0.5px var(--hairline);
}

/* ───────── Listes ───────── */
.list { position: relative; }
.rows > li + li { border-top: 1px solid var(--hairline); }
@media (hover: hover) {
  .list > li { transition: opacity 0.3s var(--ease); }
  .list:hover > li:not(:hover) { opacity: 0.4; }
}

.row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  width: 100%;
  padding: 13px 0;
  text-align: left;
  cursor: pointer;
}
.row__year {
  flex: none;
  width: 2.6rem;
  font-size: 0.875rem;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
}
.row__name {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  white-space: nowrap;
  transition: transform 0.35s var(--ease);
}
.row__name small { font-size: 0.875rem; color: var(--fg-soft); letter-spacing: -0.005em; }
.row__go {
  width: 0.62em;
  height: 0.62em;
  align-self: center;
  background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
          mask: var(--arrow) center / contain no-repeat;
  opacity: 0;
  transform: translate(-4px, 3px);
  transition: opacity 0.25s, transform 0.35s var(--ease);
}
.row__leader {
  flex: 1 1 auto;
  min-width: 1em;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font); font-variant-numeric: tabular-nums;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  opacity: 0.55;
  user-select: none;
}
.row__leader::before { content: "··································································································································"; }
.row__tags { flex: none; display: flex; gap: 4px; align-self: center; }
.chip {
  font-family: var(--font); font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--chip);
  color: var(--fg-soft);
  white-space: nowrap;
}
.row--static { cursor: default; }

/* Petits logos devant un nom (comme sur les refs : carré, coins arrondis, taille du texte) */
.logo {
  display: inline-block;
  flex: none;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.32em;
  border-radius: 0.22em;
  object-fit: cover;
  vertical-align: -0.1em;
  box-shadow: 0 0 0 0.5px var(--hairline);
}
.row__name .logo { align-self: center; margin-right: 0.12em; }
.logo--code {
  display: inline-grid;
  place-items: center;
  width: 2em;
  height: 2em;
  font-size: 0.42em;
  border-radius: 0.5em;
  background: var(--chip);
  color: var(--fg-soft);
  font-family: var(--font); font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}
@media (hover: hover) {
  .row:not(.row--static):hover .row__name { transform: translateX(3px); }
  .row:hover .row__go { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .row__year { display: none; }
  .row__leader { display: none; }
  .row__tags { margin-left: auto; }
  .row__tags .chip + .chip { display: none; }
  .row__name small { display: none; }
}

/* ───────── Approche ───────── */
.phases {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 32px;
  align-items: center;
}
@media (max-width: 640px) {
  .phases { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .screen { order: -1; }
}

/* Étapes */
.phases__list > li + li { border-top: 1px solid var(--hairline); }
.phase {
  position: relative;
  display: block;
  width: 100%;
  padding: 13px 0;
  text-align: left;
  color: var(--fg-soft);
  cursor: default;
  transition: color 0.35s var(--ease);
}
@media (hover: none) { .phase { cursor: pointer; } }
.phase.is-active { color: var(--fg); }
.phase__head { display: flex; align-items: baseline; gap: 14px; font-size: 1.0625rem; letter-spacing: -0.015em; }
.phase__n { flex: none; width: 1.1rem; font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 0.6875rem; color: var(--fg-dim); }
.phase__d {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.5s var(--ease), opacity 0.35s var(--ease);
}
.phase__d > span { min-height: 0; overflow: hidden; }
.phase__txt { display: block; padding: 6px 0 2px calc(1.1rem + 14px); font-size: 0.875rem; line-height: 1.5; color: var(--fg-soft); }
.phase.is-active .phase__d { grid-template-rows: 1fr; opacity: 1; }
.phase__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--fg);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
}
.phases.is-auto .phase.is-active .phase__bar { opacity: 0.45; animation: phase-bar 3.4s linear forwards; }
@keyframes phase-bar { to { transform: scaleX(1); } }

/* Écran */
.screen {
  position: relative;
  aspect-ratio: 3 / 2;
  container-type: inline-size;
  /* Les étiquettes de specs cachées ne doivent pas créer de scroll horizontal ;
     la marge laisse passer l'ombre et la rotation des post-its */
  overflow: clip;
  overflow-clip-margin: 12px;
}
.screen__body { position: absolute; inset: 0; }

/* Les 6 éléments qui se transforment (tailles relatives à la zone) */
.atom {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  transform: rotate(var(--r));
  border: 1px solid transparent;
  border-radius: 2px;
  background-color: transparent;
  --pc: #FFE9A6;
  --pi: #5C4300;
  transition:
    left 0.85s var(--ease) var(--t),
    top 0.85s var(--ease) var(--t),
    width 0.85s var(--ease) var(--t),
    height 0.85s var(--ease) var(--t),
    transform 0.85s var(--ease) var(--t),
    background-color 0.5s var(--ease) var(--t),
    border-color 0.5s var(--ease) var(--t),
    border-radius 0.5s var(--ease) var(--t),
    box-shadow 0.5s var(--ease) var(--t);
}
.atom--pink { --pc: #FBD5E2; --pi: #6B1F3B; }

/* Textes superposés : un seul visible selon l'étape */
.atom > span {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.atom__note {
  align-items: flex-start;
  padding: 2.4cqi;
  font-family: "Caveat", "Segoe Print", cursive;
  font-weight: 500;
  font-size: max(11px, 4.2cqi);
  line-height: 1.05;
  color: var(--pi);
}
.atom__ui { align-items: center; padding: 0 2.6cqi; font-size: max(9.5px, 3.4cqi); color: var(--fg); white-space: nowrap; }
.atom__kpi { align-items: center; padding: 0 2.4cqi; font-size: max(9.5px, 3.1cqi); color: var(--bg); white-space: nowrap; }
.atom > .atom__lbl,
.atom > .atom__tag { inset: auto; display: block; white-space: nowrap; }
.atom > .atom__lbl { left: 0; bottom: calc(100% + 1cqi); font-size: max(8.5px, 2.8cqi); color: var(--fg-soft); }
.atom > .atom__tag {
  left: calc(100% + 3.6cqi);
  top: 50%;
  transform: translateY(-50%);
  padding: 0.3cqi 1.2cqi;
  border-radius: 0.8cqi;
  background: #E5484D;
  color: #fff;
  font-family: var(--font); font-variant-numeric: tabular-nums;
  font-size: max(8px, 2.3cqi);
}

/* 1 et 2 : post-its (en vrac, puis rangés par thème) */
.screen.is-notes .atom,
.screen.is-kpi .r-knote {
  background-color: var(--pc);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06), 0 6px 12px -8px rgba(0, 0, 0, 0.3);
}
.screen.is-notes .atom__note { opacity: 1; transition-delay: calc(var(--t) + 0.3s); }

/* Sections façon FigJam (étape 2) */
.frame {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 31%;
  border: 1px solid var(--hairline);
  border-radius: 2cqi;
  background: color-mix(in srgb, var(--fg) 3.5%, var(--bg));
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.frame span {
  position: absolute;
  left: 2cqi;
  top: 2cqi;
  padding: 0.5cqi 1.6cqi;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--bg);
  font-size: max(8.5px, 2.7cqi);
  font-weight: 500;
  color: var(--fg);
}
.screen[data-stage="1"] .frame {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s var(--ease) var(--d), transform 0.6s var(--ease) var(--d);
}

/* 3 et 4 : l'écran (chaque post-it devient un élément d'interface) */
.screen.is-ui .atom__ui { opacity: 1; transition-delay: calc(var(--t) + 0.35s); }
.screen.is-ui .atom__lbl { opacity: 1; transition-delay: calc(var(--t) + 0.4s); }
.screen.is-ui .r-field { background-color: var(--bg); border-color: var(--hairline); border-radius: 1.6cqi; }
.screen.is-ui .r-callout { background-color: rgba(47, 107, 255, 0.08); border-radius: 1.6cqi; }
.screen.is-ui .r-btn { background-color: var(--fg); border-radius: 1.6cqi; }
.r-title .atom__ui { padding: 0; font-size: max(11px, 4.6cqi); font-weight: 500; letter-spacing: -0.02em; }
.r-callout .atom__ui { gap: 1.6cqi; font-size: max(9px, 3cqi); color: #1D4ED8; white-space: normal; }
.r-callout .atom__ui::before {
  content: "i";
  flex: none;
  display: grid;
  place-items: center;
  width: 3.6cqi;
  height: 3.6cqi;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font); font-variant-numeric: tabular-nums;
  font-size: max(7px, 2.2cqi);
}
:root[data-theme="dark"] .r-callout .atom__ui { color: #93B4FF; }
.r-btn .atom__ui { justify-content: center; padding: 0; color: var(--bg); font-size: max(9.5px, 3.3cqi); font-weight: 500; }
.r-link .atom__ui { padding: 0; font-size: max(9px, 3cqi); color: var(--fg-soft); text-decoration: underline; text-underline-offset: 0.5cqi; }

/* 4 : livrer = la passation, en mode specs */
.atom::after {
  content: "";
  position: absolute;
  inset: -1.2cqi;
  border: 1px dashed #E5484D;
  border-radius: 1.6cqi;
  opacity: 0;
  transition: opacity 0.25s;
}
.screen.is-spec .atom::after { opacity: 1; transition: opacity 0.35s var(--ease) calc(var(--t) + 0.15s); }
.screen.is-spec .atom__ui { opacity: 0.45; }
.screen.is-spec .atom__tag { opacity: 1; transition-delay: calc(var(--t) + 0.45s); }
/* Petit trait qui relie l'étiquette au contour de l'élément */
.atom > .atom__tag::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: 2.4cqi;
  height: 1px;
  background: #E5484D;
}
.spec-num {
  position: absolute;
  transform: translateY(-50%);
  padding: 0.2cqi 1cqi;
  border-radius: 0.8cqi;
  background: #E5484D;
  color: #fff;
  font-family: var(--font); font-variant-numeric: tabular-nums;
  font-size: max(8px, 2.3cqi);
  opacity: 0;
  transition: opacity 0.25s;
}
.screen.is-spec .spec-num { opacity: 1; transition: opacity 0.35s var(--ease) var(--d); }

/* 5 : suivre = l'entonnoir du parcours, la chute entourée, un nouveau post-it */
.screen.is-kpi .r-bar { background-color: var(--fg); border-radius: 1cqi; }
.screen.is-kpi .atom__kpi { opacity: 1; transition-delay: calc(var(--t) + 0.4s); }
.r-ktitle .atom__kpi { padding: 0; color: var(--fg-soft); font-size: max(9.5px, 3.1cqi); }
.r-bar .atom__kpi { justify-content: center; font-weight: 500; }
.r-knote .atom__kpi {
  align-items: flex-start;
  padding: 2.4cqi;
  color: var(--pi);
  font-family: "Caveat", "Segoe Print", cursive;
  font-weight: 500;
  font-size: max(11px, 4.4cqi);
  line-height: 1.05;
  white-space: normal;
}

/* Traits rouges : cotes (Livrer) et feutre (Suivre), qui se dessinent */
.marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.marks path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition: opacity 0.25s, stroke-dashoffset 0s 0.25s;
}
.mk-spec { stroke: #E5484D; stroke-width: 1; }
.mk-kpi { stroke: #D9482B; stroke-width: 1.7; }
.screen.is-spec .mk-spec,
.screen.is-kpi .mk-kpi {
  opacity: 1;
  stroke-dashoffset: 0;
  transition: opacity 0.1s var(--d), stroke-dashoffset 0.7s var(--ease) var(--d);
}
/* Zones de liaison de l'entonnoir : simple fondu, pas de tracé */
.marks .mk-funnel,
.marks .mk-drop { stroke: none; stroke-dasharray: none; transition: opacity 0.25s; }
.mk-funnel { fill: color-mix(in srgb, var(--fg) 8%, transparent); }
.mk-drop { fill: rgba(217, 72, 43, 0.18); }
.screen.is-kpi .mk-funnel,
.screen.is-kpi .mk-drop { opacity: 1; transition: opacity 0.5s var(--ease) var(--d); }

/* ───────── Lab ───────── */
.lab { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .lab { grid-template-columns: 1fr; } }
.lab__card { display: block; }
.lab__stage {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  overflow: hidden;
  background: var(--bg);
  transition: border-color 0.3s var(--ease);
  /* Les plaques des figures Hairline prennent le fond de la page, dans les deux thèmes */
  --hairline-plate: var(--bg);
}
.lab__card:hover .lab__stage { border-color: var(--fg-dim); }
.lab__figure { width: 100%; }
.lab__card h3 { font-size: 0.9375rem; letter-spacing: -0.01em; margin-top: 12px; }
.lab__card p { font-size: 0.875rem; line-height: 1.45; color: var(--fg-soft); margin-top: 2px; }

/* ───────── Liens contact ───────── */
.links { border-top: 1px solid var(--hairline); }
.links > li { border-bottom: 1px solid var(--hairline); }
.links__row { display: flex; align-items: baseline; gap: 16px; padding: 13px 0; }
.links__k { width: 5.5rem; flex: none; font-size: 0.875rem; color: var(--fg-soft); }
.links__v { font-size: 1rem; letter-spacing: -0.012em; transition: transform 0.35s var(--ease); }
.links__go { margin-left: auto; align-self: center; width: 0.7em; height: 0.7em; background: currentColor; -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; opacity: 0.35; transition: opacity 0.25s, transform 0.35s var(--ease); }
@media (hover: hover) {
  .links__row:hover .links__v { transform: translateX(3px); }
  .links__row:hover .links__go { opacity: 1; transform: translate(2px, -2px); }
}
.hint { margin-top: 18px; font-size: 0.8125rem; color: var(--fg-soft); display: flex; align-items: center; gap: 0.45em; }
kbd {
  font-family: var(--font); font-variant-numeric: tabular-nums;
  font-size: 0.6875rem;
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--chip);
  color: var(--fg);
  box-shadow: inset 0 -1px 0 var(--hairline);
}
@media (hover: none) { .hint { display: none; } }

/* ───────── Footer ───────── */
.foot { padding-top: 32px; padding-bottom: 120px; overflow: hidden; }
.foot__cols { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-size: 0.875rem; line-height: 1.6; color: var(--fg-soft); pointer-events: none; }
.foot__cols a, .foot__cols button { pointer-events: auto; }
.foot__links a, .foot__meta a, .sound-btn { transition: color 0.2s var(--ease); }
.foot__links a:hover, .foot__meta a:hover, .sound-btn:hover { color: var(--fg); }
.foot__hint { position: absolute; left: var(--pad); bottom: 28px; z-index: 3; font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 0.75rem; color: var(--fg-dim); pointer-events: none; transition: opacity 0.4s; }
.foot.is-playing .foot__hint { opacity: 0; }
@media (hover: none), (max-width: 820px) { .foot__hint { display: none; } .foot { padding-bottom: 48px; } }

.sound-btn { display: inline-flex; align-items: center; gap: 0.4em; text-align: left; }
.sound-ico { width: 1.05rem; height: 1.05rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sound-ico path:first-child { fill: currentColor; stroke: none; }
.sound-ico__slash { stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset 0.32s var(--ease); }
.sound-ico__wave { transition: opacity 0.25s; }
[aria-pressed="false"] .sound-ico__slash { stroke-dashoffset: 0; }
[aria-pressed="false"] .sound-ico__wave { opacity: 0.25; }

/* Traînée de stickers */
.trail { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.sticker { position: absolute; top: 0; left: 0; width: 64px; height: 64px; opacity: 0; will-change: transform; }
.sticker > span { display: block; width: 100%; height: 100%; }
.sticker svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.16)); overflow: visible; }

/* ───────── Dock ───────── */
.dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 50;
  transform: translate(-50%, 140%);
  transition: transform 0.7s var(--ease) 0.15s;
}
.dock.is-on { transform: translate(-50%, 0); }
.dock__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
          backdrop-filter: blur(24px) saturate(1.6);
}
.dock__glider {
  position: absolute;
  top: 5px;
  left: 0;
  height: calc(100% - 10px);
  width: 0;
  border-radius: 11px;
  background: var(--glass-hl);
  opacity: 0;
  transition: transform 0.45s var(--ease), width 0.45s var(--ease), opacity 0.25s;
  pointer-events: none;
}
.dock__item, .dock__icon {
  position: relative;
  z-index: 1;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  color: var(--fg-soft);
  transition: color 0.25s var(--ease);
}
.dock__item { padding: 0 12px; }
.dock__item.is-active, .dock__item:hover, .dock__icon:hover { color: var(--fg); }
.dock__icon { width: 36px; }
.dock__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.dock__icon .fill { fill: currentColor; stroke: none; }
.dock__sep { width: 1px; height: 18px; background: var(--hairline); margin: 0 4px; }
@media (max-width: 520px) {
  .dock { bottom: 12px; }
  .dock__item { padding: 0 8px; font-size: 0.8125rem; }
  .dock__icon.js-sound { display: none; }
}

/* ───────── Aperçu projet ───────── */
.peek {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 520px;
  height: 325px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6);
  transform-origin: right bottom;
  box-shadow: var(--shadow);
  transition: opacity 240ms var(--out), transform 240ms var(--out);
}
.peek.is-on { opacity: 1; transform: none; transition-duration: 380ms; }
@media (max-width: 1180px), (hover: none) { .peek { display: none; } }

/* Couverture générée */
.cover {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--accent, #222);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 255, 0.22), transparent 60%),
    repeating-linear-gradient(-45deg, transparent 0 9px, rgba(255, 255, 255, 0.07) 9px 10px);
}
.cover__name {
  position: absolute;
  left: 7%;
  bottom: 13%;
  right: 7%;
  font-size: clamp(1.5rem, 4.4cqi, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}
.cover__meta, .cover__year {
  position: absolute;
  top: 8%;
  font-family: var(--font); font-variant-numeric: tabular-nums;
  font-size: 11px;
  opacity: 0.75;
}
.cover__meta { left: 7%; }
.cover__year { right: 7%; }
.cover__ui {
  position: absolute;
  right: -6%;
  bottom: -14%;
  width: 46%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  transform: rotate(-6deg);
}
.cover__ui::before, .cover__ui::after { content: ""; position: absolute; left: 10%; height: 7%; border-radius: 4px; background: rgba(255, 255, 255, 0.35); }
.cover__ui::before { top: 14%; width: 46%; }
.cover__ui::after { top: 30%; width: 70%; opacity: 0.6; }
.cover--has-img::before, .cover--has-img .cover__ui { display: none; }
.peek .cover { container-type: inline-size; }
.peek .cover__name { font-size: 2rem; }

/* ───────── Toast ───────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 70;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.8125rem;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 8px) scale(0.9);
  transition: opacity 0.25s var(--ease), transform 0.4s var(--spring);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ───────── Étude de cas ───────── */
.case {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.4s var(--ease), background-color 0.4s var(--ease);
}
.case.is-on { opacity: 1; }
.case__scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }
.case__col {
  transform: translateY(24px);
  filter: blur(6px);
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
}
.case.is-on .case__col { transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .case__col { transform: none; filter: none; } }

.case__bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 10px;
  margin-left: -10px;
  border-radius: 9px;
  font-size: 0.875rem;
  color: var(--fg-soft);
  transition: background-color 0.3s var(--ease), color 0.2s;
}
.back:hover { background: var(--chip); color: var(--fg); }
.back svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease); }
.back:hover svg { transform: translateX(-2px); }
.case__pos { font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 0.6875rem; color: var(--fg-dim); }

.case__title { font-size: clamp(1.75rem, 4.6vw, 2.5rem); letter-spacing: -0.035em; line-height: 1.05; }
.case__client { font-size: 0.875rem; color: var(--fg-soft); margin-bottom: 14px; }
.case__lead { margin-top: 18px; }
.meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 32px;
  border-top: 1px solid var(--hairline);
}
.meta div { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.meta div:nth-child(odd) { padding-right: 16px; }
.meta dt { font-size: 0.75rem; color: var(--fg-soft); margin-bottom: 2px; }
.meta dd { font-size: 0.9375rem; letter-spacing: -0.01em; }
@media (max-width: 560px) { .meta { grid-template-columns: 1fr; } }

.case__cover { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; container-type: inline-size; }
.case__cover .cover__name { font-size: clamp(2rem, 9cqi, 4.5rem); }

.block { display: grid; grid-template-columns: 9rem 1fr; gap: 16px; }
.block + .block { margin-top: 36px; }
.block h2 { font-size: 0.875rem; font-weight: 400; color: var(--fg-soft); padding-top: 2px; }
.block p, .block li { font-size: 1rem; line-height: 1.55; letter-spacing: -0.01em; }
.block ol { counter-reset: s; display: grid; gap: 12px; }
.block ol li { position: relative; padding-left: 2.1rem; counter-increment: s; }
.block ol li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 0.28em; font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 0.6875rem; color: var(--fg-dim); }
@media (max-width: 640px) { .block { grid-template-columns: 1fr; gap: 6px; } }

/* Visuels de l'étude de cas : un par ligne, posés sur un fond teinté de la couleur du projet */
.shots { display: grid; gap: 14px; }
.shot {
  margin: 0;
  min-width: 0;
  padding: clamp(14px, 4.5%, 34px);
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--bg)), color-mix(in srgb, var(--accent) 17%, var(--bg)));
}
:root[data-theme="dark"] .shot { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--bg)), color-mix(in srgb, var(--accent) 34%, var(--bg))); }
.shot__open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 14px 36px rgba(0, 0, 0, 0.14);
  transition: transform 0.4s var(--ease);
}
.shot__open:hover img { transform: scale(1.01); }
/* Écrans mobiles et paires : déjà détourés, ils flottent sur le fond */
.shot--float img { border-radius: 0; box-shadow: none; }
.shot--empty {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--hairline);
  background-image: repeating-linear-gradient(-45deg, transparent 0 7px, var(--hatch) 7px 8px);
  display: grid;
  place-items: center;
}

/* Zoom plein écran */
.zoom {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 3vmin;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.22s var(--ease);
}
.zoom[hidden] { display: none; }
.zoom.is-on { opacity: 1; }
.zoom img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.shot span { font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 0.75rem; color: var(--fg-dim); background: var(--bg); padding: 4px 8px; border-radius: 4px; }

.draft-note { display: flex; gap: 10px; align-items: baseline; font-size: 0.9375rem; color: var(--fg-soft); line-height: 1.5; }

.next { display: flex; align-items: baseline; gap: 16px; padding: 4px 0; }
.next__k { font-size: 0.875rem; color: var(--fg-soft); }
.next__name { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -0.03em; transition: transform 0.4s var(--ease); }
.next__go { margin-left: auto; align-self: center; width: 1rem; height: 1rem; background: currentColor; -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; transition: transform 0.4s var(--ease); }
.next:hover .next__name { transform: translateX(4px); }
.next:hover .next__go { transform: translate(3px, -3px); }

/* ───────── Mobile ───────── */
@media (max-width: 820px) {
  .col { border-inline: 0; }
  .cell { padding-block: 36px; }
  .cell::before, .cell::after { left: 0; right: 0; }
  .field { height: 200px; }
  .avatar { width: 64px; height: 64px; font-size: 1.0625rem; }
  .hero__id { margin-top: 22px; }
  .case__col { padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
