/* Styles complets pour le calendrier */
#calendar {
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    overflow: hidden;
}
 
/* En-tête du calendrier avec les flèches et le mois */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}
 
.calendar-header h3 {
    margin: 0;
    font-size: 1.25rem;
    text-align: center;
    flex: 1; /* Permet au titre de prendre l'espace central */
}
 
.calendar-header button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
}
 
/* Jours de la semaine */
.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}
 
.weekdays div {
    padding: 8px 4px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    border-right: 1px solid #dee2e6;
}
 
.weekdays div:last-child {
    border-right: none;
}
 
/* Grille des jours */
.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(60px, auto);
}
 
.day {
    border: 1px solid #dee2e6;
    padding: 4px;
    min-height: 100px;
    position: relative;
    background-color: #fff;
}
 
.day.inactive {
    background-color: #f8f9fa;
    color: #adb5bd;
}
 
.day.closed {
    background-color: #dee2e6;
}
 
.day.today {
    background-color: #fff3cd;
}
 
.day-number {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 0.9rem;
}
 
.day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}
 
.conge {
        width: 100%;
    margin: 2px 0;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.8rem;
    color: white; /* Texte en blanc */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5); /* Ombre légère pour améliorer la lisibilité */
        text-align: center;
    /*
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.75rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 20px;*/
}

/* Congé pour la journée entière */
.conge-journee {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
 
.conge-matin {
 /*   border-right: 10px solid transparent;*/
    width: 45%;
    margin-left: 2px;
    margin-right: auto;
    text-align: left;
    border-left: 3px solid rgba(255, 255, 255, 0.5);
}
 
.conge-aprem {
 /*   border-left: 10px solid transparent;*/
    width: 45%;
    margin-left: auto;
    margin-right: 2px;
    text-align: right;
    border-right: 3px solid rgba(255, 255, 255, 0.5);
}
 
/* Style pour l'indicateur de jour fermé */
.ferme-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    background-color: rgba(220, 53, 69, 0.7);
    color: white;
    padding: 2px 5px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 3px;
    z-index: 1;
}
 
.day.closed .day-events {
    opacity: 0.5;
}

.table-condensed td, .table-condensed th {
    padding: 1px 4px;
}
.card {
    --bs-card-spacer-x: 0rem;
}

/* Styles responsifs pour différentes tailles d'écran */
@media (max-width: 992px) {
    .weekdays div {
        padding: 6px 2px;
        font-size: 0.8rem;
    }
    
    .day {
        min-height: 80px;
    }
    
    .day-number {
        font-size: 0.8rem;
    }
    
    .conge {
        font-size: 0.7rem;
        padding: 1px 3px;
    }
}
 
@media (max-width: 768px) {
    .calendar-header h3 {
        font-size: 1rem;
    }
    
    .calendar-header button {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .weekdays div {
        padding: 4px 2px;
        font-size: 0.7rem;
    }
    
    .day {
        min-height: 60px;
        padding: 2px;
    }
    
    .day-number {
        font-size: 0.7rem;
        margin-bottom: 2px;
    }
    
    .conge {
        font-size: 0.65rem;
        padding: 1px 2px;
        max-height: 16px;
    }
}
 
@media (max-width: 576px) {
    .calendar-header h3 {
        font-size: 0.9rem;
    }
    
    .calendar-header button {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .weekdays div {
        padding: 3px 1px;
        font-size: 0.65rem;
    }
    
    .day {
        min-height: 60px;
        padding: 2px;
    }
    
    .day-number {
        font-size: 0.65rem;
        margin-bottom: 1px;
    }
    
    .conge {
        font-size: 0.6rem;
        padding: 1px;
        max-height: 14px;
    }
}

