/* ==========================================================================
   public/styles/modelmep-win11-pro.css
   ModelMEP Lot 4 — Harmonisation finale Windows 11 Pro / WinUI 3 / Mica
   - Unifie les barres d'outils, docks, modales (Équilibrage, DWG PiP, Calques)
     et la barre de statut en thème Clair (#F3F3F3 / #FFFFFF / #0078D4)
     et Sombre (#202020 / #2B2B2B / #60CDFF)
   ========================================================================== */

:root,
[data-theme="light"] {
  --mm-bg: #F3F3F3;
  --mm-surface: #FFFFFF;
  --mm-subtle: #F9F9F9;
  --mm-border: rgba(0, 0, 0, 0.10);
  --mm-border-strong: rgba(0, 0, 0, 0.16);
  --mm-text: #1A1A1A;
  --mm-muted: #5F5F5F;
  --mm-accent: #0078D4;
  --mm-accent-soft: #EFF6FC;
}

[data-theme="dark"] {
  --mm-bg: #202020;
  --mm-surface: #2B2B2B;
  --mm-subtle: #252525;
  --mm-border: rgba(255, 255, 255, 0.12);
  --mm-border-strong: rgba(255, 255, 255, 0.20);
  --mm-text: #F5F5F5;
  --mm-muted: #C8C8C8;
  --mm-accent: #60CDFF;
  --mm-accent-soft: rgba(96, 205, 255, 0.14);
}

/* Boutons barre d'outils Viewport (Lots 1-3 + natifs) en WinUI 3 */
[data-theme="light"] .bl-viewport-header {
  background: rgba(249, 249, 249, 0.96) !important;
  border-bottom: 1px solid var(--mm-border) !important;
  color: var(--mm-text) !important;
}

[data-theme="light"] .bl-hdr-btn,
[data-theme="light"] .bl-dwg-btn,
[data-theme="light"] .bl-layer-btn,
[data-theme="light"] .bl-shd-btn {
  background: #FFFFFF !important;
  color: #1A1A1A !important;
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
}

[data-theme="light"] .bl-hdr-btn:hover,
[data-theme="light"] .bl-dwg-btn:hover,
[data-theme="light"] .bl-layer-btn:hover {
  background: var(--mm-accent-soft) !important;
  border-color: var(--mm-accent) !important;
  color: var(--mm-accent) !important;
}

[data-theme="light"] .bl-hdr-btn.active,
[data-theme="light"] .bl-dwg-btn.active,
[data-theme="light"] .bl-layer-btn.primary {
  background: #0078D4 !important;
  border-color: #0078D4 !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
}

/* Docks latéraux, Outliner & Cartes KPI en Thème Clair Win11 Pro */
[data-theme="light"] .bl-side-dock,
[data-theme="light"] .bl-sidebar,
[data-theme="light"] .bl-outliner,
[data-theme="light"] .bl-box,
[data-theme="light"] .bl-metric,
[data-theme="light"] .bl-modal-frame,
[data-theme="light"] .bl-modal-cnt {
  background: #FFFFFF !important;
  color: #1A1A1A !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
}

[data-theme="light"] .bl-outliner-hdr,
[data-theme="light"] .bl-box-title,
[data-theme="light"] .bl-modal-hdr,
[data-theme="light"] .bl-modal-ftr,
[data-theme="light"] .bl-dwg-hdr,
[data-theme="light"] .bl-dwg-footer,
[data-theme="light"] .bl-layer-mgr-hdr,
[data-theme="light"] .bl-layer-mgr-toolbar,
[data-theme="light"] .bl-layer-mgr-footer,
[data-theme="light"] .bl-statusbar {
  background: #F9F9F9 !important;
  color: #1A1A1A !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .bl-tree-row {
  color: #1A1A1A !important;
}
[data-theme="light"] .bl-tree-row:hover {
  background: #EFF6FC !important;
}
[data-theme="light"] .bl-tree-row.selected {
  background: #0078D4 !important;
  color: #FFFFFF !important;
}

[data-theme="light"] .bl-input,
[data-theme="light"] .bl-select,
[data-theme="light"] .bl-layer-search,
[data-theme="light"] .bl-layer-select {
  background: #FFFFFF !important;
  color: #1A1A1A !important;
  border: 1px solid rgba(0, 0, 0, 0.16) !important;
}

/* Modale Équilibrage NetMEP en Thème Clair Win11 Pro */
[data-theme="light"] #netmep-balancing-modal > div {
  background: #FFFFFF !important;
  color: #1A1A1A !important;
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
  border-radius: 12px !important;
}
[data-theme="light"] .netmep-bal-table th {
  background: #F9F9F9 !important;
  color: #434343 !important;
}
[data-theme="light"] .netmep-bal-table td {
  color: #1A1A1A !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* Thème Sombre Windows 11 Pro Mica (#202020 / #2B2B2B) */
[data-theme="dark"] body.netmep-fluent-ui {
  background: #202020 !important;
  color: #F5F5F5 !important;
}
[data-theme="dark"] body.netmep-fluent-ui .bl-topbar,
[data-theme="dark"] .bl-viewport-header {
  background: rgba(32, 32, 32, 0.94) !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
  color: #F5F5F5 !important;
}
[data-theme="dark"] body.netmep-fluent-ui .bl-menu-item,
[data-theme="dark"] .bl-hdr-btn {
  color: #F5F5F5 !important;
  background: #2B2B2B !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}
[data-theme="dark"] .bl-hdr-btn.active {
  background: #0078D4 !important;
  border-color: #60CDFF !important;
  color: #FFFFFF !important;
}
[data-theme="dark"] body.netmep-fluent-ui .bl-dropdown {
  background: #2B2B2B !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}
[data-theme="dark"] body.netmep-fluent-ui .bl-dd-item {
  color: #F5F5F5 !important;
}
