/* ========================================
   CALENDRIER - STRUCTURE GÉNÉRALE
======================================== */

#acf-calendar {
    max-width: 1200px;
    margin: 40px auto;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Arial', sans-serif;
    overflow: hidden;
}

.fc {
    height: 400px !important;
    max-height: 400px !important;
    overflow: hidden !important;
}

.fc .fc-view-harness {
    height: 340px !important;
    max-height: 340px !important;
    overflow: auto !important;
}

.fc .fc-scrollgrid,
.fc .fc-scrollgrid-section,
.fc .fc-scrollgrid-section > td {
    overflow: visible !important;
}

.fc .fc-scroller-harness,
.fc .fc-scroller {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 100% !important;
}

.fc-daygrid-body {
    overflow-y: auto !important;
}

.fc-list {
    height: 340px !important;
    max-height: 340px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* ========================================
   TOOLBAR (EN-TÊTE)
======================================== */

.fc .fc-toolbar {
    background: linear-gradient(135deg, #93140D 0%, #c41810 100%);
    padding: 5px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.fc .fc-toolbar-title {
    color: #fff !important;
    font-size: 11px !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   BOUTONS DE NAVIGATION
======================================== */

.fc .fc-button {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 0px !important;
    color: #fff !important;
    padding: 5px 12px !important;
    border-radius: 16px !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 9px !important;
    transition: all 0.3s ease;
    box-shadow: none !important;
    min-height: auto !important;
    line-height: 1.3;
}

.fc .fc-button:hover {
    background: #F08026 !important;
    color: #fff !important;
    border: 0px !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 128, 38, 0.4) !important;
}

.fc .fc-button:focus {
    box-shadow: none !important;
    border: 0px !important;
}

.fc .fc-button-active {
    background: #F08026 !important;
    color: #fff !important;
    border: 0px !important;
}

.fc .fc-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fc .fc-prev-button,
.fc .fc-next-button {
    padding: 4px 9px !important;
    font-size: 11px !important;
    border: 0px !important;
}

.fc .fc-today-button {
    padding: 5px 12px !important;
    font-size: 9px !important;
}

/* ========================================
   EN-TÊTES DES JOURS
======================================== */

.fc .fc-col-header {
    background: #f8f8f8;
    border-bottom: 3px solid #93140D;
}

.fc .fc-col-header-cell {
    padding: 10px 5px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    color: #93140D;
    letter-spacing: 1px;
}

/* ========================================
   CASES DU CALENDRIER
======================================== */

.fc .fc-daygrid-day {
    transition: background 0.2s ease;
    min-height: 60px;
    cursor: pointer;
    position: relative;
}

.fc .fc-daygrid-day:hover {
    background: rgba(240, 128, 38, 0.149);
}

.fc .fc-daygrid-day.fc-day-has-event:hover {
    background: rgba(240, 128, 38, 0.149);
    box-shadow: inset 0 0 0 2px rgba(240, 128, 38, 0.3);
}

.fc .fc-daygrid-day-number {
    color: #333;
    font-weight: 600;
    padding: 5px;
    font-size: 14px;
    pointer-events: none;
}

.fc a:not([href]):not([tabindex]),
.fc a:not([href]):not([tabindex]):focus,
.fc a:not([href]):not([tabindex]):hover {
    color: inherit;
    text-decoration: none;
    font-size: 14px;
}

/* ========================================
   JOUR ACTUEL
======================================== */

.fc .fc-day-today {
    background: rgba(240, 128, 38, 0.149) !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

/* ========================================
   PASTILLES DES ÉVÉNEMENTS
======================================== */

.fc .fc-daygrid-event {
    margin: 2px 4px !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    pointer-events: none;
}

.pastille-event {
    width: 12px;
    height: 12px;
    background: #93140D;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
    pointer-events: all;
}

.pastille-event:hover {
    background: #F08026;
    transform: scale(1.4);
}

.fc .fc-daygrid-day-events {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

/* ========================================
   TOOLTIP
======================================== */

.event-tooltip {
    background: #93140D;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    white-space: nowrap;
    max-width: 300px;
    z-index: 9999;
}

/* ========================================
   LIEN "VOIR PLUS"
======================================== */

.fc .fc-daygrid-more-link {
    background: #F08026 !important;
    color: #fff !important;
    border-radius: 50% !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 11px !important;
    font-weight: bold !important;
    margin: 2px 4px !important;
    text-decoration: none !important;
    padding: 0 !important;
    transition: all 0.3s ease;
    pointer-events: all !important;
    position: relative;
    z-index: 10;
}

.fc .fc-daygrid-more-link:hover {
    background: #93140D !important;
    transform: scale(1.2);
}

/* ========================================
   POPOVER
======================================== */

.fc-popover {
    border: 2px solid #93140D !important;
    box-shadow: 0 4px 12px rgba(147, 20, 13, 0.3) !important;
    border-radius: 8px !important;
    z-index: 9999 !important;
}

.fc-popover-header {
    background: #93140D !important;
    color: #fff !important;
    padding: 10px 15px !important;
    font-weight: bold;
    border-radius: 6px 6px 0 0 !important;
}

.fc-popover-body {
    padding: 10px !important;
}

.fc-popover .fc-event {
    background: #93140D !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    margin: 5px 0 !important;
    color: #fff !important;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all !important;
}

.fc-popover .fc-event:hover {
    background: #F08026 !important;
    transform: translateX(5px);
}

.fc-popover .fc-event-title {
    color: #fff !important;
    font-weight: 500;
}

/* ========================================
   VUE LISTE
======================================== */

.fc-list {
    border: none !important;
}

.fc-list-event {
    border-left: 4px solid #93140D !important;
    transition: all 0.3s ease;
}

.fc-list-event:hover {
    background: rgba(240, 128, 38, 0.149) !important;
    transform: translateX(5px);
}

.fc-list-event-dot {
    background: #93140D !important;
    border: 2px solid #F08026 !important;
    width: 12px !important;
    height: 12px !important;
}

.fc-list-event-title a {
    color: #93140D !important;
    font-weight: 600;
    text-decoration: none;
}

.fc-list-event-title a:hover {
    color: #F08026 !important;
    text-decoration: underline;
}

.fc-list-day-cushion {
    background: linear-gradient(135deg, #93140D 0%, #c41810 100%);
    color: #000 !important;
    padding: 12px 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fc .fc-list-day-text,
.fc .fc-list-day-side-text {
    color: #000 !important;
}

.fc .fc-list-empty {
    background: rgba(240, 128, 38, 0.149);
    color: #93140D;
    padding: 40px;
    text-align: center;
    font-size: 16px;
    font-style: italic;
}

/* ========================================
   BORDURES
======================================== */

.fc .fc-scrollgrid {
    border-color: #e0e0e0 !important;
}

.fc .fc-daygrid-day,
.fc .fc-col-header-cell {
    border-color: #e0e0e0 !important;
}

/* ========================================
   RESPONSIVE - MOBILE
======================================== */

@media (max-width: 768px) {
    #acf-calendar {
        padding: 10px;
        margin: 20px 10px;
    }
    
    .fc {
        height: 500px !important;
        max-height: 500px !important;
    }
    
    .fc .fc-view-harness {
        height: 440px !important;
        max-height: 440px !important;
    }
    
    .fc-list {
        height: 440px !important;
        max-height: 440px !important;
    }
    
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 10px;
        padding: 5px;
    }
    
    .fc .fc-toolbar-title {
        font-size: 14px !important;
    }
    
    .fc .fc-button {
        padding: 6px 14px !important;
        font-size: 11px !important;
    }
    
    .fc .fc-prev-button,
    .fc .fc-next-button {
        padding: 5px 12px !important;
        font-size: 13px !important;
    }
    
    .pastille-event {
        width: 10px;
        height: 10px;
    }
    
    .fc .fc-daygrid-day {
        min-height: 50px;
    }
    
    .event-tooltip {
        font-size: 11px;
        padding: 6px 10px;
    }
}