/* 9. Tableaux -------------------------------------------------------------- */
.tableau-conteneur {
  overflow-x: auto;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-petit);
}

.tableau {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.tableau th,
.tableau td {
  padding: 0.8rem 1rem;
  text-align: left;
  white-space: nowrap;
}

.tableau thead th {
  background: #f7f9fc;
  border-bottom: 1px solid var(--bordure);
  color: var(--texte-secondaire);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tableau tbody tr {
  border-bottom: 1px solid var(--bordure);
  transition: background var(--transition);
}

.tableau tbody tr:last-child {
  border-bottom: none;
}

.tableau tbody tr:nth-child(even) {
  background: #fbfcfe;
}

.tableau tbody tr:hover {
  background: var(--primaire-clair);
}

.tableau tfoot th {
  border-top: 2px solid var(--bordure-forte);
  background: #f7f9fc;
  font-weight: 700;
}

.tableau .nombre {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Montant négatif en rouge (Epic 1 US6, Epic 2 US6) */
.tableau .negatif {
  color: var(--danger);
  font-weight: 700;
}

.tableau td.negatif {
  background: linear-gradient(90deg, transparent, var(--danger-clair));
}

.tri {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  text-decoration: none;
}

.tri:hover,
.tri-actif {
  color: var(--primaire);
}

.devise {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  background: var(--fond);
  color: var(--texte-secondaire);
  font-size: 0.78rem;
  font-weight: 600;
}

.cellule-utilisateur {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}
