/*
 * Direction "Clair vivant" — proposée par Codex (docs/design/00-overview.md),
 * en rupture volontaire avec les deux palettes précédentes (teal/or admin,
 * pierre/tuile front) que le client a rejetées. Tokens partagés, à réutiliser
 * au fur et à mesure que chaque page est reprise dans cette direction.
 *
 * Polices auto-hébergées (assets/fonts/) — Space Grotesk (titres) + Inter
 * (texte courant), remplace le duo Fraunces/Manrope chargé en Google Fonts.
 */

@font-face {
    font-family: 'Space Grotesk';
    src: url("../fonts/Space_Grotesk/static/SpaceGrotesk-Light-fczUZJu.ttf") format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url("../fonts/Space_Grotesk/static/SpaceGrotesk-Regular-Md-nFtv.ttf") format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url("../fonts/Space_Grotesk/static/SpaceGrotesk-Medium-xdHChlv.ttf") format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url("../fonts/Space_Grotesk/static/SpaceGrotesk-SemiBold-QoNGkv3.ttf") format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url("../fonts/Space_Grotesk/static/SpaceGrotesk-Bold-101fUMM.ttf") format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url("../fonts/Inter/static/Inter_18pt-Regular-qIlWrpV.ttf") format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url("../fonts/Inter/static/Inter_18pt-Italic-aRjse9J.ttf") format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url("../fonts/Inter/static/Inter_18pt-Medium-vVR_1Pv.ttf") format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url("../fonts/Inter/static/Inter_18pt-SemiBold-PFImOAH.ttf") format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url("../fonts/Inter/static/Inter_18pt-Bold-qVyVXuO.ttf") format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url("../fonts/Inter/static/Inter_18pt-ExtraBold-eBJLdzm.ttf") format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ─── Polices additionnelles — sélecteur de police du WYSIWYG (contenu des
   articles), voir .ql-font-* plus bas et wysiwyg_controller.js ────────── */

@font-face {
    font-family: 'Rubik';
    src: url("../fonts/Rubik/static/Rubik-Regular-YYhkew7.ttf") format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rubik';
    src: url("../fonts/Rubik/static/Rubik-Italic-CZvRDw0.ttf") format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Rubik';
    src: url("../fonts/Rubik/static/Rubik-Medium-41yl7SZ.ttf") format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rubik';
    src: url("../fonts/Rubik/static/Rubik-SemiBold-lo4G06E.ttf") format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rubik';
    src: url("../fonts/Rubik/static/Rubik-Bold-WGab2yj.ttf") format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rubik';
    src: url("../fonts/Rubik/static/Rubik-BoldItalic-SP54ATQ.ttf") format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Flex';
    src: url("../fonts/Roboto_Flex/RobotoFlex-VariableFont_GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght-vMWafJt.ttf") format('truetype-variations');
    font-weight: 100 1000;
    font-style: normal;
    font-display: swap;
}

:root {
    /* ─── Palette ───────────────────────────────────────────────────────── */
    --cv-bg:             #F7F4EE; /* fond global */
    --cv-surface:        #FFFDF9; /* cartes, tableaux, formulaires, modales */
    --cv-surface-alt:    #EEF3F2; /* zones secondaires */
    --cv-ink:            #25272A; /* texte principal */
    --cv-ink-rgb:        37, 39, 42;
    --cv-ink-muted:      #66716F; /* texte secondaire */

    --cv-coral:          #E85D4F; /* accent primaire — texte/bordures/badges sur fond clair (contraste OK), JAMAIS en fond plein avec texte blanc (3.44:1, sous les 4.5:1 AA) */
    --cv-coral-hover:    #C9473B; /* fond plein des boutons pleins + texte blanc (4.72:1, passe AA) */
    --cv-coral-strong:   #A8392F; /* hover/active des boutons pleins */
    --cv-coral-rgb:      232, 93, 79;

    --cv-blue:           #2F80ED; /* accent secondaire / focus / texte sur fond clair (contraste OK) */
    --cv-blue-soft:      #E7F0FF;
    --cv-blue-strong:    #1B6FD1; /* fond plein + texte blanc (4.95:1, passe AA) — le bleu de base ne passe pas (3.87:1) */
    --cv-blue-rgb:       47, 128, 237;

    --cv-success:        #2E9D67; /* texte/badges sur fond clair uniquement — 3.42:1 en fond plein + blanc, sous les 4.5:1 */
    --cv-warning:        #D99A2B; /* idem — 2.44:1 en fond plein + blanc, très insuffisant */
    --cv-warning-rgb:    217, 154, 43;
    --cv-error:          #D64545; /* texte/badges/bordures — 4.38:1 en fond plein + blanc, tout juste sous 4.5:1 */
    --cv-error-hover:    #B83232; /* fond plein + texte blanc (5.93:1, passe AA) */
    --cv-error-strong:   #9E2B2B; /* hover/active des boutons pleins */
    --cv-error-rgb:      214, 69, 69;

    --cv-border:         #DDE3E0;

    /* ─── Typographie ───────────────────────────────────────────────────── */
    --cv-font-display:   'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --cv-font-body:      'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* ─── Rayons / ombres / espacements ─────────────────────────────────── */
    --cv-radius-xs:      8px;
    --cv-radius-s:       12px;
    --cv-radius-m:       18px;
    --cv-radius-l:       28px;

    --cv-shadow-soft:    0 8px 24px rgba(37, 39, 42, 0.08);
    --cv-shadow-high:    0 18px 48px rgba(37, 39, 42, 0.14);
}

/* ─── Polices de contenu — sélecteur "police" du WYSIWYG ─────────────────
   Classes générées par Quill (attributeur "font" par défaut, class-based) et
   restreintes à cette whitelist exacte côté serveur par
   App\HtmlSanitizer\FontClassAttributeSanitizer. Chargées ici (et non dans
   wysiwyg.css) car elles doivent aussi s'appliquer au rendu public de
   l'article (article_content()), pas seulement dans l'éditeur back-office. */
.ql-font-inter         { font-family: 'Inter', system-ui, sans-serif; }
.ql-font-space-grotesk { font-family: 'Space Grotesk', system-ui, sans-serif; }
.ql-font-rubik         { font-family: 'Rubik', system-ui, sans-serif; }
.ql-font-roboto-flex   { font-family: 'Roboto Flex', system-ui, sans-serif; }
