/* Styles spécifiques pour le module Mes présences - Corrigé */

/* Style pour le calendrier */
#calendar {
    max-width: 1100px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-height: 500px; /* Assurer une hauteur minimale. */
    border: 1px solid #e5e7eb; /* Ajouter une bordure visible */
}

/* S'assurer que le conteneur du calendrier est visible */
#calendar-container {
    margin-top: 2rem;
    margin-bottom: 2rem;
    min-height: 500px;
}

/* Styles pour rendre le calendrier plus visible */
.fc-view-harness {
    min-height: 400px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.fc-event {
    cursor: pointer;
    border-radius: 5px;
    padding: 3px 5px;
    margin: 2px 0;
}

.fc-event.presence-oui {
    background-color: #4ade80;
    border-color: #16a34a;
    color: #000; /* Texte en noir pour meilleure lisibilité */
}

.fc-event.presence-non {
    background-color: #f87171;
    border-color: #dc2626;
    color: #000;
}

.fc-event.presence-non-definie {
    background-color: #d1d5db;
    border-color: #9ca3af;
    color: #000;
}

.encadrant-count {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 50%;
    background-color: #3b82f6;
    color: white;
    font-size: 0.8rem;
    margin-left: 5px;
}

.encadrant-count.warning {
    background-color: #f97316;
}

.encadrant-count.danger {
    background-color: #ef4444;
}

/* Styles pour la légende */
.legend {
    margin-bottom: 20px;
    background-color: #f9fafb;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 10px;
}

.legend-color.presence-oui {
    background-color: #4ade80;
    border: 1px solid #16a34a;
}

.legend-color.presence-non {
    background-color: #f87171;
    border: 1px solid #dc2626;
}

.legend-color.presence-non-definie {
    background-color: #d1d5db;
    border: 1px solid #9ca3af;
}

/* Styles pour la modal */
.modal-body h5 {
    color: #3b82f6;
    margin-bottom: 15px;
}

/* Style pour le défilement dans la modal */
.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
}

/* Style pour les listes avec défilement */
#list-encadrants,
#licencies-list ul.list-group {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 #f1f5f9;
}

#list-encadrants::-webkit-scrollbar,
#licencies-list ul.list-group::-webkit-scrollbar {
    width: 8px;
}

#list-encadrants::-webkit-scrollbar-track,
#licencies-list ul.list-group::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#list-encadrants::-webkit-scrollbar-thumb,
#licencies-list ul.list-group::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

#list-encadrants::-webkit-scrollbar-thumb:hover,
#licencies-list ul.list-group::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

.presence-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.presence-toggle button {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.presence-toggle button.active {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-present.active,
#btn-present.active {
    background-color: #16a34a;
    color: white;
}

.btn-absent.active,
#btn-absent.active {
    background-color: #dc2626;
    color: white;
}

/* Style pour l'affichage du groupe assigné */
.groupe-assignment {
    margin-top: 15px;
    padding: 15px;
    background-color: #f0f9ff;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.groupe-assignment h6 {
    color: #1e40af;
    margin-bottom: 8px;
}

.groupe-label {
    font-weight: 600;
    margin-right: 5px;
}

.role-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 5px;
}

.role-principal {
    background-color: #10b981;
    color: white;
}

.role-assistant {
    background-color: #3b82f6;
    color: white;
}

/* Style pour les alertes */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-info {
    background-color: #e0f2fe;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.alert-warning {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #b45309;
}

/* Ajout spécial pour le debug */
.debug-info {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-family: monospace;
}

/* Styles supplémentaires pour le sélecteur de licencié */
#licencie-selector {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3b82f6;
}

#licencie-selector h6 {
    color: #1e40af;
    margin-bottom: 10px;
}

#select-licencie {
    border: 1px solid #d1d5db;
    padding: 8px 12px;
    border-radius: 6px;
    width: 100%;
}

/* Amélioration des boutons de présence */
.presence-toggle button {
    position: relative;
    transition: all 0.3s ease;
}

.presence-toggle button.active {
    transform: scale(1.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.presence-toggle button.active::before {
    content: '✓';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.presence-toggle button.active.btn-success {
    background-color: #16a34a;
    padding-left: 30px;
}

.presence-toggle button.active.btn-danger {
    background-color: #dc2626;
    padding-left: 30px;
}

/* Style pour le message d'avertissement de séance passée */
    #date-passee-warning {
        background-color: #fee2e2;
        border-left: 4px solid #ef4444;
        color: #b91c1c;
        padding: 15px;
        border-radius: 8px;
        margin: 15px 0;
        font-weight: 600;
        text-align: center;
    }

/* Styles pour les vacances et jours fériés */
.fc-day.fc-day-sun, .fc-day.fc-day-sat {
    background-color: #f8f9fa;
}

.fc-daygrid-day.fc-day-today {
    background-color: #e0f2fe !important;
}

/* Style pour les légendes. */
.calendar-legend {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 3px;
}

.legend-label {
    font-size: 0.9rem;
}

.legend-vacances {
    background-color: #7d1d1d !important;
}

.legend-feries {
    background-color: #FFE6E6;
}

.legend-weekend {
    background-color: #f8f9fa;
}

/* Styles pour les événements de vacances dans le calendrier */
.fc-event[data-type="vacances"] {
    color: #ffffff !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

/* Alternative si l'attribut data-type n'est pas disponible */
.fc-event[style*="#7d1d1d"] {
    color: #ffffff !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

/* Style pour tous les événements de background (vacances et jours fériés) */
.fc-bg-event {
    color: #ffffff !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

/* Forcer le rafraîchissement. - Version mise à jour.*/