/* ==========================================================================
   Polices auto-hébergées — Gafas Raysol
   --------------------------------------------------------------------------
   Instrument Serif 400 (romain + italique) et Instrument Sans variable
   (axe wght 400–700, romain + italique), sous-ensemble « latin »
   (Fontsource 5.3.0, fichiers identiques au paquet npm). Couvre l'espagnol
   complet : ñ á é í ó ú ü ¿ ¡ « » € ª º.
   Licence SIL Open Font License 1.1 : ../fonts/OFL-instrument-serif.txt,
   ../fonts/OFL-instrument-sans.txt

   Préchargement des 2 fichiers critiques (dans <head>, avant site.css) :
   <link rel="preload" href="/assets/fonts/instrument-sans-latin-wght-normal.woff2" as="font" type="font/woff2" crossorigin>
   <link rel="preload" href="/assets/fonts/instrument-serif-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin>

   Piles conseillées (les faces « Fallback » ci-dessous calent Times New Roman
   et Arial sur les métriques des polices web pour limiter le décalage au swap) :
   --font-serif: "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;
   --font-sans:  "Instrument Sans", "Instrument Sans Fallback", system-ui, -apple-system,
                 "Segoe UI", Roboto, Arial, sans-serif;
   Instrument Serif n'existe qu'en 400 : ne jamais lui appliquer font-weight > 400
   (déclarer font-synthesis: none sur les titres pour éviter le gras synthétique).
   ========================================================================== */

/* --- Instrument Serif ---------------------------------------------------- */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-latin-400-normal.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: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-latin-400-italic.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;
}

/* --- Instrument Sans (variable, wght 400–700) ----------------------------- */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-wght-normal.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 Sans";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-wght-italic.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;
}

/* --- Faces de repli ajustées (métriques calculées avec fontTools) ---------
   size-adjust = largeur moyenne (texte espagnol) police web / police système ;
   ascent/descent/line-gap = métriques de la police web divisées par size-adjust. */
@font-face {
  font-family: "Instrument Serif Fallback";
  src: local("Times New Roman"), local("TimesNewRomanPSMT");
  size-adjust: 82.85%;
  ascent-override: 119.5%;
  descent-override: 37.42%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial"), local("ArialMT");
  size-adjust: 101.05%;
  ascent-override: 95.99%;
  descent-override: 24.74%;
  line-gap-override: 0%;
}
