/* ---------------------------------------------------
   Pages /rdv : réservation, annulation, administration
   Reprend les variables de style.css (navy, indigo, DM Serif Display, DM Sans)
--------------------------------------------------- */

.rdv-page {
  background: var(--mist);
}

.rdv {
  padding: 40px 0 72px;
}

.rdv section {
  padding: 0; /* style.css donne 110px aux <section> du site */
}

.rdv section.rdv-card {
  padding: 22px 18px;
}

.rdv button {
  font-family: inherit;
}

.rdv-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 16px;
}

.rdv-intro {
  text-align: center;
  margin-bottom: 28px;
}

.rdv-intro .eyebrow {
  margin-bottom: 12px;
}

.rdv-intro h1 {
  font-size: clamp(2.1rem, 7vw, 2.9rem);
  color: var(--navy-900);
}

.rdv-intro p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.02rem;
}

.rdv-card {
  background: var(--paper);
  border: 1px solid var(--mist-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
  margin-bottom: 18px;
  scroll-margin-top: 120px;
}

@media (min-width: 560px) {
  .rdv-card,
  .rdv section.rdv-card {
    padding: 28px;
  }
}

.rdv-step-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.45rem;
  color: var(--navy-900);
  margin-bottom: 18px;
}

.rdv-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy-700);
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
}

.rdv-hint,
.rdv-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.rdv-hint {
  margin: -8px 0 14px;
}

.rdv-note {
  margin-top: 14px;
}

.rdv-note a,
.rdv-link {
  color: var(--indigo);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rdv-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.rdv-link.on-dark {
  color: var(--indigo-light);
}

.rdv-loading {
  color: var(--muted);
  text-align: center;
  padding: 18px 0;
}

.rdv-unavailable {
  font-weight: 600;
  color: var(--navy-900);
}

/* ---------- Mois ---------- */

.rdv-month {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.rdv-month-label {
  font-weight: 600;
  color: var(--navy-900);
  font-size: 1.05rem;
}

.rdv-month-nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--mist-line);
  background: var(--paper);
  color: var(--navy-900);
  cursor: pointer;
}

.rdv-month-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.rdv-weekdays,
.rdv-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.rdv-weekdays span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted-light);
  text-transform: uppercase;
  padding-bottom: 6px;
}

.rdv-day {
  height: clamp(40px, 11vw, 52px);
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(99, 102, 241, 0.09);
  color: var(--indigo-dark);
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.rdv-day:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.18);
}

.rdv-day:disabled {
  background: transparent;
  color: var(--muted-light);
  font-weight: 400;
  cursor: default;
}

.rdv-day.is-selected {
  background: var(--indigo);
  color: #fff;
}

/* ---------- Horaires ---------- */

.rdv-times {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (min-width: 560px) {
  .rdv-times {
    grid-template-columns: repeat(4, 1fr);
  }
}

.rdv-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--mist-line);
  background: var(--paper);
  color: var(--navy-900);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.rdv-time:hover:not(:disabled) {
  border-color: var(--indigo);
  color: var(--indigo);
}

.rdv-time.is-selected {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}

.rdv-time small {
  font-size: 0.7rem;
  font-weight: 500;
  margin-top: 1px;
}

/* ---------- Formulaire ---------- */

.rdv-chosen {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--mist);
  color: var(--navy-900);
  font-weight: 600;
  margin-bottom: 18px;
}

.rdv-fields {
  display: grid;
  gap: 0 12px;
}

@media (min-width: 480px) {
  .rdv-fields {
    grid-template-columns: 1fr 1fr;
  }
}

.rdv-field {
  display: block;
  margin-bottom: 14px;
}

.rdv-field span {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 6px;
}

.rdv-field input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--mist-line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* 16 px : évite le zoom automatique de Safari sur iPhone */
}

.rdv-field input:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.rdv-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rdv-submit {
  width: 100%;
  justify-content: center;
  min-height: 52px;
  font-size: 1rem;
}

.rdv-submit:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.rdv-error {
  margin: 4px 0 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #fdecec;
  color: #a12626;
  font-size: 0.92rem;
  font-weight: 500;
}

.rdv-actions {
  margin-top: 18px;
}

/* ---------- Confirmation ---------- */

.rdv-done {
  text-align: center;
}

.rdv-done-icon {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  color: var(--indigo);
  margin-bottom: 14px;
}

.rdv-done h2 {
  font-size: 2rem;
  color: var(--navy-900);
  margin-bottom: 8px;
}

.rdv-done-when {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--indigo-dark);
  margin-bottom: 12px;
}

.rdv-header-simple .container {
  justify-content: center;
}

.rdv-page .site-footer {
  padding-top: 0;
}

/* ---------- Administration ---------- */

.rdv-admin .rdv {
  padding: max(20px, env(safe-area-inset-top)) 0 calc(40px + env(safe-area-inset-bottom));
}

.rdv-admin-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 4px 2px 16px;
}

.rdv-admin-top h1 {
  font-size: 2rem;
  color: var(--navy-900);
}

.rdv-banner p {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.rdv-banner .is-error {
  background: #fdecec;
  color: #a12626;
}

.rdv-banner .is-warn {
  background: #fff6e0;
  color: #7a5200;
}

.rdv-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  margin: 0 -18px 14px;
  padding: 2px 18px 6px;
  -webkit-overflow-scrolling: touch;
}

.rdv-chip {
  flex: none;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--mist-line);
  background: var(--paper);
  color: var(--navy-900);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}

.rdv-chip:active {
  background: var(--mist);
}

.rdv-chip-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
  padding: 8px 10px;
  border-radius: 14px;
  line-height: 1.15;
  scroll-snap-align: start;
}

.rdv-chip-day small {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
}

.rdv-chip-day strong {
  font-size: 1.15rem;
}

.rdv-chip-day.is-selected {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}

.rdv-chip-day.is-selected small {
  color: rgba(255, 255, 255, 0.8);
}

.rdv-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.rdv-quick .rdv-chip {
  padding: 10px 6px;
  border-color: var(--navy-700);
  color: var(--navy-700);
}

.rdv-admin-times .rdv-time.is-bloque {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: #fff;
}

.rdv-admin-times .rdv-time.is-occupe,
.rdv-admin-times .rdv-time.is-reserve {
  background: var(--mist);
  color: var(--muted);
}

.rdv-admin-times .rdv-time.is-reserve {
  color: var(--indigo-dark);
}

.rdv-admin-times .rdv-time.is-passe {
  opacity: 0.45;
}

.rdv-admin-times .rdv-time:disabled {
  cursor: default;
}

.rdv-period,
.rdv-setup {
  margin-top: 18px;
  border-top: 1px solid var(--mist-line);
  padding-top: 14px;
}

.rdv-period summary,
.rdv-setup summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy-900);
  min-height: 32px;
  margin-bottom: 10px;
}

.rdv-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rdv-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--mist-line);
  color: var(--navy-900);
  font-size: 0.95rem;
}

.rdv-list li:last-child {
  border-bottom: none;
}

.rdv-list small {
  color: var(--muted);
}

.rdv-remove {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--mist-line);
  background: var(--paper);
  color: #a12626;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.rdv-cals {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rdv-cal {
  padding: 10px 0;
  border-bottom: 1px solid var(--mist-line);
}

.rdv-cal:last-child {
  border-bottom: none;
}

.rdv-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--navy-900);
  font-weight: 600;
  cursor: pointer;
}

.rdv-check input {
  width: 22px;
  height: 22px;
  accent-color: var(--indigo);
  flex: none;
}

.rdv-check-sub {
  padding-left: 32px;
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--muted);
}

.rdv-check em {
  color: #a12626;
  font-style: normal;
  font-weight: 400;
}

.rdv-cal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.rdv-settings {
  display: grid;
  gap: 4px;
}

.rdv-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  border-bottom: 1px solid var(--mist-line);
  color: var(--navy-900);
  font-size: 0.95rem;
}

.rdv-setting:last-child {
  border-bottom: none;
}

.rdv-setting select {
  flex: none;
  min-height: 40px;
  max-width: 50%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--mist-line);
  background: var(--mist);
  color: var(--navy-900);
  font: inherit;
  font-size: 1rem; /* 16 px : pas de zoom automatique sur iPhone */
  font-weight: 600;
}

.rdv-settings-note {
  margin: 10px 0 0;
}

.rdv-admin-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.rdv-toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100% - 32px);
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--navy-900);
  color: #fff;
  font-size: 0.92rem;
  box-shadow: var(--shadow);
  z-index: 200;
}

.rdv-toast[hidden] {
  display: none;
}
