.calendar-container {
    display: flex;
    width: 100%;
    max-width: 880px;
    background-color: white;
    border-radius: 10px;
    /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); */
    overflow: hidden;
    margin-inline: auto;
    gap: 2rem;
}

@media (max-width: 850px) {
    .calendar-container {
        flex-direction: column;
    }
}
@media (max-width: 450px) {
    .calendar-container {
        overflow: auto;
    }

    .events-list {
        max-height: none !important;
    }
}

.calendar-container h2 {
    font-size: 1.4rem;
    margin-bottom: 0px;
    letter-spacing: 1px;
}

.calendar {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 450px) {
    .calendar {
        padding: 20px 0px;
    }
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
    padding: 0px 12px;
    border-radius: 50%;
}

.nav-btn:hover {
    background-color: #f0f0f0;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    color: #888;
    margin-bottom: 10px;
}

.weekdays div {
    padding: 10px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.day {
    position: relative;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.day:hover {
    background-color: #f0f0f0;
}

.current-month {
    color: #333;
}

.other-month {
    color: #ccc;
}

.has-event {
    background-color: #e0f0ff; /* Bleu pastel */
}

.has-event::after {
    content: "";
    position: absolute;
    bottom: 5px;
    width: 5px;
    height: 5px;
    background-color: #0066cc;
    border-radius: 50%;
}

.selected-day {
    background-color: #d0e8ff;
    font-weight: bold;
}

.today {
    border: 2px solid #4caf50;
}

.calendar-subheader {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.see-all-btn {
    border: 2px solid var(--title-txt-color);
    background-color: white;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s;
}

.see-all-btn:hover {
    background-color: #eaf5ff;
}

/* Panel d'événements */
.events-panel {
    flex: 1;
    padding: 20px 30px 30px;
    background: url(../../images/calendar/calendar-bg.webp) center/cover;
    color: white;
    position: relative;
    display: flex;
    flex-direction: column;
}

.events-panel h2 {
    margin-bottom: 30px;
    font-size: 24px;
}

.events-list {
    margin-top: 20px;
    overflow-y: auto;
    flex-grow: 1;
    max-height: 320px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.events-list::-webkit-scrollbar {
    width: 6px;
}

.events-list::-webkit-scrollbar-track {
    background: transparent;
}

.events-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}

.event-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.event-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.event-date {
    font-size: 14px;
    color: #ddd;
    margin-bottom: 10px;
}

.event-date ul,
.event-date ol {
    padding-left: 20px;
    margin: 5px 0;
}

.event-date table {
    border-collapse: collapse;
    margin: 5px 0;
}

.event-date th,
.event-date td {
    padding: 3px 6px;
}

.event-date pre,
.event-date code {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
    white-space: pre-wrap;
}

.event-date pre {
    padding: 8px;
    margin: 5px 0;
}

.event-date a {
    color: #4a90e2;
    text-decoration: none;
}

.event-date a:hover {
    text-decoration: underline;
}

.event-date progress,
.event-date meter {
    width: 100%;
    height: 10px;
    margin: 5px 0;
}

.event-date img {
    vertical-align: middle;
    max-width: 100%;
}

.event-more {
    color: white;
    text-decoration: none;
}

.event-more:hover {
    text-decoration: underline;
}

.share-events {
    position: relative;
    margin-top: 20px;
    text-align: right;
}
