/* ==========================================================================
   UWEZO : palettes des thèmes (chargée en dernier)
   Chaque thème ne définit que des couleurs (--t-*). Les règles en bas de fichier
   les appliquent au shell, aux boutons, aux tableaux et aux indicateurs.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Valeurs par défaut (thème Clair) et thèmes clairs à barre latérale blanche
   -------------------------------------------------------------------------- */
html {
    --t-brand: #2563eb;
    --t-brand-dark: #1d4ed8;
    --t-brand-soft: #eff6ff;
    --t-brand-ink: #1e40af;
    --t-bg: #eef1f6;
    --t-surface: #ffffff;
    --t-surface-2: #f7f8fb;
    --t-line: #e3e8f0;
    --t-text: #0f172a;
    --t-text-2: #334155;
    --t-muted: #64748b;
    --t-faint: #94a3b8;
    --t-table-head: #f4f7fc;
    --t-table-head-text: #475569;
    /* Barre latérale */
    --t-side-bg: #ffffff;
    --t-side-line: #e3e8f0;
    --t-side-text: #334155;
    --t-side-muted: #64748b;
    --t-side-hover: #f4f6fa;
    --t-side-active-bg: #eff6ff;
    --t-side-active-text: #1e40af;
    --t-side-active-icon: #2563eb;
    --t-side-brand-text: #0f172a;
}

html[data-theme="odoo"] { --t-brand: #714b67; --t-brand-dark: #5a3a52; --t-brand-soft: #f6eef3; --t-brand-ink: #5a3a52; --t-bg: #f7f3f6; --t-table-head: #f8f1f5; --t-side-active-bg: #f6eef3; --t-side-active-text: #5a3a52; --t-side-active-icon: #714b67; }
html[data-theme="sap_fiori"] { --t-brand: #0a6ed1; --t-brand-dark: #0854a0; --t-brand-soft: #e8f2fc; --t-brand-ink: #0854a0; --t-bg: #f2f6fa; --t-table-head: #eef5fc; --t-side-active-bg: #e8f2fc; --t-side-active-text: #0854a0; --t-side-active-icon: #0a6ed1; }
html[data-theme="oracle_cloud"] { --t-brand: #c74634; --t-brand-dark: #a33828; --t-brand-soft: #fbece9; --t-brand-ink: #93301f; --t-bg: #f7f4f1; --t-table-head: #f8f1ee; --t-side-active-bg: #fbece9; --t-side-active-text: #93301f; --t-side-active-icon: #c74634; }
html[data-theme="sage_professional"] { --t-brand: #007a33; --t-brand-dark: #006028; --t-brand-soft: #e6f4ec; --t-brand-ink: #005a25; --t-bg: #f2f8f4; --t-table-head: #eef7f1; --t-side-active-bg: #e6f4ec; --t-side-active-text: #005a25; --t-side-active-icon: #007a33; }
html[data-theme="zoho_modern"] { --t-brand: #e42527; --t-brand-dark: #c01c1e; --t-brand-soft: #fdeaea; --t-brand-ink: #a5181a; --t-bg: #f8f5f5; --t-table-head: #fbf1f1; --t-side-active-bg: #fdeaea; --t-side-active-text: #a5181a; --t-side-active-icon: #e42527; }
html[data-theme="graphite"] { --t-brand: #374151; --t-brand-dark: #1f2937; --t-brand-soft: #eceef1; --t-brand-ink: #1f2937; --t-bg: #f1f2f4; --t-table-head: #f1f3f5; --t-side-active-bg: #e7e9ed; --t-side-active-text: #111827; --t-side-active-icon: #374151; }
html[data-theme="copper"] { --t-brand: #b45309; --t-brand-dark: #92400e; --t-brand-soft: #fbefe2; --t-brand-ink: #8a3c0b; --t-bg: #f9f4ee; --t-table-head: #fbf2e8; --t-side-active-bg: #fbefe2; --t-side-active-text: #8a3c0b; --t-side-active-icon: #b45309; }
html[data-theme="indigo"] { --t-brand: #4338ca; --t-brand-dark: #3730a3; --t-brand-soft: #ecebfd; --t-brand-ink: #3730a3; --t-bg: #f3f3fb; --t-table-head: #f0effd; --t-side-active-bg: #ecebfd; --t-side-active-text: #3730a3; --t-side-active-icon: #4338ca; }
html[data-theme="forest"] { --t-brand: #166534; --t-brand-dark: #14532d; --t-brand-soft: #e5f3e8; --t-brand-ink: #14532d; --t-bg: #f2f7f2; --t-table-head: #edf6ef; --t-side-active-bg: #e5f3e8; --t-side-active-text: #14532d; --t-side-active-icon: #166534; }
html[data-theme="burgundy"] { --t-brand: #9f1239; --t-brand-dark: #881337; --t-brand-soft: #fbe8ee; --t-brand-ink: #7f1233; --t-bg: #f9f3f5; --t-table-head: #fbeff3; --t-side-active-bg: #fbe8ee; --t-side-active-text: #7f1233; --t-side-active-icon: #9f1239; }
html[data-theme="sand"] { --t-brand: #a16207; --t-brand-dark: #854d0e; --t-brand-soft: #f8f0dc; --t-brand-ink: #7c4a0c; --t-bg: #f8f4ec; --t-table-head: #f9f2e3; --t-side-active-bg: #f8f0dc; --t-side-active-text: #7c4a0c; --t-side-active-icon: #a16207; }

/* --------------------------------------------------------------------------
   2. Thèmes à barre latérale colorée (inspirés de Cargo)
   -------------------------------------------------------------------------- */
html[data-theme="navy_premium"] {
    --t-brand: #1d4ed8; --t-brand-dark: #0f3d91; --t-brand-soft: #eaf2ff; --t-brand-ink: #0f3d91; --t-bg: #f1f5fb;
    --t-table-head: #eaf2ff; --t-table-head-text: #0f3d91;
    --t-side-bg: linear-gradient(180deg, #082f6f 0%, #0b3a88 60%, #0f3d91 100%);
    --t-side-line: rgba(255, 255, 255, .12); --t-side-text: #dbe7ff; --t-side-muted: #9fb6e6; --t-side-hover: rgba(255, 255, 255, .08);
    --t-side-active-bg: #1d4ed8; --t-side-active-text: #ffffff; --t-side-active-icon: #ffffff; --t-side-brand-text: #ffffff;
}
html[data-theme="emerald_business"] {
    --t-brand: #0f8a55; --t-brand-dark: #0f6b3f; --t-brand-soft: #e8f7ef; --t-brand-ink: #0f6b3f; --t-bg: #f1f7f4;
    --t-table-head: #e8f7ef; --t-table-head-text: #0f6b3f;
    --t-side-bg: linear-gradient(180deg, #063a24 0%, #0a5134 60%, #0f6b3f 100%);
    --t-side-line: rgba(255, 255, 255, .12); --t-side-text: #d6f5e6; --t-side-muted: #8fcfb0; --t-side-hover: rgba(255, 255, 255, .08);
    --t-side-active-bg: #10b981; --t-side-active-text: #ffffff; --t-side-active-icon: #ffffff; --t-side-brand-text: #ffffff;
}
html[data-theme="red_executive"] {
    --t-brand: #dc2626; --t-brand-dark: #b91c1c; --t-brand-soft: #fee2e2; --t-brand-ink: #991b1b; --t-bg: #f4f4f6;
    --t-table-head: #f3f4f6; --t-table-head-text: #111827;
    --t-side-bg: linear-gradient(180deg, #05070d 0%, #0b0f19 60%, #111827 100%);
    --t-side-line: rgba(255, 255, 255, .1); --t-side-text: #e5e7eb; --t-side-muted: #9ca3af; --t-side-hover: rgba(255, 255, 255, .07);
    --t-side-active-bg: #dc2626; --t-side-active-text: #ffffff; --t-side-active-icon: #ffffff; --t-side-brand-text: #ffffff;
}

/* --------------------------------------------------------------------------
   3. Sombre et contraste élevé
   -------------------------------------------------------------------------- */
html[data-theme="odoo_enterprise"] {
    color-scheme: dark;
    --t-brand: #3b82f6; --t-brand-dark: #2563eb; --t-brand-soft: rgba(59, 130, 246, .16); --t-brand-ink: #93c5fd;
    --t-bg: #0b1220; --t-surface: #111a2c; --t-surface-2: #16213a; --t-line: #24314a;
    --t-text: #e5e9f0; --t-text-2: #cbd5e1; --t-muted: #94a3b8; --t-faint: #64748b;
    --t-table-head: #16213a; --t-table-head-text: #cbd5e1;
    --t-side-bg: #0d1626; --t-side-line: #1f2b42; --t-side-text: #cbd5e1; --t-side-muted: #8193ad; --t-side-hover: #16213a;
    --t-side-active-bg: rgba(59, 130, 246, .2); --t-side-active-text: #bfdbfe; --t-side-active-icon: #60a5fa; --t-side-brand-text: #f1f5f9;
}
html[data-theme="high_contrast"] {
    --t-brand: #000000; --t-brand-dark: #000000; --t-brand-soft: #e5e5e5; --t-brand-ink: #000000; --t-bg: #ffffff;
    --t-line: #000000; --t-text: #000000; --t-text-2: #000000; --t-muted: #1f1f1f; --t-faint: #333333;
    --t-table-head: #000000; --t-table-head-text: #ffffff;
    --t-side-bg: #ffffff; --t-side-line: #000000; --t-side-text: #000000; --t-side-muted: #000000; --t-side-hover: #e5e5e5;
    --t-side-active-bg: #000000; --t-side-active-text: #ffffff; --t-side-active-icon: #ffffff; --t-side-brand-text: #000000;
}

/* --------------------------------------------------------------------------
   4. Raccordement aux variables du design (premium, app, Bootstrap)
   -------------------------------------------------------------------------- */
html[data-theme], html {
    --up-brand: var(--t-brand); --up-brand-dark: var(--t-brand-dark); --up-brand-soft: var(--t-brand-soft); --up-brand-ink: var(--t-brand-ink);
    --up-bg: var(--t-bg); --up-surface: var(--t-surface); --up-surface-2: var(--t-surface-2); --up-line: var(--t-line);
    --up-text: var(--t-text); --up-text-2: var(--t-text-2); --up-muted: var(--t-muted); --up-faint: var(--t-faint);
    --u-brand: var(--t-brand); --u-brand-hover: var(--t-brand-dark); --u-brand-soft: var(--t-brand-soft); --u-brand-ink: var(--t-brand-ink);
    --u-bg: var(--t-bg); --u-surface: var(--t-surface); --u-surface-2: var(--t-surface-2); --u-border: var(--t-line);
    --u-text: var(--t-text); --u-text-2: var(--t-text-2); --u-muted: var(--t-muted); --u-faint: var(--t-faint);
    --bs-body-bg: var(--t-bg); --bs-body-color: var(--t-text); --bs-border-color: var(--t-line);
    --bs-link-color: var(--t-brand); --bs-link-hover-color: var(--t-brand-dark);
}

/* Fond, textes et surfaces */
html body.uwz-app.erp-body, html body.uwz-app .erp-main { background: var(--t-bg) !important; color: var(--t-text) !important; }
html body.uwz-app :is(.erp-card, .card, .uwz-kpi, .uwz-pos__order, .uwz-menu__panel, .dropdown-menu, .modal-content, .uw-modal-card) {
    background-color: var(--t-surface) !important; border-color: var(--t-line) !important; color: var(--t-text) !important;
}
html body.uwz-app :is(.erp-card-header, .card-header) { background: var(--t-surface) !important; border-color: var(--t-line) !important; }
html body.uwz-app .erp-topbar.uwz-topbar { background: var(--t-surface) !important; border-color: var(--t-line) !important; }
html body.uwz-app :is(h1, h2, h3, h4, h5, .erp-page-title, .erp-card-title) { color: var(--t-text) !important; }
html body.uwz-app :is(.erp-page-subtitle, .text-muted, .uwz-kpi__label, .uwz-kpi__meta) { color: var(--t-muted) !important; }

/* Barre latérale */
html[data-theme] body.uwz-app .erp-sidebar.uwz-sidebar,
html[data-theme] body.uwz-app aside.erp-sidebar {
    background: var(--t-side-bg) !important; background-color: transparent !important;
    border-right: 1px solid var(--t-side-line) !important; color: var(--t-side-text) !important;
}
html[data-theme] body.uwz-app .uwz-sidebar__brand { background: transparent !important; border-color: var(--t-side-line) !important; }
html[data-theme] body.uwz-app .uwz-sidebar__product { color: var(--t-side-brand-text) !important; }
html[data-theme] body.uwz-app .uwz-sidebar__company { color: var(--t-side-muted) !important; }
html[data-theme] body.uwz-app .uwz-sidebar__logo { background: #ffffff !important; border-radius: 8px; }
html[data-theme] body.uwz-app .uwz-sidebar__footer { border-color: var(--t-side-line) !important; }
html[data-theme] body.uwz-app .uwz-nav-item { color: var(--t-side-text) !important; }
html[data-theme] body.uwz-app .uwz-nav-item > .bi:first-child { color: var(--t-side-muted) !important; }
html[data-theme] body.uwz-app .uwz-nav-item:hover { background: var(--t-side-hover) !important; color: var(--t-side-brand-text) !important; }
html[data-theme] body.uwz-app .uwz-nav-item.is-active { background: var(--t-side-active-bg) !important; color: var(--t-side-active-text) !important; box-shadow: inset 3px 0 0 var(--t-side-active-icon) !important; }
html[data-theme] body.uwz-app .uwz-nav-item.is-active > .bi:first-child { color: var(--t-side-active-icon) !important; }
html[data-theme] body.uwz-app .uwz-sidebar__sell { background: var(--t-brand) !important; color: #ffffff !important; }
html[data-theme] body.uwz-app .uwz-sidebar__sell:hover { background: var(--t-brand-dark) !important; }

/* Boutons, liens et éléments actifs */
html body.uwz-app .btn-primary {
    --bs-btn-bg: var(--t-brand); --bs-btn-border-color: var(--t-brand);
    --bs-btn-hover-bg: var(--t-brand-dark); --bs-btn-hover-border-color: var(--t-brand-dark);
    --bs-btn-active-bg: var(--t-brand-dark); --bs-btn-active-border-color: var(--t-brand-dark);
    background-color: var(--t-brand) !important; border-color: var(--t-brand) !important;
}
html body.uwz-app .btn-primary:hover { background-color: var(--t-brand-dark) !important; border-color: var(--t-brand-dark) !important; }
html body.uwz-app a:not(.btn):not(.uwz-nav-item):not(.dropdown-item):not(.uwz-hub__item):not(.uwz-kpi) { color: var(--t-brand); }
html body.uwz-app :is(.uwz-subnav__tab.is-active, .nav-tabs .nav-link.active, .page-item.active .page-link) { color: var(--t-brand-ink) !important; border-color: var(--t-brand) !important; background-color: var(--t-brand-soft) !important; }
html body.uwz-app :is(.form-control, .form-select):focus { border-color: var(--t-brand) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--t-brand) 20%, transparent) !important; }
html body.uwz-app .form-check-input:checked { background-color: var(--t-brand) !important; border-color: var(--t-brand) !important; }
html body.uwz-app .uwz-kpi { border-top-color: var(--t-brand) !important; }
html body.uwz-app .uwz-pos-page .uwz-pos__pay { background: var(--t-brand) !important; }
html body.uwz-app .uwz-pos__modes button.is-on { border-color: var(--t-brand) !important; background: var(--t-brand-soft) !important; color: var(--t-brand-ink) !important; box-shadow: inset 0 0 0 1px var(--t-brand) !important; }
html body.uwz-app .uwz-bars__bar:not(.is-zero) { background: var(--t-brand) !important; }

/* Tableaux */
html body.uwz-app :is(.table, .erp-table) thead th { background: var(--t-table-head) !important; color: var(--t-table-head-text) !important; border-color: var(--t-line) !important; }
html body.uwz-app :is(.table, .erp-table) > :not(caption) > * > * { border-color: var(--t-line) !important; color: var(--t-text); }
html body.uwz-app .table tbody tr:hover > * { background-color: color-mix(in srgb, var(--t-brand) 6%, var(--t-surface)) !important; }

/* Champs en thème sombre */
html[data-theme="odoo_enterprise"] body.uwz-app :is(.form-control, .form-select, .input-group-text, .erp-combo-trigger, .ts-control, input[type="search"], textarea) {
    background-color: var(--t-surface-2) !important; color: var(--t-text) !important; border-color: var(--t-line) !important;
}
html[data-theme="odoo_enterprise"] body.uwz-app .btn-light,
html[data-theme="odoo_enterprise"] body.uwz-app .btn-outline-secondary { background: var(--t-surface-2) !important; color: var(--t-text) !important; border-color: var(--t-line) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app .table tbody tr:nth-of-type(even) > * { background-color: rgba(255, 255, 255, .02) !important; }

/* Contraste élevé : bordures franches */
html[data-theme="high_contrast"] body.uwz-app :is(.erp-card, .card, .uwz-kpi, .form-control, .form-select, .btn) { border-width: 2px !important; }

/* --------------------------------------------------------------------------
   5. Sélecteur de thème (menu du compte)
   -------------------------------------------------------------------------- */
.uwz-themes { padding: 2px 6px 6px; max-height: 340px; overflow-y: auto; }
.uwz-themes__group { margin: 8px 4px 4px; font-size: .6875rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--t-faint); }
.uwz-themes__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.uwz-themes__item {
    display: flex !important; align-items: center; gap: 8px; width: 100%; padding: 6px 8px !important;
    border: 1px solid transparent !important; border-radius: 8px !important; background: transparent !important;
    color: var(--t-text-2) !important; font-size: .8125rem !important; font-weight: 500; text-align: left;
}
.uwz-themes__item:hover { background: var(--t-surface-2) !important; }
.uwz-themes__item.is-on { border-color: var(--t-brand) !important; background: var(--t-brand-soft) !important; color: var(--t-brand-ink) !important; font-weight: 600; }
.uwz-themes__swatch { width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; border: 1px solid rgba(15, 23, 42, .15); }

/* --------------------------------------------------------------------------
   6. Ajustements après revue visuelle
   -------------------------------------------------------------------------- */
html[data-theme] body.uwz-app .uwz-sidebar__footer,
html[data-theme] body.uwz-app .uwz-sidebar__cta { background: transparent !important; }
html[data-theme] body.uwz-app .uwz-sidebar__collapse { color: var(--t-side-muted) !important; background: transparent !important; }
.uwz-themes { max-height: 300px; margin-bottom: 8px; border-bottom: 1px solid var(--t-line); }

/* Sombre : toutes les surfaces restantes */
html[data-theme="odoo_enterprise"] body.uwz-app :is(.table, .erp-table) > :not(caption) > * > * { background-color: var(--t-surface) !important; color: var(--t-text) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app :is(.table, .erp-table) tbody tr:nth-of-type(even) > * { background-color: var(--t-surface-2) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app :is(.table, .erp-table) tbody tr:hover > * { background-color: #1c2944 !important; }
html[data-theme="odoo_enterprise"] body.uwz-app :is(.erp-table-wrap, .table-responsive, .erp-list-toolbar, .erp-auto-table-tools, .erp-filter-card, .erp-card-footer, .uwz-subnav, .uwz-subnav__panel, .uwz-flow__step, .erp-export-suite, .erp-tabs) { background-color: var(--t-surface) !important; border-color: var(--t-line) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app :is(.btn-outline-primary, .btn-outline-dark, .btn-outline-info, .btn-white, .btn-default, .uw-btn-ghost, .uwz-btn-create, .uwz-context, .uwz-cash, .uwz-pos__modes button, .uwz-pos__chips button, .pos-hold, .erp-export-btn) {
    background-color: var(--t-surface-2) !important; color: var(--t-text) !important; border-color: var(--t-line) !important;
}
html[data-theme="odoo_enterprise"] body.uwz-app .uwz-context select { color: var(--t-text) !important; background: transparent !important; }
html[data-theme="odoo_enterprise"] body.uwz-app :is(.uwz-pos-page .pos-product, .uwz-pos__summary, .uwz-pos__client) { background: var(--t-surface) !important; border-color: var(--t-line) !important; color: var(--t-text) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app :is(.pos-product-name, .pos-product-price, .uwz-pos__grand strong, .pos-cart-name, .pos-line-amount) { color: var(--t-text) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app .badge.text-bg-light, html[data-theme="odoo_enterprise"] body.uwz-app .badge.bg-light { background: var(--t-surface-2) !important; color: var(--t-text-2) !important; border-color: var(--t-line) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app :is(.erp-empty-state-icon, .uwz-tile__icon, .uwz-hub__icon, .uwz-person__avatar) { background: var(--t-surface-2) !important; border-color: var(--t-line) !important; color: var(--t-muted) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app .alert-success { background: rgba(16, 185, 129, .12) !important; color: #6ee7b7 !important; border-color: rgba(16, 185, 129, .3) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app .alert-danger { background: rgba(239, 68, 68, .12) !important; color: #fca5a5 !important; border-color: rgba(239, 68, 68, .3) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app .alert-warning { background: rgba(245, 158, 11, .12) !important; color: #fcd34d !important; border-color: rgba(245, 158, 11, .3) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app .dropdown-item { color: var(--t-text-2) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app .dropdown-item:hover { background: var(--t-surface-2) !important; }
/* Sombre : panneaux du tableau de bord, sélecteur de site, pagination automatique */
html[data-theme="odoo_enterprise"] body.uwz-app :is(.uwz-panel, .uwz-site__trigger, .erp-auto-pagination, .uwz-site__panel) { background: var(--t-surface) !important; border-color: var(--t-line) !important; color: var(--t-text) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app .uwz-panel :is(h2, h3, .uwz-panel__title, strong) { color: var(--t-text) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app .uwz-panel :is(span, small, td, a:not(.btn)) { border-color: var(--t-line) !important; }
html[data-theme="odoo_enterprise"] body.uwz-app .erp-auto-pagination :is(button, .page-link, a) { background: var(--t-surface-2) !important; color: var(--t-text) !important; border-color: var(--t-line) !important; }
/* Bouton d'encaissement inactif : teinte du thème, pas un bleu figé */
html body.uwz-app .uwz-pos__order.is-empty .uwz-pos__pay { background: color-mix(in srgb, var(--t-brand) 42%, var(--t-surface)) !important; }

html[data-theme="high_contrast"] body.uwz-app .erp-sidebar.uwz-sidebar { border-right: 2px solid #000 !important; }
html[data-theme="high_contrast"] body.uwz-app .uwz-nav-item { font-weight: 600 !important; }

/* --------------------------------------------------------------------------
   5. Lisibilité des boutons, quel que soit le thème
   Les boutons secondaires (blancs sur fond clair) gardent une bordure nettement
   visible, calculée à partir des couleurs du thème (clair comme sombre).
   -------------------------------------------------------------------------- */
html { --t-line-strong: color-mix(in srgb, var(--t-text) 26%, var(--t-surface)); }
html[data-theme="high_contrast"] { --t-line-strong: #000000; }

html body.uwz-app :is(.btn-light, .btn-outline-secondary, .btn-white, .btn-default, .btn-outline-dark, .uw-btn-ghost, .uw-btn-secondary,
    .erp-export-btn, .erp-actions-btn, .uwz-site__trigger, .uwz-pos__modes button, .uwz-pos__chips button, .pos-hold,
    .cargo-currency-filter__select, .erp-workflow a, .erp-workflow span) {
    border-color: var(--t-line-strong) !important;
}
html body.uwz-app :is(.btn-light, .btn-outline-secondary, .btn-white, .btn-default, .uw-btn-ghost, .uw-btn-secondary, .erp-export-btn):hover {
    background-color: var(--t-surface-2) !important;
    border-color: var(--t-brand) !important;
    color: var(--t-text) !important;
}
html body.uwz-app :is(.btn-light, .btn-outline-secondary, .btn-white, .btn-default, .uw-btn-ghost, .uw-btn-secondary, .erp-export-btn) {
    color: var(--t-text) !important;
}

/* Encaisser, panier vide : bouton inactif lisible (pas de texte blanc sur fond pâle). */
html body.uwz-app .uwz-pos__order.is-empty .uwz-pos__pay,
html body.uwz-app .uwz-pos__pay:disabled {
    background: var(--t-surface-2) !important;
    color: var(--t-muted) !important;
    border: 1px dashed var(--t-line-strong) !important;
    box-shadow: none !important;
}
html body.uwz-app .uwz-pos__order.is-empty .uwz-pos__pay * { color: var(--t-muted) !important; border-color: var(--t-line-strong) !important; }

/* Emeraude : vert actif assez foncé pour un texte blanc. */
html[data-theme="emerald_business"] { --t-side-active-bg: #0f8a55; }
