/* ==========================================================================
   Widget de réservation — reprise des valeurs de la maquette.
   Dépend des variables CSS déclarées par le thème (assets/css/site.css).
   ========================================================================== */

.resa { padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 40px); scroll-margin-top: 80px; }

.resa__carte {
  max-width: 68rem; margin: 0 auto;
  background: var(--paper);
  padding: clamp(32px, 5vw, 80px) clamp(20px, 4vw, 64px);
}

.resa__titre {
  margin: 0; text-align: center;
  font-size: clamp(28px, 3.6vw, 44px); line-height: 1.3;
}

.resa__chapo {
  margin: 28px auto 0; max-width: 52ch; text-align: center;
  font-size: 0.95rem; line-height: 1.6; color: var(--moyen);
}

.resa__alerte {
  margin: 0 0 28px; padding: 14px 18px;
  background: var(--sable); border-left: 3px solid var(--ink);
  font-size: 0.9rem; line-height: 1.6;
}

/* Le mode test doit sauter aux yeux : on encaisse zéro euro. */
.resa__alerte--test {
  background: #FCE8E6; border-left-color: #B3261E; color: #5F1512;
}

/* ---------- Champs ---------- */

.resa__champs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px 48px; margin-top: clamp(36px, 4vw, 56px);
}

.resa__label { display: block; }
.resa__label--pleine { grid-column: 1 / -1; }
.resa__label > span { font-size: 0.9rem; color: var(--doux); }

.resa__label input,
.resa__label textarea {
  margin-top: 10px; width: 100%; box-sizing: border-box;
  border: none; border-bottom: 1px solid var(--trait-champ);
  background: transparent; padding: 10px 0;
  font-size: 1rem; line-height: 1.6; color: inherit; outline: none;
}
.resa__label textarea { resize: vertical; }
.resa__label input:focus,
.resa__label textarea:focus { border-bottom-color: var(--ink); }

/* Champ invalide : signalé au retour du serveur uniquement. */
.resa__label input[aria-invalid="true"] { border-bottom-color: #B3261E; }

/* Pot de miel : hors écran plutôt que display:none, que certains robots détectent. */
.resa__miel {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

/* ---------- Groupes de choix ---------- */

.resa__legende { margin: clamp(36px, 4vw, 52px) 0 16px; font-size: 0.9rem; color: var(--doux); }

.resa__especes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
}

.espece {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer; text-align: left;
  background: transparent; border: 1px solid var(--trait);
  color: inherit; font-size: 1rem;
}
.espece[aria-checked="true"] { background: var(--bleu); border-color: var(--ink); }
.espece img { height: 34px; width: auto; display: block; flex: none; }
.espece__texte { display: flex; flex-direction: column; gap: 3px; }
.espece__detail { font-size: 0.8rem; color: var(--doux); }

.resa__nacs, .resa__types, .resa__paiements {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.resa__nacs { margin-top: 14px; }

.jeton {
  padding: 12px 18px; cursor: pointer; font-size: 0.9rem;
  background: transparent; color: var(--ink); border: 1px solid var(--trait);
}
.jeton[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Calendrier ---------- */

.resa__semaine-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 18px;
}
.resa__semaine-nav button {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; font-size: 1.3rem;
  cursor: pointer; color: inherit;
}
.resa__semaine-nav button[disabled] { opacity: 0.3; cursor: default; }
.resa__semaine-nav span { font-size: 1rem; }

.resa__semaine {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px; margin-top: 10px; min-height: 92px;
}

.jour { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.jour__nom { font-size: 0.85rem; color: var(--doux); }
.jour__btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; border: none; background: transparent;
  color: var(--ink); cursor: pointer;
}
.jour__btn[disabled] { color: #C4C0BB; cursor: default; }
.jour__btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.jour__point { width: 4px; height: 4px; border-radius: 999px; background: transparent; }
.jour--libre .jour__point { background: rgba(27, 26, 25, 0.55); }
.jour__btn[aria-pressed="true"] ~ .jour__point { background: transparent; }

.resa__fuseau { margin: 16px 0 0; font-size: 0.85rem; line-height: 1.6; color: var(--doux); }

/* ---------- Créneaux ---------- */

.resa__creneaux-zone { margin-top: 26px; min-height: 1px; }
.resa__jour-label { margin: 0 0 12px; font-size: 0.9rem; }

.resa__creneaux {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px;
}
.creneau {
  padding: 14px 12px; cursor: pointer; font-size: 0.95rem;
  background: transparent; color: var(--ink);
  border: 1px solid rgba(27, 26, 25, 0.35);
}
.creneau[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.resa__plus {
  margin-top: 16px; padding: 0; background: transparent;
  border: none; border-bottom: 1px solid var(--ink);
  font-size: 0.9rem; cursor: pointer; color: inherit;
}

.resa__vide, .resa__chargement {
  margin: 0; font-size: 0.9rem; color: var(--doux);
}

/* ---------- Récapitulatif et validation ---------- */

.resa__recap {
  margin: clamp(36px, 4vw, 52px) 0 0; text-align: center;
  font-size: 0.95rem; line-height: 1.7;
}
.resa__recap--doux { margin-top: 6px; font-size: 0.9rem; color: var(--doux); }

.resa__erreur {
  margin: 20px auto 0; max-width: 46ch; text-align: center;
  padding: 12px 16px; background: #FCE8E6; border-left: 3px solid #B3261E;
  font-size: 0.9rem; line-height: 1.6; color: #5F1512;
}

.resa__valider { display: flex; justify-content: center; margin-top: 24px; }

.resa__payer {
  width: 28rem; max-width: 100%;
  padding: 16px 24px; font-size: 0.95rem;
  border: none; background: var(--ink); color: var(--paper); cursor: pointer;
}
.resa__payer[disabled] { background: rgba(27, 26, 25, 0.35); cursor: default; }
.resa__payer[aria-busy="true"] { opacity: 0.7; cursor: progress; }

.resa__note {
  margin: 16px auto 0; max-width: 46ch; text-align: center;
  font-size: 0.85rem; line-height: 1.6; color: var(--clair);
}
.resa__note a { border-bottom: 1px solid var(--trait-fort); }

/* ---------- Écran de confirmation ---------- */

.resa__fin { text-align: center; padding: clamp(20px, 4vw, 48px) 0; }
.resa__fin h2 { margin: 0; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.2; }
.resa__fin p { margin: 28px auto 0; max-width: 42ch; font-size: 0.95rem; line-height: 1.7; }

/* ---------- Étroit ---------- */

@media (max-width: 520px) {
  .resa__semaine { gap: 2px; }
  .jour__btn { width: 34px; height: 34px; font-size: 0.85rem; }
  .jour__nom { font-size: 0.72rem; }
}
