.container {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.calendar {
    position: relative;
    width: 100%;
    max-width: 1000px;
    padding: 40px 30px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    background-color: #f1f1fb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.calendar .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ccc;
}

.calendar .header .mois {
    display: flex;
    align-items: center;
    font-size: var(--font-size-title);
    font-weight: 600;
    color: #1d1d1d;
}

.calendar .header .btns {
    display: flex;
    gap: 10px;
}

.calendar .header .btns .btn {
    width: 50px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: white;
    background-color: var(--color-primary);
    font-size: var(--font-size-body);
    cursor: pointer;
    transition: all 0.3s;
}

.calendar .header .btns .btn:hover {
    background-color: #db0933;
    transform: scale(1.05);
}

.jours-semaine {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.jours-semaine .nom-jour {
    text-align: center;
    font-size: var(--font-size-lead);
    font-weight: 600;
    color: #1d1d1d;
}

.jours {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.jours .jour {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    color: #1d1d1d;
    background-color: white;
    font-size: var(--font-size-lead);
    font-weight: 400;
    transition: all 0.3s;
}

.jours .jour:not(.suivant):not(.precedent):hover,
.jours .jour[onclick]:hover {
    color: white;
    background-color: var(--color-primary);
    transform: scale(1.05);
}

.jours .jour[onclick] {
    cursor: pointer;
}

.jours .jour.aujourdhui {
    color: white;
    background-color: var(--color-primary);
}

.jours .jour.suivant,
.jours .jour.precedent {
    color: #ccc;
    background-color: #f9f9f9;
}

.legende {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ccc;
}

.item-legende {
    display: flex;
    align-items: center;
    color: #1d1d1d;
    font-size: var(--font-size-small);
    font-weight: 500;
}

.pastille {
    width: 15px;
    height: 15px;
    margin-right: 8px;
    border-radius: 50%;
}

.c-batu-kid {
    background-color: #ff5252 !important;
    color: white !important;
    border-color: #ff5252 !important;
}

.c-prestation {
    background-color: #4caf50 !important;
    color: white !important;
    border-color: #4caf50 !important;
}

.c-reunion {
    background-color: #2196f3 !important;
    color: white !important;
    border-color: #2196f3 !important;
}

.c-vide-grenier {
    background-color: #9c27b0 !important;
    color: white !important;
    border-color: #9c27b0 !important;
}

.c-atelier {
    background-color: #00bcd4 !important;
    color: white !important;
    border-color: #00bcd4 !important;
}

.c-autre {
    background-color: #78909c !important;
    color: white !important;
    border-color: #78909c !important;
}

#overlay-calendrier {
    top: 0;
    left: 0;
    width: 80vw;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay-cache {
    opacity: 0;
    visibility: hidden;
}

.overlay-visible {
    opacity: 1;
    visibility: visible;
}

#popup-evenement {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 480px;
    max-width: 90%;
    padding: 35px;
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

#popup-evenement.popup-cache {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.9);
}

#popup-evenement.popup-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

#btn-fermer-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    border: none;
    background: none;
    color: #999;
    font-size: var(--font-size-subtitle);
    cursor: pointer;
    transition: color 0.2s;
}

#btn-fermer-popup:hover {
    color: var(--color-primary);
}

#popup-titre {
    margin: 0 0 15px;
    padding-right: 30px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--color-primary);
    color: #1d1d1d;
    font-size: var(--font-size-subtitle);
    font-weight: 600;
}

#popup-description {
    margin: 0;
    color: #444;
    font-size: var(--font-size-body);
    line-height: 1.6;
}

@media (max-width: 700px) {
    .calendar {
        padding: 28px 16px;
    }

    .calendar .header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .calendar .header .mois {
        font-size: var(--font-size-subtitle);
    }

    .jours-semaine .nom-jour,
    .jours .jour {
        font-size: var(--font-size-small);
    }

    .jours .jour {
        height: 56px;
    }
}
