:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --primary-color: #a3e635; /* Vert de la maquette */
    --primary-light: #f0fdf4;
    --today-bg: #fef9c3; /* Jaune de la maquette */
    --border-color: #e5e7eb;
    --card-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(230, 230, 230, 0.5);
}


main {
    color: var(--text-color);
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    flex-wrap: wrap;
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 1300px;
    width: 100%;
}

@media (min-width: 1000px) {
    .container {
        flex-direction: row;
    }
    
    .sidebar {
        flex: 1;
        max-width: 350px;
    }
}
/* @media (max-width: 1000px) {
    .upcoming-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100vw;
        gap: 1.5rem;
    }
} */

/* --- SIDEBAR : PROCHAINS ÉVÉNEMENTS --- */
.sidebar {
    flex: 1;
    max-width: 350px;
    width: 100%;
}

.sidebar-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

.event-card.featured {
    background-color: #ecfccb; /* Teinte verte pour l'événement mis en avant */
    border-color: var(--primary-color);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    color: #4b5563;
}

.card-info svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.card-info a {
    color: inherit;
    text-decoration: underline;
}

/* --- CALENDRIER --- */
.calendar-container {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    flex: 2;
    width: 100%;
    overflow-x: auto;
}

.calendar-header {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    width: 100%;
    gap:15px
}

.month-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: capitalize;
}

.btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn:hover:not(.disabled) {
    background: #f3f4f6;
}

.btn.active {
    background: #e5e7eb;
    font-weight: 600;
}

.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr)); 
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    width: 100%;
}

.day-header {
    padding: 0.75rem 0.2rem;
    text-align: center;
    font-weight: 500;
    color: #4b5563;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: #f9fafb;
    text-overflow: ellipsis;
}

.day-cell {
    min-height: 100px;
    padding: 0.5rem;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    background: #ffffff;
}

.day-cell.other-month {
    background: #f9fafb;
    color: #9ca3af;
}

.day-cell.today {
    background-color: var(--today-bg);
}

.day-number {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: inline-block;
}

/* Événement à l'intérieur du calendrier */
.calendar-event-tag {
    display: block;
    background-color: var(--primary-color);
    min-height: 12px;
    border-radius: 4px;
    margin-top: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    font-size: 0.8rem;
    color: black;
    text-decoration: none;
    padding: 1px;
    padding-top: 4px;
    padding-bottom: 4px;
    /* overflow: hidden; */
    text-overflow: ellipsis;
    /* white-space: nowrap; */
}

.calendar-event-tag:hover {
    opacity: 0.8;
}

.no-event {
    color: #6b7280;
    font-style: italic;
}