/*
 * Charte de l'extranet : reprend celle du site corporate (groupemasprovence.com).
 * Toutes les couleurs vivent ici, en clair puis en sombre. Aucun composant n'utilise de couleur littérale.
 *
 * Thème : clair par défaut. Le sombre suit le système (prefers-color-scheme) sauf choix explicite
 * posé sur <html data-theme="light|dark"> par public/js/theme-init.js.
 */
:root {
    /* Surfaces et texte */
    --bg: #f6f8fb;
    --surface: #ffffff;
    --ink: #1c2a3b;
    --muted: #566579;
    --line: #dde4ed;

    /* Accent : bleu du site corporate. --accent-strong porte les fonds pleins et les liens (contraste AA). */
    --accent: #4975aa;
    --accent-strong: #3f6b9f;
    --accent-ink: #eef2f6;
    --accent-soft: #e4ecf6;

    /* États */
    --ok: #266b4d;
    --ok-soft: #e1f1ea;
    --warn: #7a5c14;
    --warn-soft: #f6efdc;
    --danger: #a8352d;
    --danger-soft: #f8e4e2;
    --info: #3f6b9f;
    --info-soft: #e4ecf6;

    /* Fond du logo : le logo est dessiné pour un fond blanc, y compris en thème sombre */
    --logo-bg: #ffffff;

    /* Voile posé sur la photo des pages d'authentification */
    --veil: rgba(20, 35, 55, 0.18);
    --shadow: 0 30px 70px -25px rgba(10, 25, 45, 0.45);
    --scrim: rgba(10, 20, 35, 0.45);

    /* Typographie : serif pour les titres, sans-serif pour le texte. Repli système si la police manque. */
    --font-display: "Cormorant Garamond", "Garamond", Georgia, serif;
    --font-body: "Montserrat", "Gilroy", system-ui, -apple-system, "Segoe UI", sans-serif;

    /* Formes */
    --radius-pill: 999px;
    --radius-card: 18px;
    --radius-field: 12px;

    /* Échelle d'espacement */
    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 0.75rem;
    --s-4: 1rem;
    --s-5: 1.5rem;
    --s-6: 2rem;
    --s-7: 3rem;
    --s-8: 4rem;

    --sidebar-width: 280px;
    --content-max: 1480px;
    --aside-width: 360px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #111923;
        --surface: #182331;
        --ink: #e6ecf3;
        --muted: #97a6b8;
        --line: #263548;

        --accent: #6f9bd0;
        --accent-strong: #6f9bd0;
        --accent-ink: #0f1a27;
        --accent-soft: #1f3148;

        --ok: #6cc59a;
        --ok-soft: #173126;
        --warn: #e0bf6a;
        --warn-soft: #3a3118;
        --danger: #f0928a;
        --danger-soft: #3b1f1d;
        --info: #8fb4e0;
        --info-soft: #1f3148;

        --veil: rgba(8, 14, 24, 0.58);
        --shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.7);
        --scrim: rgba(0, 0, 0, 0.6);

        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #111923;
    --surface: #182331;
    --ink: #e6ecf3;
    --muted: #97a6b8;
    --line: #263548;

    --accent: #6f9bd0;
    --accent-strong: #6f9bd0;
    --accent-ink: #0f1a27;
    --accent-soft: #1f3148;

    --ok: #6cc59a;
    --ok-soft: #173126;
    --warn: #e0bf6a;
    --warn-soft: #3a3118;
    --danger: #f0928a;
    --danger-soft: #3b1f1d;
    --info: #8fb4e0;
    --info-soft: #1f3148;

    --veil: rgba(8, 14, 24, 0.58);
    --shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.7);
    --scrim: rgba(0, 0, 0, 0.6);

    color-scheme: dark;
}
