/* =================================================================
   FOUD · Espace de commande PRO · Maquette
   Charte : cream / charcoal / rouge · thème clair · style éditorial
   ================================================================= */

/* ---------- Polices de la marque ---------- */
@font-face {
  font-family: 'Upstanding';
  src: url('../fonts/Upstanding-W05-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Epilogue';
  src: url('../fonts/Epilogue-Light.ttf') format('truetype');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Epilogue';
  src: url('../fonts/Epilogue-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'BonVivant';
  src: url('../fonts/BonVivant-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

/* ---------- Jetons de design (charte FOUD) ---------- */
:root {
  /* Gamme chromatique */
  --charcoal:   #1D1D1B;
  --cream:      #FCFAF5;
  --blue:       #2F5A9D;
  --yellow:     #F1C31E;
  --red:        #CB2237;
  --green:      #679F68;
  --brown:      #AC551C;
  --olive:      #D3D58A;
  --coral:      #FF9981;
  --amber:      #D58200;

  /* Rôles */
  --bg:         var(--cream);
  --surface:    #FFFFFF;
  --ink:        var(--charcoal);
  --ink-soft:   rgba(29, 29, 27, .88);
  --ink-faint:  rgba(29, 29, 27, .40);
  --line:       rgba(29, 29, 27, .12);
  --line-strong:rgba(29, 29, 27, .22);
  --accent:     var(--red);

  /* Typo */
  --font-display: 'Upstanding', 'Arial Narrow', sans-serif;
  --font-body:    'Epilogue', system-ui, -apple-system, sans-serif;
  --font-script:  'BonVivant', cursive;

  /* Rythme */
  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow:    0 18px 40px -24px rgba(29, 29, 27, .35);
  --topbar-h:  68px;
  --tabs-h:    62px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.display {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .92;
}
.script {
  font-family: var(--font-script);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.accent { color: var(--accent); }

/* Petite étiquette suréchelle (kicker) */
.kicker {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 11px;
  color: var(--ink-soft);
}

/* ---------- Boutons ---------- */
.btn-foud {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn-foud:active { transform: translateY(1px); }

.btn-primary-foud {
  background: var(--red);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.btn-primary-foud:hover { background: #b21d30; box-shadow: var(--shadow); }

.btn-dark-foud  { background: var(--charcoal); color: var(--cream); }
.btn-dark-foud:hover { background: #000; }

.btn-ghost-foud {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
}
.btn-ghost-foud:hover { border-color: var(--ink); }

.btn-foud:disabled,
.btn-foud.is-disabled {
  background: rgba(29, 29, 27, .12);
  color: var(--ink-faint);
  cursor: not-allowed;
  box-shadow: none;
}

/* ===================================================================
   PAGE 1 · Démarrage de commande (date + adresse)
   =================================================================== */
.start {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

/* Illustrations légumes éparpillées en décor */
.veg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.veg-decor img {
  position: absolute;
  width: clamp(90px, 12vw, 190px);
  filter: drop-shadow(0 16px 28px rgba(29, 29, 27, .12));
  opacity: .92;
}
.veg-decor img:nth-child(1) { top: -14px;  left: 4%;   transform: rotate(-12deg); }
.veg-decor img:nth-child(2) { top: 8%;     right: 3%;  transform: rotate(14deg); width: clamp(110px,14vw,220px); }
.veg-decor img:nth-child(3) { bottom: -18px;left: 8%;   transform: rotate(8deg); }
.veg-decor img:nth-child(4) { bottom: 4%;  right: 7%;  transform: rotate(-8deg); }
.veg-decor img:nth-child(5) { top: 42%;    left: -34px;transform: rotate(20deg); opacity: .5; }
.veg-decor img:nth-child(6) { top: 38%;    right: -28px;transform: rotate(-16deg); opacity: .5; }

.start-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px 40px 32px;
}
.start-logo { display: block; height: 40px; margin: 0 auto 18px; }

.start-head { text-align: center; margin-bottom: 30px; }
.start-head .script { font-size: 26px; color: var(--accent); display: block; line-height: 1; margin-bottom: 6px; }
.start-head h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); }
.start-head p { margin: 12px 0 0; color: var(--ink-soft); font-size: 15px; }

/* Bloc étape */
.field { margin-bottom: 22px; }
.field > label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 9px;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  background: var(--charcoal);
  color: var(--cream);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.control {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  transition: border-color .15s ease, background .15s ease;
}
.control:focus {
  outline: none;
  border-color: var(--charcoal);
  background: #fff;
}
.hint { margin: 8px 2px 0; font-size: 12.5px; color: var(--ink-soft); }

/* Bannière coupure 20h */
.cutoff {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 10px;
  padding: 11px 13px;
  background: rgba(241, 195, 30, .16);
  border: 1px solid rgba(241, 195, 30, .55);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.4;
}
.cutoff b { font-weight: 700; }

/* Statut de zone (CP) */
.zone-status {
  display: none;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
}
.zone-status .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.zone-status small { font-weight: 300; display: block; color: var(--ink-soft); }
.zone-status.ok  { display: flex; background: rgba(103,159,104,.14); border: 1px solid rgba(103,159,104,.5); }
.zone-status.ok .dot  { background: var(--green); }
.zone-status.ko  { display: flex; background: rgba(203,34,55,.10); border: 1px solid rgba(203,34,55,.45); color: var(--red); }
.zone-status.ko .dot  { background: var(--red); }

.start-card .btn-foud { width: 100%; margin-top: 8px; font-size: 15px; padding: 15px; }
.start-foot { text-align: center; margin-top: 16px; font-size: 12px; color: var(--ink-faint); }

/* ===================================================================
   PAGE 2 · Catalogue / écran de commande
   =================================================================== */
.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* ---- Barre du haut ---- */
.topbar {
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar .logo { height: 70px; display: block; }
.topbar-meta { display: flex; align-items: center; margin-left: auto; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.meta-chip {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  padding: 0 16px;
  border-left: 1px solid var(--line);
}
.meta-chip .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-faint); font-weight: 700; }
.meta-chip .val { font-size: 13.5px; font-weight: 700; }
.meta-chip .val a { color: var(--accent); text-decoration: none; font-weight: 700; margin-left: 6px; }
.meta-chip .val a:hover { text-decoration: underline; }

.topbar .btn-foud { padding: 10px 16px; }
.cart-pill .count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: #fff; color: var(--red);
  border-radius: 999px; font-size: 12px; font-weight: 700;
}

/* ---- Barre catégories (onglets + fondus + bouton filtre) ---- */
.cat-bar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 26px;
}
.cat-tabs-wrap { position: relative; flex: 1; min-width: 0; }

/* Fondus latéraux indiquant le scroll horizontal (masqués en butée) */
.cat-tabs-wrap::before,
.cat-tabs-wrap::after {
  content: "";
  position: absolute; top: 0; bottom: 0;
  width: 46px; z-index: 3; pointer-events: none;
  opacity: 0; transition: opacity .2s ease;
}
.cat-tabs-wrap::before { left: 0;  background: linear-gradient(to right, var(--bg) 25%, transparent); }
.cat-tabs-wrap::after  { right: 0; background: linear-gradient(to left,  var(--bg) 25%, transparent); }
.cat-tabs-wrap.show-left::before  { opacity: 1; }
.cat-tabs-wrap.show-right::after  { opacity: 1; }

/* Flèches de défilement (souris) — masquées par défaut, révélées selon la position */
.cat-scroll {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 32px; height: 32px;
  display: none;
  align-items: center; justify-content: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 22px; line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(29, 29, 27, .14);
  transition: border-color .15s ease, background .15s ease;
}
.cat-scroll--left  { left: -4px; }
.cat-scroll--right { right: -4px; }
.cat-scroll:hover  { border-color: var(--ink); background: #fff; }

.cat-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }

/* Sur souris (pointeur fin) : flèches visibles en butée + glisser-déposer */
@media (hover: hover) and (pointer: fine) {
  .cat-tabs-wrap.show-left  .cat-scroll--left  { display: inline-flex; }
  .cat-tabs-wrap.show-right .cat-scroll--right { display: inline-flex; }
  .cat-tabs { cursor: grab; }
  .cat-tabs.is-dragging { cursor: grabbing; user-select: none; scroll-behavior: auto; }
}

.cat-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.cat-tab .ico { font-size: 16px; line-height: 1; }
.cat-tab .badge-count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: rgba(29,29,27,.08);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  color: var(--ink-soft);
}
.cat-tab:hover { border-color: var(--line-strong); }
.cat-tab.active { background: var(--charcoal); color: var(--cream); border-color: var(--charcoal); }
.cat-tab.active .badge-count { background: rgba(252,250,245,.2); color: var(--cream); }

/* Bouton filtre (fixe à droite, ne défile pas) */
.filter-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 16px;
  font-family: var(--font-body); font-weight: 700; font-size: 13.5px;
  color: var(--ink); cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn.has-filters { border-color: var(--red); color: var(--red); }
.filter-btn .fi-ico { font-size: 15px; line-height: 1; }
.filter-btn .fi-count {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--red); color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 700;
}

/* ---- Panneau Filtres & tri ---- */
.filter-panel {
  position: fixed;
  top: calc(var(--topbar-h) + var(--tabs-h) + 6px);
  right: 26px;
  width: 340px;
  max-height: calc(100vh - var(--topbar-h) - var(--tabs-h) - 28px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
}
.filter-panel.open { opacity: 1; visibility: visible; transform: translateY(0); }

.filter-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px;
}
.filter-head h3 { margin: 0; font-size: 20px; }

.filter-body { padding: 2px 18px 6px; overflow-y: auto; }
.filter-group { padding: 13px 0; border-top: 1px solid var(--line); }
.filter-group:first-child { border-top: none; }
.filter-label {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  font-weight: 700; color: var(--ink-faint); margin-bottom: 11px;
}
.chip-options { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt {
  border: 1.5px solid var(--line-strong); background: var(--surface);
  border-radius: 999px; padding: 8px 13px;
  font-family: var(--font-body); font-size: 13px; font-weight: 700;
  color: var(--ink); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.chip-opt:hover { border-color: var(--ink); }
.chip-opt.active { background: var(--charcoal); color: var(--cream); border-color: var(--charcoal); }

.sort-options { display: flex; flex-direction: column; gap: 2px; }
.radio-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 13.5px; cursor: pointer;
}
.radio-opt:hover { background: var(--cream); }
.radio-opt input { accent-color: var(--red); width: 16px; height: 16px; }

.filter-foot {
  display: flex; gap: 10px;
  padding: 12px 18px 16px; border-top: 1px solid var(--line);
}
.filter-foot .btn-foud { flex: 1; padding: 12px; }

/* ---- Éléments partagés des « feuilles » (poignée, croix, backdrop) ---- */
.sheet-handle {
  display: none;
  width: 42px; height: 5px; border-radius: 999px;
  background: var(--line-strong);
  margin: 9px auto 0;
}
.sheet-close {
  display: grid; place-items: center;
  border: none; background: rgba(29,29,27,.06);
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 14px; color: var(--ink); flex: none;
}
.sheet-close:hover { background: rgba(29,29,27,.14); }

.sheet-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(29, 29, 27, .5);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease;
  z-index: 45;
}
.sheet-backdrop.open { opacity: 1; visibility: visible; }

/* État vide de la grille (aucun résultat de filtre) */
.grid-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 54px 0;
  color: var(--ink-faint); font-size: 14px;
}

/* ---- Corps : grille produits + panier ---- */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  align-items: start;
}
.catalog { padding: 20px 26px 60px; }
.catalog-head { margin-bottom: 16px; }
.catalog-head h2 { margin: 0; font-size: 24px; }
.catalog-head p { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); }

/* Grille de cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.card-foud {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .16s ease, border-color .16s ease;
}
.card-foud:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 50% 18%, rgba(255,255,255,.9), rgba(29,29,27,.04));
  border-bottom: 1px solid var(--line);
}
.card-media img { width: 58%; max-height: 78%; object-fit: contain; filter: drop-shadow(0 10px 16px rgba(29,29,27,.18)); }

/* Séparateur « Non disponibles » (pleine largeur de la grille) */
.grid-sep {
  grid-column: 1 / -1;
  margin: 10px 2px 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ink-faint);
}

/* Produits indisponibles (hors menu du jour) : grisés */
.card-foud--indispo .card-media img { filter: grayscale(1) opacity(.85); }
.card-foud--indispo .card-title,
.card-foud--indispo .card-desc,
.card-foud--indispo .price { opacity: .5; }
.card-foud--indispo:hover { transform: none; box-shadow: none; border-color: var(--line); }

.card-indispo-tag {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: #fff;
  background: rgba(29, 29, 27, .72);
  padding: 4px 9px;
  border-radius: 999px;
}

.card-badge {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: #fff;
  padding: 4px 9px;
  border-radius: 999px;
}
.badge-veggie    { background: var(--green); }
.badge-populaire { background: var(--red); }
.badge-nouveau   { background: var(--blue); }

.card-body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.card-desc {
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  margin-top: auto;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  padding-top: 6px;
}
.price { font-family: var(--font-display); font-size: 22px; line-height: 1; }
.price .ht { font-family: var(--font-body); font-size: 11px; font-weight: 700; color: var(--ink-faint); margin-left: 2px; }
.min-qty { font-size: 11px; color: var(--ink-faint); font-weight: 700; }

.add-btn {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--red); color: #fff;
  border: none; border-radius: 9px;
  font-size: 20px; line-height: 1; cursor: pointer;
  transition: transform .12s, background .15s;
}
.add-btn:hover { background: #b21d30; transform: scale(1.06); }

/* ---- Colonne panier ---- */
.cart {
  position: sticky;
  top: calc(var(--topbar-h) + var(--tabs-h));
  align-self: start;
  height: calc(100vh - var(--topbar-h) - var(--tabs-h));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
}
/* Poignée (visible en bottom-sheet mobile) */
.cart-handle { display: none; }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.cart-head h2 { margin: 0; font-size: 20px; }
.cart-close {
  display: none;
  border: none;
  background: rgba(29,29,27,.06);
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 14px; color: var(--ink); flex: none;
}
.cart-close:hover { background: rgba(29,29,27,.14); }

.cart-items { flex: 1; overflow-y: auto; padding: 4px 18px; }
.cart-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item .ci-media {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(29,29,27,.05);
  display: grid; place-items: center;
}
.cart-item .ci-media img { width: 70%; height: 70%; object-fit: contain; }
.ci-name { font-weight: 700; font-size: 13px; line-height: 1.15; }
.ci-qty  { font-size: 11.5px; color: var(--ink-soft); margin-top: 1px; }
.ci-right { text-align: right; display: flex; align-items: center; gap: 8px; }
.ci-price { font-weight: 700; font-size: 13px; white-space: nowrap; }
.ci-remove { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 14px; line-height: 1; }
.ci-remove:hover { color: var(--red); }

.cart-empty { color: var(--ink-faint); font-size: 13px; text-align: center; padding: 30px 0; }

/* Pied panier (récap + totaux) */
.cart-foot { border-top: 1px solid var(--line); padding: 12px 18px 16px; background: var(--surface); }

.deliv-box {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 11px;
}
.deliv-box .dl-lbl { font-size: 9.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-faint); font-weight: 700; }
.deliv-box .dl-val { font-weight: 700; font-size: 13px; margin-top: 2px; }
.deliv-box .dl-sub { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; display: flex; flex-direction: column; gap: 1px; }

/* Code promo : champ et bouton strictement de même hauteur, alignés */
.promo { display: flex; align-items: stretch; gap: 6px; margin-bottom: 11px; }
.promo input,
.promo button {
  height: 38px;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1;
}
.promo input {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--font-body); font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  border: 1.5px solid var(--line-strong);
  padding: 0 12px; background: var(--cream); color: var(--ink);
}
.promo input:focus { outline: none; border-color: var(--charcoal); background: #fff; }
.promo button { flex: none; padding: 0 16px; }

/* Lignes de totaux */
.totals { font-size: 13px; }
.totals .row { display: flex; justify-content: space-between; padding: 5px 0; color: var(--ink-soft); }
.totals .row .free { color: var(--green); font-weight: 700; }
.totals .row .paid { color: var(--red); font-weight: 700; }

/* Barre de progression franco */
.franco { margin: 5px 0 10px; }
.franco-bar { height: 6px; background: rgba(29,29,27,.1); border-radius: 999px; overflow: hidden; }
.franco-fill { height: 100%; width: 24%; background: var(--green); border-radius: 999px; transition: width .3s ease; }
.franco-txt { font-size: 11px; color: var(--ink-soft); margin-top: 5px; }

.totals .total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0 2px; margin-top: 3px;
  border-top: 1.5px solid var(--ink);
}
.totals .total .lbl { font-family: var(--font-display); font-size: 16px; }
.totals .total .val { font-family: var(--font-display); font-size: 22px; }

.cart-foot > .btn-foud { width: 100%; margin-top: 10px; font-size: 15px; padding: 14px; }
.pay-note { text-align: center; font-size: 10.5px; color: var(--ink-faint); margin-top: 8px; line-height: 1.5; }

/* ===================================================================
   Modale produit (Bootstrap modal habillé FOUD)
   =================================================================== */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.pm-grid { display: grid; grid-template-columns: 44% 1fr; }
.pm-media {
  position: relative;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 50% 20%, #fff, rgba(29,29,27,.05));
  border-right: 1px solid var(--line);
  min-height: 320px;
}
.pm-media img { width: 64%; filter: drop-shadow(0 16px 26px rgba(29,29,27,.2)); }
.pm-body { padding: 30px 30px 28px; }
.pm-close {
  position: absolute; top: 14px; right: 16px;
  border: none; background: rgba(29,29,27,.06); color: var(--ink);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 17px;
  z-index: 2;
}
.pm-close:hover { background: rgba(29,29,27,.14); }
.pm-badge { display: inline-block; margin-bottom: 12px; }
.pm-body h3 { font-family: var(--font-display); font-size: 30px; margin: 0 0 10px; text-transform: uppercase; }
.pm-desc { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
.pm-specs { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 24px; }
.pm-spec {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 13px;
  font-size: 12.5px;
}
.pm-spec .k { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); font-weight: 700; }
.pm-spec .v { font-weight: 700; }
.pm-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 18px; }
.pm-price { font-family: var(--font-display); font-size: 34px; }
.pm-price .ht { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--ink-faint); }
.qty-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.qty-stepper button { width: 38px; height: 40px; border: none; background: var(--surface); font-size: 18px; cursor: pointer; }
.qty-stepper button:hover { background: var(--cream); }
.qty-stepper span { min-width: 36px; text-align: center; font-weight: 700; }

/* ===================================================================
   Modale Connexion / Inscription
   =================================================================== */
.auth { padding: 32px 30px 28px; }
.auth-logo { height: 30px; display: block; margin: 0 auto 20px; }
.auth-tabs {
  display: flex; gap: 6px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1; border: none; background: transparent;
  padding: 10px; border-radius: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 13.5px;
  color: var(--ink-soft); cursor: pointer;
  transition: background .15s, color .15s;
}
.auth-tab.active { background: var(--charcoal); color: var(--cream); }

.auth-pane { display: flex; flex-direction: column; gap: 14px; }
.auth-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field > span { font-size: 12.5px; font-weight: 700; }
.auth-forgot { font-size: 12.5px; color: var(--accent); text-decoration: none; align-self: flex-end; margin-top: -6px; }
.auth-forgot:hover { text-decoration: underline; }
.auth-pane .btn-foud { width: 100%; margin-top: 4px; padding: 14px; }
.auth-note { text-align: center; font-size: 12px; color: var(--ink-faint); margin: 4px 0 0; line-height: 1.5; }

/* ===================================================================
   Bouton « retour en haut »
   =================================================================== */
.scroll-top {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 35;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--charcoal); color: var(--cream);
  border: none; border-radius: 50%;
  font-size: 20px; cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, background .15s ease;
}
.scroll-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: #000; }

/* ===================================================================
   Responsive
   =================================================================== */

/* Backdrop du panier (actif uniquement en mode bottom-sheet) */
.cart-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(29, 29, 27, .5);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease;
  z-index: 40;
}

/* ---- Tablette : panier replié sous le catalogue ---- */
@media (max-width: 1080px) and (min-width: 769px) {
  .layout { grid-template-columns: 1fr; }
  .cart {
    position: static; height: auto;
    border-left: none; border-top: 1px solid var(--line);
  }
  .cart-items { max-height: 340px; }
}

/* ---- Mobile : 2 produits / ligne + panier en bottom-sheet ---- */
@media (max-width: 768px) {
  .start-card { padding: 28px 22px; }

  /* Barre du haut : ligne 1 = logo + infos en pastilles · ligne 2 = boutons 50/50 */
  .topbar { flex-wrap: wrap; min-height: 0; padding: 8px 12px; gap: 8px; }
  .topbar .logo { height: 34px; }
  .topbar-meta {
    margin-left: 8px;
    flex: 1 1 auto; min-width: 0;
    display: flex; align-items: center; gap: 6px;
    overflow: hidden;
  }
  .topbar-meta .meta-chip {
    display: flex; align-items: center; min-width: 0;
    border-left: none;
    background: var(--cream); border: 1px solid var(--line);
    border-radius: 999px; padding: 5px 11px;
  }
  .topbar-meta .meta-chip .lbl { display: none; }
  .topbar-meta .meta-chip:first-child { flex: none; }      /* date : largeur fixe */
  .topbar-meta .meta-adresse { flex: 1 1 0; min-width: 0; } /* adresse : tronquée avec … */
  .topbar-meta .meta-chip .val {
    display: block; font-size: 12px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .topbar-meta .meta-chip .val::before { font-weight: 400; margin-right: 4px; }
  .topbar-meta .meta-chip:first-child .val::before { content: "📅"; }
  .topbar-meta .meta-adresse .val::before { content: "📍"; }
  .topbar-meta .meta-chip .val a { display: none; }         /* "Modifier" caché sur mobile */

  .topbar-actions { flex-basis: 100%; display: flex; gap: 8px; }
  .topbar-actions .btn-foud { flex: 1; justify-content: center; }
  .topbar-login { display: inline-flex; }                   /* ré-affiché en 50/50 */

  .cat-bar { padding: 8px 14px; gap: 8px; }
  .catalog { padding-left: 14px; padding-right: 14px; padding-bottom: 80px; }

  /* Bouton filtre : icône seule sur mobile */
  .filter-btn .fi-txt { display: none; }
  .filter-btn { padding: 9px 12px; }

  /* Deux produits par ligne */
  .layout { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-media img { width: 54%; }
  .price { font-size: 19px; }

  /* Panier : feuille qui monte du bas, 90% de hauteur */
  .cart-backdrop { display: block; }
  .cart-backdrop.open { opacity: 1; visibility: visible; }

  .cart {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; height: 90vh; max-height: 90vh;
    border: none;
    border-top-left-radius: 22px; border-top-right-radius: 22px;
    box-shadow: 0 -22px 50px -18px rgba(29, 29, 27, .5);
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
    z-index: 50;
  }
  .cart.open { transform: translateY(0); }
  .cart-handle {
    display: block;
    width: 42px; height: 5px; border-radius: 999px;
    background: var(--line-strong);
    margin: 9px auto 0;
  }
  .cart-close { display: grid; place-items: center; }
  .cart-head { padding-top: 8px; }

  /* Panneau filtres : feuille qui monte du bas (comme le panier) */
  .sheet-backdrop { display: block; }
  .filter-panel {
    top: auto; bottom: 0; left: 0; right: 0;
    width: 100%; max-height: 88vh;
    border: none;
    border-top-left-radius: 22px; border-top-right-radius: 22px;
    box-shadow: 0 -22px 50px -18px rgba(29, 29, 27, .5);
    opacity: 1; visibility: visible;
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
    z-index: 50;
  }
  .filter-panel.open { transform: translateY(0); }
  .filter-panel .sheet-handle { display: block; }
  .filter-head { padding-top: 8px; }

  /* Modale produit en pleine largeur */
  .pm-grid { grid-template-columns: 1fr; }
  .pm-media { min-height: 200px; }
}

@media (max-width: 360px) {
  .product-grid { grid-template-columns: 1fr; }
}
