/* ============================================================
   LEU VTC – Module Réservation
   Design : dark #1a1a1a + or #C8A951 + blanc
   ============================================================ */

:root {
  --dark:   #1a1a1a;
  --dark2:  #111111;
  --dark3:  #242424;
  --gold:   #C8A951;
  --gold2:  #a8892f;
  --white:  #ffffff;
  --gray:   #f5f5f5;
  --gray2:  #e0e0e0;
  --text:   #333333;
  --text2:  #666666;
  --green:  #4CAF50;
  --red:    #f44336;
  --blue:   #2196F3;
  --B: 'Barlow Condensed', sans-serif;
  --L: 'Lato', sans-serif;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --radius: 6px;
  --tr: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--L); color: var(--text); background: var(--gray); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* ── HEADER ── */
.resa-header {
  background: var(--dark);
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.resa-header img { height: 50px; }
.resa-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.88rem;
  color: rgba(255,255,255,.65);
}
.resa-header-right a { color: var(--gold); font-weight: 700; }
.resa-header-right i { margin-right: 6px; }

/* ── STEPPER ── */
.stepper-wrap {
  background: var(--dark2);
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.stepper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.step::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,.15);
  z-index: 0;
}
.step:last-child::after { display: none; }
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.4);
  font-family: var(--B);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  transition: all var(--tr);
}
.step.active .step-num {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
}
.step.done .step-num {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.step.done::after { background: var(--gold); }
.step-label {
  font-family: var(--B);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,.3);
  transition: color var(--tr);
  white-space: nowrap;
}
.step.active .step-label { color: var(--gold); }
.step.done .step-label { color: rgba(255,255,255,.6); }

/* ── MAIN LAYOUT ── */
.resa-body {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

/* ── CARDS ── */
.resa-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.resa-card-header {
  background: var(--dark);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.resa-card-header i { color: var(--gold); font-size: 1.1rem; }
.resa-card-header h2 {
  font-family: var(--B);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--white);
}
.resa-card-body { padding: 28px 24px; }

/* ── ÉTAPES (panels) ── */
.step-panel { display: none; }
.step-panel.active { display: block; }

/* ── STEP 1 : VÉHICULE ── */
.vehicule-grid { display: grid; gap: 16px; }
.vehicule-card {
  border: 2px solid var(--gray2);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all var(--tr);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: center;
}
.vehicule-card:hover { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.vehicule-card.selected { border-color: var(--gold); background: #fffdf0; box-shadow: 0 0 0 2px var(--gold); }
.vehicule-card img { width: 100%; object-fit: contain; border-radius: 4px; background: #f9f9f9; padding: 8px; }
.vehicule-nom { font-family: var(--B); font-size: 1.1rem; font-weight: 800; text-transform: uppercase; margin-bottom: 6px; }
.vehicule-specs { display: flex; gap: 16px; font-size: 0.82rem; color: var(--text2); margin-bottom: 10px; }
.vehicule-specs span { display: flex; align-items: center; gap: 5px; }
.vehicule-specs i { color: var(--gold); }
.vehicule-equip { display: flex; flex-wrap: wrap; gap: 6px; }
.equip-tag {
  font-size: 0.72rem; padding: 3px 9px;
  background: var(--gray); border-radius: 20px;
  color: var(--text2); font-weight: 600;
}
.vehicule-prix {
  font-family: var(--B); font-size: 0.85rem;
  color: var(--gold); font-weight: 700;
  margin-top: 8px;
}
.vehicule-radio { display: none; }
.selected-check {
  display: none;
  width: 28px; height: 28px;
  background: var(--gold);
  border-radius: 50%;
  align-items: center; justify-content: center;
  color: var(--dark); font-size: 0.85rem;
  flex-shrink: 0;
}
.vehicule-card.selected .selected-check { display: flex; }

/* ── STEP 2 : TRAJET ── */
.trajet-type-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 28px; }
.trajet-type-btn {
  border: 2px solid var(--gray2);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--tr);
  background: var(--white);
}
.trajet-type-btn:hover { border-color: var(--gold); }
.trajet-type-btn.selected { border-color: var(--gold); background: #fffdf0; }
.trajet-type-btn i { font-size: 1.6rem; color: var(--gold); margin-bottom: 8px; display: block; }
.trajet-type-btn span { font-family: var(--B); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.trajet-type-btn small { font-size: 0.72rem; color: var(--text2); margin-top: 4px; display: block; }

/* Champs adresse */
.addr-group { position: relative; margin-bottom: 20px; }
.addr-group label {
  font-family: var(--B); font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text2); display: block; margin-bottom: 7px;
}
.addr-group label span { color: var(--red); }
.addr-icon {
  position: absolute; left: 14px; top: 39px;
  color: var(--gold); font-size: 0.9rem;
}
.addr-input {
  width: 100%; padding: 12px 14px 12px 38px;
  border: 1.5px solid var(--gray2); border-radius: var(--radius);
  font-family: var(--L); font-size: 0.95rem;
  transition: border-color var(--tr);
  background: #fafafa;
}
.addr-input:focus { outline: none; border-color: var(--gold); background: var(--white); }
.addr-connector {
  position: absolute; left: 20px; top: 58px;
  width: 2px; height: 28px; background: var(--gray2);
}

/* Carte Google Maps */
#map {
  width: 100%; height: 300px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray2);
  margin: 20px 0;
  background: #e8e8e8;
  display: flex; align-items: center; justify-content: center;
}
#map.loaded { background: transparent; }
.map-placeholder {
  text-align: center; color: var(--text2); font-size: 0.9rem;
}
.map-placeholder i { font-size: 2rem; color: var(--gray2); display: block; margin-bottom: 8px; }

/* Infos trajet calculées */
.trajet-info-bar {
  display: none;
  background: var(--dark);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: none; gap: 30px;
  align-items: center;
  margin-top: 16px;
}
.trajet-info-bar.visible { display: flex; }
.trajet-info-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; color: rgba(255,255,255,.75);
}
.trajet-info-item strong { color: var(--gold); font-family: var(--B); font-size: 1rem; }
.trajet-info-item i { color: var(--gold); }

/* ── STEP 3 : DATE & OPTIONS ── */
.date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  font-family: var(--B); font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text2); display: block; margin-bottom: 7px;
}
.form-group label span { color: var(--red); }
.form-input, .form-select {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--gray2); border-radius: var(--radius);
  font-family: var(--L); font-size: 0.95rem; color: var(--dark);
  background: #fafafa; transition: border-color var(--tr);
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--gold); background: var(--white); }
.form-textarea { height: 100px; resize: vertical; }

/* Disponibilité badge */
.dispo-badge {
  display: none; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 700; margin-top: 8px;
}
.dispo-badge.disponible { background: #e8f5e9; color: #2e7d32; display: flex; }
.dispo-badge.indisponible { background: #fce4ec; color: #c62828; display: flex; }
.dispo-badge.checking { background: #e3f2fd; color: #1565c0; display: flex; }

/* Options */
.options-grid { display: grid; gap: 10px; }
.option-check {
  display: flex; align-items: flex-start; gap: 14px;
  border: 1.5px solid var(--gray2); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; transition: all var(--tr);
}
.option-check:hover { border-color: var(--gold); }
.option-check input[type=checkbox] { display: none; }
.option-check-box {
  width: 20px; height: 20px; border-radius: 4px;
  border: 2px solid var(--gray2); flex-shrink: 0; margin-top: 1px;
  transition: all var(--tr); display: flex; align-items: center; justify-content: center;
}
.option-check.checked .option-check-box { background: var(--gold); border-color: var(--gold); }
.option-check.checked .option-check-box::after { content: '✓'; color: var(--dark); font-size: 0.8rem; font-weight: 900; }
.option-check.checked { border-color: var(--gold); background: #fffdf0; }
.option-title { font-family: var(--B); font-size: 0.9rem; font-weight: 700; text-transform: uppercase; }
.option-desc { font-size: 0.82rem; color: var(--text2); margin-top: 2px; }
.option-prix { font-family: var(--B); font-size: 1rem; color: var(--gold); font-weight: 800; margin-left: auto; flex-shrink: 0; }

/* ── STEP 4 : COORDONNÉES ── */
.coords-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── RÉCAPITULATIF (sidebar) ── */
.recap-card { position: sticky; top: 90px; }
.recap-vehicule { display: flex; gap: 14px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--gray2); margin-bottom: 16px; }
.recap-vehicule img { width: 80px; object-fit: contain; }
.recap-vehicule-nom { font-family: var(--B); font-size: 0.95rem; font-weight: 800; text-transform: uppercase; }
.recap-vehicule-sub { font-size: 0.8rem; color: var(--text2); margin-top: 3px; }
.recap-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; gap: 8px; }
.recap-row-label { font-size: 0.85rem; color: var(--text2); }
.recap-row-val { font-size: 0.88rem; font-weight: 700; text-align: right; }
.recap-section { padding-bottom: 14px; border-bottom: 1px solid var(--gray2); margin-bottom: 14px; }
.recap-section:last-child { border: none; margin: 0; padding: 0; }

/* Prix total */
.prix-total-box {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-top: 16px;
}
.prix-total-label { font-family: var(--B); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.5); margin-bottom: 8px; }
.prix-total-val { font-family: var(--B); font-size: 2.5rem; font-weight: 800; color: var(--gold); line-height: 1; }
.prix-total-sub { font-size: 0.78rem; color: rgba(255,255,255,.4); margin-top: 6px; }

/* Détail prix */
.detail-prix { margin-top: 12px; }
.detail-prix-row {
  display: flex; justify-content: space-between;
  font-size: 0.82rem; padding: 5px 0;
  border-bottom: 1px dashed rgba(255,255,255,.06);
  color: rgba(255,255,255,.65);
}
.detail-prix-row:last-child { border: none; }
.detail-prix-row .neg { color: #81C784; }

/* Loading prix */
.prix-loading {
  display: none;
  text-align: center; padding: 16px;
  color: var(--gold); font-size: 0.88rem;
}
.prix-loading.visible { display: block; }

/* ── STEP 5 : CONFIRMATION ── */
.confirm-box {
  text-align: center; padding: 40px 20px;
}
.confirm-icon {
  width: 80px; height: 80px;
  background: #e8f5e9; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--green);
  margin: 0 auto 20px;
}
.confirm-ref {
  font-family: var(--B); font-size: 1.5rem; font-weight: 800;
  color: var(--gold); letter-spacing: 2px; margin: 16px 0;
}
.confirm-text { color: var(--text2); font-size: 0.95rem; line-height: 1.8; }

/* ── BOUTONS NAVIGATION ── */
.nav-btns { display: flex; gap: 12px; justify-content: space-between; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--gray2); }
.btn-prev {
  padding: 13px 28px; border: 2px solid var(--dark);
  background: transparent; color: var(--dark);
  font-family: var(--B); font-size: 0.9rem; font-weight: 700;
  text-transform: uppercase; border-radius: var(--radius);
  cursor: pointer; transition: all var(--tr);
}
.btn-prev:hover { background: var(--dark); color: var(--white); }
.btn-next {
  padding: 13px 36px;
  background: var(--gold); color: var(--dark);
  border: 2px solid var(--gold);
  font-family: var(--B); font-size: 0.95rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  border-radius: var(--radius); cursor: pointer;
  transition: all var(--tr); flex: 1;
}
.btn-next:hover { background: var(--gold2); border-color: var(--gold2); }
.btn-next:disabled { background: var(--gray2); border-color: var(--gray2); color: #999; cursor: not-allowed; }
.btn-submit-resa {
  width: 100%; padding: 16px;
  background: var(--green); color: var(--white);
  border: none; font-family: var(--B); font-size: 1.05rem;
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
  border-radius: var(--radius); cursor: pointer;
  transition: background var(--tr); margin-top: 16px;
}
.btn-submit-resa:hover { background: #388E3C; }
.btn-submit-resa:disabled { background: #aaa; cursor: not-allowed; }

/* ── ALERTS ── */
.alert { padding: 14px 18px; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; }
.alert i { margin-top: 2px; flex-shrink: 0; }
.alert-err  { background: #fce4ec; color: #c62828; border: 1px solid #ef9a9a; }
.alert-ok   { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-info { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.alert-warn { background: #fff8e1; color: #e65100; border: 1px solid #ffe082; }

/* ── SPINNER ── */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .resa-body { grid-template-columns: 1fr; }
  .recap-card { position: static; }
  .trajet-type-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .stepper { gap: 0; }
  .step-label { display: none; }
  .vehicule-card { grid-template-columns: 1fr; }
  .vehicule-card img { max-width: 160px; margin: 0 auto; }
  .date-grid, .coords-grid { grid-template-columns: 1fr; }
  .trajet-type-grid { grid-template-columns: 1fr; }
  .resa-header { padding: 0 16px; }
  .resa-header-right span { display: none; }
}
