/* ═══════════════════════════════════════════════════════════════════════════
   PRENDRE RENDEZ-VOUS — section de l'accueil (index.html, #rendez-vous)
   ───────────────────────────────────────────────────────────────────────────
   Un seul cadre en deux colonnes : le calendrier à gauche, et à droite un
   panneau qui passe par trois états (créneaux → formulaire → confirmation).
   Charte du site : papier, encre anthracite, une seule police. Les états
   « choisi » sont en encre pleine ; les jours ouverts portent un point.
   Script : assets/js/rdv.js.
   ═══════════════════════════════════════════════════════════════════════════ */

.rv {
  padding-block: clamp(72px, 9vw, 120px);
  background: var(--bg-subtle, #f0ede7);
  border-top: 1px solid var(--border);
}

.rv__head {
  max-width: 640px;
  margin: 0 auto clamp(32px, 4vw, 48px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rv__t {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.035em;
  color: var(--ink);
}
.rv__s {
  margin: 16px 0 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ── Le cadre ─────────────────────────────────────────────────────────────── */
.rv__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  max-width: 1040px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(33, 34, 36, .04), 0 24px 60px -28px rgba(33, 34, 36, .22);
  overflow: hidden;
}

/* ── Calendrier ───────────────────────────────────────────────────────────── */
.rv__cal {
  padding: clamp(22px, 3vw, 34px);
  border-right: 1px solid var(--border);
}
.rv__mois {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.rv__mois-t {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  text-transform: capitalize;
}
.rv__nav {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--t), border-color var(--t), opacity var(--t);
}
.rv__nav:hover:not(:disabled) { background: var(--paper); border-color: #d6d0c5; }
.rv__nav:disabled { opacity: .35; cursor: default; }

.rv__sem,
.rv__jours {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.rv__sem span {
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 6px;
}

.rv__j {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-size: .98rem;
  font-weight: 500;
  color: #b9b3a9;
  cursor: default;
  transition: background var(--t), color var(--t), transform var(--t);
}
.rv__j--vide { visibility: hidden; }
.rv__j--libre {
  color: var(--ink);
  font-weight: 650;
  background: var(--paper);
  cursor: pointer;
}
/* Le point sous un jour ouvert : on voit d'un coup d'œil où il reste de la place. */
.rv__j--libre::after {
  content: "";
  position: absolute;
  bottom: 18%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  opacity: .55;
}
.rv__j--libre:hover { background: #ebe6dd; }
.rv__j--auj { box-shadow: inset 0 0 0 1.5px var(--border); }
.rv__j.is-choisi {
  background: var(--ink);
  color: #fff;
  transform: scale(1.04);
}
.rv__j.is-choisi::after { background: #fff; opacity: .9; }
.rv__j:focus-visible,
.rv__h:focus-visible,
.rv__nav:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.rv__info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  font-size: .82rem;
  color: var(--muted);
}

/* ── Panneau de droite ────────────────────────────────────────────────────── */
.rv__pan {
  position: relative;
  padding: clamp(22px, 3vw, 34px);
  min-height: 460px;
  background: linear-gradient(180deg, #fff 0%, #fdfcfa 100%);
}
.rv__etape {
  display: none;
  animation: rv-entre .35s var(--ease) both;
}
.rv__etape.is-on { display: block; }
@keyframes rv-entre {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* `hidden` doit gagner sur les `display` posés plus bas (sinon l'état vide
   restait affiché au-dessus des créneaux). */
.rv__pan [hidden] { display: none !important; }

/* État vide */
.rv__vide {
  height: 100%;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.rv__vide-ico {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--border);
  color: var(--ink);
  margin-bottom: 16px;
}
.rv__vide-t { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.rv__vide-s { margin: 6px 0 0; font-size: .92rem; color: var(--muted); max-width: 30ch; }
.rv__vide-s a { color: var(--ink); text-decoration: underline; }

/* Créneaux */
.rv__jour-t {
  margin: 0 0 18px;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
}
.rv__jour-t::first-letter { text-transform: uppercase; }
.rv__groupe + .rv__groupe { margin-top: 20px; }
.rv__groupe-t {
  margin: 0 0 10px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.rv__heures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
}
.rv__h {
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--t), background var(--t), color var(--t), transform var(--t);
}
.rv__h:hover { border-color: var(--ink); transform: translateY(-1px); }
.rv__h.is-choisi { background: var(--ink); border-color: var(--ink); color: #fff; }
.rv__aucun { margin: 0; font-size: .9rem; color: var(--muted); }

/* Formulaire */
.rv__recap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  margin-bottom: 22px;
}
.rv__recap-ico { display: grid; place-items: center; opacity: .85; }
.rv__recap-t { flex: 1; font-weight: 600; font-size: .95rem; }
.rv__recap-t::first-letter { text-transform: uppercase; }
.rv__lien {
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.rv__lien:hover { background: rgba(255, 255, 255, .24); }

.rv__besoins {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rv__besoins legend {
  width: 100%;
  margin-bottom: 10px;
  font-size: .86rem;
  font-weight: 600;
  color: var(--ink);
}
.rv__choix { position: relative; cursor: pointer; }
.rv__choix input { position: absolute; opacity: 0; pointer-events: none; }
.rv__choix span {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: .88rem;
  font-weight: 550;
  color: var(--ink-2);
  transition: background var(--t), border-color var(--t), color var(--t);
}
.rv__choix:hover span { border-color: #cfc8bc; }
.rv__choix input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.rv__choix input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.rv__champs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.rv__champ { display: flex; flex-direction: column; gap: 6px; }
.rv__champ--large { grid-column: 1 / -1; }
.rv__champ span { font-size: .82rem; font-weight: 600; color: var(--ink); }
.rv__champ em { font-style: normal; font-weight: 500; color: var(--muted); }
.rv__champ input,
.rv__champ textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  padding: 11px 12px;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  transition: border-color var(--t), box-shadow var(--t);
}
.rv__champ textarea { resize: vertical; min-height: 84px; }
.rv__champ input:focus,
.rv__champ textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(33, 34, 36, .1);
}
.rv__champ input.is-faux { border-color: #b42318; box-shadow: 0 0 0 3px rgba(180, 35, 24, .1); }
.rv__piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.rv__err {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdf0ef;
  color: #b42318;
  font-size: .88rem;
  font-weight: 550;
}
.rv__ok { width: 100%; margin-top: 18px; }
.rv__ok[disabled] { opacity: .6; cursor: progress; }
.rv__legal { margin: 10px 0 0; font-size: .76rem; color: var(--muted); text-align: center; }
.rv__legal a { color: inherit; text-decoration: underline; }

/* Confirmation */
.rv__fin { text-align: center; padding-top: 40px; }
.rv__fin:focus { outline: none; }
.rv__fin-ico {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  margin-bottom: 18px;
  animation: rv-pop .45s cubic-bezier(.34, 1.56, .64, 1) both;
}
.rv__coche { stroke-dasharray: 24; stroke-dashoffset: 24; animation: rv-trait .4s .25s var(--ease) forwards; }
@keyframes rv-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rv-trait { to { stroke-dashoffset: 0; } }
.rv__fin-t { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.rv__fin-s { margin: 10px auto 0; max-width: 34ch; font-size: 1.02rem; line-height: 1.55; color: var(--ink-2); }
.rv__fin-s strong::first-letter { text-transform: uppercase; }
.rv__fin-m { margin: 12px auto 0; max-width: 36ch; font-size: .88rem; color: var(--muted); }
.rv__ics {
  margin-top: 22px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink);
}
.rv__ics:hover { border-color: var(--ink); }

/* ── Téléphone et tablette ────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .rv__card { grid-template-columns: 1fr; }
  .rv__cal { border-right: 0; border-bottom: 1px solid var(--border); }
  .rv__pan { min-height: 0; }
  .rv__vide { min-height: 180px; }
}
@media (max-width: 480px) {
  .rv__champs { grid-template-columns: 1fr; }
  .rv__sem, .rv__jours { gap: 4px; }
  .rv__j { border-radius: 10px; font-size: .92rem; }
  .rv__heures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .rv__etape, .rv__fin-ico, .rv__coche { animation: none; }
  .rv__coche { stroke-dashoffset: 0; }
  .rv__j.is-choisi, .rv__h:hover { transform: none; }
}
