/*
 * My Events Calendar - Calendar View Stylesheet
 * Version: 3.7 (IMG Tag Icons)
 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

.mec-container {
    font-family: 'Poppins', sans-serif;
    color: #3a3a3a;
    padding: 40px;
    border-radius: 12px;
}

.mec-top-section {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.mec-left-panel {
    flex: 0 0 350px;
}

.mec-right-panel {
    flex: 1;
    min-width: 0;
}

.mec-bottom-section {
    width: 100%;
}

.mec-calendar-wrapper {
    transition: opacity 0.3s ease-in-out;
}

.mec-calendar {
    /* background: #F8F9FB; */
    /* border: 1px solid #e0e7f1; */
    border-radius: 8px;
    padding: 20px;
    /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); */
}

.mec-calendar-header {
    padding-bottom: 8px;
    color: #303A54;
    border-bottom: 1px solid #E0E3E9;
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mec-nav-arrow {
    cursor: pointer;
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: all 0.2s ease;
    color: #2874A6;
}

.mec-nav-arrow:hover {
    background-color: #2874A6;
    color: #fff;
    border-color: #2874A6;
}

.mec-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    text-align: center;
    align-items: center;
}

.mec-day-name {
    font-weight: 500;
    color: #9ca3af;
    font-size: 0.8em;
    padding-bottom: 10px;
    text-transform: uppercase;
}

.mec-day {
    width: 35px;
    height: 35px;
    line-height: 1;
    /* Reset line height */
    display: flex;
    /* Utilisation de flex pour centrer */
    align-items: center;
    justify-content: center;
    margin: auto;
    border-radius: 50%;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 14px;
    border: 2px solid transparent;
    /* Pour éviter les sauts de layout */
}

.mec-day:not(.empty) {
    cursor: pointer;
}

.mec-day:not(.empty):hover {
    background-color: #eef5f9;
}

.mec-day.has-event {
    background-color: #C5BA90 !important;
    color: #fff !important;
}

.mec-day.has-event:hover {
    background-color: #C5BA90;
}

.mec-day.selected {
    background-color: #0d2d52 !important;
    color: #fff !important;
}

.mec-day:hover:not(.empty) {
    background-color: #f0f0f0;
}

.mec-legend {
    margin-top: 20px;
    padding-left: 5px;
    font-size: 0.9em;
    display: flex;
    gap: 20px;
}

.mec-legend-item {
    display: inline-flex;
    align-items: center;
    color: #6b7280;
}

.mec-legend .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.mec-legend .dot.online {
    background-color: #C5BA90;
}

.mec-legend .dot.in-person {
    background-color: #e5e7eb;
}

.mec-event-card {
    background-color: #ffffff;
    border: 1px solid #e0e7f1;
    /* border-radius: 12px; */
    /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); */
    overflow: hidden;
}

.mec-event-card.featured {
    background-color: #F2F4F7;
    border-color: #F2F4F7;
}

.mec-event-card.featured img {
    width: 100%;
    height: 320px;
    /* Hero height */
    object-fit: contain;
    background-color: #F2F4F7;
    display: block;
}

.mec-event-card.small>img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mec-event-card.featured .mec-event-content {
    padding: 25px;
}

.mec-event-card.featured h3 {
    color: #036;
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-style: normal;
    font-weight: 400;
    line-height: 40px;
    /* 142.857% */
    margin: 0 0 5px 0;
}

.mec-event-card.featured .mec-event-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 15px;
    margin-bottom: 15px;
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
}

.mec-event-card.featured .mec-event-description {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.mec-btn {
    display: inline-block;
    padding: 10px 25px;
    border: 1px solid #C5BA90;
    color: #303A54;
    background-color: transparent;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.mec-btn:hover {
    background-color: #C5BA90;
    color: #fff;
}

.mec-grid-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.mec-event-card.small {
    display: flex;
    align-items: stretch;
    /* Aligne la hauteur de l'image sur celle du contenu */
    background-color: #ffffff;
    border: 1px solid #e0e7f1;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.mec-event-card.small:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #C5BA90;
}

.mec-event-card.small>a {
    flex: 0 0 180px;
    /* Largeur fixe pour l'image */
    /* height: 150px; */
    /* Hauteur fixe pour l'image */
    overflow: hidden;
    display: block;
}

.mec-event-card.small img {
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    /* Empêche l'écrasement de l'image */
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.mec-event-card.small:hover img {
    transform: scale(1.1);
    /* Effet de zoom au survol */
}

.mec-event-card.small>img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 8px;
}

.mec-event-card.small .mec-event-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    /* Garde le titre et le bouton sur la même ligne */
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    gap: 20px;
}

.mec-event-card.small .mec-event-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mec-event-card.small h4 {

    margin: 0;
    color: #036;
    font-family: 'Montserrat', sans-serif;
    font-size: 30px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.mec-event-card.small .mec-event-location {
    color: #6b7280;
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.mec-event-card.small .mec-event-meta-small {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #374151;
}

.mec-event-card.small .mec-event-description-wrapper {
    flex-grow: 1;
    text-align: left;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 0 20px;
}

.mec-event-card.small .mec-event-actions {
    flex-shrink: 0;
}

.mec-btn-small {
    padding: 8px 24px;
    border: 1px solid #C5BA90;
    color: #374151;
    background-color: transparent;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.mec-btn-small:hover {
    background-color: #C5BA90;
    color: #fff;
    border-color: #C5BA90;
}

.mec-event-meta .mec-meta-item, .mec-event-meta-small .mec-meta-item {
    display: flex;
    align-items: center;
}

.mec-event-meta .mec-meta-item img, .mec-event-meta-small .mec-meta-item img {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

.mec-meta-separator {
    color: #d1d5db;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #888;
    font-size: 1.1em;
}

@media (max-width: 1200px) {
    .mec-event-card.small .mec-event-description-wrapper {
        display: none;
    }
}

@media (max-width: 992px) {
    .mec-top-section {
        flex-direction: column;
    }

    .mec-left-panel {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .mec-event-card.small {
        flex-direction: column;
        align-items: flex-start;
    }

    .mec-event-card.small>img {
        width: 100%;
        height: 180px;
    }

    .mec-event-card.small>a {
        flex: 0 0 auto;
        width: 100%;
        height: 180px;
        /* Image un peu plus haute sur mobile */
    }

    .mec-event-card.small .mec-event-content {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .mec-event-card.small .mec-event-description-wrapper {
        display: block;
        padding: 10px 0;
    }

    .mec-event-card.small .mec-event-actions {
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .mec-container {
        padding: 20px;
    }

    .mec-event-card.featured h3 {
        font-size: 1.5rem;
    }
}

/* Jour actuel avec cercle bleu */
.mec-day.today {
    border: 2px solid #007BFF !important;
    color: #007BFF;
    font-weight: bold;
}

/* Ajustement pour que le cercle soit bien rond */
.mec-day {
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    margin: auto;
}

/* Empêcher les titres cliquables de changer de style */
.mec-card-title a,
.mec-event-content h3 a,
.mec-event-info h4 a {
    color: #036;
    /* Votre couleur bleue actuelle */
    text-decoration: none;
    transition: color 0.3s ease;
}

.mec-card-title a:hover,
.mec-event-content h3 a:hover,
.mec-event-info h4 a:hover {
    color: #C5BA90;
    /* Devient doré au survol */
}



.mec-card-image-wrapper a:hover img,
.mec-event-card a:hover img {
    transform: scale(1.05);
}

.mec-load-more-center {
    text-align: center;
    margin-top: 30px;
    width: 100%;
}

#mec-calendar-load-more {
    background-color: #C5BA90;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(197, 186, 144, 0.3);
}

#mec-calendar-load-more:hover {
    background-color: #fff;
    border: 1px solid #C5BA90;
    color: #C5BA90;
    transform: scale(1.05);
}

/* Ensure the grid container stays vertical */
.mec-grid-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Style pour le message d'absence d'événement */
.mec-no-event-msg {
    font-weight: 600;
    color: #036;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Style pour le texte descriptif du CRI */
.mec-no-event-description {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    text-align: justify;
    border-top: 1px solid #ddd;
    padding-top: 15px;
    font-style: italic;
}

/* Ajustement du conteneur vide */
.mec-event-card.no-event {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    /* Pour garder une cohérence visuelle avec la hauteur des images */
}