/* =========================================================
   THOMATHS — POLICES (auto-hébergées)
   =========================================================
   Inter (corps) + Spectral (titres). Fichiers dans
   static/thomaths/fonts/, récupérés depuis fonts.gstatic.com.
   Licence SIL Open Font License 1.1 (cf. fonts/OFL.txt).

   POURQUOI EN LOCAL PLUTÔT QUE GOOGLE FONTS
   Le site chargeait ces polices depuis fonts.googleapis.com avec
   `display=optional`. `optional` ne laisse à la police que ~100 ms
   pour arriver : au-delà, le navigateur garde la police de secours
   pour TOUTE la durée de la page et ne bascule jamais. L'issue de
   cette course dépendant du cache et du réseau, la page changeait
   de police d'un rechargement à l'autre — systématiquement en
   Ctrl+Shift+R (cache contourné → secours Segoe UI / Georgia).

   En même origine, les fichiers arrivent en quelques ms au lieu
   de quelques dizaines : la course est gagnée d'avance.

   POURQUOI `swap` ET SURTOUT PAS `optional`
   `swap` GARANTIT que la police finit toujours par être utilisée —
   c'est ce qui rend le rendu déterministe, condition de base pour
   que Ctrl+Shift+R donne exactement la même chose. Sa contrepartie
   habituelle (bascule tardive visible) ne s'applique plus ici :
   avec des fichiers locaux + preload, la fenêtre est trop courte
   pour être perçue. Ne PAS revenir à `optional` en croyant
   supprimer un clignotement : ça réintroduirait l'alternance.

   AJOUTER UNE GRAISSE
   Inter est une police VARIABLE : un seul fichier par subset couvre
   100→900, donc une nouvelle graisse ne demande aucun fichier —
   juste de l'utiliser. Spectral n'est pas variable : il faut un
   .woff2 par graisse (500/600/700 aujourd'hui).

   Les unicode-range sont ceux de Google Fonts, recopiés tels quels :
   ils font que `latin-ext` n'est téléchargé que si un caractère le
   réclame. Une page française ne charge que les `latin`.
   ========================================================= */

/* ---------- Inter (corps de texte) — variable 100→900 ---------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-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: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-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;
}

/* ---------- Spectral (titres) — une graisse = un fichier ---------- */
@font-face {
    font-family: 'Spectral';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/spectral-500-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: 'Spectral';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/spectral-500-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: 'Spectral';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/spectral-600-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: 'Spectral';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/spectral-600-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: 'Spectral';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/spectral-700-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: 'Spectral';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/spectral-700-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;
}
