/* Styles spécifiques à la page Frais */

/* Style pour le bandeau bleu Frais */
.frais-banner {
  background: linear-gradient(135deg, #dc3545 0%, #a02020 100%); /* Red to darker red gradient for professionalism */
  color: #fff;
  text-align: center;
  padding: 5rem 0; /* Increased padding for more vertical space */
  min-height: 250px; /* Ensure a minimum height */
  display: flex; /* Use flexbox to center content vertically */
  align-items: center;
  justify-content: center;
  background-size: cover; /* Ensure the background covers the area */
  background-position: center;
}

.frais-banner h1 {
  font-size: clamp(2rem, 6vw, 3rem); /* Larger and more responsive font size */
  margin-bottom: 0;
  font-weight: 800; /* Bolder font */
  text-shadow: 0 2px 5px rgba(0,0,0,0.3); /* Subtle text shadow for professionalism */
}

/* Responsive adjustments for the hero banner */
@media (max-width: 768px) {
    .frais-banner {
        padding: 5rem 0;
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .frais-banner {
        padding: 6rem 0;
        min-height: 300px;
    }
}

.page {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Suppression de l'ancien header devenu inutile */
.page-header {
  display: none;
}

.tables {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.table-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.table-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.table-wrapper {
  overflow-x: auto;
  position: relative;
  /* Ajout d'une ombre interne pour indiquer la suite du contenu sur mobile */
  background: 
    linear-gradient(to right, white 30%, rgba(255,255,255,0)),
    linear-gradient(to right, rgba(255,255,255,0), white 70%) 0 100%,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.2), rgba(0,0,0,0)),
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
  padding-bottom: 12px; /* Espace pour que la barre ne colle pas au contenu */
  scrollbar-width: thin;
  scrollbar-color: #dc3545 #f1f1f1;
}

/* Style de la barre de défilement pour Chrome, Safari et Edge */
.table-wrapper::-webkit-scrollbar {
  height: 8px; /* Hauteur de la barre horizontale */
}

.table-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #dc3545;
  border-radius: 10px;
  border: 2px solid #f1f1f1; /* Crée un petit effet de bordure */
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #a02020;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Réduit pour mieux s'adapter aux écrans moyens */
}

thead th {
  background: #dc3545;
  color: #fff;
  font-weight: 700;
  text-align: left;
  padding: 0.9rem 0.75rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

/* Arrondir les coins du tableau */
thead tr:first-child th:first-child { border-top-left-radius: 8px; }
thead tr:first-child th:last-child { border-top-right-radius: 8px; }

tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

tbody tr:nth-child(even) {
  background: rgba(220, 53, 69, 0.04);
}

tbody td:last-child {
  text-align: right;
}

/* Optimisation spécifique pour Mobile (iPhone 13, etc.) */
@media (max-width: 600px) {
  .table-card {
    padding: 1rem 0.5rem;
  }

  /* Sur téléphone: on empile les colonnes au lieu de garder un tableau en 3 colonnes */
  table {
    min-width: 0;
  }

  table thead {
    display: none;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  table tr {
    margin-bottom: 0.75rem;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
  }

  table tbody td {
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 0.65rem 0.65rem;
  }

  table tbody td:last-child {
    border-bottom: none;
  }

  table tbody td::before {
    content: attr(data-label);
    display: block;
    font-weight: 800;
    color: #a02020;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    text-transform: uppercase;
  }

  /* Suppression du sticky (plus pertinent en mode empilé) */
  table thead th:first-child,
  table tbody td:first-child {
    position: static;
    left: auto;
    z-index: auto;
    border-right: none;
  }

  tbody td {
    font-size: 0.85rem;
    padding: 0.6rem 0.5rem;
  }
}


.note {
  margin-top: 0.75rem;
  color: #666;
  font-size: 0.95rem;
}

@media (min-width: 900px) {
  .tables {
    grid-template-columns: 1fr; /* 1er tableau en haut, 2e en bas */
  }
}
