/* ===== Taxi Booking Pro — Frontend Styles ===== */

:root {
  --tb-primary:   #1a1a2e;
  --tb-accent:    #f5c518;
  --tb-accent2:   #e8b800;
  --tb-success:   #27ae60;
  --tb-error:     #e74c3c;
  --tb-bg:        #ffffff;
  --tb-bg-light:  #f8f9fa;
  --tb-border:    #e0e0e0;
  --tb-text:      #2c2c2c;
  --tb-muted:     #888;
  --tb-radius:    12px;
  --tb-shadow:    0 8px 32px rgba(0,0,0,.10);
  --tb-font:      'Segoe UI', system-ui, sans-serif;
}

/* ── Conteneur principal ──────────────────────────────────────── */
.tb-booking-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--tb-radius);
  overflow: hidden;
  box-shadow: var(--tb-shadow);
  font-family: var(--tb-font);
  background: var(--tb-bg);
  max-width: 960px;
  margin: 0 auto 40px;
}

/* ── Carte ────────────────────────────────────────────────────── */
.tb-map-container {
  position: relative;
  min-height: 500px;
  background: #e8eaf0;
}
#tb-map {
  width: 100%;
  height: 100%;
  min-height: 500px;
}
.tb-map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255,255,255,.95);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  display: flex;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  z-index: 999;
}
.tb-map-legend span { display: flex; align-items: center; gap: 4px; }

/* ── Formulaire ───────────────────────────────────────────────── */
.tb-form-container {
  padding: 36px 32px;
  overflow-y: auto;
  max-height: 650px;
}

.tb-form-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.tb-taxi-icon { font-size: 28px; }
.tb-form-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--tb-primary);
}

/* ── Steps ────────────────────────────────────────────────────── */
.tb-step { margin-bottom: 28px; }
.tb-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--tb-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tb-accent);
}
.tb-step-title span {
  width: 26px; height: 26px;
  background: var(--tb-primary);
  color: var(--tb-accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  flex-shrink: 0;
}

/* ── Champs ───────────────────────────────────────────────────── */
.tb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.tb-field { display: flex; flex-direction: column; margin-bottom: 14px; }
.tb-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tb-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.tb-field input[type=text],
.tb-field input[type=tel],
.tb-field input[type=email],
.tb-field input[type=date],
.tb-field input[type=time],
.tb-field select,
.tb-field textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--tb-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--tb-font);
  color: var(--tb-text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.tb-field input:focus,
.tb-field select:focus,
.tb-field textarea:focus {
  border-color: var(--tb-primary);
  box-shadow: 0 0 0 3px rgba(26,26,46,.08);
}
.tb-field input.tb-error { border-color: var(--tb-error); }
.tb-field textarea { resize: vertical; min-height: 70px; }

/* ── Adresse + autocomplete ───────────────────────────────────── */
.tb-address-input-wrap { position: relative; }
.tb-autocomplete {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  border: 1.5px solid var(--tb-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  z-index: 10000;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.tb-autocomplete-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--tb-text);
  transition: background .15s;
}
.tb-autocomplete-item:hover { background: #f0f4ff; }
.tb-autocomplete-loading { padding: 10px 14px; font-size: 13px; color: var(--tb-muted); }

/* ── Types de véhicule ────────────────────────────────────────── */
.tb-vehicle-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tb-vehicle-option {
  cursor: pointer;
}
.tb-vehicle-option input { display: none; }
.tb-vehicle-option span {
  display: block;
  padding: 8px 14px;
  border: 1.5px solid var(--tb-border);
  border-radius: 8px;
  font-size: 13px;
  transition: all .2s;
  background: #fff;
}
.tb-vehicle-option input:checked + span {
  border-color: var(--tb-primary);
  background: var(--tb-primary);
  color: var(--tb-accent);
  font-weight: 600;
}

/* ── Estimation prix ──────────────────────────────────────────── */
.tb-estimate-box {
  background: linear-gradient(135deg, var(--tb-primary) 0%, #2d2d5e 100%);
  color: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  animation: tb-slide-in .3s ease;
}
.tb-estimate-icon { font-size: 22px; }

/* ── Bouton submit ────────────────────────────────────────────── */
.tb-submit-btn {
  width: 100%;
  background: var(--tb-accent);
  color: var(--tb-primary);
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: .3px;
  transition: background .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 4px 12px rgba(245,197,24,.3);
}
.tb-submit-btn:hover {
  background: var(--tb-accent2);
  box-shadow: 0 6px 20px rgba(245,197,24,.45);
  transform: translateY(-1px);
}
.tb-submit-btn:active { transform: translateY(0); }
.tb-submit-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ── Messages feedback ────────────────────────────────────────── */
#tb-message-area {
  margin-bottom: 16px;
}
.tb-msg {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  animation: tb-slide-in .3s ease;
}
.tb-msg-success { background: #d1e7dd; color: #155724; }
.tb-msg-error   { background: #f8d7da; color: #842029; }

/* ── Animations ───────────────────────────────────────────────── */
@keyframes tb-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Carte seule ──────────────────────────────────────────────── */
#tb-map-standalone {
  width: 100%;
  height: 400px;
  border-radius: var(--tb-radius);
  overflow: hidden;
  box-shadow: var(--tb-shadow);
}

/* ── Confirmation ─────────────────────────────────────────────── */
.tb-confirmation {
  text-align: center;
  padding: 40px 20px;
  animation: tb-slide-in .4s ease;
}
.tb-confirmation .tb-check { font-size: 56px; margin-bottom: 12px; }
.tb-confirmation h3 { font-size: 22px; color: var(--tb-primary); margin-bottom: 8px; }
.tb-confirmation .tb-ref {
  display: inline-block;
  background: var(--tb-primary);
  color: var(--tb-accent);
  padding: 8px 22px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 16px;
  margin: 12px 0;
}
.tb-confirmation p { color: var(--tb-muted); font-size: 14px; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tb-booking-wrap { grid-template-columns: 1fr; }
  .tb-map-container { min-height: 260px; }
  #tb-map { min-height: 260px; }
  .tb-form-container { padding: 24px 18px; max-height: none; }
  .tb-row { grid-template-columns: 1fr; }
  .tb-vehicle-types { flex-direction: column; }
}

/* ── Compatibilité Divi ───────────────────────────────────────── */
.et-db #tb-booking-form input,
.et-db #tb-booking-form select,
.et-db #tb-booking-form textarea {
  padding: 10px 14px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  background: #fff !important;
}
.et-db #tb-booking-form { max-width: 100%; }
