/* ===================================================================
   fonts.css — polices self-hosted (Inter + Plus Jakarta Sans)
   - Chargement non bloquant : font-display:swap = jamais d'écran blanc.
   - Fallback métrique 'Inter-fallback' = pas de saut de texte (CLS ~ 0).
   - Charset latin uniquement (fichiers les plus légers).
   À charger via le tableau $cssFiles (servi par la boucle du <head>).
   =================================================================== */

/* ---- Fallback métrique aligné sur les métriques d'Inter ----
   Arial redimensionné pour occuper exactement la même place qu'Inter.
   Quand la vraie police arrive, le texte ne se décale pas. */
@font-face {
  font-family: 'Inter-fallback';
  src: local('Arial');
  size-adjust: 107.4%;
  ascent-override: 90.2%;
  descent-override: 22.48%;
  line-gap-override: 0%;
}

/* ---- Inter (corps de texte) ---- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-latin-700.woff2') format('woff2');
}

/* ---- Plus Jakarta Sans (titres, forte personnalité) ---- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/jakarta-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/jakarta-latin-800.woff2') format('woff2');
}

/* ---- Application aux titres ----
   Le corps de texte hérite d'Inter via critical.php (body,html).
   Ici on ne surcharge que les titres pour leur donner du caractère. */
h1, h2,
.hero-headline,
.section-title,
.page-title {
  font-family: 'Plus Jakarta Sans', 'Inter', 'Inter-fallback', system-ui, sans-serif;
}
