/* Rémy Kleit · fenêtre de réservation de rendez-vous.
   Feuille partagée : le site public et l'espace client affichent la même interface.
   Elle n'utilise que des variables de couleur définies des deux côtés.
   Ne pas y mettre autre chose que la fenêtre de réservation. */
/* --------------------------------------------------------------------------
   Réservation de rendez-vous · interface intégrée au site
   -------------------------------------------------------------------------- */

html.rdv-ouverte {
  overflow: hidden;
}

/* Le navigateur masque un élément porteur de l'attribut hidden par display:none, mais cette règle
   vient de sa feuille interne : la moindre déclaration display d'une feuille du site l'emporte.
   Sans ce qui suit, .rdv-modale { display: flex } rend la fenêtre visible en permanence. */
.rdv-voile[hidden],
.rdv-modale[hidden] {
  display: none;
}


.rdv-voile {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(14, 34, 51, 0.55);
}

.rdv-modale {
  position: fixed;
  z-index: 61;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(940px, calc(100vw - 40px));
  max-height: min(760px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 14px;
  border-top: 3px solid var(--accent);
  box-shadow: 0 30px 80px -30px rgba(14, 34, 51, 0.7);
  overflow: hidden;
  outline: none;
}

.rdv-modale-tete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 18px 26px;
  background: var(--dark);
  color: var(--dark-ink);
}

.rdv-etape {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c9a184;
  min-height: 1em;
}

.rdv-modale-tete h2 {
  margin: 6px 0 0;
  max-width: none;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  color: var(--dark-ink);
}

.rdv-fermer {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--dark-line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--dark-ink);
}

.rdv-fermer:hover {
  background: var(--dark-2);
}

.rdv-fermer:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--dark), 0 0 0 4px var(--accent);
}

.rdv-corps {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 26px 26px;
  overscroll-behavior: contain;
}

/* Étape 1 : calendrier et créneaux */

.rdv-etape1 {
  display: grid;
  gap: 24px;
}

@media (min-width: 760px) {
  .rdv-etape1 {
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 34px;
  }
}

.rdv-etape1.rdv-occupe {
  opacity: 0.5;
  pointer-events: none;
}

.rdv-mois {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.rdv-mois-nom {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}

.rdv-mois-nom::first-letter {
  text-transform: uppercase;
}

.rdv-mois-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
}

.rdv-mois-btn:hover:not(:disabled) {
  border-color: var(--ink);
}

.rdv-mois-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.rdv-jours-noms,
.rdv-grille {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.rdv-jours-noms {
  margin-bottom: 6px;
}

.rdv-jours-noms span {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.rdv-case,
.rdv-case-vide {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 500;
}

.rdv-case {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

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

.rdv-case-off {
  border-color: transparent;
  background: transparent;
  color: var(--ink-3);
  opacity: 0.45;
  cursor: default;
}

.rdv-case-on,
.rdv-case-on:hover {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--dark-ink);
}

.rdv-case:focus-visible,
.rdv-heure:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

.rdv-creneaux-titre {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}

.rdv-creneaux-titre::first-letter {
  text-transform: uppercase;
}

.rdv-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.rdv-heure {
  padding: 12px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.rdv-heure:hover {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--dark-ink);
}

.rdv-invite,
.rdv-chargement {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.rdv-note {
  margin: 18px 0 0;
  color: var(--ink-3);
  font-size: 0.85rem;
  line-height: 1.55;
}

.rdv-note a {
  border-bottom: 1px solid var(--accent);
  color: var(--ink-2);
}

.rdv-erreur {
  margin: 0 0 10px;
  padding: 14px 16px;
  border: 1px solid var(--warn);
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.93rem;
}

/* Étape 2 : formulaire */

.rdv-rappel {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

.rdv-rappel strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--ink);
}

.rdv-rappel strong::first-letter {
  text-transform: uppercase;
}

.rdv-rappel span {
  color: var(--ink-3);
  font-size: 0.88rem;
}

.rdv-retour {
  margin-left: auto;
  padding: 0 0 1px;
  border: 0;
  border-bottom: 1px solid var(--accent);
  background: none;
  color: var(--ink-2);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

.rdv-retour:hover {
  color: var(--ink);
}

.rdv-form {
  display: grid;
  gap: 16px;
}

.rdv-duo {
  display: grid;
  gap: 16px;
}

@media (min-width: 620px) {
  .rdv-duo {
    grid-template-columns: repeat(2, 1fr);
  }
}

.rdv-champ {
  display: grid;
  gap: 7px;
}

.rdv-champ label {
  /* L'espace client met tous les label en grille : on rétablit le flux normal ici,
     sans quoi la mention « (optionnel) » passe à la ligne. */
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.rdv-indice {
  font-weight: 400;
  color: var(--ink-3);
}

.rdv-champ input,
.rdv-champ textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.rdv-champ textarea {
  min-height: 110px;
  resize: vertical;
}

.rdv-champ input:focus,
.rdv-champ textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Piège à robots. « display: none » et non un décalage hors écran : un champ seulement déplacé
   reste rendu, et le remplissage automatique du navigateur le remplit comme les autres, ce qui
   ferait passer un visiteur réel pour un robot. */
.rdv-piege {
  display: none;
}

.rdv-etat {
  margin: 0;
  min-height: 1.3em;
  color: var(--warn);
  font-size: 0.9rem;
  font-weight: 500;
}

.rdv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Étape 3 : confirmation */

.rdv-confirme {
  text-align: center;
  padding: 10px 0 4px;
}

.rdv-coche {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 1.6rem;
}

.rdv-confirme h3 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.rdv-confirme-quand strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
}

.rdv-confirme-quand strong::first-letter {
  text-transform: uppercase;
}

.rdv-confirme-quoi {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.rdv-confirme .rdv-actions {
  justify-content: center;
  margin-top: 18px;
}

.rdv-confirme .rdv-retour {
  margin: 16px auto 0;
  display: inline-block;
}


/* Étape de choix du rendez-vous, quand la fenêtre est ouverte sans rendez-vous imposé */

.rdv-types {
  display: grid;
  gap: 10px;
  margin-bottom: 4px;
}

.rdv-type {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 16px 18px;
  text-align: left;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.rdv-type:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.rdv-type:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

.rdv-type-titre {
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--ink);
}

.rdv-type-duree {
  color: var(--ink-3);
  font-size: 0.86rem;
}

/* Téléphone : la fenêtre occupe l'écran */

@media (max-width: 759px) {
  .rdv-modale {
    top: 0;
    left: 0;
    transform: none;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .rdv-modale-tete {
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 14px 18px;
  }

  .rdv-corps {
    padding: 18px 16px calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .rdv-liste {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  }

  .rdv-rappel {
    flex-direction: column;
    align-items: flex-start;
  }

  .rdv-retour {
    margin-left: 0;
  }
}

/* TEST21 : questionnaire projet avant calendrier. */
.rdv-champ select{width:100%;padding:12px;border:1px solid #aeb8b3;background:#fff;color:#11171a;font:inherit;min-height:48px;box-sizing:border-box}.rdv-champ textarea{resize:vertical}.rdv-form>.btn{white-space:normal;max-width:100%}
