/* ============================================================
   Allo Dakar - feuille de style de marque (mobile-first).
   Direction : « taxi de confiance », orange soleil dominant.
   Aucune couleur hex en dur dans les vues : utiliser ces variables.
   ============================================================ */

:root {
  /* Marque */
  --ad-orange:      #F59E0B;
  --ad-orange-dark: #D97706;
  --ad-orange-soft: #FEF3C7;
  --ad-ink:         #1F2937;  /* noir doux */
  --ad-ink-2:       #4B5563;
  --ad-muted:       #6B7280;
  --ad-bg:          #FAFAF7;  /* blanc casse */
  --ad-surface:     #FFFFFF;
  --ad-border:      #E5E7EB;
  --ad-green:       #16A34A;  /* confirmations */
  --ad-green-soft:  #DCFCE7;
  --ad-red:         #DC2626;  /* dangers */
  --ad-red-soft:    #FEE2E2;
  --ad-gray-soft:   #F3F4F6;

  /* Barre laterale d'administration (valeurs reprises telles quelles du layout) */
  --ad-side-bg:    #1F2937;
  --ad-side-ink:   #D1D5DB;
  --ad-side-muted: #9CA3AF;
  --ad-side-line:  rgba(255, 255, 255, .12);

  /* Formes */
  --ad-radius:   12px;
  --ad-radius-sm: 8px;
  --ad-control-height: 44px;
  --ad-touch-height: 48px;
  --ad-shadow:   0 1px 3px rgba(17, 24, 39, .08), 0 1px 2px rgba(17, 24, 39, .04);
  --ad-shadow-lg: 0 8px 24px rgba(17, 24, 39, .12);

  /* Bootstrap : recalage sur la marque */
  --bs-primary:      #F59E0B;
  --bs-primary-rgb:  245, 158, 11;
  --bs-body-bg:      #FAFAF7;
  --bs-body-color:   #1F2937;
  --bs-border-radius: 12px;
  --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { -webkit-tap-highlight-color: transparent; }

body {
  background: var(--ad-bg);
  color: var(--ad-ink);
  font-family: var(--bs-font-sans-serif);
  min-height: 100vh;
}

main.container { max-width: 1120px; }
main.container-fluid { background: var(--ad-bg); min-height: calc(100vh - 70px); }

/* -- Boutons de marque ------------------------------------------------- */

.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--ad-control-height); padding: .55rem 1rem; border-radius: var(--ad-radius-sm); border-width: 1px; font-size: .9rem; font-weight: 700; line-height: 1.2; letter-spacing: 0; transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease; }
.btn::before { content: ''; position: absolute; inset: 0 auto 0 -120%; width: 70%; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .24), transparent); transform: skewX(-18deg); transition: left .5s ease; pointer-events: none; }
.btn:hover { transform: translateY(-2px); }
.btn:hover::before { left: 135%; }
.btn:active, .btn.is-pressing { transform: translateY(1px) scale(.98); }
.btn-lg { min-height: 52px; padding: .7rem 1.25rem; font-size: 1rem; }
.btn-compact { min-height: 40px; padding: .45rem .75rem; font-size: .82rem; }
.btn i, .btn .bi { flex: 0 0 auto; font-size: 1.05em; line-height: 1; }
.btn i, .btn .bi { transition: transform .22s ease, color .22s ease; }
.btn:hover i:first-child, .btn:hover .bi:first-child { transform: translateX(-2px) rotate(-4deg) scale(1.08); }
.btn:hover i:last-child, .btn:hover .bi:last-child { transform: translateX(3px); }
.btn .bi:first-child { margin-left: -.1rem; }
.btn .bi:last-child { margin-right: -.1rem; }

.btn-ad {
  background: var(--ad-orange);
  border-color: var(--ad-orange);
  color: #fff;
}
.btn-ad:hover, .btn-ad:focus { background: var(--ad-orange-dark); border-color: var(--ad-orange-dark); color: #fff; box-shadow: 0 5px 14px rgba(217, 119, 6, .22); }

.btn-ad-green { background: var(--ad-green); border-color: var(--ad-green); color: #fff; }
.btn-ad-green:hover { filter: brightness(.95); color: #fff; }

/* Action principale : bouton plein, pleine largeur, zone du pouce */
.btn-pouce {
  display: block;
  width: 100%;
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 700;
}

/* -- Cibles tactiles (accessibilite) ---------------------------------- */

.nav-link, a.card, .form-control, .form-select { min-height: var(--ad-touch-height); }
.touch-48 { min-height: var(--ad-touch-height); min-width: var(--ad-touch-height); }
.btn-close { min-width: var(--ad-touch-height); min-height: var(--ad-touch-height); padding: .75rem; border-radius: 50%; }
.btn-outline-secondary { border-color: #CBD5E1; color: var(--ad-ink-2); background: var(--ad-surface); }
.btn-outline-secondary:hover, .btn-outline-secondary:focus { border-color: var(--ad-ink-2); background: var(--ad-gray-soft); color: var(--ad-ink); }
.btn-outline-danger:hover, .btn-outline-danger:focus { box-shadow: 0 4px 12px rgba(220, 38, 38, .14); }
.btn-ad-green:hover, .btn-ad-green:focus { box-shadow: 0 5px 14px rgba(22, 163, 74, .2); }
.btn-link { min-height: var(--ad-control-height); padding-right: .5rem; padding-left: .5rem; font-weight: 700; color: var(--ad-orange-dark); text-decoration: none; }
.btn-link:hover { color: var(--ad-ink); }

/* Focus toujours visible au clavier (accessibilite) */
:focus-visible { outline: 3px solid var(--ad-orange); outline-offset: 2px; }

/* -- Cartes ------------------------------------------------------------ */

.card { border: 1px solid var(--ad-border); border-radius: var(--ad-radius); box-shadow: var(--ad-shadow); }
.card a:not(.btn) { color: inherit; }
.card a:not(.btn) i, .ad-fleet-card i, .ad-process-item i { transition: transform .25s ease, color .25s ease; }
.card:hover a:not(.btn) i, .ad-fleet-card:hover i, .ad-process-item:hover i { color: var(--ad-orange-dark); transform: translateY(-3px) scale(1.08); }

/* -- Controles de formulaire ----------------------------------------- */
.form-label { margin-bottom: .45rem; color: var(--ad-ink-2); font-size: .82rem; font-weight: 700; }
.form-control, .form-select { border-radius: var(--ad-radius-sm); border-color: var(--ad-border); padding: .65rem .85rem; color: var(--ad-ink); background-color: var(--ad-surface); }
.form-control::placeholder { color: #9CA3AF; }
.form-control:focus, .form-select:focus { border-color: var(--ad-orange); box-shadow: 0 0 0 3px var(--ad-orange-soft); }
.input-group > .btn { min-height: var(--ad-touch-height); }
.form-check-input:checked { border-color: var(--ad-orange); background-color: var(--ad-orange); }
.form-check-input:focus { border-color: var(--ad-orange); box-shadow: 0 0 0 3px var(--ad-orange-soft); }

/* -- Montants ---------------------------------------------------------- */

.montant { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.montant-xl { font-size: 2rem; }
.montant-lg { font-size: 1.4rem; }

/* -- Bandeau hors-ligne (masque par defaut) ---------------------------- */

#ad-offline-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 1080;
  background: var(--ad-ink);
  color: #fff;
  text-align: center;
  padding: .5rem .75rem;
  font-weight: 600;
  font-size: .9rem;
}
body.is-offline #ad-offline-bar { display: block; }

/* -- Barre de navigation basse (client / chauffeur, 4 onglets) --------- */

.ad-navbottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: var(--ad-surface);
  border-top: 1px solid var(--ad-border);
  z-index: 1030;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.ad-navbottom a {
  flex: 1;
  text-align: center;
  padding: .5rem 0;
  color: var(--ad-muted);
  text-decoration: none;
  font-size: .72rem;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.ad-navbottom a i { font-size: 1.3rem; }
.ad-navbottom a.active { color: var(--ad-orange); }
.ad-navbottom a.active i { transform: translateY(-1px); }
.ad-navbottom a i { transition: transform .18s ease, color .18s ease; }
.ad-navbottom a:hover i { transform: translateY(-3px) scale(1.08); color: var(--ad-orange); }
.has-navbottom { padding-bottom: 72px; }

/* -- Flash messages ---------------------------------------------------- */

.ad-flash { border-radius: var(--ad-radius); padding: .75rem 1rem; margin-bottom: 1rem; font-weight: 500; }
.ad-flash.success { background: var(--ad-green-soft); color: #14532D; }
.ad-flash.error   { background: var(--ad-red-soft);   color: #7F1D1D; }
.ad-flash.warning { background: var(--ad-orange-soft); color: #78350F; }
.ad-flash.info    { background: #DBEAFE; color: #1E3A5F; }

/* -- Bandeau « Ajouter a l'ecran d'accueil » --------------------------- */

#ad-install-bar {
  display: none;
  align-items: center;
  gap: .5rem;
  background: var(--ad-orange-soft);
  color: #78350F;
  padding: .5rem .75rem;
  border-radius: var(--ad-radius);
  margin-bottom: 1rem;
  font-size: .88rem;
}

/* -- Conteneur carte (placeholder Leaflet) ----------------------------- */

.ad-map { width: 100%; min-height: 220px; border-radius: var(--ad-radius); background: var(--ad-gray-soft); }

/* -- En-tete public ---------------------------------------------------- */

.ad-brand { font-weight: 800; color: var(--ad-ink); text-decoration: none; font-size: 1.15rem; }
.ad-brand .bi { color: var(--ad-orange); }

/* -- En-tetes et navigation ------------------------------------------ */
header.border-bottom { border-color: var(--ad-border) !important; background: rgba(255, 255, 255, .94) !important; }
header.border-bottom > .container { min-height: 70px; }
header .nav-link { min-height: var(--ad-control-height); }
header nav a:not(.btn) { color: var(--ad-ink-2) !important; font-weight: 700; }
header nav a:not(.btn):hover { color: var(--ad-orange-dark) !important; }
.ad-app-header { position: sticky; top: 0; z-index: 1020; box-shadow: 0 1px 0 rgba(17, 24, 39, .04); }
.ad-header-actions { gap: .45rem; }
.ad-user-chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .4rem .7rem; border: 1px solid var(--ad-border); border-radius: 999px; color: var(--ad-ink-2); font-size: .78rem; font-weight: 700; }
.ad-user-chip i { color: var(--ad-orange); font-size: 1rem; }
.ad-user-chip b { color: var(--ad-orange-dark); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }

/* -- Wizard : points de progression ------------------------------------ */

.ad-etape { height: 6px; border-radius: 999px; background: var(--ad-border); }
.ad-etape.active { background: var(--ad-orange); }

/* -- Notation par etoiles (cliquable) ---------------------------------- */

.ad-etoile { cursor: pointer; }

/* -- Squelette de chargement (prix en cours de calcul) ----------------- */

.ad-skeleton { display: block; height: 14px; margin-bottom: .5rem; border-radius: var(--ad-radius-sm); background: var(--ad-gray-soft); animation: ad-pulse 1.2s ease-in-out infinite; }
.ad-skeleton:last-child { margin-bottom: 0; width: 60%; }
@keyframes ad-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .ad-skeleton { animation: none; } }

/* -- Graphique en barres (rapports admin, sans librairie) -------------- */

.ad-bar { height: 14px; min-width: 2px; border-radius: var(--ad-radius-sm); background: var(--ad-orange); }

/* -- Barre laterale d'administration ----------------------------------- */

.ad-admin { display: flex; min-height: 100vh; }
.ad-side { width: 248px; background: var(--ad-side-bg); color: #fff; flex-shrink: 0; box-shadow: 5px 0 18px rgba(17, 24, 39, .08); }
.ad-side a { color: var(--ad-side-ink); text-decoration: none; display: flex; align-items: center; gap: .6rem; padding: .55rem 1rem; border-radius: var(--ad-radius-sm); font-size: .9rem; min-height: 48px; }
.ad-side a:hover, .ad-side a.active { background: var(--ad-side-line); color: #fff; }
.ad-side a.active { box-shadow: inset 3px 0 0 var(--ad-orange); }
.ad-side .sec { color: var(--ad-side-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; padding: .75rem 1rem .25rem; }
.ad-admin-main { flex: 1; min-width: 0; }
.ad-side-backdrop { display: none; position: fixed; inset: 0; z-index: 1040; background: rgba(17, 24, 39, .5); }
@media (max-width: 768px) {
  .ad-side { position: fixed; inset: 0 auto 0 0; z-index: 1050; transform: translateX(-100%); transition: transform .2s; overflow-y: auto; }
  .ad-side.open { transform: none; }
  .ad-side.open ~ .ad-side-backdrop { display: block; }
}
@media (max-width: 575px) {
  header.border-bottom > .container { min-height: 62px; padding-top: .5rem !important; padding-bottom: .5rem !important; }
  header .btn { padding-right: .75rem; padding-left: .75rem; }
  .ad-header-actions .btn-compact span { display: none; }
  .ad-header-actions .btn-compact { width: 40px; padding: .5rem; }
  .btn-pouce { min-height: 50px; }
  .ad-navbottom a { min-height: 60px; font-weight: 600; }
}
@media (prefers-reduced-motion: reduce) { .ad-side { transition: none; } }
@media (prefers-reduced-motion: reduce) { .btn, .btn::before, .btn i, .btn .bi, .card a:not(.btn) i, .ad-fleet-card i, .ad-process-item i { transition: none; } .btn:hover { transform: none; } }

/* -- Utilitaires ------------------------------------------------------- */

.text-ad-orange { color: var(--ad-orange) !important; }
.bg-ad-soft { background: var(--ad-orange-soft) !important; }
.bg-ad-orange { background: var(--ad-orange) !important; color: #fff !important; }
.container-narrow { max-width: 560px; }

/* -- Accueil : experience publique ------------------------------------ */
.ad-hero { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 2rem; align-items: center; max-width: 1040px; margin: 1rem auto 2rem; padding: clamp(2rem, 6vw, 4.5rem); overflow: hidden; border-radius: 24px; background: var(--ad-ink); color: #fff; isolation: isolate; }
.ad-hero::before { content: ''; position: absolute; width: 420px; height: 420px; right: -130px; top: -180px; border: 1px solid rgba(245, 158, 11, .35); border-radius: 50%; box-shadow: 0 0 0 34px rgba(245, 158, 11, .06), 0 0 0 70px rgba(245, 158, 11, .04); z-index: -1; }
.ad-hero-copy { position: relative; z-index: 1; }
.ad-kicker, .ad-step-label { display: inline-flex; align-items: center; gap: .45rem; color: var(--ad-orange); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ad-hero h1 { margin: .8rem 0 1rem; font-size: clamp(2.25rem, 5vw, 4.25rem); line-height: .98; letter-spacing: -.04em; }
.ad-hero h1 strong { color: var(--ad-orange); font-weight: 800; }
.ad-hero p { max-width: 480px; margin-bottom: 1.5rem; color: rgba(255, 255, 255, .72); font-size: 1.05rem; line-height: 1.65; }
.ad-hero-actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.ad-text-link { color: var(--ad-ink); font-weight: 700; text-decoration: none; }
.ad-text-link:hover { color: var(--ad-orange-dark); }
.ad-hero .ad-text-link { color: #fff; }
.ad-hero .ad-text-link:hover { color: var(--ad-orange); }
.ad-hero-orbit { position: relative; min-height: 260px; display: grid; place-items: center; }
.ad-orbit-ring { width: 230px; height: 230px; border: 1px solid rgba(245, 158, 11, .45); border-radius: 50%; animation: ad-spin 18s linear infinite; }
.ad-orbit-ring::after { content: ''; display: block; width: 10px; height: 10px; margin: 25px 0 0 190px; border-radius: 50%; background: var(--ad-orange); box-shadow: 0 0 0 8px rgba(245, 158, 11, .18); }
.ad-hero-pin { position: absolute; display: grid; place-items: center; width: 76px; height: 76px; border: 8px solid rgba(245, 158, 11, .18); border-radius: 50%; background: var(--ad-orange); color: #fff; font-size: 2rem; box-shadow: 0 12px 30px rgba(0, 0, 0, .24); animation: ad-float 3.5s ease-in-out infinite; }
.ad-orbit-dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.ad-orbit-dot-one { top: 25%; left: 18%; }.ad-orbit-dot-two { right: 13%; bottom: 24%; background: var(--ad-orange); }
.ad-hero-note { position: absolute; right: 0; bottom: 0; display: flex; align-items: center; gap: .55rem; padding: .7rem .85rem; border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--ad-radius-sm); background: rgba(255, 255, 255, .08); font-size: .7rem; line-height: 1.35; }
.ad-hero-note i { color: var(--ad-orange); font-size: 1.2rem; }
.ad-hero-note strong { color: #fff; }
.ad-estimator, .ad-process, .ad-delivery, .ad-fleet, .ad-driver-banner, .ad-final-cta { max-width: 1040px; margin-right: auto; margin-left: auto; }
.ad-estimator { padding: clamp(1.25rem, 3vw, 2rem); border: 0; box-shadow: var(--ad-shadow-lg); }
.ad-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ad-section-heading h2 { margin: .25rem 0 0; font-size: clamp(1.25rem, 2.5vw, 1.65rem); font-weight: 800; letter-spacing: -.03em; }
.ad-live-dot { display: inline-flex; align-items: center; gap: .4rem; color: var(--ad-muted); font-size: .75rem; }.ad-live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--ad-green); box-shadow: 0 0 0 5px var(--ad-green-soft); }
.ad-estimator form { max-width: 760px; margin: auto; }.ad-estimator .form-control { border: 1px solid var(--ad-border); padding: .8rem 1rem; }.ad-estimator .form-control:focus { border-color: var(--ad-orange); box-shadow: 0 0 0 4px var(--ad-orange-soft); }
.ad-estimator .btn-pouce { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem  .75rem 1.2rem; }.ad-estimator .btn-pouce i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .2); transition: transform .2s; }.ad-estimator .btn-pouce:hover i { transform: translateX(3px); }
.ad-estimator label.btn { transition: border-color .2s, background .2s, color .2s, transform .2s; }.ad-estimator label.btn:hover { transform: translateY(-2px); border-color: var(--ad-orange); }.ad-estimator input:checked + i, .ad-estimator input:checked ~ span { color: var(--ad-orange-dark); }.ad-estimator label.btn:has(input:checked) { border-color: var(--ad-orange); background: var(--ad-orange-soft); }
.ad-process { padding: 3.5rem 0 1.5rem; }.ad-process-grid { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 1rem; }.ad-process-item { position: relative; display: grid; gap: .2rem; }.ad-process-item span { color: var(--ad-orange); font-size: .72rem; font-weight: 800; }.ad-process-item i { color: var(--ad-orange); font-size: 1.55rem; }.ad-process-item strong { font-size: .95rem; }.ad-process-item small { color: var(--ad-muted); }.ad-process-line { height: 1px; min-width: 40px; background: var(--ad-border); }
.ad-delivery { display: flex; align-items: center; gap: 1.25rem; margin-top: 2rem; padding: 1.25rem 1.5rem; border: 0; background: var(--ad-orange-soft); box-shadow: none; }.ad-delivery-icon { display: grid; place-items: center; flex: 0 0 52px; height: 52px; border-radius: 16px; background: var(--ad-orange); color: #fff; font-size: 1.5rem; }.ad-delivery h2 { margin: .15rem 0 .2rem; font-size: 1.2rem; }.ad-delivery p { margin: 0; color: var(--ad-ink-2); }
.ad-fleet { padding: 4rem 0 1rem; }.ad-fleet-card { display: grid; gap: .1rem; height: 100%; padding: 1.25rem; border: 1px solid var(--ad-border); border-radius: var(--ad-radius); background: var(--ad-surface); transition: transform .25s, box-shadow .25s, border-color .25s; }.ad-fleet-card:hover { transform: translateY(-5px); border-color: var(--ad-orange); box-shadow: var(--ad-shadow-lg); }.ad-fleet-card i { margin-bottom: .75rem; color: var(--ad-orange); font-size: 1.8rem; }.ad-fleet-card small { margin-top: .65rem; color: var(--ad-muted); }.ad-fleet-card b { font-size: .95rem; }
.ad-driver-banner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 4rem; padding: 2rem clamp(1.25rem, 4vw, 3rem); border-radius: var(--ad-radius); background: var(--ad-ink); color: #fff; }.ad-driver-banner h2 { margin: .35rem 0; font-size: clamp(1.35rem, 3vw, 2rem); }.ad-driver-banner p { margin: 0; color: rgba(255, 255, 255, .65); }.ad-final-cta { max-width: 440px; padding: 4rem 0 2rem; text-align: center; }.ad-final-cta p { color: var(--ad-muted); font-size: 1.1rem; }
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }.reveal-in { opacity: 1; transform: none; }
@keyframes ad-spin { to { transform: rotate(360deg); } } @keyframes ad-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (max-width: 700px) { .ad-hero { grid-template-columns: 1fr; margin-top: 0; padding: 2rem 1.25rem 1.5rem; border-radius: 0 0 24px 24px; }.ad-hero h1 { font-size: 2.65rem; }.ad-hero-orbit { min-height: 150px; transform: scale(.72); transform-origin: top center; margin-bottom: -70px; }.ad-hero-note { right: 5%; }.ad-process { padding-top: 2.5rem; }.ad-process-grid { grid-template-columns: repeat(3, 1fr); gap: .5rem; }.ad-process-line { display: none; }.ad-delivery { align-items: flex-start; flex-wrap: wrap; }.ad-delivery .flex-grow-1 { min-width: calc(100% - 70px); }.ad-delivery .btn { margin-left: 68px; }.ad-fleet { padding-top: 3rem; }.ad-driver-banner { align-items: flex-start; flex-direction: column; margin-top: 3rem; }.ad-driver-banner .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .ad-orbit-ring, .ad-hero-pin { animation: none; } [data-reveal] { opacity: 1; transform: none; transition: none; }.ad-fleet-card, .ad-estimator label.btn { transition: none; } }
