/* ============ Popup « Réserver un appel » ============ */
.rdv {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 10, 12, .38); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .35s var(--ease);
}
.rdv[hidden] { display: none; }
.rdv.open { opacity: 1; }
.rdv-sheet {
  position: relative; width: 100%; max-width: 520px; max-height: min(720px, calc(100svh - 32px));
  display: flex; flex-direction: column;
  background: #fff; border-radius: 28px; overflow: hidden;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.04);
  transform: translateY(24px) scale(.98); transition: transform .5s var(--ease);
}
.rdv.open .rdv-sheet { transform: none; }

.rdv-top { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; }
.rdv-back, .rdv-close {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--bg); color: var(--ink);
  transition: background .2s, opacity .2s;
}
.rdv-back:hover, .rdv-close:hover { background: #e8e8ed; }
.rdv-back svg, .rdv-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rdv-back[disabled] { opacity: 0; pointer-events: none; }
.rdv-progress { flex: 1; height: 4px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.rdv-progress i { display: block; height: 100%; width: var(--p, 0%); background: var(--ink); border-radius: inherit; transition: width .5s var(--ease); }

.rdv-body { position: relative; padding: 26px 28px 28px; overflow-y: auto; overscroll-behavior: contain; }
.rdv-step { display: none; animation: rdv-in .45s var(--ease) both; }
.rdv-step.on { display: block; }
.rdv-step.back { animation-name: rdv-in-back; }
@keyframes rdv-in { from { opacity: 0; transform: translateX(18px); } }
@keyframes rdv-in-back { from { opacity: 0; transform: translateX(-18px); } }

.rdv-kicker { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.rdv h3 { font-size: clamp(22px, 4.6vw, 28px); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; margin-bottom: 20px; }
.rdv-lead { color: var(--ink-2); font-size: 15px; margin: -10px 0 20px; }

.rdv-choices { display: grid; gap: 10px; }
.rdv-choice {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: #fff;
  font: inherit; font-size: 15px; font-weight: 500; color: var(--ink);
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.rdv-choice:hover { border-color: rgba(0,0,0,.25); transform: translateY(-1px); }
.rdv-choice:active { transform: scale(.99); }
.rdv-choice[aria-pressed="true"] { border-color: var(--ink); background: var(--bg); }
.rdv-choice .ic { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; }
.rdv-choice[aria-pressed="true"] .ic { background: var(--ink); color: #fff; }
.rdv-choice .ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rdv-choices.grid2 { grid-template-columns: 1fr 1fr; }
.rdv-choices.grid2 .rdv-choice { justify-content: center; text-align: center; padding: 18px 12px; }

.rdv-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rdv-fields .full { grid-column: 1 / -1; }
.rdv-field label { display: block; font-size: 12px; font-weight: 500; color: var(--ink-2); margin: 0 0 6px 4px; }
.rdv-field input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--bg); font: inherit; font-size: 16px; color: var(--ink); outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.rdv-field input:focus { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(0,0,0,.05); }
.rdv-field input[aria-invalid="true"] { border-color: #d70015; }
.rdv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.rdv-legal { font-size: 12px; color: var(--ink-3); margin-top: 14px; }

.rdv-next {
  width: 100%; margin-top: 22px; height: 52px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: #fff; font: inherit; font-size: 16px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .2s, transform .2s var(--ease), opacity .2s;
}
.rdv-next:hover { background: #000; }
.rdv-next:active { transform: scale(.98); }
.rdv-next[disabled] { opacity: .35; cursor: default; }
.rdv-next.busy { pointer-events: none; }
.rdv-next.busy::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: rdv-spin .8s linear infinite;
}
@keyframes rdv-spin { to { transform: rotate(360deg); } }

/* Créneaux */
.rdv-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 8px; scrollbar-width: none; }
.rdv-days::-webkit-scrollbar { display: none; }
.rdv-day {
  flex: none; width: 66px; padding: 10px 0; border-radius: 16px; cursor: pointer; text-align: center;
  border: 1px solid var(--line); background: #fff; font: inherit; color: var(--ink);
  transition: border-color .2s, background .2s, color .2s;
}
.rdv-day small { display: block; font-size: 11px; color: var(--ink-2); text-transform: capitalize; }
.rdv-day b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.rdv-day span { display: block; font-size: 11px; color: var(--ink-3); text-transform: capitalize; }
.rdv-day[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rdv-day[aria-pressed="true"] small, .rdv-day[aria-pressed="true"] span { color: rgba(255,255,255,.7); }
.rdv-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; min-height: 104px; }
.rdv-slot {
  height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums;
  transition: border-color .2s, background .2s, color .2s;
}
.rdv-slot:hover { border-color: rgba(0,0,0,.3); }
.rdv-slot[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.rdv-tz { font-size: 12px; color: var(--ink-3); margin-top: 12px; }
.rdv-msg { font-size: 14px; color: var(--ink-2); padding: 18px 0; text-align: center; }
.rdv-msg.err { color: #d70015; }
.rdv-skel { height: 46px; border-radius: 12px; background: linear-gradient(90deg, var(--bg) 0%, #ececf0 50%, var(--bg) 100%) 0 0 / 200% 100%; animation: rdv-skel 1.2s linear infinite; }
@keyframes rdv-skel { to { background-position: -200% 0; } }

/* Confirmation */
.rdv-done { text-align: center; padding: 10px 0 4px; }
.rdv-check {
  width: 68px; height: 68px; margin: 4px auto 20px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; animation: rdv-pop .6s var(--ease) both;
}
.rdv-check svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: rdv-draw .5s .25s var(--ease) forwards; }
@keyframes rdv-pop { from { transform: scale(.4); opacity: 0; } }
@keyframes rdv-draw { to { stroke-dashoffset: 0; } }
.rdv-done h3 { margin-bottom: 10px; }
.rdv-done p { color: var(--ink-2); font-size: 15px; }
.rdv-when { display: inline-block; margin: 16px 0 6px; padding: 10px 16px; border-radius: 14px; background: var(--bg); font-weight: 600; font-size: 15px; }

@media (max-width: 640px) {
  .rdv { place-items: end center; padding: 0; }
  .rdv-sheet { max-width: none; border-radius: 26px 26px 0 0; max-height: calc(100svh - 24px); transform: translateY(40px); }
  .rdv-body { padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); }
  .rdv-fields { grid-template-columns: 1fr; }
  .rdv-slots { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .rdv, .rdv-sheet, .rdv-step { transition: none; animation: none; }
}
body.rdv-lock { overflow: hidden; }
