/* ============================================================
   Recherches Généalogiques — « Le Registre »
   Tokens : spec § 3.1. Polices auto-hébergées (SIL OFL).
   ============================================================ */
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #F5F1E8; --paper-2: #EDE6D8; --card: #FBF9F4;
  --ink: #1F1D1A; --ink-2: #3B372F; --muted: #6E675C; --rule: #DED5C4;
  --verm: #B5452B; --verm-text: #9E3A23; --verm-soft: #F2DDD5; --verm-on-ink: #E58A6F;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: 48px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); }
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--verm); outline-offset: 3px; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 100; }
.skip-link:focus { top: 12px; }
.icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.15em; flex: none; }
.lbl { font: 500 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--verm-text); }
.lbl--on-ink { color: var(--verm-on-ink); }
main h2 { font: 400 clamp(30px, 3.4vw, 40px)/1.08 var(--serif); letter-spacing: -.015em; margin: 10px 0 14px; }
main h2 em, main h1 em { font-style: italic; color: var(--verm); }
.lead { font-size: 16.5px; line-height: 1.65; color: var(--ink-2); }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 14px/1 var(--sans); padding: 13px 20px; border-radius: 2px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer; }
.btn:hover { background: #000; }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--card); }
.btn--paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.section { padding: 72px 0; border-top: 1px solid var(--rule); }
.section--paper2 { background: var(--paper-2); }

/* ---------- Base complémentaire ---------- */
/* Les maquettes partent de marges et d'espacements nuls : on conserve cette base. */
h1, h2, h3, h4, p, ul, ol, li, dl, dd, figure, blockquote, fieldset, legend { margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.5; }
svg[hidden] { display: none; } /* sprite : l'attribut hidden ne suffit pas sur un <svg> en ligne */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }
:where(main p) { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.btn--paper:hover { background: var(--card); }
.section .lead + .ctas, .page-hero .lead + .ctas { margin-top: 28px; }
.section-intro { max-width: 720px; }
.cta :focus-visible, .bandeau :focus-visible, .demande-side :focus-visible { outline-color: var(--verm-on-ink); }

/* ---------- Titres de page ---------- */
.page-title, .page-hero h1 { font: 400 clamp(38px, 4.6vw, 52px)/1.04 var(--serif); letter-spacing: -.02em; margin: 14px 0 18px; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--rule); line-height: 1.5; }
.site-header.is-scrolled { box-shadow: 0 2px 14px rgba(31, 29, 26, .08); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { font: 500 21px/1.5 var(--serif); letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
/* Structure attendue : a.brand = « Recherches Généalogiques », une espace, puis <small> (l'espace donne le nom accessible « … Cabinet » ; la marge la complète). */
.brand small { font: 400 10px/1.5 var(--mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-left: 3px; }
.site-nav ul { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.site-nav a { white-space: nowrap; }
.site-nav a:not(.btn) { font-size: 13.5px; color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
.site-nav a:not(.btn):hover { color: var(--ink); }
.site-nav a:not(.btn)[aria-current="page"] { color: var(--ink); border-bottom-color: var(--verm); }
.nav-toggle { flex: none; display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: none; border: 1px solid var(--ink); border-radius: 2px; color: var(--ink); cursor: pointer; }
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: inline-block; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--rule); line-height: 1.5; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; padding-top: 44px; padding-bottom: 26px; font-size: 13px; }
.footer-grid .lbl { margin-bottom: 12px; font-size: 10.5px; letter-spacing: .08em; color: var(--muted); }
.footer-grid li { list-style: none; margin-bottom: 8px; color: var(--ink-2); }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-grid .brand { display: inline-block; }
/* Structure attendue : dans la 1re colonne du pied de page, le <p> de présentation suit directement a.brand. */
.footer-grid .brand + p { margin-top: 8px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding-top: 16px; padding-bottom: 22px; border-top: 1px solid var(--rule); font-size: 11.5px; color: var(--muted); }
.footer-legal a { text-underline-offset: 2px; }

/* ---------- Accueil : en-tête de page (hero) ---------- */
.hero { display: grid; grid-template-columns: 1.08fr .92fr; max-width: 1240px; margin: 0 auto; }
.hero-text { padding: 64px var(--gutter) 56px; border-right: 1px solid var(--rule); }
.hero h1 { font: 400 58px/1.02 var(--serif); letter-spacing: -.022em; margin: 22px 0 22px; }
.hero-kw { display: block; font-size: 22px; letter-spacing: 0; color: var(--muted); margin-bottom: 10px; font-style: normal; }
.hero .lead { max-width: 500px; margin-bottom: 28px; }
.ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.reassure { margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.reassure b { color: var(--ink); font-weight: 600; }

/* Registre : fond réglé (38 px), marge vermillon, lignes « année · acte · cote » */
.registre { position: relative; padding: 46px 40px; background: repeating-linear-gradient(to bottom, transparent 0 37px, var(--rule) 37px 38px), var(--paper-2); }
.registre::before { content: ""; position: absolute; top: 0; bottom: 0; left: 92px; width: 1px; background: var(--verm); opacity: .35; }
.registre-title { font: 400 10.5px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); height: 38px; display: flex; align-items: center; padding-left: 66px; }
.registre-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; height: 38px; font-size: 13.5px; }
/* Structure attendue : .registre-row > 3 enfants directs, dans cet ordre : [1] année, [2] texte (<b> acte + <span> lieu), [3] cote (peut commencer par svg.icon). */
.registre-row > :nth-child(1) { font: 400 12px/1.5 var(--mono); color: var(--muted); }
/* Structure attendue : le 2e enfant de .registre-row contient <b>acte</b> puis <span>· lieu</span> (le <span> passe en gris). */
.registre-row > :nth-child(2) span { color: var(--muted); }
/* Structure attendue : le 3e (dernier) enfant de .registre-row est la cote ; elle peut commencer par <svg class="icon">. */
.registre-row > :nth-child(3) { font: 400 10.5px/1.5 var(--mono); color: var(--muted); }
/* Structure attendue : idem, la cote (3e enfant) d'une ligne .is-ok passe en vermillon. */
.registre-row.is-ok > :nth-child(3) { color: var(--verm-text); }
.registre-row .icon { margin-right: 2px; }
.registre-note { padding-left: 66px; font: italic 400 15.5px/1.5 var(--serif); color: var(--verm-text); height: 38px; display: flex; align-items: center; }
.ex { position: absolute; right: 16px; bottom: 12px; font: 400 9.5px/1.4 var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

/* Profils : quatre colonnes séparées par des filets */
.profils { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1240px; margin: 0 auto; border-top: 1px solid var(--rule); }
.profil { display: block; padding: 26px 28px 28px; border-right: 1px solid var(--rule); text-decoration: none; transition: background .2s; }
.profil:hover { background: var(--card); }
.profil:last-child { border-right: 0; }
/* Structure attendue : a.profil > span (numéro, 1er enfant) + h3 + p + span (libellé du lien, dernier enfant), sans enveloppe ni icône en tête. */
.profil > span:first-child { font: 400 11px/1.5 var(--mono); color: var(--verm-text); }
.profil h3 { font: 500 21px/1.5 var(--serif); margin: 8px 0 6px; }
.profil p { font-size: 13px; color: var(--muted); line-height: 1.55; }
/* Structure attendue : le dernier enfant direct de a.profil est le span du libellé du lien (après h3 et p). */
.profil > span:last-child { display: inline-block; margin-top: 12px; font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--verm); }
.bandeau { display: flex; flex-wrap: wrap; gap: 30px; padding: 15px max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))); background: var(--ink); color: var(--rule); font-size: 12.5px; line-height: 1.5; }
.bandeau b { color: var(--card); font-weight: 600; }

/* Définition */
.def { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; }
.def-lead { font: 400 22px/1.45 var(--serif); color: var(--ink); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 40px; border-top: 1px solid var(--ink); }
.trio > div { padding: 18px 22px 0 0; }
.trio h3 { font: 500 22px/1.5 var(--serif); margin: 6px 0; }
.trio p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* Méthode */
.steps { margin-top: 34px; border-top: 1px solid var(--ink); list-style: none; }
.step { display: grid; grid-template-columns: 70px 260px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--rule); align-items: baseline; list-style: none; }
/* Structure attendue : .step > [1] numéro (span, 1er enfant direct) + h3 + p, sans enveloppe ni icône en tête. */
.step > :first-child { font: 400 12px/1.5 var(--mono); color: var(--verm-text); }
.step h3 { font: 500 22px/1.5 var(--serif); }
.step p { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }

/* Livrable : aperçu de rapport */
.livrable { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: center; }
.doc { position: relative; background: var(--card); border: 1px solid var(--rule); box-shadow: 0 30px 60px -30px rgba(31, 29, 26, .35), 0 0 0 6px var(--paper-2); padding: 28px 30px; transform: rotate(-.6deg); }
/* Structure attendue : figure.doc > figcaption.ex (n'importe où) + div (en-tête, 1er div) + h3 + p (sous-titre) + table + div (signature, dernier div). */
.doc > div:first-of-type { display: flex; justify-content: space-between; font: 400 10px/1.5 var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.doc h3 { font: 500 20px/1.5 var(--serif); margin: 14px 0 4px; }
.doc p { font-size: 12px; line-height: 1.5; color: var(--muted); margin-bottom: 14px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 12px; }
.doc th { text-align: left; font: 500 9.5px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 6px 6px 0; border-bottom: 1px solid var(--rule); }
.doc td { padding: 8px 6px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
/* Structure attendue : la dernière cellule de chaque ligne du tableau .doc est la cote d'archives. */
.doc td:last-child { font: 400 10.5px/1.5 var(--mono); color: var(--verm-text); }
/* Structure attendue : le dernier div enfant direct de .doc est la ligne de signature (date + nom). */
.doc > div:last-of-type { display: flex; justify-content: space-between; margin-top: 16px; font-size: 11px; color: var(--muted); }
.doc .ex { bottom: auto; top: -11px; right: 18px; background: var(--verm); color: var(--card); padding: 4px 8px; }
.livrable ul { list-style: none; margin-top: 18px; }
.livrable li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.livrable li .icon { color: var(--verm); margin-top: 3px; stroke-width: 2.2; }

/* Formules */
.formules { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 34px; border: 1px solid var(--ink); }
.formule { padding: 30px 32px; }
.formule + .formule { border-left: 1px solid var(--ink); }
/* Double classe : l'emporte sur « .article h3 » (déclaré plus bas) quand les formules sont dans un article. */
.formules .formule h3 { font: 500 26px/1.5 var(--serif); margin: 8px 0 10px; }
.formule .when { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--rule); font-size: 13px; color: var(--muted); }
.formule .when b { color: var(--ink); }

/* Engagements */
.engagements { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 34px; border-top: 1px solid var(--ink); }
.engagements > div { padding: 18px 20px 0 0; }
.engagements h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 6px; }
.engagements p { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* Guides */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.card { display: block; background: var(--card); border: 1px solid var(--rule); padding: 22px 24px; text-decoration: none; transition: border-color .2s; }
.card:hover { border-color: var(--ink); }
/* Structure attendue : a.card > span (date, 1er enfant) + h3 + p + span (« Lire le guide », dernier enfant), sans enveloppe ni icône en tête. */
.card > span:first-child { font: 400 10.5px/1.5 var(--mono); color: var(--muted); }
.card h3 { font: 500 21px/1.2 var(--serif); margin: 10px 0 8px; }
.card p { font-size: 13px; color: var(--muted); line-height: 1.55; }
/* Structure attendue : le dernier enfant direct de a.card est le span « Lire le guide » (après h3 et p). */
.card > span:last-child { display: inline-block; margin-top: 14px; font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--verm); }

/* FAQ (accueil, page FAQ et fin des pages intérieures) */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; }
.faq a { text-decoration-color: var(--verm); text-underline-offset: 3px; }
.faq details, .article details { border-top: 1px solid var(--rule); padding: 16px 0; }
.faq details:last-child, .article details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary, .article summary { display: flex; justify-content: space-between; gap: 16px; font: 400 19px/1.5 var(--serif); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker, .article summary::-webkit-details-marker { display: none; }
.faq summary::after, .article summary::after { content: "+"; font-family: var(--mono); color: var(--verm); }
.faq details[open] summary::after, .article details[open] summary::after { content: "–"; }
.faq details p, .article details p { margin-top: 10px; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.faq details p:last-child, .article details p:last-child { margin-bottom: 0; }

/* Appel à l'action final */
.cta { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding: 64px max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))); background: var(--ink); color: var(--paper); }
.cta h2 { color: var(--paper); }
.cta h2 em { color: var(--verm-on-ink); }
.cta p:not(.lbl) { color: var(--rule); }
/* Structure attendue : dans .cta, l'e-mail est un <p> placé immédiatement après le .btn (frères directs, sans <p> enveloppant le bouton). */
.cta .btn + p { margin-top: 14px; font: 400 13px/1.5 var(--mono); color: var(--rule); }

/* ---------- Pages intérieures ---------- */
.crumb { padding: 18px var(--gutter) 0; font: 400 11px/1.5 var(--mono); color: var(--muted); }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.page-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: end; padding: 30px var(--gutter) 52px; border-bottom: 1px solid var(--rule); }
.page-hero .lead { max-width: 600px; }
/* En-tête sans encadré .quick (guides, FAQ, contact, pages légales et de résultat) : une seule colonne, largeur de lecture limitée. */
.page-hero:not(:has(.quick)) { grid-template-columns: 1fr; }
.page-hero:not(:has(.quick)) > div { max-width: 820px; }
.quick { background: var(--card); border: 1px solid var(--rule); padding: 22px 24px; }
.quick h2 { font: 500 20px/1.5 var(--serif); letter-spacing: 0; margin: 0 0 10px; }
.quick li { display: flex; gap: 10px; list-style: none; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 13.5px; }
.quick li .icon { color: var(--verm); margin-top: 3px; }
.quick .btn { margin-top: 14px; width: 100%; justify-content: center; }

.page-body { display: grid; grid-template-columns: 230px 1fr; gap: 56px; padding: 52px var(--gutter) 64px; }
/* Les colonnes peuvent rétrécir sous la largeur de leur contenu : un schéma large défile dans son cadre, pas la page. */
.page-body > * { min-width: 0; }
.toc { position: sticky; top: 90px; align-self: start; font-size: 13px; }
.toc .lbl { display: block; margin-bottom: 12px; }
.toc a { display: block; padding: 7px 0 7px 12px; border-left: 1px solid var(--rule); color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { border-left: 2px solid var(--verm); color: var(--ink); font-weight: 600; padding-left: 11px; }

.article h2 { font: 400 32px/1.12 var(--serif); letter-spacing: -.01em; margin: 0 0 14px; scroll-margin-top: 90px; }
.article h2 em { font-style: italic; color: var(--verm); }
.article section { margin-bottom: 48px; }
.article .lbl { font: 500 11px/1.4 var(--mono); color: var(--verm-text); margin-bottom: 0; }
.article .defn { font: 400 21px/1.5 var(--serif); color: var(--ink); padding: 4px 0 4px 22px; border-left: 2px solid var(--verm); margin-bottom: 40px; max-width: 760px; }
.law { background: var(--card); border: 1px solid var(--rule); padding: 18px 22px; max-width: 720px; margin: 8px 0 14px; }
.law .lbl { display: block; margin-bottom: 6px; }
.law q { font: italic 400 16.5px/1.55 var(--serif); }
/* Structure attendue : blockquote.law > p.lbl + q + a (la source, seul lien du bloc). */
.law a { display: block; margin-top: 8px; font: 400 10.5px/1.5 var(--mono); color: var(--muted); }

.meta-line { margin-top: 18px; font: 400 11px/1.5 var(--mono); color: var(--muted); }
.article h3 { font: 500 21px/1.25 var(--serif); margin: 26px 0 8px; }
.article p, .article li { font-size: 15.5px; line-height: 1.75; color: var(--ink-2); max-width: 720px; }
.article p { margin-bottom: 14px; }
.article ul, .article ol { padding-left: 1.2em; margin-bottom: 14px; }
.article a { text-decoration-color: var(--verm); text-underline-offset: 3px; }
.figure { position: relative; max-width: 760px; margin: 18px 0 28px; padding: 26px; background: var(--paper-2); }
.figure svg { width: 100%; height: auto; display: block; }
.figure figcaption.ex { position: static; display: block; margin-top: 8px; text-align: right; }
.sources { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--ink); font-size: 13px; color: var(--muted); }
.sources li { font-size: 13px; }
/* Listes de définitions (mentions légales) */
/* Structure attendue : dl > paires dt + dd, dans cet ordre ; le dt peut contenir un span.lbl. */
.article dl { max-width: 720px; margin: 6px 0 18px; border-top: 1px solid var(--rule); }
.article dt { padding-top: 12px; }
.article dd { margin: 2px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--rule); font-size: 15.5px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------- Page contact : coordonnées directes (réutilise .trio) ---------- */
.coord { padding-top: 40px; padding-bottom: 48px; }
.coord .trio { margin-top: 0; }
.coord .lbl { display: flex; align-items: center; gap: 8px; }
.coord h2 { font: 500 21px/1.5 var(--serif); letter-spacing: 0; margin: 6px 0; overflow-wrap: anywhere; }
.coord h2 a { text-decoration-color: var(--verm); text-underline-offset: 3px; }
.coord p b { color: var(--ink); font-weight: 600; }
.coord p .icon { color: var(--verm); }

/* ---------- Formulaire de demande ---------- */
.demande-wrap { padding-bottom: 64px; }
.demande { display: grid; grid-template-columns: .8fr 1.2fr; border: 1px solid var(--ink); background: var(--card); }
.demande-side { padding: 34px; background: var(--ink); color: var(--rule); }
.demande-side h2 { font: 400 34px/1.1 var(--serif); letter-spacing: 0; color: var(--paper); margin: 10px 0 14px; }
.demande-side h2 em { font-style: italic; color: var(--verm-on-ink); }
.demande-side p:not(.lbl) { font-size: 14px; line-height: 1.6; color: var(--rule); }
.demande-side p + p { margin-top: 14px; }
.demande-etapes { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: s; }
.demande-etapes li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; padding: 12px 0; border-top: 1px solid var(--ink-2); font-size: 13.5px; }
.demande-etapes li::before { content: "0" counter(s); font: 400 11px/1.5 var(--mono); color: var(--verm-on-ink); padding-top: 2px; }
.demande-etapes + p { margin-top: 18px; }
.demande-form { padding: 30px 34px; }

.profils-choix { border: 0; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.profils-choix legend { width: 100%; font: 600 12.5px/1.4 var(--sans); margin-bottom: 8px; }
.profils-choix label { position: relative; }
.profils-choix input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.profils-choix label span { display: block; font-size: 12.5px; padding: 8px 12px; border: 1px solid var(--rule); background: #fff; }
.profils-choix input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.profils-choix input:focus-visible + span { outline: 2px solid var(--verm); outline-offset: 2px; }
.bloc { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.bloc legend { font: 500 10.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--verm-text); margin-bottom: 10px; }
.bloc[hidden] { display: none; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 12.5px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; font: 400 14px/1.4 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--rule); border-bottom-color: var(--ink); border-radius: 0; padding: 10px 12px; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid { border-color: var(--verm); background: #FFF8F5; }
.field .user-invalid-fallback, .consent .user-invalid-fallback { border-color: var(--verm); background: #FFF8F5; }
.field--file { border: 1px dashed var(--muted); background: #fff; padding: 16px; font-size: 12.5px; color: var(--muted); }
.field--file input { border: 0; padding: 0; background: transparent; }
.consent { display: flex; gap: 8px; margin: 6px 0 16px; font-size: 12px; color: var(--muted); }
.consent input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--ink); }
.req { color: var(--verm-text); }
.opt { font-weight: 400; color: var(--muted); }
.aide { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Zone d'état : toujours rendue (région live annoncée par les lecteurs d'écran), sans emprise tant qu'elle est vide. */
.form-status { display: flex; margin-top: 14px; padding: 12px 14px; font-size: 14px; gap: 10px; align-items: flex-start; }
.form-status:empty { padding: 0; margin: 0; border: 0; }
.form-status.is-success { background: #EEF3EA; border-left: 3px solid #4C6B3A; }
.form-status.is-error { background: var(--verm-soft); border-left: 3px solid var(--verm); }

/* ---------- Bandeau cookies ---------- */
.cookie-banner {
  position: fixed;
  z-index: 60;
  left: 16px;
  bottom: 16px;
  width: min(440px, calc(100% - 32px));
  padding: 22px 22px 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--card);
  animation: rg-reveal .4s ease-out both;
}
.cookie-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.1;
}
.cookie-text { margin: 0 0 14px; font-size: .86rem; line-height: 1.55; color: var(--muted); }
.cookie-text a { color: var(--ink); text-underline-offset: 2px; }
.cookie-prefs { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; border: 0; }
.cookie-pref {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  font-size: .82rem;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}
.cookie-pref input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); }
.cookie-pref strong { display: block; color: var(--ink); font-weight: 600; }
.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cookie-actions .btn { flex: 1 1 140px; justify-content: center; }
.cookie-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  margin: 4px auto 0;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 640px) {
  .cookie-banner { left: 12px; bottom: 12px; width: calc(100% - 24px); padding: 18px 16px 14px; }
}
.no-tracking .cookie-settings-wrap { display: none; }

/* ---------- Mouvement ---------- */
@supports (animation-timeline: view()) {
  .section > .container > * { animation: rg-reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
}
@keyframes rg-reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.figure svg .trace { stroke-dasharray: 400; stroke-dashoffset: 400; animation: rg-draw 1.4s ease forwards; }
@keyframes rg-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .figure svg .trace { stroke-dashoffset: 0; }
}

/* ---------- Adaptation : écrans moyens (en-tête resserré) ---------- */
@media (max-width: 1180px) and (min-width: 961px) {
  :root { --gutter: 32px; }
  .site-header .container { gap: 12px; }
  .brand { font-size: 19px; }
  .brand small { display: none; }
  .site-nav ul { gap: 14px; }
  .site-nav a:not(.btn) { font-size: 13px; }
  .site-nav .btn { padding: 12px 14px; font-size: 13px; }
}

/* ---------- Adaptation : tablettes et téléphones ---------- */
@media (max-width: 960px) {
  :root { --gutter: 22px; }

  /* En-tête : navigation repliée derrière le bouton */
  .site-header .container { padding-top: 14px; padding-bottom: 14px; }
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); overflow-y: auto; padding: 6px var(--gutter) 22px; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a:not(.btn) { display: block; padding: 14px 0; border-bottom-color: var(--rule); font-size: 16px; }
  .site-nav a:not(.btn)[aria-current="page"] { border-bottom-color: var(--verm); }
  .site-nav li:last-child { margin-top: 18px; }
  .site-nav .btn { width: 100%; justify-content: center; padding: 15px 20px; font-size: 15px; }

  /* Accueil */
  .hero, .def, .livrable, .faq, .cta, .page-hero, .page-body, .demande { grid-template-columns: 1fr; }
  .hero-text { border-right: 0; padding-top: 40px; }
  .hero h1 { font-size: 40px; }
  .registre { padding: 30px 18px; }
  .registre::before { left: 70px; }
  .profils, .trio, .engagements, .cards, .footer-grid { grid-template-columns: 1fr 1fr; }
  .profil:nth-child(2n) { border-right: 0; }
  .profil:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .formules { grid-template-columns: 1fr; }
  .formule + .formule { border-left: 0; border-top: 1px solid var(--ink); }
  .step { grid-template-columns: 44px 1fr; }
  .step p { grid-column: 2; }

  /* Pages intérieures et formulaire */
  .toc { position: static; }
  .demande-wrap { padding-bottom: 40px; }
  .g2 { grid-template-columns: 1fr; }
  .field input, .field select, .field textarea { font-size: 16px; }
}

/* ---------- Adaptation : petits téléphones ---------- */
@media (max-width: 640px) {
  .site-header .brand { display: block; min-width: 0; white-space: normal; line-height: 1.15; }
  .site-header .brand small { display: block; margin: 3px 0 0; }
  .profils, .trio, .engagements, .cards, .footer-grid { grid-template-columns: 1fr; }
  .profil { border-right: 0; border-top: 1px solid var(--rule); }
  .profil:first-child { border-top: 0; }
  .demande-side, .demande-form { padding: 26px 20px; }
  .registre-row { font-size: 12.5px; }
  .registre-row > :nth-child(3) { font-size: 9.5px; }
}

/* ---------- Adaptation : schémas sur petits écrans ---------- */
/* Sous 600 px, le schéma garde une largeur lisible et défile horizontalement dans son cadre. */
/* Structure attendue : figure.figure > svg puis figcaption.ex (dernier enfant). */
@media (max-width: 600px) {
  .figure { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 20px 18px; }
  .figure svg { min-width: 560px; }
  /* Légende collée au bord gauche du cadre : elle reste visible pendant le défilement. */
  .figure figcaption.ex { position: sticky; left: 0; right: auto; bottom: auto; display: flex; justify-content: space-between; gap: 12px; }
  /* Indication de défilement, ignorée par les lecteurs d'écran quand le navigateur le permet. */
  .figure figcaption.ex::before { content: "Faites défiler le schéma"; content: "Faites défiler le schéma" / ""; color: var(--verm-text); text-align: left; }
}

/* ---------- Adaptation : très petits téléphones ---------- */
@media (max-width: 360px) {
  .site-header .brand { font-size: 18px; }
}
