/* ════════════════════════════════════════════════════════════════
   ÉPICIME STUDIO — feuille de style
   Esthétique : imagerie d'Épinal × forêt vosgienne.
   Encre sur papier, double filets, vermillon & or sur sapin.
   ════════════════════════════════════════════════════════════════ */

/* ── Jetons ─────────────────────────────────────────────────────── */
:root {
  --paper: #f6efdd;
  --paper-deep: #eadfc3;
  --ink: #22301f;
  --ink-muted: #4c5a4a;
  --gold: #cfa14e;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", Helvetica, sans-serif;

  --pad-inline: clamp(1.4rem, 6vw, 6rem);
  --content-w: 1160px;
  --frame: clamp(8px, 1.2vw, 16px); /* retrait du cadre d'estampe */
}

body[data-theme="dark"] {
  --bg: #0a1d14;
  --fg: #f1ead4;
  --muted: rgba(241, 234, 212, 0.68);
  --accent: #e0552c;
  --line: rgba(241, 234, 212, 0.16);
  --line-strong: rgba(241, 234, 212, 0.4);
}

body[data-theme="light"] {
  --bg: #ecdfbd;
  --fg: #22301f;
  --muted: rgba(34, 48, 31, 0.68);
  --accent: #bd3f1d;
  --line: rgba(34, 48, 31, 0.18);
  --line-strong: rgba(34, 48, 31, 0.42);
}

/* ── Base ───────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: #0a1d14;
  scroll-behavior: auto;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

html, body { overflow-x: clip; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--fg);
  background-color: var(--bg);
  transition: background-color 1s ease, color 1s ease;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
figure { margin: 0; }

::selection { background: rgba(207, 161, 78, 0.45); }

:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 200;
  padding: 0.7em 1.1em;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 4px;
  translate: 0 -300%;
  transition: translate 0.3s ease;
}
.skip-link:focus-visible { translate: 0 0; }

/* ── États pré-animation (retirés si les modules ne chargent pas) ── */
.js [data-intro],
.js [data-reveal],
.js .hero-title,
.js h2[data-split],
.js .nav,
.js .scroll-cue,
.js .postcard { opacity: 0; }

/* ── Toile peinte & grain ───────────────────────────────────────── */
#paint {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0;
}

/* Cadre d'estampe : un double filet fixe, comme la marge
   gravée d'une planche d'imagerie. */
.plate-frame {
  position: fixed;
  inset: var(--frame);
  z-index: 94;
  pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--fg) 34%, transparent);
  transition: border-color 1s ease;
}
.plate-frame::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent);
  transition: border-color 1s ease;
}

.grain {
  position: fixed;
  inset: -10%;
  z-index: 92;
  pointer-events: none;
  opacity: 0.05;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") repeat;
}

/* ── Tige de progression ────────────────────────────────────────── */
.stem {
  position: fixed;
  left: clamp(14px, 2.2vw, 30px);
  top: 50%;
  translate: 0 -50%;
  height: 54svh;
  width: 16px;
  z-index: 60;
  display: none;
}
.stem::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: -0.5px;
  background: var(--line);
  transition: background-color 1s ease;
}
.stem-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1.5px;
  margin-left: -0.75px;
  background: var(--fg);
  opacity: 0.6;
  transform: scaleY(0);
  transform-origin: top;
  transition: background-color 1s ease;
}
.stem-tick {
  position: absolute;
  left: 50%;
  width: 13px;
  height: 1.6px;
  background: var(--fg);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--rot, -42deg)) scale(0.25);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 1s ease;
}
.stem-tick.on {
  opacity: 0.95;
  background: var(--accent);
  transform: translate(-50%, -50%) rotate(var(--rot, -42deg)) scale(1);
}

@media (min-width: 1100px) {
  .stem { display: block; }
}

/* ── Navigation ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* toujours à l'intérieur du cadre d'estampe, avec de l'air */
  padding: calc(var(--frame) + 14px) calc(var(--frame) + clamp(12px, 2.2vw, 30px));
  background: linear-gradient(color-mix(in srgb, var(--bg) 65%, transparent), transparent);
  transition: color 1s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--fg);
}
.brand-mark {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-name em { font-weight: 400; }

.nav-cta {
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
  padding: 0.62em 1.2em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.nav-cta:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ── Chapitres : ossature commune ───────────────────────────────── */
.chapter {
  position: relative;
  padding: clamp(7rem, 16vh, 11rem) var(--pad-inline);
}

.chapter-inner {
  position: relative;
  z-index: 2;
  max-width: var(--content-w);
  margin-inline: auto;
}

.numeral {
  position: absolute;
  z-index: 1;
  top: clamp(1.5rem, 7vh, 4.5rem);
  right: clamp(0.5rem, 4vw, 4rem);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(11rem, 26vw, 24rem);
  line-height: 0.75;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
}

@supports not (-webkit-text-stroke: 1px black) {
  .numeral { color: var(--fg); opacity: 0.07; }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent);
  transition: color 1s ease;
}
.kicker::before {
  content: "";
  width: 2.4rem;
  height: 1px;
  background: var(--accent);
  transition: background-color 1s ease;
}

.chapter h2 {
  margin-top: 1.3rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.3rem, 5vw, 4.3rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 21ch;
}

.chapter-lead {
  margin-top: 1.2rem;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.star { color: var(--accent); }

/* ── Boutons ────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  padding: 1em 1.6em;
  border-radius: 2px;
  border: 1px solid;
  transition: transform 0.22s ease, box-shadow 0.22s ease,
    background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-primary {
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 65%, #1c120b);
  color: #f7f0de;
  box-shadow: 0.3rem 0.3rem 0 color-mix(in srgb, var(--fg) 75%, transparent);
}
body[data-theme="light"] .btn-primary {
  box-shadow: 0.3rem 0.3rem 0 var(--ink);
}
.btn-primary:hover {
  transform: translate(0.18rem, 0.18rem);
  box-shadow: 0.08rem 0.08rem 0 color-mix(in srgb, var(--fg) 75%, transparent);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--fg);
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}

.btn-ink {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
  box-shadow: 0.28rem 0.28rem 0 var(--ink);
}
.btn-ink:hover {
  transform: translate(0.16rem, 0.16rem);
  box-shadow: 0.06rem 0.06rem 0 var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* ── Prologue ───────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: clip; /* la branche déborde volontairement du cadre */
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1020px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--muted);
}
.eyebrow .star { margin: 0 0.5em; font-size: 0.9em; }

.hero-title {
  margin-top: 1.7rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.7rem, 7vw, 6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 17ch;
}
.hero-title em {
  position: relative;
  font-style: italic;
  background: linear-gradient(105deg, #e3b765 8%, #d8501f 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* le dégradé n'est peint que dans la boîte de l'élément : on
     l'élargit pour couvrir la terminaison italique du « l »,
     qui déborde loin à droite, sans décaler le point qui suit */
  padding-right: 0.25em;
  margin-right: -0.25em;
  padding-top: 0.12em;
  margin-top: -0.12em;
}
.hero-title em::after {
  content: "";
  position: absolute;
  left: 0.04em;
  right: 0.52em; /* le trait s'arrête avant le point final */
  bottom: -0.06em;
  height: 0.13em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 14' preserveAspectRatio='none'%3E%3Cpath d='M3 10 C 60 2 150 2 217 8' stroke='%23d8501f' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  opacity: 0.85;
}

.hero-sub {
  margin-top: 1.9rem;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: 54ch;
}

.hero-actions {
  margin-top: 2.7rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hero-sprig {
  position: absolute;
  right: max(-70px, -6vw);
  bottom: 5%;
  width: min(54vw, 640px);
  height: auto;
  color: var(--fg);
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
}
.hero-sprig path,
.divider-sprig path {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.scroll-cue {
  position: absolute;
  bottom: 2.3rem;
  left: 50%;
  translate: -50% 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.scroll-cue > span:first-child {
  font-size: 0.66rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.scroll-cue-line {
  width: 1px;
  height: 54px;
  background: var(--fg);
  opacity: 0.55;
  animation: cue 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes cue {
  0%   { transform: scaleY(0); transform-origin: top; }
  42%  { transform: scaleY(1); transform-origin: top; }
  58%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Chapitre I : le constat ────────────────────────────────────── */
.ch1-grid {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.ch1-copy p {
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.78;
}
.ch1-copy p + p { margin-top: 1.4rem; }
.ch1-copy p:first-child::first-letter {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 3.4em;
  float: left;
  line-height: 0.78;
  padding: 0.08em 0.14em 0 0;
  color: var(--accent);
}

/* — Faux navigateurs — */
.browser {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  container-type: inline-size;
  box-shadow:
    0 0 0 1px rgba(12, 20, 12, 0.35),
    0 30px 80px -18px rgba(5, 12, 8, 0.55);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: #e3dcc7;
  flex: none;
}
.browser .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.browser.new .dot:nth-child(1) { background: #c45248; }
.browser.new .dot:nth-child(2) { background: #cfa53e; }
.browser.new .dot:nth-child(3) { background: #5d8a5e; }
.browser.old .dot { background: #a9a49a; }
.browser.old .browser-bar { background: #cfcabb; }

.browser-url {
  margin-left: 8px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #6b6555;
  background: rgba(255, 255, 255, 0.55);
  padding: 0.45em 1em;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Le site « d'avant » */
.ch1 .browser.old {
  width: 100%;
  max-width: 520px;
  justify-self: end;
}

.browser.old { filter: saturate(0.85) sepia(0.1); }

.old-body {
  flex: 1;
  background: #e8e6dc;
  color: #222;
  font-family: "Times New Roman", Times, serif;
  text-align: center;
  padding: 4cqi 4.5cqi 4.5cqi;
  overflow: hidden;
}
.old-banner {
  background: linear-gradient(#2b418f, #5d77c4);
  border: 2px ridge #9aa7d8;
  color: #fff;
  text-shadow: 1px 1px 0 #1a2a66;
  padding: 2.4cqi;
  font-size: clamp(10px, 2.7cqi, 19px);
  letter-spacing: 0.04em;
  line-height: 1.45;
}
.old-blink {
  margin: 2.6cqi 0 1.8cqi;
  color: #c40000;
  font-weight: 700;
  font-size: clamp(9px, 2.2cqi, 15px);
  animation: oldblink 1.1s steps(2, start) infinite;
}
@keyframes oldblink { 50% { opacity: 0; } }
.old-hr {
  border: none;
  border-top: 1px dashed #999;
  margin: 1.8cqi 8cqi;
}
.old-text {
  font-size: clamp(9px, 2.1cqi, 14px);
  line-height: 1.55;
}
.old-text a { color: #0000c8; font-weight: 700; }
.old-text small { color: #666; font-size: 0.82em; }
.old-center { margin-top: 2.2cqi; }
.old-btn {
  display: inline-block;
  font-weight: 700;
  font-size: clamp(9px, 2.1cqi, 14px);
  background: #d4d0c8;
  color: #111;
  border: 2px outset #fff;
  box-shadow: 1px 1px 0 #808080;
  padding: 0.5em 1.7em;
}
.old-meta {
  margin-top: 2.8cqi;
  font-size: clamp(8px, 1.8cqi, 12px);
  color: #555;
}
.old-counter {
  font-family: "Courier New", monospace;
  background: #111;
  color: #39e639;
  padding: 0.12em 0.5em;
  letter-spacing: 0.18em;
}

/* Le site « d'après » */
.new-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2.4cqi;
  background: #f6efdd;
  color: var(--ink);
  padding: clamp(10px, 3cqi, 22px) clamp(12px, 3.6cqi, 28px) clamp(12px, 3.6cqi, 26px);
}
.new-nav {
  display: flex;
  align-items: center;
  gap: 3.5cqi;
  font-size: clamp(9px, 1.6cqi, 13px);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #5a6855;
}
.new-logo {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(13px, 2.7cqi, 21px);
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  margin-right: auto;
}
.new-nav nav { display: flex; gap: 3cqi; }
.new-pill {
  background: #2e5d40;
  color: #f6efdd;
  padding: 0.55em 1.2em;
  border-radius: 999px;
  letter-spacing: 0.1em;
}
.new-hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5cqi;
  align-items: stretch;
}
.new-copy { align-self: center; }
.new-kicker {
  font-size: clamp(8px, 1.5cqi, 11px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #bd3f1d;
}
.new-title {
  margin: 0.45em 0 0.4em;
  font-family: var(--font-display);
  font-weight: 520;
  font-size: clamp(16px, 4.7cqi, 42px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.new-sub {
  font-size: clamp(10px, 2cqi, 15px);
  line-height: 1.55;
  color: #5a6855;
}
.new-cta {
  display: inline-block;
  margin-top: 2.2cqi;
  font-size: clamp(9px, 1.8cqi, 13px);
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid #bd3f1d;
  padding-bottom: 0.25em;
}
.new-photo {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  min-height: 90px;
  background: radial-gradient(120% 130% at 28% 18%,
    #f3cf92 0%, #d99a4e 38%, #a85f28 70%, #6f3a17 100%);
}
.new-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") repeat;
  opacity: 0.22;
  mix-blend-mode: overlay;
}
.new-badge {
  position: absolute;
  left: 7%;
  bottom: 8%;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.55em;
  background: rgba(246, 239, 221, 0.94);
  color: var(--ink);
  font-size: clamp(8px, 1.6cqi, 11.5px);
  font-weight: 600;
  padding: 0.5em 1em;
  border-radius: 999px;
}
.new-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3f7d52;
}

@container (max-width: 540px) {
  .new-hero { grid-template-columns: 1fr; }
  .new-photo { min-height: 80px; }
  .new-nav nav { display: none; }
}

/* — Ruban des métiers — */
.marquee-wrap {
  position: relative;
  z-index: 2;
  margin-top: clamp(4.5rem, 10vh, 7.5rem);
}
.marquee-label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 1.2rem;
  padding-inline: var(--pad-inline);
}
.marquee {
  position: relative;
  left: 50%;
  margin-left: -50vw;
  width: 100vw;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--fg) 5%, transparent);
  padding-block: 1.05rem;
  transition: border-color 1s ease, background-color 1s ease;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee-row {
  display: flex;
  align-items: center;
}
.marquee-row span {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  white-space: nowrap;
  opacity: 0.92;
}
.marquee-row span::after {
  content: "✦";
  font-style: normal;
  font-size: 0.5em;
  color: var(--accent);
  margin: 0 1.7rem;
  opacity: 0.9;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Chapitres épinglés (II & III) ──────────────────────────────── */
.ch2, .ch3 { padding: 0; }

.pin-wrap {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(5.5rem, 10vh, 7.5rem) var(--pad-inline) clamp(2.5rem, 6vh, 4rem);
}
.pin-wrap > .chapter-head,
.pin-wrap > .steps,
.pin-wrap > .compare,
.pin-wrap > .compare-hint {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--content-w);
  margin-inline: auto;
}

/* — Les trois gestes — */
.steps {
  margin-top: clamp(2.4rem, 6vh, 3.6rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.4vw, 2rem);
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: 2rem 1.8rem 2.3rem;
  border: 1px solid #2b3a2e;
  box-shadow:
    0 0 0 5px var(--paper),
    0 0 0 6px #2b3a2e,
    0 24px 50px rgba(8, 18, 12, 0.28);
  will-change: transform;
}
.step-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 3rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.1px #bd3f1d;
}
@supports not (-webkit-text-stroke: 1px black) {
  .step-num { color: #bd3f1d; }
}
.step h3 {
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.5rem;
}
.step p {
  margin-top: 0.65rem;
  font-size: 0.96rem;
  line-height: 1.62;
  color: var(--ink-muted);
}

/* — Avant / après — */
.ch3 .chapter-head { text-align: center; }
.ch3 .kicker { justify-content: center; }
.ch3 .kicker::before { display: none; }
.ch3 h2 {
  margin-inline: auto;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  max-width: none;
}

.compare {
  position: relative;
  margin-top: clamp(1.6rem, 3.5vh, 2.4rem);
  margin-inline: auto;
  width: min(960px, 100%);
  aspect-ratio: 16 / 10;
}
/* Une planche en écho derrière la carte, comme deux estampes posées. */
.compare::after {
  content: "";
  position: absolute;
  inset: 0;
  translate: 16px 16px;
  border: 1px solid color-mix(in srgb, var(--fg) 32%, transparent);
  z-index: -1;
  pointer-events: none;
}

/* En mode épinglé, la carte doit tenir sous la tête de chapitre. */
@media (min-width: 900px) {
  .compare { width: min(900px, 100%, calc((100svh - 24rem) * 1.6)); }
}
.compare .browser {
  position: absolute;
  inset: 0;
  height: 100%;
}
.compare .after { z-index: 2; }

.compare-divider {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 2px;
  background: var(--accent);
  translate: -50% 0;
  opacity: 0;
}
.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: #bd3f1d;
  font-size: 0.95rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--ink);
}

/* Étiquettes posées à cheval sur le cadre, comme sur une planche. */
.compare-tag {
  position: absolute;
  z-index: 4;
  top: -0.95rem;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  padding: 0.55em 1em 0.5em 1.2em;
  border: 1px solid var(--ink);
  box-shadow: 0 4px 14px rgba(8, 18, 12, 0.18);
}
.tag-before {
  right: 1.1rem;
  background: var(--paper);
  color: var(--ink);
}
.tag-after {
  left: 1.1rem;
  background: #bd3f1d;
  color: var(--paper);
  border-color: #7c2812;
  opacity: 0;
}

.compare-hint {
  margin-top: 1.4rem;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--muted);
}

/* — Ce que ça change (fin du chapitre III) —
   Trois colonnes décalées, à filets fins : éditorial, pas diapositive. */
.gains {
  position: relative;
  z-index: 2;
  padding: clamp(3rem, 7vh, 5rem) var(--pad-inline) clamp(7rem, 14vh, 10rem);
}
.gains > .kicker {
  max-width: var(--content-w);
  margin-inline: auto;
}
.gains-grid {
  max-width: var(--content-w);
  margin: clamp(2.2rem, 5vh, 3.2rem) auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: start;
}
.gain {
  position: relative;
  border-top: 1px solid var(--line-strong);
  padding-top: 1.4rem;
  transition: border-color 1s ease;
}
.gain::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}
.gain::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 34px;
  width: 9px;
  height: 1.6px;
  background: var(--accent);
  transform: rotate(-38deg);
}
.gain-num {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.gain h3 {
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 520;
  font-size: clamp(1.35rem, 1.8vw, 1.6rem);
  line-height: 1.22;
  max-width: 15ch;
}
.gain p {
  margin-top: 0.75rem;
  max-width: 36ch;
  font-size: 0.95rem;
  line-height: 1.66;
  color: var(--muted);
}

@media (min-width: 900px) {
  .gain:nth-child(2) { margin-top: 2.6rem; }
  .gain:nth-child(3) { margin-top: 5.2rem; }
}

/* ── Chapitre IV : l'offre ──────────────────────────────────────── */
/* L'offre : un inventaire à filets fins et pictogrammes gravés,
   comme la légende d'une planche — pas des boîtes. */
.offer-grid {
  margin-top: clamp(2.4rem, 6vh, 3.4rem);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(2.5rem, 6vw, 5.5rem);
}
.offer-card {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  position: relative;
  border-top: 1px solid var(--line-strong);
  padding: 1.5rem 0.2rem 1.7rem 0;
  transition: border-color 1s ease;
}
.offer-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.offer-card:hover::before { width: 64px; }

.offer-icon {
  width: 30px;
  height: 30px;
  flex: none;
  margin-top: 0.3rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.offer-card:hover .offer-icon { transform: rotate(-7deg) translateY(-2px); }

.offer-card h3 {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.3rem;
}
.offer-card p {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--muted);
}

.offer-note {
  margin-top: 2.7rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
}
.offer-note .star { margin-right: 0.4em; font-style: normal; }

/* ── Interlude : la carte postale ───────────────────────────────── */
.interlude {
  position: relative;
  min-height: 92svh;
  display: grid;
  place-items: center;
  padding: clamp(6rem, 14vh, 9rem) var(--pad-inline);
}

.postcard {
  position: relative;
  z-index: 2;
  width: min(680px, 100%);
  background: var(--paper);
  color: var(--ink);
  padding: clamp(2.4rem, 5vw, 3.4rem);
  padding-top: clamp(3.6rem, 7vw, 4.4rem);
  rotate: -1.4deg;
  border: 1px solid #2b3a2e;
  box-shadow:
    0 0 0 6px var(--paper),
    0 0 0 7px #2b3a2e,
    0 32px 70px rgba(8, 18, 12, 0.3);
}

.postcard-kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 520;
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  line-height: 1.16;
  max-width: 17ch;
}
.postcard-body {
  margin-top: 1.15rem;
  max-width: 52ch;
  line-height: 1.72;
  color: var(--ink-muted);
}
.postcard .btn { margin-top: 1.8rem; }

.stamp {
  position: absolute;
  z-index: 2;
  top: 1.3rem;
  right: 1.4rem;
  width: 64px;
  aspect-ratio: 10 / 12;
  background: #bd3f1d;
  rotate: 3deg;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
}
.stamp::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.5px dashed rgba(246, 239, 221, 0.8);
}
.stamp svg {
  width: 26px;
  height: 26px;
  stroke: #f6efdd;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
}
.stamp span {
  font-size: 0.48rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #f6efdd;
}

.postmark {
  position: absolute;
  z-index: 1;
  top: 1.7rem;
  right: 5.4rem;
  width: 76px;
  height: 76px;
  border: 1.5px dashed rgba(34, 48, 31, 0.4);
  border-radius: 50%;
  rotate: -12deg;
}
.postmark::after {
  content: "";
  position: absolute;
  top: 40%;
  right: -44px;
  width: 50px;
  height: 17px;
  background: repeating-linear-gradient(
    rgba(34, 48, 31, 0.35) 0 1.4px,
    transparent 1.4px 6px
  );
}

/* ── Épilogue ───────────────────────────────────────────────────── */
.epilogue { text-align: center; }
.epilogue .chapter-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.epilogue .kicker::before { display: none; }
.epilogue h2 { max-width: none; }

.epic-mail {
  margin-top: 2.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 5vw, 3.7rem);
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
  padding-bottom: 0.14em;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0% 3px;
  transition: background-size 0.5s cubic-bezier(0.22, 1, 0.36, 1), color 1s ease;
}
.epic-mail:hover { background-size: 100% 3px; }
.epic-mail svg {
  width: 0.58em;
  height: 0.58em;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate 0.4s ease;
}
.epic-mail:hover svg { translate: 0.12em -0.12em; }

.epilogue-note {
  margin-top: 2.1rem;
  max-width: 54ch;
  color: var(--muted);
}

.divider-sprig {
  margin-top: clamp(3.5rem, 8vh, 5.5rem);
  width: min(340px, 70%);
  height: auto;
  color: var(--fg);
  opacity: 0.55;
}

/* ── Pied de page ───────────────────────────────────────────────── */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 2.5rem;
  padding: 2.2rem var(--pad-inline) 2.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  transition: border-color 1s ease;
}
.footer strong { color: var(--fg); font-weight: 600; }
.footer a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.footer a:hover { color: var(--fg); }

/* ── Écrans étroits ─────────────────────────────────────────────── */
@media (max-width: 899px) {
  .pin-wrap { min-height: 0; }

  .ch1-grid { grid-template-columns: 1fr; }
  .ch1 .browser.old {
    justify-self: center;
    max-width: 480px;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  .gains-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .offer-grid { grid-template-columns: 1fr; column-gap: 0; }

  .compare { aspect-ratio: 4 / 5; width: 100%; }

  .numeral { font-size: clamp(8rem, 34vw, 13rem); opacity: 0.12; }

  .hero-sprig {
    width: 82vw;
    right: -14vw;
    bottom: 1%;
    opacity: 0.32;
  }

  .hero-actions { flex-direction: column; align-items: stretch; width: min(340px, 100%); }
  .footer { flex-direction: column; align-items: flex-start; }
}

/* ── Mouvement réduit ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .js [data-intro],
  .js [data-reveal],
  .js .hero-title,
  .js h2[data-split],
  .js .nav,
  .js .scroll-cue,
  .js .postcard { opacity: 1; }

  #paint { opacity: 1; }

  .scroll-cue-line { animation: none; transform: scaleY(1); }
  .old-blink { animation: none; }

  .marquee-track {
    animation: none;
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.5rem;
  }

  .compare {
    aspect-ratio: auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.2rem;
  }
  .compare .browser { position: relative; inset: auto; }
  .compare .after { clip-path: none !important; }
  .compare-divider, .compare-tag, .compare-hint { display: none; }

  body, .btn, .nav-cta, .offer-card, .epic-mail { transition: none; }
}
