/* Orbite 7.0 — alignement robuste des tableaux.
   Couche additive : aucune donnée ni logique métier modifiée. */

/* Une cellule de tableau portant la classe générique .actions doit rester une
   véritable cellule. La règle historique .actions { display:flex } cassait la
   grille entre THEAD et TBODY, interrompait les séparateurs et décalait les
   boutons. */
.table-panel td.actions,
.table-panel th.actions {
  display: table-cell !important;
  text-align: right;
  vertical-align: middle;
  white-space: normal !important;
}

.table-panel td.actions .btn {
  display: inline-flex;
  min-width: 0;
  margin: 3px 0 3px 6px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Référentiel des délibérations : grille fixe et proportions communes aux
   en-têtes et aux lignes, y compris lorsque le titre ou l'objet est long. */
.deliberation-table-panel {
  overflow-x: auto;
}

.deliberation-table-panel table {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed;
}

.deliberation-table-panel th:nth-child(1),
.deliberation-table-panel td:nth-child(1) { width: 11%; }
.deliberation-table-panel th:nth-child(2),
.deliberation-table-panel td:nth-child(2) { width: 28%; }
.deliberation-table-panel th:nth-child(3),
.deliberation-table-panel td:nth-child(3) { width: 9%; }
.deliberation-table-panel th:nth-child(4),
.deliberation-table-panel td:nth-child(4) { width: 9%; }
.deliberation-table-panel th:nth-child(5),
.deliberation-table-panel td:nth-child(5) { width: 17%; }
.deliberation-table-panel th:nth-child(6),
.deliberation-table-panel td:nth-child(6) { width: 26%; }

.deliberation-table-panel td:nth-child(2),
.deliberation-table-panel td:nth-child(5) {
  overflow-wrap: anywhere;
}

.deliberation-table-panel th {
  white-space: nowrap;
}

.deliberation-table-panel td.actions {
  padding-left: 8px;
  padding-right: 12px;
  white-space: nowrap !important;
}

.deliberation-table-panel tbody tr > td {
  border-bottom: 1px solid var(--line);
}

/* Les listes étendues utilisent la même correction sans imposer une nouvelle
   largeur globale. Elles restent défilables dans leur panneau sur petit écran. */
.rgpd-request-table-panel td.actions,
.subvention-table-panel td.actions,
.payment-table-panel td.actions,
.tariff-table-panel td.actions {
  min-width: 190px;
}

@media (max-width: 760px) {
  .deliberation-table-panel table { min-width: 980px; }
  .table-panel td.actions .btn { margin-left: 4px; }
}

@media print {
  .deliberation-table-panel table {
    min-width: 0 !important;
    table-layout: fixed !important;
  }
  .table-panel td.actions,
  .table-panel th.actions {
    display: table-cell !important;
  }
}
