/* ==========================================================================
   base.css — reset léger, typographie, mise en page générale
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; min-width: 0; }

html { scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font: var(--fs-md)/1.55 var(--f-body);
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { font-family: var(--f-display); font-stretch: var(--f-display-stretch); line-height: 1.1; margin: 0 0 var(--sp-3); text-wrap: balance; }
h1 { font-size: var(--fs-xl); font-weight: 800; }
h2 { font-size: 1.625rem; font-weight: 800; }
h3 { font-size: var(--fs-lg); font-weight: 700; }
p  { margin: 0 0 var(--sp-4); max-width: 68ch; }

a { color: var(--c-support); text-underline-offset: 3px; text-decoration-color: var(--c-accent); }
a:hover { color: var(--c-accent); }

img, svg { display: block; max-width: 100%; }

/* Focus visible, uniforme sur tout le site */
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

/* Lien d'évitement (clavier / lecteurs d'écran) */
.skip-link {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 100;
  background: var(--c-cta); color: var(--c-cta-ink);
  padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: var(--sp-2); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Conteneurs */
.container { width: min(100% - 2 * max(5vw, 16px), var(--container)); margin-inline: auto; }
.band { padding-block: clamp(28px, 4vw, 64px); }
.band--surface { background: var(--c-surface); border-block: 1px solid var(--c-line); }

main { flex: 1; }
main:focus, main:focus-visible { outline: none; box-shadow: none; }

.muted { color: var(--c-muted); }
.small { font-size: var(--fs-sm); }
.nowrap { white-space: nowrap; }
.mono-num { font-family: var(--f-display); font-stretch: var(--f-display-stretch); font-variant-numeric: tabular-nums; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--c-line); padding-block: var(--sp-5); color: var(--c-muted); font-size: var(--fs-sm); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); justify-content: space-between; }
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
