/* frontend/style.css
   ==========================================================
   Livraison Lefort — Identité visuelle L21STUDIOS
   Apple-like (sobre, épuré), bleu nuit + bleu vif L21STUDIOS
   ========================================================== */

/* Police de marque L21STUDIOS */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  /* Tokens nommes par ROLE, vocabulaire commun avec driver.css (PWA livreur).
     --action = couleur des boutons et liens ; --navy = fond sombre et texte fort.
     Ne jamais renommer une couleur d'apres sa teinte : la teinte change, le role reste. */
  /* Or L21 : la couleur de l'action principale, sur toute la plateforme. */
  --gold: #f8bb02;
  --gold-dark: #D9A400;
  /* Texte pose sur un aplat or (l'or est trop clair pour du blanc). */
  --on-gold: #0D1626;
  --action: #1F9CF0;
  --navy: #0D1626;
  --action-light: #E8F4FE;
  --action-soft: #9BD0F5;
  --text: #1A1A1A;
  --text-secondary: #3A3A3A;
  --gray-700: #4A4A4A;
  --gray-600: #6A6A6A;
  --gray-500: #8A8A8A;
  --gray-400: #AFAFAF;
  --gray-300: #D4D4D4;
  --gray-200: #E8E8E6;
  --gray-100: #F4F3F1;
  --gray-50: #FAF9F7;
  --white: #FFFFFF;
  --success: #2D7D5F;
  --danger: #C0392B;
  --warning: #E09F3E;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--white);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* -------- LAYOUT -------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 580px; }

.centered-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--gray-100);
}

.row { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* -------- LOGO -------- */
.logo-mark {
  background: var(--action);
  border-radius: 16px;
  display: grid; place-items: center;
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-style: italic;
  flex-shrink: 0;
}
.logo-mark:not(.small):not(.tiny) {
  width: 64px; height: 64px;
  font-size: 36px;
  margin: 0 auto 24px;
}
.logo-mark.small {
  width: 48px; height: 48px; font-size: 26px;
  border-radius: 12px; margin: 0 auto 20px;
}
.logo-mark.tiny {
  width: 34px; height: 34px; font-size: 18px;
  border-radius: 8px;
}

/* -------- SITE NAV (publique) -------- */
.site-nav {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--gray-200);
  padding: 14px 0;
  z-index: 1000;
}

/* Leaflet a un z-index par défaut très élevé. On force les conteneurs
   de cartes à rester sous la barre noire fixe (z-index 1000). */
.leaflet-container {
  z-index: 1 !important;
}
.leaflet-pane,
.leaflet-top,
.leaflet-bottom {
  z-index: 400 !important;
}
.leaflet-control {
  z-index: 500 !important;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand-name {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.nav-link:hover { color: var(--action); }

/* -------- APP BAR (pages connectées) -------- */
/* ============================================================
   RÉCAP COLIS — ligne unifiée avec séparateurs
   ============================================================ */
.detail-item-summary {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-700);
}
.detail-item-summary > span {
  display: inline;
}
.detail-item-summary strong {
  color: var(--text);
  font-weight: 600;
}
.sum-sep {
  color: var(--gray-300);
  margin: 0 6px;
  font-weight: 300;
}
@media (max-width: 700px) {
  .detail-item-summary { font-size: 12px; line-height: 1.8; }
  .sum-sep { display: inline-block; margin: 0 4px; }
}
.brand {
  font-weight: 600;
  font-size: 16px;
}
.back-link {
  color: var(--action);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.user-badge {
  background: var(--gray-100);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* -------- PUBLIC HERO -------- */
.public-hero {
  padding: 80px 0 60px;
  text-align: center;
  background: var(--white);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--gray-200);
}
.public-hero::before { display: none; }
.public-hero > * { position: relative; z-index: 1; }
.public-hero .hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  /* Etendu d'une tuile (160px) vers le bas : le defilement d'exactement
     une tuile boucle sans couture et ne laisse jamais de vide. */
  height: calc(100% + 160px);
  opacity: 0.06;
  z-index: 0;
  pointer-events: none;
  animation: hero-ndop-drift 45s linear infinite;
  will-change: transform;
}
@keyframes hero-ndop-drift {
  from { transform: translateY(0); }
  to { transform: translateY(-160px); }
}
@media (prefers-reduced-motion: reduce) {
  .public-hero .hero-pattern { animation: none; }
}
.public-hero-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  color: var(--navy);
}
.public-hero-title em {
  font-style: italic;
  color: var(--navy);
}
.public-hero-sub {
  font-size: 18px;
  color: #3a3933;
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.55;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hero-cta .btn { width: auto; }
.hero-meta {
  font-size: 13px;
  color: #3a3933;
  margin-top: 8px;
}
.hero-meta strong { color: var(--navy); }

.public-hero .btn-primary {
  background: var(--gold);
  color: var(--on-gold);
}
.public-hero .btn-primary:hover { background: var(--gold-dark); }
.public-hero .btn-secondary {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}
.public-hero .btn-secondary:hover { background: #1a2740; border-color: #1a2740; color: #ffffff; }

/* -------- SECTIONS -------- */
.public-section {
  padding: 80px 0;
}
.public-section.grey {
  background: var(--gray-50);
}
.section-h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 40px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--gray-500);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto 48px;
}

/* -------- FEATURE GRID (3 cards grandes) -------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 32px 28px;
  text-align: center;
  transition: all 0.2s;
}
.feature-card:hover {
  border-color: var(--action);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  font-size: 36px;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.55;
}

/* -------- DETAIL GRID (6 petits items) -------- */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.detail-item {
  padding: 0;
}
.detail-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: var(--action);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.detail-item h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.detail-item p {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.55;
}

/* -------- PRICING -------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pricing-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
}
.pricing-card.featured {
  border: 2px solid var(--action);
  background: var(--action-light);
}
.pricing-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  font-weight: 600;
  margin-bottom: 6px;
}
.pricing-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--gray-200);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}
.pricing-card.featured .pricing-step-number {
  background: var(--action);
  color: white;
}
.pricing-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}
.pricing-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
  white-space: nowrap;
}
.pricing-value {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}
.pricing-card.featured .pricing-value {
  color: var(--navy);
}
.pricing-unit {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  white-space: normal;
}
.pricing-desc {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.55;
  margin-top: auto;
}
.pricing-sub {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-200);
}
.pricing-sub-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--gray-700);
}

/* ==========================================================
   PALETTE PAR SECTION — jaune #f8bb02 / bleu nuit #0D1626 / gris
   (bloc dédié, facile à ajuster)
   ========================================================== */

/* Services (bloc après le hero) : section bleu nuit, cartes blanches */
#services { background: var(--navy); }
#services .section-h2 { color: #ffffff; }
#services .section-sub { color: #aab6c9; }
#services .feature-card:hover { border-color: #f8bb02; }

/* Pensé pour l'Afrique : fond JAUNE, petits blocs en bleu nuit.
   Scopé à #afrique / .detail-grid : ne pas teindre la section "Rejoindre"
   (aussi .grey) ni le .detail-item du détail d'une commande. */
#afrique { background: #f8bb02; }
#afrique .section-sub { color: #3a3933; }
.detail-grid .detail-item {
  background: var(--navy);
  border-radius: 16px;
  padding: 22px 20px;
}
.detail-grid .detail-num { color: #f8bb02; }
.detail-grid .detail-item h4 { color: #ffffff; }
.detail-grid .detail-item p { color: #aab6c9; }

/* Tarification : fond blanc, étapes 1 et 3 en jaune, étape 2 en bleu nuit */
.pricing-card { background: #f8bb02; border-color: #e0a800; }
.pricing-card .pricing-step { color: #3a3933; }
.pricing-card .pricing-step-number { background: var(--navy); color: #f8bb02; }
.pricing-card .pricing-label,
.pricing-card .pricing-value { color: var(--navy); }
.pricing-card .pricing-unit,
.pricing-card .pricing-desc,
.pricing-card .pricing-sub-row { color: #3a3933; }
.pricing-card .pricing-sub-row strong { color: var(--navy); }
.pricing-card .pricing-sub { border-top-color: rgba(13, 22, 38, 0.25); }

.pricing-card.featured { background: var(--navy); border: 2px solid #f8bb02; }
.pricing-card.featured .pricing-step { color: #aab6c9; }
.pricing-card.featured .pricing-step-number { background: #f8bb02; color: var(--navy); }
.pricing-card.featured .pricing-label { color: #ffffff; }
.pricing-card.featured .pricing-value { color: #f8bb02; }
.pricing-card.featured .pricing-unit,
.pricing-card.featured .pricing-desc,
.pricing-card.featured .pricing-sub-row { color: #cdd6e4; }
.pricing-card.featured .pricing-sub-row strong { color: #ffffff; }
.pricing-card.featured .pricing-sub { border-top-color: rgba(255, 255, 255, 0.2); }
.pricing-sub-row strong {
  color: var(--text);
  white-space: nowrap;
}
.pricing-note {
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
  color: var(--gray-700);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding: 18px 24px;
  background: var(--action-light);
  border-radius: 14px;
}

/* -------- JOIN GRID -------- */
.join-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.join-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 32px 28px;
  text-align: center;
}
.join-icon {
  font-size: 40px;
  margin-bottom: 16px;
}
.join-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.join-card p {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.55;
  margin-bottom: 18px;
  min-height: 60px;
}

/* -------- FOOTER -------- */
.site-footer {
  background: var(--text);
  color: white;
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  max-width: 280px;
}
.footer-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-link {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 4px 0;
}
.footer-link:hover { color: white; }
.footer-contact {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
}
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* -------- CARDS (pages internes) -------- */
.card {
  background: white;
  border-radius: 20px;
  padding: 40px 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-md);
  text-align: center;
}

/* -------- TYPO -------- */
.h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.sub {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 24px;
}
.hint {
  color: var(--gray-500);
  font-size: 12px;
  margin-top: 6px;
}
.muted { color: var(--gray-500); }

/* -------- HERO (interne) -------- */
.hero {
  background: white;
  border-radius: 20px;
  padding: 40px 32px;
  margin: 24px 0 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.hero-title em {
  font-style: italic;
  color: var(--action);
}
.hero-sub {
  color: var(--gray-500);
  font-size: 15px;
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* -------- SECTION (interne) -------- */
.section { margin-bottom: 24px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  font-weight: 600;
  margin: 24px 0 10px;
}

/* -------- FIELD -------- */
.field {
  margin-bottom: 14px;
  text-align: left;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  background: white;
  color: var(--text);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--action);
  box-shadow: 0 0 0 3px var(--action-light);
}

/* -------- BUTTONS -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  margin-top: 8px;
  transition: all 0.15s;
}
.btn.small {
  padding: 8px 14px;
  font-size: 13px;
  width: auto;
  margin-top: 0;
}
.btn.large {
  padding: 16px 28px;
  font-size: 16px;
  margin-top: 20px;
  width: auto;
}
.btn-primary {
  background: var(--text);
  color: white;
}
.btn-primary:hover { background: var(--navy); }
.btn-accent {
  background: var(--gold);
  color: var(--on-gold);
}
.btn-accent:hover { background: var(--gold-dark); }
.btn-secondary {
  background: white;
  color: var(--text);
  border: 1.5px solid var(--gray-300);
}
.btn-secondary:hover { border-color: var(--action); color: var(--action); }
.btn-ghost {
  background: var(--gray-100);
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--gray-200); }

/* -------- CHIPS -------- */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 100px;
  background: var(--gray-100);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
}
.chip input { display: none; }
.chip:has(input:checked) {
  background: var(--action-light);
  color: var(--navy);
  border-color: var(--action);
}

/* -------- PHONE INPUT (sélecteur pays + numéro) -------- */
.phone-input {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.country-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  flex-shrink: 0;
  transition: all 0.15s;
}
.country-selector:hover { border-color: var(--action); }
.country-selector .chevron {
  font-size: 10px;
  color: var(--gray-500);
  margin-left: 2px;
}
.phone-input input {
  flex: 1;
  margin: 0;
}

/* -------- LISTE DES PAYS -------- */
.country-list {
  position: relative;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.country-search {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--gray-200);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  background: var(--gray-50);
}
.country-list-items {
  max-height: 240px;
  overflow-y: auto;
}
.country-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.12s;
}
.country-item:last-child { border-bottom: none; }
.country-item:hover { background: var(--action-light); }
.country-item-flag {
  font-size: 20px;
  flex-shrink: 0;
}
.country-item-name {
  flex: 1;
  font-size: 14px;
  text-align: left;
  color: var(--text);
}
.country-item-dial {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

/* -------- SUMMARY -------- */
.summary {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 12px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.summary-row.total {
  border-top: 1px solid var(--gray-200);
  padding-top: 10px;
  margin-top: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 16px;
}

/* -------- INFO BOX -------- */
.info-box {
  background: var(--action-light);
  border-left: 3px solid var(--action);
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 16px;
  text-align: left;
  font-size: 12px;
  color: var(--navy);
  line-height: 1.5;
}
.code-display {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  background: white;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.1em;
}

/* -------- Saisie OTP en cases (standard L21) -------- */
.otp-boxes { display: flex; gap: 8px; justify-content: center; margin: 4px 0 8px; }
.otp-box {
  flex: 1;
  min-width: 0;
  max-width: 52px;
  aspect-ratio: 1;
  text-align: center;
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  background: white;
  border: 1.5px solid var(--gray-300);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.otp-box:focus { border-color: var(--action); box-shadow: 0 0 0 3px var(--action-light); }

/* -------- ORDERS LIST -------- */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.order-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: white;
  border-radius: 14px;
  border: 1px solid var(--gray-200);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}
.order-card:hover {
  border-color: var(--action);
  box-shadow: var(--shadow-md);
}
.order-icon {
  width: 44px; height: 44px;
  background: var(--action-light);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.order-meta {
  flex: 1;
  min-width: 0;
}
.order-ref {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
}
.order-sub {
  font-size: 14px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-sub.muted {
  color: var(--gray-500);
  font-size: 12px;
}
.order-right {
  text-align: right;
  flex-shrink: 0;
}
.order-amount {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

/* -------- STATUS BADGES -------- */
.status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.status-pending_payment,
.status-paid { background: #FAF0D8; color: #8A6500; }
.status-assigned,
.status-accepted { background: var(--action-light); color: var(--navy); }
.status-picked_up,
.status-in_transit { background: #E0EBFE; color: #1E56A0; }
.status-delivered { background: #DCF2E8; color: var(--success); }
.status-cancelled { background: #F5DDDB; color: var(--danger); }

/* -------- STATES -------- */
.loading,
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-500);
}
.empty-state p:first-child {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}
.error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
}

/* -------- RESPONSIVE -------- */
@media (max-width: 900px) {
  .nav-links .nav-link { display: none; }
  .public-hero-title { font-size: 40px; }
  .section-h2 { font-size: 30px; }
  .feature-grid,
  .detail-grid,
  .join-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .public-hero { padding: 60px 0 40px; }
  .public-hero-title { font-size: 32px; }
}

/* ============================================================
   AUTH — Onglets méthode (WhatsApp / Email)
   ============================================================ */
.method-tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}
.method-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.method-tab.active {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.method-tab.disabled,
.method-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.method-tab .soon {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  background: var(--gray-200);
  border-radius: 999px;
  vertical-align: middle;
}
.method-form {
  text-align: left;
}

.tiny-note {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 14px;
  text-align: center;
  line-height: 1.5;
}
.link {
  color: var(--action);
  text-decoration: none;
}
.link:hover { text-decoration: underline; }

/* ============================================================
   APP BAR (pages internes)
   ============================================================ */
.items-badge {
  display: inline-block;
  padding: 1px 7px;
  background: var(--action-light);
  color: var(--navy);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================================
   WIZARD — Barre de progression (4 étapes)
   ============================================================ */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 0 8px;
}
.wiz-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.wiz-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  transition: all 0.2s;
}
.wiz-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.wiz-step.active .wiz-dot {
  background: var(--action);
  color: white;
  box-shadow: 0 0 0 4px var(--action-light);
}
.wiz-step.active .wiz-label { color: var(--action); }
.wiz-step.done .wiz-dot {
  background: var(--success);
  color: white;
}
.wiz-step.done .wiz-dot::after {
  content: '';
  display: none;
}
.wiz-step.done .wiz-label { color: var(--success); }
.wiz-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin: 0 8px;
  margin-bottom: 22px;
}

/* ============================================================
   WIZARD — Panneaux
   ============================================================ */
.wiz-panel {
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.wiz-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}
.wiz-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.wiz-sub {
  font-size: 14px;
  color: var(--gray-700);
}

.wiz-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}
.wiz-actions .btn {
  margin-top: 0;
  width: auto;
  flex: 1;
}
.wiz-actions .btn-ghost { flex: 0 0 auto; }

/* ============================================================
   ADDRESS TABS (Manuel / Carte / Relais / Favori)
   ============================================================ */
.address-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: var(--gray-100);
  border-radius: 10px;
  padding: 4px;
  margin: 16px 0;
}
.address-tab {
  padding: 8px 4px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.address-tab.active {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.address-form {
  padding: 8px 0;
}

/* ============================================================
   PLACES suggestions (autocomplétion lieux connus)
   ============================================================ */
.place-suggestions {
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: white;
}
.place-suggestions:empty {
  display: none;
}
.place-suggestion {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.place-suggestion:hover { background: var(--action-light); }
.place-suggestion:last-child { border-bottom: none; }
.place-meta {
  color: var(--gray-500);
  font-size: 11px;
}

/* ============================================================
   RELAY cards (liste points relais sélectionnables)
   ============================================================ */
.relay-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.relay-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
}
.relay-card:hover {
  border-color: var(--action);
  background: var(--gray-50);
}
.relay-card.selected {
  border-color: var(--action);
  background: var(--action-light);
}
.relay-icon {
  width: 40px;
  height: 40px;
  background: var(--action-light);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.relay-card.selected .relay-icon {
  background: var(--action);
  color: white;
}
.relay-info { flex: 1; min-width: 0; }
.relay-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}
.relay-meta {
  font-size: 12px;
  color: var(--gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   MAP placeholder
   ============================================================ */
.map-placeholder {
  background: var(--gray-50);
  border: 2px dashed var(--gray-300);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  margin: 12px 0;
}
.map-pin-icon {
  font-size: 40px;
  margin-bottom: 10px;
}
.map-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.map-sub {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ============================================================
   MULTI toggle et ITEM cards
   ============================================================ */
.multi-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: var(--action-light);
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--navy);
  transition: all 0.15s;
}
.multi-toggle:hover { background: var(--action-soft); }
.multi-toggle input {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--action);
  width: 18px;
  height: 18px;
}
.multi-toggle span { line-height: 1.5; }

.items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.item-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 20px;
}
.item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.item-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--action);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.item-title {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
}
.item-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: white;
  color: var(--gray-500);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.item-remove:hover {
  background: var(--danger);
  color: white;
}

.btn-add-item {
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  background: white;
  border: 2px dashed var(--action);
  border-radius: 14px;
  color: var(--navy);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-add-item:hover {
  background: var(--action-light);
}

.subheading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  font-weight: 600;
  margin: 16px 0 8px;
}

.chips.compact {
  gap: 6px;
}
.chips.compact .chip {
  padding: 6px 12px;
  font-size: 12px;
}

/* ============================================================
   OPTIONS box
   ============================================================ */
.options-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px;
  margin-top: 20px;
}
.options-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  font-weight: 600;
  margin-bottom: 14px;
}
.option-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-200);
  font-size: 14px;
}
.option-toggle:last-child { border-bottom: none; }
.option-toggle input {
  margin-top: 4px;
  accent-color: var(--action);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.option-toggle small {
  color: var(--gray-500);
  font-size: 12px;
}

/* ============================================================
   INFO banner (étape 3)
   ============================================================ */
.info-banner {
  background: var(--action-light);
  border-left: 4px solid var(--action);
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ============================================================
   ITEM NAV (bascule entre colis à l'étape 3)
   ============================================================ */
.item-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--gray-100);
  border-radius: 12px;
}
.item-nav-btn {
  min-width: 48px;
  padding: 10px 14px;
  border: 2px solid transparent;
  background: white;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.item-nav-btn.active {
  background: var(--action);
  color: white;
  border-color: var(--navy);
}
.item-nav-btn.done:not(.active) {
  background: var(--action-light);
  color: var(--navy);
}

/* ============================================================
   DROPOFF editor
   ============================================================ */
.dropoff-header {
  margin-bottom: 16px;
}
.dropoff-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.dropoff-sub {
  font-size: 13px;
  color: var(--gray-500);
}

/* ============================================================
   RECAP (étape 4)
   ============================================================ */
.recap-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
}
.recap-section {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--action);
  font-weight: 700;
  margin-bottom: 14px;
}
.recap-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.recap-row.total {
  border-top: 1px solid var(--gray-200);
  padding-top: 12px;
  margin-top: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 16px;
}
.recap-row.total strong {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--navy);
}
.recap-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--gray-200);
  font-size: 13px;
}
.recap-item:last-of-type {
  border-bottom: none;
}
.recap-small {
  color: var(--gray-500);
  font-size: 12px;
  margin-top: 2px;
}
.edit-link {
  display: inline-block;
  margin-top: 10px;
  margin-right: 14px;
  color: var(--action);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.edit-link:hover { text-decoration: underline; }

/* ============================================================
   Empty state (petit)
   ============================================================ */
.empty-state.small {
  padding: 20px;
  background: var(--gray-50);
  border-radius: 10px;
  text-align: center;
}
.empty-state.small p {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

/* ============================================================
   CARTE LEAFLET
   ============================================================ */
.map-container {
  width: 100%;
  height: 360px;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--gray-200);
}
.leaflet-container {
  font-family: inherit !important;
  border-radius: 14px;
}
.map-address-preview {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--action-light);
  border-radius: 10px;
  font-size: 13px;
  color: var(--navy);
  text-align: center;
  min-height: 40px;
}

/* ============================================================
   OPTIONS INLINE (par colis)
   ============================================================ */
.options-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}
.option-toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 100px;
  cursor: pointer;
  background: white;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.option-toggle-inline:has(input:checked) {
  background: var(--action-light);
  border-color: var(--action);
  color: var(--navy);
}
.option-toggle-inline input {
  accent-color: var(--action);
  margin: 0;
}
.option-toggle-inline small {
  color: var(--gray-500);
  font-size: 11px;
  margin-left: 2px;
}
.option-toggle-inline:has(input:checked) small {
  color: var(--navy);
}

/* ============================================================
   MODE indicator (étape 3)
   ============================================================ */
.mode-indicator {
  margin: 14px 0;
  padding: 10px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font-size: 13px;
  color: var(--gray-700);
  text-align: center;
}
.mode-indicator strong {
  color: var(--navy);
}

/* ============================================================
   PLACE suggestions enrichies
   ============================================================ */
.place-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  transition: background 0.12s;
}
.place-suggestion:hover { background: var(--action-light); }
.place-suggestion:last-child { border-bottom: none; }
.place-suggestion .place-cat {
  font-size: 18px;
  flex-shrink: 0;
}
.address-tab small {
  font-weight: 500;
  color: var(--success);
  margin-left: 2px;
}

/* ============================================================
   ACCORDÉON COLIS
   ============================================================ */
.item-accordion {
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.item-accordion.open {
  border-color: var(--action);
  box-shadow: var(--shadow-sm);
}

.acc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  background: var(--gray-50);
  transition: background 0.15s;
  position: relative;
}
.acc-header:hover { background: var(--action-light); }
.item-accordion.open .acc-header {
  background: var(--action-light);
  border-bottom: 1px solid var(--action-light);
}

.acc-header-number {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--action);
  color: white;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.acc-header-content {
  flex: 1;
  min-width: 0;
}
.acc-line1 {
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}
.acc-line1 strong {
  color: var(--navy);
  margin-right: 4px;
}
.acc-line2 {
  font-size: 12px;
  color: var(--gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-chevron {
  font-size: 12px;
  color: var(--gray-500);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.item-accordion.open .acc-chevron { color: var(--navy); }

.acc-body {
  padding: 20px;
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
  to { opacity: 1; max-height: 2000px; padding-top: 20px; padding-bottom: 20px; }
}

.item-form-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}

/* ============================================================
   NAV entre colis (étape 3) - carousel style
   ============================================================ */
.item-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: var(--gray-100);
  border-radius: 12px;
}
.item-nav-arrow {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: none;
  background: white;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s;
  flex-shrink: 0;
}
.item-nav-arrow:hover:not(:disabled) { background: var(--action); color: white; }
.item-nav-arrow:disabled { opacity: 0.4; cursor: not-allowed; }

.item-nav-dots {
  flex: 1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.item-nav-dot {
  min-width: 40px;
  padding: 8px 12px;
  border: 2px solid transparent;
  background: white;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.item-nav-dot.active {
  background: var(--action);
  color: white;
  border-color: var(--navy);
}
.item-nav-dot.done:not(.active) {
  background: var(--action-light);
  color: var(--navy);
}

/* Carousel transitions */
#dropoff-editor {
  transition: transform 0.2s ease, opacity 0.2s ease;
}
#dropoff-editor.slide-in {
  animation: slideInRight 0.25s ease-out;
}
#dropoff-editor.slide-out {
  animation: slideOutLeft 0.18s ease-in;
  opacity: 0;
}
@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-20px); opacity: 0; }
}

/* ============================================================
   DROPOFF header enrichi (étape 3)
   ============================================================ */
.dropoff-recipient {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.dropoff-info {
  font-size: 12px;
  color: var(--gray-500);
  padding: 6px 10px;
  background: var(--gray-50);
  border-radius: 8px;
  display: inline-block;
  margin-top: 6px;
}

/* ============================================================
   RECAP enrichi
   ============================================================ */
.recap-item {
  padding: 12px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}
.recap-item:last-of-type { margin-bottom: 4px; }
.recap-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.recap-item-head strong {
  color: var(--navy);
  font-size: 14px;
}
.recap-mode-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--action-light);
  color: var(--navy);
  font-weight: 600;
}
.recap-item-info {
  color: var(--gray-700);
  font-size: 12px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--gray-200);
}
.recap-item-row {
  color: var(--text-secondary);
  font-size: 12px;
  padding: 2px 0;
}
.recap-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 10px 0;
}
.recap-addr {
  text-align: right;
  max-width: 60%;
  font-size: 13px;
}
.edit-links-row {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-200);
}

.recap-reassurance {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--action-light);
  border-radius: 12px;
  margin-top: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.rea-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.recap-reassurance strong {
  display: block;
  color: var(--navy);
  margin-bottom: 4px;
  font-size: 14px;
}
.recap-reassurance p {
  color: var(--navy);
  font-size: 12px;
  line-height: 1.5;
}
.recap-row small.muted {
  color: var(--gray-500);
  font-size: 11px;
}

/* ============================================================
   ÉTAPE 2 — Header avec multi-toggle inline
   ============================================================ */
.wiz-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.multi-toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 100px;
  cursor: pointer;
  background: white;
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all 0.15s;
  white-space: nowrap;
}
.multi-toggle-inline:has(input:checked) {
  background: var(--action-light);
  border-color: var(--action);
  color: var(--navy);
  font-weight: 600;
}
.multi-toggle-inline input {
  accent-color: var(--action);
  margin: 0;
}

/* Suppression du multi-toggle ancien (full width) */
.multi-toggle { display: none !important; }

/* ============================================================
   TRUST TOGGLE (faire confiance au livreur)
   ============================================================ */
.trust-toggle-box {
  margin-top: 20px;
  padding: 16px;
  background: var(--action-light);
  border-radius: 12px;
  border: 1px solid var(--action-soft);
}
.trust-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.trust-toggle input {
  width: 18px; height: 18px;
  accent-color: var(--action);
  margin-top: 2px;
  flex-shrink: 0;
}
.trust-toggle strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
  margin-bottom: 4px;
}
.trust-toggle small {
  color: var(--navy);
  font-size: 12px;
  line-height: 1.5;
  display: block;
}

/* ============================================================
   ÉTAPE 3 — Restriction stylisée
   ============================================================ */
.dest-city-row {
  background: var(--action-light);
  border-left: 4px solid var(--action);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dest-city-info {
  font-size: 13px;
  color: var(--navy);
  flex: 1;
}
.dest-city-name {
  color: var(--action);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ============================================================
   PAGE DÉTAIL DE COMMANDE
   ============================================================ */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}
.detail-ref {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}

.detail-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--gray-200);
}
.detail-card.highlight {
  border-color: var(--action);
  background: var(--action-light);
}
.detail-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-card.highlight .detail-card-title { color: var(--navy); }

/* Codes affichés de manière mise en valeur */
.code-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: white;
  border-radius: 12px;
  margin-bottom: 8px;
}
.code-label {
  font-size: 13px;
  color: var(--gray-700);
}
.code-value {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.1em;
  background: var(--action-light);
  padding: 6px 14px;
  border-radius: 8px;
}

.codes-recipients {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--action-soft);
}
.codes-title {
  font-size: 12px;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 8px;
}
.recipient-code {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  color: var(--gray-700);
}
.recipient-code-value {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 700;
  color: var(--navy);
  background: white;
  padding: 2px 10px;
  border-radius: 6px;
  letter-spacing: 0.08em;
}
.recipient-code-value.used {
  background: #DCF2E8;
  color: var(--success);
  text-decoration: line-through;
}

.trust-banner {
  background: white;
  padding: 12px 14px;
  border-radius: 10px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--navy);
  line-height: 1.5;
}
.trust-banner strong { color: var(--action); }

/* Items individuels */
.detail-item {
  padding: 14px;
  background: var(--gray-50);
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--gray-200);
  font-size: 13px;
}
.detail-item.delivered {
  background: #F0F9F4;
  border-color: #C3E8D0;
}
.detail-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.detail-item-head strong {
  color: var(--navy);
  font-size: 14px;
}
.detail-item-info {
  color: var(--gray-700);
  font-size: 12px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--gray-300);
}
.detail-item-row {
  color: var(--text-secondary);
  padding: 2px 0;
  font-size: 12px;
}
.detail-item-confirmed {
  margin-top: 10px;
  padding: 8px 12px;
  background: #DCF2E8;
  color: var(--success);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
.btn-confirm-item {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  background: var(--action);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-confirm-item:hover { background: var(--navy); }

/* Trip preview */
.detail-trip {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.trip-step {
  color: var(--gray-700);
  margin-left: 12px;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding-bottom: 8px;
}
.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: -4px;
  width: 2px;
  background: var(--gray-200);
}
.timeline-step.done:not(:last-child)::after {
  background: var(--success);
}
.timeline-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gray-200);
  color: white;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  z-index: 1;
}
.timeline-step.done .timeline-dot {
  background: var(--success);
}
.timeline-content {
  flex: 1;
  padding-top: 4px;
}
.timeline-content strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}
.timeline-content small {
  font-size: 12px;
  color: var(--gray-500);
}

/* Marqueurs de lieu sur la carte */
.place-marker-mini { background: transparent !important; border: none !important; }
.pmm {
  width: 28px; height: 28px;
  background: white;
  border: 2px solid var(--action);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.popup-select {
  display: inline-block;
  margin-top: 6px;
  color: var(--action);
  font-weight: 600;
  text-decoration: none;
  font-size: 12px;
}
/* ============================================================
   INTERFACE LIVREUR
   ============================================================ */

.driver-app-bar {
  background: var(--text);
  color: white;
}
.driver-app-bar .brand {
  color: white;
}
.driver-app-bar .back-link {
  color: white;
  opacity: 0.85;
}
.driver-app-bar .back-link:hover {
  opacity: 1;
}

.btn-logout {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-logout:hover {
  background: rgba(255,255,255,0.2);
}

.nav-driver {
  background: var(--text);
  color: white !important;
  padding: 8px 14px !important;
  border-radius: 100px;
  font-size: 12px !important;
  font-weight: 600;
}
.nav-driver:hover {
  background: var(--navy);
}

/* ----------- Profil livreur ----------- */
.driver-profile-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--action);
  color: white;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-info {
  flex: 1;
  min-width: 0;
}
.profile-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.profile-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}
.profile-stats {
  font-size: 12px;
  color: var(--gray-700);
  margin-top: 2px;
}

.online-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 2px solid var(--gray-300);
  border-radius: 100px;
  cursor: pointer;
  background: var(--gray-50);
  transition: all 0.2s;
}
.online-toggle input { display: none; }
.online-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gray-400);
}
.online-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-600);
  letter-spacing: 0.05em;
}
.online-toggle.on {
  border-color: #4CAF50;
  background: #E8F5E9;
}
.online-toggle.on .online-dot {
  background: #4CAF50;
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
.online-toggle.on .online-label {
  color: #2E7D32;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(76, 175, 80, 0.05); }
}

/* ----------- Section header avec refresh ----------- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;
}
.section-h2-driver {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
}
.btn-refresh {
  background: white;
  border: 1px solid var(--gray-300);
  padding: 6px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  color: var(--gray-700);
}
.btn-refresh:hover {
  background: var(--gray-50);
  border-color: var(--action);
}

/* ----------- Cartes de courses ----------- */
.course-card {
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.15s;
}
.course-card:hover {
  border-color: var(--action);
  box-shadow: var(--shadow-md);
}
.course-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.course-card-head strong {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  color: var(--navy);
  font-size: 15px;
}
.course-earning {
  font-weight: 700;
  color: #2E7D32;
  background: #E8F5E9;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 14px;
}
.course-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 10px;
}
.course-trip {
  background: var(--gray-50);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.trip-row {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 3px 0;
  line-height: 1.5;
}
.trip-row strong {
  color: var(--gray-700);
  margin-right: 4px;
}
.trip-row .muted { color: var(--gray-500); font-style: italic; }
.course-client {
  font-size: 12px;
  color: var(--gray-700);
  margin-bottom: 12px;
}
.course-client strong { color: var(--text); }
.btn-accept {
  width: 100%;
  background: var(--action);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-accept:hover {
  background: var(--navy);
}

/* ----------- Course active ----------- */
.active-course-card {
  background: linear-gradient(135deg, var(--action) 0%, var(--navy) 100%);
  color: white;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 12px;
}
.active-course-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.active-course-head strong {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 18px;
}
.active-course-card .course-meta {
  color: rgba(255,255,255,0.85);
  margin-top: 4px;
}
.active-course-card .btn-primary {
  background: white;
  color: var(--navy);
  margin-top: 0;
}
.active-course-card .btn-primary:hover {
  background: var(--gray-100);
}

/* ----------- Bandeau de statut ----------- */
.active-status-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  margin-bottom: 16px;
}
.active-status-banner.status-assigned {
  background: #FFF8E1;
  border-left: 4px solid #F9A825;
}
.active-status-banner.status-picked_up,
.active-status-banner.status-in_transit {
  background: #E3F2FD;
  border-left: 4px solid #1976D2;
}
.active-status-banner.status-delivered {
  background: #E8F5E9;
  border-left: 4px solid #4CAF50;
}
.banner-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.active-status-banner strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text);
}
.active-status-banner p {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}

/* ----------- Action card (saisie codes) ----------- */
.action-card {
  background: white;
  border: 2px solid var(--action);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}
.action-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.action-desc {
  font-size: 13px;
  color: var(--gray-700);
  margin-bottom: 14px;
  line-height: 1.5;
}
.action-row {
  display: flex;
  gap: 10px;
}
.action-row .code-input {
  flex: 1;
  padding: 14px 16px;
  font-size: 24px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  border: 2px solid var(--gray-300);
  border-radius: 10px;
  background: var(--gray-50);
  color: var(--navy);
}
.action-row .code-input:focus {
  outline: none;
  border-color: var(--action);
  background: white;
}
.action-row .btn {
  margin-top: 0;
  padding: 0 24px;
  font-size: 14px;
  width: auto;
}

/* Bouton "Livrer" inline pour chaque colis */
.btn-deliver {
  background: var(--action);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-deliver:hover {
  background: var(--navy);
}

/* Code input plus petit pour les colis individuels */
.detail-item .code-input {
  font-size: 18px;
  padding: 10px 12px;
  letter-spacing: 0.15em;
}

/* Lien téléphone */
.phone-link {
  color: var(--action);
  text-decoration: none;
  font-weight: 600;
}
.phone-link:hover {
  text-decoration: underline;
}

/* ----------- Bouton appel rond pour client ----------- */
.btn-call {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #4CAF50;
  color: white;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 18px;
  flex-shrink: 0;
}
.btn-call:hover {
  background: #2E7D32;
}

/* ----------- Bandeau succès ----------- */
.success-banner {
  background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
  color: white;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-top: 20px;
}
.success-banner strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}
.success-banner p {
  font-size: 14px;
  opacity: 0.95;
  margin-bottom: 16px;
}
.success-banner .btn {
  background: white;
  color: #2E7D32;
  margin-top: 0;
  width: auto;
  padding: 10px 24px;
}

/* ============================================================
   TRACKING LIVREUR (côté client)
   ============================================================ */
.driver-info-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--action-light);
  border-radius: 12px;
  border: 1px solid var(--action-soft);
}
.driver-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--action);
  color: white;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.driver-info-content {
  flex: 1;
  min-width: 0;
}
.driver-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}
.driver-meta {
  font-size: 12px;
  color: var(--gray-700);
  margin-bottom: 4px;
}
.driver-status {
  font-size: 11px;
  color: #2E7D32;
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  animation: pulse-dot 1.6s ease-in-out infinite;
  display: inline-block;
}
.btn-call-driver {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #4CAF50;
  color: white;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 18px;
  flex-shrink: 0;
}
.btn-call-driver:hover {
  background: #2E7D32;
}

/* Marqueur livreur sur la carte (animation pulsante) */
.marker-driver-pulse { background: transparent !important; border: none !important; }
.driver-pulse {
  width: 40px; height: 40px;
  background: #FF6B35;
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  border: 3px solid white;
  box-shadow: 0 2px 12px rgba(255, 107, 53, 0.5);
  animation: marker-pulse 2s ease-in-out infinite;
}
@keyframes marker-pulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(255, 107, 53, 0.5); transform: scale(1); }
  50% { box-shadow: 0 2px 18px rgba(255, 107, 53, 0.8); transform: scale(1.05); }
}

/* Status badges enrichis */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pending_payment, .status-pending {
  background: var(--gray-100);
  color: var(--gray-700);
}
.status-paid {
  background: #E3F2FD;
  color: #1976D2;
}
.status-assigned {
  background: #FFF8E1;
  color: #F57F17;
}
.status-picked_up, .status-in_transit {
  background: #E0F7FA;
  color: #00838F;
}
.status-delivered {
  background: #E8F5E9;
  color: #2E7D32;
}
.status-cancelled {
  background: #FFEBEE;
  color: #C62828;
}

/* ============================================================
   ÉTAPE RÉCAP — Carte route + ventilation par colis
   ============================================================ */
.recap-map-box .map-container {
  margin-top: 0;
}
.route-source-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-700);
}
.recap-item-fees {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--gray-200);
  font-size: 12px;
}
.recap-item-fees span {
  color: var(--gray-500);
}
.recap-item-fees strong {
  color: var(--navy);
  font-size: 14px;
}

/* ============================================================
   PARTAGE DU SUIVI
   ============================================================ */
.detail-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-share {
  background: var(--action);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-share:hover {
  background: var(--navy);
}

.btn-cancel-order {
  background: white;
  color: #C62828;
  border: 1px solid #FFCDD2;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-cancel-order:hover {
  background: #FFEBEE;
  border-color: #EF9A9A;
}
.cancelled-banner {
  border-left: 4px solid #C62828;
  background: #FFF8F8;
}

/* ============================================================
   PAGE TRACK PUBLIQUE
   ============================================================ */
.track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
  flex-wrap: wrap;
  gap: 10px;
}
.track-ref {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}

/* ============================================================
   STATS LIVREUR
   ============================================================ */
.period-tabs {
  display: flex;
  gap: 4px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.period-tab {
  flex: 1;
  padding: 8px 14px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  border-radius: 100px;
  transition: all 0.15s;
}
.period-tab.active {
  background: white;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 16px;
}
.stat-card-main {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--action) 0%, var(--navy) 100%);
  color: white;
  border-color: transparent;
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  font-weight: 600;
  margin-bottom: 6px;
}
.stat-card-main .stat-label {
  color: rgba(255,255,255,0.85);
}
.stat-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--navy);
}
.stat-card-main .stat-value {
  color: white;
  font-size: 36px;
}
.stat-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-500);
}
.stat-card-main .stat-unit {
  color: rgba(255,255,255,0.7);
}

.stats-summary-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}
.ss-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.ss-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.ss-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.ss-value small {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 400;
}

/* Graphique */
.chart-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 140px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.chart-bar-wrapper {
  flex: 0 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: help;
}
.chart-bar {
  width: 100%;
  min-height: 2px;
  background: linear-gradient(180deg, var(--action) 0%, var(--navy) 100%);
  border-radius: 4px 4px 0 0;
  transition: all 0.2s;
}
.chart-bar:hover { opacity: 0.85; transform: scaleY(1.05); }
.chart-bar-label {
  font-size: 9px;
  color: var(--gray-500);
  white-space: nowrap;
  transform: rotate(-45deg);
  transform-origin: top left;
  margin-top: 4px;
}

.history-item {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
}
.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.history-head strong {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--navy);
}
.history-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--gray-700);
}
.history-earning {
  color: #2E7D32;
  background: #E8F5E9;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.link-stats {
  color: var(--action);
  text-decoration: none;
  font-weight: 600;
}
.link-stats:hover { text-decoration: underline; }

/* ============================================================
   MODALE GÉNÉRIQUE
   ============================================================ */
.lf-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.lf-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modal-appear 0.2s ease-out;
}
@keyframes modal-appear {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lf-modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lf-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.lf-modal-close {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--gray-500);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.lf-modal-close:hover { background: var(--gray-100); }
.lf-modal-body {
  padding: 20px;
  overflow-y: auto;
}

/* Items du carnet */
.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.btn-mini-link {
  background: transparent;
  border: 1px solid var(--action);
  color: var(--navy);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-mini-link:hover {
  background: var(--action-light);
}
.favorites-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.favorite-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.favorite-item:hover {
  border-color: var(--action);
  background: var(--action-light);
}
.favorite-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--action);
  color: white;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.favorite-info {
  flex: 1;
  min-width: 0;
}
.favorite-info strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}
.favorite-meta {
  font-size: 12px;
  color: var(--gray-500);
}

/* ============================================================
   ANNULATION COURSE LIVREUR
   ============================================================ */
.btn-cancel-driver {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  background: transparent;
  border: 1px solid #FFCDD2;
  color: #C62828;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-cancel-driver:hover {
  background: #FFEBEE;
  border-color: #EF5350;
}
.btn-danger {
  background: #C62828;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger:hover { background: #B71C1C; }

.cancel-reasons-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cancel-reason-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}
.cancel-reason-item:has(input:checked) {
  border-color: var(--action);
  background: var(--action-light);
}
.cancel-reason-item input { margin: 0; }
.cancel-reason-label { flex: 1; }
.cancel-severity {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cancel-severity-low {
  background: #E8F5E9;
  color: #2E7D32;
}
.cancel-severity-medium {
  background: #FFF3E0;
  color: #E65100;
}
.cancel-severity-high {
  background: #FFEBEE;
  color: #C62828;
}

/* ============================================================
   SCORE LIVREUR
   ============================================================ */
.driver-score-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.driver-score-label {
  font-size: 12px;
  color: var(--gray-500);
}
.driver-score-value {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
}
.score-good {
  background: #E8F5E9;
  color: #2E7D32;
}
.score-warning {
  background: #FFF3E0;
  color: #E65100;
}
.score-danger {
  background: #FFEBEE;
  color: #C62828;
}
.driver-suspended-badge {
  background: #424242;
  color: white;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 600;
}

/* ============================================================
   COURSE ACTIVE sur la home (pulse subtil)
   ============================================================ */
.order-card-active {
  border-color: var(--action) !important;
  background: linear-gradient(90deg, var(--action-light) 0%, white 30%) !important;
  position: relative;
}
.order-card-active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--action);
  border-radius: 16px 0 0 16px;
}

/* ============================================================
   Badge d'âge des courses (driver-home)
   ============================================================ */
.course-age {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.course-age.age-fresh {
  background: #E8F5E9;
  color: #2E7D32;
}
.course-age.age-medium {
  background: #FFF3E0;
  color: #E65100;
}
.course-age.age-old {
  background: #FFEBEE;
  color: #C62828;
}
.course-age.age-very-old {
  background: #424242;
  color: white;
}

/* ==========================================================
   Bouton flottant « Nous écrire sur WhatsApp »
   Click-to-chat (le client initie) : aucun template Meta requis.
   ========================================================== */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #25D366;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.wa-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.24);
}
.wa-float .wa-icon { font-size: 18px; line-height: 1; }
/* Sur mobile : bouton rond, texte masqué pour ne pas gêner */
@media (max-width: 640px) {
  .wa-float { padding: 14px; }
  .wa-float .wa-label { display: none; }
}

/* ==========================================================
   ESPACE CLIENT — accueil (mobile d'abord, deux colonnes au bureau)
   ==========================================================
   La page suit une hierarchie stricte : ce qui se passe MAINTENANT
   (course en cours), puis l'action unique (envoyer), puis l'historique.
   Les pictogrammes viennent de icons.js : plus aucun emoji.
   ========================================================== */

.home-layout {
  max-width: 1140px;
  padding-top: 24px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  align-items: start;
}
.home-main { min-width: 0; }
/* La colonne laterale n'existe qu'au bureau : sur mobile elle diluerait
   l'action principale. */
.home-side { display: none; }

@media (min-width: 960px) {
  .home-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
  .home-side { display: grid; gap: 16px; position: sticky; top: 88px; }
}

/* ---- Bandeau de course en cours ---- */
.active-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.active-banner:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.active-banner[hidden] { display: none; }
.active-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: #f8bb02;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(248, 187, 2, 0.6);
  animation: lf-pulse 2s ease-out infinite;
}
@keyframes lf-pulse {
  70% { box-shadow: 0 0 0 10px rgba(248, 187, 2, 0); }
  100% { box-shadow: 0 0 0 0 rgba(248, 187, 2, 0); }
}
@media (prefers-reduced-motion: reduce) { .active-pulse { animation: none; } }
.active-texts { flex: 1; min-width: 0; display: grid; gap: 2px; }
.active-texts strong { font-size: 14px; font-weight: 700; }
.active-texts span {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.active-chevron { display: flex; color: rgba(255, 255, 255, 0.6); flex-shrink: 0; }

/* ---- Carte d'action principale ---- */
.send-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 16px;
}
.send-title { font-size: 24px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.02em; }
.send-sub { font-size: 14px; color: var(--gray-500); margin: 0; }
.send-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.send-cta span { display: flex; }
@media (min-width: 620px) {
  .send-card { grid-template-columns: 1fr auto; align-items: center; }
  .send-cta { justify-self: end; }
}

.icon-btn { display: inline-flex; align-items: center; gap: 6px; }
.icon-btn span { display: flex; }

/* ---- Colonne laterale ---- */
.side-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 18px;
}
.side-title { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.side-sub { font-size: 13px; color: var(--gray-500); margin: 0 0 14px; line-height: 1.5; }
.side-empty { font-size: 13px; color: var(--gray-500); margin: 0; }
.side-steps { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.side-steps li { font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }

.recipients-list { display: grid; gap: 10px; }
.recipient-row { display: flex; align-items: center; gap: 10px; }
.recipient-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.recipient-texts { display: grid; gap: 1px; min-width: 0; }
.recipient-texts strong {
  font-size: 13.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.recipient-texts span { font-size: 12px; color: var(--gray-500); }

.loading.small { font-size: 13px; padding: 8px 0; }

/* Les pictogrammes remplacent les emojis : la boite garde sa taille, mais
   le trait prend la couleur du texte au lieu d'une couleur d'emoji figee. */
.order-icon svg { display: block; color: var(--navy); }
.wa-icon { display: flex; }

/* ==========================================================
   POSTE D'EXPEDITION — formulaire de course au bureau
   ==========================================================
   Sur mobile, les 4 etapes s'enchainent avec une barre de progression
   horizontale : c'est le bon geste au pouce.

   Sur un grand ecran, cette barre gaspille toute la largeur et le client
   perd le fil de ce qu'il a deja saisi. Le fil d'etapes passe donc a la
   verticale, colle a gauche, et le panneau actif occupe la colonne large.
   Une boutique qui expedie tous les jours voit ainsi ou elle en est sans
   quitter des yeux le formulaire.
   ========================================================== */

@media (min-width: 960px) {
  .container.narrow.wizard-layout {
    max-width: 1000px;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }

  /* Fil d'etapes vertical, colle pendant le defilement. */
  .wizard-layout .wizard-progress {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 88px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
  }
  .wizard-layout .wiz-step {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
  }
  .wizard-layout .wiz-label { margin-top: 0; text-align: left; }
  /* Le trait entre deux etapes devient un segment vertical. */
  .wizard-layout .wiz-line {
    width: 2px;
    height: 26px;
    margin: 4px 0 4px 15px;
    flex: 0 0 auto;
  }

  /* Tous les panneaux partagent la meme cellule : un seul est affiche a la
     fois, le JS s'en charge deja. */
  .wizard-layout .wiz-panel {
    grid-column: 2;
    grid-row: 1;
    padding: 36px;
  }
}

/* Pictogrammes des titres et onglets du formulaire de course. */
.titre-ico, .onglet-ico { display: inline-flex; vertical-align: -3px; margin-right: 8px; }
.titre-ico svg { color: var(--gold-dark); }
.onglet-ico { margin-right: 6px; vertical-align: -2px; }
.onglet-ico svg { color: currentColor; }

/* Filiation de marque, en pied des ecrans d'authentification : le code
   WhatsApp arrive au nom de L21STUDIOS et non de Livraison Lefort. */
.filiation {
  text-align: center;
  font-size: 12.5px;
  color: var(--gray-500);
  margin: 18px auto 0;
  max-width: 480px;
  width: 100%;
}

/* ==========================================================
   OUTILS DE CARTE — chercher un lieu, se localiser
   ==========================================================
   La manipulation de carte est le geste le plus penible du parcours de
   commande, surtout au pouce. Ces deux raccourcis l'evitent dans la
   majorite des cas.
   ========================================================== */

.map-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.map-search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 0 12px;
}
.map-search-ico { display: flex; color: var(--gray-500); flex-shrink: 0; }
.map-search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 11px 0;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  min-width: 0;
}
.map-search input:focus { outline: none; }
.map-search:focus-within { border-color: var(--navy); background: var(--white); }

.map-locate { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; }
.map-locate span { display: flex; }

.map-results {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
  margin-bottom: 10px;
}
.map-results[hidden] { display: none; }
.map-result {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--gray-100);
  padding: 11px 13px;
  cursor: pointer;
  font-family: inherit;
}
.map-result:last-child { border-bottom: 0; }
.map-result:hover, .map-result:focus-visible { background: var(--gray-50); }
.map-result-nom { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.map-result-detail {
  display: block; font-size: 12px; color: var(--gray-500);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.map-result-empty { padding: 12px 13px; font-size: 13.5px; color: var(--gray-500); }

.map-locate-status {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0 0 10px;
  line-height: 1.5;
}
.map-locate-status[hidden] { display: none; }
.map-locate-status.ok { color: var(--success); }
.map-locate-status.attention { color: var(--warning); }

/* ==========================================================
   CARTE COLLANTE — la carte reste a l'ecran pendant la saisie
   ==========================================================
   Inspire des applications de course (Yango, Uber) : la carte occupe la
   partie haute et ne bouge plus, le reste des informations defile dessous.
   Avant, la carte etait un bloc parmi d'autres et il fallait remonter la
   page a chaque verification.
   ========================================================== */

.map-sticky {
  position: sticky;
  top: 8px;
  z-index: 5;
  background: var(--white);
  padding-bottom: 10px;
  margin-bottom: 4px;
}

/* Carte haute : sur un telephone, une carte de 220 px ne permet pas de viser.
   On lui donne la moitie de l'ecran, jamais moins de 300 px. */
.map-container-grand {
  height: 50vh;
  min-height: 300px;
  max-height: 460px;
}

@media (min-width: 960px) {
  .map-container-grand { height: 420px; max-height: none; }
  /* Au bureau la colonne de saisie est deja courte : le collant n'apporte
     rien et decalerait la carte du fil d'etapes. */
  .map-sticky { position: static; }
}

/* Etiquette « quartier » dans les resultats de recherche. */
.map-result-tag {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-dark);
  background: rgba(248, 187, 2, 0.14);
  padding: 2px 6px;
  border-radius: 5px;
  margin-left: 6px;
  vertical-align: 1px;
}

/* La liste de resultats FLOTTE sous le champ, par-dessus la carte. Dans le
   flux, elle mesurait pres de 400 px et repoussait la carte hors de l'ecran :
   on cherchait un lieu sans plus voir la carte ou le poser. */
.map-search-zone { position: relative; z-index: 10; }
.map-search-zone .map-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  max-height: 46vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  z-index: 12;
}

/* Reprise d'une course laissee en cours. */
.brouillon-banniere {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--gold);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.brouillon-banniere[hidden] { display: none; }
.brouillon-txt { flex: 1; min-width: 180px; display: grid; gap: 2px; }
.brouillon-txt strong { font-size: 14.5px; font-weight: 700; }
.brouillon-txt span { font-size: 13px; color: var(--gray-500); }
.brouillon-actions { display: flex; gap: 8px; flex-shrink: 0; }
