.rdv {
  --rdv-bg: #ffffff;
  --rdv-surface: #faf9f7;
  --rdv-border: #e4e0d9;
  --rdv-text: #2a2724;
  --rdv-muted: #7d7873;
  --rdv-accent: #5c6f5a;
  --rdv-accent-soft: #eef1ed;
  --rdv-accent-text: #ffffff;
  --rdv-error: #a4403a;
  --rdv-radius: 12px;

  max-width: 720px;
  margin: 0 auto;
  color: var(--rdv-text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
}

.rdv *,
.rdv *::before,
.rdv *::after {
  box-sizing: border-box;
}

.rdv h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.rdv__hint {
  margin: 0 0 24px;
  color: var(--rdv-muted);
  font-size: 14px;
}

.rdv__step[hidden] {
  display: none;
}

.rdv__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rdv-muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.rdv__back::before {
  content: '\2039';
  font-size: 18px;
  line-height: 1;
}

.rdv__back:hover {
  color: var(--rdv-text);
}

/* Etape 1, prestations */
.rdv__choices {
  display: grid;
  gap: 12px;
}

.rdv__choice {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--rdv-border);
  border-radius: var(--rdv-radius);
  background: var(--rdv-bg);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.rdv__choice:hover {
  border-color: var(--rdv-accent);
  background: var(--rdv-surface);
}

.rdv__choice-label {
  font-weight: 600;
}

.rdv__choice-meta {
  flex-shrink: 0;
  color: var(--rdv-muted);
  font-size: 14px;
}

/* Etape 2, calendrier */
.rdv__picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 32px;
  align-items: start;
}

.rdv__cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.rdv__cal-month {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  text-transform: capitalize;
}

.rdv__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--rdv-border);
  border-radius: 50%;
  background: var(--rdv-bg);
  color: var(--rdv-text);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.rdv__nav:hover:not(:disabled) {
  border-color: var(--rdv-accent);
  background: var(--rdv-surface);
}

.rdv__nav:disabled {
  opacity: 0.3;
  cursor: default;
}

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

.rdv__cal-weekdays {
  margin-bottom: 6px;
  color: var(--rdv-muted);
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rdv__cal-cell {
  aspect-ratio: 1;
}

/* Les jours disponibles : un rond cliquable */
.rdv__day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--rdv-accent-soft);
  color: var(--rdv-accent);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.1s;
}

.rdv__day:hover {
  background: color-mix(in srgb, var(--rdv-accent) 22%, transparent);
}

.rdv__day:active {
  transform: scale(0.94);
}

.rdv__day[aria-pressed='true'] {
  background: var(--rdv-accent);
  color: var(--rdv-accent-text);
}

/* Jours sans creneau ou hors periode */
.rdv__day--off {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--rdv-muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  opacity: 0.4;
}

.rdv__cal-status {
  margin: 16px 0 0;
  color: var(--rdv-muted);
  font-size: 13px;
  text-align: center;
}

.rdv__cal-status[hidden] {
  display: none;
}

/* Colonne des horaires */
.rdv__times-label {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  text-transform: capitalize;
}

.rdv__times-empty {
  margin: 0;
  color: var(--rdv-muted);
  font-size: 14px;
}

.rdv__times-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 318px;
  overflow-y: auto;
  padding-right: 4px;
}

.rdv__slot {
  padding: 11px 14px;
  border: 1px solid var(--rdv-border);
  border-radius: 8px;
  background: var(--rdv-bg);
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.rdv__slot:hover {
  border-color: var(--rdv-accent);
  background: var(--rdv-accent);
  color: var(--rdv-accent-text);
}

/* Etape 3, formulaire */
.rdv__recap {
  margin-bottom: 24px;
  padding: 16px 20px;
  border-radius: var(--rdv-radius);
  background: var(--rdv-surface);
  font-size: 15px;
}

.rdv__recap strong {
  display: block;
  font-weight: 600;
}

.rdv__recap span {
  color: var(--rdv-muted);
  font-size: 14px;
}

/* Les intitules sont dans les champs. Le label reste pour les lecteurs d'ecran. */
.rdv__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.rdv__field {
  margin-bottom: 12px;
}

/* Indicatif + numero dans un seul cadre */
.rdv__phone {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--rdv-border);
  border-radius: 8px;
  background: var(--rdv-bg);
  overflow: hidden;
}

.rdv__phone:focus-within {
  border-color: var(--rdv-accent);
  outline: 2px solid color-mix(in srgb, var(--rdv-accent) 25%, transparent);
  outline-offset: 1px;
}

.rdv__phone select {
  flex: 0 0 auto;
  width: 108px;
  padding: 13px 4px 13px 12px;
  border: 0;
  border-right: 1px solid var(--rdv-border);
  border-radius: 0;
  background: var(--rdv-surface);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.rdv__phone select:focus {
  outline: none;
}

.rdv__field .rdv__phone input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
}

.rdv__field .rdv__phone input:focus {
  outline: none;
}

.rdv__field input,
.rdv__field textarea {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--rdv-border);
  border-radius: 8px;
  background: var(--rdv-bg);
  color: inherit;
  font: inherit;
}

.rdv__field input::placeholder,
.rdv__field textarea::placeholder {
  color: var(--rdv-muted);
  opacity: 1;
}

.rdv__field input:focus,
.rdv__field textarea:focus {
  border-color: var(--rdv-accent);
  outline: 2px solid color-mix(in srgb, var(--rdv-accent) 25%, transparent);
  outline-offset: 1px;
}

.rdv__field textarea {
  min-height: 84px;
  resize: vertical;
}

.rdv__trap {
  position: absolute;
  left: -9999px;
}

.rdv__submit {
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--rdv-accent);
  color: var(--rdv-accent-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.rdv__submit:disabled {
  opacity: 0.55;
  cursor: progress;
}

.rdv__error {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--rdv-error) 8%, transparent);
  color: var(--rdv-error);
  font-size: 14px;
}

.rdv__error[hidden] {
  display: none;
}

/* Etape 4, confirmation */
.rdv__done {
  padding: 40px 24px;
  text-align: center;
}

.rdv__done-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--rdv-accent);
  color: var(--rdv-accent-text);
  font-size: 22px;
}

.rdv__done p {
  margin: 0 0 8px;
}

.rdv__done-when {
  font-size: 18px;
  font-weight: 600;
}

.rdv__ics {
  display: inline-block;
  margin-top: 20px;
  padding: 11px 20px;
  border: 1px solid var(--rdv-border);
  border-radius: 8px;
  color: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.rdv__ics:hover {
  border-color: var(--rdv-accent);
  background: var(--rdv-surface);
}

.rdv__ics[hidden] {
  display: none;
}

@media (max-width: 620px) {
  .rdv__picker {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .rdv__times-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .rdv__day,
  .rdv__day--off {
    font-size: 14px;
  }

  .rdv__phone select {
    width: 96px;
    padding-left: 8px;
  }
}
