/* Mise en page : le dossier papier d'une auto-école. Papier Cerfa, pochettes kraft, encre de stylo Bic,
   tampon rouge ; les captures sont scotchées et annotées à la main. Thème clair assumé (papier). */
:root {
  --paper: #f6f1e4;          /* papier Cerfa légèrement jauni */
  --paper-2: #fffdf7;
  --kraft: #c9a26b;          /* pochette cartonnée */
  --kraft-dark: #a9824c;
  --ink: #1d2433;            /* texte principal */
  --bic: #1f3a93;            /* encre de stylo bleu */
  --stamp: #c8102e;          /* tampon */
  --muted: #5f6472;
  --rule: #d8cfb9;
  --tape: rgba(255, 238, 170, 0.78);
  --board: #102a5c;          /* panneau de vitrine, bleu signalisation */
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --form: "Courier Prime", "Courier New", monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); font: 18px/1.55 var(--body);
  background-color: var(--paper);
  background-image: linear-gradient(transparent 31px, rgba(31, 58, 147, 0.06) 32px); /* lignes de cahier */
  background-size: 100% 32px;
}
/* Les tampons « tombent » depuis une grande échelle : on coupe ce qui dépasse de l'écran pendant l'animation. */
main { overflow-x: clip; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1140px, 100%); margin: 0 auto; padding-inline: 20px; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 0.95; text-transform: uppercase; margin: 0; text-wrap: balance; letter-spacing: 0.005em; }
h2 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--bic); outline-offset: 3px; }
.hand { font-family: var(--hand); color: var(--bic); font-size: 1.45rem; line-height: 1.1; font-weight: 700; }

/* En-tête : bandeau type enseigne d'auto-école */
.bar {
  /* Haut de dossier : papier listing perforé, intercalaires de classeur, tampon « démo ». */
  position: sticky; top: 0; z-index: 50; color: var(--ink);
  background: var(--paper-2); border-bottom: 2px solid var(--ink); box-shadow: 0 8px 16px -12px rgba(29, 36, 51, 0.45);
}
.bar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px; pointer-events: none;
  background: radial-gradient(circle at 9px 4px, var(--paper) 2.6px, rgba(29, 36, 51, 0.22) 3.1px, transparent 3.6px) 0 0 / 18px 9px repeat-x;
  border-bottom: 1px dashed rgba(29, 36, 51, 0.18);
}
.bar .wrap { display: flex; align-items: flex-end; gap: 20px; padding-top: 16px; min-height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 900 2.05rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.04em; align-self: center; padding-bottom: 10px; }
.logo-x { position: relative; }
.logo-x::after { content: ""; position: absolute; left: -3px; right: -3px; top: 46%; height: 0.14em; background: var(--stamp); transform: rotate(-4deg); border-radius: 2px; }
.logo-text small { display: block; margin-top: 4px; font: 400 0.68rem/1 var(--form); letter-spacing: 0.08em; color: var(--muted); }
.bar nav { display: flex; gap: 4px; margin-left: auto; align-self: flex-end; margin-bottom: -2px; }
.tab {
  position: relative; display: block; padding: 9px 16px 9px; text-decoration: none; color: var(--ink);
  font: 700 1rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
  background: var(--tab, var(--kraft)); border: 2px solid var(--ink); border-radius: 9px 9px 0 0;
  transform: translateY(6px); transition: transform 0.15s, background-color 0.15s;
}
.tab::before { content: attr(data-n); margin-right: 7px; font: 400 0.72rem var(--form); letter-spacing: 0; opacity: 0.7; }
.tab:nth-child(1) { --tab: #ead6ad; }
.tab:nth-child(2) { --tab: #d3def3; }
.tab:nth-child(3) { --tab: #f1cfcf; }
.tab:hover { transform: translateY(2px); }
.tab[aria-current] { background: var(--paper-2); border-bottom-color: var(--paper-2); transform: none; z-index: 1; }
.bar .bar-stamp {
  align-self: center; margin-bottom: 8px; padding: 7px 14px; font-size: 1rem; background: transparent; color: var(--stamp);
  border: 3px double var(--stamp); border-radius: 3px; box-shadow: none; transform: rotate(-3deg);
}
.bar .bar-stamp:hover { background: var(--stamp); color: #fff; transform: rotate(-3deg) scale(1.04); box-shadow: none; }
[id] { scroll-margin-top: 96px; }
.cta { display: inline-block; background: var(--stamp); color: #fff; text-decoration: none; font: 800 1.1rem var(--display); text-transform: uppercase; letter-spacing: 0.05em; padding: 12px 22px; border-radius: 4px; box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.cta:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.cta.alt { background: var(--paper-2); color: var(--ink); border: 2px solid var(--ink); }

/* Ouverture */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-block: 64px 72px; }
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 4.1rem); }
.hero h1 .strike { position: relative; white-space: nowrap; }
.hero h1 .strike::after { content: ""; position: absolute; left: -4px; right: -4px; top: 52%; height: 0.11em; background: var(--stamp); transform: rotate(-3deg); border-radius: 3px; }
.hero .scribble { margin-top: 6px; transform: rotate(-2deg); display: inline-block; }
.hero .lead { margin-top: 22px; font-size: 1.15rem; max-width: 46ch; }
.hero .actions { display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; align-items: center; }

/* Le dossier kraft avec le formulaire qui se remplit */
.folder { position: relative; background: var(--kraft); border-radius: 4px 14px 14px 14px; padding: 26px 22px 22px; box-shadow: 0 22px 40px rgba(60, 40, 10, 0.28); transform: rotate(1.2deg); }
.folder::before { content: "DOSSIER N° 0427 · DURAND Tom"; position: absolute; top: -30px; left: 0; background: var(--kraft); padding: 7px 16px 6px; border-radius: 10px 10px 0 0; font: 700 0.95rem var(--form); color: #3a2a10; }
.sheet { background: var(--paper-2); border: 1px solid var(--rule); padding: 22px 20px 92px; box-shadow: 0 2px 0 var(--kraft-dark); position: relative; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; flex-wrap: wrap; }
.sheet-head b { font: 800 1.15rem var(--display); text-transform: uppercase; }
.sheet-head span { font: 400 0.82rem var(--form); color: var(--muted); }
.field { margin-top: 14px; }
.field label { display: block; font: 700 0.72rem var(--form); text-transform: uppercase; color: var(--muted); letter-spacing: 0.04em; }
.boxes { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.boxes i { font-style: normal; width: 1.45em; height: 1.75em; border: 1.5px solid #8f8a7c; display: grid; place-items: center; font: 700 0.98rem var(--form); color: var(--bic); background: #fff; }
.boxes i.sp { border-color: transparent; background: transparent; width: 0.6em; }
.boxes.tight { gap: 2px; flex-wrap: nowrap; }
.boxes.tight i { width: 1.12em; height: 1.55em; font-size: 0.84rem; }
.boxes.tight i.sp { width: 0.35em; }
.stamp { position: absolute; right: 18px; bottom: 16px; border: 4px solid var(--stamp); color: var(--stamp); font: 900 1.6rem/1 var(--display); text-transform: uppercase; padding: 6px 12px 4px; border-radius: 6px; transform: rotate(-12deg); opacity: 0.88; letter-spacing: 0.06em; mix-blend-mode: multiply; }
.stamp small { display: block; font: 700 0.62rem var(--form); letter-spacing: 0.08em; text-align: center; }
.folder .note { position: absolute; left: -36px; bottom: -48px; transform: rotate(-6deg); }

@media (prefers-reduced-motion: no-preference) {
  .boxes i span { opacity: 0; animation: ink .01s linear forwards; animation-delay: calc(var(--d) * 45ms + 300ms); }
  .stamp { animation: thump .35s cubic-bezier(.3,1.6,.6,1) both; animation-delay: 2.9s; }
  @keyframes ink { to { opacity: 1; } }
  @keyframes thump { from { transform: rotate(-12deg) scale(2.2); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: 0.88; } }
}

/* Avant / après */
.ledger { padding-block: 40px 72px; }
.ledger h2 span { color: var(--stamp); }
.rows { margin-top: 32px; border-top: 3px solid var(--ink); }
.row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; padding-block: 16px; border-bottom: 1px dashed var(--rule); align-items: baseline; }
.row > * { min-width: 0; }
.row .before { color: var(--muted); }
/* Le trait rouge est un fond dégradé (et non un text-decoration) pour pouvoir l'animer ligne après ligne. */
.row .before s { text-decoration: none; background: linear-gradient(var(--stamp), var(--stamp)) no-repeat 0 58% / 100% 2px; }
.row .after { font-weight: 700; }
.row .after::before { content: "→ "; color: var(--stamp); }

/* Le parcours, captures scotchées et annotées */
.how { padding-block: 88px 120px; background: var(--paper-2); border-block: 2px solid var(--ink); }
.how .intro { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.stage { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(40px, 6vw, 88px); align-items: center; margin-top: clamp(80px, 10vw, 128px); }
.stage > * { min-width: 0; }
.stage.flip .pinned { order: -1; }
.tag { display: inline-block; font: 800 0.95rem var(--display); text-transform: uppercase; letter-spacing: 0.1em; background: var(--ink); color: var(--paper-2); padding: 5px 10px 3px; }
.stage h3 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-top: 14px; }
.stage p { margin-top: 14px; max-width: 48ch; }
.pinned { position: relative; }
.pinned > img { border: 1px solid #cfc6af; box-shadow: 0 16px 34px rgba(30, 30, 40, 0.18); background: #fff; }
.pinned .tape { position: absolute; width: 120px; height: 30px; background: var(--tape); top: -14px; left: 40%; transform: rotate(-4deg); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pinned .tilt-l { transform: rotate(-1.5deg); }
.pinned .tilt-r { transform: rotate(1.3deg); }
.ann { position: absolute; display: flex; align-items: center; gap: 6px; }
.ann svg { width: 54px; height: 34px; flex: none; }
.ann path { stroke: var(--bic); stroke-width: 2.4; fill: none; stroke-linecap: round; }
.phones { display: flex; gap: clamp(20px, 4vw, 44px); justify-content: center; align-items: flex-start; padding-block: 8px 40px; }
.phones img { width: min(44%, 230px); border-radius: 26px; border: 7px solid var(--ink); box-shadow: 0 18px 36px rgba(30, 30, 40, 0.2); }
.phones img:last-child { margin-top: 56px; }

/* Contrôles : liste de vérification façon formulaire */
.checks { padding-block: 72px; }
.checklist { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.checklist div { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.checklist div > * { min-width: 0; }
.tick { width: 26px; height: 26px; border: 2px solid var(--ink); display: grid; place-items: center; font: 700 1.3rem/1 var(--hand); color: var(--bic); margin-top: 2px; }
.checklist b { font-weight: 700; }
.checklist p { color: var(--muted); font-size: 0.98rem; }

/* Tarifs : le panneau de forfaits de la vitrine */
.board-wrap { padding-block: 76px; background: var(--ink); overflow: clip; }
.board-wrap h2 { color: var(--paper-2); }
.board-wrap .sub { color: #c8ccd6; margin-top: 12px; max-width: 60ch; }
.board { position: relative; margin-top: 34px; background: var(--board); border: 6px solid #e9eef8; border-radius: 10px; color: #fff; padding: 8px; box-shadow: 0 0 0 2px var(--board), 0 24px 50px rgba(0,0,0,.4); }
.forfait { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 24px; align-items: center; padding: 22px 22px; border-bottom: 2px dashed rgba(255,255,255,.28); }
.forfait:last-of-type { border-bottom: 0; }
.forfait > * { min-width: 0; }
.forfait h3 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.forfait .inc { font-size: 1rem; color: #d5ddef; margin-top: 6px; }
.forfait ul { margin: 0; padding: 0; list-style: none; font-size: 0.98rem; color: #e8ecf6; display: grid; gap: 4px; }
.forfait ul li::before { content: "• "; color: #ffcf33; }
.forfait .price { text-align: right; font: 900 clamp(2.6rem, 5vw, 3.6rem)/0.9 var(--display); color: #ffcf33; white-space: nowrap; font-variant-numeric: tabular-nums; }
.forfait .price small { display: block; font: 600 0.95rem var(--display); color: #d5ddef; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 6px; }
.board-foot { padding: 14px 22px 10px; font: 400 0.85rem var(--form); color: #c3cde3; }
.calc { margin-top: 28px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.calc .hand { color: #ffcf33; font-size: 1.7rem; }

/* FAQ & fin */
.faq { padding-block: 72px; display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 48px; }
.faq > * { min-width: 0; }
details { border-bottom: 2px solid var(--ink); padding-block: 18px; }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font: 800 1.25rem var(--display); text-transform: uppercase; }
summary::after { content: "+"; color: var(--stamp); }
details[open] summary::after { content: "−"; }
details p { margin-top: 10px; max-width: 60ch; color: var(--muted); }
.end { background: var(--stamp); color: #fff; }
.end .wrap { padding-block: 64px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.end .wrap > * { min-width: 0; }
.end h2 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
.end p { margin-top: 14px; font-size: 1.1rem; max-width: 46ch; }
.end .cta { background: var(--paper-2); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); justify-self: start; }
footer { padding-block: 26px; font: 400 0.85rem var(--form); color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Petit intitulé au-dessus des titres, façon case de formulaire */
.kicker { display: inline-block; font: 700 0.8rem/1.3 var(--form); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border: 1.5px solid var(--rule); background: var(--paper-2); padding: 5px 9px 4px; margin-bottom: 18px; }

/* Capture d'écran dans un cadre de navigateur : barre fine, trois pastilles, coins arrondis */
.browser { position: relative; margin: 0; padding-top: 24px; background: #ece5d3; border: 1px solid #c9bfa6; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 0 rgba(60, 40, 10, 0.08), 0 18px 38px rgba(30, 30, 40, 0.16); }
.browser img { width: 100%; height: auto; background: #fff; border-top: 1px solid #d6cdb6; }
.browser .dots { position: absolute; top: 8px; left: 12px; width: 8px; height: 8px; border-radius: 50%; background: #e0614f; box-shadow: 13px 0 0 #e8b53a, 26px 0 0 #5fae6b; }
.browser.big { border-radius: 12px; }
.pinned .browser { margin-top: 10px; }

/* Vitrine : grande capture + colonne. De l'air autour des captures. */
.showcase { padding-block: clamp(56px, 8vw, 104px) clamp(72px, 10vw, 128px); }
.showcase-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 56px; align-items: end; }
.showcase-head > * { min-width: 0; }
.showcase-head .lead { max-width: 52ch; color: var(--ink); }
.showcase-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(36px, 5vw, 64px); align-items: start; margin-top: clamp(40px, 6vw, 72px); }
.showcase-grid > * { min-width: 0; }
.showcase-side { display: grid; gap: 26px; padding-top: clamp(0px, 4vw, 48px); }
.showcase-side .hand { transform: rotate(-1.5deg); max-width: 26ch; }

/* Annotations au stylo */
.ann .hand { font-size: 1.35rem; max-width: 13ch; transform: rotate(-4deg); background: rgba(255, 253, 247, 0.92); padding: 2px 8px; border-radius: 4px; }
.hand.under { margin-top: 22px; transform: rotate(-1deg); }

/* Articles : fiches cartonnées */
.articles { padding-block: 72px 24px; }
.articles-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; }
.articles > .lead { margin-top: 14px; max-width: 60ch; color: var(--muted); }
.more { font: 800 1.05rem var(--display); text-transform: uppercase; letter-spacing: 0.06em; color: var(--stamp); text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.article-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 28px; margin-top: 34px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--paper-2); border: 1px solid var(--rule); border-top: 6px solid var(--kraft); padding: 22px 22px 20px; box-shadow: 0 10px 24px rgba(60, 40, 10, 0.1); }
.card > * { min-width: 0; }
.card-meta { font: 400 0.8rem var(--form); color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.card h2, .card h3 { font-size: clamp(1.45rem, 2.4vw, 1.7rem); line-height: 1; }
.card h2 a, .card h3 a { text-decoration: none; }
.card h2 a::after, .card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { font-size: 0.98rem; color: var(--muted); }
.card-more { margin-top: auto; padding-top: 6px; font: 700 1.3rem/1 var(--hand); color: var(--bic); }
.card:focus-within { outline: 3px solid var(--bic); outline-offset: 3px; }
.card a:focus-visible { outline: none; }

/* Tampon posé sur le panneau des forfaits */
.board-stamp { position: absolute; top: -26px; right: clamp(10px, 4vw, 40px); z-index: 1; pointer-events: none; border: 4px solid var(--stamp); color: var(--stamp); background: rgba(255, 253, 247, 0.94); font: 900 1.7rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 14px 4px; border-radius: 6px; transform: rotate(-9deg); text-align: center; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25); }
.board-stamp small { display: block; font: 700 0.6rem var(--form); letter-spacing: 0.08em; margin-top: 2px; }

/* Pages d'articles : une feuille posée sur le bureau, colonne de lecture d'environ 65 caractères */
.crumbs { padding-top: 28px; font: 400 0.85rem var(--form); color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs span[aria-current] { color: var(--ink); }
.post-page { padding-bottom: 80px; }
.post { margin: 22px auto 0; max-width: 820px; background: var(--paper-2); border: 1px solid var(--rule); box-shadow: 0 3px 0 var(--kraft-dark), 0 22px 44px rgba(60, 40, 10, 0.14); padding: clamp(22px, 6vw, 64px); }
.post-head { border-bottom: 2px solid var(--ink); padding-bottom: 22px; }
.post-head h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
.post-head .lead { margin-top: 16px; font-size: 1.12rem; max-width: 62ch; }
.post-body { max-width: 65ch; margin-top: 30px; font-size: 1.06rem; line-height: 1.7; }
.post-body > * + * { margin-top: 1.05em; }
.post-body h2 { font-size: clamp(1.7rem, 3.6vw, 2.2rem); margin-top: 1.8em; line-height: 1; }
.post-body h3 { font-size: 1.35rem; margin-top: 1.5em; line-height: 1.05; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: 0.35em; }
.post-body ul li::marker { color: var(--stamp); }
.post-body a { color: var(--bic); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body strong { font-weight: 700; }
.post-body blockquote { margin: 1.4em 0 0; padding: 14px 18px; border-left: 4px solid var(--bic); background: rgba(31, 58, 147, 0.06); }
.post-body blockquote p + p { margin-top: 0.6em; }
.encart { margin-top: 44px; max-width: 65ch; background: var(--kraft); border-radius: 4px 12px 12px 12px; padding: 22px 22px 24px; color: #2b1f0c; box-shadow: 0 10px 24px rgba(60, 40, 10, 0.2); }
.encart .hand { color: #1b2f7a; font-size: 1.5rem; }
.encart p + p { margin-top: 8px; }
.encart .cta { margin-top: 16px; }
.related { max-width: 820px; margin: 64px auto 0; }
.related h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.blog-head { padding-block: 40px 8px; max-width: 820px; }
.blog-head h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); }
.blog-head .lead { margin-top: 16px; max-width: 60ch; }
.blog-list { padding-bottom: 88px; }

/* Animations : sobres, et seulement si la personne ne les a pas désactivées */
@media (prefers-reduced-motion: no-preference) {
  .browser { transition: translate .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s; }
  .browser:hover { translate: 0 -6px; box-shadow: 0 2px 0 rgba(60, 40, 10, 0.08), 0 28px 50px rgba(30, 30, 40, 0.22); }
  .card { transition: translate .22s, box-shadow .22s; }
  .card:hover { translate: 0 -4px; box-shadow: 0 16px 30px rgba(60, 40, 10, 0.16); }
  path.draw { transition: stroke-dashoffset 1.1s cubic-bezier(.6,.05,.3,1) .15s; }
  .row .before s { transition: background-size .55s cubic-bezier(.6,.1,.3,1) .2s; }
  .row.wait .before s { background-size: 0% 2px; }
  .board-stamp { transition: transform .38s cubic-bezier(.3,1.6,.6,1) .35s, opacity .14s linear .35s; }
  .board.wait .board-stamp { opacity: 0; transform: rotate(-9deg) scale(2.3); }
}

@media (max-width: 900px) {
  .hero, .stage, .faq, .end .wrap { grid-template-columns: 1fr; }
  .stage.flip .pinned { order: 0; }
  .folder .note { left: auto; right: 0; bottom: -44px; }
  .forfait { grid-template-columns: 1fr; gap: 12px; }
  .forfait .price { text-align: left; }
  .checklist { grid-template-columns: 1fr; }
  .ann { display: none; }
  .showcase-head, .showcase-grid { grid-template-columns: 1fr; }
  .showcase-side { padding-top: 0; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .folder { transform: none; padding: 24px 14px 18px; }
  .sheet { padding-inline: 14px; }
  .board { margin-top: 48px; padding-top: 30px; }
  .board-stamp { font-size: 1.15rem; top: -30px; right: 8px; }
  .post { border-inline: 0; margin-inline: -20px; }
  .phones { gap: 14px; padding-bottom: 24px; }
  .phones img { border-width: 5px; border-radius: 18px; }
  .phones img:last-child { margin-top: 32px; }
}

/* Formes de fond : panneaux d'auto-école, route, traits de stylo et tampons, très pâles,
   derrière le contenu. Purement décoratives (pseudo-éléments, rien pour les lecteurs d'écran). */
.hero, .ledger, .showcase, .how, .checks, .articles, .faq, .board-wrap, .end { position: relative; isolation: isolate; }
.hero::before, .hero::after, .ledger::before, .showcase::before, .how::before, .how::after,
.checks::before, .articles::before, .faq::before, .board-wrap::before, .end::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  background-repeat: no-repeat; background-position: center; background-size: contain;
}
/* Route en pointillés qui traverse le bas de l'accueil */
.hero::before {
  left: -12vw; right: -12vw; bottom: -70px; height: 240px; opacity: 0.13;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 240' preserveAspectRatio='none'%3E%3Cpath d='M0 200 C 300 60 520 230 800 120 S 1100 40 1200 70' fill='none' stroke='%231d2433' stroke-width='46' stroke-linecap='round'/%3E%3Cpath d='M0 200 C 300 60 520 230 800 120 S 1100 40 1200 70' fill='none' stroke='%23f6f1e4' stroke-width='4' stroke-dasharray='34 26'/%3E%3C/svg%3E");
}
/* Disque « A » des apprentis conducteurs */
.hero::after {
  width: 150px; height: 150px; top: 18px; right: -30px; opacity: 0.16; transform: rotate(12deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='%23c8102e' stroke-width='7'/%3E%3Cpath d='M30 78 L50 22 L70 78 M37 60 H63' fill='none' stroke='%23c8102e' stroke-width='9' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
/* Panneau de limitation 50 */
.ledger::before {
  width: 170px; height: 170px; top: 10px; left: -110px; opacity: 0.1; transform: rotate(-8deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='43' fill='none' stroke='%23c8102e' stroke-width='11'/%3E%3Ctext x='50' y='63' text-anchor='middle' font-family='Arial,Helvetica,sans-serif' font-weight='700' font-size='38' fill='%231d2433'%3E50%3C/text%3E%3C/svg%3E");
}
/* Triangle « attention » */
.showcase::before {
  width: 230px; height: 210px; top: 24px; right: -80px; opacity: 0.09; transform: rotate(9deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 110 100'%3E%3Cpath d='M55 8 L104 92 H6 Z' fill='none' stroke='%23c8102e' stroke-width='9' stroke-linejoin='round'/%3E%3Cpath d='M55 38 V64' stroke='%231d2433' stroke-width='9' stroke-linecap='round'/%3E%3Ccircle cx='55' cy='78' r='5' fill='%231d2433'/%3E%3C/svg%3E");
}
/* Boucles de stylo bleu dans la marge du parcours */
.how::before {
  width: 260px; height: 160px; top: 34px; left: 2%; opacity: 0.16; transform: rotate(-6deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 160'%3E%3Cpath d='M20 90 C 40 20 150 10 200 50 C 250 90 190 150 120 140 C 50 130 40 70 110 55 C 170 42 230 70 245 110' fill='none' stroke='%231f3a93' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
}
/* Cône de plateau en bas à droite du parcours */
.how::after {
  width: 120px; height: 150px; bottom: 30px; right: 3%; opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 150'%3E%3Cpath d='M48 10 H72 L100 128 H20 Z' fill='none' stroke='%23c8102e' stroke-width='7' stroke-linejoin='round'/%3E%3Cpath d='M40 50 H80 M32 86 H88' stroke='%23c8102e' stroke-width='12'/%3E%3Crect x='6' y='128' width='108' height='14' rx='3' fill='none' stroke='%231d2433' stroke-width='6'/%3E%3C/svg%3E");
}
/* Tampon rond « Dossier conforme » */
.checks::before {
  width: 220px; height: 220px; top: 20px; right: -40px; opacity: 0.12; transform: rotate(-14deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cdefs%3E%3Cpath id='c' d='M100 100 m-72 0 a72 72 0 1 1 144 0 a72 72 0 1 1 -144 0'/%3E%3C/defs%3E%3Ccircle cx='100' cy='100' r='94' fill='none' stroke='%23c8102e' stroke-width='6'/%3E%3Ccircle cx='100' cy='100' r='56' fill='none' stroke='%23c8102e' stroke-width='3' stroke-dasharray='6 6'/%3E%3Ctext font-family='Arial,Helvetica,sans-serif' font-weight='700' font-size='19' letter-spacing='4' fill='%23c8102e'%3E%3CtextPath href='%23c'%3EDOSSIER CONFORME · ANTS ·%3C/textPath%3E%3C/text%3E%3Cpath d='M76 102 L94 120 L128 82' fill='none' stroke='%23c8102e' stroke-width='9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* Trombone */
.articles::before {
  width: 60px; height: 150px; top: 30px; left: -40px; opacity: 0.32; transform: rotate(-18deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 150'%3E%3Cpath d='M40 40 V118 a12 12 0 0 1 -24 0 V28 a18 18 0 0 1 36 0 V122 a22 22 0 0 1 -44 0 V48' fill='none' stroke='%235f6472' stroke-width='4.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
/* Grand point d'interrogation au stylo */
.faq::before {
  content: "?"; top: -10px; left: -30px; font: 700 300px/1 var(--hand); color: var(--bic); opacity: 0.07; transform: rotate(-10deg);
}
/* Marquage de route sur le panneau de forfaits */
.board-wrap::before {
  left: 0; right: 0; top: 50%; height: 6px; opacity: 0.09;
  background: repeating-linear-gradient(90deg, #fff 0 60px, transparent 60px 110px);
}
/* Disque « A » en filigrane sur l'appel à la démo */
.end::before {
  width: 260px; height: 260px; top: 50%; right: 4%; margin-top: -130px; opacity: 0.14; transform: rotate(-10deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M30 78 L50 22 L70 78 M37 60 H63' fill='none' stroke='%23fff' stroke-width='8' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: no-preference) {
  .hero::after, .checks::before, .end::before { animation: deco-drift 14s ease-in-out infinite alternate; }
}
@keyframes deco-drift { to { translate: 0 14px; rotate: 4deg; } }
@media (max-width: 900px) {
  .ledger::before { left: auto; right: -60px; top: -30px; width: 120px; height: 120px; }
  .showcase::before, .how::after { width: 140px; height: 130px; }
  .checks::before { width: 150px; height: 150px; }
  .end::before { width: 180px; height: 180px; margin-top: -90px; right: -30px; }
}
@media (max-width: 560px) {
  .hero::after { width: 96px; height: 96px; top: 6px; right: -26px; }
  .hero::before { bottom: -40px; height: 150px; }
  .how::before { width: 170px; height: 110px; }
  .faq::before { font-size: 200px; }
  .articles::before, .how::after { display: none; }
}

/* Parcours : papier millimétré, route qui relie les trois étapes, grands numéros d'étape en contour */
.how {
  counter-reset: etape;
  background-color: var(--paper-2);
  background-image:
    linear-gradient(rgba(31, 58, 147, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 58, 147, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(31, 58, 147, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 58, 147, 0.035) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}
.how > .wrap { position: relative; isolation: isolate; }
.how > .wrap::before {
  /* La route entre par la bordure du haut de la section et sort par celle du bas (padding 88 / 120). */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; top: -88px; bottom: -120px; opacity: 0.11;
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 2300' preserveAspectRatio='none'%3E%3Cpath d='M560 0 C 560 170 250 230 250 430 C 250 700 750 730 750 1000 S 250 1350 250 1650 S 720 2000 700 2300' fill='none' stroke='%231d2433' stroke-width='70'/%3E%3Cpath d='M560 0 C 560 170 250 230 250 430 C 250 700 750 730 750 1000 S 250 1350 250 1650 S 720 2000 700 2300' fill='none' stroke='%23fffdf7' stroke-width='5' stroke-dasharray='40 34'/%3E%3C/svg%3E");
}
.stage { position: relative; isolation: isolate; counter-increment: etape; }
.stage::before {
  content: counter(etape); position: absolute; z-index: -1; pointer-events: none;
  top: 50%; left: -5%; transform: translateY(-55%) rotate(-6deg);
  font: 900 clamp(12rem, 26vw, 22rem)/1 var(--display);
  color: rgba(201, 162, 107, 0.12); -webkit-text-stroke: 3px rgba(169, 130, 76, 0.38);
}
.stage.flip::before { left: auto; right: -5%; transform: translateY(-55%) rotate(6deg); }
@media (max-width: 900px) {
  .stage::before { top: -40px; left: -10px; transform: rotate(-6deg); font-size: 9rem; }
  .stage.flip::before { left: auto; right: -10px; transform: rotate(6deg); }
  .how > .wrap::before { opacity: 0.07; }
}

/* Barre de navigation sur petit écran : logo et tampon en haut, onglets sur une seconde rangée */
@media (max-width: 760px) {
  .bar .wrap { flex-wrap: wrap; gap: 8px 12px; padding-top: 14px; min-height: 0; }
  .logo { font-size: 1.6rem; padding-bottom: 0; }
  .bar .bar-stamp { margin: 0 0 0 auto; font-size: 0.9rem; padding: 6px 10px; }
  .bar nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; scrollbar-width: none; padding-top: 4px; }
  .tab { padding: 8px 12px; font-size: 0.92rem; }
  [id] { scroll-margin-top: 130px; }
}
@media (max-width: 420px) {
  .logo-text small { display: none; }
  .tab::before { display: none; }
}

/* Ouverture de la page : la barre descend, les intercalaires sortent un par un, le tampon tombe,
   le texte monte et le dossier se pose. Uniquement si l'appareil accepte les animations. */
@media (prefers-reduced-motion: no-preference) {
  .bar { animation: bar-in 0.5s ease-out both; }
  .bar .tab { animation: tab-in 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both; animation-delay: calc(0.3s + var(--i, 0) * 0.09s); }
  .bar .tab:nth-child(1) { --i: 0; }
  .bar .tab:nth-child(2) { --i: 1; }
  .bar .tab:nth-child(3) { --i: 2; }
  .bar .bar-stamp { animation: stamp-in 0.4s cubic-bezier(0.3, 1.6, 0.6, 1) both; animation-delay: 0.65s; }
  .hero > div:first-child > * { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
  .hero > div:first-child > :nth-child(1) { animation-delay: 0.1s; }
  .hero > div:first-child > :nth-child(2) { animation-delay: 0.2s; }
  .hero > div:first-child > :nth-child(3) { animation-delay: 0.5s; }
  .hero > div:first-child > :nth-child(4) { animation-delay: 0.6s; }
  .hero > div:first-child > :nth-child(5) { animation-delay: 0.7s; }
  .hero .folder { animation: folder-in 0.75s cubic-bezier(0.2, 0.8, 0.3, 1.1) both; animation-delay: 0.25s; }
  .tab.pulled { animation: tab-pull 0.4s ease-out; }
}
@keyframes bar-in { from { translate: 0 -100%; } }
@keyframes tab-in { from { translate: 0 110%; } }
@keyframes stamp-in { from { opacity: 0; scale: 1.8; } }
@keyframes rise { from { opacity: 0; translate: 0 18px; } }
@keyframes folder-in { from { opacity: 0; translate: 0 -46px; rotate: -5deg; } }
@keyframes tab-pull { 40% { translate: 0 -7px; } }

/* Changement de section : une feuille descend sur la page, on tourne l'intercalaire, elle repart vers le bas.
   Elle passe sous la barre de navigation, qui reste visible. */
.sheet-turn {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; translate: 0 -105%;
  display: grid; place-items: center; text-align: center;
  background-color: var(--paper-2);
  background-image:
    linear-gradient(90deg, transparent 56px, rgba(200, 16, 46, 0.35) 56px, rgba(200, 16, 46, 0.35) 58px, transparent 58px),
    linear-gradient(transparent 31px, rgba(31, 58, 147, 0.1) 32px);
  background-size: 100% 100%, 100% 32px;
  box-shadow: 0 18px 30px rgba(29, 36, 51, 0.25), 0 -18px 30px rgba(29, 36, 51, 0.25);
}
.sheet-turn.down { translate: 0 0; transition: translate 0.36s cubic-bezier(0.55, 0, 0.85, 0.35); }
.sheet-turn.out { translate: 0 105%; transition: translate 0.48s cubic-bezier(0.2, 0.75, 0.3, 1); }
.sheet-turn.instant { transition: none; }
.sheet-turn .sheet-label { font: 900 clamp(2.4rem, 7vw, 4.6rem)/0.95 var(--display); text-transform: uppercase; color: var(--ink); }
.sheet-turn .sheet-label small { display: block; margin-bottom: 10px; font: 400 0.9rem var(--form); letter-spacing: 0.12em; color: var(--muted); }
.sheet-turn .sheet-label::after {
  content: "classé"; display: block; width: max-content; margin: 18px auto 0; padding: 4px 12px 2px;
  font: 900 1.1rem var(--display); letter-spacing: 0.1em; color: var(--stamp);
  border: 3px double var(--stamp); border-radius: 3px; rotate: -6deg;
}
