.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Défilement fluide sur smartphone */
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    /* Pour garder de beaux angles arrondis */
}

/* On s'assure que le tableau ne se contracte pas trop et déclenche bien le scroll */
.table-responsive table {
    min-width: 600px;
    /* Ajuste cette valeur selon la largeur minimale souhaitée pour ton tableau */
    width: 100%;
}

/* S'assurer que le tableau lui-même prend toute la largeur disponible sans forcer son parent */
table {
    width: 100%;
    min-width: 600px;
    /* Force l'apparition de la barre de scroll si l'écran est plus petit que 600px */
    border-collapse: collapse;
}

th {
    background-color: var(--bg-app);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(79, 70, 229, 0.02);
    /* Légère lueur primaire au survol */
}

/* ==========================================================================
   PERSONNALISATION DE LA SCROLLBAR (Pour le tableau responsive)
   ========================================================================== */

/* 1. Méthode moderne et standard (Firefox, Chrome/Edge récents) */
.table-responsive {
    /* Format : scrollbar-color: [Couleur de la poignée] [Couleur de la piste] */
    scrollbar-color: var(--primary) var(--bg-card);
    scrollbar-width: thin;
    /* Rend la barre plus fine et discrète */
}

/* 2. Méthode historique Webkit (Chrome, Safari, Opera, Brave...) */
.table-responsive::-webkit-scrollbar {
    height: 8px;
    /* Hauteur de la barre de défilement horizontale */
}

.table-responsive::-webkit-scrollbar-track {
    background: var(--bg-card);
    /* Couleur de la piste de fond (le rail) */
    border-radius: var(--radius-sm);
}

.table-responsive::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    /* Couleur de la poignée (le curseur mobile) */
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg-card);
    /* Crée un petit espace interne pour aérer le tout */
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-hover);
    /* Devient un poil plus foncé au survol */
}