/* =============================================================================
   base.css · Polices, remise à zéro et typographie par défaut.
   Chargé sur toutes les pages, juste après tokens.css.
   ========================================================================== */

/* --- Polices auto-hébergées -------------------------------------------------
   Geist et Geist Mono, licence SIL Open Font License 1.1 (Vercel).
   Deux fichiers variables par famille : « latin » couvre le français courant,
   « latin-ext » prend le relais pour les caractères rares. Le navigateur ne
   télécharge « latin-ext » que si la page en a besoin (unicode-range).
   font-display: swap → le texte reste lisible pendant le chargement. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Remise à zéro ---------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Les ancres ne passent plus sous l'en-tête collant. */
  scroll-padding-top: 116px;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--navy-900);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-optical-sizing: auto;
  line-height: var(--lh-body);
  /* Le rendu fin des glyphes clairs sur fond sombre évite l'effet « gras ». */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

/* --- Typographie ------------------------------------------------------------
   Les titres sont serrés (letter-spacing négatif) et équilibrés sur plusieurs
   lignes ; les paragraphes évitent les lignes veuves. */

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 560;
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-title);
  text-wrap: balance;
}

/* Les grands titres et les chiffres clés passent en serif à fort contraste.
   Instrument Serif n'existe qu'en une seule graisse : font-synthesis-weight
   empêche le navigateur d'en fabriquer un faux gras, quelle que soit la graisse
   demandée par une feuille de page. */
h1,
h2,
.stat__figure,
.offer-card__num,
.pillar h3,
.board__stats strong,
.timeline__item h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis-weight: none;
  font-synthesis: none;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-display);
}

h2 {
  font-size: var(--fs-h2);
}

/* Le serif porte mieux des tailles plus généreuses que le sans. */
h1,
h2 { line-height: 1.02; }

h3 {
  font-size: var(--fs-h3);
  font-weight: 540;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

p {
  margin: 0;
  text-wrap: pretty;
}

/* Un titre ne colle jamais au texte qui le suit. */
:is(h1, h2, h3) + p {
  margin-top: 20px;
}

strong {
  font-weight: 580;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd {
  margin: 0;
}

address {
  font-style: normal;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  color: var(--navy-900);
  background: var(--cyan);
}

/* --- Accessibilité ---------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  z-index: var(--z-skip);
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  color: var(--navy-900);
  border-radius: var(--radius-sm);
  background: var(--cyan);
  font-size: var(--fs-tiny);
  font-weight: 580;
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* Masqué à l'écran, restitué par les lecteurs d'écran. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Mouvement réduit --------------------------------------------------------
   Préférence système respectée sur tout le site : plus d'animation décorative,
   les vidéos laissent la place à leur image d'affiche (voir components.css). */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
