/* =========================
   MODE NUIT — overrides
   Activé via html[data-theme="dark"]
========================= */

html[data-theme="dark"] body {
    background: #15171e;
    color: #dde3ef;
}

/* ── Header ──────────────────────────────────── */

html[data-theme="dark"] header {
    background: #1a1e28;
    border-bottom: 1px solid #2a2f3e;
}

html[data-theme="dark"] footer {
    background: #1a1e28 !important;
    color: #7a8298;
}

/* ── Dropdowns nav ───────────────────────────── */

html[data-theme="dark"] .dropdown-menu::after {
    background: #1e2230;
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
}

html[data-theme="dark"] .dropdown-menu a {
    color: #dde3ef;
}

html[data-theme="dark"] .dropdown-menu a:hover {
    background: #252a38;
    color: #fff;
}

/* ── Search dropdown ─────────────────────────── */

html[data-theme="dark"] .search-dropdown {
    background: #1e2230;
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
}

html[data-theme="dark"] .search-item {
    color: #dde3ef;
}

html[data-theme="dark"] .search-item:hover {
    background: #252a38;
}

html[data-theme="dark"] .search-item mark {
    background: #4a3e00;
    color: #fde68a;
}

html[data-theme="dark"] .search-thumb-placeholder {
    background: #252a38;
}

/* ── User / structure dropdowns ──────────────── */

html[data-theme="dark"] .dropdown-content::after,
html[data-theme="dark"] .structure-dropdown::after {
    background: #1e2230;
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
}

html[data-theme="dark"] .dropdown-company {
    background: #252a38;
    color: #dde3ef;
}

html[data-theme="dark"] .dropdown-divider {
    background: #2d3347;
}

html[data-theme="dark"] .dropdown-content a {
    color: #dde3ef;
}

html[data-theme="dark"] .dropdown-content a:hover {
    background: #252a38;
}

html[data-theme="dark"] .dropdown-item-btn {
    color: #dde3ef;
}

html[data-theme="dark"] .dropdown-item-btn:hover {
    background: #252a38;
}

html[data-theme="dark"] .dropdown-item-link {
    color: #9aa0b4;
}

html[data-theme="dark"] .dropdown-item-link:hover {
    background: #252a38;
}

html[data-theme="dark"] .dropdown-section-title {
    color: #5a6070;
}

/* ── Tables ──────────────────────────────────── */

html[data-theme="dark"] .table {
    background: #1e2230;
    color: #dde3ef;
}

html[data-theme="dark"] .table thead {
    background: #252a38;
}

html[data-theme="dark"] .table th {
    color: #7a8298;
}

html[data-theme="dark"] .table td {
    border-top-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .table tbody tr:hover {
    background: #252a38;
}

html[data-theme="dark"] .table.ultra-compact tr:hover {
    background: #252a38;
}

html[data-theme="dark"] .table.compact td.label {
    color: #dde3ef;
}

/* ── Data table (settings) ───────────────────── */

html[data-theme="dark"] .data-table th {
    color: #7a8298;
    border-bottom-color: #2d3347;
}

html[data-theme="dark"] .data-table td {
    border-bottom-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .data-table tbody tr:hover {
    background: #252a38;
}

/* ── Cards ───────────────────────────────────── */

html[data-theme="dark"] .card {
    background: #1e2230;
    color: #dde3ef;
}

html[data-theme="dark"] .main-row {
    background: #1e2230;
}

html[data-theme="dark"] .detail-row {
    background: #191d29;
}

/* ── Editable cells ──────────────────────────── */

html[data-theme="dark"] .editable {
    background: #252a38;
    border-color: #3a4055;
    color: #dde3ef;
}

html[data-theme="dark"] .editable:hover {
    background: #2d3347;
}

html[data-theme="dark"] .editable:focus {
    background: #1e2230;
    border-color: #00a8ff;
}

html[data-theme="dark"] td[contenteditable="true"]:focus {
    background: #1e3a4f;
}

/* ── Inputs ──────────────────────────────────── */

html[data-theme="dark"] .filter-input {
    background: #1e2230;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .filter-input:focus {
    border-color: #00a8ff;
    box-shadow: 0 0 0 3px rgba(0,168,255,0.12);
}

html[data-theme="dark"] .crud-add input,
html[data-theme="dark"] .crud-add select {
    background: #1e2230;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] select {
    color: #dde3ef;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea {
    color-scheme: dark;
}

/* ── Form groups (settings) ──────────────────── */

html[data-theme="dark"] .form-group label {
    color: #9aa0b4;
}

html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group select,
html[data-theme="dark"] .form-group textarea {
    background: #1e2230;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .form-group input:focus,
html[data-theme="dark"] .form-group select:focus,
html[data-theme="dark"] .form-group textarea:focus {
    border-color: #00a8ff;
}

/* ── Settings layout ─────────────────────────── */

html[data-theme="dark"] .settings-layout {
    background: #15171e;
}

html[data-theme="dark"] .settings-sidebar {
    background: #1e2230;
    border-right-color: #2d3347;
}

html[data-theme="dark"] .sidebar-logo {
    color: #dde3ef;
    border-bottom-color: #2d3347;
}

html[data-theme="dark"] .sidebar-section {
    color: #5a6070;
}

html[data-theme="dark"] .sidebar-link {
    color: #9aa0b4;
}

html[data-theme="dark"] .sidebar-link:hover {
    background: #252a38;
    color: #00a8ff;
}

html[data-theme="dark"] .sidebar-link.active {
    background: #162840;
    color: #00a8ff;
}

html[data-theme="dark"] .sidebar-divider {
    background: #2d3347;
}

html[data-theme="dark"] .settings-content h1 {
    color: #dde3ef;
}

html[data-theme="dark"] .settings-section {
    background: #1e2230;
    border-color: #2d3347;
}

html[data-theme="dark"] .settings-section h2 {
    color: #dde3ef;
}

html[data-theme="dark"] .settings-section h3 {
    color: #9aa0b4;
}

/* ── Alerts ──────────────────────────────────── */

html[data-theme="dark"] .alert-success {
    background: #0d2e1a;
    border-color: #1a5c35;
    color: #4ade80;
}

html[data-theme="dark"] .alert-error {
    background: #2e0d0d;
    border-color: #5c1a1a;
    color: #f87171;
}

html[data-theme="dark"] .alert-warning {
    background: #2e1f00;
    border-color: #5c3a00;
    color: #fbbf24;
}

html[data-theme="dark"] .scope-banner--structure {
    background: #0d1f30;
    border-color: #1a3d5e;
    color: #7ab8e8;
}

html[data-theme="dark"] .scope-banner--global {
    background: #2a1a00;
    border-color: #5c3800;
    color: #fbbf24;
}

/* ── Status rows ─────────────────────────────── */

html[data-theme="dark"] .expired,
html[data-theme="dark"] .alert {
    background: #2e1212;
}

html[data-theme="dark"] .warning {
    background: #2a1f00;
}

html[data-theme="dark"] .error-banner {
    background: #2e1212;
    color: #f87171;
}

/* ── Kit cards ───────────────────────────────── */

html[data-theme="dark"] .kit-card.ok {
    background: #0d2e1a;
    color: #4ade80;
}

html[data-theme="dark"] .kit-card.danger {
    background: #2e1212;
    color: #f87171;
}

/* ── Category filters ────────────────────────── */

html[data-theme="dark"] .cat-btn {
    background: #252a38;
    color: #9aa0b4;
    border-color: transparent;
}

html[data-theme="dark"] .cat-btn:hover {
    background: #2d3347;
    color: #dde3ef;
}

/* ── Page button (pagination) ────────────────── */

html[data-theme="dark"] .page-btn {
    background: #1e2230;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .page-btn:hover:not(:disabled):not(.page-btn-active) {
    background: #252a38;
    border-color: #00a8ff;
}

html[data-theme="dark"] .page-ellipsis {
    color: #3a4055;
}

html[data-theme="dark"] .page-info {
    color: #5a6070;
}

html[data-theme="dark"] .page-size-select {
    background: #1e2230;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .page-size-select:hover {
    border-color: #00a8ff;
}

/* ── Breadcrumb ──────────────────────────────── */

html[data-theme="dark"] .bc-sep {
    color: #3a4055;
}

html[data-theme="dark"] .bc-current {
    color: #9aa0b4;
}

/* ── Confirmation modal ──────────────────────── */

html[data-theme="dark"] #confirm-dialog {
    background: #1e2230;
    box-shadow: 0 12px 40px rgba(0,0,0,.55);
}

html[data-theme="dark"] #confirm-dialog p {
    color: #dde3ef;
}

html[data-theme="dark"] .confirm-actions .btn-cancel {
    background: #252a38;
    border-color: #3a4055;
    color: #9aa0b4;
}

html[data-theme="dark"] .confirm-actions .btn-cancel:hover {
    background: #2d3347;
}

/* ── Generic modal ───────────────────────────── */

html[data-theme="dark"] .modal-content {
    background: #1e2230;
    color: #dde3ef;
}

/* ── Wizard ──────────────────────────────────── */

html[data-theme="dark"] .modal-content.wizard-modal {
    background: #1e2230;
}

html[data-theme="dark"] .wizard-step-dot {
    background: #252a38;
    color: #7a8298;
}

html[data-theme="dark"] .wizard-step-line {
    background: #2d3347;
}

html[data-theme="dark"] .wizard-subtitle {
    color: #7a8298;
    border-bottom-color: #2d3347;
}

html[data-theme="dark"] .wizard-footer {
    border-top-color: #2d3347;
}

html[data-theme="dark"] .wizard-gtin {
    background: #252a38;
    border-color: #3a4055;
    color: #dde3ef;
}

html[data-theme="dark"] .wizard-label {
    color: #c0c8dc;
}

html[data-theme="dark"] .wizard-input,
html[data-theme="dark"] .wizard-search {
    background: #15171e;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .wizard-input:focus,
html[data-theme="dark"] .wizard-search:focus {
    border-color: #00a8ff;
}

html[data-theme="dark"] .toggle-btn {
    background: #252a38;
    border-color: #3a4055;
    color: #9aa0b4;
}

html[data-theme="dark"] .toggle-btn.active {
    border-color: #00a8ff;
    background: #0d2035;
    color: #00a8ff;
}

html[data-theme="dark"] .bdpm-item {
    background: #1e2230;
    border-color: #2d3347;
}

html[data-theme="dark"] .bdpm-item:hover {
    background: #252a38;
    border-color: #00a8ff;
}

html[data-theme="dark"] .bdpm-name {
    color: #dde3ef;
}

html[data-theme="dark"] .bdpm-meta {
    color: #7a8298;
}

html[data-theme="dark"] .item-btn {
    background: #1e2230;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .item-btn:hover {
    background: #252a38;
    border-color: #00a8ff;
}

html[data-theme="dark"] .item-btn.selected {
    background: #0d2035;
    border-color: #00a8ff;
    color: #5bc8ff;
}

html[data-theme="dark"] .item-main {
    color: #dde3ef;
}

html[data-theme="dark"] .item-mfg {
    background: #252a38;
    color: #9aa0b4;
}

html[data-theme="dark"] .btn-create-new {
    background: #1e2230;
    border-color: #3a4055;
    color: #7a8298;
}

html[data-theme="dark"] .btn-create-new:hover {
    background: #252a38;
    border-color: #00a8ff;
    color: #00a8ff;
}

html[data-theme="dark"] .mode-card {
    background: #252a38;
    border-color: #3a4055;
}

html[data-theme="dark"] .mode-card:hover {
    background: #0d2035;
    border-color: #00a8ff;
}

html[data-theme="dark"] .mode-card-label {
    color: #dde3ef;
}

html[data-theme="dark"] .wizard-gtin-header {
    background: #1a2540;
    color: #9aa0b4;
}

html[data-theme="dark"] .category-chip {
    background: #252a38;
    color: #9aa0b4;
}

html[data-theme="dark"] .category-chip:not(.active):hover {
    background: #2d3347;
}

html[data-theme="dark"] .summary-list {
    background: #252a38;
}

html[data-theme="dark"] .summary-label {
    color: #7a8298;
}

html[data-theme="dark"] .wizard-error {
    background: #2e1212;
    color: #f87171;
}

html[data-theme="dark"] .existing-barcodes-list {
    background: #252a38;
    border-color: #3a4055;
}

html[data-theme="dark"] .existing-barcode-code {
    background: #1e2230;
    color: #c0c8dc;
}

html[data-theme="dark"] .existing-barcode-qty {
    color: #7a8298;
}

/* ── Misc ────────────────────────────────────── */

html[data-theme="dark"] .badge-count {
    background: #252a38;
    color: #9aa0b4;
}

html[data-theme="dark"] .badge-location {
    background: #252a38;
    color: #c0c8dc;
}

html[data-theme="dark"] .badge-warning {
    background: #3a2a00;
    color: #fbbf24;
}

html[data-theme="dark"] .empty-state {
    color: #5a6070;
}

html[data-theme="dark"] .upload-btn {
    background: #252a38;
    color: #9aa0b4;
}

html[data-theme="dark"] .upload-btn:hover {
    background: #2d3347;
}

html[data-theme="dark"] .product-image {
    border-color: #2d3347;
}

html[data-theme="dark"] .btn-light {
    background: #252a38;
    color: #9aa0b4;
}

html[data-theme="dark"] .btn-secondary {
    background: #252a38;
    color: #9aa0b4;
}

html[data-theme="dark"] .sub-info {
    color: #5a6070;
}

html[data-theme="dark"] .page-header h1,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 {
    color: #dde3ef;
}

/* ── Homepage — stat cards ───────────────────── */

html[data-theme="dark"] .stat-card {
    background: #1e2230;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .stat-card .s-label {
    color: #7a8298;
}

html[data-theme="dark"] .stat-card.s-danger {
    background: #2e1212;
    border-color: #5c1a1a;
}

html[data-theme="dark"] .stat-card.s-danger .s-value {
    color: #f87171;
}

html[data-theme="dark"] .stat-card.s-warning {
    background: #2e1f00;
    border-color: #5c3a00;
}

html[data-theme="dark"] .stat-card.s-warning .s-value {
    color: #fbbf24;
}

html[data-theme="dark"] .stat-card.s-ok {
    background: #0d2e1a;
    border-color: #1a5c35;
}

html[data-theme="dark"] .stat-card.s-ok .s-value {
    color: #4ade80;
}

html[data-theme="dark"] .stat-card.s-neutral .s-value {
    color: #7a8298;
}

/* ── Homepage — quick links ──────────────────── */

html[data-theme="dark"] .ql-card {
    background: #1e2230;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .ql-card:hover {
    border-color: #00a8ff;
    box-shadow: 0 4px 12px rgba(0,168,255,0.12);
    color: #00a8ff;
}

/* ── Homepage — kits overview ────────────────── */

html[data-theme="dark"] .super-kit-section {
    border-color: #2d3347;
}

html[data-theme="dark"] .super-kit-header {
    background: #252a38;
    border-bottom-color: #2d3347;
    color: #7a8298;
}

html[data-theme="dark"] .kit-row {
    border-bottom-color: #2d3347;
}

html[data-theme="dark"] .kit-row a {
    color: #c0c8dc;
}

html[data-theme="dark"] .kit-row a:hover {
    color: #00a8ff;
}

html[data-theme="dark"] .kit-row .kit-hint {
    color: #5a6070;
}

/* ── Homepage — landing (visiteur non connecté) ── */

html[data-theme="dark"] .feat-card {
    background: #1e2230;
    border-color: #2d3347;
}

html[data-theme="dark"] .feat-card h3 {
    color: #dde3ef;
}

html[data-theme="dark"] .feat-card p {
    color: #7a8298;
}

html[data-theme="dark"] .landing-hero h1 {
    color: #dde3ef;
}

html[data-theme="dark"] .landing-hero .tagline {
    color: #7a8298;
}

/* ── Homepage — alertes BDPM ─────────────────── */

html[data-theme="dark"] .bdpm-alert-item {
    background: #2a1f00 !important;
    border-color: #5c3a00 !important;
}

html[data-theme="dark"] .home-welcome .home-date {
    color: #5a6070;
}

/* ── Stock — valeur totale ───────────────────── */

html[data-theme="dark"] .stock-value-total {
    background: #0d2035;
    border-color: #1a3d5e;
    color: #5bc8ff;
}

html[data-theme="dark"] .col-value {
    color: #7a8298;
}

/* ── Movements — filtres & tableau ──────────── */

html[data-theme="dark"] .badge-count {
    background: #252a38;
    color: #9aa0b4;
}

html[data-theme="dark"] .mvt-filters {
    background: #1e2230;
    border-color: #2d3347;
}

html[data-theme="dark"] .mvt-filter-select,
html[data-theme="dark"] .mvt-filter-input {
    background: #15171e;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .mvt-table th {
    border-bottom-color: #2d3347;
    color: #7a8298;
}

html[data-theme="dark"] .mvt-ts { color: #dde3ef; }
html[data-theme="dark"] .mvt-product a { color: #c0c8dc; }
html[data-theme="dark"] .mvt-ref { color: #7a8298; }
html[data-theme="dark"] .mvt-batch-num { color: #dde3ef; }

html[data-theme="dark"] .loc-stock { background: #0d2e1a; color: #4ade80; }
html[data-theme="dark"] .loc-ext   { background: #2e1f00; color: #fbbf24; }
html[data-theme="dark"] .loc-kit   { background: #0d1f40; color: #7ab8e8; }

html[data-theme="dark"] .mvt-user-badge {
    background: #252a38;
    color: #9aa0b4;
}

/* ── Traçabilité légale — cards ──────────────── */

html[data-theme="dark"] .trac-card {
    background: #1e2230;
    box-shadow: 0 1px 4px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.04);
}

html[data-theme="dark"] .trac-page h1 { color: #dde3ef; }
html[data-theme="dark"] .trac-card h2 { color: #dde3ef; }
html[data-theme="dark"] .trac-card .desc { color: #7a8298; }
html[data-theme="dark"] .trac-card .ref { color: #5a6070; }

html[data-theme="dark"] .trac-form label { color: #9aa0b4; }

html[data-theme="dark"] .trac-form input[type=date],
html[data-theme="dark"] .trac-form select {
    background: #15171e;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .device-list a,
html[data-theme="dark"] .vehicle-list a {
    background: #252a38;
    border-color: #2d3347;
    color: #c0c8dc;
}

html[data-theme="dark"] .device-list a:hover,
html[data-theme="dark"] .vehicle-list a:hover {
    background: #2d3347;
}

html[data-theme="dark"] .device-list a .sub,
html[data-theme="dark"] .vehicle-list a .sub {
    color: #5a6070;
}

html[data-theme="dark"] .trac-astuce-box {
    background: #2a1f00 !important;
    border-color: #5c3a00 !important;
    color: #fbbf24 !important;
}

html[data-theme="dark"] .trac-astuce-box a {
    color: #fbbf24 !important;
}

/* ── Kits — super-lot cards ──────────────────── */

html[data-theme="dark"] .sk-card {
    background: #1e2230;
    border-color: #2d3347;
}

html[data-theme="dark"] .sk-card-title a { color: #dde3ef; }
html[data-theme="dark"] .sk-card-meta    { color: #7a8298; }
html[data-theme="dark"] .sk-card-counts  { color: #9aa0b4; }

html[data-theme="dark"] .sk-card-items {
    border-top-color: #2d3347;
}

html[data-theme="dark"] .sk-card-items li a { color: #9aa0b4; }

html[data-theme="dark"] .sk-card-items li .item-badge.kit {
    background: #0d1f40;
    color: #7ab8e8;
}

html[data-theme="dark"] .sk-card-items li .item-badge.dm {
    background: #0d2e1a;
    color: #4ade80;
}

html[data-theme="dark"] .sk-add-card {
    border-color: #2d3347;
    color: #5a6070;
}

html[data-theme="dark"] .sk-add-card:hover {
    border-color: #6c5ce7;
    color: #a29bfe;
}

html[data-theme="dark"] .barcode-text {
    background: #252a38;
    color: #dde3ef;
}

html[data-theme="dark"] .badge-superlot-inline {
    background: #1a1040;
    color: #a29bfe;
}

/* DM dans kits — table & select */
html[data-theme="dark"] #devices-table td[style*="color:#555"] {
    color: #9aa0b4 !important;
}

html[data-theme="dark"] .dm-superlot {
    background: #1e2230;
    border-color: #2d3347 !important;
    color: #dde3ef;
}

/* DM Wizard (kits settings) */
html[data-theme="dark"] .dm-wizard-box {
    background: #1e2230;
}

html[data-theme="dark"] .dm-wizard-head h3 { color: #dde3ef; }

html[data-theme="dark"] .dm-wdot {
    background: #252a38;
    color: #7a8298;
}

html[data-theme="dark"] .dm-wline { background: #2d3347; }

html[data-theme="dark"] .dm-wizard-step-label { color: #7a8298; }

html[data-theme="dark"] .dm-field label { color: #9aa0b4; }

html[data-theme="dark"] .dm-field input,
html[data-theme="dark"] .dm-field select,
html[data-theme="dark"] .dm-field textarea {
    background: #15171e;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .dm-wizard-foot {
    border-top-color: #2d3347;
}

html[data-theme="dark"] .mfr-results {
    background: #1e2230;
    border-color: #2d3347;
}

html[data-theme="dark"] .mfr-result-item {
    border-bottom-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .mfr-result-item:hover,
html[data-theme="dark"] .mfr-result-item.focused {
    background: #252a38;
}

html[data-theme="dark"] .mfr-empty { color: #5a6070; }

/* ── Véhicules — lien conducteurs & modal ────── */

html[data-theme="dark"] code#mobile-carnet-url {
    color: #dde3ef !important;
}

html[data-theme="dark"] .vehicle-modal-inner {
    background: #1e2230 !important;
}

html[data-theme="dark"] .vehicle-modal-inner h3,
html[data-theme="dark"] .vehicle-modal-inner label {
    color: #dde3ef;
}

html[data-theme="dark"] .vehicle-modal-inner input,
html[data-theme="dark"] .vehicle-modal-inner select,
html[data-theme="dark"] .vehicle-modal-inner textarea {
    background: #15171e !important;
    border-color: #2d3347 !important;
    color: #dde3ef !important;
}

html[data-theme="dark"] .vehicle-modal-inner .modal-footer-bar {
    border-top-color: #2d3347;
}

/* ── Tenues stock — tableau ──────────────────── */

html[data-theme="dark"] .tenues-info-box {
    background: #2a1f00 !important;
    border-color: #5c3a00 !important;
    color: #fbbf24 !important;
}

html[data-theme="dark"] .tenue-header-row {
    background: #252a38 !important;
}

html[data-theme="dark"] .tenue-type-row {
    background: #1e2230 !important;
    border-top-color: #2d3347 !important;
}

html[data-theme="dark"] .tenue-type-row td {
    color: #9aa0b4 !important;
}

html[data-theme="dark"] .tenues-stock-table td {
    color: #dde3ef !important;
}

html[data-theme="dark"] .tenues-stock-table .stock-input {
    background: #15171e;
    border-color: #2d3347 !important;
    color: #dde3ef;
}

/* ── Settings — structure info ───────────────── */

html[data-theme="dark"] .info-section {
    background: #1e2230;
    box-shadow: 0 1px 4px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.04);
}

html[data-theme="dark"] .info-form h1 { color: #dde3ef; }
html[data-theme="dark"] .info-form .subtitle { color: #7a8298; }

html[data-theme="dark"] .info-section h2 {
    color: #9aa0b4;
    border-bottom-color: #2d3347;
}

html[data-theme="dark"] .form-row label { color: #9aa0b4; }
html[data-theme="dark"] .form-row .hint { color: #5a6070; }

html[data-theme="dark"] .form-row input,
html[data-theme="dark"] .form-row textarea {
    background: #15171e;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .feature-toggle-label { color: #dde3ef; }
html[data-theme="dark"] .feature-toggle-desc  { color: #7a8298; }

html[data-theme="dark"] .feature-toggle-row {
    border-bottom-color: #2d3347;
}

html[data-theme="dark"] .toggle-slider {
    background: #3a4055;
}

html[data-theme="dark"] .toggle-slider::before {
    background: #c0c8dc;
}

html[data-theme="dark"] .google-auth-info-box {
    background: #0d1f40 !important;
    border-color: #1a3d6e !important;
}

html[data-theme="dark"] .google-auth-info-box p {
    color: #7ab8e8 !important;
}

html[data-theme="dark"] .auth-mode-toggle {
    border-color: #2d3347 !important;
}

html[data-theme="dark"] .auth-mode-toggle button {
    background: #1e2230;
    color: #9aa0b4;
    border-color: #2d3347;
}

/* ── Dotation tables (kit & DM) ──────────────── */

html[data-theme="dark"] .dotation-table th,
html[data-theme="dark"] .dotation-table td {
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .dotation-table thead th {
    background: #252a38;
    color: #7a8298;
}

html[data-theme="dark"] .dotation-table input[type=number],
html[data-theme="dark"] .dotation-table input[type=text] {
    background: #15171e;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .dotation-table .cat-row td {
    /* category headers have dynamic bg color — keep text readable */
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

html[data-theme="dark"] .dotation-table td.saved,
html[data-theme="dark"] .dotation-table th.saved {
    background: #0d2e1a !important;
}

html[data-theme="dark"] .dotation-table tr.empty-row td { color: #5a6070; }

html[data-theme="dark"] .kit-btn {
    background: #252a38;
    border-color: #2d3347;
    color: #9aa0b4;
}

html[data-theme="dark"] .kit-btn:hover {
    background: #2d3347;
    border-color: #00a8ff;
}

html[data-theme="dark"] .kit-btn.active {
    background: #0d2035;
    border-color: #00a8ff;
    color: #5bc8ff;
}

html[data-theme="dark"] .kit-btn.active .badge-global,
html[data-theme="dark"] .kit-btn.active .badge-structure {
    background: rgba(0,168,255,0.2);
    color: #5bc8ff;
}

html[data-theme="dark"] .kit-selector-wrap {
    scrollbar-color: #2d3347 #1e2230;
}

html[data-theme="dark"] .col-actions-btn {
    background: #252a38;
    border-color: #2d3347;
    color: #9aa0b4;
}

html[data-theme="dark"] .col-actions-btn:hover {
    background: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] #col-dropdown {
    background: #1e2230;
    border-color: #2d3347;
    box-shadow: 0 4px 16px rgba(0,0,0,.45);
}

html[data-theme="dark"] #col-dropdown button {
    color: #dde3ef;
}

html[data-theme="dark"] #col-dropdown button:hover {
    background: #252a38;
}

html[data-theme="dark"] #col-dropdown button.danger:hover {
    background: #2e1212;
}

html[data-theme="dark"] .modal-dialog {
    background: #1e2230;
    color: #dde3ef;
    box-shadow: 0 8px 32px rgba(0,0,0,.55);
}

html[data-theme="dark"] .modal-dialog p { color: #9aa0b4; }

html[data-theme="dark"] .modal-dialog select {
    background: #15171e;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .modal-dialog textarea {
    background: #15171e;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .ignore-toggle { color: #5a6070; }
html[data-theme="dark"] .ignore-toggle:hover,
html[data-theme="dark"] .ignore-toggle.ignored { color: #fbbf24; }

/* Indication de vérification (matrice des dotations DM) */
html[data-theme="dark"] .hint-btn { color: #5a6070; }
html[data-theme="dark"] .hint-btn:hover { color: #6891f5; }
html[data-theme="dark"] .hint-btn.has-hint { color: #fbbf24; }

html[data-theme="dark"] tr.ignored-row td:not(:first-child) { opacity: 0.35; }
html[data-theme="dark"] tr.ignored-row td:first-child { color: #5a6070; }

/* ── App — mode scan ─────────────────────────── */

html[data-theme="dark"] .top-bar {
    background: #1a1e28;
    border-bottom-color: #2a2f3e;
}

html[data-theme="dark"] .mode-btn {
    background: #252a38;
    color: #9aa0b4;
}

html[data-theme="dark"] .mode-btn[data-mode="in"].active    { background: #0d2035; color: #5bc8ff;  border-color: #00a8ff; }
html[data-theme="dark"] .mode-btn[data-mode="out"].active   { background: #2e1212; color: #f87171;  border-color: #e74c3c; }
html[data-theme="dark"] .mode-btn[data-mode="kit"].active   { background: #1a0d30; color: #c4b5fd;  border-color: #8e44ad; }
html[data-theme="dark"] .mode-btn[data-mode="kit-in"].active{ background: #0d2e1a; color: #4ade80;  border-color: #27ae60; }

html[data-theme="dark"] .mode-sep { background: #2a2f3e; }

html[data-theme="dark"] #selected-kit-name {
    color: #7ab8e8;
    border-left-color: #2d3347;
}

html[data-theme="dark"] .product-card {
    background: #1e2230;
}

html[data-theme="dark"] .app-right {
    background: #1e2230;
}

html[data-theme="dark"] .kit-column {
    background: #252a38;
}

html[data-theme="dark"] .kit-column-title { color: #9aa0b4; }

html[data-theme="dark"] .kit-item {
    background: #1e2230;
    color: #dde3ef;
}

html[data-theme="dark"] .kit-item:hover,
html[data-theme="dark"] .kit-item:active {
    background: #0d2035;
    border-color: #00a8ff;
}

html[data-theme="dark"] #test-scan {
    background: #15171e;
    border-color: #2d3347;
    color: #7a8298;
}

html[data-theme="dark"] #test-scan:focus {
    background: #1e2230;
    border-color: #00a8ff;
    color: #dde3ef;
}

html[data-theme="dark"] .manual-trigger-btn {
    background: #252a38;
    border-color: #2d3347;
    color: #7a8298;
}

html[data-theme="dark"] .manual-trigger-btn:hover,
html[data-theme="dark"] .manual-trigger-btn:active {
    background: #0d2035;
    border-color: #00a8ff;
    color: #00a8ff;
}

html[data-theme="dark"] #quantity {
    background: #252a38;
    border-color: #3a4055;
    color: #dde3ef;
}

html[data-theme="dark"] .history-box {
    border-top-color: #2d3347;
}

html[data-theme="dark"] .history-table th {
    background: #252a38;
    border-bottom-color: #2d3347;
    color: #7a8298;
}

html[data-theme="dark"] .history-table td {
    border-bottom-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .product-sub { color: #7a8298; }
html[data-theme="dark"] .date        { color: #5a6070; }

html[data-theme="dark"] .app-notif.success {
    background: #0d2e1a;
    color: #4ade80;
    border-color: #1a5c35;
}

html[data-theme="dark"] .app-notif.error {
    background: #2e0d0d;
    color: #f87171;
    border-color: #5c1a1a;
}

html[data-theme="dark"] .app-notif.warning {
    background: #2e1f00;
    color: #fbbf24;
    border-color: #5c3a00;
}

html[data-theme="dark"] #confirm-modal-message { color: #dde3ef; }

/* ── Arbitrage de dotation ───────────────────── */

html[data-theme="dark"] .dot-head {
    background: #2e2413;
    border-bottom-color: #5c4a1a;
}
html[data-theme="dark"] .dot-head-title { color: #fbbf24; }
html[data-theme="dark"] .dot-chip {
    background: #1e2230;
    border-color: #5c4a1a;
    color: #d9c48a;
}
html[data-theme="dark"] .dot-chip strong,
html[data-theme="dark"] .dot-line-title,
html[data-theme="dark"] .dot-line-sub strong,
html[data-theme="dark"] .dot-step-val { color: #dde3ef; }
html[data-theme="dark"] .dot-val-in   { color: #4ade80; }
html[data-theme="dark"] .dot-val-out  { color: #f87171; }
html[data-theme="dark"] .dot-val-zero { color: #7a8298; }

html[data-theme="dark"] .dot-presets,
html[data-theme="dark"] .dot-line { border-color: #2d3347; }

html[data-theme="dark"] .dot-preset,
html[data-theme="dark"] .dot-step-btn,
html[data-theme="dark"] .dot-dest-opt {
    background: #252a38;
    border-color: #3a4257;
    color: #dde3ef;
}
html[data-theme="dark"] .dot-preset.active,
html[data-theme="dark"] .dot-dest-opt.active {
    background: #17233f;
    border-color: #3b82f6;
    color: #93b4fd;
}
html[data-theme="dark"] .dot-dest-opt.active-scrap {
    background: #2e0d0d;
    border-color: #b91c1c;
    color: #f87171;
}

html[data-theme="dark"] .dot-exp          { background: #252a38; color: #9aa0b4; }
html[data-theme="dark"] .dot-exp-soon     { background: #2e1f00; color: #fbbf24; }
html[data-theme="dark"] .dot-exp-expired  { background: #2e0d0d; color: #f87171; }
html[data-theme="dark"] .dot-line-locked  { background: #252a38; color: #7a8298; }

html[data-theme="dark"] .dot-foot {
    background: #191d29;
    border-top-color: #2d3347;
}

html[data-theme="dark"] .manual-header {
    border-bottom-color: #2d3347;
    background: #1e2230;
}

html[data-theme="dark"] .manual-back-btn {
    background: #252a38;
    border-color: #2d3347;
    color: #9aa0b4;
}

html[data-theme="dark"] .manual-back-btn:hover { background: #2d3347; }

html[data-theme="dark"] .manual-breadcrumb { color: #dde3ef; }

html[data-theme="dark"] .manual-close-btn { color: #5a6070; }
html[data-theme="dark"] .manual-close-btn:hover { background: #252a38; color: #9aa0b4; }

html[data-theme="dark"] .manual-search {
    background: #15171e;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .manual-search:focus {
    border-color: #00a8ff;
    background: #1e2230;
}

html[data-theme="dark"] .manual-list-item {
    border-bottom-color: #2d3347;
}

html[data-theme="dark"] .manual-list-item:hover  { background: #252a38; }
html[data-theme="dark"] .manual-list-item:active { background: #0d2035; }

html[data-theme="dark"] .manual-list-name { color: #dde3ef; }

html[data-theme="dark"] .manual-list-mfg {
    background: #252a38;
    color: #9aa0b4;
}

html[data-theme="dark"] .manual-list-sub    { color: #5a6070; }
html[data-theme="dark"] .manual-list-arrow  { color: #3a4055; }

html[data-theme="dark"] .app-led { background: #252a38; }

html[data-theme="dark"] .expiry-field {
    background: #252a38;
    border-color: #3a4055;
    color: #7a8298;
}

html[data-theme="dark"] .expiry-field.active {
    border-color: #00a8ff;
    background: #15171e;
    color: #dde3ef;
}

html[data-theme="dark"] .expiry-field.filled {
    background: #15171e;
    color: #dde3ef;
}

html[data-theme="dark"] .exp-key {
    background: #252a38;
    color: #dde3ef;
}

html[data-theme="dark"] .exp-key:active { background: #2d3347; }

html[data-theme="dark"] .exp-key-back {
    background: #2e1212;
    color: #f87171;
}

html[data-theme="dark"] .exp-key-back:active { background: #3d1818; }

html[data-theme="dark"] .exp-key-ok {
    background: #0d2e1a;
    color: #4ade80;
}

html[data-theme="dark"] .exp-key-ok:active { background: #1a5c35; }

html[data-theme="dark"] .inv-header {
    border-bottom-color: #2d3347;
}

html[data-theme="dark"] #inv-session-label { color: #9aa0b4; }

html[data-theme="dark"] .inv-progress-bar-wrap { background: #252a38; }

html[data-theme="dark"] .inv-section-title {
    color: #9aa0b4;
    border-bottom-color: #2d3347;
}

html[data-theme="dark"] .inv-ref-name { color: #dde3ef; }
html[data-theme="dark"] .inv-ref-name-sm { color: #c0c8dc; }
html[data-theme="dark"] .inv-batch-row { color: #9aa0b4; }
html[data-theme="dark"] .inv-lot-count { color: #5a6070; }

html[data-theme="dark"] .inv-remaining-row {
    border-bottom-color: #2d3347;
    color: #9aa0b4;
}

html[data-theme="dark"] #inv-progress-label { color: #7a8298; }
html[data-theme="dark"] .inv-start-box      { color: #5a6070; }

html[data-theme="dark"] .btn-inv-zero {
    background: #252a38;
    border-color: #2d3347;
    color: #f87171;
}

html[data-theme="dark"] .btn-inv-zero:hover {
    background: #2e1212;
    border-color: #5c1a1a;
}

/* ── Toggle button ───────────────────────────── */

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 8px;
    color: rgba(255,255,255,0.65);
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

#theme-toggle:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

/* ── Véhicules ──────────────────────────────── */

html[data-theme="dark"] .km-dist {
    color: #4ade80;
}

html[data-theme="dark"] .veh-km-badge {
    color: #4ade80 !important;
}

/* ── Mobile link banner ─────────────────────────────────────── */
html[data-theme="dark"] .mobile-link-card .mlc-url {
    background: #1e2535;
    border-color: #2d3347;
    color: #dde3ef;
}

/* ── Info hints ── */
html[data-theme="dark"] .info-hint .icon { color: #4a5270; }
html[data-theme="dark"] .info-hint:hover .icon { color: #6891f5; }
html[data-theme="dark"] .info-hint::after {
    background: #0e1119;
    color: #c8d0e8;
    box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}
html[data-theme="dark"] .info-hint::before { border-top-color: #0e1119; }

/* ── Bannières système ─────────────────────────────────────── */

html[data-theme="dark"] .sys-banner--info {
    background: #1a2a3a;
    color: #7ec8f0;
    border-bottom-color: #2a4a6a;
}

html[data-theme="dark"] .sys-banner--danger {
    background: #2e1a1a;
    color: #f0a0a0;
    border-bottom-color: #5a2a2a;
}

/* ── Flash popup ───────────────────────────────────────────── */

html[data-theme="dark"] .flash-modal {
    background: #1e2230;
    color: #dde3ef;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

html[data-theme="dark"] .flash-modal-header {
    border-bottom-color: #2a2f3e;
}
html[data-theme="dark"] .flash-modal-header--danger { background: #2e1a1a; border-bottom-color: #5a2a2a; }
html[data-theme="dark"] .flash-modal-header--info   { background: #1a2a3a; border-bottom-color: #2a4a6a; }

html[data-theme="dark"] .flash-modal-title { color: #dde3ef; }

html[data-theme="dark"] .flash-modal-body  { color: #c0c8d8; }

html[data-theme="dark"] .flash-modal-footer {
    border-top-color: #2a2f3e;
    background: #1a1e28;
}

/* ── Home — stat cards ─────────────────────────────────────── */

html[data-theme="dark"] .stat-card {
    background: #1e2230;
    border-color: #2d3347;
    color: #dde3ef;
}
html[data-theme="dark"] .stat-card .s-label { color: #6b7a99; }
html[data-theme="dark"] .stat-card.s-danger  { background: #2e1a1a; border-color: #4a2828; }
html[data-theme="dark"] .stat-card.s-warning { background: #2a2010; border-color: #4a3a20; }
html[data-theme="dark"] .stat-card.s-ok      { background: #1a2e20; border-color: #2a4a30; }
html[data-theme="dark"] .stat-card.s-neutral .s-value { color: #6b7a99; }

/* ── Home — kits overview ──────────────────────────────────── */

html[data-theme="dark"] .super-kit-section {
    border-color: #2d3347;
}
html[data-theme="dark"] .super-kit-header {
    background: #252a38;
    border-bottom-color: #2d3347;
    color: #7a8aaa;
}
html[data-theme="dark"] .kit-row {
    border-bottom-color: #252a38;
    color: #dde3ef;
}
html[data-theme="dark"] .kit-row a { color: #c0c8d8; }
html[data-theme="dark"] .kit-row a:hover { color: #00a8ff; }
html[data-theme="dark"] .kit-row .kit-hint { color: #4a5270; }

/* ── Home — quick links ────────────────────────────────────── */

html[data-theme="dark"] .ql-card {
    background: #1e2230;
    border-color: #2d3347;
    color: #c0c8d8;
}
html[data-theme="dark"] .ql-card:hover {
    border-color: #00a8ff;
    color: #00a8ff;
}

/* ── Home — module cards (tenues, carnet, désinfection, commandes) ── */

html[data-theme="dark"] .hmod-card {
    background: #1e2230;
    border-color: #2d3347;
}
html[data-theme="dark"] .hmod-header {
    background: #252a38;
    border-bottom-color: #2d3347;
}
html[data-theme="dark"] .hmod-title { color: #7a8aaa; }
html[data-theme="dark"] .hmod-row {
    border-bottom-color: #252a38;
    color: #c0c8d8;
}
html[data-theme="dark"] .hmod-row .hmod-info { color: #c0c8d8; }
html[data-theme="dark"] .hmod-row .hmod-meta { color: #4a5270; }
html[data-theme="dark"] .hmod-empty { color: #4a5270; }
html[data-theme="dark"] .hmod-stat-row { border-top-color: #2d3347; }
html[data-theme="dark"] .hmod-stat .hmod-slbl { color: #6b7a99; }

html[data-theme="dark"] .hmod-tag.loan     { background: #1a3225; color: #4ade80; }
html[data-theme="dark"] .hmod-tag.return   { background: #252045; color: #a5b4fc; }
html[data-theme="dark"] .hmod-tag.desinf   { background: #1a2a3a; color: #60a5fa; }
html[data-theme="dark"] .hmod-tag.drive    { background: #2a1e0a; color: #fb923c; }
html[data-theme="dark"] .hmod-tag.order    { background: #1a2535; color: #60a5fa; }
html[data-theme="dark"] .hmod-tag.benef    { background: #2a1a35; color: #c084fc; }
html[data-theme="dark"] .hmod-tag.livraison { background: #2e1e05; color: #fb923c; }

/* ── Home — welcome ────────────────────────────────────────── */

html[data-theme="dark"] .home-welcome .home-date { color: #4a5270; }

/* ── Partage inter-structures & don ────────────────────────── */

html[data-theme="dark"] .share-hint,
html[data-theme="dark"] .give-hint,
html[data-theme="dark"] .share-empty,
html[data-theme="dark"] .share-strip-label,
html[data-theme="dark"] .share-strip-empty { color: #7a8aaa; }

html[data-theme="dark"] .share-item {
    background: #252a38;
    border-color: #2d3347;
}
html[data-theme="dark"] .share-item-name { color: #dde3ef; }
html[data-theme="dark"] .share-item-code,
html[data-theme="dark"] .share-item-meta { color: #6b7a99; }

html[data-theme="dark"] .share-add-row select {
    background: #1e2230;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .give-block { border-top-color: #2d3347; }
html[data-theme="dark"] .give-head h3,
html[data-theme="dark"] .give-head .icon { color: #f08a8a; }

html[data-theme="dark"] .share-strip { border-top-color: #2d3347; }
html[data-theme="dark"] .share-chip {
    background: #252a38;
    border-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .share-modal-box {
    background: #1e2230;
    color: #dde3ef;
}

/* Barre Valider / Annuler collée en bas sur écran étroit (cf. app.css) */
@media (max-width: 900px) {
    html[data-theme="dark"] .actions-app { background: #15171e; }
}

/* =========================================================
   MODE NUIT — composants déclarés dans les <style> des vues
   Ces classes ne vivent pas dans style.css : sans surcharge
   ici, elles restaient en clair sur fond sombre.
========================================================= */

/* ── Modales locales ─────────────────────────── */

html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .order-modal-box,
html[data-theme="dark"] .kv-modal-inner {
    background: #1e2230;
    color: #dde3ef;
    box-shadow: 0 16px 48px rgba(0,0,0,.6);
}

html[data-theme="dark"] .kv-modal-title { color: #dde3ef; }

/* ── Tables déclarées en vue ─────────────────── */

html[data-theme="dark"] .j-table th,
html[data-theme="dark"] .km-table th,
html[data-theme="dark"] .sin-table th,
html[data-theme="dark"] .inc-table th,
html[data-theme="dark"] .dysfon-table th,
html[data-theme="dark"] .maint-table th,
html[data-theme="dark"] .repair-table th,
html[data-theme="dark"] .roles-matrix th,
html[data-theme="dark"] #matrix-table thead th {
    background: #252a38;
    color: #9aa0b4;
    border-bottom-color: #2d3347;
}

html[data-theme="dark"] .j-table td,
html[data-theme="dark"] .km-table td,
html[data-theme="dark"] .sin-table td,
html[data-theme="dark"] .inc-table td,
html[data-theme="dark"] .dysfon-table td,
html[data-theme="dark"] .maint-table td,
html[data-theme="dark"] .repair-table td,
html[data-theme="dark"] .roles-matrix td,
html[data-theme="dark"] .batches-table td,
html[data-theme="dark"] .lines-table td {
    border-bottom-color: #2d3347;
    color: #dde3ef;
}

html[data-theme="dark"] .j-table tr:hover td,
html[data-theme="dark"] .sin-table tr:hover td,
html[data-theme="dark"] .inc-table tr:hover td,
html[data-theme="dark"] .dysfon-table tr:hover td,
html[data-theme="dark"] .kv-table tbody tr:hover td,
html[data-theme="dark"] .sv-table tbody tr:hover td,
html[data-theme="dark"] .batches-table tr:hover td,
html[data-theme="dark"] .roles-matrix tr:hover td,
html[data-theme="dark"] .cat-table tbody tr:hover {
    background: #252a38;
}

html[data-theme="dark"] #matrix-table td:first-child,
html[data-theme="dark"] .role-col-name {
    background: #252a38;
    color: #dde3ef;
}

html[data-theme="dark"] .lines-table tfoot td { background: #252a38; color: #dde3ef; }
html[data-theme="dark"] .batches-wrapper     { background: #191d29; border-color: #2d3347; }

/* ── Numéros d'incident / anomalies ──────────── */

html[data-theme="dark"] .sin-number,
html[data-theme="dark"] .inc-number.sinistre        { color: #f08a8a; }
html[data-theme="dark"] .inc-number.dysfonctionnement,
html[data-theme="dark"] .dysfon-number              { color: #fbbf24; }
html[data-theme="dark"] .kv-anomaly,
html[data-theme="dark"] .sv-anomaly                 { color: #f87171; }
html[data-theme="dark"] .verif-ok                   { color: #4ade80; }
html[data-theme="dark"] .verif-warn                 { color: #fbbf24; }
html[data-theme="dark"] .verif-none                 { color: #f87171; }

/* ── Véhicules : lignes, suivi, tâches ───────── */

html[data-theme="dark"] .veh-row:hover,
html[data-theme="dark"] .inc-row:hover { background: #252a38; }

html[data-theme="dark"] .section-title { color: #9aa0b4; }

html[data-theme="dark"] .km-range-btn,
html[data-theme="dark"] .period-btn {
    background: #252a38;
    border-color: #3a4055;
    color: #9aa0b4;
}

html[data-theme="dark"] .km-range-btn:hover { color: #4ade80; border-color: #4ade80; }
html[data-theme="dark"] .period-btn:hover   { color: #5bc8ff; border-color: #5bc8ff; }

html[data-theme="dark"] .due-badge-empty.due-editable:hover { background: #2d3347; color: #dde3ef; }

html[data-theme="dark"] .veh-stat-accent .veh-stat-label,
html[data-theme="dark"] .veh-stat-accent .veh-stat-val { color: #5bc8ff; }

/* ── Véhicules : statistiques ────────────────── */

html[data-theme="dark"] .chart-section {
    background: #1e2230;
    border-color: #2d3347;
    box-shadow: none;
}

html[data-theme="dark"] .bar-label .veh-name,
html[data-theme="dark"] .bar-meta .bar-km { color: #dde3ef; }
html[data-theme="dark"] .bar-meta         { color: #9aa0b4; }
html[data-theme="dark"] .bar-track        { background: #252a38; }
html[data-theme="dark"] .bar-fill.zero    { background: #2d3347; }

/* ── Workflow sinistres / dysfonctionnements ─── */

html[data-theme="dark"] .wf-step + .wf-step::before,
html[data-theme="dark"] .wf-step::after { background: #2d3347; }

html[data-theme="dark"] .wf-circle {
    background: #252a38;
    border-color: #3a4055;
    color: #7a8298;
}

html[data-theme="dark"] .wf-step.wf-current .wf-circle {
    background: #1e2230;
    border-color: #00a8ff;
    color: #00a8ff;
}

html[data-theme="dark"] .wf-step.wf-done .wf-label { color: #4ade80; }

html[data-theme="dark"] .step-card {
    background: #1e2230;
    border-color: #2d3347;
}

html[data-theme="dark"] .step-card.done    { background: #0d2e1a; border-color: #1a5c35; }
html[data-theme="dark"] .step-card.pending { background: #191d29; }
html[data-theme="dark"] .step-meta strong  { color: #dde3ef; }
html[data-theme="dark"] .info-item .val    { color: #dde3ef; }

/* ── Dropdowns d'administration ──────────────── */

html[data-theme="dark"] .adropdown-menu {
    background: #1e2230;
    border-color: #2d3347;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}

html[data-theme="dark"] .adropdown-item                { color: #dde3ef; }
html[data-theme="dark"] .adropdown-item:hover          { background: #252a38; }
html[data-theme="dark"] .adropdown-divider             { background: #2d3347; }
html[data-theme="dark"] .adropdown-item-warning        { color: #fbbf24; }
html[data-theme="dark"] .adropdown-item-warning:hover  { background: #2e1f00; }
html[data-theme="dark"] .adropdown-item-success        { color: #4ade80; }
html[data-theme="dark"] .adropdown-item-success:hover  { background: #0d2e1a; }
html[data-theme="dark"] .adropdown-item-danger,
html[data-theme="dark"] .adropdown-item-danger-soft    { color: #f87171; }
html[data-theme="dark"] .adropdown-item-danger:hover,
html[data-theme="dark"] .adropdown-item-danger-soft:hover  { background: #2e0d0d; }
html[data-theme="dark"] .adropdown-item-warning-soft       { color: #fbbf24; }
html[data-theme="dark"] .adropdown-item-warning-soft:hover { background: #2e1f00; }

html[data-theme="dark"] .info-value { color: #dde3ef; }

/* ── Vérifications kits / stock ──────────────── */

html[data-theme="dark"] .kv-header-meta { color: #9aa0b4; }
html[data-theme="dark"] .kv-meta-value  { color: #dde3ef; }
html[data-theme="dark"] .qty-new-down,
html[data-theme="dark"] .kv-exp-toggle,
html[data-theme="dark"] .btn-cancel-verif { color: #f87171; }

html[data-theme="dark"] .kv-qty-input,
html[data-theme="dark"] .kv-batchnum-input,
html[data-theme="dark"] .kv-expiry-input {
    background: #252a38;
    border-color: #3a4055;
    color: #dde3ef;
}

html[data-theme="dark"] .kv-qty-input:disabled { background: #191d29; color: #5a6070; }
html[data-theme="dark"] .btn-save-items:hover  { background: #0d2035; border-color: #00a8ff; }
html[data-theme="dark"] .btn-shopping:hover    { background: #252a38; }

html[data-theme="dark"] .kv-shopping-row.row-expired { background: #2e1212; }
html[data-theme="dark"] .kv-shopping-row.row-missing { background: #0d2035; }
html[data-theme="dark"] .kv-shopping-row.row-ok      { background: #0d2e1a; }
html[data-theme="dark"] .row-expired .kv-shopping-qty { color: #f87171; }
html[data-theme="dark"] .row-missing .kv-shopping-qty { color: #5bc8ff; }
html[data-theme="dark"] .kv-shop-num       { color: #9aa0b4; }
html[data-theme="dark"] .kv-shop-deficit,
html[data-theme="dark"] .kv-shop-verif-diff.neg { color: #f87171; }

/* ── Commandes ───────────────────────────────── */

html[data-theme="dark"] .order-step-label.done,
html[data-theme="dark"] .consult-step-label.done { color: #4ade80; }

html[data-theme="dark"] .purchase-group-header { background: #252a38; }
html[data-theme="dark"] .purchase-add-row      { background: #191d29; }
html[data-theme="dark"] .purchase-items-table td { border-top-color: #2d3347; }

html[data-theme="dark"] .purchase-items-table input,
html[data-theme="dark"] .purchase-items-table select,
html[data-theme="dark"] .achat-mini input,
html[data-theme="dark"] .achat-mini select,
html[data-theme="dark"] .filter-bar input,
html[data-theme="dark"] .filter-bar select {
    background: #252a38;
    border-color: #3a4055;
    color: #dde3ef;
}

html[data-theme="dark"] .delivery-card.received .delivery-card-header { background: #0d2e1a; }
html[data-theme="dark"] .info-card h3    { color: #dde3ef; }
html[data-theme="dark"] .info-total      { color: #5bc8ff; }
html[data-theme="dark"] .achat-qty-val   { color: #dde3ef; }
html[data-theme="dark"] .qty-btn:hover   { background: #2d3347; }
html[data-theme="dark"] .other-add-inline { background: #2e1f00; }
html[data-theme="dark"] .achat-ordered-summary.warn { background: #2e1f00; color: #fbbf24; }

html[data-theme="dark"] .ref-search-drop {
    background: #1e2230;
    border-color: #2d3347;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
html[data-theme="dark"] .ref-search-selected { background: #252a38; }

/* ── Stock : en commande, lots, références ───── */

html[data-theme="dark"] .order-header,
html[data-theme="dark"] .order-footer { background: #252a38; color: #dde3ef; }
html[data-theme="dark"] .order-code-link       { color: #5bc8ff; }
html[data-theme="dark"] .order-code-link:hover { color: #00a8ff; }
html[data-theme="dark"] .order-code-plain,
html[data-theme="dark"] .qty-main              { color: #dde3ef; }

html[data-theme="dark"] .exp-ok    { color: #4ade80; }
html[data-theme="dark"] .exp-past  { color: #f87171; }
html[data-theme="dark"] .usage-out { color: #f87171; }
html[data-theme="dark"] .badge-on-the-way { background: #0d2035; color: #5bc8ff; }
html[data-theme="dark"] #stock-table td:nth-child(7) { color: #9aa0b4; }

html[data-theme="dark"] .stat-box-out,
html[data-theme="dark"] .stat-box-expired { background: #2e1212; color: #f87171; }
html[data-theme="dark"] .stat-box-out .stat-total { color: #f87171; }
html[data-theme="dark"] .ref-barcode-val  { color: #dde3ef; }
html[data-theme="dark"] .qty-calibrate button { background: #252a38; border-color: #3a4055; color: #dde3ef; }
html[data-theme="dark"] .qty-calibrate .btn-adj:hover     { background: #2d3347; }
html[data-theme="dark"] .qty-calibrate .btn-confirm:hover { background: #0d2e1a; }
html[data-theme="dark"] .ie-info-tip:hover { background: #252a38; }

html[data-theme="dark"] .tsm-chip,
html[data-theme="dark"] .tsm-item { background: #252a38; color: #dde3ef; border-color: #2d3347; }
html[data-theme="dark"] .tsm-item:hover      { background: #2d3347; }
html[data-theme="dark"] .tsm-item.tsm-current { background: #0d2035; color: #5bc8ff; }

html[data-theme="dark"] .kit-select-dropdown {
    background: #1e2230;
    border-color: #2d3347;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
html[data-theme="dark"] .kit-select-option:hover { background: #252a38; }
html[data-theme="dark"] .kit-type-image      { background: #252a38; }
html[data-theme="dark"] .transfer-summary strong { color: #dde3ef; }
html[data-theme="dark"] .compliance-item     { background: #252a38; }
html[data-theme="dark"] .maint-table th      { background: #252a38; }
html[data-theme="dark"] .report-clip         { background: #252a38; color: #dde3ef; }
html[data-theme="dark"] .dm-compact-header .dm-subtitle { color: #9aa0b4; }

/* ── Inventaire kit (/app) ───────────────────── */

html[data-theme="dark"] .ki-back-btn        { color: #9aa0b4; }
html[data-theme="dark"] .ki-back-btn:hover  { background: #252a38; }
html[data-theme="dark"] .ki-kit-name,
html[data-theme="dark"] .v-qty-expected .v-qty-current { color: #dde3ef; }
html[data-theme="dark"] .ki-inv-banner strong { color: #fbbf24; }
html[data-theme="dark"] .ki-progress-bar-track { background: #2d3347; }
html[data-theme="dark"] .ki-progress-label,
html[data-theme="dark"] .ki-activated-count    { color: #9aa0b4; }
html[data-theme="dark"] #ki-action-bar { background: #1a1e28; border-top-color: #2d3347; }
html[data-theme="dark"] .v-loc3-group-sep::after { background: #2d3347; }

/* ── Authentification (mot de passe oublié / reset / profil) ── */

html[data-theme="dark"] .auth-card {
    background: #1e2230;
    color: #dde3ef;
    box-shadow: 0 16px 48px rgba(0,0,0,.5);
}
html[data-theme="dark"] .auth-card label,
html[data-theme="dark"] .pwd-form label { color: #9aa0b4; }
html[data-theme="dark"] .stat-pill      { background: #252a38; color: #dde3ef; }

/* ── Catalogue / références ──────────────────── */

html[data-theme="dark"] .bdpm-not-imported { background: #2e1f00; color: #fbbf24; }
html[data-theme="dark"] .type-row-new      { background: #2e1f00; }
html[data-theme="dark"] .cat-wizard-step-title { color: #dde3ef; }

html[data-theme="dark"] .cat-card {
    background: #1e2230;
    border-color: #2d3347;
}
html[data-theme="dark"] .cat-card-header h2,
html[data-theme="dark"] .editable-name        { color: #dde3ef; }
html[data-theme="dark"] .editable-name:hover  { background: #252a38; }
html[data-theme="dark"] .editable-name:focus  { background: #2d3347; }
html[data-theme="dark"] .row-saved td:first-child .editable-name { background: #0d2e1a; }

/* ── Seuils / types de dispositifs ───────────── */

html[data-theme="dark"] .col-selector { background: #252a38; border-color: #2d3347; }
html[data-theme="dark"] .print-link   { color: #5bc8ff; }

/* ── Fonctionnalité désactivée ───────────────── */

html[data-theme="dark"] .feature-disabled-box {
    background: #1e2230;
    color: #dde3ef;
}
html[data-theme="dark"] .feature-disabled-box h1 { color: #dde3ef; }

/* ── Annonces (admin) ────────────────────────── */

html[data-theme="dark"] .ann-page h1          { color: #dde3ef; }
html[data-theme="dark"] .ann-content-preview  { color: #9aa0b4; }
html[data-theme="dark"] .ann-status-msg.err   { color: #f87171; }

/* ── Kits : dates de vérification ────────────── */

html[data-theme="dark"] .sk-kit-verif-date.none { color: #f87171; }

/* ── Tenues : emprunteurs ────────────────────── */

html[data-theme="dark"] .add-type-header        { background: #252a38; }
html[data-theme="dark"] .add-type-header:hover  { background: #2d3347; }
html[data-theme="dark"] .sz-chip:hover          { background: #2d3347; }
html[data-theme="dark"] .sz-chip .crem:hover    { color: #f87171; }

/* =========================================================
   MODE NUIT — styles inline des vues
   Un style="" inline l'emporte sur toute feuille de style : seul
   !important peut le neutraliser. Fonds et textes sont remappés
   par paires pour qu'un badge pastel bascule toujours en entier.
========================================================= */

/* Texte principal → #dde3ef */
html[data-theme="dark"] [style*="color:#111"],
html[data-theme="dark"] [style*="color:#222"],
html[data-theme="dark"] [style*="color:#333"],
html[data-theme="dark"] [style*="color:#1a1a2e"],
html[data-theme="dark"] [style*="color:#1a1f2e"],
html[data-theme="dark"] [style*="color:#2f3640"],
html[data-theme="dark"] [style*="color:#1e2a3a"],
html[data-theme="dark"] [style*="color:#2c3e50"]
{
    color: #dde3ef !important;
}

/* Texte secondaire → #9aa0b4 */
html[data-theme="dark"] [style*="color:#444"],
html[data-theme="dark"] [style*="color:#555"],
html[data-theme="dark"] [style*="color:#374151"],
html[data-theme="dark"] [style*="color:#475569"],
html[data-theme="dark"] [style*="color:#4a5568"],
html[data-theme="dark"] [style*="color:#4b5563"],
html[data-theme="dark"] [style*="color:#6b7280"],
html[data-theme="dark"] [style*="color:#6c757d"]
{
    color: #9aa0b4 !important;
}

/* Texte discret → #7a8298 */
html[data-theme="dark"] [style*="color:#666"],
html[data-theme="dark"] [style*="color:#777"],
html[data-theme="dark"] [style*="color:#64748b"]
{
    color: #8b93a7 !important;
}

/* Liens / accents bleus → #5bc8ff */
html[data-theme="dark"] [style*="color:#2c5fc7"],
html[data-theme="dark"] [style*="color:#0078c8"],
html[data-theme="dark"] [style*="color:#2563eb"],
html[data-theme="dark"] [style*="color:#1a56db"],
html[data-theme="dark"] [style*="color:#0d6efd"],
html[data-theme="dark"] [style*="color:#1d4ed8"],
html[data-theme="dark"] [style*="color:#3d5aee"],
html[data-theme="dark"] [style*="color:#0369a1"],
html[data-theme="dark"] [style*="color:#1e3a8a"],
html[data-theme="dark"] [style*="color:#1e40af"],
html[data-theme="dark"] [style*="color:#0077bb"],
html[data-theme="dark"] [style*="color:#004f8a"],
html[data-theme="dark"] [style*="color:#1a6fc4"],
html[data-theme="dark"] [style*="color:#3a5fcc"]
{
    color: #5bc8ff !important;
}

/* Violet → #a78bfa */
html[data-theme="dark"] [style*="color:#6c5ce7"],
html[data-theme="dark"] [style*="color:#6741d9"],
html[data-theme="dark"] [style*="color:#6c2cc7"],
html[data-theme="dark"] [style*="color:#5b21b6"]
{
    color: #a78bfa !important;
}

/* Succès / vert → #4ade80 */
html[data-theme="dark"] [style*="color:#1a7a32"],
html[data-theme="dark"] [style*="color:#16a34a"],
html[data-theme="dark"] [style*="color:#15803d"],
html[data-theme="dark"] [style*="color:#1a6b3a"]
{
    color: #4ade80 !important;
}

/* Erreur / rouge → #f87171 */
html[data-theme="dark"] [style*="color:#dc2626"],
html[data-theme="dark"] [style*="color:#c0392b"],
html[data-theme="dark"] [style*="color:#991b1b"],
html[data-theme="dark"] [style*="color:#c62828"],
html[data-theme="dark"] [style*="color:#ef4444"],
html[data-theme="dark"] [style*="color:#8b1a1a"],
html[data-theme="dark"] [style*="color:#b91c1c"],
html[data-theme="dark"] [style*="color:#dc3545"]
{
    color: #f87171 !important;
}

/* Alerte / orange → #fb923c */
html[data-theme="dark"] [style*="color:#c2410c"],
html[data-theme="dark"] [style*="color:#e65100"],
html[data-theme="dark"] [style*="color:#c05621"]
{
    color: #fb923c !important;
}

/* Avertissement / ambre → #fbbf24 */
html[data-theme="dark"] [style*="color:#92400e"],
html[data-theme="dark"] [style*="color:#b45309"],
html[data-theme="dark"] [style*="color:#c17b00"],
html[data-theme="dark"] [style*="color:#854d0e"],
html[data-theme="dark"] [style*="color:#7a4e00"],
html[data-theme="dark"] [style*="color:#a06200"],
html[data-theme="dark"] [style*="color:#856404"],
html[data-theme="dark"] [style*="color:#d97706"],
html[data-theme="dark"] [style*="color:#78350f"],
html[data-theme="dark"] [style*="color:#7b5a00"]
{
    color: #fbbf24 !important;
}

/* Surfaces neutres → #252a38 */
html[data-theme="dark"] [style*="background:#f9fafb"],
html[data-theme="dark"] [style*="background:#f8f9fa"],
html[data-theme="dark"] [style*="background:#f9f9f9"],
html[data-theme="dark"] [style*="background:#f4f5f7"],
html[data-theme="dark"] [style*="background:#f3f4f6"],
html[data-theme="dark"] [style*="background:#f5f5f5"],
html[data-theme="dark"] [style*="background:#f4f6f9"],
html[data-theme="dark"] [style*="background:#f0f3f8"],
html[data-theme="dark"] [style*="background:#f8fafc"],
html[data-theme="dark"] [style*="background:#f1f2f6"],
html[data-theme="dark"] [style*="background:#fafafa"],
html[data-theme="dark"] [style*="background:#f8faff"],
html[data-theme="dark"] [style*="background:#f7f8fa"],
html[data-theme="dark"] [style*="background:#f0f2f5"],
html[data-theme="dark"] [style*="background:#e8edf2"]
{
    background: #252a38 !important;
}

/* Gris moyen → #3a4055 */
html[data-theme="dark"] [style*="background:#ccc"]
{
    background: #3a4055 !important;
}

/* Fonds rouges → #2e1212 */
html[data-theme="dark"] [style*="background:#fef2f2"],
html[data-theme="dark"] [style*="background:#fff5f5"],
html[data-theme="dark"] [style*="background:#fee2e2"],
html[data-theme="dark"] [style*="background:#fff0f0"]
{
    background: #2e1212 !important;
}

/* Fonds ambre → #2e1f00 */
html[data-theme="dark"] [style*="background:#fef9c3"],
html[data-theme="dark"] [style*="background:#fff8e8"],
html[data-theme="dark"] [style*="background:#ffedd5"],
html[data-theme="dark"] [style*="background:#fff3e0"],
html[data-theme="dark"] [style*="background:#fff3cd"],
html[data-theme="dark"] [style*="background:#fef3c7"],
html[data-theme="dark"] [style*="background:#fff8e1"],
html[data-theme="dark"] [style*="background:#fffbeb"]
{
    background: #2e1f00 !important;
}

/* Fonds verts → #0d2e1a */
html[data-theme="dark"] [style*="background:#dcfce7"],
html[data-theme="dark"] [style*="background:#e8f8f0"],
html[data-theme="dark"] [style*="background:#eafaf1"],
html[data-theme="dark"] [style*="background:#f0fdf4"]
{
    background: #0d2e1a !important;
}

/* Fonds bleus → #0d2035 */
html[data-theme="dark"] [style*="background:#e8f0fe"],
html[data-theme="dark"] [style*="background:#f0f9ff"],
html[data-theme="dark"] [style*="background:#e8f0ff"],
html[data-theme="dark"] [style*="background:#e8f4ff"],
html[data-theme="dark"] [style*="background:#eff6ff"],
html[data-theme="dark"] [style*="background:#f0f7ff"],
html[data-theme="dark"] [style*="background:#dbeafe"],
html[data-theme="dark"] [style*="background:#e8f4fd"],
html[data-theme="dark"] [style*="background:#eef2fc"]
{
    background: #0d2035 !important;
}

/* Fonds violets → #241a3d */
html[data-theme="dark"] [style*="background:#f0ecff"],
html[data-theme="dark"] [style*="background:#f3f0ff"]
{
    background: #241a3d !important;
}

/* Blanc pur : ancré sur le « ; » pour ne pas attraper #fff3e0, #fff8e8, etc. */
html[data-theme="dark"] [style*="background:#fff;"],
html[data-theme="dark"] [style$="background:#fff"]
{
    background: #252a38 !important;
}

/* ── Conteneurs dont un enfant / un :hover passe en sombre ──
   Sans ces bases, l'enfant clair se retrouvait sur un fond
   resté clair (ou l'inverse au survol). */

html[data-theme="dark"] .ki-inv-banner {
    background: #2e1f00;
    border-color: #5c3a00;
    color: #fbbf24;
}

html[data-theme="dark"] .v-qty-expected {
    background: #252a38;
    color: #9aa0b4;
}

html[data-theme="dark"] .transfer-summary {
    background: #252a38;
    border-color: #2d3347;
    color: #9aa0b4;
}

html[data-theme="dark"] .btn-save-items,
html[data-theme="dark"] .btn-shopping {
    background: #1e2230;
    border-color: #3a4055;
    color: #dde3ef;
}

html[data-theme="dark"] .qty-btn {
    background: #2d3347;
    color: #dde3ef;
}

/* =========================================================
   MODE NUIT — pastilles et badges pastel des vues
   Fond clair + texte foncé : lisibles, mais ils ressortaient en
   taches lumineuses sur fond sombre. Remappés par teinte.
   (Les vues qui gèrent déjà leur propre thème sombre sont exclues.)
========================================================= */

html[data-theme="dark"] .v-loc2-subheader {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .v-cat-sep {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .v-ref-loc-badge {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .v-ref-loc3-badge {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .type-IN {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .type-OUT {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .type-KIT_MOVE {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .type-KIT_IN {
    background: #241a3d;
    color: #a78bfa;
}
html[data-theme="dark"] .type-EXPIRED {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .type-CALIBRATE_IN {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .type-CALIBRATE_OUT {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .kit-select-option.selected {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .badge-surv {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .badge-comm-ok {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .badge-comm-no {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .voie-badge {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .toggle-btn:hover {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .toggle-btn.open {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .prod-count-badge {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] #matrix-table thead tr.proc-row th {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .repair-chip {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .repair-chip.has-repairs {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .feature-disabled-icon {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .type-pill.sinistre {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .type-pill.dysfonctionnement {
    background: #2e1f00;
    color: #f87171;
}
html[data-theme="dark"] .badge-global {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .badge-structure {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .badge-pending {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .badge-collecte {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .badge-validated {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .badge-cancelled {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .badge-expired-item {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .badge-modified-item {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .badge-added-item {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .badge-ok-item {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .kv-warning-box {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .kv-info-box {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .tag-verified {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .kit-barcode-val {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .kit-header-value {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .transfer-warning {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .badge-device-type {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .verif-badge.ok {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .verif-badge.warn {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .verif-badge.none {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .op-maintenance {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .op-reparation {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .op-verification_simple {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .op-verification_complete {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .op-defaillance {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .order-step-dot {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .purchase-items-table th {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .cat-pill {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .achat-mini th {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .price-badge.ttc {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .consult-dot {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .compliance-badge.c-ok {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .compliance-badge.c-ko {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .compliance-badge.c-warn {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .compliance-badge.c-na {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .qty-calibrate button.btn-confirm {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .btn-retire:hover {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .loc1-separator td {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .loc2-separator td {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .hors-dotation-sep td {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .row-reason-alert {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .row-reason-warn {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .badge-hors-dotation {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .qty-calibrate button:last-child {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .btn-delete-threshold:hover {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .ie-toggle.toggle-on {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .ie-toggle.toggle-off {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .ie-toggle-ro.toggle-on {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .ie-toggle-ro.toggle-off {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .lot-badge {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .qty-calibrate .btn-adj {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .qty-calibrate .btn-confirm {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .ann-badge--info {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .ann-badge--danger {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .ann-badge--banner {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .ann-badge--flash {
    background: #241a3d;
    color: #a78bfa;
}
html[data-theme="dark"] .ann-badge--active {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .ann-badge--inactive {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .cat-action:hover {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .badge-usable {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .badge-not-usable {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .order-external-badge {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .delivery-tag.pending {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .delivery-tag.received {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .lines-table th {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .supplier-chip {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .badge-vehicle {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .badge-kit {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .op-desinfection_periodique {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .op-desinfection_trimestrielle {
    background: #241a3d;
    color: #a78bfa;
}
html[data-theme="dark"] .op-verification_materiel {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .qr-url-box {
    background: #252a38;
    color: #9aa0b4;
}
html[data-theme="dark"] .sz-chip.sel {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .rank-badge {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .rank-badge.rank-1 {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .rank-badge.rank-2 {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .rank-badge.rank-3 {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .days-badge.warn {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .days-badge.danger {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .badge-km {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .maint-controle_technique {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .maint-controle_antipollution {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .maint-revision {
    background: #241a3d;
    color: #a78bfa;
}
html[data-theme="dark"] .maint-sinistre {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .maint-reparation {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .maint-controle_complementaire {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .maint-operation_diverse {
    background: #0d2035;
    color: #5bc8ff;
}
html[data-theme="dark"] .maint-dysfonctionnement {
    background: #2e1f00;
    color: #f87171;
}
html[data-theme="dark"] .due-ok {
    background: #0d2e1a;
    color: #4ade80;
}
html[data-theme="dark"] .due-warning {
    background: #2e1f00;
    color: #fb923c;
}
html[data-theme="dark"] .due-alert {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .due-overdue {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .due-critical {
    background: #2e1f00;
    color: #f87171;
}
html[data-theme="dark"] .inc-type-sinistre {
    background: #2e1212;
    color: #f87171;
}
html[data-theme="dark"] .inc-type-dysfonctionnement {
    background: #2e1f00;
    color: #f87171;
}

/* Survols dont le fond passe en sombre : le bleu de la vue (#0078c8)
   n'y contraste pas assez, on l'éclaircit. */
html[data-theme="dark"] .ie-info-tip:hover,
html[data-theme="dark"] .kit-select-option:hover {
    color: #5bc8ff;
}
