/* ==========================================================================
   Synapse — V8
   Feuille de styles unique. Pas de framework : tout est ici.
   Sommaire : 1. Polices  2. Variables  3. Base  4. En-tête  5. Boutons
   6. Mises en page  7. Accueil  8. Services  9. Méthode  10. Réalisations
   11. Qui on est  12. Contact  13. Pied de page  14. Animations
   ========================================================================== */

/* 1. Polices (auto-hébergées : rien n'est chargé chez Google, plus simple pour le RGPD) */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* 2. Variables */
:root {
  /* Encre : le fond, légèrement bleuté comme le logo */
  --ink-0: oklch(0.15 0.026 255);
  --ink-1: oklch(0.18 0.03 255);
  --ink-2: oklch(0.22 0.034 255);
  --ink-3: oklch(0.28 0.036 255);
  --line: oklch(0.42 0.03 255 / 0.45);
  --line-strong: oklch(0.6 0.03 255 / 0.5);

  --text: oklch(0.965 0.008 230);
  --text-2: oklch(0.84 0.018 240);
  --text-3: oklch(0.72 0.022 245);

  /* Deux couleurs avec un rôle précis :
     menthe = ce qui est relié, automatique, fiable (la marque)
     braise = ce qui frotte : saisie manuelle, erreurs, temps perdu */
  --mint: oklch(0.9 0.17 170);
  --mint-2: oklch(0.8 0.14 172);
  --mint-soft: oklch(0.9 0.17 170 / 0.12);
  --on-mint: oklch(0.2 0.05 190);
  --ember: oklch(0.78 0.15 52);
  --ember-soft: oklch(0.78 0.15 52 / 0.12);

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Échelle typographique fluide (ratio ~1.3) */
  --step--1: clamp(0.84rem, 0.81rem + 0.12vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.15rem);
  --step-3: clamp(1.95rem, 1.5rem + 2.1vw, 3.25rem);
  --step-4: clamp(2.45rem, 1.6rem + 4vw, 5.2rem);

  --space-s: clamp(0.75rem, 0.7rem + 0.3vw, 1rem);
  --space-m: clamp(1.25rem, 1rem + 1vw, 2rem);
  --space-l: clamp(2rem, 1.5rem + 2.5vw, 4rem);
  --space-xl: clamp(3.5rem, 2.5rem + 5vw, 7.5rem);

  --gutter: clamp(1.25rem, 0.6rem + 3.5vw, 4rem);
  --max: 1240px;
  --header-h: 68px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Échelle des plans (z-index) */
  --z-gl: 0;
  --z-content: 1;
  --z-sticky: 10;
  --z-header: 20;
  --z-menu: 30;
  --z-toast: 40;

  color-scheme: dark;
}

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--ink-0);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  font-stretch: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  font-stretch: 116%;
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 760; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.2; letter-spacing: -0.01em; font-stretch: 108%; }
strong { font-weight: 650; color: var(--text); }
::selection { background: var(--mint); color: var(--on-mint); }

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

.skip {
  position: absolute; left: 1rem; top: -100px; z-index: var(--z-toast);
  background: var(--mint); color: var(--on-mint); padding: .6rem 1rem; border-radius: 6px;
  font-weight: 650; text-decoration: none;
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--text-2); max-width: 38ch; }
.muted { color: var(--text-2); }
.small { font-size: var(--step--1); color: var(--text-3); }
.mono { font-family: var(--mono); font-size: 0.86em; letter-spacing: 0; }
.prose { max-width: 62ch; color: var(--text-2); }
.prose p:last-child { margin-bottom: 0; }
.mint { color: var(--mint); }
.ember { color: var(--ember); }

/* 4. En-tête */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  height: var(--header-h);
  view-transition-name: site-header;
  transition: background-color .4s var(--ease-out), border-color .4s var(--ease-out), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: oklch(0.15 0.026 255 / 0.82);
  border-bottom-color: var(--line);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 2rem; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; font-weight: 720; font-stretch: 118%; font-size: 1.12rem; letter-spacing: -0.01em;
}
.brand img { width: 30px; height: 30px; border-radius: 50%; }
.nav { display: flex; gap: .25rem; margin-left: auto; }
.nav a {
  position: relative; padding: .5rem .8rem; border-radius: 6px;
  text-decoration: none; color: var(--text-2); font-size: .95rem; font-weight: 500;
  transition: color .2s;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .2rem; height: 2px;
  background: var(--mint); border-radius: 2px;
}
.menu-btn {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line-strong); color: var(--text);
  font: 600 .9rem var(--font); padding: .5rem .9rem; border-radius: 999px; cursor: pointer;
}
.mobile-menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  background: var(--ink-0);
  padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
  display: flex; flex-direction: column; gap: .25rem;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  text-decoration: none; font-size: var(--step-3); font-weight: 720; font-stretch: 116%;
  padding: .35rem 0; border-bottom: 1px solid var(--line);
}
.mobile-menu a[aria-current="page"] { color: var(--mint); }
.mobile-menu .btn { margin-top: 1.5rem; font-size: 1rem; font-stretch: 105%; padding: .95rem 1.35rem; align-self: flex-start; border-bottom: 0; }
.mobile-menu-close {
  position: absolute; top: 14px; right: var(--gutter);
  background: none; border: 1px solid var(--line-strong); color: var(--text);
  font: 600 .9rem var(--font); padding: .5rem .9rem; border-radius: 999px; cursor: pointer;
}



/* 5. Boutons & liens */
.btn {
  --bg: var(--mint); --fg: var(--on-mint);
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--bg); color: var(--fg);
  font: 650 .98rem/1 var(--font); font-stretch: 105%;
  padding: .95rem 1.35rem; border-radius: 8px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -12px oklch(0.9 0.17 170 / 0.55); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform .25s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--ghost { --bg: transparent; --fg: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--text-2); box-shadow: none; }
.btn--small { padding: .62rem 1rem; font-size: .9rem; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--mint); text-decoration: none; font-weight: 600;
  border-bottom: 1px solid oklch(0.9 0.17 170 / 0.35); padding-bottom: 2px;
  transition: border-color .2s, gap .25s var(--ease-out);
}
.link-arrow:hover { border-color: var(--mint); gap: .7rem; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: var(--space-m); }

/* 6. Mises en page communes */
main { position: relative; z-index: var(--z-content); }
.section { padding-block: var(--space-xl); position: relative; }
.section--tight { padding-block: var(--space-l); }
.section-head { max-width: 46rem; margin-bottom: var(--space-l); }
.section-head p { margin-top: var(--space-s); }

/* Toile WebGL */
.gl { position: fixed; inset: 0; z-index: var(--z-gl); width: 100%; height: 100%; pointer-events: none; }
.gl canvas { width: 100% !important; height: 100% !important; }
.no-webgl .gl { display: none; }
.gl-fallback { display: none; }
.no-webgl .gl-fallback { display: block; }

/* Voile pour garder le texte lisible devant la 3D */
.scrim { position: relative; }
.scrim::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, oklch(0.15 0.026 255 / 0.95) 0%, oklch(0.15 0.026 255 / 0.86) 38%, oklch(0.15 0.026 255 / 0.4) 54%, oklch(0.15 0.026 255 / 0) 68%);
}
@media (max-width: 900px) {
  .scrim::before { background: oklch(0.15 0.026 255 / 0.62); }
}


/* Présentations « étape par étape » (film.js)
   Sans 3D : les étapes se lisent comme des sections normales.
   Avec 3D (.is-film) : la section reste à l'écran, chaque geste passe à l'étape suivante. */
html { scrollbar-gutter: stable; }
html.film-lock { overflow: hidden; }
.film { position: relative; }
.film-gl { display: none; }
.gl-ready .film-gl { display: block; }
.film-gl canvas { width: 100% !important; height: 100% !important; }
.film-step { position: relative; z-index: 1; padding-block: var(--space-l); }
.film-step:first-child { padding-top: calc(var(--header-h) + var(--space-xl)); }
.gl-ready .film:not(.is-film) .film-gl { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.gl-ready .film:not(.is-film) .film-step { background: oklch(0.15 0.026 255 / 0.62); }

.is-film .film-pin { position: sticky; top: 0; overflow: hidden; }
.is-film .film-gl { position: absolute; inset: 0; z-index: 0; }
.is-film .film-step {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--header-h) + 1rem) 0 clamp(2.4rem, 7vh, 5rem);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .45s var(--ease-out), visibility 0s linear .45s;
}
.is-film .film-step.is-active { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .7s var(--ease-out) .25s, visibility 0s; }
.is-film .film-step::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(0deg, oklch(0.15 0.026 255 / 0.94) 0%, oklch(0.15 0.026 255 / 0.72) 26%, oklch(0.15 0.026 255 / 0) 50%);
}
.is-film .film-step--hero, .is-film .film-step--left { justify-content: center; }
.is-film .film-step--hero::before, .is-film .film-step--left::before {
  background: linear-gradient(90deg, oklch(0.15 0.026 255 / 0.95) 0%, oklch(0.15 0.026 255 / 0.86) 36%, oklch(0.15 0.026 255 / 0.4) 54%, oklch(0.15 0.026 255 / 0) 68%);
}
.is-film .film-step .panel > * { transform: translateY(18px); opacity: 0; transition: transform .9s var(--ease-out), opacity .9s var(--ease-out); }
.is-film .film-step.is-active .panel > * { transform: none; opacity: 1; }
.is-film .film-step.is-active .panel > :nth-child(1) { transition-delay: .3s; }
.is-film .film-step.is-active .panel > :nth-child(2) { transition-delay: .42s; }
.is-film .film-step.is-active .panel > :nth-child(3) { transition-delay: .54s; }
.is-film .film-step.is-active .panel > :nth-child(4) { transition-delay: .66s; }
.is-film .film-step.is-active .panel > :nth-child(5) { transition-delay: .78s; }

.panel { max-width: 40rem; }
.panel .count { display: flex; align-items: center; gap: .7rem; font-family: var(--mono); font-size: .8rem; color: var(--mint); margin: 0 0 .9rem; }
.panel .count::after { content: ""; width: 2.5rem; height: 1px; background: currentColor; opacity: .5; }
.panel h2 { font-size: var(--step-3); max-width: 17ch; }
.panel > p { font-size: var(--step-1); line-height: 1.45; color: var(--text-2); max-width: 40ch; margin: 1rem 0 0; }
.panel > p strong { color: var(--text); font-weight: 600; }
.panel .link-arrow { margin-top: 1.2rem; }
.panel .actions { margin-top: 1.6rem; }
.film-step--hero .panel { max-width: 62rem; }
.film-step--hero .panel h1 { max-width: 18ch; font-stretch: 110%; }
.film-step--hero .panel h1 .line { display: block; }
.film-step--hero .panel .lead { margin-top: var(--space-m); max-width: 40ch; }

.is-film.film--split .panel { max-width: min(34rem, calc(50vw - var(--gutter) - 2.5rem)); }
.is-film.film--split .film-gl { left: 48%; }
.is-film.film--split .film-step { justify-content: center; }
.is-film.film--split .film-step::before { background: linear-gradient(90deg, var(--ink-0) 0%, var(--ink-0) 44%, oklch(0.15 0.026 255 / 0) 60%); }
.gl-ready .film--split:not(.is-film) .film-gl { opacity: 0; }

.film-dots, .film-skip, .film-hint { display: none; }
.is-film .film-dots {
  display: flex; flex-direction: column; gap: .75rem;
  position: absolute; z-index: 4; right: clamp(.9rem, 2.2vw, 2.2rem); top: 50%; transform: translateY(-50%);
}
.film-dots button {
  all: unset; position: relative; width: 9px; height: 9px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid oklch(0.72 0.022 245 / 0.7);
  transition: background-color .3s, border-color .3s, transform .35s var(--ease-out);
}
.film-dots button::before { content: ""; position: absolute; inset: -8px; }
.film-dots button:hover { border-color: var(--text); }
.film-dots button[aria-current="step"] { background: var(--mint); border-color: var(--mint); transform: scale(1.35); }
.film-dots button::after {
  content: attr(data-label); position: absolute; right: 22px; top: 50%; transform: translate(4px, -50%);
  white-space: nowrap; font: 500 .74rem/1 var(--mono); color: var(--text);
  background: oklch(0.15 0.026 255 / 0.92); border: 1px solid var(--line); padding: .4rem .55rem; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease-out);
}
.film-dots button:hover::after, .film-dots button:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.film-dots button:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
.is-film .film-skip {
  display: inline-flex; gap: .4rem; position: absolute; z-index: 4; right: clamp(.9rem, 2.2vw, 2.2rem); bottom: 1.1rem;
  background: none; border: 0; padding: .4rem .2rem; cursor: pointer; color: var(--text-3); font: 500 .78rem var(--mono);
}
.film-skip:hover { color: var(--text); }
.is-film.is-last .film-skip { visibility: hidden; }
.is-film .film-hint {
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  position: absolute; z-index: 4; right: clamp(.9rem, 2.2vw, 2.2rem); bottom: 3.4rem; translate: 35% 0;
  font: 500 .7rem var(--mono); color: var(--text-3); opacity: 0; transition: opacity .6s; pointer-events: none;
}
.film-hint span { width: 1px; height: 28px; background: linear-gradient(var(--mint), transparent); transform-origin: top; animation: hint 1.8s var(--ease-in-out) infinite; }
.is-film.is-idle .film-hint { opacity: 1; }
@keyframes hint { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 760px) {
  .is-film .film-dots { gap: .6rem; right: .55rem; }
  .film-dots button::after { display: none; }
  .is-film .film-step { padding-bottom: 2.6rem; }
  .is-film .film-step--hero::before { background: oklch(0.15 0.026 255 / 0.66); }
  .is-film .film-step--left::before { background: linear-gradient(0deg, oklch(0.15 0.026 255 / 0.96) 0%, oklch(0.15 0.026 255 / 0.85) 48%, oklch(0.15 0.026 255 / 0) 68%); }
  .panel { padding-right: 1.2rem; }
  .panel > p { font-size: 1.05rem; }
}

/* Page d'en-tête simple (pages intérieures) */
.page-hero { padding-top: calc(var(--header-h) + var(--space-xl)); padding-bottom: var(--space-l); }
.page-hero h1 { max-width: 15ch; }
.page-hero .lead { margin-top: var(--space-m); max-width: 44ch; }

/* 7. Accueil */
.hero {
  min-height: 100svh; display: flex; align-items: center;
  padding-top: var(--header-h);
}
.hero h1 { max-width: 18ch; font-stretch: 110%; }
.hero h1 .line { display: block; }
.hero .lead { margin-top: var(--space-m); max-width: 40ch; }
.hero-note {
  margin-top: var(--space-l); display: flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .8rem; color: var(--text-3);
}
.hero-note::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ember);
  box-shadow: 0 0 0 4px var(--ember-soft);
}

/* Teaser étude de cas */
.case-teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-l); align-items: start; }
.case-teaser h2 { font-size: var(--step-3); max-width: 14ch; }
.case-meta { font-family: var(--mono); font-size: .8rem; color: var(--text-3); margin-bottom: 1rem; }
.case-teaser .prose { margin: var(--space-m) 0 var(--space-m); }
@media (max-width: 900px) { .case-teaser { grid-template-columns: 1fr; } }

/* Comparatif avant / après (utilisé sur accueil et réalisations) */
.ba { border: 1px solid var(--line); border-radius: 12px; background: var(--ink-1); overflow: hidden; }
.ba-switch { display: flex; padding: .35rem; gap: .35rem; border-bottom: 1px solid var(--line); }
.ba-switch label {
  flex: 1; text-align: center; padding: .55rem .75rem; border-radius: 7px; cursor: pointer;
  font-weight: 600; font-size: .9rem; color: var(--text-2); transition: background-color .25s, color .25s;
}
.ba-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ba-switch input:focus-visible + label { outline: 2px solid var(--mint); outline-offset: 2px; }
.ba-switch input[value="avant"]:checked + label { background: var(--ember-soft); color: var(--ember); }
.ba-switch input[value="apres"]:checked + label { background: var(--mint-soft); color: var(--mint); }
.ba-panel { padding: 1.25rem 1.35rem 1.4rem; display: none; }
.ba:has(input[value="avant"]:checked) .ba-panel[data-side="avant"],
.ba:has(input[value="apres"]:checked) .ba-panel[data-side="apres"] { display: block; animation: ba-in .45s var(--ease-out); }
.ba-panel ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.ba-panel li {
  counter-increment: s; display: grid; grid-template-columns: 1.6rem 1fr; gap: .5rem;
  padding: .55rem 0; border-top: 1px dashed var(--line); color: var(--text-2);
}
.ba-panel li:first-child { border-top: 0; }
.ba-panel li::before { content: counter(s, decimal-leading-zero); font-family: var(--mono); font-size: .78rem; padding-top: .2rem; }
.ba-panel[data-side="avant"] li::before { color: var(--ember); }
.ba-panel[data-side="apres"] li::before { color: var(--mint); }
.ba-foot { margin: .9rem 0 0; font-size: var(--step--1); color: var(--text-3); }
@keyframes ba-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Méthode en bref (accueil) */
.brief { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-m); margin-top: var(--space-l); }
.brief div { border-top: 1px solid var(--line-strong); padding-top: 1rem; }
.brief h3 { margin-bottom: .5rem; }
.brief p { color: var(--text-2); margin: 0; }
@media (max-width: 760px) { .brief { grid-template-columns: 1fr; } }

.final-cta { text-align: left; }
.final-cta h2 { max-width: 16ch; }

/* 8. Services */
.chapter-index { font-family: var(--mono); font-size: .8rem; color: var(--mint); margin-bottom: 1rem; }
.chapter h2 { font-size: var(--step-3); max-width: 14ch; margin-bottom: var(--space-m); }
.chapter .symptom {
  font-size: var(--step-1); line-height: 1.45; color: var(--text); max-width: 34ch;
  padding-left: 0; margin-bottom: var(--space-m);
}
.chapter .symptom::before { content: "« "; color: var(--ember); }
.chapter .symptom::after { content: " »"; color: var(--ember); }
.chapter dl { margin: 0; display: grid; gap: 1.1rem; max-width: 40rem; }
.chapter dt { font-weight: 650; font-size: .95rem; margin-bottom: .25rem; }
.chapter dd { margin: 0; color: var(--text-2); }
.chapter ul { margin: .25rem 0 0; padding-left: 1.1rem; color: var(--text-2); }
.chapter ul li { margin: .2rem 0; }
.chapter ul li::marker { color: var(--mint); }
.stack { font-family: var(--mono); font-size: .78rem; color: var(--text-3); margin-top: var(--space-m); }
.also { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--space-l); align-items: start; }
@media (max-width: 860px) { .also { grid-template-columns: 1fr; } }
.nots { list-style: none; margin: 0; padding: 0; }
.nots li { padding: 1rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: .25rem 1.5rem; }
.nots li:last-child { border-bottom: 1px solid var(--line); }
.nots strong { font-weight: 650; }
.nots span { color: var(--text-2); }
@media (max-width: 640px) { .nots li { grid-template-columns: 1fr; } }

/* 9. Méthode */
.step-num { font-family: var(--mono); font-size: .85rem; color: var(--mint); display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.step-num::after { content: ""; height: 1px; width: 3rem; background: var(--mint); opacity: .5; }
.deliverable {
  margin-top: var(--space-m); padding: 1rem 1.1rem; border-radius: 10px;
  background: var(--mint-soft); border: 1px solid oklch(0.9 0.17 170 / 0.25);
}
.deliverable b { display: block; font-size: .8rem; font-family: var(--mono); font-weight: 500; color: var(--mint); margin-bottom: .3rem; }
.deliverable p { margin: 0; color: var(--text); }

.faq { max-width: 52rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.25rem 2.5rem 1.25rem 0; position: relative;
  font-size: var(--step-1); font-weight: 620; font-stretch: 106%;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .25rem; top: 50%; translate: 0 -50%;
  font-family: var(--mono); font-weight: 400; color: var(--mint); font-size: 1.4rem; transition: rotate .3s var(--ease-out);
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details > div { padding: 0 0 1.4rem; color: var(--text-2); max-width: 60ch; }
.faq details > div p:last-child { margin: 0; }

/* 10. Réalisations */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--space-l); }
.chip {
  border: 1px solid var(--line-strong); background: transparent; color: var(--text-2);
  font: 550 .9rem var(--font); padding: .5rem .95rem; border-radius: 999px; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--ink-0); border-color: var(--text); }

.projects { display: grid; gap: 0; }
.project {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--space-m) var(--space-l);
  padding-block: var(--space-l); border-top: 1px solid var(--line);
}
.project:last-child { border-bottom: 1px solid var(--line); }
.project[hidden] { display: none; }
.project-head h2 { font-size: var(--step-3); max-width: 13ch; margin: .4rem 0 1rem; }
.project-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-family: var(--mono); font-size: .78rem; color: var(--text-3); }
.status { display: inline-flex; align-items: center; gap: .4rem; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.status--wip::before { background: var(--ember); }
.project-head .prose { margin-top: .5rem; }
.project .stack { margin-top: 1rem; }
.project--small { padding-block: var(--space-m); align-items: start; }
.project--small .project-head h2 { font-size: var(--step-2); margin-bottom: 0; }
.project--small .prose { max-width: 52ch; }
@media (max-width: 900px) { .project, .project--small { grid-template-columns: 1fr; } }

.demo-note {
  margin-top: var(--space-l); padding: 1.25rem 1.4rem; border: 1px dashed var(--line-strong); border-radius: 12px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
}
.demo-note p { margin: 0; max-width: 46ch; }

/* 11. Qui on est */

/* Réseau de neurones (qui on est) */
.studio-intro { padding-top: calc(var(--header-h) + var(--space-l)); padding-bottom: 0; }
.studio-intro h1 { max-width: 16ch; font-size: clamp(2.4rem, 1.5rem + 3.6vw, 4.6rem); }
.studio-intro .lead { margin-top: var(--space-m); max-width: 52ch; }
.net { position: relative; margin-top: var(--space-m); }
.net-gl { position: relative; height: clamp(460px, 76vh, 780px); }
.net-gl canvas { width: 100% !important; height: 100% !important; }
.net-legend {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-m);
  padding-top: var(--space-s); border-top: 1px solid var(--line);
}
.net-legend h3 { font-size: .95rem; font-stretch: 105%; margin-bottom: .35rem; display: flex; align-items: center; gap: .5rem; }
.net-legend p { margin: 0; color: var(--text-2); font-size: var(--step--1); line-height: 1.55; }
.net-legend .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); flex: none; }
.net-legend .dot--paul { background: var(--text); }
.net-legend .dot--back { background: var(--ember); }
.net-hint { font-family: var(--mono); font-size: .76rem; color: var(--text-3); margin-top: .9rem; }
@media (max-width: 820px) { .net-legend { grid-template-columns: 1fr; } .net-gl { height: 78vh; } }
.tags { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { font-family: var(--mono); font-size: .76rem; color: var(--text-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: .3rem .65rem; }
.tags--mint li { color: var(--mint); border-color: oklch(0.9 0.17 170 / 0.35); }

.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l); }
@media (max-width: 820px) { .people { grid-template-columns: 1fr; } }
.person-photo {
  aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--ink-2);
  border: 1px solid var(--line); position: relative; margin-bottom: 1.25rem; max-width: 340px;
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.25) contrast(1.05); }
.person-photo .initial {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(5rem, 4rem + 6vw, 9rem); font-weight: 800; font-stretch: 125%; color: var(--ink-3);
  letter-spacing: -0.04em;
}
.person-photo img + .initial { display: none; }
.person-name { font-size: var(--step-2); font-stretch: 116%; }
.person .role { font-family: var(--mono); font-size: .82rem; color: var(--mint); margin: .35rem 0 1rem; }
.person p { color: var(--text-2); max-width: 46ch; }

.commitments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-l); }
.commitments div { padding: 1.35rem 0; border-top: 1px solid var(--line); }
.commitments h3 { margin-bottom: .45rem; }
.commitments p { margin: 0; color: var(--text-2); }
@media (max-width: 760px) { .commitments { grid-template-columns: 1fr; } }

/* 12. Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--space-l); align-items: start; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }
.form fieldset { border: 0; margin: 0 0 var(--space-l); padding: 0; min-width: 0; }
.form legend { font-size: var(--step-2); font-weight: 700; font-stretch: 114%; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 1rem; padding: 0; display: flex; align-items: baseline; gap: .8rem; }
.form legend .mono { color: var(--mint); font-size: .8rem; font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label {
  border: 1px solid var(--line-strong); border-radius: 999px; padding: .55rem 1rem; cursor: pointer;
  color: var(--text-2); font-weight: 520; transition: background-color .2s, color .2s, border-color .2s;
  user-select: none;
}
.chips label:hover { color: var(--text); border-color: var(--text-3); }
.chips input:checked + label { background: var(--mint-soft); border-color: var(--mint); color: var(--mint); }
.chips input:focus-visible + label { outline: 2px solid var(--mint); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .fields { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 560; font-size: .92rem; margin-bottom: .4rem; }
.field label .opt { color: var(--text-3); font-weight: 400; }
.field input, .field textarea {
  width: 100%; background: var(--ink-1); border: 1px solid var(--line-strong); color: var(--text);
  font: 400 1rem/1.5 var(--font); padding: .8rem .9rem; border-radius: 8px;
  transition: border-color .2s, background-color .2s;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); opacity: 1; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--mint); background: var(--ink-2); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--ember); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-legal { font-size: var(--step--1); color: var(--text-3); margin-top: 1rem; max-width: 52ch; }
.form-status { margin-top: 1rem; font-weight: 550; }
.form-status.is-error { color: var(--ember); }
.form-done { border: 1px solid oklch(0.9 0.17 170 / 0.35); background: var(--mint-soft); border-radius: 14px; padding: 2rem; }
.form-done h2 { font-size: var(--step-3); margin-bottom: 1rem; }

.aside { position: sticky; top: calc(var(--header-h) + 2rem); border-left: 1px solid var(--line); padding-left: var(--space-m); }
@media (max-width: 960px) { .aside { position: static; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: var(--space-m); } }
.aside h2 { font-size: var(--step-1); margin-bottom: 1rem; }
.next-steps { list-style: none; margin: 0 0 var(--space-m); padding: 0; counter-reset: n; }
.next-steps li { counter-increment: n; display: grid; grid-template-columns: 2rem 1fr; padding: .55rem 0; color: var(--text-2); }
.next-steps li::before { content: counter(n); font-family: var(--mono); color: var(--mint); }
.direct a { color: var(--text); font-weight: 600; text-decoration-color: var(--mint); text-underline-offset: 4px; }

/* 13. Pied de page */
.site-footer { position: relative; z-index: var(--z-content); border-top: 1px solid var(--line); background: var(--ink-0); padding-block: var(--space-l) 2rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: var(--space-m); }
.footer-grid p { color: var(--text-2); max-width: 34ch; margin-top: .9rem; }
.footer-grid h3 { font-size: .8rem; font-family: var(--mono); font-weight: 500; color: var(--text-3); margin-bottom: .7rem; letter-spacing: 0; font-stretch: 100%; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: .3rem 0; }
.footer-grid a { text-decoration: none; color: var(--text-2); }
.footer-grid a:hover { color: var(--mint); }
.footer-bottom { margin-top: var(--space-l); padding-top: 1.2rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: var(--step--1); color: var(--text-3); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

@media (max-width: 900px) {
  .site-header .nav, .site-header .header-cta { display: none; }
  .site-header .menu-btn { display: inline-block; }
}

/* Pages simples (404, mentions) */
.plain { padding-top: calc(var(--header-h) + var(--space-xl)); padding-bottom: var(--space-xl); }
.plain h1 { font-size: var(--step-3); max-width: 18ch; margin-bottom: var(--space-m); }
.legal h2 { font-size: var(--step-1); margin: 2.2rem 0 .7rem; }
.legal p, .legal li { color: var(--text-2); max-width: 70ch; }
.todo { background: var(--ember-soft); color: var(--ember); padding: 0 .3em; border-radius: 4px; font-family: var(--mono); font-size: .85em; }

/* 14. Animations
   Le contenu est toujours visible par défaut : les apparitions ne font que l'accompagner
   (navigateurs compatibles uniquement, et jamais si l'utilisateur a demandé moins d'animations). */
@media (prefers-reduced-motion: no-preference) {
  .page-hero h1, .page-hero .lead, .page-hero .actions, .studio-intro h1, .studio-intro .lead {
    animation: rise .9s var(--ease-out) both;
  }
  .page-hero .lead, .studio-intro .lead { animation-delay: .28s; }
  .page-hero .actions { animation-delay: .38s; }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 45%;
    }
    .reveal-line {
      animation: reveal-line linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    .reveal-soft {
      animation: reveal-soft linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 30%;
    }
  }

  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-out .22s var(--ease-in-out) both; }
  ::view-transition-new(root) { animation: vt-in .42s var(--ease-out) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes reveal { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes reveal-line { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes reveal-soft { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* V9 — compléments */
.chapter .panel > .symptom { font-size: var(--step-1); line-height: 1.45; color: var(--text); max-width: 34ch; margin: 0 0 var(--space-m); }
.chapter .panel > .stack { font-size: .78rem; color: var(--text-3); margin-top: var(--space-m); }
.chapter .panel h2 { margin-bottom: var(--space-m); }
.film-step--left .panel { max-width: 34rem; }
.film-step--left .panel h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.8rem); max-width: 13ch; }
.film-step--left .panel .lead { margin-top: var(--space-m); max-width: 40ch; }
.film-step--left .panel h2 { font-size: var(--step-3); margin-bottom: var(--space-m); }
.film-step--left .panel .prose p { margin-bottom: .8em; }
.panel .hero-note { margin-top: var(--space-l); }
.project-meta .num { color: var(--mint); font-weight: 500; }
.final-cta { border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .film-step--left .panel h2 { font-size: var(--step-2); }
  .film-step--left .panel .prose { font-size: .98rem; }
  .is-film .film-step--left { justify-content: flex-end; }
}
