/* =========================================================
   ☀️ DESIGN SYSTEM : LUCIEN (LIGHT MODE)
   Version : 3.2 — Thème = tokens uniquement pour les composants

   Ce fichier définit les COULEURS et AMBIANCES du mode clair.
   Les composants .l-btn, .pill et .chip sont construits dans
   styleLucien.css (sections 07, 08, 08b) et se règlent ici
   uniquement via leurs tokens (--comp-*, --chip-*).
   ========================================================= */

:root {
    /* --- 🎨 PALETTE LUCIEN --- */
    --clr-red:    #d05627;
    --clr-green:  #259893;
    --clr-blue:   #107ba7;
    --clr-orange: #f5a311;
    --clr-multi:  linear-gradient(135deg, var(--clr-blue), var(--clr-green), var(--clr-orange));

    /* Dégradé "dense" : même palette, plus saturée, pour rester lisible sur le verre */
    --clr-multi-deep: linear-gradient(120deg,
        #0a6fb8 0%,     /* bleu Lucien, plus saturé */
        #0d9e95 50%,    /* vert Lucien, plus saturé */
        #f08a00 100%);  /* orange Lucien, plus profond */

    /* --- ⚪ NEUTRES & SURFACES --- */
    --clr-white:  #ffffff;
    --clr-light:  #f9f9f9;
    --clr-dark:   #111111;

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

    /* --- 🩶 BORDURES & OMBRES COMPOSITES --- */
    --clr-border:   color-mix(in oklab, var(--clr-dark) 8%, transparent);
    --clr-border-2: color-mix(in oklab, var(--clr-dark) 12%, transparent);

    --clr-shadow:
        0 1px 2px 0 color-mix(in oklab, var(--clr-dark) 4%, transparent),
        0 8px 24px -4px color-mix(in oklab, var(--clr-dark) 8%, transparent);

    /* --- 🔘💊🏷️ COMPOSANTS (l-btn, pill, chip) ---
       Réglages propres au mode clair. Voir styleLucien.css §07-08b. */
    --comp-neutral:     #64748b;                 /* pill sans couleur      */
    --comp-tint:        12%;                     /* fond teinté au repos   */
    --comp-tint-hover:  22%;                     /* fond teinté au survol  */
    --comp-border:      26%;                     /* bordure teintée        */
    --chip-checked-bg:  var(--clr-dark);         /* chip neutre cochée     */
    --chip-checked-fg:  var(--clr-white);

    /* --- 🫧 GLASSMORPHISM GÉNÉRIQUE --- */
    --glass-bg:     color-mix(in oklab, var(--clr-white) 22%, transparent);
    --glass-bd:     color-mix(in oklab, var(--clr-white) 55%, transparent);
    --glass-blur:   blur(25px) saturate(190%);
    --glass-shadow: 0 16px 40px color-mix(in oklab, var(--clr-dark) 10%, transparent);

    /* --- 💧 LIQUID GLASS CAPSULE MOBILE (Style iOS / visionOS) --- */
    --nav-bg-glass: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.32) 0%,
        rgba(255, 255, 255, 0.16) 45%,
        rgba(255, 255, 255, 0.08) 100%
    );
    --nav-border-glass: rgba(255, 255, 255, 0.45);
    --nav-blur: blur(28px) saturate(200%);
    --nav-shadow-glass:
        0 20px 42px -8px rgba(0, 0, 0, 0.28),
        0 2px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.85),
        inset 0 -1px 2px 0 rgba(0, 0, 0, 0.12);

    /* --- 🧭 NAVIGATION DESKTOP --- */
    --sidebar-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(249, 249, 249, 0.85) 100%);
    --sidebar-text: #64748b;
    --sidebar-text-active: var(--clr-blue);
    --sidebar-accent: color-mix(in oklab, var(--clr-blue) 9%, var(--clr-white));
    --sidebar-border: rgba(0, 0, 0, 0.06);
    --sidebar-shadow: 1px 0 12px 0 rgba(0, 0, 0, 0.03);
    --sidebar-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   🧭 BASE & TYPOGRAPHIE
   ========================================================= */

body {
    background-color: var(--surface-0);
    color: color-mix(in oklab, var(--clr-dark) 96%, transparent);
    -webkit-font-smoothing: antialiased;
    font-family: var(--ff-main) !important;
}

:is(h1, h2, h3, .title, .welcome-message h5) {
    background: var(--clr-multi);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

:is(h4, h5, h6, .l-action__title, .l-mini-title) {
    color: color-mix(in oklab, var(--clr-dark) 94%, transparent);
    -webkit-text-fill-color: initial;
    background: none;
}

:is(h1, h2, h3, .title, .welcome-message h5) :is(span, i, em, .emoji) {
    -webkit-text-fill-color: initial;
    background-clip: border-box;
    background: none;
    display: inline-block;
}

/* Couleur de texte par défaut — les composants gardent la leur */
p, div, td, li, span:not(.pill, .chip, .l-btn) {
    color: color-mix(in oklab, var(--clr-dark) 94%, transparent);
}

.text-muted, .l-muted {
    color: color-mix(in oklab, var(--clr-dark) 72%, transparent) !important;
}

a:not(.btn, .l-btn, .pill, .chip, .sidebar-link) {
    color: var(--clr-blue);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}
a:not(.btn, .l-btn, .pill, .chip, .sidebar-link):hover {
    color: color-mix(in oklab, var(--clr-blue) 80%, black);
}

/* =========================================================
   🍱 ACCUEIL — TITRES DES BENTOS
   Dégradé saturé, limité à la largeur du texte.
   Relief via drop-shadow (AUTOUR des lettres) : un text-shadow
   passerait PAR-DESSUS le dégradé et le délaverait.
   ========================================================= */

.bento-text .title {
    background: var(--clr-multi-deep);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none !important;
    width: fit-content;
    max-width: 100%;
    filter:
        drop-shadow(0 1px 0 rgba(255, 255, 255, 0.85))
        drop-shadow(0 2px 4px rgba(16, 40, 60, 0.18));
}

/* =========================================================
   🃏 CARDS (L-CARD)
   ========================================================= */

.l-card {
    background: var(--surface-1);
    border-color: var(--clr-border);
    box-shadow: var(--clr-shadow);
}

.l-card-blue   { background: color-mix(in oklab, var(--clr-blue) 6%, var(--surface-1)) !important;   border-color: color-mix(in oklab, var(--clr-blue) 22%, transparent); }
.l-card-green  { background: color-mix(in oklab, var(--clr-green) 6%, var(--surface-1)) !important;  border-color: color-mix(in oklab, var(--clr-green) 22%, transparent); }
.l-card-orange { background: color-mix(in oklab, var(--clr-orange) 6%, var(--surface-1)) !important; border-color: color-mix(in oklab, var(--clr-orange) 22%, transparent); }
.l-card-red    { background: color-mix(in oklab, var(--clr-red) 6%, var(--surface-1)) !important;    border-color: color-mix(in oklab, var(--clr-red) 22%, transparent); }

.l-card-action:hover {
    transform: translateY(-3px);
    box-shadow:
        0 2px 4px 0 color-mix(in oklab, var(--clr-dark) 4%, transparent),
        0 14px 30px -4px color-mix(in oklab, var(--clr-dark) 12%, transparent);
}

.l-card-action.l-card-blue:hover   { background: var(--clr-blue) !important;   color: var(--clr-white) !important; border-color: var(--clr-blue); }
.l-card-action.l-card-green:hover  { background: var(--clr-green) !important;  color: var(--clr-white) !important; border-color: var(--clr-green); }
.l-card-action.l-card-orange:hover { background: var(--clr-orange) !important; color: var(--clr-white) !important; border-color: var(--clr-orange); }
.l-card-action.l-card-red:hover    { background: var(--clr-red) !important;    color: var(--clr-white) !important; border-color: var(--clr-red); }

.l-card-action:hover :is(div, p, span, h1, h2, h3, h4, h5, h6, i) {
    color: var(--clr-white) !important;
    -webkit-text-fill-color: var(--clr-white) !important;
}

.l-card__header { border-bottom-color: var(--clr-border); }
.l-card__footer { border-top-color: var(--clr-border); }

/* =========================================================
   🧭 NAVIGATION & SIDEBAR
   ========================================================= */

.sidebar {
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: var(--sidebar-shadow);
}

.sidebar-link {
    color: var(--sidebar-text);
    transition: var(--sidebar-transition);
}

.sidebar-link:hover {
    background: var(--sidebar-accent);
    color: var(--sidebar-text-active);
    transform: translateY(-1px);
}

.sidebar-link.active {
    background: color-mix(in oklab, var(--clr-blue) 12%, var(--clr-white));
    color: var(--clr-blue) !important;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.8),
                0 4px 12px -2px color-mix(in oklab, var(--clr-blue) 22%, transparent);
    border: 1px solid color-mix(in oklab, var(--clr-blue) 25%, transparent);
}

.sidebar-link.active::before {
    content: "";
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    border-radius: var(--radius-full);
    background: var(--clr-blue);
}

.sidebar-theme-toggle {
    color: var(--sidebar-text);
    transition: var(--sidebar-transition);
}
.sidebar-theme-toggle:hover {
    background: var(--sidebar-accent);
    color: var(--sidebar-text-active);
}

/* Capsule Verre Liquide Mobile */
.bottom-nav,
.navbar.fixed-bottom {
    background: var(--nav-bg-glass) !important;
    border: 1px solid var(--nav-border-glass) !important;
    box-shadow: var(--nav-shadow-glass) !important;
    backdrop-filter: var(--nav-blur) !important;
    -webkit-backdrop-filter: var(--nav-blur) !important;
    border-radius: 999px !important;
    padding: 6px 10px !important;
}

.bottom-nav .nav-link,
.navbar.fixed-bottom .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    border-radius: 999px !important;
    padding: 5px 12px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav .nav-link:hover,
.navbar.fixed-bottom .nav-link:hover {
    color: #ffffff !important;
}

.bottom-nav .nav-link.active,
.navbar.fixed-bottom .nav-link.active {
    background: rgba(0, 0, 0, 0.45) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow:
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

.bottom-nav .nav-link.active i,
.bottom-nav .nav-link.active span,
.navbar.fixed-bottom .nav-link.active i,
.navbar.fixed-bottom .nav-link.active span {
    color: #ffffff !important;
}

.bottom-nav .pastille-rouge {
    background-color: var(--clr-red);
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--clr-red) 45%, transparent);
}

/* =========================================================
   🧾 FORMULAIRES & TABLES
   ========================================================= */

.form-control, .form-select {
    background: var(--surface-1) !important;
    border: 1px solid var(--clr-border-2);
    color: color-mix(in oklab, var(--clr-dark) 94%, transparent);
}
.form-control:focus, .form-select:focus {
    border-color: var(--clr-blue);
    box-shadow: 0 0 0 3.5px color-mix(in oklab, var(--clr-blue) 15%, transparent);
}

form h4 {
    border-left-color: var(--clr-blue);
    background: color-mix(in oklab, var(--clr-blue) 7%, transparent);
    color: var(--clr-blue);
}

form .section-box {
    border-color: var(--clr-border);
    background: color-mix(in oklab, var(--clr-white) 60%, transparent);
}

.l-table-wrap {
    background: var(--surface-1);
    border: 1px solid var(--clr-border);
    box-shadow: var(--clr-shadow);
}
.l-table thead th {
    background: color-mix(in oklab, var(--clr-blue) 5%, var(--clr-white));
    color: var(--clr-blue);
    border-bottom: 1px solid var(--clr-border-2);
}
.table-active {
    border-left-color: var(--clr-blue);
}

.l-divider {
    background: var(--clr-border-2);
}

/* =========================================================
   ☀️ PAGES SPÉCIFIQUES
   ========================================================= */

.login-page {
    background: radial-gradient(at 10% 10%, color-mix(in oklab, var(--clr-blue) 20%, white), transparent),
                linear-gradient(135deg, var(--clr-blue), var(--clr-green));
}
.login-card {
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.18);
}