/* ============================================================
   inscrits.css — liste des inscrits d'une régate (inscrits.php)
   ============================================================ */

.table-row {
  display: grid;
  grid-template-columns: 250px 200px 30px 30px 60px auto 68px 30px;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
  align-items: center;
  font-size: 14px;
}

.main-row {
  cursor: pointer;
  transition: transform .06s, box-shadow .06s;
}

.main-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .13);
}

.line-reg {
  border-left: 4px solid #2f9e44;
  background: #e4f7e8;
}

.line-cot {
  border-left: 4px solid #f59f00;
  background: #fcf6ec;
}

.crew-panel {
  display: none;
}

.crew-panel-inner {
  background: #fbfdff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.ligne-equipage {
  grid-column: 1 / -1;
}

.serie-logo {
  width: 36px;
  height: auto;
  border-radius: 4px;
  margin-right: 10px;
}

.chevron-toggle {
  font-size: 18px;
  opacity: .5;
}

.cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-right {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

/* Boutons d'action modifier / supprimer */
.col-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.col-actions .btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid;
  background: transparent;
  transition: background .15s, color .15s;
  text-decoration: none;
  font-size: .85rem;
  line-height: 1;
}

.col-actions .btn-edit {
  border-color: #2563eb;
  color: #2563eb;
}

.col-actions .btn-edit:hover {
  background: #2563eb;
  color: #fff;
}

.col-actions .btn-delete {
  border-color: #dc3545;
  color: #dc3545;
}

.col-actions .btn-delete:hover {
  background: #dc3545;
  color: #fff;
}

@media screen and (max-width:1100px) {
  .table-row {
    grid-template-columns: 250px 30px 30px 40px auto 68px 30px;
  }

  .texte-reduit1 {
    display: none;
  }

  .ligne-equipage {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width:600px) {
  .table-row {
    grid-template-columns: auto 40px 40px 30px;
    gap: 0;
    padding: 3px;
  }

  .texte-reduit {
    display: none;
  }

  .col-actions {
    display: none;
  }

  .ligne-equipage {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   Tarifs et conditions d'inscription — bandeau de la fiche d'une régate,
   rendu par paiementTarifsHtml() (includes/paiement.php).
   À gauche la grille des tarifs, alignée ; à droite le paiement, la date limite
   et l'explication du club. Couleurs et polices : variables de style2.css.
   ============================================================ */
.tarifs {
  display: flex;
  flex-wrap: wrap;
  overflow: hidden; /* rogne le filet inutile de .tarifs-infos (voir plus bas) */
  margin-bottom: 1.5rem;
  background: var(--s2-blanc);
  border-radius: var(--s2-rayon);
  box-shadow: var(--s2-ombre-2);
  color: var(--s2-encre);
  text-align: left;
}

.tarifs-prix {
  flex: 0 0 auto;
  padding: 1.05rem 1.5rem 1.15rem;
}

.tarifs-infos {
  flex: 1 1 340px; /* passe sous la grille s'il reste moins de 340 px à côté d'elle */
  min-width: 0;
  padding: 1.2rem 1.5rem 1.15rem;
}

/* Filet entre les deux zones : vertical quand elles sont côte à côte, horizontal quand la seconde
   est passée dessous. Les deux filets existent ; celui qui ne sert pas tombe hors de la carte. */
.tarifs-prix + .tarifs-infos {
  margin: -1px 0 0 -1px;
  border-left: 1px solid var(--s2-filet);
  border-top: 1px solid var(--s2-filet);
}

/* Grille : une ligne par poste, les prix alignés à droite */
.tarifs-grille {
  caption-side: top;
  border-collapse: separate;
  border-spacing: 0;
}

.tarifs-grille caption {
  padding: 0 0 .45rem;
  font-family: var(--s2-titre);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--s2-encre);
}

.tarifs-grille thead th {
  padding: .35rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--s2-encre-douce);
  text-align: right;
  vertical-align: bottom;
  white-space: nowrap;
  box-sizing: border-box;
  min-width: 8.25rem; /* les deux colonnes de prix ont la même largeur */
}

.tarifs-grille tbody th {
  padding: .45rem 2.25rem .45rem 0;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.tarifs-grille tbody td {
  padding: .45rem 1rem;
  font-family: var(--s2-titre);
  font-weight: 600;
  font-size: 1.12rem;
  text-align: right;
  white-space: nowrap;
}

.tarifs-grille tbody tr + tr > * {
  border-top: 1px solid var(--s2-filet);
}

/* Colonne des licenciés du club : une bande teintée, lue de haut en bas */
.tarifs-grille .tarifs-club {
  background: var(--s2-chenal-fond);
}

.tarifs-grille thead .tarifs-club {
  border-radius: 10px 10px 0 0;
  color: var(--s2-chenal);
}

.tarifs-grille tbody tr:last-child .tarifs-club {
  border-radius: 0 0 10px 10px;
}

.tarifs-grille tbody tr + tr > .tarifs-club {
  border-top-color: rgba(31, 95, 153, .16);
}

/* Pas de réduction sur ce poste : le prix est rappelé, en retrait */
.tarifs-grille td.est-identique {
  font-weight: 500;
  color: var(--s2-encre-douce);
}

/* Conditions : libellé à gauche, valeur à droite */
.tarifs-infos dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .4rem 1.25rem;
  margin: 0;
}

.tarifs-infos dt {
  font-weight: 500;
  color: var(--s2-encre-douce);
}

.tarifs-infos dd {
  margin: 0;
  font-weight: 500;
}

.tarifs-infos dd strong {
  font-weight: 700;
  white-space: nowrap; /* la date ne se coupe pas */
}

.tarifs-infos dd.est-clos {
  color: var(--s2-signal-fonce);
}

/* Explication du club */
.tarifs-note {
  max-width: 64ch;
  margin: .9rem 0 0;
  padding-top: .9rem;
  border-top: 1px solid var(--s2-filet);
  font-size: .95rem;
  line-height: 1.5;
}

.tarifs-infos > .tarifs-note:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Téléphone : la grille prend toute la largeur, les colonnes de prix se resserrent */
@media (max-width: 767.98px) {
  .tarifs-prix {
    flex: 1 1 100%;
    padding: 1rem;
  }

  .tarifs-infos {
    padding: 1rem;
  }

  .tarifs-grille {
    width: 100%;
  }

  /* les colonnes de prix prennent le strict nécessaire : le libellé garde la place et tient sur une ligne */
  .tarifs-grille thead th,
  .tarifs-grille tbody td {
    width: 1%;
  }

  .tarifs-grille thead th {
    min-width: 0;
    padding: .35rem .55rem;
    white-space: normal;
  }

  .tarifs-grille tbody th {
    padding-right: .6rem;
    white-space: normal;
  }

  .tarifs-grille tbody td {
    padding-left: .55rem;
    padding-right: .55rem;
    font-size: 1.05rem;
  }
}

@media print {
  .tarifs {
    box-shadow: none;
    border: 1px solid #c8d2de;
  }
}
