/* ==========================================================================
   stylesheet_colors.css — Toutes les variables couleur de Mediscribe
   ==========================================================================
   Chargé en permanence. Contient :
     • Gammes fixes (gris, rouge, vert, tags, calendrier) — :root global
     • Gammes thème (colortempl) — :root[data-theme="xxx"]

   Pour créer un nouveau thème :
     1. Ajouter un bloc :root[data-theme="xxx"] { … } en bas de ce fichier
     2. Redéfinir les 8 crans colortempl1→8 (clair → foncé)
     3. Ajouter le thème dans $themes (settings_colors.php)
        et dans MS_ALLOWED_THEMES (app_bootstrap.php)
   ========================================================================== */


/* ==========================================================================
   GAMMES FIXES — indépendantes du thème
   ========================================================================== */

:root {

    /* ------------------------------------------------------------------
       GAMME GRIS — Neutre
       gris1 = fond page très clair  …  gris8 = quasi-noir
       ------------------------------------------------------------------ */
    --gris1: #f8fafc;   /* fond page, bg global                          */
    --gris2: #f1f5f9;   /* fond subtil, header cartes                    */
    --gris3: #e2e8f0;   /* bordures, séparateurs                         */
    --gris4: #cbd5e1;   /* bordures renforcées                           */
    --gris5: #94a3b8;   /* icônes, texte désactivé, badge récup          */
    --gris6: #475569;   /* texte secondaire                              */
    --gris7: #334155;   /* texte principal                               */
    --gris8: #0f172a;   /* texte très foncé, topbar titre                */

    /* ------------------------------------------------------------------
       GAMME ROUGE — Danger / alerte
       rouge1 = tinte très claire  …  rouge8 = rouge très foncé
       ------------------------------------------------------------------ */
    --rouge1: #fff1f2;   /* fond alerte très léger                       */
    --rouge2: #fee2e2;   /* fond alerte, proto-missing fond              */
    --rouge3: #fca5a5;   /* bordure alerte                               */
    --rouge4: #f87171;   /* accent rouge moyen-clair                     */
    --rouge5: #ef4444;   /* accent rouge moyen                           */
    --rouge6: #dc2626;   /* texte danger principal                       */
    --rouge7: #b91c1c;   /* texte danger renforcé                        */
    --rouge8: #991b1b;   /* texte danger très foncé, proto-missing text  */

    /* ------------------------------------------------------------------
       GAMME VERT — Validation / succès (fixe, indépendant du thème)
       vert1 = fond quasi-blanc  …  vert8 = vert très foncé
       Utilisé par : cert-status.ok, proto-var-done, text-validation,
       settings save feedback, admin status, bouton_vert_A/B/C
       ------------------------------------------------------------------ */
    --vert1: #f0fdf4;   /* fond très clair                               */
    --vert2: #dcfce7;   /* fond clair — proto-done fond                  */
    --vert3: #bbf7d0;   /* fond vert clair (ex vert-validation1)         */
    --vert4: #86efac;   /* bordure verte claire                          */
    --vert5: #4ade80;   /* bordure verte (ex vert-validation2)           */
    --vert6: #16a34a;   /* accent vert vif                               */
    --vert7: #15803d;   /* texte / icône vert foncé (ex vert-validation3)*/
    --vert8: #14532d;   /* texte vert très foncé                         */

    /* ------------------------------------------------------------------
       PROTO-VARIABLES SmartText — couleurs fixes
       ------------------------------------------------------------------ */

    /* Variable automatique (bleu) */
    --bleu-tag1: #E6F1FB;   /* proto-var-auto — fond                    */
    --bleu-tag2: #185FA5;   /* proto-var-auto — texte / bordure         */

    /* Variable manuelle (orange) */
    --orange-tag1: #FAEEDA;   /* proto-var-manual — fond                */
    --orange-tag2: #BA7517;   /* proto-var-manual — texte / bordure     */

    /* ------------------------------------------------------------------
       CALENDRIER — événements (couleurs fixes sémantiques)
       ------------------------------------------------------------------ */

    /* Intervention (bleu ciel) */
    --cal-interv1: #e0f2fe;   /* fond                                   */
    --cal-interv2: #0369a1;   /* texte                                  */

    /* Garde (violet) */
    --cal-garde1: #ede9fe;    /* fond                                   */
    --cal-garde2: #6d28d9;    /* texte                                  */

    /* Consultation (vert fixe, indépendant du thème colortempl) */
    --cal-consult1: #dcfce7;  /* fond                                   */
    --cal-consult2: #15803d;  /* texte                                  */

    /* ------------------------------------------------------------------
       DIVERS
       ------------------------------------------------------------------ */
    --jaune-star: #facc15;   /* étoile hôpital favori                   */

    --white: #ffffff;
    --black: #000000;
}


/* ==========================================================================
   GAMMES THÈME — colortempl1→8 selon data-theme sur <html>
   ========================================================================== */

/* ------------------------------------------------------------------
   VERT (défaut)
   ------------------------------------------------------------------ */
:root[data-theme="green"],
:root:not([data-theme]) {
    --colortempl1: #f9fdfb;
    --colortempl2: #e6f4ef;
    --colortempl3: #dcfce7;
    --colortempl4: #bfe9db;
    --colortempl5: #5fd0b2;
    --colortempl6: #10b981;
    --colortempl7: #0f766e;
    --colortempl8: #064e3b;
}

/* ------------------------------------------------------------------
   BLEU
   ------------------------------------------------------------------ */
:root[data-theme="blue"] {
    --colortempl1: #f0f9ff;
    --colortempl2: #e0f2fe;
    --colortempl3: #bae6fd;
    --colortempl4: #7dd3fc;
    --colortempl5: #38bdf8;
    --colortempl6: #0ea5e9;
    --colortempl7: #0369a1;
    --colortempl8: #0c4a6e;
}

/* ------------------------------------------------------------------
   BEIGE
   ------------------------------------------------------------------ */
:root[data-theme="beige"] {
    --colortempl1: #fdfaf6;
    --colortempl2: #f5ede0;
    --colortempl3: #e8d5bc;
    --colortempl4: #d4b896;
    --colortempl5: #b8926a;
    --colortempl6: #9a6f47;
    --colortempl7: #7a5230;
    --colortempl8: #4e3118;
}

/* ------------------------------------------------------------------
   ORANGE
   ------------------------------------------------------------------ */
:root[data-theme="orange"] {
    --colortempl1: #fffbf5;
    --colortempl2: #fff0d6;
    --colortempl3: #fde8b4;
    --colortempl4: #fcd08a;
    --colortempl5: #f59e42;
    --colortempl6: #ea7c0a;
    --colortempl7: #b85c04;
    --colortempl8: #7c3a00;
}

/* ------------------------------------------------------------------
   MAUVE
   ------------------------------------------------------------------ */
:root[data-theme="mauve"] {
    --colortempl1: #faf8ff;
    --colortempl2: #f0ebff;
    --colortempl3: #e2d9ff;
    --colortempl4: #c9b8ff;
    --colortempl5: #9b7ef8;
    --colortempl6: #7c4dff;
    --colortempl7: #5a2de0;
    --colortempl8: #34197a;
}