/* Calendrier visuel complet avec images */

/* Container principal */
.cdfef-full-calendar-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Navigation du calendrier */
.cdfef-calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.cdfef-calendar-nav-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 20px !important;
    background: #4267B2 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    font-family: inherit !important;
}

.cdfef-calendar-nav-button:hover {
    background: #365899 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(66, 103, 178, 0.3) !important;
}

.cdfef-calendar-nav-button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.cdfef-calendar-nav-icon {
    width: 20px;
    height: 20px;
}

.cdfef-calendar-current-month {
    font-size: 1.75rem;
    font-weight: 600;
    color: #ffffff; /* Toujours blanc */
}

/* Grille du calendrier */
.cdfef-calendar-month {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 40px;
}

.cdfef-calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.cdfef-calendar-weekday {
    padding: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Grille des jours */
.cdfef-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(120px, auto);
}

/* Cellule de jour */
.cdfef-calendar-day {
    position: relative;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px;
    min-height: 120px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.cdfef-calendar-day:nth-child(7n) {
    border-right: none;
}

.cdfef-calendar-day:hover {
    background: #f9fafb;
}

/* Jour en dehors du mois */
.cdfef-calendar-day.other-month {
    background: #fafafa;
    opacity: 0.6;
}

.cdfef-calendar-day.other-month .cdfef-day-number {
    color: #9ca3af;
}

/* Numéro du jour */
.cdfef-day-number {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
    position: relative;
    z-index: 2;
}

/* Aujourd'hui */
.cdfef-calendar-day.today {
    background: #eff6ff;
}

.cdfef-calendar-day.today .cdfef-day-number {
    color: #4267B2;
    font-weight: 700;
}

.cdfef-calendar-day.today::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 28px;
    height: 28px;
    background: #4267B2;
    border-radius: 50%;
    opacity: 0.1;
}

/* Jour avec événement */
.cdfef-calendar-day.has-event {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Image de fond de l'événement */
.cdfef-day-event-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.cdfef-calendar-day.has-event:hover .cdfef-day-event-bg {
    opacity: 0.6;
}

/* Overlay pour lisibilité */
.cdfef-day-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.75) 30%,
        rgba(255, 255, 255, 0.5) 100%);
    z-index: 1;
}

/* Overlay en mode dark */
.dark .cdfef-day-overlay {
    background: linear-gradient(to bottom, 
        rgba(31, 41, 55, 0.9) 0%,
        rgba(31, 41, 55, 0.75) 30%,
        rgba(31, 41, 55, 0.5) 100%);
}

/* Liste des événements du jour */
.cdfef-day-events {
    position: relative;
    z-index: 2;
}

.cdfef-day-event {
    background: rgba(66, 103, 178, 0.1);
    border-left: 3px solid #4267B2;
    padding: 4px 8px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    line-height: 1.3;
    border-radius: 0 4px 4px 0;
    transition: all 0.2s ease;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cdfef-day-event:hover {
    background: rgba(66, 103, 178, 0.2);
    padding-left: 12px;
}

.cdfef-event-time {
    font-weight: 600;
    color: #4267B2;
    margin-right: 4px;
}

.cdfef-event-title {
    color: #1a1a1a;
}

/* Indicateur multiple événements */
.cdfef-more-events {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    margin-top: 4px;
    font-weight: 500;
}

/* Modal détail événement */
.cdfef-event-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    padding: 40px;
    overflow-y: auto;
}

.cdfef-event-modal-content {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cdfef-modal-header {
    position: relative;
    height: 250px;
    background-size: cover;
    background-position: center;
}

.cdfef-modal-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 32px;
}

/* Overlay centré pour la liste d'événements */
.cdfef-modal-header-overlay-centered {
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.3) 0%, 
        rgba(0,0,0,0.7) 50%, 
        rgba(0,0,0,0.3) 100%);
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cdfef-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cdfef-modal-close:hover {
    background: white;
    transform: scale(1.1);
}

.cdfef-modal-title {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Titre centré pour la liste d'événements */
.cdfef-modal-header-list .cdfef-modal-title {
    font-size: 2rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.cdfef-modal-body {
    padding: 32px;
}

.cdfef-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.cdfef-modal-meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: #374151;
}

.cdfef-modal-meta-icon {
    width: 24px;
    height: 24px;
    color: #6b7280;
}

.cdfef-modal-description {
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 24px;
}

.cdfef-modal-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* Boutons du modal */
.cdfef-modal-actions .cdfef-single-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex: 1 !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.cdfef-modal-actions .cdfef-single-button-primary {
    background: #4267B2 !important;
    color: white !important;
}

.cdfef-modal-actions .cdfef-single-button-primary:hover {
    background: #365899 !important;
    transform: translateY(-2px) !important;
    color: white !important;
}

.cdfef-modal-actions .cdfef-single-button-secondary {
    background: #6b7280 !important;
    color: white !important;
}

.cdfef-modal-actions .cdfef-single-button-secondary:hover {
    background: #4b5563 !important;
    transform: translateY(-2px) !important;
    color: white !important;
}

.cdfef-modal-actions .cdfef-single-button-icon {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
}

/* Mode compact pour mobile */
@media (max-width: 768px) {
    .cdfef-calendar-navigation {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }
    
    .cdfef-calendar-current-month {
        width: 100%;
        text-align: center;
        font-size: 1.5rem;
        order: -1;
    }
    
    .cdfef-calendar-weekday {
        padding: 12px 4px;
        font-size: 0.75rem;
    }
    
    .cdfef-calendar-grid {
        grid-auto-rows: minmax(80px, auto);
    }
    
    .cdfef-calendar-day {
        padding: 4px;
        min-height: 80px;
    }
    
    .cdfef-day-number {
        font-size: 0.875rem;
    }
    
    .cdfef-day-event {
        font-size: 0.625rem;
        padding: 2px 4px;
    }
    
    .cdfef-event-time {
        display: none;
    }
    
    .cdfef-event-modal {
        padding: 20px;
    }
}

/* Loading state */
.cdfef-calendar-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px;
}

.cdfef-calendar-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #4267B2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Styles pour la liste des événements dans le modal */
.cdfef-day-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cdfef-day-event-item {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.cdfef-day-event-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cdfef-day-event-item .cdfef-event-time {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4267B2;
    min-width: 50px;
}

.cdfef-day-event-item .cdfef-event-title {
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 500;
    flex: 1;
}

/* Header sans image de fond */
.cdfef-modal-header-no-image {
    background: linear-gradient(135deg, #4267B2 0%, #365899 100%);
}

/* Thème sombre (optionnel) */
.cdfef-full-calendar-container.dark {
    color: #e5e7eb;
}

.cdfef-full-calendar-container.dark .cdfef-calendar-month {
    background: #1f2937;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cdfef-full-calendar-container.dark .cdfef-calendar-header {
    background: #111827;
    border-bottom-color: #374151;
}

.cdfef-full-calendar-container.dark .cdfef-calendar-day {
    border-color: #374151;
    background: #1f2937;
}

.cdfef-full-calendar-container.dark .cdfef-calendar-day.other-month {
    background: #111827;
    opacity: 0.5;
}

.cdfef-full-calendar-container.dark .cdfef-calendar-day:hover {
    background: #374151;
}

.cdfef-full-calendar-container.dark .cdfef-day-number {
    color: #d1d5db;
}

.cdfef-full-calendar-container.dark .cdfef-calendar-current-month {
    color: #ffffff;
}