/* ============================================================
   Prise de rendez-vous — rdv.html (calendrier maison, remplace Calendly)
   S'appuie uniquement sur les variables de css/style.css (charte SOTELI :
   bleu nuit --navy, or --gold, Playfair Display / Lato).
   ============================================================ */

/* ======================== EN-TÊTE DE PAGE ======================== */

/* Fond bleu nuit, comme les sections sombres du site : l'en-tête fixe du site,
   prévu pour un fond sombre, reste lisible au-dessus */
.rdv-entete {
  padding: 9rem 0 3.5rem;
  background: var(--navy);
  color: var(--white);
}

.rdv-entete h1 {
  color: var(--white);
  margin: 0.5rem 0 1rem;
}

.rdv-intro {
  max-width: 44rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ======================== PARCOURS ======================== */

.rdv-parcours {
  padding: 3rem 0 5rem;
  background: var(--off-white);
}

.rdv-conteneur {
  max-width: 52rem;
}

/* Carte blanche portant chaque étape */
.rdv-carte {
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}

/* ======================== MESSAGES ======================== */

.rdv-message {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--gold);
  background: var(--white);
  color: var(--navy);
  line-height: 1.6;
}

.rdv-message a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
}

/* Erreur : même rouge que le formulaire de contact du site */
.rdv-message--erreur {
  border-left-color: #EF4444;
}

/* ======================== ÉTAPE 1 : SEMAINE, JOURS, HEURES ======================== */

.rdv-semaine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.rdv-semaine-titre {
  margin: 0;
  font-size: 1.25rem;
  text-align: center;
}

.rdv-fleche {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.rdv-fleche:hover:not(:disabled) {
  border-color: var(--gold);
}

.rdv-fleche:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Cinq jours ouvrés côte à côte, même sur mobile */
.rdv-jours {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.rdv-jour {
  padding: 0.75rem 0.25rem;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  text-transform: capitalize;
  cursor: pointer;
  transition: var(--transition);
}

.rdv-jour:hover:not(:disabled) {
  border-color: var(--gold);
}

/* Jour choisi */
.rdv-jour[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* Jour sans Créneau libre */
.rdv-jour:disabled {
  opacity: 0.35;
  cursor: default;
}

.rdv-jour-titre {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.05rem;
}

/* Majuscule à la première lettre seulement : « Mercredi 16 septembre », jamais
   « Mercredi 16 Septembre » (capitalize met une majuscule à chaque mot) */
.rdv-jour-titre::first-letter {
  text-transform: uppercase;
}

.rdv-heures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.5rem;
}

.rdv-heure {
  padding: 0.7rem 0.5rem;
  border: 1px solid var(--gold);
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-sans);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.rdv-heure:hover,
.rdv-heure:focus-visible {
  background: var(--gold);
}

/* ======================== ÉTAPE 2 : COORDONNÉES ======================== */

.rdv-rappel {
  margin: 0 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

/* Bouton présenté comme un lien (changer de créneau) */
.rdv-lien {
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.rdv-champs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.rdv-champ {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rdv-champ-large {
  grid-column: 1 / -1;
}

.rdv-champ label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}

.rdv-champ input,
.rdv-champ textarea {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 1rem;
}

.rdv-champ input:focus,
.rdv-champ textarea:focus {
  outline: none;
  border-color: var(--gold);
}

/* Champ refusé par le contrôle de la page */
.rdv-champ [aria-invalid="true"] {
  border-color: #EF4444;
}

.rdv-turnstile {
  margin-bottom: 1.25rem;
  min-height: 65px;
}

.rdv-mention {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--grey-dark);
}

.rdv-mention a {
  color: var(--navy);
}

/* ======================== ÉTAPE 3 : CONFIRMATION ======================== */

.rdv-confirmation {
  border-top: 4px solid var(--gold);
}

.rdv-confirmation h2 {
  margin-top: 0;
}

.rdv-confirmation-date {
  font-size: 1.15rem;
  font-weight: 700;
}

.rdv-confirmation a {
  color: var(--navy);
  font-weight: 700;
  word-break: break-all;
}

/* ======================== MOBILE ======================== */

@media (max-width: 640px) {
  .rdv-carte {
    padding: 1.25rem;
  }

  .rdv-champs {
    grid-template-columns: 1fr;
  }

  .rdv-jour {
    font-size: 0.8rem;
  }
}
