/* Thème sombre utilisateur : couche volontairement séparée du build Tailwind. */
body.dark-theme {
  color-scheme: dark;
  --background: 204 34% 7%;
  --foreground: 198 28% 94%;
  --card: 203 27% 11%;
  --card-foreground: 198 28% 94%;
  --muted: 202 23% 15%;
  --muted-foreground: 199 13% 68%;
  --border: 199 19% 24%;
  --input: 199 19% 27%;
  --ring: 170 91% 55%;
  --primary: 170 91% 55%;
  --primary-foreground: 203 42% 7%;
  --accent: 172 35% 17%;
  --accent-foreground: 167 86% 78%;
  background:#081016;
  color:#e8f1f4;
}
body.dark-theme #app-shell,
body.dark-theme main { background:#071018; }
body.dark-theme .app-header { background:rgba(8,17,24,.94); border-color:#25343d; }
body.dark-theme .module-hero,
body.dark-theme .adv-intro,
body.dark-theme .commercial-intro { border-color:#2b3a43; }
body.dark-theme .dashboard-tool-card,
body.dark-theme .adv-panel,
body.dark-theme .adv-client-card,
body.dark-theme .commercial-panel,
body.dark-theme .care-auto-panel,
body.dark-theme .care-manual-card,
body.dark-theme .management-card,
body.dark-theme .logs-panel,
body.dark-theme .access-requests-panel,
body.dark-theme .consulting-workspace,
body.dark-theme .matrix-card,
body.dark-theme .modal-panel { background:#101b22; border-color:#293a44; color:#dce7ee; }
body.dark-theme .commercial-filter-box,
body.dark-theme .commercial-toolbar,
body.dark-theme .commercial-head-table,
body.dark-theme .commercial-sticky-header,
body.dark-theme .care-section-heading,
body.dark-theme .care-detail-disclosure,
body.dark-theme .care-kpi-strip,
body.dark-theme .care-annual-summary,
body.dark-theme .consulting-form-header,
body.dark-theme .consulting-context-grid,
body.dark-theme .consulting-section-card,
body.dark-theme .consulting-section-heading,
body.dark-theme .consulting-subsection-heading,
body.dark-theme .management-tabs,
body.dark-theme .management-user-form,
body.dark-theme .management-identity-fields,
body.dark-theme .management-permission-selector,
body.dark-theme .management-card-heading,
body.dark-theme .local-password-form,
body.dark-theme .local-password-generator,
body.dark-theme .session-reset-card,
body.dark-theme .backup-settings-form { background:#101b22; border-color:#293a44; color:#dce7ee; }
body.dark-theme .input,
body.dark-theme .select,
body.dark-theme .textarea,
body.dark-theme table td,
body.dark-theme table th { background:#0d171e; border-color:#293a44; color:#dce7ee; }
body.dark-theme table tbody tr:nth-child(even) td { background:#111f27; }
body.dark-theme table tbody tr:nth-child(odd) td { background:#0d171e; }
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3 { color:#f2f8fb; }
body.dark-theme strong { color:inherit; }
body.dark-theme .adv-stats > article,
body.dark-theme .adv-stats > button,
body.dark-theme .commercial-stats > article,
body.dark-theme .commercial-stats > button,
body.dark-theme .consulting-stats > button,
body.dark-theme .care-auto-stats span { background:#101b22; border-color:#293a44; }
body.dark-theme .adv-line-card,
body.dark-theme .adv-firewall-suite-field,
body.dark-theme .adv-firewall-suite-options span,
body.dark-theme .commercial-family-filter,
body.dark-theme .commercial-filter-chip span,
body.dark-theme .care-offer-card,
body.dark-theme .care-kpi-strip > span,
body.dark-theme .care-kpi-strip > button,
body.dark-theme .consulting-item-row,
body.dark-theme .consulting-product-config,
body.dark-theme .consulting-cluster-toggle,
body.dark-theme .management-permission-options span,
body.dark-theme .management-stats span,
body.dark-theme .backup-summary span { background:#0d171e; border-color:#293a44; color:#dce7ee; }
body.dark-theme .consulting-subsection-heading { background:#0a1219; }
body.dark-theme .consulting-item-head { background:#17252e; border-color:#293a44; }
body.dark-theme .consulting-item-row:nth-child(even) { background:#111f27; }
body.dark-theme .commercial-table tbody tr:hover td { background:#17313a; }
body.dark-theme .management-tab { color:#a8bbc5; }
body.dark-theme .management-tab:hover { background:#17252e; color:#fff; }
body.dark-theme .management-tab.active { background:#27f4d2; color:#071018; }
body.dark-theme .btn-secondary { background:#17252e; border-color:#334751; color:#dce7ee; }
body.dark-theme .btn-secondary:hover { background:#20333d; color:#fff; }
body.dark-theme .cell-muted,
body.dark-theme .form-label { color:#9db0bb; }
body.dark-theme .input::placeholder,
body.dark-theme .textarea::placeholder { color:#617984; }
body.dark-theme .care-stat-accent strong { color:#67e8f9; }
body.dark-theme .care-stat-annual strong { color:#c4b5fd; }
body.dark-theme .adv-vendor-logo-mailinblack { filter:invert(1); }
body.dark-theme .theme-toggle { color:#27f4d2; border-color:#27f4d255; background:#13262a; }

/* Surfaces communes : aucun texte clair ne doit rester posé sur un fond clair. */
body.dark-theme .card,
body.dark-theme .table-card,
body.dark-theme .formula-strip,
body.dark-theme .dashboard-status,
body.dark-theme .dashboard-quicklinks a,
body.dark-theme .dashboard-calculation,
body.dark-theme .dashboard-license-card,
body.dark-theme .quote-summary,
body.dark-theme .quote-results,
body.dark-theme .quote-row,
body.dark-theme .quote-row-guidance,
body.dark-theme .quote-total-guidance,
body.dark-theme .license-quote-footer,
body.dark-theme .license-total-line,
body.dark-theme .annual-total-line,
body.dark-theme .license-recommendations,
body.dark-theme .recommendation-chips button,
body.dark-theme .stat-tile,
body.dark-theme .ha-option,
body.dark-theme .range-toggle,
body.dark-theme .recommendation-card,
body.dark-theme .recommendation-product,
body.dark-theme .support-product,
body.dark-theme .ha-result-banner,
body.dark-theme .adv-client-lines,
body.dark-theme .adv-contract-mode,
body.dark-theme .adv-price-preview > div,
body.dark-theme .adv-edr-companion-alert,
body.dark-theme .adv-firewall-suite,
body.dark-theme .commercial-detail-panel,
body.dark-theme .commercial-editor,
body.dark-theme .commercial-family-group,
body.dark-theme .care-table-scroll,
body.dark-theme .care-offer-detail,
body.dark-theme .consulting-library,
body.dark-theme .consulting-library-empty,
body.dark-theme .consulting-report-item,
body.dark-theme .consulting-section-empty,
body.dark-theme .consulting-notes-grid,
body.dark-theme .consulting-template-body,
body.dark-theme .consulting-template-intro,
body.dark-theme .consulting-template-section,
body.dark-theme .consulting-template-heading,
body.dark-theme .consulting-template-default,
body.dark-theme .consulting-reference-actions > span,
body.dark-theme .consulting-cluster-support-card,
body.dark-theme .management-backup-plan,
body.dark-theme .management-monthly-job,
body.dark-theme .backup-editor-panel,
body.dark-theme .logs-toolbar {
  background:#101b22 !important;
  border-color:#2d414c !important;
  color:#e8f1f4 !important;
}

body.dark-theme .swal2-popup.cockpit-toast {
  background:#101b22 !important;
  border-color:#2d414c;
  color:#e8f1f4;
  box-shadow:0 20px 54px -18px rgba(0,0,0,.72), 0 8px 22px -12px rgba(0,0,0,.58);
}
body.dark-theme .swal2-popup.cockpit-toast-success { border-left-color:#32c6ad; }
body.dark-theme .swal2-popup.cockpit-toast-error { border-left-color:#ff7180; }
body.dark-theme .swal2-popup.cockpit-toast-warning { border-left-color:#efad4e; }
body.dark-theme .swal2-popup.cockpit-toast-info { border-left-color:#62b7d4; }
body.dark-theme .swal2-popup.cockpit-toast .cockpit-toast-title { color:#edf5f7; }
body.dark-theme .swal2-popup.cockpit-toast .cockpit-toast-close { color:#9db1bb; }
body.dark-theme .swal2-popup.cockpit-toast .cockpit-toast-close:hover { background:#203039; color:#f3f8fa; }

body.dark-theme .dashboard-result .recommendation-card.optimized-card,
body.dark-theme .adv-line-margin.success,
body.dark-theme .consulting-item-row-auto,
body.dark-theme .consulting-item-row-auto .select:disabled {
  background:#102821 !important;
  border-color:#2a6b57 !important;
  color:#b7f7df !important;
}
body.dark-theme .adv-line-card:nth-of-type(odd) {
  background:#0e1920 !important;
  border-color:#30434e !important;
}
body.dark-theme .adv-line-card:nth-of-type(even) {
  background:#172a34 !important;
  border-color:#3b5360 !important;
}
body.dark-theme .adv-line-card:hover {
  background:#173b3b !important;
  border-color:#2bbcac !important;
}
body.dark-theme .consulting-stats .consulting-stat-pending {
  background:#14243d !important;
  border-color:#315b96 !important;
}
body.dark-theme .consulting-stats .consulting-stat-overview {
  background:#10282a !important;
  border-color:#287067 !important;
}
body.dark-theme .consulting-stats .consulting-stat-lost {
  background:#352314 !important;
  border-color:#8a5724 !important;
}
body.dark-theme .consulting-stats .consulting-stat-won {
  background:#102821 !important;
  border-color:#2a6b57 !important;
}
body.dark-theme .commercial-history-modal-panel,
body.dark-theme .commercial-coverage-history,
body.dark-theme .commercial-history-years section,
body.dark-theme .commercial-history-table-wrap {
  background:#101b22 !important;
  border-color:#2d414c !important;
  color:#e8f1f4 !important;
}
body.dark-theme .commercial-history-years section {
  background:#0d171e !important;
}
body.dark-theme .commercial-history-table th { background:#071018 !important; color:#f2f8fb !important; }
body.dark-theme .commercial-history-table td { background:#101b22 !important; border-color:#2d414c !important; color:#c3d2da !important; }
body.dark-theme .commercial-history-table tbody tr:nth-child(even) td { background:#14232c !important; }
body.dark-theme .consulting-report-en_attente {
  background:#14243d !important;
  border-color:#315b96 !important;
}
body.dark-theme .consulting-report-perdu {
  background:#352314 !important;
  border-color:#8a5724 !important;
}
body.dark-theme .consulting-report-gagne {
  background:#102821 !important;
  border-color:#2a6b57 !important;
}
body.dark-theme .adv-line-margin.warning,
body.dark-theme .adv-line-overdue,
body.dark-theme .danger-confirm-detail {
  background:#32171a !important;
  border-color:#7f3038 !important;
  color:#fecaca !important;
}
body.dark-theme .adv-line-margin.unavailable {
  background:#302515 !important;
  border-color:#755725 !important;
  color:#fde68a !important;
}
body.dark-theme .adv-line-margin.service,
body.dark-theme .adv-price-preview .service {
  background:#251a36 !important;
  border-color:#64418d !important;
  color:#ddd0ff !important;
}

body.dark-theme .input,
body.dark-theme .select,
body.dark-theme .textarea,
body.dark-theme input:not([type="checkbox"]):not([type="radio"]),
body.dark-theme select,
body.dark-theme textarea {
  background-color:#0b151c !important;
  border-color:#344953 !important;
  color:#edf5f7 !important;
}
body.dark-theme select option { background:#0b151c; color:#edf5f7; }
body.dark-theme input:disabled,
body.dark-theme select:disabled,
body.dark-theme textarea:disabled { background:#162129 !important; color:#8498a3 !important; }
body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder { color:#708690 !important; opacity:1; }

body.dark-theme .data-table td,
body.dark-theme .commercial-table td,
body.dark-theme .logs-table td { color:#dce8ed !important; }
body.dark-theme .data-table tbody tr:nth-child(odd) td,
body.dark-theme .commercial-table tbody tr:nth-child(odd) td,
body.dark-theme .logs-table tbody tr:nth-child(odd) td { background:#0d171e !important; }
body.dark-theme .data-table tbody tr:nth-child(even) td,
body.dark-theme .commercial-table tbody tr:nth-child(even) td,
body.dark-theme .logs-table tbody tr:nth-child(even) td { background:#132129 !important; }
body.dark-theme .data-table tbody tr:hover td,
body.dark-theme .commercial-table tbody tr:hover td,
body.dark-theme .logs-table tbody tr:hover td { background:#18323a !important; }

body.dark-theme .cell-muted,
body.dark-theme .form-label,
body.dark-theme .section-description,
body.dark-theme .adv-line-card small,
body.dark-theme .commercial-panel small,
body.dark-theme .consulting-workspace small,
body.dark-theme .management-card small { color:#9eb1bb !important; }
body.dark-theme .btn-secondary,
body.dark-theme .icon-button { background:#17262e !important; border-color:#38505b !important; color:#dce8ed !important; }
body.dark-theme .btn-secondary:hover,
body.dark-theme .icon-button:hover { background:#203640 !important; color:#fff !important; }
body.dark-theme .commercial-filter-chip input:checked + span,
body.dark-theme .range-toggle input:checked + span { background:#123c38 !important; color:#7ef6df !important; border-color:#26a995 !important; }
body.dark-theme .modal-backdrop { background:rgba(1,6,10,.82); }

/* Dashboard : contraste renforcé sur les éléments qui héritaient du thème clair. */
body.dark-theme .page-context-badge {
  background:#27f4d2 !important;
  color:#061311 !important;
}
body.dark-theme .dashboard-form label > span,
body.dark-theme .dashboard-form fieldset > legend {
  color:#b8cad3 !important;
}
body.dark-theme .dashboard-form .ha-copy strong {
  color:#f3f8fa !important;
}
body.dark-theme .dashboard-form .ha-copy small {
  color:#a9bdc7 !important;
}
body.dark-theme .ha-option > .ha-checkbox {
  background:#122029 !important;
  border-color:#55707d !important;
}
body.dark-theme .ha-option > input:checked + .ha-checkbox {
  background:#00a99f !important;
  border-color:#45ead7 !important;
  color:#fff !important;
}
body.dark-theme .range-toggle label > span {
  color:#a9bec8 !important;
}
body.dark-theme .dashboard-result .recommendation-card span,
body.dark-theme .dashboard-result .recommendation-card-heading > span:first-child {
  color:#9fb8c4 !important;
}
body.dark-theme .dashboard-result .recommendation-product strong,
body.dark-theme .dashboard-result .recommendation-product > div > strong {
  color:#f4f8fa !important;
}
body.dark-theme .dashboard-result .recommendation-product small,
body.dark-theme .dashboard-result .recommendation-card > small {
  color:#a7bbc5 !important;
}
body.dark-theme .dashboard-result .recommendation-card.optimized-card > small {
  color:#69e5b6 !important;
}
body.dark-theme .dashboard-result .recommendation-card .evolution-badge {
  background:#bdf8df !important;
  color:#064e3b !important;
}
body.dark-theme .quote-row strong,
body.dark-theme .quote-row-name,
body.dark-theme .license-quote-table {
  color:#edf5f7 !important;
}
body.dark-theme .quote-row small,
body.dark-theme .quote-row p,
body.dark-theme .license-quote-footer small {
  color:#a9bec8 !important;
}
body.dark-theme .brand-logo-watchguard {
  filter:grayscale(1) brightness(0) invert(1);
  opacity:.9;
}
body.dark-theme .brand-logo-agesys {
  filter:brightness(1.9) saturate(1.15);
}
body.dark-theme .brand-logo-multi-editors {
  filter:none;
  opacity:.96;
}

/* Composants partagés : titres, aides et métadonnées restent lisibles partout. */
body.dark-theme .section-heading p:not(.section-kicker),
body.dark-theme .dashboard-tool-header p:not(.section-kicker),
body.dark-theme .management-card-heading p,
body.dark-theme .care-section-heading p:not(.section-kicker),
body.dark-theme .commercial-toolbar p,
body.dark-theme .consulting-template-heading p,
body.dark-theme .access-requests-heading p:not(.section-kicker) {
  color:#a9bdc7 !important;
}
body.dark-theme .badge,
body.dark-theme .auto-row-badge {
  border-color:#526976;
}

/*
 * Contraste applicatif complet.
 * Les composants ci-dessous sont générés par les modules après le chargement de
 * la page. Cette couche garde leurs états métier colorés sans réintroduire les
 * fonds pastel du thème clair.
 */
body.dark-theme {
  --dark-surface:#101b22;
  --dark-surface-soft:#14232c;
  --dark-surface-raised:#192a33;
  --dark-border:#344b56;
  --dark-text:#edf5f7;
  --dark-muted:#a9bdc7;
}

body.dark-theme .btn-primary {
  background:#2dd4bf !important;
  border-color:#5eead4 !important;
  color:#06201c !important;
}
body.dark-theme .btn-primary:hover {
  background:#5eead4 !important;
  color:#041713 !important;
}
body.dark-theme .section-kicker { color:#63d9cb !important; }
body.dark-theme .dashboard-firewall-card .section-kicker,
body.dark-theme .dashboard-watchguard-card .section-kicker { color:#fb7185 !important; }
body.dark-theme .dashboard-cybercare-card .section-kicker { color:#d8b4fe !important; }
body.dark-theme .auto-row-badge {
  background:#1b2c35 !important;
  border:1px solid #435d69 !important;
  color:#c0d0d7 !important;
}

/* ADV : indicateurs, lignes de contrat et actions ajoutées dynamiquement. */
body.dark-theme .adv-stats .adv-stat-invoice > strong,
body.dark-theme .adv-stats .adv-stat-invoice .adv-stat-period { color:#fcd34d !important; }
body.dark-theme .adv-stats .adv-stat-renew > strong,
body.dark-theme .adv-stats .adv-stat-renew .adv-stat-period { color:#fdba74 !important; }
body.dark-theme .adv-stats .adv-stat-overdue > strong,
body.dark-theme .adv-stats .adv-stat-overdue .adv-stat-period { color:#fca5a5 !important; }
body.dark-theme .adv-stats .adv-stat-mssp > strong,
body.dark-theme .adv-stats .adv-stat-mssp .adv-stat-period { color:#67e8f9 !important; }
body.dark-theme .adv-stats .adv-stat-mssp-margin > strong,
body.dark-theme .adv-stats .adv-stat-mssp-margin .adv-stat-period { color:#6ee7b7 !important; }
body.dark-theme .adv-stats .adv-stat-integrated-margin > strong,
body.dark-theme .adv-stats .adv-stat-integrated-margin .adv-stat-period { color:#c4b5fd !important; }
body.dark-theme .adv-stats .adv-stat-margin > strong,
body.dark-theme .adv-stats .adv-stat-margin .adv-stat-period { color:#fda4af !important; }
body.dark-theme .adv-add-line,
body.dark-theme .adv-bulk-button {
  background:#16312f !important;
  border-color:#317167 !important;
  color:#99f6e4 !important;
}
body.dark-theme .adv-add-line:hover,
body.dark-theme .adv-bulk-button:hover { background:#1d4540 !important; }
body.dark-theme .adv-filters button {
  background:#17262e !important;
  border-color:#38505b !important;
  color:#b8c9d1 !important;
}
body.dark-theme .adv-filters button:hover,
body.dark-theme .adv-filters button.active {
  background:#2dd4bf !important;
  border-color:#5eead4 !important;
  color:#06201c !important;
}
body.dark-theme .adv-summary-chip.invoice { background:#382a12 !important; color:#fde68a !important; }
body.dark-theme .adv-summary-chip.renewal { background:#442516 !important; color:#fed7aa !important; }
body.dark-theme .adv-summary-chip.overdue,
body.dark-theme .adv-summary-chip.ending { background:#431f2a !important; color:#fecdd3 !important; }
body.dark-theme .adv-summary-chip.missing { background:#30234a !important; color:#ddd6fe !important; }
body.dark-theme .adv-summary-chip.clear { background:#12382c !important; color:#a7f3d0 !important; }
body.dark-theme .adv-client-amount strong { color:var(--dark-text) !important; }
body.dark-theme .adv-client-amount.cybercare strong { color:#f0abfc !important; }

/* Commerce : matrice de couverture et éditeurs par famille. */
body.dark-theme .commercial-client-name { color:var(--dark-text) !important; }
body.dark-theme .commercial-family-coverage {
  background:#14232c !important;
  border-color:#344b56 !important;
}
body.dark-theme .commercial-family-coverage small { color:#b8c9d1 !important; }
body.dark-theme .commercial-category-watchguard {
  background:#14243d !important;
  border-color:#315b96 !important;
  color:#bfdbfe !important;
}
body.dark-theme .commercial-category-network {
  background:#102a36 !important;
  border-color:#28718c !important;
  color:#bae6fd !important;
}
body.dark-theme .commercial-category-other {
  background:#102821 !important;
  border-color:#2a6b57 !important;
  color:#bbf7d0 !important;
}
body.dark-theme .commercial-category-cybercare {
  background:#251a36 !important;
  border-color:#64418d !important;
  color:#ddd6fe !important;
}
body.dark-theme .commercial-family-inline-editor .commercial-inline-editor-heading {
  background:var(--dark-surface-raised) !important;
  border-color:var(--dark-border) !important;
  color:var(--dark-text) !important;
}
body.dark-theme .commercial-family-ratio,
body.dark-theme .commercial-family-ratio strong { color:inherit !important; }
body.dark-theme .commercial-family-ratio small { color:#c0d0d7 !important; }
body.dark-theme .commercial-family-status { color:inherit !important; }
body.dark-theme .commercial-family-icon {
  background:#22343e !important;
  color:var(--dark-text) !important;
}
body.dark-theme .commercial-family-filter.active .commercial-family-icon {
  background:#2dd4bf !important;
  color:#06201c !important;
}
body.dark-theme .commercial-stats .commercial-stat-accent > strong { color:#67e8f9 !important; }
body.dark-theme .commercial-stat-accent > em.neutral { color:#b8c9d1 !important; }

/* Cybercare et astreintes : offres, modes et services. */
body.dark-theme .care-offer-name,
body.dark-theme .care-clients-table .text-cell strong,
body.dark-theme .care-updates-table .text-cell strong { color:var(--dark-text) !important; }
body.dark-theme .product-name-qualifier,
body.dark-theme .care-offer-price strong { color:#c4b5fd !important; }
body.dark-theme .care-mode-badge,
body.dark-theme .care-service-badge {
  background:#1b2c35 !important;
  border:1px solid #435d69 !important;
  color:#c0d0d7 !important;
}
body.dark-theme .care-mode-badge.mssp,
body.dark-theme .care-service-badge {
  background:#102a36 !important;
  border-color:#28718c !important;
  color:#a5f3fc !important;
}
body.dark-theme .care-detail-disclosure summary { color:#c0d0d7 !important; }
body.dark-theme .care-detail-disclosure summary:hover { background:#172932 !important; }
body.dark-theme .care-detail-disclosure summary span {
  background:#1b2c35 !important;
  color:#b8c9d1 !important;
}
body.dark-theme .care-formula-note {
  background:#102821 !important;
  border-color:#2a6b57 !important;
}
body.dark-theme .care-formula-note strong { color:#bbf7d0 !important; }
body.dark-theme .care-formula-note span { color:#86efac !important; }
body.dark-theme .care-kpi-strip .care-hno-kpi {
  background:#102821 !important;
  border-color:#2a6b57 !important;
}
body.dark-theme .care-kpi-strip .care-hno-kpi strong { color:#6ee7b7 !important; }

/* Consulting et matrice : états, références et valeurs de vente. */
body.dark-theme .consulting-stats span { color:#b4c6ce !important; }
body.dark-theme .consulting-stats .consulting-stat-draft > strong { color:var(--dark-text) !important; }
body.dark-theme .consulting-stats .consulting-stat-overview > strong { color:#67e8f9 !important; }
body.dark-theme .consulting-stats .consulting-stat-pending > strong { color:#93c5fd !important; }
body.dark-theme .consulting-stats .consulting-stat-lost > strong { color:#fdba74 !important; }
body.dark-theme .consulting-stats .consulting-stat-won > strong { color:#6ee7b7 !important; }
body.dark-theme .consulting-status-brouillon,
body.dark-theme .consulting-reference-section {
  background:#1b2c35 !important;
  color:#c0d0d7 !important;
}
body.dark-theme .consulting-status-en_attente,
body.dark-theme .consulting-compatibility-instant-on {
  background:#183154 !important;
  color:#bfdbfe !important;
}
body.dark-theme .consulting-status-perdu,
body.dark-theme .consulting-compatibility-watchguard {
  background:#442516 !important;
  color:#fed7aa !important;
}
body.dark-theme .consulting-status-gagne,
body.dark-theme .consulting-auto-line-badge {
  background:#12382c !important;
  color:#a7f3d0 !important;
}
body.dark-theme .sale-value {
  background:#123c38 !important;
  color:#99f6e4 !important;
}
body.dark-theme .sale-value.vendor-sale-value {
  background:#30234a !important;
  color:#ddd6fe !important;
}
body.dark-theme .sale-value .cell-muted { color:#b8c9d1 !important; }
body.dark-theme .range-badge {
  background:#1b2c35 !important;
  border:1px solid #435d69 !important;
  color:#c0d0d7 !important;
}

/* Totaux et badges du Dashboard. */
body.dark-theme .license-total-line > span { color:#b8c9d1 !important; }
body.dark-theme .license-total-line strong { color:var(--dark-text) !important; }
body.dark-theme .cybercare-tools-badge {
  background:#30234a !important;
  border-color:#654b91 !important;
  color:#ddd6fe !important;
}

/* Administration : Entra, rôles, permissions, sessions et sauvegardes. */
body.dark-theme .management-entra-brand {
  background:#251f45 !important;
  border-color:#524a89 !important;
}
body.dark-theme .management-entra-brand strong { color:#e0e7ff !important; }
body.dark-theme .management-form-intro strong,
body.dark-theme .management-identity-fields legend,
body.dark-theme .management-permission-selector legend,
body.dark-theme .management-table .text-cell strong,
body.dark-theme .management-user-heading strong,
body.dark-theme .session-reset-card h3,
body.dark-theme .local-password-generator h3,
body.dark-theme .backup-job-card h3,
body.dark-theme .backup-plan-overview h3,
body.dark-theme .backup-summary strong,
body.dark-theme .backup-plan-list strong { color:var(--dark-text) !important; }
body.dark-theme .management-role-badge,
body.dark-theme .backup-kind {
  background:#1b2c35 !important;
  border:1px solid #435d69 !important;
  color:#c0d0d7 !important;
}
body.dark-theme .management-role-badge.admin {
  background:#30234a !important;
  border-color:#654b91 !important;
  color:#ddd6fe !important;
}
body.dark-theme .management-role-help {
  background:#251f45 !important;
  border-color:#524a89 !important;
}
body.dark-theme .management-role-help strong { color:#e0e7ff !important; }
body.dark-theme .management-role-help span { color:#c7d2fe !important; }
body.dark-theme .management-local-notice {
  background:#382a12 !important;
  border-color:#8d6a25 !important;
}
body.dark-theme .management-local-notice strong { color:#fde68a !important; }
body.dark-theme .management-local-notice span { color:#fcd68a !important; }
body.dark-theme .management-sensitive-option,
body.dark-theme .backup-job-card,
body.dark-theme .backup-plan-overview,
body.dark-theme .backup-monthly-job,
body.dark-theme .backup-plan-list span,
body.dark-theme .backup-monthly-toggle {
  background:#0d171e !important;
  border-color:#344b56 !important;
  color:var(--dark-text) !important;
}
body.dark-theme .management-sensitive-option > span,
body.dark-theme .management-table-toggle > span,
body.dark-theme .management-right-switch > span { background:#263a44 !important; border-color:#4e6570 !important; }
body.dark-theme .management-sensitive-option strong { color:var(--dark-text) !important; }
body.dark-theme .management-owner-mark { color:#c4b5fd !important; }
body.dark-theme .backup-kind.daily { background:#123c38 !important; border-color:#317167 !important; color:#99f6e4 !important; }
body.dark-theme .backup-kind.safety { background:#382a12 !important; border-color:#8d6a25 !important; color:#fde68a !important; }

/* Journaux et demandes d’accès : badges et surfaces de traçabilité. */
body.dark-theme .logs-stats,
body.dark-theme .access-requests-stats { background:#0d171e !important; border-color:#344b56 !important; }
body.dark-theme .logs-stats article,
body.dark-theme .access-requests-stats article {
  background:#14232c !important;
  border-color:#344b56 !important;
}
body.dark-theme .logs-stats strong,
body.dark-theme .access-requests-stats strong,
body.dark-theme .log-actor strong,
body.dark-theme .log-target strong,
body.dark-theme .access-request-user strong { color:var(--dark-text) !important; }
body.dark-theme .logs-results-count,
body.dark-theme .log-action,
body.dark-theme .log-module,
body.dark-theme .log-details,
body.dark-theme .access-request-trace span {
  background:#1b2c35 !important;
  color:#c0d0d7 !important;
}
body.dark-theme .log-action-delete { background:#7c2d12 !important; color:#fed7aa !important; }
body.dark-theme .log-action-restore,
body.dark-theme .log-restore-button {
  background:#30234a !important;
  border-color:#654b91 !important;
  color:#ddd6fe !important;
}
body.dark-theme .log-action-access,
body.dark-theme .access-request-module { background:#102a36 !important; color:#a5f3fc !important; }
body.dark-theme .log-action-access-approved,
body.dark-theme .log-restored,
body.dark-theme .access-request-status-approved {
  background:#12382c !important;
  border-color:#2a6b57 !important;
  color:#a7f3d0 !important;
}
body.dark-theme .log-action-access-rejected,
body.dark-theme .access-request-status-rejected {
  background:#431f2a !important;
  border-color:#8b394d !important;
  color:#fecdd3 !important;
}
body.dark-theme .access-request-status-pending {
  background:#382a12 !important;
  color:#fde68a !important;
}

/* Les confirmations restent clairement distinctes sans flash blanc. */
body.dark-theme .danger-confirm-panel,
body.dark-theme .danger-confirm-actions {
  background:#101b22 !important;
  border-color:#7f3038 !important;
}
body.dark-theme .danger-confirm-content h2 { color:var(--dark-text) !important; }
body.dark-theme .danger-confirm-content p:not(.section-kicker) { color:#b8c9d1 !important; }
body.dark-theme .danger-confirm-content > div > strong {
  background:#32171a !important;
  border-color:#7f3038 !important;
  color:#fecaca !important;
}

/* Modales partagées et catalogue commercial. */
body.dark-theme .modal-header,
body.dark-theme .modal-footer {
  background:#101b22 !important;
  border-color:#344b56 !important;
}
body.dark-theme .commercial-custom-catalog {
  background:#0d171e !important;
  border-color:#344b56 !important;
}
body.dark-theme .commercial-custom-catalog h3 { color:var(--dark-text) !important; }
body.dark-theme .commercial-custom-catalog p { color:var(--dark-muted) !important; }
body.dark-theme .commercial-custom-solution-row {
  background:#14232c !important;
  border-color:#344b56 !important;
  color:var(--dark-text) !important;
}
[data-management-panel].hidden { display:none !important; }
