/* =========================================================================
   Base : remise à zéro, typographie, liens, focus, utilitaires.
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern';
  overflow-wrap: break-word;
}
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
:where(ul[role='list'], ol[role='list']) { list-style: none; padding: 0; }
img, svg, video, picture { display: block; max-width: 100%; }
img { height: auto; }
.img-formats { display: contents; }
.img-formats > source { display: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong, b { font-weight: 700; }
sup { font-size: .7em; line-height: 0; vertical-align: .45em; }

a { color: var(--teal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.on-dark :focus-visible, .section--dark :focus-visible, .site-footer :focus-visible { outline-color: var(--focus-on-dark); }

/* Titres : un seul H1 par page (check.mjs) ; la taille vient de la classe, pas du niveau */
.h1 { font-size: var(--fs-h1); line-height: 1.08; font-weight: 800; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.h2 { font-size: var(--fs-h2); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.h3 { font-size: var(--fs-h3); line-height: 1.2; font-weight: 800; letter-spacing: -.015em; }
.h4 { font-size: var(--fs-h4); line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.h5 { font-size: 1.0625rem; line-height: 1.3; font-weight: 800; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); max-width: 34em; }
.prose { max-width: 42em; color: var(--ink-2); }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { color: var(--ink); margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.small { font-size: var(--fs-xs); line-height: 1.55; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: .02em; font-size: var(--fs-mono); }
.nowrap { white-space: nowrap; }

/* Surtitre en capitales, chêne (option --line : petit trait devant) */
.kicker {
  display: flex; align-items: center; gap: 12px;
  font-size: var(--fs-kicker); font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--oak-ink); line-height: 1.4;
}
.kicker--line::before { content: ''; flex: none; width: 28px; height: 2px; background: var(--oak); }
.section--dark .kicker, .on-dark .kicker { color: var(--oak-light); }

/* Mise en page */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }
.section { padding-block: var(--section-y); }
.section--s { padding-block: var(--section-y-s); }
.section--tint { background: var(--tint); }
.section--mist { background: var(--mist); }
.section--line { border-top: 1px solid var(--line); }
.section--dark { background: var(--dark); color: var(--on-dark); }
.section--dark :where(.h2, .h3, .h4) { color: var(--on-dark); }
.section--dark :where(.lead, p) { color: var(--on-dark-2); }

.stack { display: flex; flex-direction: column; gap: var(--stack, 24px); }
.stack--xs { --stack: 8px; } .stack--s { --stack: 14px; } .stack--m { --stack: 28px; } .stack--l { --stack: 40px; } .stack--xl { --stack: 48px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster, 12px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split--top { align-items: start; }
@media (max-width: 1080px) {
  /* :not(.split--keep) relève la spécificité (0,2,0) : les colonnes propres à une page (.rdv-faq, .prep-day…,
     déclarées après base.css) ne doivent plus garder deux colonnes sur tablette et mobile. */
  .split:not(.split--keep) { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}

/* Photos : coins arrondis, recadrage par object-fit (le ratio vient du recadrage d'images.json) */
.photo { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-l); }
.photo--fill { position: absolute; inset: 0; }

/* Accessibilité */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--teal); color: #fff; padding: 12px 18px; border-radius: var(--r-s); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Information à fournir ou à confirmer : posée par le générateur (markTodos), discrète mais visible */
mark.todo {
  background: transparent; color: var(--ink-3);
  font-size: .85em; font-weight: 600; font-style: normal; letter-spacing: 0;
  border: 1px dashed var(--line-dash); border-radius: 4px; padding: 0 .35em;
  white-space: normal; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.section--dark mark.todo, .on-dark mark.todo, .site-footer mark.todo { color: var(--on-dark-3); border-color: var(--dark-line); }
/* surface claire posée sur un fond sombre (carte blanche, nœud de schéma) : la marque reprend les couleurs du clair */
:is(.section--dark, .on-dark) :is(.on-light, .card-on-dark, .flow__node, .flow__rdv) mark.todo { color: var(--ink-3); border-color: var(--line-dash); }

/* Barre fixe mobile : la page garde de la place en bas */
@media (max-width: 719px) {
  html { scroll-padding-bottom: calc(var(--mobile-cta-h) + env(safe-area-inset-bottom)); }
  /* la réserve est portée par le pied de page (fond sombre) : pas de bande blanche sous le footer */
  body.has-mobile-cta .site-footer { padding-bottom: calc(32px + var(--mobile-cta-h) + env(safe-area-inset-bottom)); }
}

@media print {
  .site-header, .mobile-cta, .mobile-menu, .site-footer__top, .skip-link { display: none !important; }
  body { padding: 0 !important; }
  .section--dark { background: none; color: #000; }
}
