/**
 * FICHIER : style_liste_inscrits.css
 * ROLE : Centralisation des styles de la liste des inscrits
 * Chemin : /common_css_styles/style_liste_inscrits.css
 */

:root { 
    --principale: #008c8c; 
    --mineur: #6b46c1; 
    --repas: #ff9100; 
}

body { 
    font-family: 'Open Sans', sans-serif; 
    background: #f4f4f4; 
    margin: 0; 
    color: #333; 
}

/* --- BARRE DE NAVIGATION --- */
.navigation-retour {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 3000;
    height: 50px;
} 

.navigation-retour .container {
    max-width: 1300px;
    margin: auto;
    padding: 0 20px;
    height: 100%;
    display: flex; 
    align-items: center; 
    position: relative;
}

.logo-navigation {
    max-height: 45px; 
    width: auto; 
    display: block;
}

.logo-container {
    position: absolute; 
    left: 50%; 
    transform: translateX(-50%);
}

.btn-retour {
    color: #444;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    z-index: 10;
}

/* --- STRUCTURE BLOC RECHERCHE --- */
.sticky-top { 
    position: sticky; 
    top: 41px; 
    z-index: 2000; 
    background: #f4f4f4; 
}

.container { 
    max-width: 1300px; 
    margin: auto; 
    background: white; 
    padding: 15px; 
    border-radius: 12px; 
    box-sizing: border-box; 
}

.sticky-top .container { 
    border-radius: 12px 12px 0 0; 
    padding-bottom: 5px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
}

header { 
    text-align: center; 
}

header h1 { 
    color: var(--principale); 
    margin: 5px 0; 
    font-size: 18px; 
    text-transform: uppercase; 
    font-weight: 800; 
}

header p .texte-repas-header {
    font-size: 13px;
    color: #666; /* Un gris légèrement plus doux pour harmoniser la réduction */
}

header p i.icon-repas-header {
    color: var(--repas);
    margin-left: 5px;
}

header .badge-repas-header {
    background-color: var(--repas);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    margin-left: 5px;
}

.search-box { 
    background: #f9f9f9; 
    padding: 10px; 
    border: 1px solid #eee; 
    border-radius: 8px; 
    text-align: center; 
}

input, select { 
    padding: 8px; 
    border-radius: 6px; 
    border: 1px solid #ccc; 
    font-size: 13px; 
}

/* --- BOUTONS & ELEMENTS INTERACTIFS --- */
.btn-filtrer { 
    background: var(--principale); 
    color: white; 
    border: none; 
    padding: 8px 20px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: bold; 
}

.btn-repas { 
    background: var(--repas); 
    color: white; 
    border: none; 
    padding: 8px 15px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: bold; 
    margin-left: 5px; 
    position: relative; 
    display: inline-flex; 
    align-items: center; 
    vertical-align: middle;
}

.badge-count { 
    background: #d35400; 
    color: white; 
    border-radius: 10px; 
    padding: 2px 7px; 
    font-size: 11px; 
    margin-left: 8px; 
}

#info-repas { 
    display: none; 
    background: #fff; 
    border: 2px solid var(--repas); 
    padding: 20px; 
    margin: 15px auto; 
    max-width: 800px; 
    border-radius: 12px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
}

/* --- TABLEAU DES INSCRITS --- */
.container-tableau { 
    max-width: 1300px; 
    margin: 0 auto; 
    background: white; 
    border-radius: 0 0 12px 12px; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    table-layout: auto; 
}

thead th { 
    position: sticky; 
    top: 200px; 
    background: var(--principale); 
    color: white; 
    padding: 12px 8px; 
    text-align: left; 
    font-size: 12px; 
    white-space: nowrap; 
    z-index: 1000; 
}

tbody td { 
    padding: 10px 8px; 
    border-bottom: 1px solid #eee; 
    font-size: 13px; 
    white-space: nowrap; 
}

/* --- STYLES CELLULES SPECIALES & ICONES --- */
.col-dossard {
    color: var(--principale); 
    font-weight: 800;
}

.icon-mineur {
    color: var(--mineur);
}

.td-empty {
    text-align: center; 
    padding: 50px;
}

/* --- BADGES ET STATUTS --- */
.badge { 
    display: inline-block; 
    padding: 4px 8px; 
    border-radius: 4px; 
    font-size: 11px; 
    font-weight: 600; 
}
.badge-valide { background-color: #e6f4ea; color: #1e7e34; }
.badge-attente { background-color: #fff9e6; color: #856404; }
.badge-refuse { background-color: #fce8e8; color: #c53030; }

header p.repas-header {
    margin-top: 5px;
    font-size: 14px;
    color: #555;
}

header .badge-repas-header {
    background-color: var(--repas);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 13px;
    display: inline-block;
    margin-left: 3px;
}

header p.repas-header i {
    color: var(--repas);
    margin-right: 5px;
}

/* --- ADAPTATION MOBILE (Écrans < 768px) --- */
@media screen and (max-width: 768px) {
    
    /* 1. Ajustements globaux et espacements */
    .container {
        padding: 10px;
        border-radius: 0; /* On utilise tout l'espace de l'écran */
    }
    
    header h1 {
        font-size: 16px;
    }
    
    /* En ligne sur mobile pour gagner de la place */
    .search-box form {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .search-box form select, 
    .search-box form input, 
    .search-box form button {
        width: 100%;
        box-sizing: border-box;
    }

    /* 2. Gestion de la barre de navigation (on masque le texte pour garder l'icône) */
    .btn-retour {
        font-size: 0;
    }
    .btn-retour i {
        font-size: 18px;
        padding: 10px;
    }

    /* 3. Masquage des colonnes secondaires */
    .mobile-hide, .desktop-only {
        display: none !important;
    }

    /* 4. Structure du tableau optimisée */
    thead th {
        top: 185px; /* Ajustement de la position sticky suite aux changements de taille */
        padding: 8px 4px;
        font-size: 11px;
    }

    tbody td {
        padding: 8px 4px;
        font-size: 12px;
    }

    /* 5. Affichage du prénom sous le nom sur mobile */
    .prenom-mobile {
        display: block;
        font-size: 11px;
        color: #666;
        font-weight: normal;
        margin-top: 2px;
    }

    /* 6. Mini-badges pour éviter que les colonnes débordent */
    .badge {
        padding: 2px 4px;
        font-size: 9px;
        letter-spacing: -0.5px;
    }
}

/* --- AJOUT POUR LE MODE DESKTOP --- */
@media screen and (min-width: 769px) {
    .prenom-mobile {
        display: none; /* Masqué sur PC puisque le prénom a sa propre colonne */
    }
}