/**
 * Styles pour le calendrier CPT mensuel
 */

/* Conteneur principal mensuel */
.calendrier-monthly-view {
    margin-bottom: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* En-tête mensuel */
.calendrier-monthly-header {
    text-align: center;
    margin-bottom: 30px;
}

.calendrier-month-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.calendrier-month-title {
    font-size: 2.2em;
    font-weight: 700;
    color: #333;
    margin: 0;
    min-width: 300px;
    text-align: center;
}

.calendrier-month-prev,
.calendrier-month-next {
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    color: #555;
    font-size: 1.2em;
}

.calendrier-month-prev:hover,
.calendrier-month-next:hover {
    background: #d5b665;
    color: white;
    box-shadow: 0 4px 8px rgba(213, 182, 101, 0.3);
    transform: translateY(-1px);
}

/* Contenu mensuel */
.calendrier-monthly-container {
    margin-top: 20px;
}

.calendrier-monthly-content {
    margin-top: 20px;
}

/* Grille d'événements mensuels - sans séparateurs */
.calendrier-monthly-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Cartes d'événements mensuelles */
.calendrier-monthly-event-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: white;
    border: 1px solid #f0f0f0;
}

.calendrier-monthly-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.calendrier-monthly-card-header {
    text-align: center;
    padding: 18px 15px;
    color: white;
    font-weight: 700;
    position: relative;
}

.calendrier-monthly-card-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid currentColor;
    opacity: 0.8;
}

.calendrier-monthly-card-day {
    font-size: 2.4em;
    line-height: 1;
    margin-bottom: 3px;
}

.calendrier-monthly-card-month {
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendrier-monthly-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.calendrier-monthly-card-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    text-decoration: none;
    line-height: 1.3;
}

.calendrier-monthly-card-title:hover {
    text-decoration: underline;
    color: #d5b665;
}

.calendrier-monthly-card-horaire,
.calendrier-monthly-card-parcours,
.calendrier-monthly-card-location {
    display: flex;
    align-items: center;
    color: #666;
    margin-bottom: 10px;
    font-size: 0.85em;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
}

.calendrier-monthly-card-horaire i,
.calendrier-monthly-card-parcours i,
.calendrier-monthly-card-location i {
    margin-right: 8px;
    color: #d5b665;
    width: 16px;
    text-align: center;
}

.calendrier-monthly-card-category {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 30px;
    margin-top: auto;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    align-self: flex-start;
    transition: all 0.2s ease;
    color: white !important; /* Forcer le texte en blanc */
}

.calendrier-monthly-card-category:hover {
    transform: scale(1.05);
}

.calendrier-monthly-card-link {
    display: block;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f5f5f5, #ebebeb);
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.calendrier-monthly-card-link:hover {
    background: #134a56;
    color: white;
}

/* Animation de chargement pour la vue mensuelle */
.calendrier-monthly-content .calendrier-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    color: #666;
    position: relative;
    padding-left: 35px;
    font-size: 1.1em;
}

.calendrier-monthly-content .calendrier-loading:before {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid #e0e0e0;
    border-top-color: #d5b665;
    animation: spinner 0.8s linear infinite;
}

/* Message d'erreur pour la vue mensuelle */
.calendrier-monthly-content .calendrier-error {
    padding: 20px;
    background: linear-gradient(135deg, #fff1f0, #ffeaea);
    color: #d63638;
    border-left: 4px solid #d63638;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Message "aucun événement" pour la vue mensuelle */
.calendrier-monthly-content .calendrier-no-events {
    padding: 40px 20px;
    text-align: center;
    color: #888;
    font-style: italic;
    font-size: 1.1em;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

/* Animation pour l'apparition des cartes mensuelles */
.calendrier-monthly-event-card {
    animation: fadeInUp 0.3s ease-out;
}

/* Responsive Design pour la vue mensuelle */
@media (max-width: 768px) {
    .calendrier-month-title {
        font-size: 1.8em;
        min-width: 250px;
    }
    
    .calendrier-month-prev,
    .calendrier-month-next {
        width: 45px;
        height: 45px;
        font-size: 1.1em;
    }
    
    .calendrier-monthly-events-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .calendrier-monthly-event-card {
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .calendrier-month-navigation {
        gap: 15px;
    }
    
    .calendrier-month-title {
        font-size: 1.5em;
        min-width: 200px;
    }
    
    .calendrier-month-prev,
    .calendrier-month-next {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }
    
    .calendrier-monthly-card-header {
        padding: 15px 10px;
    }
    
    .calendrier-monthly-card-day {
        font-size: 2em;
    }
    
    .calendrier-monthly-card-month {
        font-size: 1em;
    }
    
    .calendrier-monthly-card-content {
        padding: 15px;
    }
    
    .calendrier-monthly-card-title {
        font-size: 1.1em;
    }
}

/* États focus pour l'accessibilité */
.calendrier-month-prev:focus,
.calendrier-month-next:focus {
    outline: 3px solid #d5b665;
    outline-offset: 2px;
}