/* Common stylesheet of the ten pages (sales page, conditions, privacy policy, return page, six guides).
   No font, image or stylesheet is loaded from a third party: the Content-Security-Policy of every page
   allows 'self' only. Headings use the system serif stack, the body the system sans stack. */
:root {
  --fond: #fbfaf7;
  --texte: #1d1d1b;
  --discret: #5a5a55;
  /* Brand: one ink green on cream paper (docs/identite/). Contrast on --fond: accent 7.93:1, survol 10.08:1. */
  --marque: #14584f;
  --marque-survol: #0f4740;
  --marque-sombre: #0f2f2b; /* dark ink of the palette (docs/identite/); no band uses it since v2.2 */
  --marque-claire: #bfd6d1; /* text on --marque-sombre */
  --marque-trait: #8fb9b2; /* decorative only (2.06:1): never on text or a control */
  --accent: var(--marque);
  --accent-survol: var(--marque-survol);
  --surface: #f1eee6;
  --bordure: #d9d6cf; /* decorative rules only: 1.39:1, never on a control */
  --bordure-controle: #8a8a84; /* 3.33:1 on the background */
  --alerte: #fff4d6;
  --serif: Georgia, "Times New Roman", serif;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--texte);
  background: var(--fond);
  scroll-padding-top: 1rem;
}
@media (min-width: 60rem) {
  :root { font-size: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  /* Motion goes to zero; every state stays visible (underline, tick, added line, highlight). */
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}

body { margin: 0; }
/* Author display rules (.actions is flex) must not override the hidden attribute. */
[hidden] { display: none !important; }
.entete, main { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1rem; }
main { padding-top: 0; }

h1, h2 { font-family: var(--serif); font-weight: 700; line-height: 1.15; text-wrap: balance; }
h3 { line-height: 1.3; }
h1 { font-size: 1.9rem; letter-spacing: -0.01em; }
p, li { text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-survol); }
:where(a, button, input, textarea, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.avertissement {
  background: var(--alerte);
  border-left: 4px solid #b8860b;
  padding: 0.75rem 1rem;
}
.confidentialite, .discret { color: var(--discret); }

fieldset {
  border: 1px solid var(--bordure-controle);
  border-radius: 6px;
  margin: 0 0 1.25rem;
  padding: 1rem;
}
legend { font-weight: 600; padding: 0 0.25rem; }

label { display: block; margin: 0.75rem 0; }
label.case { display: flex; gap: 0.5rem; align-items: baseline; margin: 0.4rem 0; }
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; flex: none; accent-color: var(--accent); }
input:not([type="checkbox"]), textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.25rem;
  padding: 0.5rem 0.65rem;
  min-height: 44px;
  font: inherit;
  border: 1px solid var(--bordure-controle);
  border-radius: 4px;
  background: #fff;
}
textarea { min-height: 5.5rem; }

button, a.bouton {
  font: inherit;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  min-height: 44px;
  box-sizing: border-box;
  transition: background-color 150ms ease, transform 150ms ease;
}
button:hover, a.bouton:hover { background: var(--accent-survol); border-color: var(--accent-survol); color: #fff; }
button:active, a.bouton:active { transform: translateY(1px); }
button.secondaire, a.bouton.secondaire { background: #fff; color: var(--accent); }
button.secondaire:hover, a.bouton.secondaire:hover { background: var(--surface); color: var(--accent-survol); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button:disabled:hover { background: var(--accent); }
button:disabled:active { transform: none; }
a.bouton { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
/* Copy button: both labels share one grid cell, so "Copier" and "Copié" take the same width and the
   neighbouring buttons never move. The hidden label leaves the accessibility tree (visibility). */
.bouton-copie { display: inline-grid; justify-items: center; }
.bouton-copie > [data-libelle] { grid-area: 1 / 1; visibility: hidden; }
.bouton-copie[data-etat="repos"] > [data-libelle="repos"],
.bouton-copie[data-etat="copie"] > [data-libelle="copie"] { visibility: visible; }
.actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem; margin: 1rem 0; }

.manquants { background: var(--alerte); padding: 0.75rem 1rem; }

.politique {
  background: #fff;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  padding: 1rem 1.25rem;
}
.politique h2 { font-size: 1.25rem; margin-top: 1.5rem; }
.annexe table { border-collapse: collapse; width: 100%; font-size: 0.85rem; }
.annexe th, .annexe td { border: 1px solid var(--bordure); padding: 0.4rem; vertical-align: top; text-align: left; }
.annexe { overflow-x: auto; }

.chapeau { font-size: 1.05rem; }
.prix { font-size: 1.4rem; margin-bottom: 0.25rem; }
.prix strong, .ventilation, .ligne-prix { font-variant-numeric: tabular-nums; }
.couverture { font-size: 0.9rem; }
details { margin: 1rem 0 2rem; }
summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 0.5rem; }
summary::before {
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 150ms ease;
}
details[open] > summary::before { transform: rotate(45deg); }

.statut { padding: 0.75rem 1rem; border-left: 4px solid var(--accent); background: #edf4f2; }
.statut[data-kind="erreur"] { border-color: #a4282a; background: #fbecec; }
.statut[data-kind="succes"] { border-color: #2e6b34; background: #ecf6ed; }

.note-apercu { color: var(--discret); }
.achat { margin: 1rem 0; padding: 1rem; border: 1px solid var(--bordure-controle); border-radius: 6px; background: #fff; }
.achat p { margin: 0.5rem 0 0; color: var(--discret); }

.verrouille { color: var(--discret); border-top: 1px dashed var(--bordure-controle); }
.verrouille h2 { color: var(--discret); }

.achat h2 { font-size: 1.2rem; margin: 0 0 0.75rem; }
.recapitulatif, .vendeur { display: grid; grid-template-columns: minmax(7rem, max-content) 1fr; gap: 0.35rem 1rem; margin: 0 0 1rem; }
.recapitulatif dt, .vendeur dt { font-weight: 600; }
.recapitulatif dd, .vendeur dd { margin: 0; }
.achat .actions form { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.achat .actions form label.case { margin: 0; }
.conditions h2 { font-size: 1.25rem; margin-top: 1.75rem; }
/* Copy of the contract (merci.html and the printable page served by the Worker). */
.exemplaire { margin: 1.5rem 0; }
.exemplaire h2 { font-size: 1.35rem; }
.exemplaire-contrat {
  background: #fff;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-wrap: anywhere;
}
.exemplaire-contrat > h2 { font-size: 1.2rem; margin-top: 0.5rem; }
.exemplaire-contrat .conditions h2 { font-size: 1.05rem; margin-top: 1.25rem; }
@media (max-width: 30rem) {
  .recapitulatif, .vendeur { grid-template-columns: 1fr; }
  .recapitulatif dd, .vendeur dd { margin-bottom: 0.4rem; }
}
@media print {
  .entete, main { max-width: none; }
  .exemplaire-contrat { border: 0; padding: 0; }
  .site-entete, .saut { display: none; }
}

/* Guides (site/guides/). */
.fil { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--discret); }
.guide a:not(.bouton) { color: var(--accent); }
.guide h2 { font-size: 1.4rem; margin-top: 2rem; }
.guide li { margin: 0.35rem 0; }
.tableau { overflow-x: auto; }
.tableau table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.tableau th, .tableau td { border: 1px solid var(--bordure); padding: 0.4rem 0.5rem; vertical-align: top; text-align: left; }
.tableau th { background: #fff; }
.exemple h3 { font-size: 1.15rem; margin: 0.25rem 0 0.5rem; }
.exemple h4 { font-size: 1rem; margin: 1rem 0 0.25rem; }
.exemple p { margin: 0.25rem 0; }
.appel { margin: 2rem 0; padding: 1rem 1.25rem; border: 1px solid var(--bordure); border-radius: 6px; background: #fff; }
.appel h2 { margin-top: 0; }
.source, .sources { color: var(--discret); font-size: 0.9rem; overflow-wrap: anywhere; }
.guide code { overflow-wrap: anywhere; }

/* ---------- Site header, shared by the sales page and the return page ---------- */
.saut {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  padding: 0.6rem 1rem;
  background: #fff;
  border: 2px solid var(--accent);
  z-index: 10;
}
.saut:focus { top: 0.5rem; }
.conteneur { max-width: 1120px; margin: 0 auto; padding: 0 1rem; box-sizing: border-box; }
.site-entete { border-bottom: 1px solid var(--bordure); background: var(--fond); }
.site-barre { display: flex; align-items: center; gap: 0.5rem; min-height: 4rem; }
.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--marque);
  text-decoration: none;
  margin-right: auto;
}
@media (min-width: 48rem) { .marque { font-size: 1.4rem; } }
.marque svg { width: 1.5rem; height: 1.5rem; flex: none; display: block; }
.marque:hover { color: var(--marque-survol); }
.nav-bureau { display: none; gap: 0.25rem; }
.nav-bureau a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  color: var(--texte);
  text-decoration: none;
}
.nav-bureau a { position: relative; }
/* Underline that grows from the left on hover and focus (transform only). */
.nav-bureau a::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.55rem;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 150ms ease;
}
.nav-bureau a:hover, .nav-bureau a:focus-visible { color: var(--marque-survol); }
.nav-bureau a:hover::after, .nav-bureau a:focus-visible::after, .nav-bureau a[aria-current="page"]::after { transform: scaleX(1); }
.nav-bureau a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.site-barre .bouton { padding: 0.4rem 0.7rem; white-space: nowrap; font-size: 0.88rem; }
.nav-mobile { position: relative; margin: 0; }
.nav-mobile summary { padding: 0 0.25rem; list-style: none; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile ul {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 5;
  min-width: 14rem;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: var(--fond);
  border: 1px solid var(--bordure-controle);
  border-radius: 6px;
}
.nav-mobile li a { display: flex; align-items: center; min-height: 44px; padding: 0 1rem; text-decoration: none; color: var(--texte); }
@media (min-width: 48rem) {
  .nav-bureau { display: flex; }
  .nav-mobile { display: none; }
  .site-barre .bouton { margin-left: 0.5rem; }
  .marque { margin-right: 1rem; }
  .site-barre { gap: 0.5rem; }
  .nav-bureau { margin-right: auto; }
}

/* ---------- Sales page ---------- */
.accueil main { max-width: none; margin: 0; padding: 0; }
.bande { padding: 2.75rem 0; }
.bande.surface { background: var(--surface); }
.bande.haut { padding: 2.5rem 0 3rem; }
@media (min-width: 60rem) {
  .bande { padding: 5rem 0; }
  .bande.haut { padding: 2.25rem 0 3rem; }
  .conteneur { padding: 0 1.5rem; }
}
.accueil h2 { font-size: 1.7rem; margin: 0 0 1rem; }
@media (min-width: 60rem) { .accueil h2 { font-size: 2.1rem; } }
.conteneur.lecture > * { max-width: 65ch; }

.hero { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 4rem; }
}
.hero h1 { font-size: 1.95rem; margin: 0 0 1rem; max-width: 22ch; }
.editeur { margin: 0 0 0.75rem; font-size: 0.9rem; color: var(--discret); }
.partage { max-width: 65ch; margin: 0 0 1.25rem; padding-left: 1rem; border-left: 3px solid var(--marque-trait); font-family: var(--serif); font-size: 1.05rem; }
@media (min-width: 60rem) { .hero h1 { font-size: 2.15rem; max-width: 26ch; } }
.sous-titre { font-size: 1.05rem; max-width: 65ch; margin: 0 0 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin: 0 0 1rem; }
.hero-actions .bouton { min-height: 48px; padding: 0.6rem 1.5rem; }
@media (max-width: 30rem) {
  .hero-actions .bouton { width: 100%; }
  /* Brief v2.2 § 4.3: three lines for the title, the legal notice and the price line above the fold at 390 x 844. */
  .hero h1 { font-size: 1.5rem; line-height: 1.2; max-width: none; }
  .editeur { font-size: 0.8rem; }
}
.lien-second { min-height: 44px; display: inline-flex; align-items: center; }
.ligne-prix { margin: 0 0 0.5rem; }
.mention { font-size: 0.95rem; color: var(--discret); margin: 0 0 1.25rem; max-width: 65ch; }
.resultats { margin: 0; padding-left: 1.2rem; max-width: 65ch; }
.resultats li { margin: 0.35rem 0; }

.maquette { margin: 0; }
.maquette figcaption { font-size: 0.9rem; color: var(--discret); margin-bottom: 0.5rem; }
.maquette-page {
  background: #fff;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  padding: 1.25rem 1.25rem 0.5rem;
  font-size: 0.95rem;
}
.maquette-page p { margin: 0.4rem 0; }
.maquette-page ul { margin: 0.4rem 0; padding-left: 1.2rem; }
.maquette-titre { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; line-height: 1.25; }
.maquette-dates { color: var(--discret); font-size: 0.85rem; }
.maquette-section { font-weight: 600; margin-top: 1rem !important; }
.maquette-bloc { margin-top: 1rem; padding: 0 0 0.5rem; border-top: 1px solid var(--bordure); border-radius: 2px; }
.maquette-bloc:first-of-type { border-top: 0; }
.maquette-verrou { color: var(--discret); }
.maquette-bloc > .maquette-section { margin-top: 0.75rem !important; }
.fondement-bloc { margin-top: 0.5rem !important; }
.fondement { display: block; padding: 0.4rem 0.6rem; background: var(--surface); color: var(--texte); border-radius: 4px; border-left: 3px solid var(--marque-trait); font-size: 0.85rem; transition: background-color 150ms ease, border-color 150ms ease; }
/* The sentence and its basis are linked: hover or focus on the block lights the basis. */
.maquette-bloc:hover .fondement, .maquette-bloc:focus-within .fondement, .maquette-bloc:focus .fondement { background: #e3ede9; border-left-color: var(--marque); }
.maquette-bloc:focus-visible { outline: 3px solid var(--marque); outline-offset: 2px; }

/* Proof strip: only facts the page already states. */
.preuve { background: var(--surface); border-top: 1px solid var(--bordure); border-bottom: 1px solid var(--bordure); }
.preuve-liste { list-style: none; margin: 0 auto; padding-top: 1.25rem; padding-bottom: 1.25rem; display: grid; gap: 1rem; font-size: 0.92rem; }
.preuve-liste strong { display: block; color: var(--marque); }
@media (min-width: 48rem) { .preuve-liste { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.investissement { margin: 2rem 0 0; max-width: 46rem; padding: 0.75rem 1rem; border-left: 3px solid var(--marque-trait); background: #fff; }

.etapes { list-style: none; counter-reset: etape; margin: 0; padding: 0; display: grid; gap: 1.75rem; max-width: 46rem; }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 3.5rem 1fr; column-gap: 1rem; }
.etapes li::before {
  content: counter(etape);
  grid-row: 1 / span 2;
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
}
.etapes h3 { margin: 0 0 0.25rem; font-size: 1.15rem; }
.etapes p { margin: 0; }

/* Illustrations (docs/illustrations/): two figures below the fold, none near the price or the button.
   The image files carry their own size (width and height attributes), so the page does not shift. */
.etapes-image { display: grid; gap: 2rem; }
@media (min-width: 60rem) { .etapes-image { grid-template-columns: minmax(0, 1fr) 400px; gap: 3rem; align-items: start; } }
.illustration { margin: 0; }
.illustration img { display: block; width: 100%; height: auto; box-sizing: border-box; border-radius: 6px; }
.illustration-personne img { border: 1px solid var(--bordure); background: var(--fond); }
.conteneur.lecture > .illustration-annexe { max-width: 382px; margin: 1.5rem 0; }
.illustration figcaption { margin-top: 0.5rem; font-size: 0.9rem; color: var(--discret); }

.deux-colonnes { display: grid; gap: 2.5rem; }
@media (min-width: 60rem) { .deux-colonnes { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.deux-colonnes ul { padding-left: 1.2rem; }
.deux-colonnes li { margin: 0.6rem 0; }

#offre ul { padding-left: 1.2rem; }
#offre li { margin: 0.6rem 0; }
.ventilation { margin: 0 0 1rem; }
.garantie { padding: 0.75rem 1rem; background: var(--surface); border-radius: 6px; margin: 1.25rem 0; }
.intro-form { color: var(--discret); }
#questionnaire > h2 { margin-top: 0; }

/* Contrast block: what exists already, and what this one does differently. */
#titre-contraste { font-size: 1.2rem; margin: 2rem 0 0.75rem; }
.contraste { display: grid; grid-template-columns: minmax(9rem, max-content) 1fr; gap: 0.5rem 1.5rem; margin: 0; }
.contraste dt { font-weight: 600; }
.contraste dd { margin: 0 0 0.75rem; }
@media (max-width: 30rem) {
  .contraste { grid-template-columns: 1fr; gap: 0; }
  .contraste dd { margin-bottom: 1rem; }
}

.faq h3 { font-size: 1.1rem; margin: 1.75rem 0 0.25rem; }
.faq p { margin: 0; }

.pied { background: var(--surface); border-top: 1px solid var(--bordure); padding: 3rem 0 3.5rem; }
.pied-grille { display: grid; gap: 2.5rem; }
@media (min-width: 60rem) { .pied-grille { grid-template-columns: 1.2fr 1fr; gap: 4rem; } }
.pied h2 { font-size: 1.3rem; margin: 0 0 0.75rem; }
.pied ul { margin: 0; padding-left: 1.2rem; }
.pied li { margin: 0.45rem 0; }
.pied p { margin: 0.5rem 0; }

/* ---------- Questionnaire with live preview ---------- */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.redaction-grille { display: grid; gap: 1.5rem; align-items: start; }
.redaction-suite { max-width: 50rem; margin-top: 2rem; }
@media (min-width: 60rem) {
  .redaction-grille { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); gap: 3rem; }
  .redaction-form { order: 1; }
  .apercu-direct { order: 2; }
  .apercu-direct > summary { display: none; }
}
.apercu-direct { border: 1px solid var(--bordure-controle); border-radius: 6px; background: #fff; margin: 0; padding: 0 1rem; }
.apercu-direct > summary { padding: 0; }
.apercu-direct-corps { padding-bottom: 1rem; min-block-size: 14rem; }
@media (min-width: 60rem) { .apercu-direct-corps { padding-top: 1rem; min-block-size: 24rem; } }
#apercu-direct-contenu .politique { border: 0; padding: 0; font-size: 0.95rem; }
#apercu-direct-contenu h1 { font-size: 1.15rem; margin: 0 0 0.25rem; }
#apercu-direct-contenu h2 { font-size: 1.05rem; margin: 1rem 0 0.25rem; }
#apercu-direct-contenu p, #apercu-direct-contenu ul { margin: 0.3rem 0; }
#apercu-direct-contenu .ligne { padding: 0.25rem 0.5rem; margin-left: -0.5rem; border-radius: 4px; transition: background-color 400ms ease; }
#apercu-direct-contenu .ligne.nouvelle { background: var(--surface); }

.progression { margin: 1rem 0 1.5rem; padding: 0.75rem 1rem; background: #fff; border: 1px solid var(--bordure); border-radius: 6px; }
.progression-texte { margin: 0 0 0.5rem; font-weight: 600; }
.progression-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.9rem; color: var(--discret); }
.progression-liste li::before { content: "○ "; }
.progression-liste li[data-fait] { color: var(--marque); font-weight: 600; }
.progression-liste li[data-fait]::before { content: "✓ "; }
fieldset[data-groupe][data-fait] > legend::after { content: " — rempli ✓"; color: var(--marque); font-weight: 400; }
.aide { margin: 0; font-size: 0.9rem; color: var(--discret); min-block-size: 2.8em; }
@media (prefers-reduced-motion: reduce) {
  #apercu-direct-contenu .ligne { transition: none; }
}
/* Headings that take the focus after an anchor or the preview button show the brand ring. */
[tabindex="-1"]:focus-visible { outline: 3px solid var(--marque); outline-offset: 2px; }
/* Narrow screens: the header holds the mark and the menu; the primary button is in the first screen. */
@media (max-width: 30rem) { .site-barre .bouton { display: none; } }
