/* Pages servies par Spring (fiches, pages légales, vérification, admin). Jetons copiés de frontend/src/styles/tokens.css (spec §13.1).
   Instrument d'observation : panneaux opaques, filets fins, coins droits, alignement à gauche. L'or ne sert qu'à l'adoption. */
:root {
  --sky: #020203;
  --panel: #111214;
  --line: #2A2B2E;
  --text: #E4E4E1;
  --text-2: #C9C9C5;
  --muted: #8A8D93;
  --data: #A9C4D6;
  --data-hover: #D3E2EC;
  --action: #D9B26F;
  --paper: #F4F0E6;
  --ink: #1C1D20;
  --ink-2: #3A3C40;
  --ink-muted: #5B5D62;
  --ink-line: #D8D2C4;
  --rule: #B9B4A6;
  --ink-link: #3D5A6E;
  --ocre: #8A6A2F;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --gutter: clamp(20px, 5vw, 56px);
  --indent: clamp(0px, 7vw, 112px);
}
@media (max-width: 640px) { :root { --indent: 0px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
::selection { background: var(--data); color: var(--sky); }

body.night { background: var(--sky); color: var(--text); color-scheme: dark; }
body.night a { color: var(--data); text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.night a:hover { color: var(--data-hover); }
body.paper { background: var(--paper); color: var(--ink); }
body.paper a { color: var(--ink-link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.paper a:hover { color: var(--ink); }

/* En-tête et pied de page : site.css (partagé avec l'application). Ici, seulement leur variante sur papier. */
body.paper .site-header { background: var(--paper); border-color: var(--ink-line); }
body.paper .site-header .site-nav a { color: var(--ink-2); }
body.paper .site-header .site-nav a:hover { color: var(--ink); }
.wordmark { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: 0.06em; font-variant: small-caps;
  text-decoration: none !important; line-height: 1; }
body.night .wordmark { color: var(--text) !important; }
body.paper .wordmark { color: var(--ink) !important; }
/* Logo A « le repère » (05/12/2026), comme frontend/src/styles/tokens.css : le réticule et le cercle d'adoption devant le nom.
   Décoratif : le nom reste le texte du lien. Variante ivoire (encre sombre) sur les pages claires. */
.wordmark::before { content: ''; display: inline-block; width: 1.15em; height: 1.15em; margin-right: 0.42em; vertical-align: -0.22em;
  background: url(/logo/symbole.svg) center / contain no-repeat; }
body.paper .wordmark::before, .admin-bar .wordmark::before { background-image: url(/logo/symbole-ivoire.svg); }

main { flex: 1; width: 100%; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
body.paper .muted { color: var(--ink-muted); }
p { margin: 0 0 14px; }
h1 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1; letter-spacing: -0.005em; }
h2 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.2; }
.lead { font-size: 19px; line-height: 1.5; color: var(--text-2); }
body.paper .lead { color: var(--ink-2); }

/* ------------------------------------------------------------------ Fiche étoile */
.star { max-width: 1240px; padding: 48px var(--gutter) 72px calc(var(--gutter) + var(--indent)); }
.star-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 500px); grid-template-areas: "ident chart" "story chart";
  column-gap: clamp(40px, 6vw, 96px); align-items: start; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.star-ident { grid-area: ident; }
.star-story { grid-area: story; padding-top: 28px; }
.star-chart { grid-area: chart; margin: 0; }
.star-head:not(:has(.star-chart)) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ident" "story"; }

.tier { margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.star h1 { font-size: clamp(48px, 6vw, 92px); overflow-wrap: break-word; font-variant-numeric: lining-nums; }
.designation { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 0; color: var(--text-2); }
.swatch { flex: none; align-self: flex-start; margin-top: 4px; width: 12px; height: 12px; border-radius: 50%; }
.readout { margin: 6px 0 0 24px; color: var(--data); white-space: pre-wrap; }
.star-story .lead { max-width: 30ch; margin-bottom: 32px; font-family: var(--serif); font-size: clamp(24px, 2.4vw, 30px); line-height: 1.25; color: var(--text); }

.chart { display: block; width: 100%; height: auto; background: var(--sky); border: 1px solid var(--line); }
.star-chart figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }

.status { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0; }
.adopt { display: flex; justify-content: space-between; align-items: center; gap: 24px; width: 100%; max-width: 400px; min-height: 54px;
  padding: 0 20px; background: var(--action); color: var(--sky) !important; text-decoration: none !important; font-weight: 600; }
.adopt:hover { background: #E3C287; }
.adopt .price { font-family: var(--mono); font-weight: 500; font-size: 15px; }
.status .tier-note { margin: 0; font-size: 13px; color: var(--muted); }
.measure { display: inline-flex; align-items: center; min-height: 44px; }
.adopted-ring { display: inline-block; width: 11px; height: 11px; border: 1.5px solid var(--action); border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.status p { margin: 0; }

.star-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 500px); column-gap: clamp(40px, 6vw, 96px); padding-top: 40px; }
.star-body h2 { margin-bottom: 14px; font-size: 26px; }
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 13px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 14px; padding-top: 2px; }
.facts dd { margin: 0; max-width: 46ch; }

.data { margin-top: 28px; }
.data summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--data); }
.data summary::marker { color: var(--muted); }
.data dl { margin: 8px 0 0; font-size: 12.5px; }
.data dl div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 7px 0; border-top: 1px solid var(--line); }
.data dt { color: var(--muted); }
.data dd { margin: 0; }
.source { margin-top: 14px; font-size: 13px; color: var(--muted); }

.neighbors table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.neighbors th { padding: 0 0 8px; text-align: left; font-weight: 400; font-size: 13px; color: var(--muted); }
.neighbors td { padding: 0; border-top: 1px solid var(--line); }
.neighbors td a { display: flex; align-items: center; min-height: 46px; font-family: var(--serif); font-size: 21px; font-weight: 500;
  text-decoration: none; color: var(--text) !important; font-variant-numeric: lining-nums; }
.neighbors td a:hover { color: var(--data-hover) !important; }
.neighbors .num { text-align: right; font-family: var(--mono); font-size: 13px; color: var(--text-2); white-space: nowrap; padding-left: 16px; }
.neighbors tr:last-child td { border-bottom: 1px solid var(--line); }

.note { max-width: 70ch; margin: 48px 0 0; font-size: 13px; color: var(--muted); }

/* Mobile : carte sous l'identité, bouton d'adoption fixé à portée du pouce. */
@media (max-width: 900px) {
  .star { padding-top: 28px; padding-bottom: 48px; }
  .star-head { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ident" "chart" "story"; padding-bottom: 36px; }
  .star-chart { margin-top: 28px; }
  .star-body { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (max-width: 640px) {
  .star .adopt { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; max-width: none; min-height: 60px;
    padding: 0 20px calc(env(safe-area-inset-bottom)); border-top: 1px solid var(--sky); }
  body:has(.star .adopt) .site-footer { padding-bottom: 96px; }
  .data dl div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* ------------------------------------------------------------------ Page d'erreur */
.void { max-width: 1240px; padding: clamp(56px, 12vh, 140px) var(--gutter) 80px calc(var(--gutter) + var(--indent)); }
.void .readout { margin: 0 0 20px; }
.void h1 { font-size: clamp(48px, 7vw, 96px); margin-bottom: 20px; }
.void .lead { max-width: 34ch; }
.void ul { list-style: none; margin: 40px 0 0; padding: 0; max-width: 520px; }
.void li { border-top: 1px solid var(--line); }
.void li:last-child { border-bottom: 1px solid var(--line); }
.void li a { display: flex; justify-content: space-between; align-items: center; min-height: 48px; text-decoration: none; }
.void li a span:first-child { font-family: var(--serif); font-size: 21px; font-weight: 500; color: var(--text); }
.void li a:hover span:first-child { color: var(--data-hover); }
.void li a span:last-child { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ Documents (pages légales, crédits) */
.doc { display: grid; grid-template-columns: minmax(0, 68ch) 240px; justify-content: start; column-gap: clamp(40px, 6vw, 96px);
  padding: 56px var(--gutter) 88px calc(var(--gutter) + var(--indent)); }
.doc-head { grid-column: 1; grid-row: 1; }
.doc-head h1 { font-size: clamp(44px, 6vw, 68px); margin-bottom: 14px; }
.doc-head .version { margin: 0; color: var(--ink-muted); }
.doc-head .lead { font-family: var(--serif); font-size: 26px; line-height: 1.3; margin: 4px 0 0; color: var(--ink); }
.doc-text { grid-column: 1; grid-row: 2; font-size: 17px; line-height: 1.65; padding-top: 8px; }
.doc-text h2 { margin: 52px 0 12px; font-size: 27px; scroll-margin-top: 24px; }
.doc-text h2 + p, .doc-text h2 + ul, .doc-text h2 + dl { margin-top: 0; }
.doc-text p, .doc-text li { hyphens: auto; }
.doc-text a { hyphens: manual; overflow-wrap: anywhere; }
.doc-text ul { padding-left: 1.1em; margin: 0 0 14px; }
.doc-text li { margin-bottom: 6px; padding-left: 4px; }
.doc-text li::marker { color: var(--ink-muted); }
.doc-text strong { font-weight: 600; }
/* Encadré imposé dans les CGV (garantie légale de conformité, art. D211-3 C. conso). */
.doc-text .encadre { border: 1px solid var(--rule); padding: 4px 22px; margin: 18px 0; }
.doc-text .encadre ol { list-style: none; padding-left: 0; margin: 0 0 14px; }
.doc-text .encadre p, .doc-text .encadre li { hyphens: manual; padding-left: 0; }

.toc { grid-column: 2; grid-row: 1 / span 2; align-self: start; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto;
  padding-top: 14px; font-size: 14px; line-height: 1.4; }
.toc h2 { margin: 0 0 10px; font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink-muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink-line); }
.toc li { border-bottom: 1px solid var(--ink-line); }
.toc a { display: block; padding: 7px 0; text-decoration: none; color: var(--ink-2) !important; }
.toc a:hover { color: var(--ink-link) !important; }

.identity { margin: 12px 0; }
.identity div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 9px 0; border-top: 1px solid var(--ink-line); }
.identity div:last-child { border-bottom: 1px solid var(--ink-line); }
.identity dt { color: var(--ink-muted); }
.identity dd { margin: 0; }
.license { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12px; line-height: 1.55; padding: 16px 18px; margin: 16px 0 20px;
  border: 1px solid var(--ink-line); background: #F8F5EE; overflow-x: auto; }

@media (max-width: 1000px) {
  .doc { grid-template-columns: minmax(0, 1fr); padding-top: 36px; }
  .doc-head, .toc, .doc-text { grid-column: 1; grid-row: auto; }
  .toc { position: static; max-height: none; margin: 32px 0 0; padding-top: 0; }
  .toc a { padding: 5px 0; }
}

/* ------------------------------------------------------------------ Vérification d'un certificat */
.verify { max-width: 1240px; padding: 56px var(--gutter) 88px calc(var(--gutter) + var(--indent)); }
.verify-inner { max-width: 640px; }
.verify .number { margin: 0 0 22px; font-size: 14px; color: var(--ink-2); }
.verify h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 18px; }
.verify .lead { font-size: 20px; margin-bottom: 28px; }
.verify .lead .name { font-family: var(--serif); font-size: 1.35em; color: var(--ink); }
.verdict { padding-top: 18px; border-top: 2px solid var(--ink); }
.verdict.void-cert { border-top-color: var(--ocre); }
.record { margin: 0 0 24px; font-size: 15px; }
.record div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--ink-line); }
.record dt { color: var(--ink-muted); }
.record dd { margin: 0; }

/* ------------------------------------------------------------------ Accueil et pages « Offrir une étoile »
   Un geste, pas un achat : le vrai ciel du soir en grand, le titre en Garamond, beaucoup d'air. Ce que vit la personne
   qui reçoit (email, révélation, certificat : une même vraie commande), quatre garanties ; le prix en une phrase. */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.offer { padding-bottom: 40px; }
.offer > .band { max-width: 1240px; margin: 0 var(--gutter) 0 calc(var(--gutter) + var(--indent)); }

/* Le ciel occupe la droite jusqu'au bord de l'écran, toute la hauteur ; le texte reste sur le noir, à gauche. */
.hero { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); min-height: min(calc(100svh - 73px), 880px); }
.hero-text { grid-column: 1; grid-row: 1; align-self: center; padding: 48px clamp(24px, 4vw, 56px) 72px calc(var(--gutter) + var(--indent)); }
.hero h1 { font-size: clamp(48px, 5.6vw, 88px); line-height: 0.98; letter-spacing: -0.012em; max-width: 13ch; margin-bottom: 28px;
  text-wrap: balance; font-variant-numeric: oldstyle-nums; }
.hero .lead { max-width: 34ch; margin-bottom: 36px; font-size: 19px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.offer .adopt { justify-content: center; width: auto; max-width: 100%; padding: 0 32px; font-size: 16px; }
.season { max-width: 40ch; margin: 36px 0 0; font-size: 14px; color: var(--muted); }
/* « Une étoile qui a du sens » : l'argument de l'occasion, juste avant le bouton. Filet « mesure », pas d'or. */
.hero .lead:has(+ .meaning) { margin-bottom: 24px; }
.meaning { max-width: 40ch; margin: 0 0 36px; padding-left: 16px; border-left: 1px solid var(--data); font-size: 15px; line-height: 1.55; color: var(--text-2); }
.meaning strong { display: block; margin-bottom: 2px; font-family: var(--serif); font-size: 21px; font-weight: 500; color: var(--text); }

.sky { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; margin: 0; min-height: 0; }
.sky .horizon { display: block; flex: 1; width: 100%; height: auto; min-height: 0; background: var(--sky); }
.horizon .names text { font-family: var(--serif); font-style: italic; font-size: 24px; fill: #C9C9C5; }
.horizon .scale text { font-family: var(--sans); font-size: 15px; fill: var(--muted); }
.sky figcaption { padding: 12px var(--gutter) 16px 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.sky figcaption > span { display: block; max-width: 72ch; }
.sky .readout-line { margin-top: 4px; font-size: 12px; color: var(--data); white-space: pre-wrap; }

.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 24px; padding: 0; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--line); }
.crumbs a, .crumbs [aria-current] { display: inline-flex; align-items: center; min-height: 32px; }

/* Bandes : titre à gauche, contenu à droite ; certaines prennent toute la largeur. */
.band { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); column-gap: clamp(32px, 5vw, 80px); padding: 72px 0 80px;
  border-top: 1px solid var(--line); }
.band > h2 { grid-column: 1; font-size: clamp(30px, 2.8vw, 40px); font-weight: 500; line-height: 1.1; margin-bottom: 24px; }
.band > :not(h2) { grid-column: 2; }
.band.wide > * { grid-column: 1 / -1; }
.prose p { max-width: 66ch; font-size: 17px; line-height: 1.7; color: var(--text-2); }
.prose strong { font-weight: 600; color: var(--text); }

/* Le jour venu : comment l'offrir en une phrase, puis deux téléphones et le certificat, posés sur la même ligne. */
.arrival-how { max-width: 60ch; margin: 0 0 36px; font-size: 17px; line-height: 1.65; color: var(--text-2); }
.arrival-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 40px clamp(32px, 5vw, 72px); }
.arrival figure { margin: 0; }
.phone { width: 240px; }
.screen { padding: 9px; background: var(--panel); border: 1px solid var(--line); border-radius: 36px; }
.screen img { display: block; width: 100%; height: auto; border-radius: 28px; }
.arrival .paper { width: 300px; }
.arrival .paper img { display: block; width: 100%; height: auto; }
.arrival figcaption { max-width: 30ch; margin-top: 16px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.arrival figcaption strong { display: block; font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.2; color: var(--text); }
.arrival .note { margin: 32px 0 0; }

/* « Les occasions » (occasions.html) : le titre, puis la liste. */
.occasions-head { max-width: 1240px; margin: 0 var(--gutter) 0 calc(var(--gutter) + var(--indent)); padding: 48px 0 8px; }
.occasions-head h1 { font-size: clamp(40px, 4.6vw, 68px); line-height: 1; max-width: 16ch; margin-bottom: 20px; text-wrap: balance; }
.occasions-head .lead { max-width: 52ch; margin: 0; }
.occasions-page .occasions-list { padding-top: 48px; }
.occasions-list ul { list-style: none; margin: 0; padding: 0; }
.occasions-list li { border-top: 1px solid var(--line); }
.occasions-list li:last-child { border-bottom: 1px solid var(--line); }
.occasions-list a { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); align-items: baseline; gap: 4px 24px; padding: 14px 0;
  min-height: 60px; text-decoration: none; }
.occasions-list a span:first-child { font-family: var(--serif); font-size: 28px; font-weight: 500; line-height: 1.1; color: var(--text); }
.occasions-list a span:last-child { font-size: 15px; color: var(--text-2); }
.occasions-list a:hover span:first-child { color: var(--data-hover); }

.ages { list-style: none; margin: 8px 0 0; padding: 0; max-width: 720px; }
.ages li { display: grid; grid-template-columns: 72px minmax(0, auto) minmax(0, 1fr); align-items: baseline; gap: 4px 16px; padding: 10px 0;
  border-top: 1px solid var(--line); }
.ages li:last-child { border-bottom: 1px solid var(--line); }
.ages .age { color: var(--muted); font-variant-numeric: tabular-nums; }
.ages a { font-family: var(--serif); font-size: 21px; font-weight: 500; }
.ages .muted { font-size: 14px; }

/* Les garanties : une bande de quatre faits, sans pictogramme ; les sources des données en pied. */
.pledges dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; margin: 0; }
.pledges dl div { padding-top: 16px; border-top: 1px solid var(--line); }
.pledges dt { margin-bottom: 8px; font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.2; }
.pledges dd { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.pledges .sources { margin: 28px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }

.price-line { max-width: 40ch; margin: 0 0 20px; font-family: var(--serif); font-size: clamp(24px, 2.2vw, 28px); line-height: 1.3; }
.price-detail summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--data); }
.price-detail summary::marker { color: var(--muted); }
.price-detail table { width: 100%; max-width: 720px; margin: 12px 0 8px; border-collapse: collapse; }
.price-detail th, .price-detail td { padding: 12px 16px 12px 0; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--line); }
.price-detail th { font-family: var(--serif); font-size: 21px; font-weight: 500; white-space: nowrap; }
.price-detail td { color: var(--text-2); }
.price-detail .num { padding-right: 0; text-align: right; white-space: nowrap; color: var(--text); font-variant-numeric: tabular-nums; }
.price-detail p { max-width: 66ch; margin-top: 12px; font-size: 14px; }

.closing { padding-bottom: 48px; }
.closing > * { grid-column: 1 / -1; }
.closing-line { margin: 0 0 28px; font-family: var(--serif); font-size: clamp(32px, 3.4vw, 48px); line-height: 1.1; }

@media (max-width: 1200px) {
  .pledges dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
}
@media (max-width: 1000px) {
  .band { grid-template-columns: minmax(0, 1fr); padding: 56px 0 60px; }
  .band > :not(h2) { grid-column: 1; }
}
@media (max-width: 900px) {
  /* Titre, texte et bouton dans le premier écran ; le ciel juste après, sa légende collée dessous ; puis « Une étoile qui
     a du sens » et la saison. Les deux blocs s'ouvrent (display: contents) pour que la grille les réordonne. */
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 28px 0 44px; }
  .hero-text, .sky { display: contents; }
  .hero-text > * { margin-inline: var(--gutter); }
  .hero .crumbs { order: 1; }
  .hero h1 { order: 2; }
  .hero .lead { order: 3; }
  .hero .cta-row { order: 4; margin-bottom: 24px; }
  .sky .horizon { order: 5; flex: none; height: clamp(240px, 34svh, 420px); }
  .sky figcaption { order: 6; padding: 10px var(--gutter) 0; }
  .hero .meaning { order: 7; margin-top: 32px; margin-bottom: 0; }
  .hero .season { order: 8; margin-top: 24px; }
}
@media (max-width: 640px) {
  .hero h1 { max-width: none; font-size: 42px; margin-bottom: 18px; }
  .meaning { margin-bottom: 24px; font-size: 14px; }
  .meaning strong { font-size: 19px; }
  .hero .lead { font-size: 17px; margin-bottom: 28px; }
  .offer .adopt { flex: 1 1 100%; min-height: 56px; }
  .band { padding: 40px 0 44px; }
  .band > h2 { margin-bottom: 16px; }
  .arrival-how { margin-bottom: 24px; font-size: 16px; }
  .prose p { font-size: 16px; line-height: 1.65; }
  /* Les trois vues défilent de côté, la suivante dépasse : une ligne au lieu de trois écrans. */
  .arrival-row { flex-wrap: nowrap; align-items: flex-start; gap: 16px; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 8px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain; }
  .arrival-row > figure { flex: 0 0 62%; scroll-snap-align: start; }
  .phone { width: auto; }
  .screen { padding: 6px; border-radius: 26px; }
  .screen img { border-radius: 20px; }
  .arrival .paper { flex-basis: 78%; width: auto; }
  .arrival figcaption strong { font-size: 19px; }
  .arrival figcaption { font-size: 13.5px; }
  .arrival .note { margin-top: 16px; font-size: 13px; }
  .occasions-list a { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 0; }
  .occasions-list a span:first-child { font-size: 25px; }
  .occasions-list a span:last-child { font-size: 14px; }
  .pledges dl { gap: 24px 16px; }
  .pledges dt { font-size: 19px; }
  .pledges dd { font-size: 13.5px; }
  .ages li { grid-template-columns: 60px minmax(0, 1fr); }
  .ages .muted { grid-column: 2; }
}

/* ------------------------------------------------------------------ Pied de page */
body.paper .site-footer { background: var(--paper); border-color: var(--ink-line); color: var(--ink-muted); }
body.paper .site-footer nav a { color: var(--ink-link); }

/* ------------------------------------------------------------------ Formulaires sobres (signalement, administration) */
.notice { padding: 10px 14px; border-left: 2px solid var(--ocre); background: #EDE7DA; }
body.night .notice { border-left-color: var(--action); background: var(--panel); }
.report { margin-top: 32px; padding-top: 6px; border-top: 1px solid var(--ink-line); }
.report summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--ink-link); }
form label { display: block; margin: 12px 0 6px; }
textarea, input[type=text], input[type=search], input[type=number] { width: 100%; max-width: 480px; min-height: 40px; padding: 8px 10px; font: inherit;
  color: inherit; background: #FBF9F4; border: 1px solid var(--rule); border-radius: 0; }
textarea:focus, input:focus { outline: 1px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
button { min-height: 40px; margin-top: 10px; padding: 0 16px; font: inherit; font-weight: 500; color: var(--ink); background: var(--action);
  border: 0; border-radius: 0; cursor: pointer; }
button.quiet { background: transparent; border: 1px solid var(--rule); }
button.quiet:hover { border-color: var(--ink); }

/* ------------------------------------------------------------------ Administration : dense, tabulaire, sans graphique */
body.admin-page { font-size: 14px; line-height: 1.5; }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 0 var(--gutter); border-bottom: 1px solid var(--ink);
  background: var(--paper); }
.admin-bar .wordmark { font-size: 18px; padding: 14px 0; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 0 4px; align-self: stretch; align-items: flex-end; }
.admin-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 10px; text-decoration: none; color: var(--ink-2) !important;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-nav a:hover { color: var(--ink) !important; border-bottom-color: var(--rule); }
.admin-nav a[aria-current=page] { color: var(--ink) !important; border-bottom-color: var(--ink); font-weight: 500; }
.admin-bar .to-site { margin-left: auto; display: inline-flex; align-items: center; min-height: 48px; }
.admin { max-width: 1280px; padding: 28px var(--gutter) 64px; }
.admin > .notice { margin: 0 0 20px; }
.admin h1 { margin-bottom: 6px; font-size: 34px; }
.admin h1.mono { font-family: var(--mono); font-size: 24px; font-weight: 500; }
.admin h2 { margin: 36px 0 8px; font-family: var(--sans); font-size: 15px; font-weight: 600; }
.admin .lead { font-size: 16px; margin: 0 0 8px; }
.admin p.muted { max-width: 90ch; }
.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 18px 0 8px; padding: 0; list-style: none; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink-line); }
.counters li { border-right: 1px solid var(--ink-line); }
.counters li:last-child { border-right: 0; }
.counters a { display: block; min-height: 44px; padding: 12px 12px 12px 0; text-decoration: none; color: var(--ink-2) !important; }
.counters li + li a { padding-left: 12px; }
.counters strong { display: block; font-family: var(--mono); font-size: 24px; font-weight: 500; color: var(--ink); }
.counters .alert strong { color: var(--ocre); }
.table-wrap { overflow-x: auto; margin: 8px 0 24px; }
.admin table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.table-wrap table { margin: 0; }
.admin th, .admin td { padding: 7px 12px 7px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ink-line); }
.admin thead th { position: sticky; top: 0; background: var(--paper); color: var(--ink-muted); font-weight: 500; border-bottom-color: var(--ink); white-space: nowrap; }
.admin table:not(.kv) tbody tr:hover td { background: #EDE7DA; }
.admin table.periods { table-layout: fixed; min-width: 560px; }
.admin table.periods th:first-child { width: 34%; }
.admin table.kv { max-width: 860px; }
.admin table.kv th { width: 200px; color: var(--ink-muted); font-weight: 400; }
.admin td.num, .admin th.num { text-align: right; padding-right: 0; padding-left: 12px; }
.admin td .mono, .admin td.mono { font-size: 12px; }
.admin .state { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--rule); white-space: nowrap; }
.admin .state.ACTIVE, .admin .state.PAID { border-color: var(--ink-muted); }
.admin .state.REVOKED, .admin .state.RELEASED, .admin .state.CHARGEBACK, .admin .state.NEEDS_EXCHANGE { color: var(--ocre); border-color: var(--ocre); }
.admin .actions { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-end; padding: 16px 0; border-top: 1px solid var(--ink-line); }
.admin .actions form { margin: 0; }
.admin .actions.danger { border-top-color: var(--ocre); }
.admin .actions.danger button { background: var(--ink); color: var(--paper); }
.admin td.actions { display: table-cell; padding: 4px 0; border-top: 0; }
.admin td.actions form { display: inline-block; margin-right: 8px; }
.admin td.actions button { margin-top: 0; }
.admin .reason { white-space: pre-wrap; max-width: 420px; }
.search-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 20px; }
.search-form label { flex-basis: 100%; margin-bottom: -4px; }
.search-form input { flex: 1 1 320px; max-width: 560px; }
.search-form button { margin-top: 0; }
.admin-login { max-width: 420px; padding: 56px var(--gutter); }
.admin-login h1 { font-size: 40px; margin-bottom: 10px; }
.admin-login input { font-family: var(--mono); font-size: 22px; letter-spacing: 0.3em; max-width: 220px; }

/* ------------------------------------------------------------------ Impression : texte noir sur blanc, sans navigation */
@media print {
  @page { margin: 18mm 16mm; }
  body, body.night, body.paper { background: #fff !important; color: #000 !important; font-size: 10.5pt; display: block; }
  .site-header { border: 0; padding: 0 0 12pt; }
  .toc, .report, .star .adopt, .data summary, .measure { display: none !important; }
  .doc, .star, .verify, .void { display: block; padding: 0; max-width: none; }
  .doc-text { font-size: 10.5pt; line-height: 1.5; }
  .doc-text h2 { margin-top: 18pt; font-size: 15pt; break-after: avoid; }
  .doc-text p, .doc-text li { orphans: 3; widows: 3; }
  a { color: #000 !important; text-decoration: none !important; }
  .doc-text a[href^="http"]::after, .doc-text a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
  .license { background: none; }
  .site-footer { border-top: 0.5pt solid #000; padding: 8pt 0 0; color: #000 !important; }
  .chart { border-color: #000; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
html { scroll-behavior: smooth; }

/* ------------------------------------------------------------------ Vérification d'un certificat, version douce (téléphone d'abord)
   Le cercle ocre de l'étoile adoptée sert de sceau ; le reste est un texte calme, aligné à gauche. */
.verify-soft { padding-top: 40px; }
.verify-soft .seal { display: block; margin: 0 0 18px; color: var(--ocre); }
.verify-soft h1 { font-size: clamp(36px, 9vw, 64px); line-height: 1.05; }
.verify-soft .lead { font-size: clamp(18px, 4.6vw, 20px); }
.verify-soft .record div { grid-template-columns: minmax(7em, 35%) minmax(0, 1fr); }
.verify-soft .privacy { margin: 0 0 14px; font-size: 16px; color: var(--ink-2); }
@media (max-width: 640px) {
  .verify-soft { padding-top: 28px; padding-bottom: 56px; }
}

/* ------------------------------------------------------------------ Vérification d'un certificat : en-tête (05/12/2026)
   Comme sur le papier : le symbole du logo sert de sceau, le verdict en grand, le numéro en relevé dessous ; puis l'état
   en premier dans le relevé, et le lien vers le ciel. Sélecteurs propres à cette page seulement. */
body.verify-page { width: auto; } /* garde-fou : la vignette .paper de l'accueil ne doit jamais rétrécir cette page */
.verify-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 20px; align-items: center; margin: 0 0 26px; }
.verify-soft .verify-head .seal { width: 64px; height: 64px; margin: 0; }
.verify-head h1 { margin: 0 0 8px; }
.verify-head .number { margin: 0; font-size: 14px; color: var(--ink-2); }
.verify .record dd.valid { font-weight: 600; }
.verify .sky-link { margin: -8px 0 28px; }
.verify .sky-link a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; }
@media (max-width: 640px) {
  .verify-head { grid-template-columns: 48px minmax(0, 1fr); gap: 0 14px; }
  .verify-soft .verify-head .seal { width: 48px; height: 48px; }
}
