/* ============================================================
   OBB Transport – Homepage Styles
   Clean · No gradients · Split hero layout
   ============================================================ */

:root {
  --navy:     #0f172a;
  --navy-2:   #1e293b;
  --blue:     #2563eb;
  --blue-d:   #1d4ed8;
  --orange:   #f97316;
  --orange-d: #ea580c;
  --green:    #16a34a;
  --red:      #dc2626;
  --border:   #e2e8f0;
  --bg:       #f8fafc;
  --text:     #1e293b;
  --muted:    #64748b;
  --xmuted:   #94a3b8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

/* ── Navbar ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #1a2538;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-brand .dot { color: var(--orange); }
.nav-tagline {
  font-size: 0.72rem;
  font-weight: 500;
  color: #475569;
  border-left: 1px solid #334155;
  padding-left: 0.75rem;
  margin-left: 0.375rem;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  padding: 0.4rem 0.875rem;
  border: 1px solid #334155;
  border-radius: 0.375rem;
  transition: all 0.15s;
}
.nav-link:hover { border-color: #64748b; color: #e2e8f0; }

/* ── Hero ── */
.hero {
  background: var(--navy);
  padding: 5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

/* subtle grid dots pattern */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #1e293b 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

/* Left: text + form */
.hero-content {}

.route-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #162032;
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.875rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}
.route-pill .arrow { color: var(--orange); font-size: 0.9rem; }

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.hero h1 .accent { color: var(--orange); }

.hero-sub {
  margin-top: 1rem;
  font-size: 1rem;
  color: #94a3b8;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

/* ── Search form (on dark bg) ── */
.track-form-wrap { margin-top: 2.25rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.track-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.track-form {
  display: flex;
  gap: 0.5rem;
}

.track-input {
  flex: 1;
  padding: 0.875rem 1.125rem;
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1.5px solid #334155;
  border-radius: 0.5rem;
  outline: none;
  color: #fff;
  background: rgba(255,255,255,0.06);
  transition: border-color 0.2s, background 0.2s;
}
.track-input::placeholder {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #475569;
}
.track-input:focus {
  border-color: var(--orange);
  background: rgba(255,255,255,0.09);
}

.track-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.625rem;
  background: var(--orange);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  font-family: inherit;
}
.track-btn:hover { background: var(--orange-d); }
.track-btn svg { width: 1rem; height: 1rem; stroke-width: 2.5; }

/* HTMX spinner */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-flex; align-items: center; }
.spinner {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Right: illustration */
.hero-illustration {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.hero-svg {
  width: 100%;
  max-width: 560px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

/* ── Result section ── */
.result-section {
  padding: 2rem 2rem 0;
  max-width: 700px;
  margin: 0 auto;
}

#track-result { min-height: 0.5rem; }

/* ── Result card ── */
.result-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.result-code {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.06em;
}
.result-date { font-size: 0.78rem; color: var(--muted); }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 0.75rem;
}
.badge-en_attente { background: #fef3c7; color: #92400e; }
.badge-en_transit { background: #dbeafe; color: #1e40af; }
.badge-arrive     { background: #dcfce7; color: #166534; }
.badge-livre      { background: #d1fae5; color: #065f46; }

/* Progress steps */
.progress-steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  position: relative;
}
.progress-line {
  position: absolute;
  top: 2.4rem;
  left: 3.5rem;
  right: 3.5rem;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.progress-line-fill { height: 100%; background: var(--green); }

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
  flex: 1;
}
.step-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--xmuted);
}
.step-dot.done   { background: var(--green); border-color: var(--green); color: #fff; }
.step-dot.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.step-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  max-width: 5rem;
  line-height: 1.3;
}
.step-label.active { color: var(--blue); }
.step-label.done   { color: var(--green); }

/* Details */
.result-details { padding: 1.25rem 1.5rem; }

.route-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.125rem;
}
.route-end {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
}
.route-end-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.route-end-name { font-size: 0.95rem; font-weight: 700; color: var(--navy); }
.route-end-loc  { font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.route-arrow-big { font-size: 1.25rem; color: var(--xmuted); flex-shrink: 0; }

.meta-row { display: flex; gap: 0.625rem; flex-wrap: wrap; }
.meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 0.375rem;
}
.meta-item strong { color: var(--navy); font-weight: 700; }

/* Not found */
.not-found-card {
  text-align: center;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 0.875rem;
  padding: 2.5rem 1.5rem;
}
.not-found-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.not-found-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.not-found-card p  { font-size: 0.88rem; color: var(--muted); margin-top: 0.5rem; }
.not-found-code { font-family: 'Courier New', monospace; font-weight: 700; color: var(--red); }

/* ── Voyages planifiés ── */
.voyages-section {
  padding: 4rem 2rem;
  background: #fff;
  border-top: 1px solid var(--border);
}

.voyages-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.voyages-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.voyages-title {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.voyages-sub   { font-size: 0.9rem; color: var(--muted); margin-top: 0.25rem; }
.voyages-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--orange);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* Grid */
.voyages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* Card */
.voyage-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.voyage-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  border-color: #cbd5e1;
}
.voyage-card--active {
  border-color: #bfdbfe;
  background: #f8fbff;
}

/* Top row */
.voyage-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.v-badge--active { background: #dbeafe; color: #1e40af; }
.v-badge--prep   { background: #f1f5f9; color: #475569; }

.v-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.v-colis {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

/* Route */
.voyage-route {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.v-country {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: 1;
}
.v-country--right { justify-content: flex-end; text-align: right; }

.v-flag { height: 1.6rem; width: auto; max-width: 2.8rem; flex-shrink: 0; border-radius: 3px; display: block; object-fit: contain; }

.v-country-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}
.v-country-city { font-size: 0.75rem; color: var(--muted); margin-top: 0.1rem; }

.v-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--orange);
}
.v-arrow svg { width: 0.85rem; height: 0.85rem; }

/* Dates */
.voyage-dates {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  padding: 0.875rem 1rem;
}

.v-date-item { flex: 1; }
.v-date-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--xmuted);
  margin-bottom: 0.2rem;
}
.v-date-val { font-size: 0.85rem; font-weight: 700; color: var(--navy); }

.v-date-sep {
  width: 1px;
  height: 2rem;
  background: var(--border);
  flex-shrink: 0;
}

/* Footer */
.voyage-card-footer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.v-num { font-size: 0.75rem; font-weight: 600; color: var(--muted); font-family: 'Courier New', monospace; }

/* ── How it works ── */
.how-section {
  padding: 5rem 2rem;
  text-align: center;
  background: var(--bg);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.how-section h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.section-sub { font-size: 0.95rem; color: var(--muted); margin-top: 0.5rem; margin-bottom: 2.5rem; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  max-width: 880px;
  margin: 0 auto;
}
.step-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.75rem 1.375rem;
  text-align: left;
}
.step-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  margin-bottom: 0.875rem;
  letter-spacing: -0.05em;
}
.step-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 0.375rem; }
.step-card p  { font-size: 0.85rem; color: var(--muted); }

/* ── Footer ── */
footer {
  background: var(--navy);
  color: var(--xmuted);
  border-top: 1px solid #1a2538;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

/* Brand column */
.footer-brand-col {}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 0.875rem;
}
.footer-logo span { color: var(--orange); }

.footer-desc {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.7;
  max-width: 300px;
  margin-bottom: 1.5rem;
}

/* Social icons */
.social-links {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  color: #64748b;
  text-decoration: none;
  transition: all 0.15s;
  flex-shrink: 0;
}
.social-btn svg { width: 1rem; height: 1rem; }
.social-btn:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* Link columns */
.footer-col {}

.footer-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.125rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer-links li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: #475569;
}
.footer-links li svg { width: 0.875rem; height: 0.875rem; flex-shrink: 0; color: #334155; }
.footer-links a {
  color: #475569;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--orange); }

/* Contact groups */
.contact-country {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  margin: 1rem 0 0.5rem;
}
.contact-country:first-of-type { margin-top: 0; }
.footer-city {
  font-size: 0.72rem;
  color: #334155;
  margin-left: auto;
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid #1a2538;
  padding: 1.25rem 2rem;
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom p { font-size: 0.78rem; color: #334155; }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 900px)
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .voyages-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand-col { grid-column: 1 / -1; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 768px)
══════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Navbar */
  .navbar { padding: 0 1rem; }
  .nav-tagline { display: none; }

  /* Hero */
  .hero { padding: 3rem 1.25rem 2.5rem; }
  .hero h1 { font-size: clamp(1.75rem, 7vw, 2.5rem); }
  .hero-sub { font-size: 0.9rem; }
  .track-form-wrap { margin-top: 1.75rem; }

  /* Result section */
  .result-section { padding: 1.25rem 1rem 0; }
  .result-header { padding: 0.875rem 1rem; }
  .result-code { font-size: 0.9rem; }
  .result-details { padding: 1rem; }

  /* Progress steps — compact */
  .progress-steps { padding: 1.25rem 0.75rem 0.75rem; }
  .progress-line { left: 2rem; right: 2rem; }
  .step-dot { width: 1.625rem; height: 1.625rem; font-size: 0.6rem; }
  .step-label { font-size: 0.6rem; max-width: 3.5rem; }

  /* Meta chips */
  .meta-row { gap: 0.375rem; }
  .meta-item { font-size: 0.72rem; padding: 0.25rem 0.5rem; }

  /* Route row */
  .route-row { flex-direction: column; gap: 0.5rem; }
  .route-arrow-big { transform: rotate(90deg); }

  /* Voyages */
  .voyages-section { padding: 2.5rem 1rem; }
  .voyages-grid { grid-template-columns: 1fr; }
  .voyages-title { font-size: 1.25rem; }

  /* How section */
  .how-section { padding: 3rem 1rem; margin-top: 1.5rem; }
  .steps-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 1rem 2rem; }
  .footer-brand-col { grid-column: 1; }
  .footer-bottom { flex-direction: column; text-align: center; padding: 1rem; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Small mobile (≤ 480px)
══════════════════════════════════════════ */
@media (max-width: 480px) {
  .navbar { height: 54px; }
  .nav-brand { font-size: 1.2rem; }
  .hero { padding: 2.25rem 1rem 2rem; }

  /* Track form stacks */
  .track-form { flex-direction: column; }
  .track-btn { justify-content: center; width: 100%; }
  .track-input { width: 100%; }

  /* Voyage card compact */
  .voyage-card { padding: 1.125rem; gap: 1rem; }
  .v-country-name { font-size: 0.85rem; }

  /* Step cards */
  .step-card { padding: 1.25rem 1rem; }
  .step-num { font-size: 2rem; }
}
