/* ══ Design tokens ══════════════════════════════════════════════════════════ */
:root {
  --sidebar-w: 240px;
  --topbar-h: 52px;

  --sidebar-bg:       #0F172A;
  --sidebar-border:   rgba(255,255,255,.06);
  --sidebar-text:     rgba(255,255,255,.55);
  --sidebar-hover-bg: rgba(255,255,255,.07);
  --sidebar-active:   rgba(255,255,255,.12);
  --sidebar-accent:   #3B82F6;

  --bg:        #F1F5F9;
  --card:      #FFFFFF;
  --border:    #E2E8F0;
  --text:      #0F172A;
  --muted:     #64748B;
  --faint:     #94A3B8;

  --accent:       #2563EB;
  --accent-hover: #1D4ED8;
  --accent-light: #EFF6FF;

  --ok:      #059669;
  --ok-bg:   #ECFDF5;
  --ok-text: #065F46;
  --warn:    #D97706;
  --warn-bg: #FFFBEB;
  --warn-text: #92400E;
  --err:     #DC2626;
  --err-bg:  #FEF2F2;
  --err-text:#991B1B;

  --radius:  8px;
  --radius-lg: 12px;
  --shadow:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
}

/* ══ Reset ══════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--sidebar-bg);
  display: flex;
  min-height: 100vh;
}

/* ══ Sidebar ════════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  border-right: 1px solid var(--sidebar-border);
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-logo {
  width: 34px; height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}
.sidebar-title { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.sidebar-sub   { font-size: 11px; color: var(--sidebar-text); margin-top: 1px; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 14px 16px 6px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }

.s-nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: none;
  background: none;
  color: var(--sidebar-text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background .12s, color .12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s-nav-item:hover { background: var(--sidebar-hover-bg); color: rgba(255,255,255,.9); }
.s-nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--sidebar-accent);
}
.s-nav-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.s-nav-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: dot-ping 2.6s cubic-bezier(0, 0, 0.2, 1) infinite;
  animation-delay: var(--ping-delay, 0s);
}
@keyframes dot-ping {
  0%        { transform: scale(1);   opacity: .7; }
  70%, 100% { transform: scale(3);   opacity: 0;  }
}

/* "Tous les tenants" — plasma violet/rose/bleu */
.nav-all-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(#6366F1, #EC4899, #3B82F6, #6366F1);
  animation: nav-all-spin 4s linear infinite;
  box-shadow: 0 0 6px 2px rgba(236,72,153,.4);
}
@keyframes nav-all-spin {
  to { transform: rotate(360deg); }
}

.s-nav-add {
  color: rgba(255,255,255,.4);
  font-size: 12px;
  border: 1px dashed rgba(255,255,255,.15);
}
.s-nav-add:hover { border-color: rgba(255,255,255,.3); background: var(--sidebar-hover-bg); }

.sidebar-divider { height: 1px; background: var(--sidebar-border); margin: 10px 16px; }
.sidebar-footer { margin-top: auto; padding: 12px 8px 16px; }

/* ── Seuils info icon ─────────────────────────────────────────────────────── */
.sh-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 4px;
  border-top: 1px solid var(--sidebar-border);
  margin-top: 8px;
  padding-top: 10px;
}
.sh-header-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}
.threshold-info-wrap {
  position: relative;
  display: inline-flex;
}
.threshold-info-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.45);
  font-size: 9px;
  font-style: italic;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  user-select: none;
  transition: border-color .15s, color .15s;
}
.threshold-info-icon:hover,
.threshold-info-wrap:hover .threshold-info-icon { border-color: var(--accent); color: var(--accent); }

.threshold-info-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 180px;
  background: #1E293B;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  z-index: 9999;
}
.threshold-info-wrap:hover .threshold-info-tip { display: block; }

.tip-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: 8px;
}
.tip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255,255,255,.85);
  margin-bottom: 5px;
}
.tip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tip-dot.ok   { background: var(--ok); }
.tip-dot.warn { background: var(--warn); }
.tip-dot.err  { background: var(--err); }
.tip-note {
  margin-top: 8px;
  font-size: 10px;
  color: rgba(255,255,255,.3);
  font-style: italic;
  line-height: 1.4;
}

#sidebar-health {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px 4px;
}
.sh-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--sidebar-text);
  padding: 2px 0;
}
.sh-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.sh-dot.ok   { background: var(--ok); }
.sh-dot.warn { background: var(--warn); }
.sh-dot.err  { background: var(--err); box-shadow: 0 0 0 3px rgba(220,38,38,.2); animation: pulse .8s ease-in-out infinite alternate; }
.sh-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-rate { font-weight: 600; font-size: 11px; }
.sh-rate.ok    { color: #6EE7B7; }
.sh-rate.warn  { color: #FCD34D; }
.sh-rate.err   { color: #FCA5A5; }
.sh-rate.muted { color: rgba(255,255,255,.3); }

@keyframes pulse { to { box-shadow: 0 0 0 5px rgba(220,38,38,.0); } }

/* ══ Page wrapper ═══════════════════════════════════════════════════════════ */
.page-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ══ Topbar ═════════════════════════════════════════════════════════════════ */
.topbar {
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
  gap: 16px;
}
.topbar-breadcrumb {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-sync { font-size: 12px; color: var(--faint); }
.btn-topbar {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s;
}
.btn-topbar:hover { background: var(--bg); color: var(--text); border-color: #CBD5E1; }
.btn-topbar:disabled { opacity: .5; cursor: not-allowed; }

/* ══ Changelog (onglet Nouveautés) ══════════════════════════════════════════ */
.cl-entry {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 16px;
  background: var(--card-bg);
}
.cl-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cl-version {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Courier New', monospace;
}
.cl-date {
  font-size: 12px;
  color: var(--muted);
}
.cl-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.cl-badge-feat { background: rgba(59,130,246,.15); color: #3B82F6; }
.cl-badge-fix  { background: rgba(34,197,94,.15);  color: #22C55E; }
.cl-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin: 14px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.cl-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cl-list li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.cl-list li strong { color: var(--text-strong, var(--text)); }
.cl-list code {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  background: var(--code-bg, rgba(0,0,0,.08));
  padding: 1px 5px;
  border-radius: 3px;
}

/* ══ Alert banner ═══════════════════════════════════════════════════════════ */
#alert-banner {
  display: flex;
  align-items: center;
  transition: opacity 0.6s ease;
  gap: 10px;
  padding: 10px 24px;
  font-size: 13px;
  border-bottom: 1px solid;
}
#alert-banner.warn  { background: var(--warn-bg); border-color: #FDE68A; color: var(--warn-text); }
#alert-banner.crit  { background: var(--err-bg);  border-color: #FECACA; color: var(--err-text);  }

/* ══ Main ════════════════════════════════════════════════════════════════════ */
#app { padding: 24px; flex: 1; }

.view-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ══ KPIs ════════════════════════════════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.kpi {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--kpi-accent, var(--border));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.kpi.kpi-ok   { --kpi-accent: var(--ok); }
.kpi.kpi-warn { --kpi-accent: var(--warn); }
.kpi.kpi-err  { --kpi-accent: var(--err); }
.kpi.kpi-accent { --kpi-accent: var(--accent); }

.kpi-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.kpi-val { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -.02em; }
.kpi.kpi-ok   .kpi-val { color: var(--ok); }
.kpi.kpi-warn .kpi-val { color: var(--warn); }
.kpi.kpi-err  .kpi-val { color: var(--err); }

.kpi-link { cursor: pointer; }
.kpi-link:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kpi-link:hover .kpi-hint { opacity: 1; }
.kpi-link:active { transform: translateY(0); }
.kpi-hint {
  font-size: 10px;
  color: var(--faint);
  margin-top: 5px;
  opacity: 0;
  transition: opacity .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══ Alert panel (critical tenants) ════════════════════════════════════════ */
.alert-panel {
  display: flex;
  gap: 14px;
  background: var(--warn-bg);
  border: 1px solid #FDE68A;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.alert-panel-icon { color: var(--warn); flex-shrink: 0; padding-top: 2px; }
.alert-panel-title { font-size: 13px; font-weight: 700; color: var(--warn-text); margin-bottom: 8px; }
.alert-panel-body { flex: 1; }
.critical-list { display: flex; flex-direction: column; gap: 4px; }
.critical-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  background: rgba(255,255,255,.6);
  border-radius: 6px;
  cursor: pointer;
  transition: background .1s;
  font-size: 12px;
}
.critical-row:hover { background: rgba(255,255,255,.9); }
.critical-row-name { flex: 1; font-weight: 600; color: var(--text); }
.critical-row-nc { color: var(--muted); }
.critical-row-rate { font-weight: 700; }
.critical-row-rate.low { color: var(--err); }
.critical-row-rate.mid { color: var(--warn); }

/* ══ Cards ═══════════════════════════════════════════════════════════════════ */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -.01em;
}
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* ══ Tables ══════════════════════════════════════════════════════════════════ */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
}
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); background: #E2EAF4; }
.sort-icon::after { content: '⇅'; font-size: 10px; margin-left: 3px; opacity: .3; }
.sort-icon.asc::after  { content: '↑'; opacity: 1; color: var(--accent); }
.sort-icon.desc::after { content: '↓'; opacity: 1; color: var(--accent); }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #F8FAFF; cursor: pointer; }
#tbl-tenants tbody tr:hover td { cursor: pointer; }
.td-drill { position: relative; }
.td-drill-icon { opacity: 0; font-size: 10px; transition: opacity .15s; margin-left: 2px; color: var(--accent); }
.td-drill:hover .td-drill-icon { opacity: 1; }
.td-drill:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ══ Tabs ════════════════════════════════════════════════════════════════════ */
.tabs-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.tab {
  padding: 9px 18px;
  border: none;
  background: none;
  font-size: 13px;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
  transition: color .1s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ══ Toolbar ════════════════════════════════════════════════════════════════ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.toolbar-left  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 9px;
  color: var(--faint);
  pointer-events: none;
}
.search-wrap input {
  padding: 7px 10px 7px 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  min-width: 200px;
  transition: border-color .1s;
}
.search-wrap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.toolbar select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}
.toolbar select:focus { outline: none; border-color: var(--accent); }
.count-label { font-size: 12px; color: var(--muted); }
.btn-outline {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all .1s;
}
.btn-outline:hover { border-color: #94A3B8; color: var(--text); }

/* ══ Badges ═════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-ok   { background: var(--ok-bg);   color: var(--ok-text); }
.badge-err  { background: var(--err-bg);  color: var(--err-text); }
.badge-warn { background: var(--warn-bg); color: var(--warn-text); }
.badge-muted{ background: #F1F5F9;        color: var(--muted); }
.badge-accent { background: var(--accent-light); color: var(--accent); }

/* ══ Score bar ══════════════════════════════════════════════════════════════ */
.score-bar { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.score-track { flex: 1; height: 5px; background: #E2E8F0; border-radius: 99px; overflow: hidden; }
.score-fill  { height: 100%; border-radius: 99px; transition: width .4s ease; }
.score-bar span { font-size: 12px; font-weight: 700; white-space: nowrap; min-width: 32px; text-align: right; }

/* ══ App deploy stats ═══════════════════════════════════════════════════════ */
.app-deploy-stats { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; flex-wrap: wrap; }
.app-deploy-ok    { color: var(--ok); }
.app-deploy-err   { color: var(--err); }
.app-deploy-warn  { color: var(--warn); }
.app-deploy-muted { color: var(--faint); }

/* ══ Device rows ════════════════════════════════════════════════════════════ */
.device-name-wrap { display: flex; flex-direction: column; gap: 2px; }
.device-sub { font-size: 11px; color: var(--faint); }
.sync-ok   { color: var(--ok);   font-weight: 600; font-size: 12px; }
.sync-warn { color: var(--warn); font-weight: 600; font-size: 12px; }
.sync-err  { color: var(--err);  font-weight: 600; font-size: 12px; }

/* ══ Policy cards ═══════════════════════════════════════════════════════════ */
.policy-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--card);
  transition: border-color .1s, box-shadow .1s;
}
.policy-card:hover { border-color: #94A3B8; box-shadow: var(--shadow); }
.policy-name { font-weight: 700; color: var(--text); margin-bottom: 10px; font-size: 14px; }
.policy-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.policy-meta { font-size: 11px; color: var(--faint); }

/* ══ Device detail panel ════════════════════════════════════════════════════ */
.dp-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,.4);
  backdrop-filter: blur(2px);
  z-index: 100;
}
.device-panel {
  position: fixed;
  top: 0; right: -500px; bottom: 0;
  width: 440px;
  background: var(--card);
  box-shadow: -8px 0 32px rgba(0,0,0,.12);
  z-index: 101;
  transition: right .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.device-panel.open { right: 0; }
.dp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 16px;
  background: var(--sidebar-bg);
  color: #fff;
  flex-shrink: 0;
  gap: 12px;
}
.dp-device-name { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.dp-model { font-size: 12px; color: rgba(255,255,255,.5); }
.dp-close {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .1s;
}
.dp-close:hover { background: rgba(255,255,255,.16); color: #fff; }
.dp-compliance-row {
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.dp-content { flex: 1; overflow-y: auto; }
.dp-section { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.dp-section:last-child { border-bottom: none; }
.dp-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.dp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dp-field-label { font-size: 10px; color: var(--faint); margin-bottom: 2px; }
.dp-field-value { font-size: 13px; font-weight: 500; color: var(--text); word-break: break-all; }
.dp-field-mono  { font-family: 'Courier New', Courier, monospace; font-size: 12px; letter-spacing: 0.02em; }
.dp-storage-bar { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; margin: 5px 0 3px; }
.dp-storage-fill { height: 100%; border-radius: 99px; }
.dp-policy-item {
  padding: 6px 0;
  border-bottom: 1px solid var(--bg);
  font-size: 12px;
}
.dp-policy-item:last-child { border-bottom: none; }
.dp-policy-item-header { display: flex; align-items: center; justify-content: space-between; }
.dp-policy-item-nc { padding-bottom: 8px; }
.dp-policy-name { flex: 1; padding-right: 8px; color: var(--text); }
.dp-policy-link { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: var(--accent); text-decoration: none; transition: opacity .15s; }
.dp-policy-link:hover { opacity: .75; text-decoration: underline; }
.dp-policy-reasons { margin-top: 5px; padding: 6px 8px; border-radius: 6px; display: flex; flex-direction: column; gap: 3px; }
.dp-policy-reasons-nc  { background: rgba(220,38,38,.06); }
.dp-policy-reasons-err { background: rgba(234,179,8,.06); }
.dp-badge-warn-policy  { margin-left: 6px; }
.dp-policy-reason { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--err); font-weight: 500; }
.dp-policy-reason-empty { font-size: 11px; color: var(--faint); margin-top: 4px; padding-left: 4px; font-style: italic; }
.dp-action-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: not-allowed;
  font-family: inherit;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  opacity: .65;
  text-align: left;
}
.dp-soon { margin-left: auto; font-size: 10px; background: var(--border); padding: 2px 6px; border-radius: 10px; }
.dp-spinner { display: flex; align-items: center; justify-content: center; padding: 48px; }

/* ══ Loading overlay ════════════════════════════════════════════════════════ */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.loading-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.spinner-lg {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ Buttons ════════════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .1s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-full { width: 100%; }

/* ══ Modal ══════════════════════════════════════════════════════════════════ */
.modal-bg {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  z-index: 300;
}
.modal-box {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  width: 460px; max-width: 94vw;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.modal-close {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: background .1s, color .1s;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-desc { font-size: 13px; color: var(--muted); margin-bottom: 18px; line-height: 1.5; }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: .04em;
}
.form-group input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-family: inherit;
  color: var(--text);
  transition: border-color .1s;
}
.form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.device-code-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.device-code-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.device-code-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.device-code { font-size: 30px; font-weight: 800; letter-spacing: 8px; color: var(--accent); font-family: 'SF Mono', 'Consolas', monospace; flex: 1; }
.btn-copy-code {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--accent-light); color: var(--accent);
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.btn-copy-code:hover { background: var(--accent); color: #fff; }
.device-url-text {
  margin-top: 7px;
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
  text-align: center;
  font-family: 'SF Mono', 'Consolas', monospace;
}
.add-status { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 12px; }
.add-spinner { width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }

.add-success { text-align: center; padding: 8px 0; }
.add-success-icon { width: 56px; height: 56px; background: var(--ok-bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.add-success h4 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.add-success p { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.add-error-box { background: var(--err-bg); border-radius: var(--radius); padding: 20px; text-align: center; }
.add-error-icon { display: flex; justify-content: center; margin-bottom: 10px; }
.add-error-box p { font-size: 13px; color: var(--err-text); margin-bottom: 16px; }

/* ══ Login screen ═══════════════════════════════════════════════════════════ */
.login-screen {
  position: fixed; inset: 0;
  background: var(--sidebar-bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.login-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  width: 380px; max-width: 94vw;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.login-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.login-logo {
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.login-brand-name { font-size: 15px; font-weight: 700; color: var(--text); }
.login-brand-sub  { font-size: 11px; color: var(--muted); margin-top: 1px; }
.login-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.login-desc  { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.login-error {
  background: var(--err-bg);
  border: 1px solid #FECACA;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--err-text);
  margin-bottom: 16px;
}
.login-field { margin-bottom: 14px; }
.login-field label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 5px;
}
.login-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-family: inherit;
  color: var(--text);
  transition: border-color .1s;
}
.login-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.btn-login {
  width: 100%; padding: 11px;
  background: var(--accent);
  color: #fff; border: none;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-login:hover { background: var(--accent-hover); }
.btn-login:disabled { opacity: .6; cursor: not-allowed; }
.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.login-divider {
  display: flex; align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--faint);
  font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border);
}
.btn-login-ms {
  width: 100%; padding: 10px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .12s, border-color .12s;
}
.btn-login-ms:hover { background: var(--bg); border-color: #94A3B8; }

/* ══ Alert bell ═════════════════════════════════════════════════════════════ */
.alert-bell-wrap { position: relative; }
.btn-bell { position: relative; padding: 6px 10px; }
.bell-badge {
  position: absolute; top: 3px; right: 3px;
  min-width: 16px; height: 16px;
  background: var(--err);
  color: #fff;
  border-radius: 99px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}
.alert-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  width: 360px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,.15);
  z-index: 500;
  overflow: hidden;
}
.alert-dd-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--text);
}
.alert-dd-markall {
  font-size: 11px; color: var(--accent);
  background: none; border: none;
  cursor: pointer; font-family: inherit; font-weight: 500;
}
.alert-dd-markall:hover { text-decoration: underline; }
.alert-dd-empty { padding: 24px 16px; text-align: center; font-size: 13px; color: var(--faint); }
.alert-dd-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .1s;
}
.alert-dd-item:last-child { border-bottom: none; }
.alert-dd-item:hover { background: var(--bg); }
.alert-dd-item.unread { background: #F8FAFF; }
.alert-dd-item.unread:hover { background: #EFF6FF; }
.alert-dd-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0; margin-top: 5px;
}
.alert-dd-dot.critical { background: var(--err); }
.alert-dd-dot.warning  { background: var(--warn); }
.alert-dd-dot.info     { background: var(--accent); }
.alert-dd-body { flex: 1; min-width: 0; }
.alert-dd-title { font-size: 13px; font-weight: 600; color: var(--text); }
.alert-dd-desc  { font-size: 11px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-dd-time  { font-size: 10px; color: var(--faint); margin-top: 3px; }

/* ══ Topbar user ════════════════════════════════════════════════════════════ */
.topbar-user {
  display: flex; align-items: center; gap: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}
.topbar-user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#user-display-name { font-size: 12px; font-weight: 600; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout { padding: 6px 8px; color: var(--faint); }
.btn-logout:hover { color: var(--err); border-color: var(--err); }

/* ══ Raisons non-conformité ══════════════════════════════════════════════════ */
.nc-reasons {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.nc-reason {
  display: inline-block;
  font-size: 10px;
  color: var(--err-text);
  background: var(--err-bg);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.nc-reason::before { content: '↳ '; opacity: .6; }
.nc-reason.nc-error { background: #FFF7ED; color: #92400E; }
.nc-more {
  font-size: 10px;
  color: var(--faint);
  padding-left: 2px;
  font-style: italic;
}
.nc-loading {
  font-size: 10px;
  color: var(--faint);
  font-style: italic;
  animation: fadeInOut 1.2s ease-in-out infinite;
}
.nc-empty { font-size: 10px; color: var(--faint); font-style: italic; }
@keyframes fadeInOut { 0%,100%{opacity:.4} 50%{opacity:1} }

/* ══ Paramètres ═════════════════════════════════════════════════════════════ */
.stab-count { font-size: 12px; color: var(--muted); font-weight: 500; }
.settings-restricted {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 60px 24px;
  color: var(--faint); font-size: 14px;
}

/* Table utilisateurs */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar-sm {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name-cell { font-weight: 600; color: var(--text); }
.user-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.btn-icon-action {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
  flex-shrink: 0;
}
.btn-icon-action:hover { background: var(--card); color: var(--text); border-color: #94A3B8; }
.btn-icon-danger:hover  { background: var(--err-bg); color: var(--err); border-color: #FECACA; }
.btn-icon-tenants:hover { background: var(--accent-light); color: var(--accent); border-color: #BFDBFE; }

/* Tenant checkbox list dans modal */
.tenant-checkbox-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; padding: 2px; }
.tenant-checkbox-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .1s, border-color .1s;
  user-select: none;
}
.tenant-checkbox-item:hover { background: var(--bg); border-color: #94A3B8; }
.tenant-checkbox-item:has(.tenant-checkbox-input:checked) {
  background: var(--accent-light);
  border-color: #93C5FD;
}
.tenant-checkbox-input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.tenant-checkbox-label { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
.tenant-checkbox-id { font-size: 11px; color: var(--faint); font-family: monospace; }

.role-select {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px; font-family: inherit;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}
.role-select:focus { outline: none; border-color: var(--accent); }
.role-select:disabled { opacity: .5; cursor: not-allowed; }

/* Modal user hint */
.modal-user-hint {
  font-size: 11px;
  color: var(--faint);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 9px 12px;
  line-height: 1.6;
  margin-top: 4px;
}

/* Toast */
#toast-notification {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--text);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  z-index: 2000;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  max-width: 320px;
}
#toast-notification.toast-ok  { background: var(--ok); }
#toast-notification.toast-err { background: var(--err); }
#toast-notification.toast-warn { background: var(--warn); }

/* ══ Assignation — badges partagés (apps, profils, conformité) ══════════════ */
.asg-cell { max-width: 320px; }
.asg-pill {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  margin: 2px 2px 2px 0;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  line-height: 1.6;
}
.asg-required  { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.asg-available { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.asg-excluded  { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.asg-uninstall { background: #FFF7ED; color: #92400E; border: 1px solid #FDE68A; }

/* Pill groupe simple (sans intent) — sécurité + profils */
.group-pill {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  margin: 2px 2px 2px 0;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  background: rgba(99,102,241,.1);
  color: #6366F1;
  border: 1px solid rgba(99,102,241,.25);
}
.group-pill-excl {
  background: rgba(239,68,68,.08);
  color: var(--err);
  border-color: rgba(239,68,68,.2);
}

/* Bloc assignations dans les policy-cards conformité */
.policy-assignments {
  margin: 8px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

/* ══ Onglets Sécurité & Analyse — styles partagés ═══════════════════════════ */
.tab-security, .tab-analysis {
  display: flex; align-items: center;
}

.sec-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 60px 24px; color: var(--muted); font-size: 13px;
}

/* ══ Sécurité — KPI cards ═══════════════════════════════════════════════════ */
.sec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.sec-kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 20px 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid transparent;
  transition: transform .1s;
}
.sec-kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.sec-kpi-ok   { border-left-color: var(--ok); }
.sec-kpi-warn { border-left-color: var(--warn); }
.sec-kpi-err  { border-left-color: var(--err); }
.sec-kpi-neutral { border-left-color: #CBD5E1; }

.sec-kpi-val {
  font-size: 32px; font-weight: 800; letter-spacing: -.02em;
  line-height: 1.1; margin-bottom: 4px;
}
.sec-kpi-ok   .sec-kpi-val { color: var(--ok); }
.sec-kpi-warn .sec-kpi-val { color: var(--warn); }
.sec-kpi-err  .sec-kpi-val { color: var(--err); }
.sec-kpi-neutral .sec-kpi-val { color: var(--text); }

.sec-kpi-label { font-size: 12px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .04em; }
.sec-kpi-sub   { font-size: 11px; color: var(--faint); margin-top: 4px; }

/* ══ Sécurité — AV detail ═══════════════════════════════════════════════════ */
.sec-section-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--text);
}
.sec-av-detail {
  margin-top: 0; padding: 16px 20px;
}
.sec-av-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px;
}
.sec-av-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: center;
}
.sec-av-item.ok   { border-color: #BBF7D0; background: var(--ok-bg); }
.sec-av-item.warn { border-color: #FDE68A; background: var(--warn-bg); }
.sec-av-item.err  { border-color: #FECACA; background: var(--err-bg); }
.sec-av-num { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.1; }
.sec-av-item.ok   .sec-av-num { color: var(--ok); }
.sec-av-item.warn .sec-av-num { color: var(--warn); }
.sec-av-item.err  .sec-av-num { color: var(--err); }
.sec-av-lbl { font-size: 11px; color: var(--muted); margin-top: 4px; font-weight: 500; }

/* ══ Sécurité — Appareils à risque ═════════════════════════════════════════ */
.sec-at-risk-card { }
.sec-no-risk {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 36px 24px; color: var(--ok); font-size: 14px; font-weight: 500;
}

/* ══ Analyse — Score card ═══════════════════════════════════════════════════ */
.analysis-score-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 32px;
  margin-bottom: 16px;
}
.analysis-score-wrap {
  display: flex; align-items: baseline; gap: 4px;
  flex-shrink: 0;
}
.analysis-score-num {
  font-size: 72px; font-weight: 900; letter-spacing: -.04em; line-height: 1;
}
.analysis-score-denom {
  font-size: 22px; font-weight: 600; color: var(--faint); margin-bottom: 6px;
}
.analysis-score-right { flex: 1; min-width: 0; }
.analysis-score-label {
  font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 10px;
}
.analysis-score-bar-wrap { margin-bottom: 12px; }
.analysis-score-track {
  height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden;
  border: 1px solid var(--border);
}
.analysis-score-fill {
  height: 100%; border-radius: 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.analysis-score-counts { display: flex; gap: 6px; flex-wrap: wrap; }

/* ══ Analyse — Stats rapides ════════════════════════════════════════════════ */
.analysis-stats-grid {
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px;
  margin-bottom: 20px;
}
.analysis-stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; text-align: center; box-shadow: var(--shadow);
}
.analysis-stat-val { font-size: 18px; font-weight: 800; color: var(--text); line-height: 1.2; }
.analysis-stat-lbl { font-size: 10px; color: var(--faint); margin-top: 3px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══ Live Monitor Widget (dashboard principal) ══════════════════════════════ */
.live-monitor-section { margin-bottom: 20px; }
.live-monitor-card {
  background: #0F172A;
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(99,102,241,0.06), var(--shadow);
}
.live-monitor-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(99,102,241,0.12);
}
.live-monitor-title {
  display: flex; align-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #A5B4FC;
}
.live-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 800; letter-spacing: .12em;
  color: #4ADE80; background: rgba(74,222,128,.1);
  padding: 2px 8px; border-radius: 99px; border: 1px solid rgba(74,222,128,.2);
}
.live-badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #4ADE80;
  animation: radar-blink 1.4s ease-in-out infinite;
}
.live-monitor-body {
  display: flex; align-items: stretch; gap: 0;
}
.orbital-side {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 20px 16px 24px;
  border-right: 1px solid rgba(99,102,241,0.1);
}
#orbital-canvas { display: block; }
.orbital-legend {
  margin-top: 12px; display: flex; flex-direction: column; gap: 5px; align-self: flex-start;
}
.orb-leg-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: rgba(165,180,252,0.6);
}
.orb-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.orb-dot.ok { background: #34D399; box-shadow: 0 0 4px rgba(52,211,153,.5); }
.orb-dot.nc { background: #F87171; box-shadow: 0 0 4px rgba(248,113,113,.5); }
.orb-total  { color: rgba(165,180,252,0.35); font-size: 10px; margin-top: 3px; }

/* Activity Feed */
.feed-side {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  padding: 0;
}
.feed-header {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(165,180,252,0.45);
  padding: 10px 16px 8px;
  border-bottom: 1px solid rgba(99,102,241,0.08);
}
.feed-list {
  flex: 1; overflow: hidden;
  padding: 4px 0;
}
.feed-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 16px;
  font-size: 11px;
  border-bottom: 1px solid rgba(99,102,241,0.05);
  animation: feedSlideIn 0.35s ease-out;
}
.feed-item:last-child { border-bottom: none; }
@keyframes feedSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.feed-tag {
  flex-shrink: 0; font-size: 9px; font-weight: 800; letter-spacing: .06em;
  padding: 1px 5px; border-radius: 3px;
  min-width: 44px; text-align: center;
}
.feed-tag-sync    { background: rgba(99,102,241,.15); color: #A5B4FC; }
.feed-tag-policy  { background: rgba(245,158,11,.12); color: #FCD34D; }
.feed-tag-refresh { background: rgba(52,211,153,.1);  color: #6EE7B7; }
.feed-tag-enroll  { background: rgba(167,139,250,.12);color: #C4B5FD; }
.feed-device { color: #E2E8F0; font-weight: 500; flex-shrink: 0; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-device-link { cursor: pointer; text-decoration: underline; text-decoration-color: rgba(148,163,184,.3); text-underline-offset: 2px; transition: color .15s, text-decoration-color .15s; }
.feed-device-link:hover { color: #93C5FD; text-decoration-color: #93C5FD; }
.feed-os     { color: rgba(148,163,184,.4); flex-shrink: 0; font-size: 10px; }
.feed-detail { flex-shrink: 0; font-size: 10px; font-weight: 600; }
.feed-ok     { color: #4ADE80; }
.feed-err    { color: #F87171; }
.feed-accent { color: #FCD34D; }
.feed-info   { color: #93C5FD; }
.feed-tenant { color: rgba(148,163,184,.35); font-size: 10px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-ago    { flex-shrink: 0; color: rgba(148,163,184,.3); font-size: 10px; font-variant-numeric: tabular-nums; width: 24px; text-align: right; }

/* ══ Radar widget ═══════════════════════════════════════════════════════════ */
.radar-widget {
  background: #020d07;
  border: 1px solid rgba(0,180,60,0.25);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 20px;
  box-shadow: 0 0 40px rgba(0,255,80,0.04), var(--shadow);
}
#radar-canvas {
  flex-shrink: 0;
  border-radius: 50%;
  display: block;
}
.radar-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.radar-info-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #4eff80;
}
.radar-stats-row {
  display: flex;
  gap: 24px;
}
.radar-stat-item { display: flex; flex-direction: column; }
.radar-stat-val {
  font-size: 30px;
  font-weight: 800;
  color: #4eff80;
  line-height: 1;
}
.radar-stat-val.radar-stat-risk { color: #f87171; }
.radar-stat-lbl {
  font-size: 11px;
  color: rgba(0,200,70,0.55);
  margin-top: 3px;
}
.radar-pulse {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: rgba(0,200,70,0.5);
}
.radar-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4eff80;
  flex-shrink: 0;
  animation: radar-blink 1.6s ease-in-out infinite;
}
@keyframes radar-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #4eff80; }
  50%       { opacity: 0.25; box-shadow: none; }
}

/* ══ KPI sécurité — cliquable ═══════════════════════════════════════════════ */
.sec-kpi-clickable {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.sec-kpi-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}
.sec-kpi-hint {
  font-size: 10px; color: var(--accent); margin-top: 4px; font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s;
}
.sec-kpi-clickable:hover .sec-kpi-hint { opacity: 1; }

/* ══ Panneau détail KPI ═════════════════════════════════════════════════════ */
.sec-detail-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(15,23,42,0.55);
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.22s;
}
.sec-detail-overlay.sec-detail-open { opacity: 1; }
.sec-detail-panel {
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  width: min(720px, 92vw); max-height: 80vh;
  display: flex; flex-direction: column;
  transform: translateY(12px); transition: transform 0.22s;
}
.sec-detail-overlay.sec-detail-open .sec-detail-panel { transform: translateY(0); }
.sec-detail-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.sec-detail-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.sec-detail-count {
  font-size: 11px; background: var(--bg); border: 1px solid var(--border);
  color: var(--muted); padding: 1px 7px; border-radius: 99px; font-weight: 600;
}
.sec-detail-close {
  background: none; border: none; cursor: pointer; color: var(--muted);
  padding: 4px; border-radius: 4px; display: flex; align-items: center;
}
.sec-detail-close:hover { background: var(--bg); color: var(--text); }
.sec-detail-body { overflow-y: auto; padding: 0; flex: 1; }
.sec-detail-section { padding: 0; }
.sec-detail-section + .sec-detail-section { border-top: 1px solid var(--border); }
.sec-detail-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 20px 6px;
}
.detail-err   { color: var(--err); }
.detail-ok    { color: var(--ok); }
.detail-muted { color: var(--muted); }
.sec-detail-body table { width: 100%; margin: 0; border-radius: 0; border: none; }
.sec-detail-body th, .sec-detail-body td { padding: 8px 20px; }
.sec-detail-body thead tr { background: var(--bg); }

/* ══ Sidebar version ════════════════════════════════════════════════════════ */
.sidebar-version {
  font-size: 10px;
  color: rgba(255,255,255,.2);
  text-align: center;
  margin-top: 6px;
  letter-spacing: .03em;
}

/* ══ Analyse — Findings ═════════════════════════════════════════════════════ */
.findings-section { margin-bottom: 20px; }
.findings-section-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 12px;
}
.finding-empty {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; text-align: center; color: var(--ok); font-size: 14px; font-weight: 500;
}
.finding-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  margin-bottom: 10px; overflow: hidden; box-shadow: var(--shadow);
  border-left: 4px solid transparent;
}
.finding-critique     { border-left-color: var(--err); }
.finding-avertissement{ border-left-color: var(--warn); }
.finding-info         { border-left-color: var(--accent); }

.finding-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px 10px;
  cursor: pointer;
}
.finding-icon { flex-shrink: 0; }
.finding-critique     .finding-icon { color: var(--err); }
.finding-avertissement .finding-icon { color: var(--warn); }
.finding-info          .finding-icon { color: var(--accent); }

.finding-title { font-size: 13px; font-weight: 700; color: var(--text); flex: 1; min-width: 0; }
.finding-count {
  font-size: 11px; color: var(--faint); background: var(--bg);
  padding: 2px 8px; border-radius: 99px; flex-shrink: 0;
  border: 1px solid var(--border);
}
.finding-body { padding: 0 18px 16px; }
.finding-desc   { font-size: 13px; color: var(--text); line-height: 1.5; margin-bottom: 7px; }
.finding-impact {
  font-size: 12px; color: var(--muted); background: var(--bg);
  border-radius: var(--radius); padding: 8px 12px; margin-bottom: 8px;
  border-left: 3px solid var(--border);
}
.finding-critique     .finding-impact { border-left-color: var(--err); background: var(--err-bg); }
.finding-avertissement .finding-impact { border-left-color: var(--warn); background: var(--warn-bg); }
.finding-action {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 12px; color: var(--text); font-weight: 500;
}
.finding-action svg { flex-shrink: 0; margin-top: 1px; color: var(--accent); }
.finding-link {
  margin-left: auto; flex-shrink: 0;
  font-size: 11px; color: var(--accent); text-decoration: none;
  font-weight: 600;
}
.finding-link:hover { text-decoration: underline; }
.finding-apply-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 6px; border: 1px solid var(--accent);
  background: rgba(37,99,235,.08); color: var(--accent);
  font-size: 11px; font-weight: 600; cursor: pointer; flex-shrink: 0;
  transition: background .15s, opacity .15s;
  text-decoration: none;
}
.finding-apply-btn:hover:not(:disabled) { background: rgba(37,99,235,.16); }
.finding-apply-btn:disabled { opacity: .6; cursor: default; }
.finding-apply-portal { border-color: var(--muted); color: var(--muted); background: transparent; }
.finding-apply-portal:hover { background: rgba(148,163,184,.1); color: var(--text); }

/* Appareils affectés dans les findings */
.finding-devices { margin: 8px 0 6px; }
.finding-devices-label { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.finding-devices-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--accent); background: none; border: none;
  padding: 2px 0; cursor: pointer; font-weight: 600;
}
.finding-devices-toggle svg { transition: transform .2s; }
.finding-devices-toggle.open svg { transform: rotate(180deg); }
.finding-devices-list { display: none; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.finding-devices-list.open { display: flex; }
.finding-device-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 8px; cursor: pointer; color: var(--text);
  font-weight: 600; transition: background .15s, border-color .15s;
}
.finding-device-chip:hover { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.finding-device-chip .fdc-user { font-weight: 400; color: var(--muted); font-size: 10px; }

/* Score info button */
.score-info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  cursor: pointer; color: var(--muted); transition: all .15s; flex-shrink: 0;
}
.score-info-btn:hover, .score-info-btn.active { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.score-info-panel {
  margin-top: 10px; padding: 12px 14px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow);
}

/* ══ Analyse — Points conformes ════════════════════════════════════════════ */
.conforme-section {
  background: var(--ok-bg);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}
.conforme-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--ok-text);
  margin-bottom: 12px;
}
.conforme-list { display: flex; flex-direction: column; gap: 8px; }
.conforme-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px;
  background: rgba(255,255,255,.6);
  border-radius: var(--radius);
  border: 1px solid #BBF7D0;
}
.conforme-item svg { flex-shrink: 0; margin-top: 2px; }
.conforme-check-title { font-size: 13px; font-weight: 600; color: var(--ok-text); }
.conforme-check-desc  { font-size: 11px; color: var(--ok); margin-top: 1px; }

/* ══ Device panel — hardware chips ══════════════════════════════════════════ */
.dp-hw-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 20px 0;
}
.dp-hw-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.dp-hw-chip svg { color: var(--muted); flex-shrink: 0; }
.dp-field-wide { grid-column: span 2; }
.dp-serial-link {
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.dp-serial-link:hover { text-decoration: underline; }

/* ══ Tenant banner ══════════════════════════════════════════════════════════ */
.tenant-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.tenant-banner-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--tc, #1F4E79) 0%, transparent 55%);
  opacity: .18;
  pointer-events: none;
}
.tenant-banner-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
}
.tenant-banner-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--tc, #1F4E79);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.tenant-banner-info { flex: 1; min-width: 0; }
.tenant-banner-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tenant-banner-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* ══ Confirm dialog ══════════════════════════════════════════════════════════ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}
.confirm-panel {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px 28px 24px;
  width: 420px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  text-align: center;
}
.confirm-icon { margin-bottom: 16px; }
.confirm-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.confirm-msg {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: none;
  background: var(--err);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-danger:hover { background: #B91C1C; }
.btn-danger.btn-sm { padding: 5px 11px; font-size: 12px; }

/* ══ Logo upload ══════════════════════════════════════════════════════════════ */
.logo-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  transition: border-color .2s, background .2s;
  overflow: hidden;
  padding: 16px;
}
.logo-upload-zone:hover { border-color: var(--accent); background: var(--accent-light); }
.logo-preview-img {
  max-height: 80px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.logo-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  pointer-events: none;
}
.logo-upload-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.logo-upload-hint  { font-size: 11px; }
.settings-tenant-logo {
  height: 28px;
  max-width: 72px;
  object-fit: contain;
  border-radius: 3px;
  background: var(--bg);
  padding: 2px 4px;
  border: 1px solid var(--border);
}
.tenant-banner-logo {
  height: 52px;
  max-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.15));
}

/* ══ Settings — Tenants table ════════════════════════════════════════════════ */
.tenant-color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
  border: 1px solid rgba(0,0,0,.1);
}
.btn-sm {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  font-size: 12px;
  border-radius: var(--radius);
}

/* ══ Animations dynamiques ══════════════════════════════════════════════════ */

/* Pulse rouge sur KPIs critiques */
@keyframes kpi-err-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
  50%       { box-shadow: 0 0 0 6px rgba(220,38,38,0.18); }
}
.kpi.kpi-err { animation: kpi-err-pulse 2.4s ease-in-out infinite; }

/* Pulse sur badges erreur dans les tableaux */
@keyframes badge-err-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .65; }
}
.badge-err { animation: badge-err-pulse 2s ease-in-out infinite; }

/* Barre score — transition définie ici pour l'animation initiale */
.score-fill, .analysis-score-fill { transition: width 1.1s cubic-bezier(0.4,0,0.2,1); }

/* Auto-refresh button */
.btn-ar {
  display: flex !important;
  align-items: center;
  gap: 6px;
  padding: 5px 10px !important;
}
.ar-hint {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  min-width: 28px;
}
@keyframes ar-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.ar-spinning {
  animation: ar-spin 0.7s linear infinite;
  transform-origin: center;
}

/* Sync info button + panel */
.sync-info-wrap { position: relative; display: flex; align-items: center; }
.btn-sync-info {
  width: 28px; height: 28px; padding: 0 !important;
  justify-content: center; border-radius: 50%;
}
.sync-info-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 310px; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  padding: 14px 16px; z-index: 200;
}
.sync-info-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; margin-bottom: 6px;
}
.sync-info-lbl { color: var(--muted); }
.sync-info-val { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.sync-info-sep { height: 1px; background: var(--border); margin: 10px 0; }
.sync-info-note {
  display: flex; gap: 7px; align-items: flex-start;
  font-size: 11px; color: var(--muted); line-height: 1.5;
}
.sync-info-note svg { flex-shrink: 0; margin-top: 1px; color: var(--accent); }

/* ══ Responsive ═════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .analysis-stats-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1024px) {
  .charts-grid { grid-template-columns: 1fr; }
  .sec-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .sec-av-grid  { grid-template-columns: repeat(2, 1fr); }
  .analysis-stats-grid { grid-template-columns: repeat(4, 1fr); }
  .live-monitor-body { flex-direction: column; }
  .orbital-side { border-right: none; border-bottom: 1px solid rgba(99,102,241,0.1); flex-direction: row; gap: 20px; padding: 14px 20px; }
  .orbital-legend { margin-top: 0; justify-content: center; }
}
@media (max-width: 800px) {
  .sidebar { width: 200px; }
  .page-wrap { margin-left: 200px; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .analysis-score-card { flex-direction: column; gap: 16px; }
  .analysis-score-num { font-size: 56px; }
}
@media (max-width: 600px) {
  .sidebar { display: none; }
  .page-wrap { margin-left: 0; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .device-panel { width: 100vw; }
  #app { padding: 14px 16px; }
  .sec-kpi-grid { grid-template-columns: 1fr 1fr; }
  .sec-av-grid  { grid-template-columns: 1fr 1fr; }
  .analysis-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .conflicts-summary { grid-template-columns: repeat(2, 1fr); }
}

/* ══ Conflits de policies ════════════════════════════════════════════════════ */
.tab-conflicts { position: relative; }
.tab-conflict-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--err); color: #fff; border-radius: 99px;
  font-size: 10px; font-weight: 700; margin-left: 5px; vertical-align: middle;
}

.conflicts-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px;
}
.conflicts-kpi {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; border-left: 3px solid transparent;
}
.conflicts-kpi-err  { border-left-color: var(--err); }
.conflicts-kpi-warn { border-left-color: var(--warn); }
.conflicts-kpi-ok   { border-left-color: var(--ok); }
.conflicts-kpi-neutral { border-left-color: var(--border); }
.conflicts-kpi-val { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.conflicts-kpi-err  .conflicts-kpi-val { color: var(--err); }
.conflicts-kpi-warn .conflicts-kpi-val { color: var(--warn); }
.conflicts-kpi-ok   .conflicts-kpi-val { color: var(--ok); }
.conflicts-kpi-neutral .conflicts-kpi-val { color: var(--text); }
.conflicts-kpi-lbl { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }

.conflicts-card { margin-bottom: 14px; padding: 0; overflow: hidden; }
.conflicts-card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--bg);
}
.conflicts-card-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.conflicts-policy-name { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conflicts-card table { margin: 0; border-radius: 0; border: none; }
