.table-container {
    overflow-x: auto;
    max-width: 100%;
}

.custom-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.custom-table th {
    background-color: #4a90e2; /* Bleu clair moderne */
    color: #ffffff;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #e6f0fa;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.custom-table th:hover {
    background-color: #357abd; /* Survol avec un bleu plus foncé */
}

.custom-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e6f0fa;
    transition: background-color 0.3s ease;
}

.custom-table tr:nth-child(even) {
    background-color: #f5faff; /* Fond clair pour les lignes paires */
}

.custom-table tr:hover {
    background-color: #e6f0fa; /* Survol avec un fond léger */
}

.custom-table td.text-right { text-align: right; }
.custom-table td.text-center { text-align: center; }

.custom-table th.sorted-asc::after { content: ' ↑'; margin-left: 4px; font-weight: normal; }
.custom-table th.sorted-desc::after { content: ' ↓'; margin-left: 4px; font-weight: normal; }

@media (max-width: 640px) {
    .custom-table th, .custom-table td { font-size: 0.875rem; padding: 8px; }
    .custom-table th { padding: 10px; }
}

/* ================================
   Anti-chevauchement header sticky
   ================================ */

/* valeur de secours jusqu'à ce que JS mesure la vraie hauteur */
:root { --navH: 72px; }

/* décale le contenu quand on scrolle/va vers une ancre */
html { scroll-padding-top: calc(var(--navH) + 12px); }

/* même marge pour chaque section ancrée */
section { scroll-margin-top: calc(var(--navH) + 12px); }

/* style commun pour la barre sticky (utile si on la réutilise ailleurs) */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #ffffff;            /* opaque = plus de texte visible derrière */
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
