/* ===========================================================================
 * Sherley Location — moteur de réservation (widget encarté page d'accueil)
 * Ce fichier NE définit PAS sa propre palette : il réutilise automatiquement
 * les variables --primary/--gold/--gold-light/--accent/--muted/--radius/
 * --shadow définies sur :root de la page d'accueil (via var(--x, repli)).
 * Le repli n'est utilisé que si le widget est chargé seul (ex: démo hors
 * page d'accueil) — sur la page d'accueil, la vraie valeur en cours prime
 * toujours automatiquement, sans jamais avoir à toucher ce fichier.
 * =========================================================================== */

#sherley-booking {
  --be-primary-light: #13284a; /* nuance interne, dérivée de --primary, pour un léger dégradé */
  --be-radius-sm: 10px;
  --be-ease: cubic-bezier(.2, .7, .3, 1);

  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text, #1c2433);
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow-lg, 0 14px 44px rgba(10, 24, 48, .16));
  border: 1px solid rgba(10, 24, 48, .06);
  overflow: hidden;
}
#sherley-booking, #sherley-booking * , #sherley-booking *::before, #sherley-booking *::after {
  box-sizing: border-box;
}
#sherley-booking .be-body { animation: be-fade-in .35s var(--be-ease); }
@keyframes be-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* -- fil d'étapes -- */
.be-steps {
  display: flex;
  background: linear-gradient(135deg, var(--primary, #0A1830) 0%, var(--be-primary-light) 100%);
  color: #8fa0b8;
  font-size: .82rem;
  letter-spacing: .01em;
  overflow-x: auto;
}
.be-step {
  flex: 1 0 auto;
  text-align: center;
  padding: 14px 10px;
  position: relative;
  font-weight: 500;
  white-space: nowrap;
  transition: color .2s var(--be-ease);
}
.be-step.is-active { color: var(--gold-light, #E7C24A); font-weight: 700; }
.be-step.is-done { color: var(--gold, #C9A227); }
.be-step.is-active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px; border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--gold, #C9A227), var(--gold-light, #E7C24A));
}
@media (max-width: 480px) { .be-step { padding: 12px 8px; font-size: 12px; } }

.be-body { padding: 28px; }
@media (max-width: 560px) { .be-body { padding: 18px; } }

.be-h {
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--primary, #0A1830);
}
.be-h:not(:first-child) { margin-top: 26px; }

.be-loading { padding: 40px 0; text-align: center; color: var(--muted, #6b7280); }

/* -- champs -- */
.be-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .be-grid { grid-template-columns: 1fr; } }

.be-field { margin-bottom: 16px; }
.be-field label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted, #6b7280);
  margin-bottom: 7px;
}
.be-field input,
.be-field select {
  width: 100%;
  padding: 12px 13px;
  font: inherit;
  font-size: .95rem;
  color: var(--primary, #0A1830);
  background: #fff;
  border: 1.5px solid #dde5ec;
  border-radius: var(--be-radius-sm);
  transition: border-color .18s var(--be-ease), box-shadow .18s var(--be-ease);
}
.be-field input:hover,
.be-field select:hover { border-color: #c9d2de; }
.be-field input:focus,
.be-field select:focus {
  outline: none;
  border-color: var(--gold, #C9A227);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, .18);
}

.be-hint { font-size: .84rem; color: var(--muted, #6b7280); margin: 4px 0 16px; }

/* -- boutons (identiques à .btn / .btn-outline de la page d'accueil) -- */
.be-btn {
  display: inline-block;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font: 700 1rem 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.be-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.be-btn-primary {
  background: linear-gradient(135deg, var(--gold-light, #E7C24A), var(--gold, #C9A227));
  color: var(--primary, #0A1830);
  box-shadow: 0 3px 14px rgba(201, 162, 39, .35);
}
.be-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg, 0 14px 44px rgba(10, 24, 48, .16));
}
.be-btn-ghost {
  background: transparent;
  border: 2px solid var(--primary, #0A1830);
  color: var(--primary, #0A1830);
  padding: 10px 22px;
}
.be-btn-ghost:hover:not(:disabled) { background: var(--primary, #0A1830); color: #fff; }

.be-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* -- véhicule -- */
.be-vehicle-card {
  background: #fff;
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow, 0 4px 24px rgba(10, 24, 48, .08));
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.be-vehicle-card.is-selected {
  border: 2px solid var(--gold, #C9A227);
  background: rgba(201, 162, 39, .06);
}
.be-vehicle-card.is-blocked { opacity: .65; }
.be-vehicle-info { min-width: 0; }
.be-vehicle-name {
  font-weight: 700;
  color: var(--primary, #0A1830);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 1.02rem;
}
.be-vehicle-meta { font-size: .85rem; color: var(--muted, #6b7280); margin-top: 4px; }
.be-vehicle-unavailable { font-size: .84rem; color: var(--accent, #9B2C3B); font-weight: 600; margin-top: 8px; }
.be-vehicle-price { font-weight: 800; font-size: 1.15rem; color: var(--primary, #0A1830); white-space: nowrap; }

.be-badge {
  display: inline-block;
  background: var(--gold, #C9A227);
  color: var(--primary, #0A1830);
  font-size: .68rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* -- options -- */
.be-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e9edf2;
}
.be-extra-row:last-of-type { border-bottom: none; }
.be-extra-row label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .95rem; }
.be-extra-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--gold, #C9A227); }
.be-extra-price { font-weight: 700; color: var(--muted, #6b7280); white-space: nowrap; font-size: .88rem; }

/* -- récapitulatif -- */
.be-recap {
  background: var(--bg, #F7F4EE);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 18px 0;
}
.be-recap-row { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: .92rem; color: var(--primary, #0A1830); }
.be-recap-row.is-discount { color: #1E6B3C; font-weight: 600; }
.be-recap-row.is-total {
  font-size: 1.2rem;
  font-weight: 800;
  border-top: 1.5px dashed rgba(201, 162, 39, .4);
  margin-top: 8px;
  padding-top: 12px;
}

/* -- paiement -- */
.be-pay-methods { display: grid; gap: 12px; }
.be-pay-card {
  background: #fff;
  border: 1.5px solid #dde5ec;
  border-radius: 14px;
  padding: 15px 18px;
  cursor: pointer;
  transition: border-color .18s var(--be-ease), box-shadow .18s var(--be-ease), transform .18s var(--be-ease);
}
.be-pay-card:hover { border-color: var(--gold, #C9A227); transform: translateY(-1px); }
.be-pay-card.is-selected {
  border: 2px solid var(--gold, #C9A227);
  background: rgba(201, 162, 39, .06);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, .14);
}
.be-pay-title { font-weight: 700; color: var(--primary, #0A1830); }
.be-pay-desc { font-size: .85rem; color: var(--muted, #6b7280); margin-top: 4px; }
.be-pay-free { font-size: .78rem; color: #1E6B3C; font-weight: 600; margin-top: 6px; }

/* -- messages -- */
.be-error {
  background: #FBEAEA;
  color: var(--accent, #9B2C3B);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: .9rem;
  font-weight: 600;
  margin: 14px 0;
}
.be-notice {
  background: rgba(201, 162, 39, .1);
  border-left: 3px solid var(--gold, #C9A227);
  border-radius: 12px;
  padding: 15px 18px;
  font-size: .94rem;
  line-height: 1.6;
  margin: 14px 0;
  color: var(--text, #1c2433);
}
.be-trust {
  margin-top: 18px;
  font-size: .8rem;
  color: var(--muted, #6b7280);
  text-align: center;
  line-height: 1.6;
}

/* -- accessibilité -- */
.be-btn:focus-visible,
.be-vehicle-card:focus-visible,
.be-pay-card:focus-visible,
#sherley-booking a:focus-visible {
  outline: 3px solid rgba(201, 162, 39, .55);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  #sherley-booking * { animation: none !important; transition: none !important; }
  .be-btn-primary:hover, .be-pay-card:hover { transform: none; }
}
@media (max-width: 560px) {
  .be-actions { flex-direction: column; align-items: stretch; margin-bottom: 76px; }
  .be-actions .be-btn { width: 100%; text-align: center; }
}