/* Dashboard : analyse détaillée du réseau (0.98.0, dashboard-insights.js). */

.dash-section { margin: var(--space-4) 0; }
.dash-h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: var(--space-5) 0 var(--space-3);
}
.dash-note { margin-top: var(--space-2); }
.dash-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: var(--space-5);
}
.dash-grid-2 > div { min-width: 0; }
/* Trois colonnes (Indexation selon le trafic) : une seule sous 1100 px. */
.dash-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.dash-grid-3 > div { min-width: 0; }
.dash-total td { font-weight: 600; border-top: 2px solid var(--border-primary); }
@media (max-width: 1100px) {
  .dash-grid-3 { grid-template-columns: minmax(0, 1fr); }
}
/* Donut au-dessus de sa légende (colonne étroite). */
.dash-grid-3 .dash-donut { flex-direction: column; align-items: center; }
.dash-grid-3 .dash-legend { width: 100%; min-width: 0; }

/* Tableaux : défilement horizontal propre sur mobile. */
.dash-scroll {
  overflow-x: auto;
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-2xl);
}
.dash-scroll--tall { max-height: 400px; overflow-y: auto; }
.dash-scroll--tall thead th { position: sticky; top: 0; z-index: 1; }
.dash-table tbody tr { cursor: default; }
.dash-table th, .dash-table td { white-space: nowrap; }
.dash-num { text-align: right !important; font-variant-numeric: tabular-nums; }
.dash-queries { white-space: normal !important; min-width: 220px; font-size: 12px !important; line-height: 1.5; }
.dash-up { color: var(--status-success); font-weight: 600; }
.dash-down { color: var(--status-danger); font-weight: 600; }

/* Couleurs des étiquettes d'indexation. */
.dash-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; flex: none; }
.dash-dot.is-good, .dash-bars__seg.is-good { background: var(--status-success); }
.dash-dot.is-mid,  .dash-bars__seg.is-mid  { background: var(--status-warning); }
.dash-dot.is-low,  .dash-bars__seg.is-low  { background: var(--status-danger); }
.dash-dot.is-none, .dash-bars__seg.is-none { background: var(--text-tertiary); opacity: .5; }

/* Anneau de répartition. */
.dash-donut { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.dash-donut svg { width: 150px; height: 150px; flex: none; }
.dash-donut__arc { fill: none; stroke-width: 22; }
.dash-donut__arc.is-good { stroke: var(--status-success); }
.dash-donut__arc.is-mid  { stroke: var(--status-warning); }
.dash-donut__arc.is-low  { stroke: var(--status-danger); }
.dash-donut__arc.is-none { stroke: var(--text-tertiary); opacity: .5; }
.dash-donut__total { font-family: var(--font-display); font-size: 22px; font-weight: 700; fill: var(--text-primary); text-anchor: middle; }
.dash-donut__sub { font-size: 11px; fill: var(--text-tertiary); text-anchor: middle; }
.dash-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font-size: 13px; flex: 1; min-width: 220px; }
.dash-legend li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: var(--space-2); }

/* Barres empilées par tranche de trafic. */
.dash-bars { display: grid; gap: var(--space-3); }
.dash-bars__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 13px; }
.dash-bars__label { color: var(--text-primary); }
.dash-bars__track { display: flex; height: 12px; border-radius: var(--radius-full); overflow: hidden; background: var(--surface-secondary); }
.dash-bars__seg { height: 100%; }
.dash-bars__value { font-size: 12px; color: var(--text-secondary); }

/* Courbes des étiquettes. */
.dash-chart { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 170px auto; column-gap: var(--space-2); }
.dash-chart svg { width: 100%; height: 170px; display: block; overflow: visible; }
.dash-chart__y { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-size: 11px; color: var(--text-tertiary); line-height: 1; margin: -5px 0; }
.dash-chart__x { grid-column: 2; display: flex; justify-content: space-between; font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }
.dash-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.dash-line.is-good { stroke: var(--status-success); }
.dash-line.is-mid  { stroke: var(--status-warning); }
.dash-line.is-low  { stroke: var(--status-danger); }
.dash-grid { stroke: var(--border-secondary); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.dash-chart-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: 12px; color: var(--text-secondary); align-items: center; margin-top: var(--space-2); }
.dash-chart-legend > span { display: inline-flex; align-items: center; gap: 4px; }

/* Signaux. */
.dash-signals { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.dash-signals li {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: 13px; line-height: 1.5;
  background: var(--surface-secondary);
  color: var(--text-primary);
}
.dash-signals li svg { flex: none; margin-top: 2px; }
.dash-signals li.is-danger  svg { color: var(--status-danger); }
.dash-signals li.is-warning svg { color: var(--status-warning); }
.dash-signals li.is-info    svg { color: var(--status-info); }
