/*
   FICHIER : theme-dark.css
   DESCRIPTION : Définition complète des variables du mode sombre pour l'interface Lucien.
   USAGE : À copier directement dans votre feuille de style globale ou section <style>.
*/

.dark-mode {
    /* --- 🎨 PALETTE LUCIEN (DARK OPTIMIZED) --- */
    /* Couleurs d'accentuation légèrement désaturées pour le confort visuel */
    --clr-red:    #e06b3e;
    --clr-green:  #2dbdb7;
    --clr-blue:   #2197c7;
    --clr-orange: #ffb326;
    --clr-multi:  linear-gradient(135deg, var(--clr-orange), var(--clr-green), var(--clr-blue));

    /* --- 🌑 NEUTRES & SURFACES --- */
    /* Note : On inverse la sémantique pour maintenir la cohérence des composants */
    --clr-white:  #1e1e1e; /* Fond de carte sombre */
    --clr-light:  #121212; /* Fond de page profond */
    --clr-dark:   #f5f5f5; /* Texte clair principal */

    --surface-0:  var(--clr-light);
    --surface-1:  var(--clr-white);
    --surface-2:  color-mix(in oklab, var(--clr-white) 80%, #ffffff 5%);

    /* --- 🩶 BORDURES & OMBRES --- */
    --clr-border:   rgba(255, 255, 255, 0.08);
    --clr-border-2: rgba(255, 255, 255, 0.12);
    --clr-shadow:   0 12px 26px rgba(0, 0, 0, 0.6);

    /* --- 🫧 GLASSMORPHISM --- */
    /* Effet "fumé" pour les surfaces flottantes */
    --glass-bg:     rgba(30, 30, 30, 0.6);
    --glass-bd:     rgba(255, 255, 255, 0.1);
    --glass-blur:   blur(25px) saturate(180%);
    --glass-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);

    /* --- 💊 VARIABLES PILLS & CHIPS --- */
    /* Utilisation de l'opacité pour laisser transparaître le fond sombre */
    --pill-blue-bg:    rgba(33, 151, 199, 0.2);
    --pill-green-bg:   rgba(45, 189, 183, 0.2);
    --pill-orange-bg:  rgba(255, 179, 38, 0.2);
    --pill-red-bg:     rgba(224, 107, 62, 0.2);

    /* --- 🧭 VARIABLES DE NAVIGATION (SYNCHRONISÉES) --- */
    --sidebar-width: 120px;
    --sidebar-bg: var(--clr-light);
    --sidebar-text: var(--clr-dark);
    --sidebar-text-active: var(--clr-blue);
    --sidebar-accent: color-mix(in oklab, var(--clr-blue) 15%, transparent);
    --sidebar-border: var(--clr-border);
    --sidebar-shadow: var(--clr-shadow);
    --sidebar-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* --- 🏗️ APPLICATION DES STYLES --- */
    background-color: var(--surface-0);
    color: var(--clr-dark);
}
.dark-mode body {
    background-color: var(--surface-0);
    color: var(--clr-dark);
}

.dark-mode :is(h1, h2, h3, h4, h5, h6, .title, .l-action__title, .l-mini-title) {
    background: var(--clr-multi);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Fix Émoticônes Mode Sombre */
.dark-mode :is(h1, h2, h3, h4, h5, h6, .title, .l-action__title, .l-mini-title) :is(span, i, em) {
    -webkit-text-fill-color: initial;
    background-clip: border-box;
    background: none;
    display: inline-block;
}

.dark-mode :is(p, div, td, li, span:not(.pill, .chip)) {
    color: rgba(245, 245, 245, 0.85);
}

/* Cards Mode Sombre */
.dark-mode .l-card {
    background: var(--surface-1);
    border: 1px solid var(--clr-border);
    box-shadow: var(--clr-shadow);
}

.dark-mode .l-card-blue   { background: rgba(33, 151, 199, 0.08) !important; border-color: rgba(33, 151, 199, 0.3) !important; }
.dark-mode .l-card-green  { background: rgba(45, 189, 183, 0.08) !important; border-color: rgba(45, 189, 183, 0.3) !important; }
.dark-mode .l-card-orange { background: rgba(255, 179, 38, 0.08) !important; border-color: rgba(255, 179, 38, 0.3) !important; }
.dark-mode .l-card-red    { background: rgba(224, 107, 62, 0.08) !important; border-color: rgba(224, 107, 62, 0.3) !important; }

/* Boutons Mode Sombre */
.dark-mode .l-btn-blue   { --btn-c: var(--clr-blue); }
.dark-mode .l-btn-green  { --btn-c: var(--clr-green); }
.dark-mode .l-btn-orange { --btn-c: var(--clr-orange); }
.dark-mode .l-btn-red    { --btn-c: var(--clr-red); }

.dark-mode [class*="l-btn-"] {
    background-color: var(--surface-2) !important;
    color: var(--btn-c) !important;
    border-color: var(--btn-c) !important;
}

.dark-mode .l-btn:hover {
    background-color: var(--btn-c) !important;
    color: var(--surface-0) !important;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

/* Pills Mode Sombre */
.dark-mode .pill-info,.pill-blue    { --p-c: var(--clr-blue);   background: var(--pill-blue-bg) !important; }
.dark-mode .pill-success,.pill-green   { --p-c: var(--clr-green);  background: var(--pill-green-bg) !important; }
.dark-mode .pill-warning,.pill-orange  { --p-c: var(--clr-orange); background: var(--pill-orange-bg) !important; }
.dark-mode .pill-fail,.pill-red     { --p-c: var(--clr-red);    background: var(--pill-red-bg) !important; }


.dark-mode .pill[class*="pill-"] {
    color: var(--p-c) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.dark-mode .pill[class*="pill-"]:hover {
    background-color: var(--p-c) !important;
    color: var(--surface-0) !important;
    border-color: var(--p-c) !important;
}