/* CRM BlueIa · vue « Tableau de bord » (dashboard). Classes préfixées par .dashboard- */

.dashboard-cron:empty { display: none; }
.dashboard-cron { margin-bottom: var(--s-4); }
.dashboard-kpis { margin-bottom: var(--s-4); }
.dashboard-grid { align-items: start; }

/* Tableau croisé métier × département : première colonne collante, teinte selon le volume. */
.dashboard-pivot-wrap { overflow: auto; max-height: 520px; }
.dashboard-pivot { width: 100%; border-collapse: separate; border-spacing: 0; }
.dashboard-pivot th, .dashboard-pivot td { white-space: nowrap; }
.dashboard-pivot thead th { position: sticky; top: 0; z-index: 2; background: var(--card); }
.dashboard-pivot__corner, .dashboard-pivot__row { position: sticky; left: 0; z-index: 1; background: var(--card); text-align: left; font-weight: 500; color: var(--ink); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.dashboard-pivot thead .dashboard-pivot__corner { z-index: 3; }
.dashboard-pivot__cell { font-family: var(--font-mono); min-width: 56px; }
.dashboard-pivot__cell--l0 { color: var(--muted); }
.dashboard-pivot__cell--l1 { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.dashboard-pivot__cell--l2 { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.dashboard-pivot__cell--l3 { background: color-mix(in srgb, var(--accent) 26%, transparent); }
.dashboard-pivot__cell--l4 { background: color-mix(in srgb, var(--accent) 38%, transparent); font-weight: 600; }
.dashboard-pivot__total { font-family: var(--font-mono); font-weight: 600; border-left: 1px solid var(--line); }
.dashboard-pivot tfoot th, .dashboard-pivot tfoot td { position: sticky; bottom: 0; background: var(--soft); font-weight: 600; border-top: 1px solid var(--line-strong); font-family: var(--font-mono); }
.dashboard-pivot tfoot .dashboard-pivot__row { font-family: var(--font); z-index: 2; background: var(--soft); }
.dashboard-pivot__link { display: block; margin: calc(var(--s-1) * -1) calc(var(--s-2) * -1); padding: var(--s-1) var(--s-2); color: inherit; text-decoration: none; border-radius: var(--r-sm); }
.dashboard-pivot__link:hover { color: var(--accent-d); text-decoration: underline; }

@media (max-width: 1180px) {
  .dashboard-pivot-wrap { max-height: 420px; }
}
@media print {
  .dashboard-pivot-wrap { overflow: visible; max-height: none; }
}
