body {
    background-color: #f4f7f6; /* Un gris très léger pour faire ressortir tes blocs blancs */
    margin: 0;
    padding-top: 20px; /* Espace sous le header */
    font-family: sans-serif;
}

header {
    background-color: #e3f2fd; /* Bleu clair moderne */
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Ombre légère pour décoller du fond */
    display: flex;
    align-items: center;
    gap: 20px;
}

header a {
    text-decoration: none; /* Enlève le soulignement */
    color: #0d47a1;        /* Bleu foncé pour le texte (contraste) */
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Effet au survol des liens dans le header */
header a:hover {
    background-color: rgba(255, 255, 255, 0.5); /* Reflet blanc au survol */
    color: #1976d2; /* Changement de bleu au survol */
}
header nav a {
    padding: 10px 15px;
    display: inline-block; /* Permet au padding de bien s'appliquer */
}

/* Le chef d'orchestre */
.parent-grid {
    display: flex !important;   /* On force le mode flexible */
    flex-direction: row;        /* Alignement en ligne */
    flex-wrap: wrap;            /* Retour à la ligne si pas de place */
    gap: 20px;                  /* Espace entre les blocs */
    justify-content: center;    /* Centre l'ensemble */
    padding: 20px;
    width: 100%;                /* Prend toute la largeur */
}

/* On cible le lien qui entoure la div */
a.vignette-link {
    text-decoration: none; /* Supprime le soulignement du texte */
    color: inherit;        /* Empêche le texte de devenir bleu */
    display: inline-block; /* Empêche le lien de prendre toute la largeur de la page */
}

/* Le bloc individuel */
.containerpetit {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 300px;               /* Largeur fixe */
    text-align: center;
    transition: all 0.3s ease;  /* Indispensable pour l'animation */
    cursor: pointer;
}

/* Effet au survol sur l'ensemble du bloc */
a.vignette-link:hover .containerpetit {
    transform: translateY(-5px); /* Soulève la vignette */
    box-shadow: 0 8px 15px rgba(0,0,0,0.2); /* Accentue l'ombre */
    background-color: #fcfcfc;
}

/* L'effet au survol */
.containerpetit:hover {
    transform: translateY(-10px) !important; /* Soulève le bloc */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
    background-color: #f8f9fa; /* Change légèrement le fond */
}

h2 {
    text-align: center;
    margin-bottom: 20px;
}

.sous-titre {
    font-style: italic !important;
    font-size: 0.85rem; /* Plus petit que la normale */
    color: #666;        /* Un gris doux pour ne pas agresser l'œil */
    margin-top: -10px;  /* Rapproche le texte du H2 au-dessus */
    margin-bottom: 20px;/* Laisse de l'espace avec la suite */
    display: block;
}

input {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

select {
    width: 100%;
    padding: 15px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.alert {
        padding: 15px;
        margin-bottom: 20px;
        border: 1px solid transparent;
        border-radius: 4px;
        font-family: sans-serif;
    }
    .success {
        color: #155724;
        background-color: #d4edda;
        border-color: #c3e6cb;
    }

.error {
    color: red;
    text-align: center;
    margin-bottom: 10px;
}

.timeline-wrapper {
        width: 100%;
        overflow-x: auto; /* Permet le scroll si le tableau dépasse */
        font-family: sans-serif;
        padding: 20px 0;
    }
    .timeline-table {
        border-collapse: collapse;
        min-width: 100%; /* S'assure que le tableau prend de la place */
    }
    .timeline-table td {
        padding: 10px;
        border: 1px solid #ddd;
        text-align: center;
        min-width: 35px;
    }
    .day-name {
        font-size: 0.7em;
        color: #888;
        text-transform: uppercase;
    }
    /* Style Jour Actuel */
    .timeline-table td.today {
        background-color: #3498db;
        color: white;
        border: 2px solid #2980b9;
    }
    .timeline-table td.today .day-name { color: #eee; }

    /* Style Week-end */
    .timeline-table td.weekend {
        background-color: #f2f2f2;
    }

    .timeline-wrapper { overflow-x: auto; max-width: 100%; border: 1px solid #ddd; }
    .timeline-table { border-collapse: collapse; min-width: 100%; font-family: sans-serif; }
    
    /* Colonne des noms fixe */
    .sticky-col { 
        position: sticky; 
        left: 0; 
        background: #fff; 
        z-index: 2; 
        border-right: 2px solid #3498db;
        min-width: 120px;
        padding: 10px;
    }

    .timeline-table th, .timeline-table td { 
        border: 1px solid #eee; 
        text-align: center; 
        padding: 8px;
        min-width: 40px;
    }

    .weekend { background-color: #f9f9f9; }
    .today { background-color: #f1c40f; border: 1px solid #2196f3; }
    .day-name { font-size: 0.7em; color: #999; }
    .data-cell { font-size: 0.8em; }

    .timeline-table tbody tr:hover {
    background-color: #f1f8ff;
}
.timeline-table tbody tr:hover td.sticky-col {
    background-color: #f1f8ff; /* Pour que la colonne fixe change aussi de couleur au survol */
}

.form-card { background: white; padding: 25px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); width: 100%; max-width: 450px; }

.data-cell[title] {
    cursor: help;
    text-decoration: underline dotted #999;
}

/* Couleurs personnalisées */
/* pour le tableau */
    .bg-red { 
        background-color: #f20c1f !important; /*couleur rouge : personne absent */
        color: #0f0f0f; 
        font-weight: bold;
    }
    .bg-purple { 
        background-color: #8325e8 !important; /*couleur violet : personne en formation */
        color: #0f0f0f; 
    }
    /* en attente si il faut d'autre couleur dans le tableau
    .bg-blue { 
        background-color: #d1ecf1 !important; 
        color: #0c5460; 
    }
    .bg-orange { 
        background-color: #fff3cd !important; 
        color: #856404; 
    }
    */


    .btn-edit, .btn-delete {
        padding: 5px 10px;
        border-radius: 4px;
        text-decoration: none;
        font-size: 0.85em;
        color: white;
        margin-right: 5px;
    }
    .btn-edit {
        background-color: #27ae60;
    }
    .btn-edit:hover {
        background-color: #2ecc71;
    }
    .btn-delete {
        background-color: #e74c3c;
    }
    .btn-delete:hover {
        background-color: #ff5e4d;
    }

    .legende-planning {
    margin-top: 30px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.legende-planning h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: #333;
}

.legende-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legende-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.legende-item {
    display: flex;
    align-items: center;
    font-size: 0.9em;
}

.legende-item i {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 3px;
    border: 0.5px solid #ccc; /* Pour bien voir le blanc et jaune clair */
}

/* On réutilise vos classes d'absences pour la cohérence */
.bg-red { background-color: #f20c1f; }
.bg-purple { background-color: #8325e8; }
.weekend { background-color: #f2f2f2; }

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 5px 0;
}

/* pour les formulaires*/
.container-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 90%;          /* Pour garder une marge sur mobile */
    max-width: 450px;    /* Largeur idéale pour un formulaire standard */
    margin: 20px auto;   /* Centrage horizontal */
    border-top: 4px solid #27ae60; /* Petite touche de rappel couleur */
}

/* Style pour les champs à l'intérieur du container */
.container-form min-input, 
.container-form input, 
.container-form select, 
.container-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box; /* Évite que le champ ne dépasse de la div */
}

/* On peaufine les labels pour qu'ils soient bien au-dessus des champs */
.container-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.container-form button {
    width: 100%;
    background-color: #27ae60;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.container-form button:hover {
    background-color: #219150;
}

.btn-nav {
    display: inline-block;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.btn-nav:hover {
    background-color: #e0e0e0;
}

.navigation-calendrier h1 {
    text-transform: capitalize;
}

/* Cibler le tableau spécifique au planning */
.planning-table {
    width: auto;
    min-width: 100%;     /* Mais occupe au moins toute la largeur du container */
    border-collapse: collapse;
    font-size: 0.8rem; /* Réduit la taille globale du texte */
    table-layout: fixed; /* Force les colonnes à garder une taille constante */
}

/* Réduire l'espace dans les cellules d'en-tête (jours) et de contenu */
.planning-table th, 
.planning-table td {
    padding: 4px 2px; /* Padding très réduit */
    text-align: center;
    border: 1px solid #ddd;
    height: 30px;    /* Hauteur fixe pour éviter les lignes trop hautes */
    overflow: hidden; /* Empêche le texte de déformer la cellule */
}

/* La colonne des noms d'utilisateurs peut rester un peu plus large */
.planning-table td:first-child {
    width: 120px;
    text-align: left;
    padding-left: 8px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Coupe le nom avec "..." s'il est trop long */
}

/* Réduire la largeur des colonnes de jours (1 à 31) */
.planning-table th:not(:first-child),
.planning-table td:not(:first-child) {
    width: 25px; 
}

/* On cible spécifiquement la colonne Membres */
.planning-table th.sticky-col, 
.planning-table td.sticky-col {
    width: 120px;       /* Ajuste cette valeur selon la longueur de tes pseudos */
    min-width: 120px;
    max-width: 120px;
    white-space: nowrap; /* Empêche le nom de passer sur deux lignes */
    overflow: hidden;    /* Coupe ce qui dépasse */
    text-overflow: ellipsis; /* Ajoute "..." si le nom est trop long */
    text-align: left;
    padding-left: 8px;
}

/* POP UP qui s'affiche sur le planning */
/* La cellule doit être en position relative pour servir de repère à la popup */
.has-popup {
    position: relative;
    cursor: help;
}

/* Style de la bulle (cachée par défaut) */
.popup-content {
    visibility: hidden;
    width: 160px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 10;
    bottom: 125%; /* Affiche la bulle au-dessus de la cellule */
    left: 50%;
    margin-left: -80px; /* Centre la bulle (moitié de la largeur) */
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    line-height: 1.4;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
    pointer-events: none; /* Évite que la bulle gêne le passage de la souris */
}

/* Le petit triangle sous la bulle */
.popup-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Affichage au survol */
.has-popup:hover .popup-content {
    visibility: visible;
    opacity: 1;
}


/* pour la nav bar en dessous du header*/
.action-bar {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.action-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-back {
    text-decoration: none;
    color: #7f8c8d;
    font-weight: 500;
    transition: color 0.2s;
}

.btn-back:hover {
    color: #2c3e50;
}

.btn-action {
    background-color: #3498db;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9em;
    transition: background 0.2s;
}

.btn-action:hover {
    background-color: #2980b9;
}

/* Le bouton de suppression en rouge */
.btn-action.btn-danger {
    background-color: #d9534f; /* Un rouge doux mais clair */
    border-color: #d43f3a;
}

/* Effet au survol pour le rouge */
.btn-action.btn-danger:hover {
    background-color: #c9302c;
    border-color: #ac2925;
}

.btn-delete-group {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.btn-delete-group:hover {
    background-color: #cc0000;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000;
}
.modal-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%; max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
}
.modal-footer {
    margin-top: 20px;
    display: flex; justify-content: space-around;
}
.btn-cancel { background: #ccc; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; }
.btn-confirm { background: #d9534f; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; }
.btn-confirm:hover { background: #c9302c; }

.equipe-container { margin-bottom: 60px; }
        h2 { color: #2c3e50; text-transform: uppercase; border-bottom: 3px solid #3498db; display: inline-block; margin-bottom: 20px; }
        
        /* Style de l'onglet coloré */
        .onglet-date { 
            background-color: #3498db; 
            color: white; 
            padding: 12px 20px; 
            border-radius: 8px 8px 0 0; /* Arrondi seulement en haut */
            display: flex; 
            justify-content: space-between; 
            align-items: center;
            margin-top: 20px;
            font-weight: bold;
            font-size: 1.1em;
            box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
        }

        .badge-alerte { 
            background: #e74c3c; 
            color: white; 
            padding: 4px 12px; 
            border-radius: 20px; 
            font-size: 0.85em;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }