/* ─────────────────────────────────────────────────────────────
   V2 — feuille de style.
   Construite au fil des recommandations design.
   ───────────────────────────────────────────────────────────── */

/* ---------- Fonts ---------- */

/* Geist + Geist Mono (Vercel, licence SIL OFL 1.1 — voir fonts/Geist-LICENSE.txt). Variables : wght 100→900.
   WF Visual Sans (fonts/WFVisualSansVF.woff2) est conservée mais n'est plus chargée. */
@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2-variations"),
       url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Work Sans (variable wght 100→900, licence SIL OFL 1.1 — fonts/WorkSans-LICENSE.txt).
   Découpée en latin / latin étendu : le navigateur ne charge que le fichier nécessaire. */
@font-face {
  font-family: "Work Sans";
  src: url("../fonts/WorkSans-Variable-latin.woff2") format("woff2-variations"),
       url("../fonts/WorkSans-Variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  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: "Work Sans";
  src: url("../fonts/WorkSans-Variable-latin-ext.woff2") format("woff2-variations"),
       url("../fonts/WorkSans-Variable-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  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;
}

/* Space Grotesk (texte courant) — variable wght 300→700, latin, licence SIL OFL 1.1 */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Variable.woff2") format("woff2-variations"),
       url("../fonts/SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2-variations"),
       url("../fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}


/* ---------- Tokens ---------- */

:root {
  --bg: #FAFAF9;   /* ESSAI (2026-10-20) — ancienne valeur : #FFFFFF */
  --ink: #111111;
  --ink-soft: #5C5C5C;
  --line: rgba(0, 0, 0, .1);   /* couleur unique des filets et bordures neutres */
  --accent: #FF5B1F;      /* orange vif : CTA, curseur */

  /* Pilules — palette flashy */
  --c-orange: #FF5B1F;
  --c-green:  #00B86B;
  --c-violet: #7B4DFF;
  --c-blue:   #2F6BFF;
  --c-pink:   #FF3D9A;
  --c-black:  #141414;
  --c-lime:   #C6F432;
  --c-yellow: #FFD21F;
  --c-cyan:   #22D3EE;

  /* Versions foncées des pilules trop claires pour du texte (contraste ≥ 3.5 sur --bg) :
     mots en couleur et repère du sommaire des projets. */
  --c-green-ink:  #008A50;
  --c-orange-ink: #E8450A;
  --c-lime-ink:   #4C7A00;
  --c-yellow-ink: #A87700;
  --c-cyan-ink:   #0E7C93;
  --c-pink-ink:   #D1166F;

  --font-display: "Work Sans", system-ui, sans-serif;
  --display-weight: 400;  /* titres, hero et grande phrase (500 auparavant) */
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;   /* Geist et Space Grotesk essayées puis refusées */
  --lh-text: 1.55;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Transitions d'interface (switcher, boutons…) : départ retenu, arrivée franche */
  --ease-ui: cubic-bezier(1, .1, .1, 1);
  /* Rayon des CTA et contrôles (switcher, boutons) : arrondi, jamais en pilule */
  --radius-ui: 10px;
  --dur-ui: .4s;
  --section-gap: clamp(6rem, 20vh, 10rem);
  --section-pad: var(--section-gap) 0;   /* espacement vertical de toutes les sections sous le hero */
  --diff-pad-bottom: clamp(4rem, 10vh, 7rem);   /* espace bas de la section « différence » */

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 90rem;
}

/* Mobile : espacements de section resserrés */
@media (max-width: 720px) {
  :root {
    --section-gap: 3.5rem;
    --diff-pad-bottom: 3rem;
  }
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }   /* focus jamais masqué par le header (WCAG 2.2 · 2.4.11) */

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  line-height: var(--lh-text);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Espacement du texte, relatif à la taille de CHAQUE élément (un em hérité de body serait figé en px).
   :where() = priorité nulle → les titres et le bloc de code gardent leur réglage.
   Les éléments en ligne (span, em, a…) sont exclus : ils HÉRITENT de leur parent,
   sinon les mots d'un titre (découpés en <span>) perdaient le -0.05em du titre. */
:where(body, body *:not(span, em, strong, b, i, a, small, svg, svg *)) { letter-spacing: -.024em; }

/* Paragraphes : plus serrés que le reste du texte */
p { letter-spacing: -.04em; }
.btn { letter-spacing: -.024em; }   /* boutons identiques, qu'ils soient dans un <p> ou non */

img { display: block; max-width: 100%; height: auto; }

/* Les contrôles de formulaire n'héritent pas de la police par défaut (Arial 13,3 px) */
button, input, textarea, select { font: inherit; }

a { color: inherit; }

main, .site-header, .site-footer {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section, article { padding-block: 3rem; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; }

.hp { position: absolute; left: -9999px; }

/* Masqué visuellement, lu par les lecteurs d'écran */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header nav ul,
.skills ul,
.clients ul,
.stats ul,
.works-list,
.contact-links { list-style: none; padding: 0; }


/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;   /* texte centré, y compris en pleine largeur */
  text-align: center;
  padding: .9rem 1.5rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-ui);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-body);   /* même typo et même taille pour tous les CTA, <a> comme <button> */
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-ui) var(--ease-ui), color var(--dur-ui) var(--ease-ui);
}

.btn:hover { background: transparent; color: var(--ink); }

.btn--ghost { background: transparent; color: var(--ink); }

/* CTA principal orange — survol « vague ».
   Du blanc entre par le côté où arrive la souris (haut ou bas), avec un bord bombé
   dont le sommet suit le curseur (--wave-x), comme si l'orange était soulevé à cet endroit.
   Piloté par main.js (data-from, --wave-x, .is-wave) ; sans JS, :hover classique par le bas. */
.btn--accent {
  --wave-x: 50%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  transition: color var(--dur-wave) var(--ease-wave), background-color 0s;
}

.btn--accent::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 100%;
  left: calc(var(--wave-x) - 100%);   /* 200 % de large : couvre tout, où que soit le sommet */
  width: 200%;
  height: 220%;
  background: #fff;
  border-radius: 50% 50% 0 0 / 50% 50% 0 0;   /* bord bombé = la vague */
  transition:
    transform var(--dur-wave) var(--ease-wave),
    border-radius var(--dur-wave) var(--ease-wave);
}

/* Neutralise le .btn:hover générique (fond transparent) : c'est la vague qui gère le survol */
.btn--accent:hover { background-color: var(--accent); color: #fff; }

/* Entrée par le haut : la forme part d'au-dessus, bombée vers le bas */
.btn--accent[data-from="top"]::before {
  top: auto;
  bottom: 100%;
  border-radius: 0 0 50% 50% / 0 0 50% 50%;
}

/* État couvert (+8 px de débord : plus de liseré orange au bord) */
.btn--accent.is-wave,
.btn--accent:not([data-wave]):hover {
  color: var(--accent);
  background-color: #fff;
  transition: color var(--dur-wave) var(--ease-wave), background-color 0s linear calc(var(--dur-wave) * .8);
}

.btn--accent.is-wave::before,
.btn--accent:not([data-wave]):hover::before {
  transform: translateY(calc(-100% + 8px));
  border-radius: 0;
}

.btn--accent[data-from="top"].is-wave::before { transform: translateY(calc(100% - 8px)); }

.btn--accent.no-anim::before { transition: none; }

:root {
  --dur-wave: .6s;
  --ease-wave: cubic-bezier(0, 0, 0, 1);   /* part tout de suite (pas de délai), freine en fin */
}
.btn--ghost:hover { background: var(--ink); color: var(--bg); }


/* ---------- Header : pilule flottante ---------- */

.site-header {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;   /* marque | liens centrés | CTA */
  align-items: center;
  gap: 1.5rem;
  max-width: min(72rem, calc(100% - 2 * var(--gutter)));
  margin: 12px auto 0;
  padding: .5rem;   /* symétrique : les liens tombent pile au centre */
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-ui) + .5rem);   /* concentrique avec le CTA (padding .5rem) */
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
}

.brand {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.125rem;
  letter-spacing: -.055em;
  padding-left: .9rem;   /* + .5rem du header = 1.4rem */
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav ul {
  display: flex;
  align-items: center;
  gap: .25rem 1.5rem;
  margin: 0;
  font-size: .9375rem;
}

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }

/* Sélecteur de langue : globe + code de l'autre langue, discret à côté du CTA */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .6rem .7rem;
  border-radius: var(--radius-ui);
  color: var(--ink-soft);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  transition: color var(--dur-ui) var(--ease-ui), background var(--dur-ui) var(--ease-ui);
}
.lang-switch:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
.lang-switch svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.6; }

.site-header nav a { color: var(--ink-soft); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }

.site-header .nav-cta {
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.15rem;
  border-radius: var(--radius-ui);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  transition: transform var(--dur-ui) var(--ease-ui), box-shadow var(--dur-ui) var(--ease-ui);
}

.site-header .nav-cta:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 91, 31, .35);
}

@media (max-width: 860px) {
  .site-header nav { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: clamp(2rem, 6vh, 4rem) 0;   /* les pilules tombent directement sur le filet */
  border-bottom: 1px solid var(--line);
  text-align: center;
}

/* ESSAI : trame de points de la carte en fond du hero, pleine largeur, fondue en haut */
.hero--dots { position: relative; isolation: isolate; }

.hero--dots::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -6rem;   /* passe sous la barre de navigation */
  bottom: 0;
  left: 50%;
  width: calc(100vw - var(--sbw, 0px));
  transform: translateX(-50%);
  background-image: radial-gradient(circle, rgba(0, 0, 0, .11) 1px, transparent 1.4px);
  background-size: 14px 14px;
  background-position: center top;
  /* 2 masques combinés (intersection) : fondu en haut + « trou » elliptique au centre,
     derrière le titre et l'intro, pour garder le texte sur fond propre. */
  -webkit-mask-image:
    linear-gradient(to bottom, transparent, #000 30%),
    radial-gradient(ellipse 36% 52% at 50% 46%, transparent 0%, transparent 45%, #000 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(to bottom, transparent, #000 30%),
    radial-gradient(ellipse 36% 52% at 50% 46%, transparent 0%, transparent 45%, #000 100%);
          mask-composite: intersect;
  pointer-events: none;
}

@media (max-width: 720px) {
  .hero--dots::before {
    background-image: radial-gradient(circle, rgba(0, 0, 0, .15) 1px, transparent 1.4px);   /* un peu plus marqués sur mobile */
    -webkit-mask-image:
      linear-gradient(to bottom, transparent, #000 30%),
      radial-gradient(ellipse 62% 50% at 50% 44%, transparent 0%, transparent 40%, #000 100%);
            mask-image:
      linear-gradient(to bottom, transparent, #000 30%),
      radial-gradient(ellipse 62% 50% at 50% 44%, transparent 0%, transparent 40%, #000 100%);
  }
}

/* Badge de preuve : visages des clients */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 clamp(1.25rem, 3vh, 2rem);
  padding: .3rem .9rem .3rem .35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
  font-size: .8125rem;
  font-weight: 500;
}

.hero-badge-faces { display: flex; }

.hero-badge-faces img {
  width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
}

.hero-badge-faces img + img { margin-left: -8px; }

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.5rem, 7.4vw, 4rem);   /* les 2 lignes tiennent même à 320px */
  line-height: 1.08;
  letter-spacing: -.02em;
  text-wrap: balance;
}

/* Titre sur deux lignes imposées : phrase / bloc de code + emoji */
.hero-variant { display: block; }
.hero-variant[hidden] { display: none; }
.hero-title-line { display: block; white-space: nowrap; }

/* Mobile : « qui passent en prod » + emoji remplit toute la largeur du contenu
   (la ligne mesure ~9,75 × la taille du titre) ; « Je design des maquettes » peut passer sur 2 lignes. */
@media (max-width: 720px) {
  /* Taille calée sur la longueur du bloc de code de la version affichée :
     largeur du bloc ≈ (nb de caractères × 0,4144 + 0,72) × taille du titre (mesuré) */
  .hero-variant { font-size: calc((100vw - var(--sbw, 0px) - 2 * var(--gutter)) / (var(--chars, 19) * .4144 + .72 + .08)); }
  .hero-title-line:first-child { white-space: normal; line-height: 1; }
}

/* « puis je les code » : bloc de code sombre, tapé lettre par lettre */
.code-chip {
  display: inline-flex;
  align-items: center;
  margin-top: .12em;
  padding: .08em .55em .12em .42em;
  border-radius: .32em;
  background: var(--c-black);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .74em;
  font-weight: 400 !important;
  letter-spacing: -.04em;
  line-height: 1.2;
  vertical-align: middle;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  opacity: 0;
  transform: translateY(.25em) scale(.96);
  animation: chip-in var(--reveal-duration) var(--ease-reveal) forwards;
  animation-delay: calc(var(--i) * var(--reveal-stagger) + 150ms);
}

/* Largeur finale réservée dès le départ : le texte est dévoilé par un masque
   (clip-path) et le curseur avance par-dessus → aucune variation de mise en page. */
.code-chip-text {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.code-chip-typed {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  animation: type var(--type-duration) steps(var(--chars)) forwards;
  animation-delay: calc(var(--i) * var(--reveal-stagger) + 450ms);
}

.code-chip-caret {
  position: absolute;
  top: .1em;
  bottom: .1em;
  left: 0;
  width: .09em;
  background: var(--accent);
  animation:
    caret-move var(--type-duration) steps(var(--chars)) forwards,
    caret 1s steps(1) infinite;
  animation-delay: calc(var(--i) * var(--reveal-stagger) + 450ms), 0s;
}

:root { --type-duration: .7s; }

@keyframes chip-in    { to { opacity: 1; transform: none; } }
@keyframes type       { to { clip-path: inset(0 0 0 0); } }
@keyframes caret-move { to { left: calc(100% + .06em); } }
@keyframes caret      { 50% { opacity: 0; } }

/* Emoji : surgit une fois la frappe terminée */
.hero-emoji {
  display: inline-block;
  margin-left: .12em;
  font-size: .82em;
  line-height: 1;
  vertical-align: middle;
  opacity: 0;
  transform: scale(.3) rotate(-20deg);
  animation: emoji-pop .55s cubic-bezier(.34, 1.56, .64, 1) forwards;
  animation-delay: calc(var(--i) * var(--reveal-stagger) + 450ms + var(--type-duration) + 80ms);
}

@keyframes emoji-pop { to { opacity: 1; transform: none; } }

.hero-lede {
  max-width: 40rem;
  margin-top: clamp(1.25rem, 3vh, 1.75rem);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: var(--lh-text);
}

.hero-lede p { margin: 0 0 .5em; }
.hero-lede p + p { color: var(--ink-soft); }

/* ---------- Switcher Designer / Développeur ----------
   Rectangle à coins arrondis, indicateur blanc qui glisse sous l'onglet actif. */

.switcher {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  margin-top: clamp(1.5rem, 4vh, 2.25rem);
  padding: 4px;
  border-radius: calc(var(--radius-ui) + 4px);
  background: #F1F1F1;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
}

.switcher[hidden] { display: none; }

.switcher-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / var(--n));
  border-radius: calc(var(--radius-ui) - 2px);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .08);
  transform: translateX(calc(var(--active, 0) * 100%));
  transition: transform var(--dur-ui) var(--ease-ui);
}

.switcher button {
  position: relative;
  z-index: 1;
  min-width: 8.5rem;
  padding: .6rem 1.25rem;
  border: 0;
  border-radius: calc(var(--radius-ui) - 2px);
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--dur-ui) var(--ease-ui);
}

.switcher button:hover { color: var(--ink); }
.switcher button[aria-pressed="true"] { color: var(--ink); }
.switcher button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 720px) {
  .switcher button { min-width: 0; padding: .55rem 1rem; font-size: .875rem; }
}

/* ---------- Pilules ----------
   Sans JS (ou animations réduites) : pile statique en flex.
   Avec JS : .is-physics → positions pilotées par Matter.js. */

.pills {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-end;
  gap: .4rem .25rem;
  width: 100%;
  max-width: 56rem;          /* assez serré pour s'empiler, assez large pour 12 pilules */
  min-height: 170px;
  margin: .25rem 0 0;
  padding: 0;
  list-style: none;
}

.pill[hidden] { display: none; }

.pill {
  padding: .55em 1.1em;
  border-radius: 999px;
  background: var(--pill-bg, var(--c-black));
  color: var(--pill-ink, #fff);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12), 0 4px 10px rgba(0, 0, 0, .08);
  user-select: none;
  -webkit-user-select: none;
}

.pill:nth-child(3n)   { transform: rotate(-6deg); }
.pill:nth-child(3n+1) { transform: rotate(4deg); }

.pill--orange { --pill-bg: var(--c-orange); }
.pill--green  { --pill-bg: var(--c-green); }
.pill--violet { --pill-bg: var(--c-violet); }
.pill--blue   { --pill-bg: var(--c-blue); }
.pill--pink   { --pill-bg: var(--c-pink); }
.pill--black  { --pill-bg: var(--c-black); }
.pill--lime   { --pill-bg: var(--c-lime);   --pill-ink: var(--ink); }
.pill--yellow { --pill-bg: var(--c-yellow); --pill-ink: var(--ink); }
.pill--cyan   { --pill-bg: var(--c-cyan);   --pill-ink: var(--ink); }
.pill--white  { --pill-bg: #fff; --pill-ink: var(--ink); box-shadow: inset 0 0 0 1px var(--line), 0 4px 10px rgba(0, 0, 0, .06); }

.pills.is-physics {
  display: block;
  height: 175px;
  overflow: hidden;
  /* Fondu en haut : les pilules apparaissent progressivement au lieu d'une coupure nette */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 45%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 45%);
}

.pills.is-physics .pill {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-999px, -999px);
  will-change: transform;
}

@media (pointer: fine) {
  .pills.is-physics .pill { cursor: grab; }
  .pills.is-physics.is-dragging .pill { cursor: grabbing; }
}

@media (max-width: 720px) {
  .pill { font-size: .8125rem; }
  .pills.is-physics { height: 250px; }   /* 12 pilules sur une zone étroite */
}

/* ---------- Section « Ma différence » ----------
   Gauche : étiquette + grande phrase colorée, citation en bas.
   Droite : liste de points (icône fine, amorce en gras, texte gris).
   Fins traits verticaux en guise de structure. */

.difference {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(2rem, 5vw, 4rem);
  max-width: 76rem;
  margin-inline: auto;
  padding-block: var(--section-pad);   /* le bas vient de .diff-main (--diff-pad-bottom) */
}

/* Colonne gauche : reste collée pendant que la liste de droite défile */
.diff-main {
  position: sticky;
  top: 110px;   /* sous le header flottant */
  padding-bottom: var(--diff-pad-bottom);   /* ESSAI réversible (voir .difference) */
}

/* Grande phrase : grisée, couleurs au survol (souris). Sur mobile : toujours sans couleur. */
.diff-statement { filter: saturate(0); transition: filter var(--dur-ui) var(--ease-ui); }

@media (hover: hover) and (min-width: 721px) {
  .diff-statement:hover { filter: saturate(1); }
}

.diff-cta { margin: 2rem 0 0; }

.diff-quote { margin: clamp(2.5rem, 6vh, 3.5rem) 0 0; }



.diff-statement {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 2.9vw, 2.625rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.02em;
  text-wrap: pretty;
}

/* Mots colorés (palette des pilules, version lisible sur blanc) */
.tint--violet { color: var(--c-violet); stroke: var(--c-violet); }
.tint--green  { color: #00A35F;          stroke: #00A35F; }
.tint--orange { color: var(--c-orange); stroke: var(--c-orange); }
.tint--pink   { color: #E8318A;          stroke: #E8318A; }
.tint--blue   { color: var(--c-blue);   stroke: var(--c-blue); }

/* Liste de droite */
.diff-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Étapes (réf. timeline) : pastille ronde à gauche, trait vertical entre les pastilles, texte à droite.
   --node = taille des pastilles ; --node-gap = espace entre pastille et trait (12px). */
.diff-list { --node: 44px; --node-gap: 12px; }

.diff-item {
  position: relative;
  display: grid;
  grid-template-columns: var(--node) minmax(0, 1fr);
  column-gap: 1.25rem;
  padding-bottom: 3.5rem;
}

.diff-item:last-child { padding-bottom: 0; }

/* Trait entre deux pastilles (sous chaque étape sauf la dernière) */
.diff-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: calc(var(--node) + var(--node-gap));
  bottom: var(--node-gap);
  left: calc(var(--node) / 2);
  width: 1px;
  background: var(--line);
}

/* Desktop : le dernier point reprend l'espace bas de la section (= colonne de gauche) */
@media (min-width: 861px) {
  .diff-item:last-child { padding-bottom: var(--diff-pad-bottom); }
}

.diff-tiles { display: block; width: var(--node); height: var(--node); }

/* Pastille ronde : fond blanc, filet gris clair ; icône/logo en noir et blanc au repos */
.tile-icon {
  display: grid;
  place-items: center;
  width: var(--node);
  height: var(--node);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  transition: border-color var(--dur-ui) var(--ease-ui), color var(--dur-ui) var(--ease-ui);
}

.tile-icon svg { width: 20px; height: 20px; }
.tile-icon--line svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.tile-icon--img img { width: 22px; height: 22px; }
.tile-icon--img img,
.tile-icon--photo img { filter: saturate(0); transition: filter var(--dur-ui) var(--ease-ui); }

/* Photo de Sookie : ronde, sans filet */
.tile-icon--photo { overflow: hidden; border: 0; margin-bottom: 12px; }   /* demandé : 12px sous la photo de Sookie (mobile + desktop) */
.tile-icon--photo img { width: 100%; height: 100%; object-fit: cover; }

@media (hover: hover) {
  .diff-item:hover .tile-icon { border-color: var(--tile-color, var(--ink)); }
  .diff-item:hover .tile-icon--line { color: var(--tile-color, var(--ink)); }
  .diff-item:hover .tile-icon--img img,
  .diff-item:hover .tile-icon--photo img { filter: saturate(1); }
}

/* Texte : la 1re ligne est centrée verticalement sur la pastille */
.diff-item p { padding-top: calc((var(--node) - 1em * 1.55) / 2); }

.diff-item p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: var(--lh-text);
}

.diff-item strong { color: var(--ink); font-weight: 500; }

/* Citation */
.diff-quote-top { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }

.diff-quote-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

.diff-quote-mark {
  display: block;
  height: .55em;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
}

.diff-quote blockquote { margin: 0; }

.diff-quote blockquote p {
  max-width: 36rem;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: var(--lh-text);
}

.diff-quote figcaption { margin-top: 1rem; color: var(--ink-soft); font-size: .9375rem; }
.diff-quote figcaption strong { color: var(--ink); font-weight: 500; }

/* Mobile : une colonne, la liste devient un carrousel horizontal (défilement manuel) */
@media (max-width: 860px) {
  .difference {
    grid-template-columns: 1fr;
    row-gap: 3rem;
  }
  .diff-main { position: static; }
  .difference { padding-bottom: var(--section-gap); }   /* de l'air avant le filet des projets */

}

/* ---------- Bandeau gris pleine largeur ----------
   Fond gris léger, quasi collé aux bords de l'écran (--band-gap), coins arrondis.
   Le contenu garde sa largeur (max-width de la section intérieure).
   --sbw = largeur de la barre de scroll (main.js), pour ne jamais déborder. */
.band {
  --band-gap: 12px;
  --band-pad: var(--gutter);
  --band-w: calc(100vw - var(--sbw, 0px) - var(--band-gap) * 2);
  width: var(--band-w);
  margin-left: calc(50% - (100vw - var(--sbw, 0px)) / 2 + var(--band-gap));
  padding-inline: var(--band-pad);
  overflow: hidden;   /* le carrousel est coupé aux bords arrondis */
  border-radius: 28px;
  background: #F7F7F7;   /* gris très clair */
}

/* Variante transparente : sert seulement de repère de largeur au carrousel */
.band--bare { background: none; overflow: visible; }

@media (max-width: 720px) {
  .band { --band-gap: 8px; --band-pad: calc(var(--gutter) - 8px); border-radius: 22px; }
}

/* Variante blanche : pleine largeur, filet gris clair en haut (comme les autres séparations) */
.band--plain { --band-gap: 0px; --band-pad: var(--gutter); border-top: 1px solid var(--line); border-radius: 0; background: var(--bg); }

/* ---------- Projets : mosaïque (reprise de la V1) ----------
   3 colonnes, dense ; tailles de cartes définies dans projects.json (card.size).
   Images en N&B au repos, couleur + zoom + infos au survol. Mobile : 1 colonne. */

.works,
.quotes {
  max-width: 76rem;
  margin-inline: auto;
  padding-block: var(--section-pad);
}

/* En-tête de section centré (Projets) : même rythme que Témoignages / FAQ */
.section-head--center { max-width: 44rem; margin: 0 auto clamp(2.5rem, 5vh, 3.5rem); text-align: center; }

#projets {
  padding-bottom: var(--section-gap);   /* suivi du filet des témoignages : il faut de l'air */
  border-top: 1px solid var(--line);
}

/* En-tête : titre à gauche, texte à droite */
.works-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: end;
  gap: 1.5rem clamp(2rem, 6vw, 5rem);
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

@media (max-width: 860px) {
  .works-head { grid-template-columns: 1fr; }
}


.works-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 2.9vw, 2.625rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.04em;
}

.works-title em { font-style: normal; color: var(--c-violet); }

.works-lede {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: var(--lh-text);
}

/* ---------- Carrousel de projets ----------
   Cartes de même taille, alignées sur la colonne des projets ; au glisser elles débordent
   jusqu'aux bords du bandeau. Défilement natif (scroll-snap) + glisser souris (main.js).
   --works-w = largeur réelle de la colonne ; --bleed = espace entre colonne et bord du bandeau. */
.slider {
  --works-w: min(76rem, calc(var(--band-w) - var(--band-pad) * 2));
  --bleed: calc((var(--band-w) - var(--works-w)) / 2 + var(--works-pad, 0px));   /* aligné sur le contenu de .works */
  --slide-w: clamp(21rem, 43vw, 39rem);
  --slide-gap: 16px;
}

.slider-track {
  display: flex;
  gap: var(--slide-gap);
  margin: 0 calc(var(--bleed) * -1);
  padding: 0 var(--bleed) .5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--bleed);
  scrollbar-width: none;
  list-style: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.slider-track::-webkit-scrollbar { display: none; }
.slider-track.is-dragging { cursor: grabbing; }
.slider-track.is-dragging,
.slider-track.is-gliding { scroll-snap-type: none; }   /* calage coupé pendant le glisser et l'animation de fin */
.slider-track.is-dragging .slide-link { pointer-events: none; }
.slider-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 12px; }

.slide { flex: 0 0 var(--slide-w); scroll-snap-align: start; }

.slide-link { display: block; color: inherit; text-decoration: none; }

.slide-media {
  display: block;
  aspect-ratio: 1440 / 900;   /* même format pour toutes les images (16:10) */
  overflow: hidden;
  border-radius: 16px;
  background: #E9E9E9;
}

.slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
  transition: transform .8s var(--ease-wave), filter .8s var(--ease-ui);
}

/* Projets : images en noir et blanc tant que le carrousel n'est pas au centre de l'écran */
.slider[data-saturate] .slide-media img { filter: saturate(0); }
.slider[data-saturate].is-saturated .slide-media img { filter: saturate(1); }

.slide-meta {
  display: block;
  margin-top: 1rem;
  opacity: .64;
  color: var(--ink-soft);
  font-size: .875rem;
}

.slide-title {
  display: block;
  margin-top: .35rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -.02em;
}

.slide-tag { display: block; margin-top: .25rem; color: var(--ink-soft); font-size: .9375rem; line-height: var(--lh-text); }

.slide-more {
  display: inline-flex;
  gap: .35rem;
  margin-top: .75rem;
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 500;
}

.slide-more span { transition: transform var(--dur-ui) var(--ease-ui); }

@media (hover: hover) {
  .slide-link:hover .slide-media img { transform: scale(1.04); }
  .slide-link:hover .slide-more span { transform: translateX(4px); }
}

.slide-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 16px; }

/* Tirets (actif = long et noir) + flèches */
.slider-ui {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
}

.slider-dots { display: flex; flex-wrap: wrap; gap: 4px; }

.slider-dot {
  width: 24px;
  height: 24px;   /* zone de clic ≥ 24 px (WCAG 2.2 · 2.5.8) */
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.slider-dot::before {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: #CFCFCF;
  transition: background var(--dur-ui) var(--ease-ui);
}

.slider-dot[aria-current="true"] { width: 40px; }
.slider-dot[aria-current="true"]::before { background: var(--ink); }
.slider-dot:hover::before { background: #9A9A9A; }
.slider-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.slider-dot { transition: width var(--dur-ui) var(--ease-ui); }

.slider-arrows { display: flex; gap: 8px; }

.slider-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-ui);
  background: #fff;
  cursor: pointer;
  transition: background var(--dur-ui) var(--ease-ui), border-color var(--dur-ui) var(--ease-ui);
}

.slider-arrow svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.slider-arrow:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); }
.slider-arrow:hover:not(:disabled) svg { stroke: #fff; }
.slider-arrow:disabled { opacity: .35; cursor: default; }
.slider-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 720px) {
  .slider { --slide-w: 84vw; }
  .slider-arrows { display: none; }   /* au doigt : swipe natif + tirets */
}

/* ---------- Témoignages : mosaïque qui défile en continu (desktop) ----------
   Colonnes façon masonry, fondu haut et bas par masque. Mobile : rangée horizontale au doigt. */

/* Pas d'ancrage de défilement : sinon le navigateur suit le bouton pendant le dépliage (« saut ») */
.quotes { overflow-anchor: none; }

.quotes-head { max-width: 44rem; margin: 0 auto clamp(2rem, 5vh, 3.5rem); text-align: center; }
.quotes-note { margin: .75rem 0 0; color: var(--ink-soft); font-size: .875rem; }

.quotes-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 2.9vw, 2.625rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.02em;
  text-wrap: balance;
}

/* Desktop : cadre à hauteur fixe, sans bordure, fondu haut et bas par masque dégradé.
   Avec JS (main.js) : colonnes qui défilent en boucle (.is-marquee).
   Sans JS ou animations réduites : le contenu défile dans le cadre ; marges haute et basse
   égales au fondu pour que le premier et le dernier avis restent lisibles en butée. */
.quotes-viewport {
  --quotes-fade: 7rem;
  position: relative;
  height: 40rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--quotes-fade), #000 calc(100% - var(--quotes-fade)), transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 var(--quotes-fade), #000 calc(100% - var(--quotes-fade)), transparent);
}

.quotes-scroll {
  height: 100%;
  padding-block: var(--quotes-fade);
  overflow-y: auto;
  scrollbar-width: none;
}

.quotes-scroll::-webkit-scrollbar { display: none; }

.quotes-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 20px; }

.quotes-wall { columns: 3 18rem; column-gap: 16px; }

/* Défilement continu : chaque piste contient ses cartes en double et remonte d'une série
   (--quotes-shift, mesuré par main.js) ; la copie prend la place de l'original, la boucle ne se voit pas. */
.quotes-scroll:has(.is-marquee) { padding-block: 0; overflow: hidden; }

.quotes-wall.is-marquee {
  display: grid;
  grid-template-columns: repeat(var(--quotes-cols, 3), minmax(0, 1fr));
  gap: 16px;
  columns: auto;
}

.quotes-track {
  display: flex;            /* pas de fusion des marges : la hauteur d'une série est exacte */
  flex-direction: column;
  animation: quotes-loop var(--quotes-dur, 40s) linear infinite;
  will-change: transform;
}

.quotes-track.is-reverse { animation-direction: reverse; }

@keyframes quotes-loop {
  to { transform: translateY(calc(var(--quotes-shift, 50%) * -1)); }
}

.quote-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0 0 16px;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  break-inside: avoid;
}

.quote-card blockquote { margin: 0; }
.quote-card blockquote p { margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: var(--lh-text); }
.quote-card figcaption { display: flex; align-items: center; gap: .75rem; color: var(--ink-soft); font-size: .875rem; line-height: var(--lh-text); }
.quote-card figcaption img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.quote-card figcaption strong { display: block; color: var(--ink); font-weight: 500; }


@media (max-width: 720px) {
}

/* ---------- Sections en deux colonnes (Parcours, FAQ, Contact) ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  align-items: start;
  gap: 2.5rem clamp(2.5rem, 6vw, 6rem);
  max-width: 76rem;
  margin-inline: auto;
  padding-block: var(--section-pad);
}

.split-aside--sticky { position: sticky; top: 110px; }

.split-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 2.9vw, 2.625rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.02em;
}

.split-title em { font-style: normal; color: var(--c-violet); }

.split-lede {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: var(--lh-text);
}

.split-actions { margin: 1.75rem 0 0; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-aside--sticky { position: static; }
}

/* Accordéons animés (details natif) — navigateurs récents ; ailleurs, ouverture instantanée */
:root { interpolate-size: allow-keywords; }

.faq-item::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size var(--dur-ui) var(--ease-ui), content-visibility var(--dur-ui) allow-discrete;
}

.faq-item[open]::details-content { block-size: auto; }

summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

/* Photo en polaroïd : cadre blanc (bas plus épais), légèrement penchée, bordure et ombre très légères */
.polaroid {
  width: clamp(9rem, 16vw, 12rem);
  margin: 0 0 2rem .25rem;
  padding: 8px 8px 30px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 8px 24px rgba(0, 0, 0, .05);
  transform: rotate(-4deg);
}

.polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px;   /* concentrique avec le cadre (12px − marge 8px, arrondi) */ }

/* Parcours : titre + expériences à gauche, grande photo + CTA à droite */
@media (min-width: 861px) {
  .career.split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}

.career-main .split-title { margin-bottom: 2rem; }
.career-aside { display: flex; flex-direction: column; align-items: center; padding-top: 1rem; }
.career-aside .polaroid { width: min(100%, 22rem); margin: 0 0 2rem; }

/* Mobile : la frise seule, sans photo ni carte, donc étapes moins espacées */
@media (max-width: 860px) {
  .career-aside { display: none; }
  .career-step:not(:last-child) { padding-bottom: 2.25rem; }
}

/* Carte du littoral (ESSAI réversible : V2_CAREER_MAP) — desktop uniquement.
   Couleurs de la charte : fond --bg, trame de points et côte en encre douce, épingles noires,
   épingle de l'étape en cours en orange (--accent) avec pulsation. */
.career-map { display: none; }

@media (min-width: 861px) {
  .career-aside.has-map .polaroid { display: none; }

  .career-map {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 1.5rem;
    aspect-ratio: 3 / 4;   /* plus haute */
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
  }

  .career-map svg { display: block; width: 100%; height: 100%; }
}

.map-dot { fill: rgba(0, 0, 0, .09); }
.map-coast path { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .55; }

.map-context { fill: var(--ink-soft); font-family: var(--font-body); font-size: 15px; letter-spacing: .02em; opacity: .6; }

.map-pin-dot { fill: var(--ink); stroke: #fff; stroke-width: 2.5; vector-effect: non-scaling-stroke; transition: fill var(--dur-ui) var(--ease-ui); }
.map-pin-pulse { fill: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; }
.map-label { fill: var(--ink); font-family: var(--font-body); font-size: 19px; font-weight: 500; letter-spacing: -.02em; paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }

.map-pin.is-active .map-pin-dot { fill: var(--accent); }
.map-pin.is-active .map-pin-pulse { animation: map-pulse 1.8s var(--ease-wave) infinite; }

.map-credit { position: absolute; right: 12px; bottom: 10px; color: var(--ink-soft); font-size: .6875rem; opacity: .7; }

@keyframes map-pulse {
  0%   { opacity: .45; transform: scale(1); }
  100% { opacity: 0;   transform: scale(4); }
}

.map-caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: .9375rem;
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .map-pin.is-active .map-pin-pulse { animation: none; }
}

/* Parcours : frise d'étapes (trait vertical + point par étape), tout visible */
.career-steps {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.career-steps::before {   /* trait de la frise */
  content: "";
  position: absolute;
  top: .5rem;
  bottom: .5rem;
  left: 5px;
  width: 1px;
  background: var(--line);
}

/* Remplissage au scroll : trait noir qui descend (--fill, en px, calculé par main.js) */
.career-steps::after {
  content: "";
  position: absolute;
  top: .5rem;
  left: 5px;
  width: 1px;
  height: var(--fill, 0px);
  max-height: calc(100% - 1rem);
  background: var(--ink);
}

.career-step { position: relative; padding: 0 0 clamp(2.25rem, 9vh, 5rem) 2.25rem; }   /* espacées : la carte change de ville moins vite */
.career-step:last-child { padding-bottom: 0; }

.career-dot {
  position: absolute;
  top: .35rem;
  left: 0;
  width: 11px;
  height: 11px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--bg);
}

.career-dot { z-index: 1; transition: background var(--dur-ui) var(--ease-ui); }
.career-step.is-reached .career-dot { background: var(--ink); }   /* point atteint par le trait */
.career-step.is-active .career-dot { border-color: var(--accent); background: var(--accent); }   /* étape active (suit le scroll) */

.career-year { margin: 0 0 .25rem; color: var(--ink-soft); font-size: .875rem; font-variant-numeric: tabular-nums; }
.career-role { margin: 0; font-size: 1.125rem; font-weight: 500; line-height: 1.35; }
.career-company { color: var(--ink-soft); font-weight: 400; }

/* Mobile : l'entreprise passe à la ligne, alignée à gauche, sans le point de séparation */
@media (max-width: 720px) {
  .career-company { display: block; }
  .career-sep { display: none; }
}
.career-desc { margin: .5rem 0 0; max-width: 38rem; color: var(--ink-soft); }

/* Desktop : la photo + CV reste collée à droite pendant la lecture des étapes */
@media (min-width: 861px) {
  .career-aside { position: sticky; top: 110px; }
}

/* ---------- FAQ : en-tête centré + cartes-accordéon ---------- */

.faq {
  max-width: 76rem;
  margin-inline: auto;
  padding-block: var(--section-gap);   /* espace en bas aussi, avant le contact */
}

.quotes-title em { font-style: normal; color: var(--c-violet); }

.faq-head { max-width: 40rem; margin: 0 auto 2.5rem; text-align: center; }

/* Étiquette au-dessus des titres de section (même style partout) */
.eyebrow-badge {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: #EFEFEC;
  color: var(--ink-soft);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.faq-lede { margin: 1rem auto 0; max-width: 28rem; color: var(--ink-soft); }

/* Liste au style du Parcours : lignes à filets, « + » qui devient « − » */
.faq-list { max-width: 42rem; margin-inline: auto; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  font-weight: 500;
}

.faq-plus { position: relative; flex: none; width: 14px; height: 14px; }
.faq-plus::before,
.faq-plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  margin-top: -.75px;
  background: var(--ink);
  transition: transform var(--dur-ui) var(--ease-ui);
}
.faq-plus::after { transform: rotate(90deg); }
.faq-item[open] .faq-plus::after { transform: rotate(0); }

.faq-item p { margin: 0; padding: 0 2.5rem 1.5rem 0; color: var(--ink-soft); }

.faq-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem 1.25rem;
  margin: 2.5rem 0 0;
  color: var(--ink-soft);
}

/* ---------- Contact ---------- */

/* Bandeau foncé (contact) : pleine largeur, textes blancs */
.band--dark {
  border-top: 0;
  border-radius: 48px 48px 0 0;   /* coins hauts arrondis, le bas se fond dans le pied de page */
  background: var(--ink);
  color: #fff;
}

@media (max-width: 720px) {
  .band--dark { border-radius: 24px 24px 0 0; }
}

/* Trame de points du hero, en blanc sur le fond foncé, même masque (fondu en haut + ovale dégagé au centre) */
.band--dark { position: relative; isolation: isolate; }

.band--dark::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .15) 1px, transparent 1.4px);
  background-size: 14px 14px;
  background-position: center top;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent, #000 30%),
    radial-gradient(ellipse 36% 52% at 50% 46%, transparent 0%, transparent 45%, #000 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(to bottom, transparent, #000 30%),
    radial-gradient(ellipse 36% 52% at 50% 46%, transparent 0%, transparent 45%, #000 100%);
          mask-composite: intersect;
  pointer-events: none;
}

@media (max-width: 720px) {
  .band--dark::before {
    background-image: radial-gradient(circle, rgba(255, 255, 255, .19) 1px, transparent 1.4px);
    -webkit-mask-image:
      linear-gradient(to bottom, transparent, #000 30%),
      radial-gradient(ellipse 62% 50% at 50% 44%, transparent 0%, transparent 40%, #000 100%);
            mask-image:
      linear-gradient(to bottom, transparent, #000 30%),
      radial-gradient(ellipse 62% 50% at 50% 44%, transparent 0%, transparent 40%, #000 100%);
  }
}

.band--dark .contact-title { color: #fff; }
.band--dark .eyebrow-badge { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .72); }
.band--dark .split-lede,
.band--dark .contact-links a,
.band--dark .field label,
.band--dark .form-status { color: rgba(255, 255, 255, .64); }
.band--dark .contact-links a:hover { color: #fff; }
.band--dark .contact-email a { color: #fff; }

.band--dark .contact-copy { border-color: rgba(255, 255, 255, .2); background: transparent; color: rgba(255, 255, 255, .8); }
.band--dark .contact-copy:hover { border-color: #fff; background: #fff; color: var(--ink); }
.band--dark .contact-copy.is-done { border-color: #3DDC97; background: transparent; color: #3DDC97; }

.band--dark .field input,
.band--dark .field textarea {
  border-color: rgba(255, 255, 255, .16);
  background: #1D1D1D;   /* opaque : la trame de points ne transparaît pas dans les champs */
  color: #fff;
}

.band--dark .field input:focus,
.band--dark .field textarea:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }

/* Pas de filet de pied de page juste sous le bandeau foncé */
/* Pied de page : bandeau foncé pleine largeur (dans la continuité du contact) */
.site-footer-band { background: var(--ink); color: rgba(255, 255, 255, .64); }
.site-footer-band .site-footer { border-top: 1px solid rgba(255, 255, 255, .1); color: inherit; }
body:not(:has(.band--dark)) .site-footer-band .site-footer { border-top: 0; }   /* pages sans contact foncé : pas de filet en haut */
.site-footer-band .site-footer a:hover { color: #fff; }

/* Dernière section : de l'air avant le pied de page */
#contact { padding-bottom: var(--section-gap); }

.contact-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.03em;
}

.contact-title em { font-style: normal; color: var(--accent); }
.contact-emoji { display: inline-block; font-size: .85em; }

.contact-email { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 2rem; }
.contact-email a { letter-spacing: -.024em; font-family: var(--font-body); font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 500; text-decoration: none; }
.contact-email a:hover { text-decoration: underline; text-underline-offset: 4px; }

.contact-copy {
  padding: .4rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-ui);
  background: #fff;
  color: var(--ink-soft);
  font: inherit;
  font-size: .8125rem;
  cursor: pointer;
  transition: background var(--dur-ui) var(--ease-ui), color var(--dur-ui) var(--ease-ui);
}

.contact-copy:hover { background: var(--ink); color: #fff; }
.contact-copy.is-done { border-color: #00A35F; color: #00A35F; background: #fff; }

.contact-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1.5rem 0 0; }
.contact-links a { color: var(--ink-soft); text-decoration: none; }
.contact-links a:hover { color: var(--ink); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; margin: 0 0 1rem; }
.field label { font-size: .875rem; color: var(--ink-soft); }

.field input,
.field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-ui);
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color var(--dur-ui) var(--ease-ui);
}

.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17, 17, 17, .08); }

.form-actions { margin: .5rem 0 0; }
.contact-form .cf-turnstile { margin: 0 0 .75rem; }   /* Cloudflare : visible seulement en cas de doute */
.form-status { margin: 1rem 0 0; color: var(--ink-soft); }
.form-status:empty { display: none; }

/* Résultat de l'envoi : bandeau vert (succès) ou rouge (échec), centré */
.form-status.is-success,
.form-status.is-error {
  padding: .9rem 1.25rem;
  border: 1px solid;
  border-radius: var(--radius-ui);
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  animation: status-in .35s var(--ease-ui, ease) both;
}
.form-status.is-success { border-color: #B7E4C7; background: #EAF8EF; color: #0B6B3A; }
.form-status.is-error   { border-color: #F4C2C2; background: #FDEEEE; color: #B42318; }

@keyframes status-in {
  from { opacity: 0; translate: 0 .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .form-status.is-success,
  .form-status.is-error { animation: none; }
}

@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- 404 : plein écran, trame de points du hero ---------- */

.not-found {
  justify-content: center;
  min-height: calc(100svh - 7rem);   /* l'écran, moins le header flottant */
  padding-block: 3rem;
  border-bottom: 0;
}
.not-found .eyebrow-badge { margin-bottom: 1.5rem; }
.not-found-title {
  max-width: 16ch;
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.not-found-title em { font-style: normal; color: var(--accent); }
.not-found-emoji { display: inline-block; font-size: .8em; vertical-align: .05em; }
.not-found-lede { max-width: 34rem; margin: 1.25rem 0 0; color: var(--ink-soft); font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: var(--lh-text); }
.not-found-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 2.25rem 0 0; }

@media (max-width: 480px) {
  .not-found-actions { flex-direction: column; align-self: stretch; }
}

/* ---------- Pied de page ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 2rem;
  max-width: calc(76rem + var(--gutter) * 2);   /* aligné sur le contenu des sections */
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .875rem;
}

.site-footer p { margin: 0; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--ink); }

/* ---------- ESSAI : projets en grille 2 colonnes décalées (desktop, V2_WORKS_GRID) ----------
   Colonne de droite décalée vers le bas ; carte = image 16:10, point couleur + secteur · année,
   titre, description (2 lignes), « Lire l'étude de cas → ». Mobile : le carrousel reste. */
.works-grid2 { display: none; }

@media (min-width: 861px) {
  .works--grid .slider { display: none; }

  .works--grid .works-grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem clamp(2rem, 4vw, 3.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  /* Le décalage de la colonne de droite ne déborde en bas que si la DERNIÈRE carte est à droite */
  .works--grid .works-grid2:has(> .work2:last-child:nth-child(even)) { padding-bottom: var(--work2-offset); }

  .work2:nth-child(even) { position: relative; top: var(--work2-offset); }
}

:root { --work2-offset: 10rem; }

.work2 a { display: block; color: inherit; text-decoration: none; }

.work2-media {
  display: block;
  aspect-ratio: 1440 / 900;
  overflow: hidden;
  border-radius: 16px;
  background: #E9E9E9;
}

.work2-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-wave); }

.work2-title {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: var(--display-weight);
  letter-spacing: -.04em;
  line-height: 1.1;
}

.work2-desc {
  display: -webkit-box;
  margin-top: .6rem;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  line-height: var(--lh-text);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Étiquette sous la description : même style que les eyebrows de section, avec le point couleur du projet */
.work2-badge { display: inline-flex; align-items: center; gap: .45rem; margin: 1.25rem 0 0; }
.work2-badge .project-dot { width: 7px; height: 7px; }

@media (hover: hover) {
  .work2 a:hover .work2-media img { transform: scale(1.03); }
}

.work2 a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 16px; }

/* ---------- Panneau projet ----------
   Desktop : feuille qui glisse depuis la droite, détachée des bords (12 px), coins arrondis.
   Mobile : tiroir qui monte depuis le bas (92 % de la hauteur).
   Ouverture vive (--ease-wave), fermeture animée elle aussi. */

.panel { position: fixed; inset: 0; z-index: 100; }
.panel[hidden] { display: none; }

.panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, .45);
  opacity: 0;
  transition: opacity var(--dur-reveal) var(--ease-panel);
}

/* Collé aux bords, sans arrondi sur desktop */
.panel-sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(60rem, 100vw);
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 80px rgba(0, 0, 0, .2);
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
}

/* Desktop : dévoilement depuis la droite avec un bord en biais qui se redresse.
   Fermeture = même animation jouée à l'envers (.is-closing, posée par main.js). */
.panel.is-open .panel-sheet    { animation: panel-reveal var(--dur-reveal) var(--ease-reveal-panel) forwards; }
.panel.is-closing .panel-sheet { animation: panel-conceal var(--dur-reveal) var(--ease-reveal-panel) forwards; }
.panel.is-open .panel-backdrop { opacity: 1; }

@keyframes panel-reveal {
  0%   { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
  35%  { clip-path: polygon(15% 0, 100% 0, 100% 100%, 22% 100%); }
  65%  { clip-path: polygon(3% 0, 100% 0, 100% 100%, 6% 100%); }
  100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}

/* Fermeture : animation distincte (un même nom joué en « reverse » n'est pas relancé
   par le navigateur → le panneau disparaissait d'un coup). */
@keyframes panel-conceal {
  0%   { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  35%  { clip-path: polygon(3% 0, 100% 0, 100% 100%, 6% 100%); }
  65%  { clip-path: polygon(15% 0, 100% 0, 100% 100%, 22% 100%); }
  100% { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
}

:root {
  --dur-reveal: .44s;
  --ease-reveal-panel: cubic-bezier(1, .8, 0, 0);
  --ease-panel: cubic-bezier(1, 0, 0, 1);   /* tiroir mobile */
  --dur-panel: .24s;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.panel-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-ui);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background var(--dur-ui) var(--ease-ui);
}

.panel-close:hover { background: var(--ink); }
.panel-close:hover svg { stroke: #fff; }
.panel-close svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linecap: round; }
.panel-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.panel-handle { display: none; }

html.has-panel { overflow: hidden; }

@media (max-width: 720px) {
  .panel-sheet {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 92dvh;
    border-radius: 22px 22px 0 0;
    clip-path: none;
    animation: none !important;   /* le tiroir mobile glisse, sans dévoilement en biais */
    transform: translateY(100%);
    transition: transform var(--dur-panel) var(--ease-panel);
  }
  .panel.is-open .panel-sheet { transform: none; }
  .panel-handle {
    display: block;
    flex: none;
    width: 40px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 4px;
    background: var(--line);
  }
  .panel-close { top: 14px; right: 12px; width: 40px; height: 40px; }
}

/* ---------- Étude de cas (/projets/<slug>) ----------
   Ouverture centrée → image sur bandeau gris → deux colonnes :
   fiche + sommaire collants à gauche, sections à droite (800 px max).
   --project-accent = couleur du client : point, mot en couleur du titre, repère du sommaire. */

.project {
  /* Largeur des deux colonnes du corps : reprise par l'image de couverture pour s'aligner dessus */
  --project-aside: 17rem;
  --project-content: 800px;
  --project-gap: clamp(2.5rem, 6vw, 6rem);
  --project-max: calc(var(--project-aside) + var(--project-gap) + var(--project-content));
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 4rem;
}

/* Ouverture */
.project-intro { max-width: 56rem; margin-inline: auto; text-align: center; }


.project-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: .9375rem;
}

.project-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--project-accent, var(--accent));
}

.project-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.project-title em,
.project-title .tint--em { font-style: normal; color: var(--project-accent-ink, var(--project-accent, var(--c-violet))); }

.project-lede {
  max-width: 40rem;
  margin: 1.5rem auto 0;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: var(--lh-text);
  text-wrap: pretty;
}

/* Image principale posée sur un bandeau gris */
/* Bandeau gris plus étroit que l'image : l'image déborde à gauche et à droite (--cover-bleed),
   le bandeau est rentré d'autant. Un peu plus d'espace en bas qu'en haut.
   L'image (bandeau + débords) a la même largeur max que le corps (fiche + contenu). */
.project-cover {
  --cover-bleed: 4rem;
  width: calc(min(100%, var(--project-max)) - var(--cover-bleed) * 2);
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 4.5rem);
  border-radius: 28px;
  background: #F4F4F4;
}

@media (max-width: 720px) {
  .project-cover { --cover-bleed: 1rem; }
}

.project-cover-img {
  position: relative;
  display: block;
  width: calc(100% + var(--cover-bleed) * 2);
  max-width: none;
  margin-inline: calc(var(--cover-bleed) * -1);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 20px 50px rgba(0, 0, 0, .12);
}

/* Corps : deux colonnes */
.project-layout {
  display: grid;
  grid-template-columns: minmax(14rem, var(--project-aside)) minmax(0, var(--project-content));
  justify-content: center;
  gap: var(--project-gap);
  margin-top: clamp(3rem, 7vw, 5rem);
}

.project-aside { position: sticky; top: 110px; align-self: start; }

.project-facts { margin: 0; }
.project-facts div { padding: .8rem 0; border-top: 1px solid var(--line); }
.project-facts div:last-child { border-bottom: 1px solid var(--line); }
.project-facts dt { color: var(--ink-soft); font-size: .8125rem; }
.project-facts dd { margin: .15rem 0 0; font-family: var(--font-body); font-weight: 500; line-height: var(--lh-text); }

/* Sommaire : la section en cours est repérée par un trait couleur client */
.project-toc { margin-top: 2rem; }
.project-toc ol { margin: 0; padding: 0; list-style: none; }

.project-toc a {
  display: block;
  padding: .45rem 0 .45rem 1rem;
  border-left: 2px solid var(--line);
  color: var(--ink-soft);
  font-size: .9375rem;
  line-height: var(--lh-text);
  text-decoration: none;
  transition: color var(--dur-ui) var(--ease-ui), border-color var(--dur-ui) var(--ease-ui);
}

.project-toc a:hover { color: var(--ink); }
.project-toc a[aria-current="true"] { border-left-color: var(--project-accent-ink, var(--project-accent, var(--ink))); color: var(--ink); font-weight: 500; }

/* Contenu */
.project-content > :first-child { margin-top: 0; }

/* Chiffres : un seul bloc arrondi, éléments côte à côte séparés par un filet ; empilés sur mobile */
.project-stats {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin: 0 0 3rem;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.project-stats li { padding: 1.25rem 1.5rem; }
.project-stats li + li { border-left: 1px solid var(--line); }
.project-stats strong { display: block; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 400; letter-spacing: -.03em; line-height: 1; }
.project-stats span { display: block; margin-top: .5rem; color: var(--ink-soft); font-size: .9375rem; }

@media (max-width: 720px) {
  .project-stats { grid-auto-flow: row; }
  .project-stats li + li { border-left: 0; border-top: 1px solid var(--line); }
}

.project-section { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-block: 0; scroll-margin-top: 110px; }
.project-section:first-child { margin-top: 0; }
.project-section .project-eyebrow { margin-bottom: .75rem; }

.project-section h2 {
  margin: 0 0 .75rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.project-section h2 em { font-style: normal; color: var(--project-accent-ink, var(--project-accent, var(--c-violet))); }

.project-section p:not(.project-eyebrow) {
  margin: 0 0 .75rem;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: var(--lh-text);
}

.project-section p:last-of-type { margin-bottom: 0; }

.project-figure { margin: 1.25rem 0 0; }
/* Image qui suit un paragraphe : plus d'air. Le dernier paragraphe a margin-bottom 0,
   cet écart est donc le seul (pas de cumul), entre l'écart des paragraphes (.75rem) et celui des sections. */
.project-section p + .project-figure { margin-top: clamp(2.25rem, 4vw, 3rem); }
.project-figure img { width: 100%; border-radius: 16px; background: #F4F4F4; }

/* Cadre provisoire tant que l'image n'est pas fournie */
.project-placeholder {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: repeating-linear-gradient(-45deg, #F7F7F7 0 12px, #F1F1F1 12px 24px);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: .75rem;
  line-height: var(--lh-text);
  letter-spacing: .02em;
  text-align: center;
}

.project-gallery { display: grid; gap: 12px; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.project-gallery img { width: 100%; border-radius: 16px; background: #F4F4F4; }

.project-quote { margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; padding: clamp(1.5rem, 4vw, 2.25rem); border-radius: 20px; background: #F4F4F4; }
.project-quote blockquote { margin: 0; }
.project-quote blockquote p { margin: 0; font-family: var(--font-body); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: var(--lh-text); }
.project-quote figcaption { display: flex; align-items: center; gap: .75rem; margin-top: 1.25rem; color: var(--ink-soft); font-size: .9375rem; }
.project-quote figcaption img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.project-quote figcaption strong { display: block; color: var(--ink); font-weight: 500; }

.project-next { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.5rem; border-top: 1px solid var(--line); }
.project-next a { display: flex; flex-direction: column; gap: .25rem; color: inherit; text-decoration: none; }
.project-next span { color: var(--ink-soft); font-size: .875rem; }
.project-next strong { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500; letter-spacing: -.02em; transition: color var(--dur-ui) var(--ease-ui); }
.project-next a:hover strong { color: var(--accent); }

/* Tablette / mobile : une colonne, fiche défilante, pas de sommaire */
@media (max-width: 960px) {
  .project-layout { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .project-aside { position: static; }
  .project-toc { display: none; }
}

@media (max-width: 720px) {
  .project-intro { text-align: left; }
  .project-lede { margin-left: 0; }

  .project-facts {
    display: flex;
    gap: 1.25rem;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .project-facts::-webkit-scrollbar { display: none; }
  .project-facts div { flex: 0 0 62%; scroll-snap-align: start; border-bottom: 0; }
}

/* ---------- Titres : réglage commun ---------- */
.hero-title,
.diff-statement,
.works-title,
.quotes-title,
.split-title,
.contact-title,
.project-title,
.project-section h2,
.slide-title,
.project-next strong {
  font-weight: var(--display-weight);
  letter-spacing: -.05em !important;
  line-height: 1.1;
}

/* ---------- Reveal mot à mot ---------- */

:root {
  /* ESSAI « plus sec » (réversible) — anciennes valeurs : cubic-bezier(.8, 0, 0, .8) et .9s */
  --ease-reveal: cubic-bezier(1, 0, 0, 1);
  --reveal-duration: .5s;
  --reveal-stagger: 35ms;   /* écart entre deux mots : quasi instantané */
  --reveal-y: 70%;          /* remontée depuis sous la ligne (100% = entièrement caché) */
  --reveal-rotate: 4deg;
}

/* Masque : coupe le mot à la hauteur de sa ligne.
   Padding / marge négative = marge pour accents et jambages sans décaler la mise en page. */
.reveal-words .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: .12em .04em .14em;
  margin: -.12em -.04em -.14em;
}

.reveal-words .word-in {
  display: inline-block;
  opacity: 0;
  transform: translateY(var(--reveal-y)) rotate(var(--reveal-rotate));
  transform-origin: 0 100%;
  animation: word-in var(--reveal-duration) var(--ease-reveal) forwards;
  animation-delay: calc(var(--i, 0) * var(--reveal-stagger) + 100ms);
}

/* Reveal déclenché au scroll ([data-reveal]) : en pause tant que le bloc n'est pas
   à l'écran (main.js ajoute .is-visible). Uniquement si JS actif, sinon texte visible. */
.js [data-reveal] .word-in { animation-play-state: paused; }
.js [data-reveal].is-visible .word-in { animation-play-state: running; }

/* Cartes de témoignages : même reveal que les mots du hero, en cascade courte.
   « backwards » seulement : une fois jouée, l'animation ne fige rien (l'opacité .5 / survol reste active).
   translate / rotate (propriétés séparées) : pas de conflit avec d'autres transform. */
.js [data-reveal-cards] .quote-card {
  animation: card-in var(--reveal-duration) var(--ease-reveal) backwards;
  animation-delay: calc(var(--i, 0) * var(--card-stagger));
  animation-play-state: paused;
}

.js [data-reveal-cards].is-visible .quote-card { animation-play-state: running; }

:root { --card-stagger: 70ms; }

/* Cartes projets : même reveal, en cascade, quand le carrousel entre à l'écran */
.js [data-reveal-slides] .slide {
  animation: card-in var(--reveal-duration) var(--ease-reveal) backwards;
  animation-delay: calc(var(--i, 0) * var(--card-stagger));
  animation-play-state: paused;
}

.js [data-reveal-slides].is-visible .slide { animation-play-state: running; }

@keyframes card-in {
  from { opacity: 0; translate: 0 2.5rem; rotate: 3deg; }
}

@keyframes word-in {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-words .word-in { animation: none; opacity: 1; transform: none; }
  .js [data-reveal-cards] .quote-card { animation: none; }
  .js [data-reveal-slides] .slide { animation: none; }
  .btn--accent::before, .panel-sheet, .panel-backdrop { transition: none; }
  .career-steps::after { height: calc(100% - 1rem); }
  .code-chip, .code-chip-typed, .hero-emoji { animation: none; opacity: 1; transform: none; clip-path: none; }
  .code-chip-caret { animation: none; left: calc(100% + .06em); }
}


/* ---------- Flou progressif en bas de l'écran ----------
   5 couches de backdrop-filter, de plus en plus floues vers le bas, chacune limitée à une bande
   par un masque dégradé : le contenu se dissout doucement dans le bord de l'écran. */
.edge-blur {
  position: fixed;
  z-index: 40;   /* sous la barre de navigation (50) */
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--edge-blur-h, 180px);
  pointer-events: none;
  transition: opacity .5s var(--ease-ui), transform .5s var(--ease-ui);
}

/* Bas de page atteint : le flou s'efface pour laisser lire le pied de page (main.js) */
.edge-blur.is-hidden { opacity: 0; transform: translateY(30%); }

.edge-blur i {
  position: absolute;
  inset: 0;
}

.edge-blur i:nth-child(1) { backdrop-filter: blur(.5px); -webkit-backdrop-filter: blur(.5px); -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 40%, transparent 60%); mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 40%, transparent 60%); }
.edge-blur i:nth-child(2) { backdrop-filter: blur(1px);  -webkit-backdrop-filter: blur(1px);  -webkit-mask-image: linear-gradient(to bottom, transparent 20%, #000 40%, #000 60%, transparent 80%); mask-image: linear-gradient(to bottom, transparent 20%, #000 40%, #000 60%, transparent 80%); }
.edge-blur i:nth-child(3) { backdrop-filter: blur(2px);  -webkit-backdrop-filter: blur(2px);  -webkit-mask-image: linear-gradient(to bottom, transparent 40%, #000 60%, #000 80%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 40%, #000 60%, #000 80%, transparent 100%); }
.edge-blur i:nth-child(4) { backdrop-filter: blur(4px);  -webkit-backdrop-filter: blur(4px);  -webkit-mask-image: linear-gradient(to bottom, transparent 60%, #000 80%); mask-image: linear-gradient(to bottom, transparent 60%, #000 80%); }
.edge-blur i:nth-child(5) { backdrop-filter: blur(8px);  -webkit-backdrop-filter: blur(8px);  -webkit-mask-image: linear-gradient(to bottom, transparent 80%, #000 100%); mask-image: linear-gradient(to bottom, transparent 80%, #000 100%); }

@media (max-width: 720px) {
  .edge-blur { --edge-blur-h: 120px; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE — réglages finaux. Placés en DERNIER pour qu'aucune règle
   plus haut dans le fichier ne puisse les écraser.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {

  /* Hero : pas d'emoji ; la ligne du bloc de code en flex (supprime l'espace invisible
     qui la faisait déborder de quelques px) */
  .hero-title .hero-emoji { display: none; }
  .hero-title .hero-title-line:last-child { display: flex; justify-content: center; }

  /* Points « Ma différence » empilés comme sur desktop ; le dernier sans marge basse */
  .diff-list .diff-item:last-child { padding-bottom: 0; }

  /* Témoignages : rangée qui défile librement au doigt (pas de scroll-snap), sans « Voir tous » ni fondu */
  .quotes-viewport { height: auto; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .quotes-scroll { height: auto; padding: 0; overflow: visible; }
  .quotes-wall {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    columns: auto;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .quotes-wall::-webkit-scrollbar { display: none; }
  .quotes-wall .quote-card { flex: 0 0 84%; margin: 0; }

  /* En-têtes de section centrés sur desktop → alignés à GAUCHE sur mobile (Portfolio, Témoignages, FAQ) */
  .section-head--center,
  .quotes-head,
  .faq-head { margin-left: 0; text-align: left; }
  .faq-lede { margin-left: 0; }

  /* Contact (bandeau foncé) : plus d'air, textes centrés ; le formulaire garde ses labels à gauche */
  #contact { padding-block: 5rem; }
  #contact .split-aside { text-align: center; }
  #contact .contact-email,
  #contact .contact-links { justify-content: center; }
  #contact .contact-links li:first-child { flex-basis: 100%; }   /* téléphone seul, puis les réseaux à la ligne */
  #contact .form-actions .btn { width: 100%; }

  /* Pied de page : centré, une info par ligne */
  .site-footer { flex-direction: column; justify-content: center; text-align: center; }

  /* Tailles de texte harmonisées : 2 tailles seulement hors titres */
  .hero-lede,
  .split-lede,
  .works-lede,
  .faq-lede,
  .diff-item p,
  .diff-quote blockquote p,
  .quote-card blockquote p,
  .slide-tag,
  .career-desc,
  .faq-item summary,
  .faq-item p,
  .project-lede,
  .project-section p:not(.project-eyebrow),
  .project-quote blockquote p,
  .project-facts dd {
    font-size: 1rem;
  }

  .slide-meta,
  .slide-more,
  .diff-quote figcaption,
  .quote-card figcaption,
  .career-year,
  .field label,
  .site-footer,
  .project-eyebrow,
  .project-facts dt,
  .project-stats span,
  .project-next span {
    font-size: .875rem;
  }
}

/* ---------- Étude de cas : « En bref » et arbitrage ----------
   inc/summary.php, inc/decision.php. Fondus dans la page : sections normales (étiquette,
   titre, paragraphes) ; seules les options de l'arbitrage sont des cartes. */

/* Libellé en tête de paragraphe (« Le problème. », « Ce que ça a coûté. ») */
.project-section p strong { color: var(--ink); font-weight: 500; }

/* Options : cartes légèrement penchées, pastille ✕ orange (écartée) ou ✓ verte (retenue) */
.decision-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 1.75rem 0 1.75rem;
  padding: 10px 6px 0;
}
.decision-option {
  position: relative;
  padding: 1.15rem 1.25rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .05);
  rotate: -1.5deg;
}
.decision-option.is-chosen { rotate: 1.2deg; }
.decision-mark {
  position: absolute;
  top: -12px;
  left: -12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12), 0 4px 10px rgba(0, 0, 0, .1);
}
.is-chosen .decision-mark { background: var(--c-green); }
.decision-option p.decision-state { margin: 0 0 .35rem; color: var(--ink-soft); font-size: .75rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.decision-option p.decision-label { margin: 0 0 .3rem; color: var(--ink); font-size: 1rem; font-weight: 500; line-height: 1.4; }
.decision-option:not(.is-chosen) p.decision-label { color: var(--ink-soft); }
.decision-option p.decision-text { margin: 0; color: var(--ink-soft); font-size: .9375rem; line-height: var(--lh-text); }

@media (max-width: 720px) {
  .decision-options { grid-template-columns: 1fr; gap: 28px; }
  .decision-option { rotate: -1deg; }
  .decision-option.is-chosen { rotate: .8deg; }
}

/* Plusieurs arbitrages : onglets (même style que le switcher du hero), défilables sur mobile.
   Sans JS : tous les panneaux visibles à la suite. */
.decision-tabs { margin: 1.75rem 0 0; }
.decision-tablist {
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  border-radius: calc(var(--radius-ui) + 4px);
  background: #F1F1F1;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.decision-tablist::-webkit-scrollbar { display: none; }
.decision-tablist button {
  flex: none;
  padding: .55rem 1.1rem;
  border: 0;
  border-radius: calc(var(--radius-ui) - 2px);
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-family: var(--font-body);
  font-size: .9375rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-ui) var(--ease-ui), color var(--dur-ui) var(--ease-ui);
}
.decision-tablist button:hover { color: var(--ink); }
.decision-tablist button[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .08);
}
.decision-tablist button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.js .decision-panel:not(.is-active) { display: none; }
.project-section .decision-q {
  margin: 1.5rem 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.015em;
}

/* Cartes d'options : même apparition en cascade que les cartes de la home (main.js → .is-visible) */
.js [data-reveal-decision] .decision-option {
  animation: card-in var(--reveal-duration) var(--ease-reveal) backwards;
  animation-delay: calc(var(--i, 0) * var(--card-stagger) * 2);
  animation-play-state: paused;
}
.js [data-reveal-decision].is-visible .decision-option { animation-play-state: running; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal-decision] .decision-option { animation: none; }
}
