/* =========================================================
   AuPlusVite Delivery — feuille de styles unique
   Sections : tokens · base · appbar · catalogue · produit
              · cartbar · bottom sheet · formulaire · paiement
              · boutons · toasts
   ========================================================= */

/* ---- Tokens de design ---------------------------------- */
:root {
  --brand: #0050B3;
  --brand-dark: #003B85;
  --accent: #11A66E;
  --vite: #FF6B00;
  --vite-soft: #FFF0E5;
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --ink: #0E1726;
  --ink-soft: #6B7280;
  --line: #E8EAEF;
  --danger: #E5484D;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16, 23, 38, .06), 0 2px 10px rgba(16, 23, 38, .04);
  --shadow-md: 0 10px 30px rgba(16, 23, 38, .14);
  --shadow-up: 0 -10px 44px rgba(16, 23, 38, .18);
  --ease: cubic-bezier(.32, .72, 0, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: #E2E4E9;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select { font: inherit; color: inherit; }

/* Pictogrammes monochromes */
.icon { width: 1em; height: 1em; display: block; flex: 0 0 auto; }
.icon--flip { transform: rotate(180deg); }

.app {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  overflow-x: hidden;
}

.boot, .boot-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px;
  text-align: center;
  color: var(--ink-soft);
}
.boot-error { color: var(--danger); font-weight: 600; }

/* ---- Barre d'application ------------------------------- */
.appbar { padding: 16px 18px 12px; background: var(--surface); }

.appbar__brand { display: flex; align-items: center; gap: 12px; }

.logo {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  background: var(--vite-soft);
  color: var(--vite);
  flex: 0 0 auto;
}
.logo .icon { width: 26px; height: 26px; stroke-width: 1.9; }

.appbar__name { font-size: 17px; font-weight: 700; }
.brand-vite { color: var(--vite); }
.appbar__tag { font-size: 12.5px; color: var(--ink-soft); }
.appbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.appbar__icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-soft);
}
.appbar__icon .icon { width: 19px; height: 19px; }
.appbar__track {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}
.appbar__track .icon { width: 16px; height: 16px; color: var(--brand); }

.addresspill {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: left;
}
.addresspill__pin { display: flex; color: var(--brand); }
.addresspill__pin .icon { width: 19px; height: 19px; }
.addresspill__txt { display: flex; flex-direction: column; line-height: 1.35; }
.addresspill__txt b { font-size: 13.5px; }
.addresspill__txt small { font-size: 11.5px; color: var(--ink-soft); }
.addresspill__chev { display: flex; margin-left: auto; color: var(--ink-soft); }
.addresspill__chev .icon { width: 17px; height: 17px; }

/* ---- Zone collante : recherche + filtres --------------- */
.topstick {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  padding: 4px 0 6px;
  border-bottom: 1px solid var(--line);
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 18px 10px;
  padding: 0 14px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.searchbar__icon { display: flex; font-size: 19px; color: var(--ink-soft); }
.searchbar__input {
  flex: 1;
  border: 0;
  background: none;
  outline: none;
  font-size: 16px; /* ≥16px : empêche le zoom auto d'iOS au focus */
}

.catrail {
  display: flex;
  gap: 8px;
  padding: 2px 18px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.catrail::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.chip .icon { width: 15px; height: 15px; }
.chip.is-active { background: var(--brand); color: #fff; }

/* ---- Catalogue ----------------------------------------- */
.catalog { padding: 14px 18px 120px; }

.section { margin-bottom: 22px; }
.section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
}
.section__ic { display: flex; color: var(--brand); }
.section__ic .icon { width: 19px; height: 19px; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--ink-soft);
}

/* ---- Carte produit ------------------------------------- */
.product {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.media {
  position: relative;
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 1 / 1;
}
.media__img { width: 100%; height: 100%; object-fit: cover; }
.media__fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: #AEB6C2;
}
.media__fallback .icon { width: 38%; height: 38%; }
.media.is-failed .media__img { display: none; }
.media.is-failed .media__fallback { display: flex; }

.product__info { padding: 9px 4px 4px; flex: 1; }
.product__name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product__unit { font-size: 11.5px; color: var(--ink-soft); }

.product__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 2px;
}
.product__price { font-size: 15px; font-weight: 700; }

/* ---- Bouton + et stepper ------------------------------- */
.iconbtn {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 20px;
  line-height: 1;
}
.iconbtn--add { width: 32px; height: 32px; }

.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  border-radius: 999px;
}
.stepper__btn {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  font-size: 18px;
  color: var(--brand);
}
.stepper__val { min-width: 22px; text-align: center; font-weight: 700; font-size: 14px; }
.stepper--lg .stepper__btn { width: 40px; height: 40px; font-size: 21px; }
.stepper--lg .stepper__val { min-width: 30px; font-size: 16px; }

/* ---- Barre panier flottante ---------------------------- */
.cartbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: 100%;
  max-width: 480px;
  padding: 12px 18px calc(12px + var(--safe-b));
  transform: translateX(-50%) translateY(130%);
  transition: transform .42s var(--ease);
}
.cartbar.is-visible { transform: translateX(-50%) translateY(0); }

.cartbar__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 8px 0 16px;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.cartbar__count {
  display: grid;
  place-items: center;
  min-width: 26px; height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  font-size: 13px;
  font-weight: 700;
}
.cartbar__label { font-size: 14px; font-weight: 600; }
.cartbar__total { margin-left: auto; font-size: 15px; font-weight: 700; }
.cartbar__cta {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .16);
  font-size: 13.5px;
  font-weight: 600;
}

/* ---- Bottom sheet (style iOS) -------------------------- */
.sheet { position: fixed; inset: 0; z-index: 50; visibility: hidden; }
.sheet.is-open { visibility: visible; }

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, .46);
  opacity: 0;
  transition: opacity .38s var(--ease);
}
.sheet.is-open .sheet__backdrop { opacity: 1; }

.sheet__panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-up);
  transform: translateY(100%);
  transition: transform .44s var(--ease);
}
.sheet.is-open .sheet__panel { transform: translateY(0); }
.sheet__panel.is-dragging { transition: none; }

.sheet__header {
  flex: 0 0 auto;
  padding: 10px 0 2px;
  touch-action: none;
  cursor: grab;
}
.sheet__grabber {
  width: 38px; height: 5px;
  margin: 0 auto;
  border-radius: 3px;
  background: var(--line);
}
.sheet__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 20px calc(22px + var(--safe-b));
}

/* En-tête d'étape (titre + retour) */
.flow-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 14px;
}
.flow-back {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
}
.flow-back .icon { width: 20px; height: 20px; }
.flow-title { font-size: 18px; font-weight: 700; }

/* ---- Bottom sheet : détail produit --------------------- */
.psheet__media {
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  margin-bottom: 16px;
}
.psheet__name { font-size: 20px; font-weight: 700; }
.psheet__unit { margin-top: 2px; font-size: 13px; color: var(--ink-soft); }
.psheet__desc { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.psheet__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}
.psheet__price { font-size: 22px; font-weight: 800; }

/* ---- Bottom sheet : panier ----------------------------- */
.cartlist { display: flex; flex-direction: column; gap: 14px; }

.cartline { display: flex; align-items: center; gap: 12px; }
.cartline__media { width: 56px; height: 56px; border-radius: 12px; flex: 0 0 auto; }
.cartline__media .media__fallback { font-size: 26px; }
.cartline__main { flex: 1; min-width: 0; }
.cartline__name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cartline__price { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

.cart-empty { padding: 48px 10px; text-align: center; color: var(--ink-soft); }
.cart-empty__ic { display: flex; justify-content: center; margin-bottom: 8px; color: #C4CAD4; }
.cart-empty__ic .icon { width: 52px; height: 52px; }

/* ---- Récapitulatif des montants ------------------------ */
.summary {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
  color: var(--ink-soft);
}
.summary__row--total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}
.freeship { color: var(--accent); font-weight: 600; }

/* ---- Formulaire (coordonnées) -------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.field__input {
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  outline: none;
  font-size: 16px; /* ≥16px : empêche le zoom auto d'iOS au focus */
  transition: border-color .15s;
}
.field__input:focus { border-color: var(--brand); }
.field.is-invalid .field__input { border-color: var(--danger); }
.field__error { font-size: 12px; color: var(--danger); }
.field__row { display: flex; gap: 12px; }
.field__row .field { flex: 1; }

/* Champ avec pictogramme en tête (+ œil mot de passe) */
.field__wrap { position: relative; display: flex; align-items: center; }
.field__wrap .field__input { width: 100%; padding-left: 42px; }
.field__wrap:has(.field__toggle) .field__input { padding-right: 46px; }
.field__icon {
  position: absolute;
  left: 13px;
  display: flex;
  color: var(--ink-soft);
  pointer-events: none;
  transition: color .15s;
}
.field__icon .icon { width: 18px; height: 18px; }
.field__wrap:focus-within .field__icon { color: var(--brand); }
.field__toggle {
  position: absolute;
  right: 7px;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  color: var(--ink-soft);
  transition: color .15s, background .15s;
}
.field__toggle .icon { width: 19px; height: 19px; }
.field__toggle:active { background: var(--surface-2); }

/* Créneaux de livraison */
.slots { display: flex; flex-direction: column; gap: 8px; }
.slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-size: 13.5px;
  transition: border-color .15s, background .15s;
}
.slot.is-active { border-color: var(--brand); background: rgba(0, 80, 179, .05); }
.slot__dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex: 0 0 auto;
}
.slot.is-active .slot__dot {
  border-color: var(--brand);
  background: radial-gradient(circle, var(--brand) 0 5px, transparent 6px);
}

/* ---- Paiement ------------------------------------------ */
.pay-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 14px;
}
.pay-summary b { font-size: 17px; }

.card-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 80, 179, .06);
  font-size: 11.5px;
  color: var(--brand);
}
.card-hint__ic { display: flex; }
.card-hint__ic .icon { width: 17px; height: 17px; }

.pay-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--ink-soft);
}
.pay-secure__ic { display: flex; }
.pay-secure__ic .icon { width: 14px; height: 14px; }

/* ---- Confirmation -------------------------------------- */
.success { text-align: center; padding: 20px 0 6px; }
.success__badge {
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}
.success__badge .icon { width: 40px; height: 40px; stroke-width: 2.6; }
.success__title { font-size: 20px; font-weight: 700; }
.success__sub { margin-top: 6px; font-size: 14px; color: var(--ink-soft); }
.success__ref {
  display: inline-block;
  margin: 16px 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface-2);
  font-weight: 700;
  letter-spacing: .5px;
}
.recap {
  text-align: left;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.recap-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
  font-size: 13.5px;
}
.recap-row span:first-child { color: var(--ink-soft); }
.recap-row span:last-child { text-align: right; font-weight: 600; }

/* ---- Boutons ------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 22px;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: transform .12s, background .15s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn--block { display: flex; width: 100%; }
.btn--ghost { background: var(--surface-2); color: var(--ink); }
.btn--lg { height: 56px; font-size: 16px; }
.btn__grow { flex: 1; }
.sheet-foot { margin-top: 20px; }

/* ---- Toasts -------------------------------------------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(86px + var(--safe-b));
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 440px;
  padding: 0 20px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .28s, transform .28s;
}
.toast.is-in { opacity: 1; transform: translateY(0); }
.toast--error { background: var(--danger); }
.toast--success { background: var(--accent); }

/* ---- Bandeau de suivi (catalogue) ---------------------- */
.trackbar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 36px);
  margin: 12px 18px 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  text-align: left;
}
.trackbar__ic { display: flex; }
.trackbar__ic .icon { width: 22px; height: 22px; }
.trackbar__txt { display: flex; flex-direction: column; line-height: 1.35; }
.trackbar__txt b { font-size: 13.5px; }
.trackbar__txt small { font-size: 11.5px; opacity: .85; }
.trackbar__chev { display: flex; margin-left: auto; }
.trackbar__chev .icon { width: 18px; height: 18px; }

/* ---- Suivi de livraison (bottom sheet) ----------------- */
.track-head { margin-bottom: 14px; }
.track-head__title { font-size: 17px; font-weight: 700; }
.track-head__eta { margin-top: 3px; font-size: 13px; color: var(--ink-soft); }

.track-addr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 13px;
}
.track-addr__ic { display: flex; color: var(--brand); }
.track-addr__ic .icon { width: 18px; height: 18px; }

/* Étapes de progression */
.timeline { list-style: none; margin-top: 18px; }
.timeline__step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.timeline__step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 29px;
  width: 2px;
  height: 14px;
  background: var(--line);
}
.timeline__mark {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  flex: 0 0 auto;
}
.timeline__mark .icon { width: 13px; height: 13px; color: #fff; stroke-width: 3; }
.timeline__step.is-done { color: var(--ink); }
.timeline__step.is-done .timeline__mark {
  background: var(--accent);
  border-color: var(--accent);
}
.timeline__step.is-done::before { background: var(--accent); }
.timeline__step.is-current { color: var(--ink); font-weight: 600; }
.timeline__step.is-current .timeline__mark { border-color: var(--brand); }
.timeline__step.is-current .timeline__mark::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

/* ---- Carte de livraison (Leaflet) ---------------------- */
.livemap {
  height: 220px;
  margin-top: 8px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.leaflet-container { font-family: inherit; background: #EBEBE9; }
.leaflet-control-attribution { font-size: 9px; }

/* Marqueurs (divIcon) — fond gris, seul le livreur est coloré */
.mk {
  display: block;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(16, 23, 38, .45);
}
.mk--store { background: var(--ink); }
.mk--dest { background: #fff; border-color: var(--ink); }
.mk--courier { position: relative; background: var(--brand); }
.mk--courier::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: var(--brand);
  opacity: .3;
  animation: halo 1.8s ease-out infinite;
}
@keyframes halo {
  0%   { transform: scale(.45); opacity: .4; }
  100% { transform: scale(1.2); opacity: 0; }
}

.maplegend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--ink-soft);
}
.maplegend span { display: flex; align-items: center; gap: 5px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot--store { background: var(--ink); }
.dot--courier { background: var(--brand); }
.dot--dest { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }

/* ---- Espace livreur ------------------------------------ */
.cphead {
  padding: 16px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.cphead__brand { display: flex; align-items: center; gap: 12px; }
.cphead__logout {
  margin-left: auto;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Écran de connexion livreur */
.cplogin {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 24px calc(32px + var(--safe-b));
}
.cplogin__brand { text-align: center; margin-bottom: 24px; }
.cplogin__mark {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  margin: 0 auto 16px;
  border-radius: 19px;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.cplogin__mark .icon { width: 32px; height: 32px; stroke-width: 1.8; }
.cplogin__title { font-size: 21px; font-weight: 700; }
.cplogin__sub { margin-top: 3px; font-size: 13px; color: var(--ink-soft); }
.cplogin__form {
  gap: 14px;
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.cplogin__error {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(229, 72, 77, .1);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 500;
}
.cplogin__demo {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}

.cptabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 6px;
  padding: 12px 18px;
  background: var(--bg);
}
.cptab {
  flex: 1;
  padding: 10px 6px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
.cptab.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

.cplist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 18px calc(86px + var(--safe-b)); /* place pour le sélecteur d'espace */
}

/* Sélecteur d'espace flottant (démo) */
.switcher {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  z-index: 70;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  transform: translateX(-50%);
}
.switcher__link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}
.switcher__link .icon { width: 16px; height: 16px; }
.switcher__link.is-active { background: var(--brand); color: #fff; }
.cporder {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.cporder--link {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform .12s, border-color .15s;
}
.cporder--link:active { transform: scale(.99); }
.cporder--link:hover { border-color: var(--brand); }
.cporder__go {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
}
.cporder__go .icon { width: 15px; height: 15px; }
.cporder__top { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cporder__total { margin-left: auto; font-weight: 700; }
.cporder__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.cporder__row .icon { width: 16px; height: 16px; color: var(--brand); }
.cporder__items {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.55;
}
/* Liste de picking (espace préparation) */
.cppick { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 12px; }
.cppick__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 13px;
  cursor: pointer;
}
.cppick__item:has(input:disabled) { cursor: default; }
.cppick__box {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 2px solid var(--line);
  color: #fff;
  flex: 0 0 auto;
  transition: background .12s, border-color .12s;
}
.cppick__box .icon { width: 13px; height: 13px; stroke-width: 2.6; opacity: 0; }
.cppick__item:has(input:checked) .cppick__box { background: var(--accent); border-color: var(--accent); }
.cppick__item:has(input:checked) .cppick__box .icon { opacity: 1; }
.cppick__item:has(input:checked) .cppick__name { text-decoration: line-through; color: var(--ink-soft); }
.cppick__name { flex: 1; }
.cppick__qty { font-weight: 700; }

.cpbadge { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.cpbadge.is-new { background: rgba(0, 80, 179, .1); color: var(--brand); }
.cpbadge.is-prep { background: rgba(178, 106, 0, .14); color: #B26A00; }
.cpbadge.is-route { background: rgba(17, 166, 110, .15); color: var(--accent); }
.cpbadge.is-done { background: var(--surface-2); color: var(--ink-soft); }
.cpbadge.is-cancel { background: rgba(229, 72, 77, .12); color: var(--danger); }
.cpempty { padding: 50px 20px; text-align: center; color: var(--ink-soft); }

/* ---- Suivre ma commande (recherche par numéro) --------- */
.lookup__label {
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.lookup__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.lookup__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}
.lookup__ic { display: flex; color: var(--brand); }
.lookup__ic .icon { width: 18px; height: 18px; }
.lookup__ref { font-size: 14px; font-weight: 600; letter-spacing: .3px; }
.lookup__chev { display: flex; margin-left: auto; color: var(--ink-soft); }
.lookup__chev .icon { width: 16px; height: 16px; }
.lookup__sep {
  margin-bottom: 14px;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-soft);
}

/* ---- Compte client ------------------------------------- */
.auth-intro {
  margin: -2px 0 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.auth-demo {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}
.auth-pro {
  margin-top: 6px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}
.auth-pro a { color: var(--brand); font-weight: 600; text-decoration: none; }
.authtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface-2);
}
.authtab {
  flex: 1;
  padding: 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background .15s, color .15s, box-shadow .15s;
}
.authtab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.acard {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.acard__avatar {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  flex: 0 0 auto;
}
.acard__name { font-size: 15px; font-weight: 700; }
.acard__sub { margin-top: 2px; font-size: 12.5px; color: var(--ink-soft); }

.alabel {
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.aorders { display: flex; flex-direction: column; gap: 8px; }
.aorder {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}
.aorder__main { display: flex; flex-direction: column; gap: 2px; }
.aorder__ref { font-size: 13.5px; font-weight: 600; letter-spacing: .3px; }
.aorder__status { font-size: 11.5px; color: var(--ink-soft); }
.aorder__total { margin-left: auto; font-size: 14px; font-weight: 700; }
.aorder__chev { display: flex; color: var(--ink-soft); }
.aorder__chev .icon { width: 16px; height: 16px; }

/* ---- Mise en avant Cafétéria --------------------------- */
.featured {
  padding: 18px 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.featured__head { padding: 0 18px 12px; }
.featured__title { font-size: 17px; font-weight: 700; }
.featured__sub { margin-top: 2px; font-size: 12.5px; color: var(--ink-soft); }
.featured__rail {
  display: flex;
  gap: 12px;
  padding: 2px 18px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.featured__rail::-webkit-scrollbar { display: none; }

.fcard {
  flex: 0 0 270px;
  height: 108px;
  display: flex;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  scroll-snap-align: start;
}
.fcard__photo {
  flex: 0 0 108px;
  height: 100%;
  background: var(--surface-2);
  overflow: hidden;
}
.fcard__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fcard__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px;
  min-width: 0;
}
.fcard__name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fcard__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fcard__price { font-size: 14px; font-weight: 700; }

