/* MY FLY AIRPORT — Réservation en 3 étapes (Trajet / Coordonnées / Paiement)
   Réutilise les tokens et composants existants (boutons, champs, panel).
   N'affecte pas le design des autres pages. */

/* ====== Indicateur d'étapes ====== */

.booking-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}
.booking-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.booking-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: all var(--dur-fast) var(--ease-standard);
}
.booking-step-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color var(--dur-fast) var(--ease-standard);
}
.booking-step-connector {
  width: 28px;
  height: 1px;
  background: var(--color-border-strong);
}
.booking-step-item.is-active .booking-step-num,
.booking-step-item.is-done .booking-step-num {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--p-white);
}
.booking-step-item.is-active .booking-step-label,
.booking-step-item.is-done .booking-step-label {
  color: var(--color-heading);
}

/* ====== Panneaux d'étape ====== */

.booking-step-panel { display: none; }
.booking-step-panel.is-active { display: block; }

.booking-step-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-areas:
    "fields recap"
    "actions recap";
  gap: var(--space-xl);
  align-items: start;
}
.booking-step-fields { grid-area: fields; display: flex; flex-direction: column; gap: var(--space-md); }
.booking-step-actions { grid-area: actions; display: flex; gap: var(--space-md); }
.booking-step-actions .btn { flex: 1; }

/* Le panneau reste une carte étroite (430px) à l'étape 1 (design existant, inchangé).
   Aux étapes 2/3, il s'élargit pour laisser la place à la colonne récap sur desktop. */
@media (min-width: 1024px) {
  .booking-panel-wrap.booking-panel-wrap--with-recap { max-width: 800px; }
  .booking-panel.booking-panel--with-recap { max-width: 760px; }
}

/* ====== Champs : textarea + erreurs de validation ====== */

.field textarea {
  width: 100%;
  min-height: 84px;
  padding: var(--space-md);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: var(--field-radius);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--color-text);
  resize: vertical;
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.field textarea::placeholder { color: var(--color-text-faint); }
.field textarea:focus {
  outline: none;
  border-color: var(--field-border-focus);
  box-shadow: 0 0 0 3px var(--color-accent-tint-strong);
}

.field-error {
  font-size: 0.8125rem;
  color: var(--color-error);
  margin-top: 4px;
  display: none;
}
.field.has-error input,
.field.has-error textarea {
  border-color: var(--color-error);
}
.field.has-error .field-error { display: block; }

/* Case à cocher CGV */
.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.consent-field input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-text);
}
.consent-field label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.consent-field label a { color: var(--color-text); text-decoration: underline; }

/* ====== Récapitulatif (étapes 2 et 3) ====== */

.booking-recap {
  grid-area: recap;
  background: var(--color-bg-alt);
  border-radius: var(--radius-field);
  padding: var(--space-lg);
  align-self: start;
}
.booking-recap h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}
.booking-recap-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: 7px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}
.booking-recap-row:last-child { border-bottom: none; }
.booking-recap-row span { color: var(--color-text-muted); }
.booking-recap-row strong { color: var(--color-heading); text-align: right; font-weight: 600; }
.booking-recap-total {
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-strong);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.booking-recap-total span { font-size: 0.875rem; color: var(--color-text-muted); }
.booking-recap-total strong { font-family: var(--font-display); font-size: 1.375rem; font-weight: 500; color: var(--color-heading); }

/* ====== Étape 3 : choix du moyen de paiement ====== */

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.payment-method-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.payment-method-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-raised); }
.payment-method-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.payment-method-btn.stripe {
  background: var(--color-text);
  color: var(--p-white);
}
.payment-method-btn.paypal {
  background: #FFC439;
  color: #111;
}

#paypal-button-container { min-height: 56px; }

.payment-error,
.step-error {
  font-size: 0.875rem;
  color: var(--color-error);
  background: rgba(179, 57, 44, 0.08);
  border: 1px solid rgba(179, 57, 44, 0.2);
  border-radius: var(--radius-control);
  padding: var(--space-sm) var(--space-md);
  display: none;
}
.payment-error.is-visible,
.step-error.is-visible { display: block; }

/* ====== Pages confirmation.php / paiement-annule.php ====== */

.status-page-body {
  background: var(--color-bg-alt);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-2xl) var(--space-md);
}
.status-page {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.status-page-brand { margin-bottom: var(--space-xl); }
.status-page-brand img { height: 36px; width: auto; }

.status-card {
  width: 100%;
  background: var(--p-white);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  padding: var(--space-2xl);
  text-align: center;
}
.status-card h1 { font-size: 1.5rem; font-weight: 500; margin-bottom: var(--space-sm); }
.status-card p { color: var(--color-text-muted); margin-bottom: var(--space-lg); }
.status-card .btn { margin-top: var(--space-sm); }

.status-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent-tint);
  color: var(--color-accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
}
.status-icon .icon { width: 28px; height: 28px; }

.status-reference {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--color-accent-strong);
  margin-top: -8px;
}

.status-recap {
  text-align: left;
  background: var(--color-bg-alt);
  border-radius: var(--radius-field);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}
.status-recap-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: 6px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--color-border);
}
.status-recap-row:last-child { border-bottom: none; }
.status-recap-row span { color: var(--color-text-muted); }
.status-recap-row strong { text-align: right; }

.status-note { font-size: 0.875rem; }

.status-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--color-border-strong);
  border-top-color: var(--color-accent);
  margin: 0 auto var(--space-lg);
  animation: mfa-spin 0.8s linear infinite;
}
@keyframes mfa-spin { to { transform: rotate(360deg); } }

.status-actions { display: flex; flex-direction: column; gap: var(--space-md); }

/* ====== Responsive ====== */

@media (max-width: 1023px) {
  .booking-step-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "fields" "recap" "actions";
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-spinner { animation: none; }
}
