/*
 * Polices hébergées (docs/05-conception-visuelle.md, §4.2).
 * Deux polices variables, WOFF2, sous-ensemble latin (accents français, œ, « », ’ et … compris).
 * Licence : /assets/fonts/OFL.txt. Aucun appel à un service externe.
 * Si une police change, renommer son fichier : le serveur la met en cache un an.
 */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  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: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/assets/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
  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;
}

/*
 * Polices de secours réglées pour occuper la même place que la vraie police :
 * le texte ne saute pas quand Inter ou JetBrains Mono remplace la police du système (CLS proche de 0).
 * Valeurs calculées à partir des métriques des fichiers (hhea, largeur moyenne des lettres)
 * face à Arial et Courier New (ou leurs équivalents Liberation, Helvetica).
 */

@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('Helvetica'), local('Liberation Sans');
  size-adjust: 107%;
  ascent-override: 90.5%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'JetBrains Mono Fallback';
  src: local('Courier New'), local('Liberation Mono');
  size-adjust: 100%;
  ascent-override: 102%;
  descent-override: 30%;
  line-gap-override: 0%;
}
