/* =====================================================
   POLICES SELF-HOSTED - Outils Pour La Classe
   Remplace intégralement fonts.googleapis.com (RGPD).
   Sous-ensemble latin (couvre le français : œ, €, accents).
   Les fontes variables (vf) couvrent toutes les graisses
   d'une famille en un seul fichier woff2.
   Le navigateur ne télécharge que les familles utilisées.
   ===================================================== */

/* unicode-range (2026-07-28) : ces woff2 sont des sous-ensembles latins sans
   aucun emoji. Sans unicode-range, un seul emoji dans un texte en
   var(--font-display) force le telechargement de Fredoka PUIS Nunito PUIS Inter
   avant de retomber sur la police emoji systeme (mesure /mes-eleves : 38 Ko de
   Nunito charges pour zero element en Nunito). Les plages sont la couverture
   EXACTE du cmap de chaque fichier (fontTools) : rendu strictement identique. */

/* ===== INTER - Police principale UI (variable 100-900) ===== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    /* Sur réseau lent, conserver la police système plutôt que repeindre le
       texte principal plusieurs secondes après le premier affichage. */
    font-display: optional;
    src: url('/public/fonts/inter-vf-100-900.woff2') format('woff2');
    unicode-range:
        U+0020-007E, U+00A0-00AC, U+00AE-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
        U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+2002, U+2009, U+200B, U+2013-2014,
        U+2018-201A, U+201C-201E, U+2022, U+2026, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+FEFF;
}

/* ===== NUNITO - Police contenu enfants (variable 200-1000) ===== */
@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('/public/fonts/nunito-vf-200-1000.woff2') format('woff2');
    unicode-range:
        U+000D, U+0020-007E, U+00A0-00FF, U+0102, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
        U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+2009, U+200B, U+2013-2014,
        U+2018-201A, U+201C-201E, U+2022, U+2026, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+2122,
        U+2212, U+2215;
}

/* ===== FREDOKA - Police display/jeux (variable 300-700) ===== */
@font-face {
    font-family: 'Fredoka';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/public/fonts/fredoka-vf-300-700.woff2') format('woff2');
    unicode-range:
        U+0020-007E, U+00A0-00AC, U+00AE-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC,
        U+0300-0301, U+0303-0304, U+0308, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026,
        U+2039-203A, U+2044, U+20AC, U+2122, U+2212;
}

/* ===== QUICKSAND - Police jeux (variable 300-700) ===== */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/public/fonts/quicksand-vf-300-700.woff2') format('woff2');
    unicode-range:
        U+000D, U+0020-007E, U+00A0-00FF, U+0102, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
        U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+2009, U+200B, U+2013-2014,
        U+2018-201A, U+201C-201E, U+2022, U+2026, U+2033, U+2039-203A, U+2044, U+20AC, U+2122,
        U+2212, U+2215;
}

/* ===== POPPINS - Titres séances ===== */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/public/fonts/poppins-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('/public/fonts/poppins-900.woff2') format('woff2');
}

/* ===== LA BELLE AURORE - Police cursive ===== */
@font-face {
    font-family: 'La Belle Aurore';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/public/fonts/la-belle-aurore-v23-latin-regular.woff2') format('woff2');
}

/* ===== OPENDYSLEXIC - Police accessibilité (4 styles) ===== */
@font-face {
    font-family: 'OpenDyslexic';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/public/fonts/OpenDyslexic-Regular.woff') format('woff');
}
@font-face {
    font-family: 'OpenDyslexic';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/public/fonts/OpenDyslexic-Italic.woff') format('woff');
}
@font-face {
    font-family: 'OpenDyslexic';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/public/fonts/OpenDyslexic-Bold.woff') format('woff');
}
@font-face {
    font-family: 'OpenDyslexic';
    font-style: italic;
    font-weight: 700;
    font-display: swap;
    src: url('/public/fonts/OpenDyslexic-BoldItalic.woff') format('woff');
}

/* ===== CURSIVE ÉCOLE (dérivée de Marelle, OFL) - Police écriture manuscrite (PDF/Fiches + titre header) =====
   WOFF2 (90 Ko) en premier choix pour le web ; le TTF (337 Ko) reste servi en
   secours et pour mPDF. font-display: swap conserve un titre de marque visible
   pendant le chargement ou en cas de refus des polices par le navigateur.
   Préchargée dans header.php dès
   1500px de fenêtre. */
@font-face {
    font-family: 'CursiveEcole';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src:
        url('/public/fonts/cursive-ecole.woff2') format('woff2'),
        url('/public/fonts/cursive-ecole.ttf') format('truetype');
}

/* ===== POLICES À THÈME (jeux : espace, halloween, médiéval…) ===== */
@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('/public/fonts/orbitron-vf-400-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Cinzel';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('/public/fonts/cinzel-vf-400-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Creepster';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/public/fonts/creepster-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Special Elite';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/public/fonts/special-elite-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Fredoka One';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/public/fonts/fredoka-one-400.woff2') format('woff2');
}

/* ===== POLICES DÉCORATIVES (générateur d'étiquettes) ===== */
@font-face {
    font-family: 'Kalam';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/public/fonts/kalam-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Caveat';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/public/fonts/caveat-vf-400-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Shadows Into Light';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/public/fonts/shadows-into-light-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Permanent Marker';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/public/fonts/permanent-marker-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Patrick Hand';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/public/fonts/patrick-hand-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Architects Daughter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/public/fonts/architects-daughter-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Fredericka the Great';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/public/fonts/fredericka-the-great-400.woff2') format('woff2');
}

/* ===== VARIABLES DE POLICES ===== */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-content: 'Nunito', var(--font-sans);
    --font-display: 'Fredoka', 'Nunito', var(--font-sans);
    --font-cursive: 'La Belle Aurore', cursive;
    --font-handwriting: 'CursiveEcole', 'La Belle Aurore', cursive;
    --font-dyslexic: 'OpenDyslexic', var(--font-sans);
}
