/* ══════════════════════════════════════════════════════════════════════
   Réservation, étape 1 — version socle (drapeau chacun_son_otium, 23/10/2026).
   Chargée UNIQUEMENT par templates/site_v2/reserver_socle.html : hors drapeau,
   site_v2/reserver.html et site-v2.css restent servis tels quels.
   Couleurs : jetons du site (--s2-*) et accent du cabinet (couleurs_accent :
   texte sur accent ≥ 4,5:1 sous ce drapeau). Surfaces séparées par un pas de
   ton, pas de filets ni d'ombres au repos ; boutons et pastilles ronds.
   ══════════════════════════════════════════════════════════════════════ */
.rz { --rz-r: 20px; --rz-ease: cubic-bezier(.2, .7, .2, 1); padding-bottom: 0; }
.rz .rs-tete { margin-bottom: 18px; }
.rz .rs-retour { width: 44px; height: 44px; border: 0; }

.rz-grille { display: flex; flex-direction: column; gap: 12px; }

/* ── Récapitulatif : prestation + lieu ──────────────────────────────── */
.rz-recap { background: var(--s2-carte); border-radius: var(--rz-r); padding: 6px; }
.rz-presta summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 56px;
  padding: 8px 12px 8px 14px; border-radius: 14px; cursor: pointer; }
.rz-presta summary::-webkit-details-marker { display: none; }
.rz-presta__t { flex: 1; min-width: 0; }
.rz-presta__t b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.rz-presta__t small, .rz-presta__choix small { display: block; font-size: 14px; color: var(--s2-doux); font-variant-numeric: tabular-nums; }
.rz-changer { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 4px;
  font-size: 14px; font-weight: 700; color: var(--s2-accent-lien); }
.rz-changer i { font-size: 12px; transition: transform .25s var(--rz-ease); }
.rz-presta[open] .rz-changer i { transform: rotate(180deg); }
.rz-presta__liste { list-style: none; margin: 2px 0 6px; padding: 0 4px; display: grid; gap: 2px; }
.rz-presta__choix { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border-radius: 12px;
  color: var(--s2-brun); text-decoration: none; transition: background-color .15s; }
.rz-presta__choix > span { flex: 1; min-width: 0; }
.rz-presta__choix b { display: block; font-size: 15px; font-weight: 700; }
.rz-presta__choix:hover { background: var(--s2-fond); }
.rz-presta__choix.is-on { background: var(--s2-fond); }
.rz-presta__choix i { color: var(--s2-accent-lien); font-size: 18px; }

/* Lieu : contrôle segmenté discret */
.rz-lieux { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 4px 6px 6px;
  padding: 4px; border-radius: 999px; background: var(--s2-fond); }
.rz-lieu { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; height: 44px; padding: 0 12px;
  border-radius: 999px; color: var(--s2-doux); text-decoration: none; font-size: 14px; font-weight: 700;
  transition: background-color .2s var(--rz-ease), color .2s; }
.rz-lieu span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rz-lieu:hover { color: var(--s2-brun); }
.rz-lieu.is-on { background: var(--s2-carte); color: var(--s2-brun); }
.rz-lieu-seul { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 14px 10px; font-size: 14px; color: var(--s2-doux); }
.rz-choix { display: none; }

/* ── Agenda : semaine + heures ──────────────────────────────────────── */
.rz-agenda { background: var(--s2-carte); border-radius: var(--rz-r); padding: 16px 12px 18px; }
.rz-mois { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.rz-titre { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.rz-nav { display: flex; gap: 4px; }
.rz-nav a, .rz-nav .is-off { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; color: var(--s2-brun); text-decoration: none; transition: background-color .15s; }
.rz-nav a:hover { background: var(--s2-fond); }
.rz-nav .is-off { color: var(--s2-filet); }

.rz-jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.rz-jour { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 68px; border-radius: 16px; color: var(--s2-brun); text-decoration: none;
  transition: background-color .2s var(--rz-ease), color .2s; }
.rz-jour small { font-size: 12px; font-weight: 600; color: var(--s2-doux); }
.rz-jour b { font-size: 19px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rz-jour:hover { background: var(--s2-fond); }
.rz-dispo { display: block; width: 6px; height: 6px; margin-top: 3px; border-radius: 50%; background: var(--s2-accent); }
.rz-dispo--0 { background: transparent; }
.rz-dispo--1 { opacity: .45; }
.rz-dispo--2 { opacity: .75; }
.rz-jour.is-vide b { color: var(--s2-doux); opacity: .55; }
.rz-jour.is-vide small { opacity: .7; }
.rz-jour.is-on { background: var(--s2-brun); color: var(--s2-fond); }
.rz-jour.is-on small { color: var(--s2-filet); }
.rz-jour.is-on b { color: var(--s2-fond); opacity: 1; }
.rz-jour.is-on .rz-dispo { background: var(--s2-fond); opacity: 1; }
.rz-jour.is-on .rz-dispo--0 { background: transparent; }

.rz-heures { display: grid; gap: 18px; margin-top: 18px; padding: 0 4px; }
.rz-groupe__t { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--s2-brun); }
.rz-groupe__t span { font-weight: 500; color: var(--s2-doux); font-variant-numeric: tabular-nums; }
.rz-pastilles { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.rz-heure { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 999px;
  background: var(--s2-fond); color: var(--s2-brun); text-decoration: none; font-size: 15px; font-weight: 700;
  font-variant-numeric: tabular-nums; transition: background-color .18s var(--rz-ease), color .18s, transform .18s var(--rz-ease); }
.rz-heure:hover { background: var(--s2-fond-2); }
.rz-heure:active { transform: scale(.96); }
.rz-heure.is-on { background: var(--s2-accent); color: var(--s2-accent-texte); }
.rz-vide { margin: 16px 4px 0; padding: 16px; border-radius: 14px; background: var(--s2-fond); color: var(--s2-doux); font-size: 15px; }
.rz-aide { margin: 18px 4px 0; font-size: 14px; color: var(--s2-doux); }
.rz-aide a { color: var(--s2-accent-lien); font-weight: 700; text-decoration: none; }
.rz-aide a:hover { text-decoration: underline; }

/* ── Bouton de confirmation ─────────────────────────────────────────── */
.rz-bas { position: sticky; bottom: 0; z-index: 5; margin: 0 -16px; padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: var(--s2-fond); }
.rz-cta { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; padding: 0 20px;
  border-radius: 999px; background: var(--s2-accent); color: var(--s2-accent-texte); font-size: 16px; font-weight: 800;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  transition: background-color .25s var(--rz-ease), color .25s, transform .15s var(--rz-ease); }
.rz-cta:not(.is-off):hover { filter: brightness(.94); }
.rz-cta:not(.is-off):active { transform: scale(.985); }
.rz-cta.is-off { background: var(--s2-fond-2); color: var(--s2-doux); cursor: default; }
.rz-cta.is-nouveau { animation: rz-cta .32s var(--rz-ease); }
@keyframes rz-cta { from { transform: scale(.97); } to { transform: none; } }

/* Focus clavier net, à la couleur du cabinet */
.rz a:focus-visible, .rz summary:focus-visible { outline: 2px solid var(--s2-accent-lien); outline-offset: 2px; }
.rz-heure:focus-visible, .rz-jour:focus-visible, .rz-lieu:focus-visible { outline-offset: 1px; }

/* Échange en douceur (resa-socle.js) */
.rz-agenda, .rz-recap { transition: opacity .18s; }
.rz.is-charge .rz-agenda { opacity: .55; }
.rz.is-entre .rz-groupe, .rz.is-entre .rz-vide { animation: rz-entre .32s var(--rz-ease) both; }
.rz.is-entre .rz-groupe:nth-child(2) { animation-delay: 50ms; }
.rz.is-entre .rz-groupe:nth-child(3) { animation-delay: 100ms; }
@keyframes rz-entre { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rz-pop { 0% { transform: scale(.92); } 60% { transform: scale(1.04); } 100% { transform: none; } }
.rz-heure.is-on.is-nouveau { animation: rz-pop .28s var(--rz-ease); }

@media (prefers-reduced-motion: reduce) {
  .rz *, .rz *::before { animation: none !important; transition: none !important; }
}

/* ── Ordinateur : récap à gauche, agenda à droite ───────────────────── */
@media (min-width: 992px) {
  body.s2-rz .rs.rz { max-width: 1000px; }
  .rz-grille { display: grid; grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: auto 1fr;
    grid-template-areas: "recap agenda" "bas agenda"; gap: 16px 24px; align-items: start; }
  .rz-recap { grid-area: recap; padding: 8px; }
  .rz-agenda { grid-area: agenda; padding: 22px 22px 26px; }
  .rz-bas { grid-area: bas; position: sticky; top: 24px; margin: 0; padding: 0; background: none; }
  .rz-choix { display: flex; align-items: center; gap: 10px; margin: 6px 6px 4px; padding: 12px 14px; border-radius: 14px;
    background: var(--s2-fond); font-size: 15px; font-weight: 700; }
  .rz-choix i { color: var(--s2-accent-lien); }
  .rz-choix.is-vide { font-weight: 500; color: var(--s2-doux); }
  .rz-choix.is-vide i { color: var(--s2-doux); }
  .rz-jour { min-height: 76px; }
  .rz-jour b { font-size: 21px; }
  .rz-pastilles { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}

/* Praticien et conditions (récapitulatif enrichi, 25/10) */
.rz-infos { margin: 6px 6px 4px; padding: 10px 8px 4px; border-top: 1px solid var(--s2-filet); }
.rz-pro, .rz-annul { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 13px; color: var(--s2-doux); }
.rz-pro b { color: var(--s2-brun); }
.rz-pro img, .rz-pro__ini { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.rz-pro__ini { display: inline-flex; align-items: center; justify-content: center; background: var(--s2-brun); color: var(--s2-fond-2);
  font-weight: 800; font-size: 13px; }
.rz-annul .bi { flex: none; width: 32px; text-align: center; color: var(--s2-accent-lien); font-size: 15px; }

/* Alignement (Nicolas, 25/10) : la colonne récap + bouton occupe toute la
   hauteur de l'agenda ; le bas du bouton est au niveau du bas de l'agenda. */
@media (min-width: 992px) {
  .rz-grille { grid-template-rows: 1fr auto; align-items: stretch; }
  .rz-recap { display: flex; flex-direction: column; }
  .rz-recap .rz-infos { margin-top: auto; }
  .rz-bas { position: static; align-self: end; }
}
