.calendar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
    padding: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 2px solid #f3f4f6;
}

.month-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.month-year {
    font-size: 1.5em;
    font-weight: bold;
    color: #374151;
}

.nav-button {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: #6b7280;
    padding: 5px 10px;
    transition: color 0.3s;
}

.nav-button:hover {
    color: #374151;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    color: #6b7280;
    margin: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 5px;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.day {
    min-height: 60px;
    padding: 5px;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.3s ease;
}

.day-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

@media (max-width: 600px) {
    .weekdays {
        display: none;
    }

    .days {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .day {
        min-height: 60px;
        padding: 8px;
    }

    .day-info {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 5px;
        width: 100%;
    }

    .date {
        font-size: 1.2em !important;
    }

    .weekday {
        display: inline !important;
        font-size: 0.9em !important;
        margin-left: 5px;
    }

    .event {
        width: 100%;
        text-align: left;
        font-size: 0.85em !important;
        margin-top: auto !important;
    }

    .month-selector {
        justify-content: center;
        gap: 5px;
    }

    .search-button {
        width: 100%;
        margin-top: 10px;
    }

    .month-year {
        font-size: 1.2em;
    }

    .today::after {
        top: -10px;
        right: -5px;
        font-size: 0.6em;
        transform: none;
    }
}

.day .date {
    font-weight: bold;
    color: #374151;
}

.day .weekday {
    font-size: 0.7em;
    color: #9CA3AF;
}

.day .event {
    font-size: 0.8em;
    color: #6B7280;
    background: #F3F4F6;
    padding: 2px 4px;
    border-radius: 4px;
    margin-top: auto;
    word-break: break-word;
}

.today {
    background: #EFF6FF;
    border: 2px solid #3B82F6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
    transform: scale(1.03);
    position: relative;
    animation: todayPulse 2s infinite;
}

@keyframes todayPulse {
    0% {
        box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }
    100% {
        box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
    }
}

.today::after {
    content: "Aujourd'hui";
    position: absolute;
    top: -10px;
    right: -10px;
    background: #3B82F6;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
}

.other-month {
    background: #F9FAFB;
    color: #D1D5DB;
}

select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    max-width: 100%;
}

.search-button {
    background: #3B82F6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.search-button:hover {
    background: #2563EB;
}

.event {
    background: #EEF2FF !important;
    border-left: 3px solid #3B82F6;
    padding: 4px 8px !important;
    margin-top: auto !important;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.event a {
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.3s;
}

.event a:hover {
    color: #2563EB;
    text-decoration: underline;
}
