.calendar {

}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    text-transform: capitalize;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-weekdays div {
    text-align: center;
    font-weight: bold;
}

.calendar-day {
    min-height: 150px;
    max-height: 150px;
    border: 1px solid var(--lls-card-border-color);
    padding: 4px;
    overflow: auto;
}
.calendar-day.is-today .calendar-day-label{
    background-color:var(--primary);
    border-radius: 50px;
    width:20px;
    height: 20px;
    color: white;
    display: flex;
    align-items: center;
    font-weight: bold;
    justify-content: center;
    font-size: 0.6rem;
}
.calendar-day.is-today {
    background: #307ef31a;
}
.calendar-day-label {
    font-size: .9rem;
    opacity: 0.7;
}
.calendar-event-time {
    font-size: 1em;
    opacity: 0.85;
    font-weight: 600;
    line-height: 1;
}

.calendar-event-title {
    font-size: 1em;
    line-height: 1.2;
}

.calendar-event {
    margin-top: 4px;
    padding: 5px 10px;
    font-size: 0.75rem;
}

.calendar-day.is-empty {
    background: var(--lls-table-inverse-background);
}
.calendar-event {
    position: relative;
}

/* Grille générale */
.calendar-week { display: flex; flex-direction: column; font-family: Arial; font-size: 0.75rem; }
.calendar-header { display: flex; justify-content: space-between; margin-bottom: 4px; }

/* Grille semaine */
.week-grid {
    display: flex;
    border-top: 1px solid var(--lls-card-border-color);
    font-size: 0.75rem;
    height: 1440px;
    user-select: none;
}

.week-hours {
    width: 50px;
    border-right: 1px solid var(--lls-card-border-color);
    color: #6b7280;
}

.week-hours > div {
    height: 60px;
    padding-top: 2px;
    text-align: right;
    padding-right: 6px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--lls-card-border-color);
}

.week-days {
    display: flex;
    flex: 1;
}

.week-day {
    flex: 1;
    position: relative;
    border-right: 1px solid var(--lls-card-border-color);
    background: repeating-linear-gradient(
        to bottom,
        var(--lls-card-bg),
        var(--lls-table-nth-background) 59px,
        var(--lls-card-border-color) 60px
    );
}

.week-day:last-child {
    border-right: none;
}
.hour-hover-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: #3b82f6;
    pointer-events: none;
    opacity: 0;
}


/* Header sticky jour + date */
.week-day .day-header {
    position: sticky;
    top: 0;
    background: var(--lls-table-nth-background);
    border-bottom: 1px solid var(--lls-card-border-color);
    text-align: center;
    font-weight: bold;
    padding: 4px 0;
    z-index: 10;
}

/* Événements */
.week-event { position: absolute; left: 4px; right: 4px; border-radius: 4px; padding: 2px 4px; color: white; font-weight: 500; font-size: 0.7rem; cursor: pointer; overflow: hidden; }
.week-event .calendar-event-time { font-size: 0.65rem; opacity: 0.85; line-height: 1; }
.week-event .calendar-event-title { font-size: 0.75rem; font-weight: 500; line-height: 1.1; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.week-event:hover { opacity: 0.9; filter: brightness(1.1); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding-top: 10vh; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; max-width: 600px; border-radius: 8px; padding: 1rem; z-index: 51; }

.planning-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-day-header {
    font-weight: 600;
    background: transparent;
    padding: .5rem;
    border-radius: 4px;
    border:1px dashed var(--lls-card-border-color);
    color:var(--blue)
}

.list-event {
    padding: .5rem .75rem;
    background: var(--lls-bg-body);
    border-radius: 4px;
    cursor: pointer;
    margin-top: .25rem;
}

.list-event:hover {
    background: rgba(35,109,201, .2);
}

.list-event-time {
    font-size: .85rem;
    color: #64748b;
}

.list-event-title {
    font-weight: 500;
}
