/* Bloc reservation — modal déclenchée par le CTA "Réserver votre place" (hero + nav).
   Voir nafabeat-spec/algos/IHM/page_acceuil/IHM_PAGE_ACCUEIL_RESERVATION_algo.md.
   Rendu itéré et validé dans preview.html (skill /new-section §3) avant extraction. */

#reservation {
  /* Valeurs provisoires — pas encore des tokens tokens.css/design_system_*.dart.
     À formaliser via /design-token (encore à faire, voir Statut de l'algo). Base : la
     marine du hero, avec la nuance surface #2d2d4e déjà réelle côté Dart (accentLight)
     mais pas encore mirrorée dans tokens.css ici. */
  --_prov-marine-light: #2d2d4e;
  --_prov-border-strong: rgba(248,244,239,0.24);
  --_prov-input-bg: rgba(248,244,239,0.05);
  --_prov-input-bg-focus: rgba(248,244,239,0.09);
  --_prov-error: #D9524A;
  --_prov-error-bg: rgba(217,82,74,0.12);
}

#reservation .reservation-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(10,10,18,0.72); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 96px 20px 40px; overflow-y: auto;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
#reservation .reservation-overlay.reservation-open { opacity: 1; pointer-events: auto; }

#reservation .reservation-modal {
  width: 100%; max-width: 560px;
  background: var(--_prov-marine-light);
  border: 1px solid var(--_prov-border-strong);
  border-radius: 14px;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.6);
  padding: 32px 32px 28px;
  position: relative;
  transform: translateY(14px); opacity: 0;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), opacity 0.25s ease;
}
#reservation .reservation-overlay.reservation-open .reservation-modal { transform: translateY(0); opacity: 1; }

#reservation .reservation-close {
  position: absolute; top: 18px; right: 18px;
  width: 30px; height: 30px; border-radius: 6px;
  background: transparent; border: 1px solid var(--border-dark);
  color: var(--text-sec-dark); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
#reservation .reservation-close:hover { color: var(--gold-light); border-color: rgba(226,168,50,0.5); }

#reservation .reservation-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--gold-light); font-weight: 700; margin-bottom: 10px;
}
#reservation .reservation-eyebrow-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); animation: pulse 2s infinite; }

#reservation .reservation-title {
  font-family: var(--font-display); font-weight: 400; font-size: 27px;
  line-height: 1.2; margin-bottom: 8px; padding-right: 30px; color: var(--text-cream);
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}
#reservation .reservation-title-badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  color: var(--marine); background: var(--gold);
  border-radius: 20px; padding: 4px 11px; letter-spacing: 0.3px;
}
#reservation .reservation-sub { font-size: 13.5px; color: var(--text-sec-dark); line-height: 1.6; margin-bottom: 26px; }
#reservation .reservation-sub strong { color: var(--text-cream); font-weight: 600; }

#reservation fieldset { border: none; }
#reservation .reservation-section + .reservation-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border-dark); }
#reservation .reservation-section-label {
  font-size: 11px; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--text-tert); font-weight: 700; margin-bottom: 14px;
}
#reservation .reservation-row { display: flex; flex-direction: column; gap: 14px; }
#reservation .reservation-row-2col { flex-direction: row; gap: 12px; }
#reservation .reservation-row-2col > .reservation-field { flex: 1; min-width: 0; }

#reservation .reservation-field { display: flex; flex-direction: column; gap: 6px; position: relative; }
#reservation .reservation-field label { font-size: 12.5px; color: var(--text-sec-dark); font-weight: 500; }
#reservation .reservation-field-hint { color: var(--text-tert); font-weight: 400; }

#reservation .reservation-field input[type="text"],
#reservation .reservation-field input[type="email"],
#reservation .reservation-field input[type="tel"] {
  appearance: none; -webkit-appearance: none;
  background: var(--_prov-input-bg); border: 1px solid var(--border-dark);
  border-radius: 6px; padding: 11px 13px; font-size: 14px;
  color: var(--text-cream); font-family: var(--font-body);
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  width: 100%;
}
#reservation .reservation-field input::placeholder { color: var(--text-tert); }
#reservation .reservation-field input:focus {
  outline: none; border-color: var(--gold-light); background: var(--_prov-input-bg-focus);
  box-shadow: 0 0 0 3px rgba(226,168,50,0.14);
}
#reservation .reservation-field.reservation-invalid input {
  border-color: var(--_prov-error); background: var(--_prov-error-bg);
}
#reservation .reservation-field.reservation-valid input { border-color: rgba(226,168,50,0.45); }

#reservation .reservation-field-error { display: none; font-size: 12px; color: var(--_prov-error); }
#reservation .reservation-field.reservation-invalid .reservation-field-error { display: block; }

/* Dropdown personnalisé (composant réutilisable — Secteur avec icônes, Fonction sans) —
   un <select> natif ne peut pas être stylé dans son popup (rendu OS), donc composant
   maison pour un design cohérent avec le reste de la modal. */
#reservation .reservation-select-trigger {
  appearance: none; width: 100%; text-align: left;
  background: var(--_prov-input-bg); border: 1px solid var(--border-dark);
  border-radius: 6px; padding: 11px 13px; font-size: 14px; font-family: var(--font-body);
  color: var(--text-cream); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
#reservation .reservation-select-trigger-text.reservation-placeholder { color: var(--text-tert); }
#reservation .reservation-select-trigger:focus,
#reservation .reservation-select-trigger.reservation-select-open {
  outline: none; border-color: var(--gold-light); background: var(--_prov-input-bg-focus);
  box-shadow: 0 0 0 3px rgba(226,168,50,0.14);
}
#reservation .reservation-select-chevron { width: 14px; height: 14px; flex-shrink: 0; color: var(--text-tert); transition: transform 0.18s; }
#reservation .reservation-select-trigger.reservation-select-open .reservation-select-chevron { transform: rotate(180deg); }

#reservation .reservation-select-list {
  position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--_prov-marine-light); border: 1px solid var(--_prov-border-strong);
  border-radius: 10px; padding: 6px; list-style: none;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.55);
  max-height: 220px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--_prov-border-strong) transparent;
}
#reservation .reservation-select-list[hidden] { display: none; }
#reservation .reservation-select-list::-webkit-scrollbar { width: 6px; }
#reservation .reservation-select-list::-webkit-scrollbar-track { background: transparent; }
#reservation .reservation-select-list::-webkit-scrollbar-thumb { background: var(--_prov-border-strong); border-radius: 3px; }
#reservation .reservation-select-list::-webkit-scrollbar-thumb:hover { background: rgba(226,168,50,0.45); }
#reservation .reservation-select-option {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px;
  font-size: 13.5px; color: var(--text-sec-dark); cursor: pointer; outline: none;
}
#reservation .reservation-select-option-icon { display: inline-flex; flex-shrink: 0; width: 18px; height: 18px; }
#reservation .reservation-select-option-icon svg { width: 100%; height: 100%; stroke-width: 1.8; }
#reservation .reservation-select-option:hover,
#reservation .reservation-select-option:focus,
#reservation .reservation-select-option.reservation-select-option-active {
  background: rgba(226,168,50,0.12); color: var(--text-cream);
}
#reservation .reservation-select-option[aria-selected="true"] { color: var(--gold-light); font-weight: 600; }

#reservation .reservation-pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
#reservation .reservation-pill-group-grid4 { display: grid; grid-template-columns: repeat(2, 1fr); }
#reservation .reservation-pill {
  background: var(--_prov-input-bg); border: 1px solid var(--border-dark);
  border-radius: 16px; padding: 9px 15px; font-size: 12.5px; font-weight: 600;
  color: var(--text-sec-dark); cursor: pointer; text-align: center; white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
#reservation .reservation-pill:hover { border-color: rgba(226,168,50,0.4); color: var(--text-cream); }
#reservation .reservation-pill.reservation-pill-active {
  background: var(--_prov-input-bg-focus); border-color: var(--gold-light); color: var(--text-cream); font-weight: 700;
}
#reservation .reservation-field.reservation-invalid .reservation-pill { border-color: var(--_prov-error); }

#reservation .reservation-field-conditional {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.32s ease, opacity 0.25s ease, margin-top 0.32s ease;
}
#reservation .reservation-field-conditional.reservation-shown { max-height: 200px; opacity: 1; margin-top: 14px; }

#reservation .reservation-submit-row { margin-top: 28px; }
#reservation .reservation-btn-submit {
  width: 100%; background: var(--gold); color: var(--marine); border: none;
  border-radius: 4px; padding: 15px 20px; font-size: 14.5px; font-weight: 700;
  cursor: pointer; transition: background 0.2s, transform 0.1s, opacity 0.2s;
}
#reservation .reservation-btn-submit:hover { background: var(--gold-light); }
#reservation .reservation-btn-submit:active { transform: scale(0.985); }
#reservation .reservation-btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }
#reservation .reservation-btn-submit:disabled:hover { background: var(--gold); }

#reservation .reservation-footnote {
  text-align: center; font-size: 11.5px; color: var(--text-tert);
  margin-top: 14px; line-height: 1.6;
}

#reservation .reservation-shake { animation: reservation-shake 0.4s; }
@keyframes reservation-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

@media (max-width: 560px) {
  #reservation .reservation-overlay { padding: 76px 12px 24px; }
  #reservation .reservation-modal { padding: 26px 20px 22px; }
  #reservation .reservation-row-2col { flex-direction: column; }
  #reservation .reservation-pill-group-grid4 { grid-template-columns: 1fr 1fr; }
}
