/* Écran : déplacer un rendez-vous — « Déplacer le RDV » (gestion), « Journée d'impératif », sections « Nouveau
   créneau demandé » et « Déplacements » de la fiche RDV, « À replanifier » d'Aujourd'hui, page client « Changer de
   créneau » / « Choisir un nouveau créneau ».
   Réutiliser les tokens et composants de app.css / admin.css (calendrier .cal-*, créneaux .slot) ; ne jamais
   redéfinir de token. Liée par layouts/admin.php et layouts/public.php. */

/* ---------- Calendrier des créneaux (partials/reschedule_picker.php) ---------- */
.rs-picker[aria-busy="true"] { opacity: .6; transition: opacity var(--t-fast) var(--ease-std); }
.rs-picker a.cal-day { text-decoration: none; }
.rs-picker .cal-day.is-off { color: var(--label-3); cursor: default; background: none; font-weight: 400; }
.rs-picker .cal-day.is-off.is-today { color: color-mix(in srgb, var(--red) 55%, transparent); }
.rs-picker .cal-head a.btn { text-decoration: none; }
.rs-picker__off { visibility: hidden; }
.rs-picker a.cal-day:focus-visible, .rs-picker .cal-head a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rs-picker .slots__day { font: var(--t-headline); color: var(--label); margin: 0 0 12px 4px; }
/* Créneau = bouton radio (le formulaire marche sans JavaScript) présenté comme les créneaux de la réservation */
.rs-slot { position: relative; display: block; }
.rs-slot input { position: absolute; opacity: 0; pointer-events: none; }
.rs-slot .slot { display: grid; place-items: center; width: 100%; }
.rs-slot input:checked + .slot { background: var(--brand); color: var(--on-brand); }
.rs-slot input:focus-visible + .slot { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
    .rs-slot:hover input:not(:checked) + .slot { background: var(--fill-2); }
}
.rs-error { font: var(--t-foot); color: var(--red); margin: 8px 4px 0; }
/* Gestion : créneaux compacts comme ceux du formulaire RDV (mais toujours 44 px au doigt) */
.admin .rs-picker .slot { min-height: var(--hit); }
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
    .admin .rs-picker .slot { min-height: 36px; font-size: 14px; }
}

/* ---------- « Déplacer le RDV » ---------- */
.move-form__head { margin-bottom: var(--section-gap); }
.move-form__notice { margin: 0 0 var(--section-gap); }
.move-form__reason-note { margin: 10px 0 0; }
.move-form__reason-note[hidden] { display: none; }
.move-form .frow > .select { flex: 1 1 auto; min-width: 0; max-width: 64%; margin-left: auto; text-align-last: right; }
.move-form__opt { color: var(--label-2); font-weight: 400; }
.move-form__next { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font: var(--t-sub); color: var(--label-2); margin: 0 0 12px; }
.move-form__next .icon { width: 16px; height: 16px; color: var(--brand-text); }
.move-form__next strong { color: var(--label); font-weight: 600; }
.move-check .item__sub { -webkit-line-clamp: 3; line-clamp: 3; }
.move-form__actions { margin: 0 0 var(--header-gap); }
.move-form__actions .btn .icon { width: 18px; height: 18px; }
.move-form__foot { margin-bottom: var(--section-gap); }
.move-history .item__title { white-space: normal; }
.move-history .item__sub { -webkit-line-clamp: 2; line-clamp: 2; }

/* ---------- Journée d'impératif ---------- */
.imp__head { margin-bottom: var(--section-gap); }
.imp-day__go { margin: 8px 0 0; text-align: right; }
.imp-day__go .btn { min-height: var(--hit); }
.imp-row + .imp-row { margin-top: 12px; }
.imp-row.is-error { box-shadow: 0 0 0 1.5px var(--red); }
.imp-row__actions > .seg { flex: 1 1 auto; display: flex; max-width: 100%; }
/* Pastille du choix sur toute la largeur de son segment (comme tout contrôle segmenté) : marge intérieure réduite
   pour « Laisser choisir » ; très petits écrans, libellé sur deux lignes dans la pastille plutôt que débordant */
.imp-row__actions > .seg label { flex: 1 1 0; padding: 0; }
.imp-row__actions > .seg label span { width: 100%; margin: 0; padding: 0 4px; text-align: center; }
@media (max-width: 374px) {
    .imp-row__actions > .seg label { white-space: normal; }
    .imp-row__actions > .seg label span { line-height: 14px; padding: 0 2px; }
}
.imp-row__when { flex-wrap: wrap; row-gap: 6px; }
.imp-row__when .frow__label { flex: 1 1 160px; }
.imp-row__inputs { display: flex; gap: 8px; flex: 1 1 220px; justify-content: flex-end; }
.frow .imp-row__inputs .input { flex: 1 1 0; max-width: 150px; min-height: var(--hit); padding: 6px 10px; border-radius: var(--radius-sm); background: var(--fill); text-align: center; }
.imp-row__note { font: var(--t-foot); color: var(--label-2); margin: 0; padding: 4px 16px 12px; }
.group .imp-row__note::before, .group .imp-row__panel::before { display: none; }
.imp-recap .item__title { white-space: normal; }
.imp-recap .item__sub { -webkit-line-clamp: 3; line-clamp: 3; }
.imp__actions { margin: 0 0 var(--header-gap); }
.imp__actions .btn .icon { width: 18px; height: 18px; }
.imp__foot { margin-bottom: var(--section-gap); }

/* ---------- Agenda (liste par jour) : « ⋯ » du jour (dont « Journée d'impératif… ») à côté de « + » ----------
   Couleur secondaire : une action, pas une alerte (l'orange et le triangle restent aux vrais conflits) */
.day-list__head .day-list__imp {
    margin-left: auto; margin-right: 8px; color: var(--label-2);
    border: 0; padding: 0; background: transparent; font: inherit; cursor: pointer;
}
.day-list__head .day-list__imp[hidden] { display: none; }
.day-list__head .day-list__imp:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Fiche RDV : nouveau créneau demandé au client, historique ---------- */
.appt-moves .item__title { white-space: normal; }
.appt-moves .item__sub { -webkit-line-clamp: 2; line-clamp: 2; }

/* ---------- Client : « Changer de créneau » / « Choisir un nouveau créneau » ---------- */
body:has(.rs-page) .site-header .btn--brand { display: none; }
.rs-page .done-hero__check--due { background: var(--brand-tinted); color: var(--brand-text); }
.rs-page .done-hero__check--failed { background: var(--red-bg); color: var(--red); }
.rs-alert, .rs-reason { margin: 0 0 var(--section-gap); }
.rs-reason .item__title, .rs-reason .item__sub { white-space: normal; -webkit-line-clamp: unset; line-clamp: unset; display: block; }
.rs-form__actions { margin: 0 0 var(--header-gap); }
.rs-form__foot { margin-bottom: var(--section-gap); }
@media (prefers-reduced-motion: reduce) {
    .rs-picker[aria-busy="true"] { transition: none; }
}
