/* Styles spécifiques pour le calendrier FullCalendar */

/* Container du calendrier */
#calendar {
    max-width: 100%;
    margin: 0 auto;
}

/* Personnalisation de FullCalendar */
.fc {
    font-family: 'Inter', sans-serif;
}

/* Header du calendrier */
.fc-header-toolbar {
    margin-bottom: 1.5rem !important;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.fc-toolbar-title {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #2c5530 !important;
}

/* Boutons de navigation */
.fc-button {
    background-color: #2c5530 !important;
    border-color: #2c5530 !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.fc-button:hover {
    background-color: #4a7c59 !important;
    border-color: #4a7c59 !important;
    transform: translateY(-1px) !important;
}

.fc-button:focus {
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.3) !important;
}

.fc-button-active {
    background-color: #1a3d1f !important;
    border-color: #1a3d1f !important;
}

/* Grille du calendrier */
.fc-theme-standard td,
.fc-theme-standard th {
    border-color: #e9ecef !important;
}

.fc-theme-standard .fc-scrollgrid {
    border-color: #e9ecef !important;
}

/* En-têtes des jours */
.fc-col-header-cell {
    background-color: #f8f9fa !important;
    font-weight: 600 !important;
    color: #2c5530 !important;
    padding: 1rem 0.5rem !important;
}

.fc-col-header-cell-cushion {
    color: #2c5530 !important;
    text-decoration: none !important;
}

/* Cellules des jours */
.fc-daygrid-day {
    background-color: white !important;
    transition: background-color 0.3s ease !important;
}

.fc-daygrid-day:hover {
    background-color: #f8f9fa !important;
}

.fc-daygrid-day-number {
    color: #333 !important;
    text-decoration: none !important;
    padding: 0.5rem !important;
    font-weight: 500 !important;
}

/* Jour actuel */
.fc-day-today {
    background-color: rgba(44, 85, 48, 0.1) !important;
}

.fc-day-today .fc-daygrid-day-number {
    background-color: #2c5530 !important;
    color: white !important;
    border-radius: 50% !important;
    width: 2rem !important;
    height: 2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0.25rem !important;
}

/* Événements */
.fc-event {
    background-color: #2c5530 !important;
    border-color: #2c5530 !important;
    color: white !important;
    border-radius: 4px !important;
    padding: 0.25rem 0.5rem !important;
    margin: 0.125rem !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.fc-event:hover {
    background-color: #4a7c59 !important;
    border-color: #4a7c59 !important;
    transform: scale(1.02) !important;
    box-shadow: 0 2px 8px rgba(44, 85, 48, 0.3) !important;
}

.fc-event-title {
    font-weight: 500 !important;
}

/* Événements par ville avec couleurs différentes */
.fc-event.morlaix {
    background-color: #e74c3c !important;
    border-color: #e74c3c !important;
}

.fc-event.morlaix:hover {
    background-color: #c0392b !important;
    border-color: #c0392b !important;
}

.fc-event.pleyber-christ {
    background-color: #3498db !important;
    border-color: #3498db !important;
}

.fc-event.pleyber-christ:hover {
    background-color: #2980b9 !important;
    border-color: #2980b9 !important;
}

.fc-event.logonna {
    background-color: #f39c12 !important;
    border-color: #f39c12 !important;
}

.fc-event.logonna:hover {
    background-color: #e67e22 !important;
    border-color: #e67e22 !important;
}

.fc-event.relecq-kerhuon {
    background-color: #9b59b6 !important;
    border-color: #9b59b6 !important;
}

.fc-event.relecq-kerhuon:hover {
    background-color: #8e44ad !important;
    border-color: #8e44ad !important;
}

.fc-event.la-forest-landerneau {
    background-color: #1abc9c !important;
    border-color: #1abc9c !important;
}

.fc-event.la-forest-landerneau:hover {
    background-color: #16a085 !important;
    border-color: #16a085 !important;
}

/* Tooltip pour les événements */
.fc-event-tooltip {
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    border-radius: 4px !important;
    padding: 0.5rem !important;
    font-size: 0.9rem !important;
    max-width: 200px !important;
    z-index: 1000 !important;
}

/* Vue mobile */
@media (max-width: 768px) {
    .fc-header-toolbar {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .fc-toolbar-chunk {
        display: flex !important;
        justify-content: center !important;
    }
    
    .fc-button {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.9rem !important;
    }
    
    .fc-toolbar-title {
        font-size: 1.2rem !important;
        text-align: center !important;
    }
    
    .fc-daygrid-day-number {
        font-size: 0.9rem !important;
    }
    
    .fc-event {
        font-size: 0.75rem !important;
        padding: 0.2rem 0.4rem !important;
    }
}

@media (max-width: 480px) {
    #calendar-container {
        padding: 1rem !important;
    }
    
    .fc-toolbar-title {
        font-size: 1.1rem !important;
    }
    
    .fc-button {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.8rem !important;
    }
    
    .fc-daygrid-day-number {
        font-size: 0.8rem !important;
        padding: 0.3rem !important;
    }
    
    .fc-event {
        font-size: 0.7rem !important;
        padding: 0.1rem 0.3rem !important;
    }
}

/* Animation d'apparition du calendrier */
#calendar-container {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.6s ease forwards;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Légende des couleurs */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 3px;
}

.legend-color.morlaix { background-color: #e74c3c; }
.legend-color.pleyber-christ { background-color: #3498db; }
.legend-color.logonna { background-color: #f39c12; }
.legend-color.relecq-kerhuon { background-color: #9b59b6; }
.legend-color.la-forest-landerneau { background-color: #1abc9c; }