/* La page de réservation : la mise en page d'un Calendly (volet de l'événement à gauche,
   calendrier puis heures à droite), aux couleurs et à la police Fydera. */

.sprite { position: absolute; }

.page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 16px;
}

.reservation {
  position: relative;
  width: 100%; max-width: 780px; min-height: 640px;
  display: grid; grid-template-columns: 320px 1fr;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--rayon-carte);
  box-shadow: var(--ombre);
  overflow: hidden;
}
.reservation.avec-heures { max-width: 1060px; }
.reservation[data-etape="coordonnees"], .reservation[data-etape="code"] { max-width: 1000px; }

/* Le ruban Fydera dans le coin, à la manière du badge d'un Calendly. */
.reservation::after {
  content: "FYDERA";
  position: absolute; top: 18px; right: -38px; width: 150px;
  transform: rotate(45deg);
  background: var(--navy); color: var(--sky);
  font-size: 10px; font-weight: 800; letter-spacing: .22em; text-align: center; line-height: 24px;
  pointer-events: none;
}

/* --- Le volet de l'événement ---------------------------------------------------------- */

.evenement { position: relative; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.evenement-logo { display: flex; justify-content: center; padding: 28px 24px; border-bottom: 1px solid var(--line); }
.evenement-logo img { height: 36px; width: auto; }
.evenement-corps { padding: 26px 28px 32px; }
.hote { margin: 0 0 4px; font-weight: 700; color: var(--muted); font-size: 15px; }
.evenement h1 { margin: 0 0 22px; font-size: 27px; line-height: 1.2; letter-spacing: -.02em; color: var(--navy); }
.details { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.details li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; color: var(--muted); font-size: 15px; line-height: 1.4; }
.details li .icone { margin-top: 0; color: var(--muted); }
.details li.choisi { color: var(--ink); }
.description { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.6; }

.retour {
  position: absolute; top: 24px; left: 24px; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; color: var(--blue-text);
  transition: background 150ms;
}
.retour:hover { background: var(--blue-tint); }

/* --- Les étapes ---------------------------------------------------------------------- */

.etape { display: none; padding: 28px 32px 32px; min-width: 0; }
.reservation[data-etape="date"] .etape-date,
.reservation[data-etape="coordonnees"] .etape-coordonnees,
.reservation[data-etape="code"] .etape-code { display: block; animation: entree 320ms var(--courbe); }
@keyframes entree { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.etape h2 { margin: 0 0 24px; font-size: 20px; letter-spacing: -.01em; color: var(--navy); }

/* --- Le calendrier ------------------------------------------------------------------- */

.choix { display: flex; gap: 28px; }
.calendrier { flex: 1; min-width: 0; max-width: 420px; }

.mois { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 20px; position: relative; }
.mois-nom { font-size: 16px; font-weight: 600; min-width: 150px; text-align: center; }
.mois-nom::first-letter, .heures h3::first-letter { text-transform: uppercase; }
.mois-nav { display: contents; }
.mois-nav button {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--blue-tint); color: var(--blue-text);
  display: grid; place-items: center; transition: background 150ms;
}
.mois-nav button:first-child { order: -1; }
.mois-nav button:hover { background: var(--blue-tint-2); }
.mois-nav button:disabled { background: transparent; color: var(--silver); cursor: default; }

.semaine, .jours { display: grid; grid-template-columns: repeat(7, 1fr); }
.semaine span { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; padding-bottom: 10px; }
.jours { row-gap: 6px; }
.jour {
  position: relative; justify-self: center;
  width: 46px; height: 46px; border-radius: 50%; border: 0; background: transparent;
  font-size: 15px; font-weight: 500; color: var(--muted); cursor: default;
}
.jour.libre { background: var(--blue-tint); color: var(--blue-text); font-weight: 800; cursor: pointer; transition: background 150ms; }
.jour.libre:hover { background: var(--blue-tint-2); }
.jour.libre:focus-visible { outline: 3px solid var(--sky); outline-offset: 1px; }
.jour.selectionne { background: var(--blue); color: #fff; }
.jour.selectionne:hover { background: var(--blue-hover); }
.jour.aujourdhui::after {
  content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: currentColor;
}
.jours.chargement { opacity: .45; }

.aucun { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.lien { border: 0; background: none; padding: 0; color: var(--blue-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.fuseau { margin-top: 28px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.fuseau strong { color: var(--navy); }
.fuseau > span { display: flex; align-items: center; gap: 8px; color: var(--ink); }

/* --- Les heures ---------------------------------------------------------------------- */

.heures { width: 220px; flex: none; display: flex; flex-direction: column; animation: entree 320ms var(--courbe); }
.heures h3 { margin: 6px 0 20px; font-size: 16px; font-weight: 600; line-height: 40px; }
.heures-liste { display: flex; flex-direction: column; gap: 10px; max-height: 470px; overflow-y: auto; padding-right: 4px; }
.heure { display: flex; gap: 8px; }
.heure button {
  flex: 1; height: 52px; border-radius: var(--rayon-champ); font-weight: 700; font-size: 16px;
  transition: all 200ms var(--courbe);
}
.heure .h {
  border: 1px solid rgba(22, 130, 243, .5); background: #fff; color: var(--blue-text);
}
.heure .h:hover { border: 2px solid var(--blue); }
.heure .suivant { display: none; border: 0; background: var(--blue); color: #fff; }
.heure .suivant:hover { background: var(--blue-hover); }
.heure.choisie .h { flex: .5; border-color: var(--navy); background: var(--navy); color: #fff; }
.heure.choisie .suivant { display: block; flex: .5; }

/* --- Les coordonnées ----------------------------------------------------------------- */

#formulaire { display: flex; flex-direction: column; gap: 18px; max-width: 520px; }
.mention { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* --- Le code ------------------------------------------------------------------------- */

.etape-code { max-width: 520px; }
.code-entete p { margin: -12px 0 24px; color: var(--muted); }
.code-entete strong { color: var(--ink); overflow-wrap: anywhere; }
.pastille { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--ice); color: var(--steel); margin-bottom: 18px; }
.pastille .icone { width: 26px; height: 26px; }
.pastille.succes { background: var(--succes-fond); color: var(--succes); }

#formulaire-code { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.code { display: flex; gap: 10px; }
.code input {
  width: 52px; height: 62px; text-align: center; font-size: 26px; font-weight: 800; color: var(--navy);
  border: 1px solid var(--line); border-radius: var(--rayon-champ); background: #fff;
  transition: border-color 150ms, box-shadow 150ms;
}
.code input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint-2); }
.code.faux input { border-color: var(--erreur); animation: secousse 300ms; }
@keyframes secousse { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.garde { margin: 0; font-size: 13px; color: var(--muted); }
.code-actions { margin: 0; display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.code-actions .lien:disabled { color: var(--muted); text-decoration: none; cursor: default; }

/* --- Confirmé ------------------------------------------------------------------------ */

.confirmation {
  width: 100%; max-width: 640px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--rayon-carte); box-shadow: var(--ombre);
  padding: 40px 40px 44px; display: flex; flex-direction: column; align-items: center; text-align: center;
  animation: entree 400ms var(--courbe);
}
.confirmation-logo { height: 34px; width: auto; margin-bottom: 30px; }
.confirmation h1 { margin: 0 0 6px; font-size: 26px; color: var(--navy); letter-spacing: -.02em; }
.confirmation > p { margin: 0 0 26px; color: var(--muted); }
.confirmation strong { color: var(--ink); }
.recap { width: 100%; text-align: left; border: 1px solid var(--line); border-radius: var(--rayon-champ); padding: 22px 24px 6px; margin-bottom: 20px; }
.recap h2 { margin: 0 0 16px; font-size: 18px; color: var(--navy); }
.recap .details li { color: var(--ink); }
.discret { font-size: 14px; color: var(--muted); margin: 0 0 22px; }

/* --- Sur un téléphone ---------------------------------------------------------------- */

@media (max-width: 900px) {
  .reservation.avec-heures .choix { flex-direction: column; }
  .reservation.avec-heures .heures { width: 100%; }
  .reservation.avec-heures .heures-liste { max-height: none; }
}

@media (max-width: 760px) {
  .page { padding: 0; align-items: stretch; }
  .reservation, .confirmation { border-radius: 0; border: 0; box-shadow: none; min-height: 100vh; }
  .reservation { grid-template-columns: 1fr; }
  .evenement { border-right: 0; border-bottom: 1px solid var(--line); }
  .evenement-logo { padding: 18px; }
  .evenement-corps { padding: 18px 20px 20px; }
  .evenement h1 { font-size: 22px; margin-bottom: 14px; }
  .description { display: none; }
  .details { margin: 0; gap: 10px; }
  .etape { padding: 22px 16px 32px; }
  .jour { width: 42px; height: 42px; }
  .choix { flex-direction: column; }
  .heures { width: 100%; }
  .heures-liste { max-height: none; }
  .retour { top: 14px; left: 14px; }
  .code input { width: 44px; height: 56px; }
  .confirmation { padding: 32px 20px; }
}
.message-date { margin: -8px 0 18px; }

/* --- L'annulation -------------------------------------------------------------------- */
.annuler-form { width: 100%; display: flex; flex-direction: column; gap: 14px; text-align: left; align-items: flex-start; }
.annuler-form .champ { width: 100%; }
