* {
  margin: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  list-style: none;
  text-align: center;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f9fafb;
  color: #333;
  /* margin: 40px; */
}

/* --- CONTAINER --- */
.table-container {
  max-width: 1400px;
  margin: auto;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  height: 68vh;
  /* height: 40rem; */
  /* height: 500px; */
  overflow: auto;
  /* overflow: hidden; */
  margin-bottom: 20px;
}

/* --- TABLEAU --- */
table {
  width: 100%;
  border-collapse: collapse;

  font-weight: 600;
  font-size: 0.7rem;
}

/* --- EN-TÊTES --- */
th {
  background-color: #e5e5e5;
  color: #333;

  text-align: center;
  padding: 14px 18px;
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;

  position: sticky; /* Figer l’en-tête */
  top: 0; /* Position par rapport au haut du conteneur */
  z-index: 2; /* Pour éviter que les lignes passent dessus */
}

/* --- CELLULES --- */
td {
  padding: 3px 3px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

/* --- ZÉBRAGE --- */

tr:nth-child(even) {
  background-color: #fafafa;
}

/* .lignePointee {
  background-color: rgb(170, 170, 170);
} */

/* --- SURVOL --- */
tr:hover {
  background-color: #f0f0f0;
  transition: background-color 0.2s ease;
}

/* --- TITRE --- */
h1 {
  text-align: center;
  font-size: 24px;
  margin: 0 auto;
}

/* --- Echelle de pagination --- */
#echelle {
  display: block;
  align-items: center;
  text-align: center;
  padding: 0 0 0 20px;
}

.btnPage {
  border: 2px solid rgb(200, 200, 200);
  color: rgb(100, 100, 100);
  border-radius: 30px;
  margin: 5px 5px;
  padding: 5px 10px 10px;
  text-decoration: none;
  width: 50px;
  height: 50px;
}
a.is-disabled {
  border-radius: 30px;
  margin: 5px 5px;
  padding: 5px 10px 10px;
  border: 2px solid rgb(220, 220, 220);
  pointer-events: none; /* ignore les clics et survols */
  cursor: not-allowed; /* curseur de désactivation */
  color: rgb(200, 200, 200); /* style visuel */
  text-decoration: none;
}

.btnPage:hover {
  background: rgb(200, 200, 200);
}

.btnPage:focus {
  outline: 2px solid rgb(130, 130, 130);
  outline-offset: 2px;
}

/* --- Boutons d'action --- */

.bandeauAction {
  text-align: center;
  display: block;
  /* margin: 30px 30px 30px 30px; */

  max-width: 1400px;
  margin: 20px auto 0px auto;
  background-color: rgb(230, 230, 230);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  height: 12vh;
  overflow: hidden;
  /* overflow: auto; */
  /* margin-bottom: 20px; */
  padding: 5px;
}

.bandeauActionInfosOpe {
  height: 50%;
  text-align: left;
}

#titreBandeauAction {
  margin: 0 auto 5px auto;
}

.bandeauActionBoutons {
  height: 30%;
  text-align: right;
  margin: 10px 5px 0 0;
  padding: 0px;
}

.btnAction {
  border: 2px solid rgb(20, 20, 20);
  color: rgb(70, 70, 70);
  background-color: rgb(200, 200, 200);
  border-radius: 30px;
  padding: 5px 10px 10px;
  text-decoration: none;
  height: 30px;
  margin: 5px 0px 0px 5px;
}

.btnAction:hover {
  background-color: rgb(150, 150, 150);
  color: white;
}

.btnAction:focus {
  outline: 2px solid rgb(130, 130, 130);
  outline-offset: 2px;
}

.btnAjout {
  height: 50px;
  width: 20vh;
  border: 2px solid rgb(20, 20, 20);
  color: rgb(70, 70, 70);
  background-color: rgb(200, 200, 200);
  border-radius: 30px;
  padding: 5px 5px 8px;
  text-decoration: none;
  margin: 30px 5px;
  font-weight: 600;
  /* font-size: 1.2rem; */
}

.btnAjout:hover {
  background-color: rgb(150, 150, 150);
  color: white;
}

.btnAjout:focus {
  outline: 2px solid rgb(130, 130, 130);
  outline-offset: 2px;
}

.formControl {
  font-weight: 600;
}

#idLibelle {
  width: 500px;
}

#lblDateOp {
  margin-left: 10px;
}

#idDateOp {
  width: 110px;
}

#lblMontant {
  margin-left: 10px;
}

#idMontant {
  width: 90px;
}

/* Titres */

.titreColLibelleOp {
  text-align: left;
  font-size: 1.4rem;
  padding-left: 5px;
}

.titreColDateOp {
  text-align: center;
  font-size: 1.4rem;
}

.titreColMontant {
  text-align: right;
  font-size: 1.4rem;
}

.titreColCumulA {
  text-align: right;
  font-size: 1.4rem;
}

.titreColDatePt {
  text-align: center;
  font-size: 1.4rem;
}

.titreColCumulPt {
  text-align: right;
  font-size: 1.4rem;
}

/* Cellules */

.colLibelleOp {
  text-align: left;
  font-size: 1.2rem;
  padding-left: 5px;
}

.colDateOp {
  text-align: center;
  font-size: 1.2rem;
}

.colMontant {
  text-align: right;
  font-size: 1.2rem;
}

.colCumulA {
  text-align: right;
  font-size: 1.2rem;
}

.colDatePt {
  text-align: center;
  font-size: 1.2rem;
}

.colCumulPt {
  text-align: right;
  font-size: 1.2rem;
}

.ligneSel {
  color: red;
}
.couleurNegatif {
  background-color: rgb(255, 0, 0);
  color: white;
}
.couleurMttPositif {
  background-color: rgb(20, 165, 20);
  color: white;
}

/* Formulaire opération */

.formControl {
  text-align: left;
}

#idPointe {
  color: rgb(100, 100, 100);
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }
  thead {
    display: none;
  }
  tr {
    background-color: white;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
  td {
    border: none;
    display: flex;
    justify-content: space-between;
    padding: 12px 18px;
  }
  td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #555;
  }
}
