/* Base : racine, Dynamic Type, rôles typographiques, prose, focus (spec §4). */
*, *::before, *::after { box-sizing: border-box; }

/* Un élément masqué le reste, quel que soit le display de son composant. */
[hidden] { display: none !important; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* iOS seulement : suivre le réglage Dynamic Type (exclut Safari macOS). */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  html { font: -apple-system-body; }
}

html, body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  overflow-wrap: break-word;
  hyphens: none;
}

@media (min-width: 37.5em) {
  :root { --gutter: 24px; }
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
/* Césure française automatique (lang="fr") sur les titres et les noms de ligne
   seulement : un mot trop long pour la ligne est coupé à une syllabe, avec un
   trait d'union, plutôt qu'au dernier caractère qui tient. Le corps n'est
   jamais haché (body : hyphens none). Dès 360 px seulement : à 320 px, où la
   spec §11 tolère déjà la coupure de dernier recours, WebKit ajoute un trait
   d'union hors de la ligne quand aucune syllabe ne tient (titre d'école à 331 %). */
@media (min-width: 360px) {
  h1, h2, h3, h4, .list-row__title, .list-row__text > .name { -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 10 4 4; }
}
/* Exposants (« XIe », « 1er ») : jamais sous le plancher typographique ; sans effet sur l'interligne. */
sup, sub { font-size: max(0.75em, 0.882rem); line-height: 0; }
p { margin: 0; }

/* Rôles */
.t-large-title { font-size: var(--font-size-large-title); line-height: var(--line-height-large-title); font-weight: var(--font-weight-bold); }
.t-title-1 { font-size: var(--font-size-title-1); line-height: var(--line-height-title-1); font-weight: var(--font-weight-bold); }
.t-title-2 { font-size: var(--font-size-title-2); line-height: var(--line-height-title-2); font-weight: var(--font-weight-bold); }
.t-title-3 { font-size: var(--font-size-title-3); line-height: var(--line-height-title-3); font-weight: var(--font-weight-semibold); }
.t-headline { font-size: var(--font-size-headline); line-height: var(--line-height-headline); font-weight: var(--font-weight-semibold); }
.t-body { font-size: var(--font-size-body); line-height: var(--line-height-body); }
.t-reading { font-size: var(--font-size-reading); line-height: var(--line-height-reading); }
.t-callout { font-size: var(--font-size-callout); line-height: var(--line-height-callout); }
.t-subheadline { font-size: var(--font-size-subheadline); line-height: var(--line-height-subheadline); color: var(--color-text-secondary); }

.tabular { font-variant-numeric: tabular-nums; }

/* Liens : noirs et soulignés */
a { color: var(--color-action); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }

/* Prose et lecture longue */
.prose { max-width: var(--measure-reading); text-wrap: pretty; }
.prose.reading { font-size: var(--font-size-reading); line-height: var(--line-height-reading); }
.prose > * + * { margin-top: 0.9em; }
.prose h2 { margin-top: 2em; font-size: var(--font-size-title-2); line-height: var(--line-height-title-2); }
.prose h3 { margin-top: 1.6em; font-size: var(--font-size-title-3); line-height: var(--line-height-title-3); }
.prose h4 { margin-top: 1.4em; font-size: var(--font-size-headline); line-height: var(--line-height-headline); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.5em; }
.prose ul, .prose ol { padding-left: min(1.25em, 22px); }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { margin-left: 0; padding-left: var(--space-4); border-left: 2px solid var(--color-text); }
.prose hr { border: 0; border-top: 1px solid var(--color-rule); }

/* Focus : anneau décalé, le blanc du décalage le sépare du noir */
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
main:focus { outline: none; }
a, button, input, select, textarea, summary { scroll-margin-block: var(--space-6); }

/* Lien d'évitement */
.skip-link { position: absolute; left: var(--gutter); top: -10em; padding: var(--space-2) var(--space-3); background: var(--color-bg); }
.skip-link:focus { top: var(--space-2); }

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

@media (forced-colors: active) {
  .btn, input, select, textarea, .list-section { border: 1px solid CanvasText; }
}
