/**
 * Design system utilities — surfaces and semantic helpers.
 * Tokens: layout.css (:root).
 */

/* ── Surfaces ── */
.surface-card {
  border-radius: var(--radius-card);
  box-sizing: border-box;
}

/* ── Semantic text ── */
.text-sem-success { color: var(--color-success-text); }
.text-sem-warning { color: var(--color-warning-text); }
.text-sem-alert { color: var(--color-alert-text); }
.text-sem-info { color: var(--color-info-text); }

/* ── Semantic badges ── */
.badge-sem {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.badge-sem--alert {
  background: var(--color-alert-bg);
  color: var(--color-alert-text);
}

.badge-sem--warning {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.badge-sem--success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.badge-sem--info {
  background: var(--color-info-bg);
  color: var(--color-info-text);
}

/* ── Table typography: Mona Sans, chiffres proportionnels (0 rond, pas barré) ── */
table {
  font-family: var(--font-primary);
}

table tbody td:not(:first-child),
table thead th:not(:first-child),
.ui-numeric,
.table-summary__value,
.table-efficiency__value,
.map-view__metric-value,
.home-kpi-card__value,
.dashboard .dashboard__table-wrap td[id],
.dashboard .table-cumulative-energy th[id],
.dashboard .soc-block__values {
  font-family: var(--font-primary);
  font-variant-numeric: var(--font-variant-numeric-data);
  font-feature-settings: var(--font-feature-settings-data);
}

/* ── Dashboard: blocs structurés par l’espacement, sans fond/ombre distincts ── */
.dashboard .table-efficiency,
.dashboard .table-live-power,
.dashboard .table-cumulative-energy,
.dashboard .table-summary-energy,
.dashboard .table-summary,
.dashboard .dashboard-filters,
.dashboard .dashboard__card.chart-container {
  border-radius: var(--radius-card);
  box-sizing: border-box;
}
