/* ==========================================================================
   NAOTERA — Dark mode global
   Remappe les utilitaires Tailwind « light » et les cartes métier en #fff.
   Charger EN DERNIER pour passer après les <style> de page.
   ========================================================================== */

[data-theme="dark"] {
  color-scheme: dark;
  --marge-positive: #4ADE80;
  --marge-serree: #FBBF24;
  --marge-negative: #F87171;
}

[data-theme="dark"] a.btn-primary,
[data-theme="dark"] a.btn-danger,
[data-theme="dark"] a.btn-success,
[data-theme="dark"] a.btn-ch-terrain,
[data-theme="dark"] a.btn-ch-accent,
[data-theme="dark"] a.btn-ch-primary {
  color: #fff !important;
}
[data-theme="dark"] a.btn-secondary,
[data-theme="dark"] a.btn-ghost {
  color: var(--color-text) !important;
}
[data-theme="dark"] a.nt-nav-link { color: rgba(255,255,255,0.65) !important; }
[data-theme="dark"] a.nt-nav-link:hover,
[data-theme="dark"] a.nt-nav-link.is-active { color: #fff !important; }
[data-theme="dark"] a.nt-bottom-tab { color: var(--color-text-muted) !important; }
[data-theme="dark"] a.nt-bottom-tab.is-active { color: var(--color-accent) !important; }
[data-theme="dark"] a.flux-zone-tab { color: var(--color-text-secondary) !important; }
[data-theme="dark"] a.flux-zone-tab.is-active { color: var(--color-text) !important; }

/* ── Tailwind : fonds clairs ── */
[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-slate-50,
[data-theme="dark"] .bg-slate-100,
[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .bg-gray-100,
[data-theme="dark"] .bg-zinc-50,
[data-theme="dark"] .bg-stone-50,
[data-theme="dark"] .bg-neutral-50 {
  background-color: var(--color-surface-raised) !important;
}

[data-theme="dark"] .hover\:bg-slate-50:hover,
[data-theme="dark"] .hover\:bg-slate-100:hover,
[data-theme="dark"] .hover\:bg-gray-50:hover,
[data-theme="dark"] .hover\:bg-white:hover {
  background-color: var(--color-surface) !important;
}

[data-theme="dark"] .bg-rose-50 { background-color: color-mix(in srgb, var(--status-panne) 14%, var(--color-surface-raised)) !important; }
[data-theme="dark"] .bg-amber-50,
[data-theme="dark"] .bg-orange-50,
[data-theme="dark"] .bg-yellow-50 { background-color: color-mix(in srgb, var(--status-maintenance) 14%, var(--color-surface-raised)) !important; }
[data-theme="dark"] .bg-emerald-50,
[data-theme="dark"] .bg-green-50 { background-color: color-mix(in srgb, var(--status-disponible) 14%, var(--color-surface-raised)) !important; }
[data-theme="dark"] .bg-sky-50,
[data-theme="dark"] .bg-blue-50,
[data-theme="dark"] .bg-brand-50 { background-color: color-mix(in srgb, var(--status-affecte) 14%, var(--color-surface-raised)) !important; }

/* ── Tailwind : textes ── */
[data-theme="dark"] .text-slate-900,
[data-theme="dark"] .text-slate-800,
[data-theme="dark"] .text-gray-900,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-zinc-900,
[data-theme="dark"] .text-stone-900,
[data-theme="dark"] .text-neutral-900 {
  color: var(--color-text) !important;
}
[data-theme="dark"] .text-slate-700,
[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-600 {
  color: var(--color-text-secondary) !important;
}
[data-theme="dark"] .text-slate-500,
[data-theme="dark"] .text-slate-400,
[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-400 {
  color: var(--color-text-muted) !important;
}
[data-theme="dark"] .text-inherit { color: inherit !important; }
[data-theme="dark"] .text-rose-800,
[data-theme="dark"] .text-rose-700,
[data-theme="dark"] .text-red-800,
[data-theme="dark"] .text-red-700 { color: #FCA5A5 !important; }
[data-theme="dark"] .text-amber-800,
[data-theme="dark"] .text-amber-700,
[data-theme="dark"] .text-orange-800,
[data-theme="dark"] .text-yellow-800 { color: #FCD34D !important; }
[data-theme="dark"] .text-emerald-800,
[data-theme="dark"] .text-emerald-700,
[data-theme="dark"] .text-green-800 { color: #6EE7B7 !important; }
[data-theme="dark"] .text-blue-800,
[data-theme="dark"] .text-brand-800,
[data-theme="dark"] .text-sky-800 { color: #93C5FD !important; }

/* ── Tailwind : bordures / séparateurs ── */
[data-theme="dark"] .border-slate-200,
[data-theme="dark"] .border-slate-100,
[data-theme="dark"] .border-slate-300,
[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-gray-100,
[data-theme="dark"] .border-gray-300,
[data-theme="dark"] .divide-slate-200 > :not([hidden]) ~ :not([hidden]),
[data-theme="dark"] .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
[data-theme="dark"] .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: var(--color-border) !important;
}
[data-theme="dark"] .ring-slate-200,
[data-theme="dark"] .ring-gray-200 {
  --tw-ring-color: var(--color-border);
}

/* ── Champs natifs + plugin forms ── */
[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="file"]):not([type="color"]),
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .input,
[data-theme="dark"] .select,
[data-theme="dark"] .textarea,
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: var(--color-surface-raised) !important;
  color: var(--color-text) !important;
  border-color: var(--color-border) !important;
  color-scheme: dark;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: var(--color-text-muted);
}
[data-theme="dark"] option,
[data-theme="dark"] optgroup {
  background-color: var(--color-surface-raised);
  color: var(--color-text);
}

/* ── Tableaux ── */
[data-theme="dark"] table thead th {
  background-color: var(--color-surface) !important;
  color: var(--color-text-secondary) !important;
  border-color: var(--color-border) !important;
}
[data-theme="dark"] table td,
[data-theme="dark"] table th {
  border-color: var(--color-border) !important;
  color: var(--color-text) !important;
}
[data-theme="dark"] tbody tr:nth-child(even) {
  background-color: color-mix(in srgb, var(--color-surface) 55%, transparent);
}

/* ── Carte Leaflet ── */
[data-theme="dark"] .leaflet-container {
  background: var(--color-surface);
}
[data-theme="dark"] .leaflet-tile {
  filter: invert(88%) hue-rotate(180deg) brightness(0.92) saturate(0.55);
}
[data-theme="dark"] .leaflet-control-zoom a,
[data-theme="dark"] .leaflet-control-attribution,
[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip {
  background-color: var(--color-surface-raised);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

/* ── Cartes / sections métier en #fff ── */
[data-theme="dark"] .rp-card,
[data-theme="dark"] .rp-kpi,
[data-theme="dark"] .rp-empty,
[data-theme="dark"] .rp-terminees-table-wrap,
[data-theme="dark"] .rp-kanban-count,
[data-theme="dark"] .tr-section,
[data-theme="dark"] .tr-empty,
[data-theme="dark"] .tr-alert,
[data-theme="dark"] .tr-veh-card,
[data-theme="dark"] .re-kpi,
[data-theme="dark"] .re-section,
[data-theme="dark"] .re-empty,
[data-theme="dark"] .am-info-card,
[data-theme="dark"] .am-qr-card,
[data-theme="dark"] .am-historique-section,
[data-theme="dark"] .rf-card,
[data-theme="dark"] .ef-section,
[data-theme="dark"] .ef-input,
[data-theme="dark"] .ef-select,
[data-theme="dark"] .ef-textarea,
[data-theme="dark"] .ef-table,
[data-theme="dark"] .ef-empty,
[data-theme="dark"] .vf-section,
[data-theme="dark"] .vf-input,
[data-theme="dark"] .vf-select,
[data-theme="dark"] .vf-textarea,
[data-theme="dark"] .vf-qr-strip,
[data-theme="dark"] .vf-upload-form,
[data-theme="dark"] .vf-carbu-form,
[data-theme="dark"] .vf-table,
[data-theme="dark"] .vf-pneus-form,
[data-theme="dark"] .vf-pneu-empty,
[data-theme="dark"] .vf-kpi,
[data-theme="dark"] .vf-rep-card,
[data-theme="dark"] .af-filter-form,
[data-theme="dark"] .af-panel,
[data-theme="dark"] .af-select,
[data-theme="dark"] .af-input,
[data-theme="dark"] .pg-kpi,
[data-theme="dark"] .pg-table-wrap,
[data-theme="dark"] .rs-kpi,
[data-theme="dark"] .rs-demande-card,
[data-theme="dark"] .rs-table-wrap,
[data-theme="dark"] .sc-input,
[data-theme="dark"] .sc-type-active,
[data-theme="dark"] .tm-card,
[data-theme="dark"] .tm-tile,
[data-theme="dark"] .tm-empty,
[data-theme="dark"] .tm-modal .panel,
[data-theme="dark"] .tm-modal .cmd-sticky-bar,
[data-theme="dark"] .tm-btn-add,
[data-theme="dark"] .lv-view-toggle,
[data-theme="dark"] .lv-empty,
[data-theme="dark"] .lv-textarea,
[data-theme="dark"] .lv-rot-kpi,
[data-theme="dark"] .kpi-empty,
[data-theme="dark"] .rot-btn-secondary,
[data-theme="dark"] .rot-live-card,
[data-theme="dark"] .rot-kpi,
[data-theme="dark"] .rot-hero-empty,
[data-theme="dark"] .lv-rot-history-item,
[data-theme="dark"] .rfa-btn--ghost,
[data-theme="dark"] .hub-panel,
[data-theme="dark"] .cmd-hub-panel,
[data-theme="dark"] .chantier-suivi-item,
[data-theme="dark"] .nt-camera-burst-stop {
  background-color: var(--color-surface-raised) !important;
  border-color: var(--color-border) !important;
  color: var(--color-text);
}

[data-theme="dark"] .ef-input,
[data-theme="dark"] .ef-select,
[data-theme="dark"] .ef-textarea,
[data-theme="dark"] .vf-input,
[data-theme="dark"] .vf-select,
[data-theme="dark"] .vf-textarea,
[data-theme="dark"] .af-select,
[data-theme="dark"] .af-input,
[data-theme="dark"] .sc-input,
[data-theme="dark"] .lv-textarea {
  color: var(--color-text) !important;
}

[data-theme="dark"] .rf-btn-ghost,
[data-theme="dark"] .rfa-btn--ghost,
[data-theme="dark"] .rs-btn-secondary,
[data-theme="dark"] .lv-btn-outline-danger,
[data-theme="dark"] .lv-btn-outline-warn,
[data-theme="dark"] .lv-btn-outline-success {
  background-color: var(--color-surface-raised) !important;
}

[data-theme="dark"] .re-table thead th,
[data-theme="dark"] .re-table tfoot td,
[data-theme="dark"] .pg-table th,
[data-theme="dark"] .vf-table th,
[data-theme="dark"] .ef-table th {
  background-color: var(--color-surface) !important;
  color: var(--color-text-secondary);
}

/* Titres / KPI en bleu marine figé (#0F2E6A) */
[data-theme="dark"] [class$="-page-title"],
[data-theme="dark"] [class$="-kpi-val"],
[data-theme="dark"] [class$="-kpi-value"],
[data-theme="dark"] [class$="-recap-val"],
[data-theme="dark"] [class*="-td-immat"] a,
[data-theme="dark"] [class$="-card-immat"],
[data-theme="dark"] .pf-title,
[data-theme="dark"] .av-val-mono,
[data-theme="dark"] .re-section-title,
[data-theme="dark"] .rfa-panel-title,
[data-theme="dark"] .diag-card h2,
[data-theme="dark"] .mec-card-title,
[data-theme="dark"] .mec-card,
[data-theme="dark"] .mec-dl dd,
[data-theme="dark"] .or-now h2,
[data-theme="dark"] .or-associee,
[data-theme="dark"] .or-ctx-nav {
  color: var(--color-text) !important;
}

[data-theme="dark"] .mec-card,
[data-theme="dark"] .diag-card,
[data-theme="dark"] .or-associee,
[data-theme="dark"] .or-ctx-nav,
[data-theme="dark"] .or-fil,
[data-theme="dark"] .at-empty {
  background-color: var(--color-surface-raised) !important;
  border-color: var(--color-border) !important;
}

[data-theme="dark"] .pg-page-sub,
[data-theme="dark"] .rot-page-sub,
[data-theme="dark"] .pg-kpi-lbl,
[data-theme="dark"] .rot-kpi-lbl,
[data-theme="dark"] .rp-kpi-lbl {
  color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .pg-btn-secondary,
[data-theme="dark"] .rot-btn-secondary,
[data-theme="dark"] .rp-btn-secondary,
[data-theme="dark"] .vf-btn-secondary {
  background-color: var(--color-surface) !important;
  color: var(--color-text) !important;
  border-color: var(--color-border) !important;
}

[data-theme="dark"] .pg-table td,
[data-theme="dark"] .vf-table td,
[data-theme="dark"] .ef-table td {
  border-color: var(--color-border) !important;
  color: var(--color-text);
}

[data-theme="dark"] .pg-badge-green { background: #14532D !important; color: #86EFAC !important; }
[data-theme="dark"] .pg-badge-blue { background: #1E3A8A !important; color: #93C5FD !important; }
[data-theme="dark"] .pg-badge-violet { background: #4C1D95 !important; color: #DDD6FE !important; }
[data-theme="dark"] .pg-badge-amber { background: #78350F !important; color: #FCD34D !important; }
[data-theme="dark"] .pg-badge-rose { background: #7F1D1D !important; color: #FCA5A5 !important; }
[data-theme="dark"] .pg-badge-slate { background: #334155 !important; color: #E2E8F0 !important; }
[data-theme="dark"] .pg-text-amber { color: #FCD34D !important; }
[data-theme="dark"] .pg-text-rose { color: #FCA5A5 !important; }

/* ── Fiche chantier ── */
[data-theme="dark"] .ch-statut-form--hero .ch-statut-select option,
[data-theme="dark"] .cmd-hub,
[data-theme="dark"] .hub-panel {
  background-color: var(--color-surface-raised);
  color: var(--color-text);
}

/* ── Scrollbar ── */
[data-theme="dark"] {
  scrollbar-color: var(--color-border) var(--color-surface);
}
[data-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--color-surface); }
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 999px;
}

/* ── Encre jour figée (navy/slate) encore présente dans les <style> de page ── */
[data-theme="dark"] :is(
  [class*="-title"],
  [class*="-titre"],
  [class*="-nom"],
  [class*="-name"],
  [class*="-val"],
  [class*="-value"],
  [class*="-ref"],
  [class*="-immat"],
  [class*="-desc"],
  [class*="-num"],
  [class*="-label"],
  [class*="-info"] strong,
  [class*="-meta-val"],
  [class*="-kpi-val"],
  [class*="-page-title"],
  [class*="-section-title"]
):not([class*="badge"]):not([class*="btn"]):not([class*="chip"]):not([class*="tag"]):not([class*="pill"]):not([class*="header"]):not([class*="hero"]):not(.text-white):not(.ch-hero-ref):not(.ch-cta-rapport):not(.lv-kpi-val) {
  color: var(--color-text) !important;
}

[data-theme="dark"] :is(
  [class*="-sub"],
  [class*="-hint"],
  [class*="-meta"],
  [class*="-muted"],
  [class*="-addr"],
  [class*="-lieu"],
  [class*="-chantier"],
  .muted
):not([class*="badge"]):not([class*="btn"]):not([class*="header"]) {
  color: var(--color-text-secondary) !important;
}

[data-theme="dark"] :is(
  [class*="-card"]:not([class*="header"]):not([class*="title"]):not([class*="body"]):not([class*="icon"]),
  [class*="-panel"]:not([class*="title"]):not([class*="head"]),
  [class*="-section"]:not([class*="title"]),
  [class*="-empty"],
  [class*="-kpi"]:not([class*="val"]):not([class*="lbl"]),
  [class*="-modal"]:not([class*="title"]):not([class*="close"]),
  [class*="-table-wrap"],
  .flux-kanban-card,
  .flux-kanban-col,
  .lv-card,
  .lv-modal,
  .lv-view-toggle,
  .tm-card,
  .tm-tile
):not([class*="badge"]):not([class*="btn"]):not([class*="--"]) {
  background-color: var(--color-surface-raised) !important;
  border-color: var(--color-border) !important;
}

[data-theme="dark"] [style*="color:#0F172A"],
[data-theme="dark"] [style*="color: #0F172A"],
[data-theme="dark"] [style*="color:#0f172a"],
[data-theme="dark"] [style*="color: #0f172a"],
[data-theme="dark"] [style*="color:#1E293B"],
[data-theme="dark"] [style*="color: #1E293B"],
[data-theme="dark"] [style*="color:#1e293b"],
[data-theme="dark"] [style*="color: #1e293b"],
[data-theme="dark"] [style*="color:#0F2E6A"],
[data-theme="dark"] [style*="color: #0F2E6A"],
[data-theme="dark"] [style*="color:#1A1917"],
[data-theme="dark"] [style*="color: #1A1917"] {
  color: var(--color-text) !important;
}
[data-theme="dark"] [style*="color:#334155"],
[data-theme="dark"] [style*="color: #334155"] {
  color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .bg-white\/80,
[data-theme="dark"] .bg-white\/90,
[data-theme="dark"] .bg-white\/95,
[data-theme="dark"] .bg-slate-200,
[data-theme="dark"] .bg-gray-200 {
  background-color: var(--color-surface-raised) !important;
}
[data-theme="dark"] .text-slate-950,
[data-theme="dark"] .text-gray-950 {
  color: var(--color-text) !important;
}

[data-theme="dark"] .alert-info {
  color: var(--color-primary-fg) !important;
}

[data-theme="dark"] .pf-hero-grid,
[data-theme="dark"] .pf-meta-item,
[data-theme="dark"] .av-info-card,
[data-theme="dark"] .av-cle-section {
  background-color: var(--color-surface-raised) !important;
  border-color: var(--color-border) !important;
}
[data-theme="dark"] .pf-meta-item,
[data-theme="dark"] .av-cle-section {
  background-color: var(--color-surface) !important;
}

/* Chrome coloré (header chauffeur, etc.) : garder le texte blanc */
[data-theme="dark"] .lv-header :is([class*="-title"], [class*="-val"], [class*="-lbl"], [class*="-date"], [class*="-count"]),
[data-theme="dark"] .lv-header-title,
[data-theme="dark"] .lv-header-date,
[data-theme="dark"] .lv-header-count,
[data-theme="dark"] .lv-header-flux,
[data-theme="dark"] .lv-kpi-val,
[data-theme="dark"] .lv-kpi-lbl {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

[data-theme="dark"] .text-brand-700,
[data-theme="dark"] .text-brand-600,
[data-theme="dark"] .hover\:text-brand-700:hover {
  color: #93C5FD !important;
}

[data-theme="dark"] [class*="bg-slate-50/"],
[data-theme="dark"] [class*="bg-gray-50/"],
[data-theme="dark"] [class*="bg-white/"] {
  background-color: var(--color-surface) !important;
}
[data-theme="dark"] [class*="bg-brand-50/"] {
  background-color: color-mix(in srgb, var(--status-affecte) 16%, var(--color-surface-raised)) !important;
}

[data-theme="dark"] .ch-hero,
[data-theme="dark"] .ch-hero :is(h1, h2, a, span, p, small, strong),
[data-theme="dark"] .ch-hero-ref,
[data-theme="dark"] .ch-cta-rapport,
[data-theme="dark"] .ch-cta-rapport__label,
[data-theme="dark"] .ch-hero .btn-ch,
[data-theme="dark"] .ch-hero .btn-ch-ghost,
[data-theme="dark"] .ch-hero .nt-badge {
  color: #fff !important;
}

[data-theme="dark"] .pv-kpi-green .pv-kpi-val { color: #34D399 !important; }
[data-theme="dark"] .pv-kpi-blue .pv-kpi-val { color: #93C5FD !important; }
[data-theme="dark"] .pv-kpi-rose .pv-kpi-val { color: #FB7185 !important; }
[data-theme="dark"] .pv-btn-secondary {
  background-color: var(--color-surface) !important;
  color: var(--color-text) !important;
  border-color: var(--color-border) !important;
}
[data-theme="dark"] .pv-tab { color: var(--color-text-secondary) !important; }
[data-theme="dark"] .pv-tab-active { color: var(--color-primary-fg) !important; }
[data-theme="dark"] .pv-tab-count {
  background: var(--color-surface) !important;
  color: var(--color-text-secondary) !important;
}
[data-theme="dark"] .pv-group-brand { background: #1E3A8A !important; color: #93C5FD !important; }
[data-theme="dark"] .pv-group-blue { background: #1E3A8A !important; color: #93C5FD !important; }
[data-theme="dark"] .pv-group-green { background: #14532D !important; color: #86EFAC !important; }
[data-theme="dark"] .pv-group-slate { background: #334155 !important; color: #E2E8F0 !important; }
[data-theme="dark"] .pv-group-violet { background: #4C1D95 !important; color: #DDD6FE !important; }
[data-theme="dark"] .pv-group-title,
[data-theme="dark"] .pv-group-count { color: inherit !important; }
[data-theme="dark"] .lp-alert-danger { background: #7F1D1D !important; color: #FECACA !important; }
[data-theme="dark"] .lp-alert-warning { background: #78350F !important; color: #FDE68A !important; }
[data-theme="dark"] .lp-alert-info { background: #1E3A8A !important; color: #BFDBFE !important; }
[data-theme="dark"] .lp-hero,
[data-theme="dark"] .lp-hero :is(h1, h2, a, span, p, small),
[data-theme="dark"] .lp-btn-glass,
[data-theme="dark"] .lp-btn-primary {
  color: #fff !important;
}
[data-theme="dark"] .da-btn--primary { color: #fff !important; }
[data-theme="dark"] .da-tab__badge {
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
}

[data-theme="dark"] .pg-atelier-tag { color: #C4B5FD !important; }
[data-theme="dark"] .pg-chrono { color: #FDBA74 !important; }
[data-theme="dark"] .af-role-pill {
  background: #1E3A8A !important;
  color: #93C5FD !important;
}
[data-theme="dark"] .af-hist-label { color: var(--color-text-muted) !important; }
[data-theme="dark"] .vf-label { color: var(--color-text-muted) !important; }
[data-theme="dark"] .card label,
[data-theme="dark"] form label { color: var(--color-text); }
[data-theme="dark"] a.flux-zone-tab,
[data-theme="dark"] .flux-zone-tab {
  background: var(--color-surface) !important;
  border-color: var(--color-border) !important;
  color: var(--color-text) !important;
}
[data-theme="dark"] a.flux-zone-tab.is-active,
[data-theme="dark"] a.flux-zone-tab.flux-zone-tab--active,
[data-theme="dark"] .flux-zone-tab.is-active,
[data-theme="dark"] .flux-zone-tab--active {
  background: #1E3A8A !important;
  border-color: #1E3A8A !important;
  color: #fff !important;
}
[data-theme="dark"] .kpi-btn-secondary {
  color: var(--color-text) !important;
  border-color: var(--color-border) !important;
}
[data-theme="dark"] .sc-type-tab { color: var(--color-text-secondary) !important; }
[data-theme="dark"] .card a.text-inherit { color: var(--color-text) !important; }

[data-theme="dark"] .en-kpi-green .en-kpi-val { color: #34D399 !important; }
[data-theme="dark"] .en-kpi-blue .en-kpi-val { color: #93C5FD !important; }
[data-theme="dark"] .en-kpi-rose .en-kpi-val { color: #FB7185 !important; }
[data-theme="dark"] .en-btn-secondary {
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
  border-color: var(--color-border) !important;
}
[data-theme="dark"] .en-tab-count {
  background: var(--color-surface) !important;
  color: var(--color-text-secondary) !important;
}
[data-theme="dark"] .en-group-brand { background: #1E3A8A !important; color: #93C5FD !important; }
[data-theme="dark"] .en-group-amber { background: #78350F !important; color: #FCD34D !important; }
[data-theme="dark"] .en-group-orange { background: #7C2D12 !important; color: #FED7AA !important; }
[data-theme="dark"] .en-group-rose { background: #7F1D1D !important; color: #FCA5A5 !important; }
[data-theme="dark"] .en-group-violet { background: #4C1D95 !important; color: #DDD6FE !important; }
[data-theme="dark"] .en-group-slate { background: #334155 !important; color: #E2E8F0 !important; }
[data-theme="dark"] .en-card-code { background: #7C2D12 !important; color: #FED7AA !important; }
[data-theme="dark"] .en-btn-card-edit { background: #7C2D12 !important; color: #FED7AA !important; }
[data-theme="dark"] .en-btn-card-horo { background: #1E3A8A !important; color: #93C5FD !important; }
[data-theme="dark"] .en-badge-green,
[data-theme="dark"] .en-doc-ok { background: #14532D !important; color: #86EFAC !important; }
[data-theme="dark"] .en-badge-blue { background: #1E3A8A !important; color: #93C5FD !important; }
[data-theme="dark"] .en-badge-violet { background: #4C1D95 !important; color: #DDD6FE !important; }
[data-theme="dark"] .en-badge-amber { background: #78350F !important; color: #FCD34D !important; }
[data-theme="dark"] .en-badge-rose,
[data-theme="dark"] .en-doc-alerte { background: #7F1D1D !important; color: #FCA5A5 !important; }
[data-theme="dark"] .en-badge-slate,
[data-theme="dark"] .en-doc-gray { background: #334155 !important; color: #E2E8F0 !important; }
