/* ============================================================
   Styles dédiés à la page « Récapitulatif GD, zones et paniers »
   Préfixe : pri- (Pointages Récapitulatif Indemnités)
   ============================================================ */

:root {
  /* Largeurs des deux premières colonnes, partagées entre la largeur
     déclarée et le décalage sticky de la colonne Société. */
  --pri-col-salarie-width: 200px;
  --pri-col-societe-width: 150px;
  --pri-col-zone-width: 58px;
}

/* Conteneur de défilement horizontal, accessible au clavier */
.pri-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.pri-table-scroll:focus-visible {
  outline: 2px solid var(--bs-primary, #0d6efd);
  outline-offset: -2px;
}

/* Tableau : bordures séparées pour que le sticky fonctionne correctement */
.pri-table {
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
  white-space: nowrap;
}

.pri-table th,
.pri-table td {
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

/* ---------- Colonnes fixes (Salarié / Société) ---------- */
.pri-table .pri-col-salarie {
  position: sticky;
  left: 0;
  z-index: 2;
  width: var(--pri-col-salarie-width);
  min-width: var(--pri-col-salarie-width);
  max-width: var(--pri-col-salarie-width);
  background-color: #ffffff;
}

.pri-table .pri-col-societe {
  position: sticky;
  left: var(--pri-col-salarie-width);
  z-index: 2;
  width: var(--pri-col-societe-width);
  min-width: var(--pri-col-societe-width);
  max-width: var(--pri-col-societe-width);
  background-color: #ffffff;
  /* Séparation visuelle entre la partie fixe et le reste du tableau */
  box-shadow: inset -1px 0 0 var(--bs-border-color, #dee2e6);
}

/* En-têtes : fond opaque et z-index supérieur aux cellules du corps */
.pri-table thead .pri-col-salarie,
.pri-table thead .pri-col-societe {
  z-index: 4;
  background-color: var(--bs-light, #f8f9fa);
}

/* Effet hover sur les lignes fixes */
.pri-table tbody tr:hover .pri-col-salarie,
.pri-table tbody tr:hover .pri-col-societe {
  background-color: var(--bs-light, #f8f9fa);
}

/* Ligne Total : fond distinct sur les colonnes fixes */
.pri-table .pri-row-total .pri-col-salarie,
.pri-table .pri-row-total .pri-col-societe {
  background-color: var(--bs-light, #f8f9fa);
}

/* En-têtes de groupes de zones */
.pri-table .pri-group-trajet {
  background-color: rgba(13, 110, 253, 0.08);
}

.pri-table .pri-group-transport {
  background-color: rgba(25, 135, 84, 0.08);
}

/* Colonnes de zones : compactes et centrées */
.pri-table .pri-col-zone {
  width: var(--pri-col-zone-width);
  min-width: var(--pri-col-zone-width);
  text-align: center;
}

/* En-têtes cliquables (tri) */
.pri-table th.pri-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.pri-table th.pri-sortable:hover {
  color: var(--bs-primary, #0d6efd);
}

/* Alignement des valeurs numériques */
.pri-table .pri-num {
  text-align: end;
}

/* Note sur les anomalies de zones */
.pri-anomalies {
  font-size: 0.8rem;
  color: var(--bs-warning-text-emphasis, #664d03);
}
