/* Ideal Horaires — IdealPC Sàrl
   La typographie hérite du thème YOOtheme. Les couleurs de statut sont des
   variables CSS définies par l'élément (ou la configuration du plugin). */

.schedule-accordion {
    --schedule-available: #16a34a;
    --schedule-limited: #f59e0b;
    --schedule-full: #dc2626;
    --schedule-waitlist: #6366f1;
    --schedule-line: rgba(0, 0, 0, .12);
    list-style: none;
    padding: 0;
    margin: 0;
}

.schedule-accordion > li { margin: 0; }
.schedule-accordion > li + li { margin-top: 0; }

/* Titre de semaine */
.schedule-accordion .schedule-week-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--schedule-line);
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.schedule-accordion .schedule-week-title::before { display: none; }
.schedule-accordion .schedule-week-title:hover,
.schedule-accordion .schedule-week-title:focus { color: inherit; text-decoration: none; }

.schedule-week-label { flex: 1 1 auto; }

.schedule-week-count {
    flex: none;
    font-size: .75rem;
    font-weight: 600;
    padding: .2em .65em;
    border-radius: 999px;
    color: var(--schedule-available);
    background: color-mix(in srgb, var(--schedule-available) 12%, transparent);
}

.schedule-week-count--full {
    color: var(--schedule-full);
    background: color-mix(in srgb, var(--schedule-full) 10%, transparent);
}

.schedule-accordion .schedule-week-title::after {
    flex: none;
    width: 22px;
    height: 22px;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    background: none;
    transition: transform .25s ease;
}

.schedule-accordion--icon-plus .schedule-week-title::after { content: "+"; }
.schedule-accordion--icon-plus .uk-open > .schedule-week-title::after { content: "\2212"; }

.schedule-accordion--icon-chevron .schedule-week-title::after {
    content: "";
    width: 9px;
    height: 9px;
    margin: 0 6px 4px 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}
.schedule-accordion--icon-chevron .uk-open > .schedule-week-title::after { transform: rotate(-135deg); margin-bottom: -4px; }

.schedule-accordion--icon-none .schedule-week-title::after { display: none; }

.schedule-week-content { padding: 4px 0 14px; margin-top: 0 !important; }

/* Jour */
.schedule-day {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 12px 0;
    border-bottom: 1px solid var(--schedule-line);
}

.schedule-day:last-child { border-bottom: 0; }

.schedule-day-label {
    flex: 0 0 180px;
    font-weight: 600;
}

.schedule-day-slots {
    flex: 1 1 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Créneau */
.schedule-slot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
}

.schedule-slot-time {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 7.5em;
}

.schedule-slot-note { opacity: .7; font-size: .92em; }

.schedule-slot--annule .schedule-slot-time { text-decoration: line-through; opacity: .55; }

.schedule-slot-button { margin-left: auto; }

/* Badges */
.schedule-badge {
    --c: var(--schedule-available);
    display: inline-flex;
    align-items: center;
    gap: .45em;
    padding: .25em .75em;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.45;
    white-space: nowrap;
    text-decoration: none;
    color: #fff;
    background: var(--c);
    border: 1px solid var(--c);
    transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}

.schedule-badge::before {
    content: "";
    width: .5em;
    height: .5em;
    border-radius: 50%;
    background: currentColor;
    opacity: .85;
}

.schedule-badge--limite { --c: var(--schedule-limited); color: #1f1300; }
.schedule-badge--complet { --c: var(--schedule-full); }
.schedule-badge--attente { --c: var(--schedule-waitlist); }
.schedule-badge--annule { --c: #9ca3af; }

a.schedule-badge--link:hover,
a.schedule-badge--link:focus {
    color: #fff;
    text-decoration: none;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -6px var(--c);
}

a.schedule-badge--limite:hover, a.schedule-badge--limite:focus { color: #1f1300; }

a.schedule-badge--link::after { content: "\2192"; font-weight: 700; margin-left: .1em; }

/* Variante contour */
.schedule-accordion--outline .schedule-badge {
    color: var(--c);
    background: color-mix(in srgb, var(--c) 8%, transparent);
}
.schedule-accordion--outline a.schedule-badge--link:hover { color: var(--c); }

/* Variante texte */
.schedule-accordion--text .schedule-badge {
    padding: 0;
    border: 0;
    color: var(--c);
    background: none;
    font-size: inherit;
    font-weight: 500;
}
.schedule-accordion--text .schedule-badge::before { display: none; }
.schedule-accordion--text a.schedule-badge--link:hover { color: var(--c); box-shadow: none; transform: none; text-decoration: underline; }

/* Thème sombre (sections "light") */
.uk-light .schedule-accordion { --schedule-line: rgba(255, 255, 255, .18); }

@media (max-width: 639px) {
    .schedule-day-label { flex-basis: 100%; }
    .schedule-slot-button { margin-left: 0; }
}
