/* ==========================================================================
   Batilead — styles globaux
   Base : /design/homepage.jpg (hero dégradé, fin de titre colorée, surtitres,
   alternance de fonds). Adapté au public du bâtiment : fonds pastel, libellés
   en sans-serif, monospace réservé aux données (dates, références, valeurs).
   ========================================================================== */

/* Police auto-hébergée, sous-ensemble latin (français complet, œ et € inclus) */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/dm-sans-latin.woff2") format("woff2");
}

:root {
  /* Neutres, légèrement teintés vers le violet de la marque */
  --ink: #15131f;
  --paper: #fdfcff;
  --surface: #fefdff;
  --paper-2: #f6f5fa;
  --line: #e4e2ee;
  --field-line: #8f8da3;
  --text: #1b1a24;
  --text-muted: #5d5c6b;
  --text-soft: #6b6a78;
  --on-color: #fdfcff;

  /* Accents vifs : filets, pastilles, graphiques */
  --violet: #6b5ce7;
  --blue: #0ea5e9;
  --teal: #14c8b4;
  --green: #12d68a;
  --red: #e5484d;
  --amber: #e8a317;

  /* Variantes texte des accents (contraste >= 4,5:1 sur tous les fonds clairs) */
  --blue-text: #0369a1;
  --teal-text: #0f766e;
  --green-text: #0a7a4c;
  --violet-text: #5b4bd6;
  --red-text: #c42d33;

  /* Fonds pastel */
  --tint-violet: #f2f0fd;
  --tint-violet-line: #e0dbf9;
  --tint-violet-strong: #efedfd;
  --tint-mint: #e9f8f1;
  --tint-mint-line: #cdeede;
  --tint-red: #fdf0f0;
  --tint-red-line: #f6d4d5;
  --tint-blue: #e3f2fb;
  --tint-blue-soft: #eef7fd;
  --tint-blue-line: #d3e9f7;
  --tint-teal: #e0f5f2;
  --tint-green: #e2f6ec;
  --tint-amber: #fdf1dc;
  --amber-text: #8a5a00;

  /* Dégradé du hero : teintes profondes, texte clair >= 5,4:1 en tout point */
  --gradient: linear-gradient(115deg, #0369a1 0%, #5b4bd6 38%, #0f766e 68%, #047857 100%);
  --gradient-glow: radial-gradient(60% 70% at 30% 70%, rgba(91, 75, 214, .5), transparent 70%);
  --gradient-line: linear-gradient(90deg, #12d68a 0%, #0ea5e9 55%, #6b5ce7 100%);

  /* Typographie */
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-h1: clamp(2.3rem, 5.4vw, 4.4rem);
  --fs-h2: clamp(1.75rem, 3.4vw, 2.8rem);
  --fs-h3: clamp(1.1rem, 1.6vw, 1.3rem);
  --fs-lead: clamp(1.05rem, 1.3vw, 1.2rem);
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-label: .8125rem;

  /* Espacements */
  --gutter: 16px;
  --container: 1240px;
  --section-y: clamp(56px, 10vw, 140px);
  --space-s: 24px;
  --space-m: 40px;
  --space-l: 56px;
  --space-xl: 72px;
  --radius: 4px;
  --radius-lg: 10px;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* scroll-padding-top : une ancre ne doit pas arriver sous l'en-tête collant */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 62px; }
@media (min-width: 900px) { html { scroll-padding-top: 84px; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-underline-offset: 3px; }
p a, li a, td a { color: var(--violet-text); text-decoration: underline; text-decoration-thickness: 1px; }
p a:hover, li a:hover, td a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--violet-text); outline-offset: 3px; }
/* Sur le dégradé du hero, l'anneau violet se confond avec le fond */
.hero :focus-visible { outline-color: var(--on-color); }
.scroller:focus-visible { outline-offset: -2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 50;
  background: var(--ink); color: var(--on-color); padding: 12px 18px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------------------
   Titres : H1 en capitales (accroche), H2 en casse normale (titres longs),
   fin de titre colorée via <span class="hl">
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 { margin: 0; color: inherit; font-weight: 500; }
h1 { font-size: var(--fs-h1); font-weight: 600; text-transform: uppercase; line-height: 1.04; letter-spacing: -.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -.025em; max-width: 24ch; }
h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -.01em; }
h4 { font-size: 1.05rem; line-height: 1.3; }

.hl { color: var(--violet-text); }

p { margin: 0 0 1em; }
.lead { font-size: var(--fs-lead); color: var(--text-muted); max-width: 62ch; }

/* Libellé : petites capitales espacées, en sans-serif */
.label,
.eyebrow {
  font-family: var(--font-sans); font-size: var(--fs-label); font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft);
  margin: 0;
}
.eyebrow::before { content: "/ "; }
.eyebrow--plain::before { content: none; }

/* Donnée : le monospace est réservé aux dates, références et valeurs */
.data { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .02em; }

/* --------------------------------------------------------------------------
   Mise en page
   -------------------------------------------------------------------------- */
.container {
  width: 100%; max-width: var(--container);
  margin-inline: auto; padding-inline: var(--gutter);
}
@media (min-width: 900px) { .container { padding-inline: 40px; } }

.section { padding-block: var(--section-y); }
.section--alt { background: var(--paper-2); }
.section--tint { background: var(--tint-violet); --tint-line: var(--tint-violet-line); }
.section--mint { background: var(--tint-mint); --tint-line: var(--tint-mint-line); }
.section--mint .hl { color: var(--green-text); }

.section__head { margin-bottom: 20px; }
.section__intro { margin-top: 28px; }
.section__intro p { max-width: 68ch; }
.stack > * + * { margin-top: 1em; }


.grid-2 { display: grid; gap: var(--space-m); }
.grid-3 { display: grid; gap: 0; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: var(--space-l); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* --------------------------------------------------------------------------
   En-tête : collant sur grand écran, sommaire défilant sur mobile
   -------------------------------------------------------------------------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 24px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px; min-height: 56px; text-decoration: none;
}
.brand__mark { width: 30px; height: 30px; }
/* Logotype : « bati » en encre, « lead » en violet, point du i remplacé par le carré vert du symbole */
.brand__word { font-size: 1.5rem; font-weight: 600; letter-spacing: -.045em; line-height: 1; color: var(--ink); }
.brand__lead { color: var(--violet-text); }
.brand__i { position: relative; }
.brand__i::before {
  content: ""; position: absolute; left: 50%; top: .04em; width: .19em; height: .19em;
  background: var(--green); transform: translateX(-50%);
}
/* Menu principal : deux familles de pages (apporteurs, artisans), chacune ouvrant la liste de ses pages.
   Élément <details> : il fonctionne sans JavaScript ; site.js ajoute la fermeture au clic extérieur et à Échap. */
.nav {
  display: flex; gap: 24px;
  border-top: 1px solid var(--line); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  width: calc(100% + var(--gutter) * 2);
}
.menu > summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.menu[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.menu > summary:hover, .menu[open] > summary { color: var(--ink); }
/* Famille de la page en cours */
.menu--current > summary { color: var(--ink); box-shadow: inset 0 -2px 0 var(--violet); }
/* Sur mobile, le panneau occupe la largeur de l'en-tête (seul ancêtre positionné) */
.menu__panel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
  padding: 16px var(--gutter) 12px; background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px -24px rgba(21, 19, 31, .45);
}
.menu__what { margin: 0 0 6px; font-size: .9rem; color: var(--text-soft); }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list li + li { border-top: 1px solid var(--line); }
.menu__list a { display: flex; align-items: center; min-height: 48px; font-weight: 600; color: var(--text); text-decoration: none; }
.menu__list a:hover { color: var(--violet-text); text-decoration: underline; }
.menu__list a[aria-current="page"] { color: var(--violet-text); }
@media (max-width: 599px) { .menu__more { display: none; } }
@media (min-width: 900px) {
  .site-header { position: sticky; top: 0; z-index: 20; }
  .site-header__inner { flex-wrap: nowrap; height: 64px; }
  .nav { width: auto; border-top: 0; margin: 0; padding: 0; gap: 32px; }
  /* Sur grand écran, le panneau s'ouvre sous son bouton */
  .menu { position: relative; }
  .menu__panel { left: auto; right: 0; top: calc(100% + 10px); width: 340px; padding: 18px 20px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
}

/* Fil d'Ariane */
.breadcrumb { font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }

/* --------------------------------------------------------------------------
   Hero dégradé
   -------------------------------------------------------------------------- */
.hero {
  background: var(--gradient); color: var(--on-color);
  padding-block: clamp(32px, 4.5vw, 60px) clamp(56px, 8vw, 120px);
  position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; inset: 0; background: var(--gradient-glow); pointer-events: none; }
.hero > .container { position: relative; z-index: 1; }
.hero .breadcrumb, .hero .eyebrow { color: var(--on-color); opacity: .92; }
/* align-items: start : l'illustration part du haut de la colonne, à la même hauteur sur toutes les pages
   quelle que soit la longueur du texte à gauche */
.hero__grid { display: grid; gap: var(--space-m); align-items: start; margin-top: 32px; }
@media (min-width: 1000px) { .hero__grid { grid-template-columns: 1.15fr 1fr; gap: 64px; } }
.hero h1 { margin-top: 18px; max-width: 14ch; }
.hero .lead { color: var(--on-color); opacity: .95; margin-top: 24px; }

/* Choix de branche : deux entrées de même poids */
.choice { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 600px) { .choice { grid-template-columns: 1fr 1fr; } }
.choice__item {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 16px;
  padding: 16px 18px; min-height: 76px; border-radius: var(--radius);
  background: rgba(21, 19, 31, .28); border: 1px solid rgba(253, 252, 255, .5);
  color: var(--on-color); text-decoration: none;
  transition: background-color .2s, border-color .2s;
}
.choice__who { font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .92; }
.choice__what { grid-column: 1; font-weight: 600; font-size: 1.02rem; line-height: 1.3; }
.choice__arrow { grid-row: 1 / span 2; grid-column: 2; width: 20px; height: 20px; transition: transform .2s; }

/* Métadonnées éditoriales (auteur, dates) */
.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(253, 252, 255, .35);
  font-size: .82rem; color: var(--on-color);
}
.byline a { color: var(--on-color); font-weight: 600; }


.tag {
  display: inline-block; font-size: .75rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px;
  border-radius: 3px; background: var(--tint-violet-strong); color: var(--violet-text); white-space: nowrap;
}


/* --------------------------------------------------------------------------
   Ledger : tableau de trois colonnes
   -------------------------------------------------------------------------- */
.ledger { border: 1px solid var(--line); background: var(--surface); margin-top: 48px; }
.ledger__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.ledger__head .label:first-child { color: var(--text); }
.ledger__cell { padding: 24px 20px; border-top: 1px solid var(--line); }
.ledger__cell:first-child { border-top: 0; }
@media (min-width: 900px) {
  .ledger__cell { border-top: 0; border-left: 1px solid var(--line); }
  .ledger__cell:first-child { border-left: 0; }
}
.ledger__cell h3, .ledger__cell h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.ledger__cell p { font-size: .94rem; color: var(--text-muted); margin: 0; }
.c-green { color: var(--green-text); }
.c-red { color: var(--red-text); }
.c-violet { color: var(--violet-text); }
.c-blue { color: var(--blue-text); }
.c-soft { color: var(--text-soft); }

/* Encart (maquette : « WITH PENTI ») */
.callout {
  display: grid; gap: 16px; background: var(--tint-mint); color: var(--text);
  border: 1px solid var(--tint-mint-line); padding: 32px; margin-top: var(--space-m);
}
@media (min-width: 900px) { .callout { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; } }
.callout .label { color: var(--green-text); }
.callout__title { font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.15; letter-spacing: -.02em; margin-top: 8px; font-weight: 500; }
.callout p { color: var(--text-muted); margin: 0; }

/* --------------------------------------------------------------------------
   Liste numérotée : la pastille porte la couleur, pas de cadre
   -------------------------------------------------------------------------- */
.rail { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--tint-line, var(--line)); }
.rail__item {
  display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 4px 16px;
  padding: 20px 0; border-top: 1px solid var(--tint-line, var(--line));
}
.rail__item h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.rail__item p { margin: 0; color: var(--text-muted); font-size: .95rem; }

.rail--row { display: grid; gap: 0 var(--space-m); }
@media (min-width: 900px) { .rail--row { grid-template-columns: 1fr 1fr; } }

.rail-1 { --rail: var(--blue); --rail-text: var(--blue-text); }
.rail-2 { --rail: var(--teal); --rail-text: var(--teal-text); }
.rail-3 { --rail: var(--green); --rail-text: var(--green-text); }
.rail-4 { --rail: var(--violet); --rail-text: var(--violet-text); }

/* Colonne « ce que chacun gagne » */
.col-label { margin: 0 0 14px; }
.ledger-soft { list-style: none; margin: 0; padding: 0; border: 1px solid var(--tint-line, var(--line)); background: var(--surface); }
.ledger-soft li { padding: 18px 22px; border-top: 1px solid var(--tint-line, var(--line)); }
.ledger-soft li:first-child { border-top: 0; }
.ledger-soft strong { display: block; margin-bottom: 4px; color: var(--text); }
.ledger-soft li p { margin: 0; font-size: .94rem; color: var(--text-muted); }
.ledger-soft li.is-alert { background: var(--tint-red); }
.ledger-soft li.is-alert strong { color: var(--red-text); }

/* Figure (schéma) */
.figure { margin: 48px 0 0; }
.figure img { width: 100%; border: 1px solid var(--tint-line, var(--line)); border-radius: var(--radius); background: var(--surface); }
.figure figcaption { margin-top: 12px; font-size: var(--fs-small); color: var(--text-soft); }

/* Illustration graphique : rompt un long passage de texte, sans cadre */
.illus { margin: 0; }
.illus img { display: block; width: 100%; height: auto; max-width: 640px; margin-inline: auto; }
.illus-split { display: grid; gap: var(--space-m); align-items: center; }
@media (min-width: 900px) { .illus-split { grid-template-columns: 1fr 1fr; gap: var(--space-l); } }

/* --------------------------------------------------------------------------
   Tableau de prix
   -------------------------------------------------------------------------- */
.table-wrap { margin-top: var(--space-m); border: 1px solid var(--line); background: var(--surface); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.table-wrap__head .label:first-child { color: var(--text); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
caption { text-align: left; }
th, td { padding: 14px 20px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
thead th {
  border-top: 0; font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); white-space: nowrap;
}
tbody th { font-weight: 600; }
td.price { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.note { color: var(--text-muted); font-size: .88rem; }

/* Tableau empilé sur mobile (les rôles ARIA explicites préservent la sémantique) */
@media (max-width: 719px) {
  .table-stack thead { display: none; }
  .table-stack tr { display: block; padding: 14px 18px; border-top: 1px solid var(--line); }
  .table-stack tr:first-child { border-top: 0; }
  .table-stack th, .table-stack td { display: block; border: 0; padding: 2px 0; }
  .table-stack td[data-label]::before {
    content: attr(data-label) " · "; font-size: .72rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft);
  }
}
.table-foot { padding: 14px 20px; border-top: 1px solid var(--line); font-size: .85rem; line-height: 1.6; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Bloc « branche » (maquette : PARTNERS, titre à gauche / texte à droite)
   -------------------------------------------------------------------------- */
.branch { display: grid; gap: 28px; }
@media (min-width: 900px) { .branch { grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; } }
.branch h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.branch__body .lead { color: var(--text); }

/* Sujets à venir : liste de texte, sans apparence de lien */
.topics { margin-top: 28px; padding: 20px 22px; background: var(--surface); border: 1px dashed var(--tint-line, var(--line)); }
.topics-wrap { max-width: 640px; }
.topics .topics__title { font-size: 1rem; font-weight: 600; }
.topics p { margin: 4px 0 12px; font-size: var(--fs-small); color: var(--text-soft); }
.topics ul { margin: 0; padding-left: 1.1em; color: var(--text-muted); display: grid; gap: 6px; }
.topics li::marker { color: var(--rail, var(--violet)); }

/* --------------------------------------------------------------------------
   Règles : frise chronologique
   -------------------------------------------------------------------------- */
.rules { display: grid; gap: var(--space-m); margin-top: 48px; list-style: none; padding: 0; }
@media (min-width: 900px) { .rules { grid-template-columns: repeat(3, 1fr); } }
.rule { padding-top: 20px; border-top: 2px solid var(--rail, var(--violet)); }
.rule .rule__date { font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--rail-text, var(--violet-text)); margin: 0 0 10px; }
.rule--red { --rail: var(--red); --rail-text: var(--red-text); }
.rule--violet { --rail: var(--violet); --rail-text: var(--violet-text); }
.rule--green { --rail: var(--green); --rail-text: var(--green-text); }
.rule h3 { margin-bottom: 12px; }
.rule p:not(.rule__date) { color: var(--text-muted); font-size: .95rem; }
.rule p:last-child { margin-bottom: 0; }

.checklist { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px;
  border-left: 2px solid var(--green-text); border-bottom: 2px solid var(--green-text); transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   FAQ : titres H3 + boutons de dépliage (amélioration progressive)
   Sans JavaScript, toutes les réponses restent visibles.
   -------------------------------------------------------------------------- */
.faq { max-width: 900px; margin-top: var(--space-m); border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { font-size: 1.08rem; font-weight: 500; }
.faq__q button {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 8px; min-height: 44px;
}
.faq__q button:focus-visible { outline: 2px solid var(--violet-text); outline-offset: -2px; }
.faq__q button::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 6px;
  border-right: 2px solid var(--violet-text); border-bottom: 2px solid var(--violet-text);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.faq__q button[aria-expanded="true"]::after { transform: rotate(-135deg) translateY(-3px); }
.faq__answer { padding: 0 8px 22px; color: var(--text-muted); max-width: 75ch; }
.faq__answer p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Auteur
   -------------------------------------------------------------------------- */
.author { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; padding: 28px; border: 1px solid var(--line); background: var(--surface); max-width: 900px; margin-top: var(--space-xl); }
@media (min-width: 600px) { .author { grid-template-columns: auto 1fr; } }
.author__avatar {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gradient); color: var(--on-color); font-weight: 600; font-size: 1.2rem;
}
.author__name { font-size: 1.1rem; font-weight: 600; margin: 0; }
.author__role { margin: 4px 0 12px; }
.author p { color: var(--text-muted); }
.author__dates { color: var(--text-soft); margin: 0; }

/* --------------------------------------------------------------------------
   Pied de page (pastel)
   -------------------------------------------------------------------------- */
.site-footer { background: var(--tint-violet); color: var(--text-muted); padding-block: 64px 32px; border-top: 3px solid transparent; border-image: var(--gradient-line) 1; }
.footer__grid { display: grid; gap: 32px; margin-top: 24px; }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 2fr 1fr; } }
.footer__title { margin: 0 0 6px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; font-size: .95rem; }
.footer__list a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.footer__list a:hover { color: var(--ink); text-decoration: underline; }
.footer__bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--tint-violet-line); font-size: .85rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* --------------------------------------------------------------------------
   Illustration du hero : parcours d'un lead en trois étapes
   -------------------------------------------------------------------------- */
.flow { position: relative; padding: 8px 0; }
.flow__label { position: relative; z-index: 1; margin: 0 0 16px; font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--on-color); opacity: .92; }
.flow__steps { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; }

.flow__card {
  position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px;
  width: min(100%, 400px); padding: 20px 22px;
  background: var(--surface); color: var(--text); border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(21, 19, 31, .05), 0 24px 40px -24px rgba(21, 19, 31, .6);
}
.flow__card--2 { margin-left: auto; }
.flow__card p { margin: 0; }

.flow__ico {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius);
  background: var(--ico-bg); color: var(--ico-fg);
}
.flow__ico .i { width: 30px; height: 30px; stroke-width: 1.6; }
.flow__step { font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.flow__title { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.flow__meta { font-size: .9rem; color: var(--text-muted); }
.flow__card .flow__title { margin-top: 2px; }
.flow__card .flow__meta { margin-top: 4px; }

.flow__price {
  position: absolute; right: -14px; top: -18px; transform: rotate(3deg);
  display: grid; padding: 8px 12px; border-radius: var(--radius);
  background: var(--amber); color: var(--ink); font-weight: 600; font-size: 1.05rem; line-height: 1.15;
  font-variant-numeric: tabular-nums; box-shadow: 0 10px 20px -12px rgba(21, 19, 31, .6);
}
.flow__price small { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* Liaisons en pointillés animés */
.flow__link { height: 40px; width: min(100%, 560px); margin: 0 auto; }
.flow__link svg { display: block; width: 100%; height: 40px; overflow: visible; }
.flow__link path {
  fill: none; stroke: var(--on-color); stroke-width: 2.5; stroke-dasharray: 6 7; stroke-linecap: round;
  vector-effect: non-scaling-stroke; opacity: .85; animation: flow-dash 1.4s linear infinite;
}
@keyframes flow-dash { to { stroke-dashoffset: -26; } }

/* Apparition échelonnée au chargement */
.flow__card, .flow__link { animation: flow-in .6s cubic-bezier(.25, 1, .5, 1) both; }
.flow__link { animation-name: flow-fade; }
.flow__steps > :nth-child(2) { animation-delay: .15s; }
.flow__steps > :nth-child(3) { animation-delay: .25s; }
.flow__steps > :nth-child(4) { animation-delay: .4s; }
.flow__steps > :nth-child(5) { animation-delay: .5s; }
@keyframes flow-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes flow-fade { from { opacity: 0; } }

@media (max-width: 599px) {
  .flow__card { padding: 16px; gap: 14px; width: calc(100% - 20px); }
  .flow__ico { width: 46px; height: 46px; }
  .flow__ico .i { width: 26px; height: 26px; }
  .flow__price { right: -6px; top: -16px; font-size: .95rem; }
}

/* ==========================================================================
   Blocs visuels : icônes, parcours, comparaison, graphique, tuiles, cartes
   ========================================================================== */

/* Icônes (sprite SVG inline, trait 1,75) */
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i--sm { width: 18px; height: 18px; }

/* Tuile d'icône colorée */
.ico {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: var(--radius);
  background: var(--ico-bg, var(--tint-violet-strong)); color: var(--ico-fg, var(--violet-text));
}
.ico--sm { width: 34px; height: 34px; }
.ico--blue { --ico-bg: var(--tint-blue); --ico-fg: var(--blue-text); }
.ico--teal { --ico-bg: var(--tint-teal); --ico-fg: var(--teal-text); }
.ico--green { --ico-bg: var(--tint-green); --ico-fg: var(--green-text); }
.ico--violet { --ico-bg: var(--tint-violet-strong); --ico-fg: var(--violet-text); }
.ico--red { --ico-bg: var(--tint-red); --ico-fg: var(--red-text); }
.ico--amber { --ico-bg: var(--tint-amber); --ico-fg: var(--amber-text); }

/* Parcours d'une demande (3 étapes reliées) */
.journey { list-style: none; margin: var(--space-m) 0 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 900px) { .journey { grid-template-columns: repeat(3, 1fr); gap: 0; } }
.journey__step {
  position: relative; padding: 24px; background: var(--surface); border: 1px solid var(--line);
  counter-increment: step;
}
@media (min-width: 900px) {
  .journey__step + .journey__step { border-left: 0; }
  .journey__step:not(:last-child)::after {
    content: ""; position: absolute; z-index: 1; top: 44px; right: -9px; width: 16px; height: 16px;
    background: var(--surface); border-top: 1px solid var(--line); border-right: 1px solid var(--line);
    transform: rotate(45deg);
  }
}
.journey__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.journey__top::after { content: "0" counter(step); font-family: var(--font-mono); font-size: .8rem; color: var(--text-soft); }
.journey__step .journey__title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.journey__step p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* Comparaison « vaut peu / vaut beaucoup » */
.compare { display: grid; gap: 16px; margin-top: var(--space-m); }
@media (min-width: 900px) { .compare { grid-template-columns: 1fr 1.6fr; } }
.compare__card { padding: 24px; border: 1px solid var(--line); background: var(--surface); }
.compare__card--low { background: var(--paper-2); }
.compare__card--high { background: var(--tint-mint); border-color: var(--tint-mint-line); }
.compare__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.compare__head .compare__title { font-size: 1.05rem; font-weight: 600; }
.compare__card p { margin: 0; color: var(--text-muted); }
.fields { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fields li {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--tint-mint-line); font-size: .9rem; font-weight: 500;
}
.fields--low li { border-color: var(--line); color: var(--text-muted); }
.fields li .i { color: var(--green-text); }
.fields--low li .i { color: var(--text-soft); }
.compare__card .compare__note { margin-top: 16px; font-size: .95rem; color: var(--text-muted); }

/* Niveaux de qualification : icône + jauge de prix */
.level__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.meter { display: inline-flex; gap: 3px; font-weight: 600; font-size: .95rem; }
.meter [aria-hidden] > span { color: var(--text-soft); opacity: .35; }
.meter [aria-hidden] > .on { color: var(--text); opacity: 1; }

/* Listes avec icône à la place du numéro */
.rail__ico { grid-row: span 2; }

/* Liste « qui gagne quoi » avec icône */
.ledger-soft li.has-ico { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: start; }
.ledger-soft li.has-ico .ico { grid-row: span 2; }

/* --------------------------------------------------------------------------
   Graphique des fourchettes de prix
   -------------------------------------------------------------------------- */
.chart { margin: var(--space-m) 0 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); }
.chart__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.chart__title { font-weight: 600; margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0; padding: 0; font-size: .85rem; color: var(--text-muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend__sw { width: 14px; height: 8px; border-radius: 2px; background: var(--sw); }
.sw-contact { --sw: var(--blue); }
.sw-rdv { --sw: var(--violet); }

.chart__rows { list-style: none; margin: 0; padding: 0; }
.chart__row {
  display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 8px; margin-inline: -8px; border-radius: var(--radius);
}
@media (min-width: 720px) { .chart__row { grid-template-columns: 190px 1fr 240px; align-items: center; gap: 16px; } }
.chart__name { font-weight: 600; font-size: .92rem; }
.chart__vals { font-size: .85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 720px) { .chart__vals { text-align: right; } }
.chart__track {
  height: 22px; width: 100%;
  /* graduations tous les 50 € sur une échelle de 0 à 180 € */
  background: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 27.7778%);
}
.chart__track svg { width: 100%; height: 22px; display: block; }
.bar-contact { fill: var(--blue); }
.bar-rdv { fill: var(--violet); }
.chart__axis { display: none; }
@media (min-width: 720px) {
  .chart__axis {
    display: grid; grid-template-columns: 190px 1fr 240px; gap: 16px; margin-top: 6px;
    font-size: .75rem; color: var(--text-soft); font-variant-numeric: tabular-nums;
  }
  .chart__ticks { display: grid; grid-template-columns: 50fr 50fr 50fr 30fr; }
}
.chart__foot { margin: 16px 0 0; font-size: .85rem; color: var(--text-soft); }

/* --------------------------------------------------------------------------
   Tuiles (facteurs de prix, obligations, plateformes)
   -------------------------------------------------------------------------- */
.tiles { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.tile { padding: 20px; background: var(--surface); border: 1px solid var(--tint-line, var(--line)); }
.tile .ico { margin-bottom: 14px; }
.tile .tile__title { font-size: 1rem; font-weight: 600; margin: 0 0 4px; }
.tile p { margin: 0; font-size: .92rem; color: var(--text-muted); }

/* Calcul du coût par chantier signé */
.calc { display: grid; gap: 12px; margin-top: 24px; }
@media (min-width: 600px) { .calc { grid-template-columns: 1fr 1fr; } }
.calc__card { padding: 22px; background: var(--surface); border: 1px solid var(--line); }
.calc__card--win { border-color: var(--tint-mint-line); background: var(--tint-mint); }
.calc__line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; color: var(--text-muted); }
.calc__line strong { color: var(--text); font-variant-numeric: tabular-nums; }
.calc__result { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 12px; }
.calc__result span { font-size: .9rem; color: var(--text-muted); }
.calc__result strong { font-size: 1.8rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.calc__card--win .calc__result strong { color: var(--green-text); }
.calc__badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .8rem; font-weight: 600; color: var(--green-text); }

/* --------------------------------------------------------------------------
   Branche apporteurs : profils, modèles, obligations
   -------------------------------------------------------------------------- */
.pills { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius);
  background: var(--tint-violet); color: var(--text); font-size: .9rem; font-weight: 500;
}
.pills li .i { color: var(--violet-text); }
.section--mint .pills li { background: var(--surface); }
.section--mint .pills li .i { color: var(--green-text); }

.models { display: grid; gap: 16px; margin-top: var(--space-l); }
@media (min-width: 900px) { .models { grid-template-columns: 1fr 1fr; } }
.model { display: grid; gap: 14px; padding: 28px; border: 1px solid var(--line); background: var(--surface); }
.model--violet { background: var(--tint-violet); border-color: var(--tint-violet-line); }
.model--blue { background: var(--tint-blue-soft); border-color: var(--tint-blue-line); }
.model__head { display: flex; align-items: center; gap: 14px; }
.model__head h3 { font-size: 1.2rem; font-weight: 600; }
.model .model__figure { color: var(--text); font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.model__figure small { display: block; font-size: .9rem; font-weight: 500; letter-spacing: 0; color: var(--text-muted); margin-top: 4px; }
.model p { margin: 0; color: var(--text-muted); }
.model__facts { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid rgba(21, 19, 31, .08); display: grid; gap: 8px; font-size: .92rem; }
.model__facts li { display: flex; gap: 10px; align-items: flex-start; }
.model__facts .i { margin-top: 2px; color: var(--text-soft); }

/* Cartes plateformes */
.platforms { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 600px) { .platforms { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .platforms { grid-template-columns: repeat(3, 1fr); } }
.platform { padding: 20px; background: var(--surface); border: 1px solid var(--tint-line, var(--line)); display: grid; gap: 8px; align-content: start; }
.platform__name { font-weight: 600; font-size: 1.02rem; margin: 0; }
.platform__model { justify-self: start; }
.platform p { margin: 0; font-size: .92rem; color: var(--text-muted); }
.tag--green { background: var(--tint-green); color: var(--green-text); }
.tag--blue { background: var(--tint-blue); color: var(--blue-text); }
.tag--amber { background: var(--tint-amber); color: var(--amber-text); }
.tag--red { background: var(--tint-red); color: var(--red-text); }
.source-note { margin: 12px 0 0; font-size: .85rem; color: var(--text-soft); }

/* Carte questions / checklist */
.card { padding: 26px; background: var(--surface); border: 1px solid var(--tint-line, var(--line)); }
.card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.card__head h3, .card__head h4 { font-size: 1.1rem; font-weight: 600; }
.card--mint { background: var(--tint-mint); border-color: var(--tint-mint-line); }

/* --------------------------------------------------------------------------
   Règles : icônes de la frise et chiffres des sanctions
   -------------------------------------------------------------------------- */
.rule__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rule__top .rule__date { margin: 0; }

.penalties { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.penalty { padding: 18px; background: var(--tint-red); border: 1px solid var(--tint-red-line); }
.penalty strong { display: block; font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; color: var(--red-text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.penalty span { display: block; margin-top: 6px; font-size: .88rem; color: var(--text-muted); }

/* Micro-interactions : légère élévation au survol des cartes */
.tile, .platform, .model, .journey__step, .calc__card { transition: transform .25s cubic-bezier(.25, 1, .5, 1), box-shadow .25s cubic-bezier(.25, 1, .5, 1); }
.ico { transition: transform .25s cubic-bezier(.25, 1, .5, 1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .choice__item, .choice__arrow, .faq__q button::after, .tile, .platform, .model, .journey__step, .calc__card, .ico { transition: none; }
  .tile:hover, .platform:hover, .model:hover, .calc__card:hover { transform: none; }
  .flow__card, .flow__link, .flow__link path { animation: none; }
  .tile:hover .ico, .platform:hover .ico, .model:hover .ico { transform: none; }
}

/* ==========================================================================
   Mobile d'abord : premier écran, navigation, longueur de page
   ========================================================================== */
@media (max-width: 899px) {
  /* En-tête : seule la ligne de sommaire reste collée en haut au défilement */
  .site-header { position: sticky; top: -56px; z-index: 20; }
  /* Fil d'Ariane d'un seul niveau : inutile à l'écran (conservé en données structurées) */
  .hero .breadcrumb:not(:has(li + li)) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hero .breadcrumb:has(li + li) { margin-bottom: 14px; }
  .hero { padding-block: 28px 48px; }
  .hero__grid { margin-top: 0; }

  .hero__text > .choice { margin-top: 22px; }
  .choice__item { min-height: 64px; padding: 12px 16px; }

  /* Illustration du hero resserrée */
  .flow__card { padding: 12px 14px; gap: 12px; }
  .flow__ico { width: 40px; height: 40px; }
  .flow__ico .i { width: 22px; height: 22px; }
  .flow__title { font-size: 1.1rem; }
  .flow__meta { font-size: .85rem; }
  .flow__link, .flow__link svg { height: 26px; }
  .flow__price { padding: 6px 10px; font-size: .9rem; top: -14px; }

  /* Rythme : sections un peu plus séparées, contenus plus serrés */
  .journey__step { padding: 18px; }
  .journey__top { margin-bottom: 10px; }
}

/* Lien auteur : zone tactile agrandie sans décaler la ligne */
.byline a { display: inline-block; padding-block: 12px; margin-block: -12px; }

/* Échelle du graphique sur mobile */
/* mêmes proportions que les graduations (tous les 50 € sur 180 €) */
.chart__scale { display: grid; grid-template-columns: 50fr 50fr 50fr 30fr; font-size: .75rem; color: var(--text-soft); font-variant-numeric: tabular-nums; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
@media (min-width: 720px) { .chart__scale { display: none; } }

/* Tableau détaillé repliable */
.table-details { margin-top: var(--space-m); }
.table-details > summary,
.fold > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  font-weight: 600; cursor: pointer; list-style: none;
}
.table-details > summary::-webkit-details-marker,
.fold > summary::-webkit-details-marker { display: none; }
.table-details > summary::after,
.fold > summary::after {
  content: ""; width: 9px; height: 9px; border-right: 2px solid var(--violet-text); border-bottom: 2px solid var(--violet-text);
  transform: rotate(45deg) translateY(-3px);
}
.table-details[open] > summary::after,
.fold[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }
.table-details .table-wrap { margin-top: 12px; }
.fold[open] > summary { margin-bottom: 12px; }
.fold > .col-label { display: none; }
@media (min-width: 720px) {
  .fold > .col-label { display: block; }
  .fold > summary { display: none; }
  .table-details > summary { display: none; }
  .table-details .table-wrap { margin-top: 0; }
}

/* Carrousels horizontaux sur mobile (au lieu de longues piles de cartes) */
@media (max-width: 599px) {
  .scroller {
    display: grid; grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 14px; scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
  }
  /* position: relative retient les textes masqués (position absolue) dans le carrousel */
  .scroller > * { scroll-snap-align: start; position: relative; }
  /* Parcours : chaque étape est une carte complète dans le carrousel */
  .journey.scroller { gap: 10px; }
  .journey.scroller .journey__step + .journey__step { border-left: 1px solid var(--line); }
  /* Niveaux de qualification : cellules séparées par un filet vertical */
  .ledger .scroller { margin-inline: 0; padding-inline: 0; gap: 0; grid-auto-columns: 82%; }
  .ledger .scroller .ledger__cell { border-top: 0; border-left: 1px solid var(--line); }
  .ledger .scroller .ledger__cell:first-child { border-left: 0; }
  .rules.scroller { gap: 12px; margin-top: 32px; }
  .rules.scroller .rule { background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--rail, var(--violet)); padding: 18px; }
}

/* Survol : uniquement avec une souris ou un pavé (pas de survol collant au toucher) */
@media (hover: hover) {
  .choice__item:hover { background: rgba(21, 19, 31, .45); border-color: var(--on-color); }
  .choice__item:hover .choice__arrow { transform: translateY(3px); }
  .chart__row:hover { background: var(--paper-2); }
  .tile:hover, .platform:hover, .model:hover, .calc__card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -18px rgba(21, 19, 31, .35); }
  .tile:hover .ico, .platform:hover .ico, .model:hover .ico { transform: rotate(-6deg); }
}

/* ==========================================================================
   Pages de texte (mentions légales)
   ========================================================================== */
.legal-head { padding-block: 48px 40px; }
.legal-crumb { color: var(--text-soft); margin-bottom: 12px; }
.legal-crumb ol { align-items: center; flex-wrap: wrap; }
.legal-crumb ol li + li::before { content: "/"; margin-right: 8px; }
.legal-crumb a { color: var(--violet-text); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.legal-title { font-size: clamp(2rem, 4vw, 3rem); }
.legal-head .lead { margin-top: 16px; }
.legal { padding-block: 48px 88px; }
.legal__body > * { max-width: 780px; }
.legal__body h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); max-width: none; margin: 44px 0 14px; }
.legal__body h2:first-child { margin-top: 0; }
.legal__body p { color: var(--text-muted); max-width: 70ch; }
.legal__list { display: grid; grid-template-columns: 1fr; gap: 4px 24px; margin: 0 0 1em; padding: 18px 20px; background: var(--paper-2); border: 1px solid var(--line); }
@media (min-width: 600px) { .legal__list { grid-template-columns: 220px 1fr; } }
.legal__list dt { font-weight: 600; }
/* Liens de contact : zone tactile agrandie sans décaler la ligne */
.legal__list a { display: inline-block; padding-block: 12px; margin-block: -12px; }
.legal__list dd { margin: 0 0 10px; color: var(--text-muted); }
@media (min-width: 600px) { .legal__list dd { margin: 0; } .legal__list dt, .legal__list dd { padding-block: 6px; } }
/* Champ à compléter avant la mise en ligne */
.todo { background: var(--tint-amber); color: var(--amber-text); font-weight: 600; padding: 1px 6px; }

.footer__bottom a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.footer__bottom a:hover { text-decoration: underline; }

/* ==========================================================================
   Pages guides : fil d'Ariane à plusieurs niveaux, bouton, encart partenaire
   ========================================================================== */
.breadcrumb ol { flex-wrap: wrap; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; }
/* Zone tactile agrandie sans changer la hauteur de la ligne : le hero garde le même rythme sur toutes les pages */
.hero .breadcrumb a { display: inline-block; padding-block: 12px; margin-block: -12px; color: inherit; text-decoration: none; }
.hero .breadcrumb a:hover { text-decoration: underline; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px;
  padding: 12px 22px; border-radius: var(--radius); background: var(--violet-text); color: var(--on-color);
  font-weight: 600; text-decoration: none; transition: background-color .2s;
}
.btn:hover { background: var(--ink); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* Encart partenaire : le lien rémunéré est annoncé avant le bouton */
.partner { margin-top: var(--space-m); padding: 28px; background: var(--surface); border: 1px solid var(--tint-line, var(--line)); }
.partner__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-bottom: 14px; }
.partner__head h3 { font-size: 1.3rem; font-weight: 600; }
.partner__grid { display: grid; gap: var(--space-s); }
@media (min-width: 900px) { .partner__grid { grid-template-columns: 1fr 1fr; gap: var(--space-l); align-items: start; } }
.partner p { color: var(--text-muted); }
.partner .table-wrap { margin-top: 0; border: 0; }
.partner .table-wrap__head, .partner th, .partner td, .partner .table-foot { padding-inline: 0; }
/* Point clé de l'encart : condition à connaître avant de s'inscrire */
.partner__key { margin-top: var(--space-m); padding: 24px; background: var(--tint-violet); }
.partner__key .card__head { margin-bottom: 12px; }
.partner__key h4 { font-size: 1.15rem; font-weight: 600; }
.partner__key p { color: var(--text); max-width: 75ch; }
.partner__key p:last-child { margin-bottom: 0; }
.partner__cta { display: grid; gap: 12px; justify-items: start; margin-top: var(--space-s); padding-top: var(--space-s); border-top: 1px solid var(--tint-line, var(--line)); }
.disclosure { margin: 0; padding: 12px 14px; background: var(--tint-amber); color: var(--amber-text); font-size: .9rem; max-width: 75ch; }
.partner .disclosure { color: var(--amber-text); }

/* Bandeau partenaire : bloc entièrement cliquable, à cheval sur le bas du hero.
   Même vocabulaire que les cartes du site (surface claire, filet, bouton violet). */
.cta-wrap { position: relative; z-index: 2; margin-top: -32px; background: linear-gradient(transparent 32px, var(--paper-2) 32px); }
.cta-band {
  display: grid; gap: 6px 28px; align-items: center; padding: 22px 24px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none;
  box-shadow: 0 24px 40px -24px rgba(21, 19, 31, .6);
}
.cta-band:focus-visible { outline-offset: -5px; }
.cta-band__label { font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--violet-text); }
.cta-band__title { font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.cta-band__meta { font-size: .95rem; color: var(--text-muted); }
.cta-band__go {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start; min-height: 48px; margin-top: 10px;
  padding: 12px 22px; border-radius: var(--radius); background: var(--violet-text); color: var(--on-color); font-weight: 600;
  transition: background-color .2s;
}
.cta-band__go svg { width: 18px; height: 18px; transition: transform .2s; }
@media (min-width: 800px) {
  .cta-band { grid-template-columns: 1fr auto; padding: 24px 32px; }
  .cta-band__go { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
}
@media (hover: hover) {
  .cta-band:hover .cta-band__go { background: var(--ink); }
  .cta-band:hover .cta-band__go svg { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) { .cta-band__go, .cta-band__go svg { transition: none; } }

/* Sur les écrans où le hero est en une colonne, l'illustration décorative s'efface :
   même comportement sur toutes les pages, et le contenu remonte sous le texte */
@media (max-width: 999px) { .hero .flow { display: none; } }

/* --------------------------------------------------------------------------
   Sommaire de la page : ouvert sur grand écran, replié sur mobile (.fold)
   -------------------------------------------------------------------------- */
.toc-wrap { background: var(--paper-2); padding-top: 32px; }
.cta-wrap + .toc-wrap { padding-top: 24px; }
.toc > nav { padding: 4px 16px 8px; background: var(--surface); border: 1px solid var(--line); }
/* Sur mobile, le bouton « Sommaire » sert déjà de titre */
.toc .col-label { display: none; }
.toc__list { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc__list > li { counter-increment: toc; border-top: 1px solid var(--line); break-inside: avoid; }
.toc__list > li:first-child { border-top: 0; }
.toc__list a { display: flex; align-items: baseline; gap: 12px; min-height: 44px; padding: 10px 0; color: var(--text); font-weight: 500; text-decoration: none; }
.toc__list a:hover { color: var(--violet-text); text-decoration: underline; }
.toc__list > li > a::before { content: counter(toc, decimal-leading-zero); flex: none; font-family: var(--font-mono); font-size: .8rem; color: var(--text-soft); }
.toc__sub { list-style: none; margin: -4px 0 6px; padding: 0 0 0 32px; }
.toc__sub a { font-size: .95rem; font-weight: 400; color: var(--text-muted); }
.toc__sub .tag { align-self: center; }
.toc__list a[aria-current] { color: var(--violet-text); font-weight: 600; }
/* Section en cours, à côté du mot « Sommaire » dans le bouton replié */
.toc__current { flex: 1; min-width: 0; margin-left: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; font-weight: 400; color: var(--text-muted); }

/* Mobile : le sommaire replié reste accroché sous le menu ; ouvert, la liste passe par-dessus le contenu */
@media (max-width: 719px) {
  html:has(.toc-wrap) { scroll-padding-top: 126px; }
  .toc-wrap, .cta-wrap + .toc-wrap { position: sticky; top: 46px; z-index: 15; padding-block: 10px; }
  .toc { position: relative; }
  .toc > summary { box-shadow: 0 8px 16px -12px rgba(21, 19, 31, .45); }
  .toc[open] > summary { margin-bottom: 0; }
  .toc[open] > nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px);
    max-height: 60vh; max-height: 60dvh; overflow-y: auto;
    box-shadow: 0 24px 40px -16px rgba(21, 19, 31, .45);
  }
}

@media (min-width: 720px) {
  .toc > nav { padding: 24px 28px 20px; }
  .toc .col-label { display: block; margin-bottom: 8px; }
  .toc__list { columns: 2; column-gap: 56px; }
  .toc__list > li:first-child { border-top: 1px solid var(--line); }
}

/* --------------------------------------------------------------------------
   Outils : simulateurs et générateurs (calcul dans le navigateur).
   Un seul cadre par outil : champs et résultats sont posés à plat dedans.
   -------------------------------------------------------------------------- */
.tool { padding: 28px; background: var(--surface); border: 1px solid var(--tint-line, var(--line)); }
@media (max-width: 599px) { .tool { padding: 20px 16px; } }
.tool__head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.tool__head h3 { font-size: 1.25rem; font-weight: 600; }
.tool__head p { margin: 4px 0 0; color: var(--text-muted); max-width: 65ch; }
.tool__form { display: grid; gap: 16px 24px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-items: start; }
.tool fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 14px; align-content: start; }
.tool legend { padding: 0; margin-bottom: 10px; font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
/* Chaque champ occupe trois lignes de la grille parente (libellé, saisie, aide) :
   les saisies d'une même rangée restent alignées quand un libellé passe sur deux lignes */
.field { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 6px; align-content: start; }
.field label { align-self: end; font-size: .9rem; font-weight: 600; }
.field small { font-size: .8rem; color: var(--text-soft); }
.field input, .field select, .tool textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: inherit; font-variant-numeric: tabular-nums;
}
.field input:focus-visible, .field select:focus-visible, .tool textarea:focus-visible { outline: 2px solid var(--violet-text); outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: var(--red-text); box-shadow: inset 0 0 0 1px var(--red-text); }
.tool textarea { min-height: 250px; margin-top: 20px; line-height: 1.55; resize: vertical; background: var(--paper-2); }
.tool .calc { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); gap: 24px 48px; }
.tool .calc__card, .tool .calc__card--win { padding: 0; border: 0; background: none; }
.tool .calc__card:hover { transform: none; box-shadow: none; }
.tool .calc__result strong { white-space: nowrap; }
.tool__hint { margin: 20px 0 0; padding: 12px 14px; background: var(--tint-violet); font-size: .95rem; max-width: none; }
.tool__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 14px; }
.tool__status { font-size: .9rem; font-weight: 600; color: var(--green-text); }
button.btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; }

/* Mobile : cadres moins épais pour laisser la largeur au texte, champs numériques sur deux colonnes */
@media (max-width: 599px) {
  .card, .model, .callout { padding: 20px; }
  .partner { padding: 20px 16px; }
  .partner__key { padding: 16px; }
  .tool__form--pairs { grid-template-columns: 1fr 1fr; gap: 14px 12px; }
  .tool__form--pairs > .field:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Largeur de lecture : un paragraphe posé directement dans la page ne s'étire pas sur toute la largeur */
.section > .container > p, .section > .container > div > p.mt-s, .stack > p { max-width: 75ch; }
.source-note { max-width: 95ch; }

/* Filtre au-dessus d'un tableau */
.table-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.table-filter label { font-weight: 600; }
.table-filter select { min-height: 44px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; }
.table-filter select:focus-visible { outline: 2px solid var(--violet-text); outline-offset: 1px; }
.table-filter__count { font-size: .9rem; color: var(--text-soft); }
.table-stack tr[hidden] { display: none; }

/* Lien d'action isolé (hors d'une phrase) : zone tactile de 44 px */
.link-more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* Tableau empilé en version resserrée : sur mobile, les valeurs d'une ligne se suivent
   au lieu d'être préfixées une à une ; une légende au-dessus dit dans quel ordre les lire */
.table-legend { display: none; }
@media (max-width: 719px) {
  .table-legend { display: block; margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--text-soft); }
  .table-stack--inline th { padding-bottom: 4px; }
  .table-stack--inline td, .table-stack--inline td.note { display: inline; padding: 0; font-size: .92rem; font-weight: 400; color: var(--text-muted); white-space: normal; }
  .table-stack--inline td[data-label]::before { content: none; }
  .table-stack--inline td[data-label] + td[data-label]::before {
    content: " · "; font-size: inherit; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text-soft);
  }
}

/* Utilitaires d'espacement : en fin de feuille pour primer sur les composants */
.mt-s { margin-top: var(--space-s); }
.mt-m { margin-top: var(--space-m); }
.mt-l { margin-top: var(--space-l); }
.mt-xl { margin-top: var(--space-xl); }
