/* Achat en lot / PANIER MULTI-VENDEURS (façon Vinted). Mobile-first ; le desktop
   hérite des patrons existants (.screen centrée, feuille → dialogue) via
   app.desktop.css. Couleurs alignées sur app.base.css (orange = action). */

/* Bouton « Ajouter au panier » sur la fiche prix fixe (sous Acheter / Offre). */
.addcart-cta {
  width: 100%;
  margin-top: 8px;
  padding: 13px 16px;
  border: 1.5px solid #111;
  background: #fff;
  color: #111;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.addcart-cta.in-cart {
  background: #f1f8f2;
  border-color: #1f9d55;
  color: #1f7a43;
}

/* Pastille flottante « Mon panier (N) » — au-dessus de la tabbar. */
.cart-fab {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 86px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
  cursor: pointer;
}
.cart-fab-ic { font-size: 17px; }

/* Écran panier. */
.cart-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 5;
}
.cart-head-title { font-weight: 800; font-size: 18px; }
.cart-scroll { padding: 12px 14px 120px; }
.cart-empty, .cart-loading, .cart-note {
  padding: 22px 14px;
  text-align: center;
  color: #666;
  line-height: 1.5;
}
.cart-note {
  background: #fff7ed;
  color: #9a3412;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  text-align: left;
  font-size: 14px;
}

/* Un lot = les articles d'un vendeur (carte). */
.cart-lot {
  border: 1px solid #ececec;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 14px;
  background: #fff;
}
.cart-lot-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.cart-lot-seller { font-weight: 700; }
.cart-lot-discount {
  margin-left: auto;
  background: #1f9d55;
  color: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #f3f3f3;
}
.cart-item-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}
.cart-item-main { flex: 1 1 auto; min-width: 0; }
.cart-item-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-item-price { font-size: 13px; color: #555; }
.cart-item-rm {
  border: none;
  background: none;
  color: #999;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
}

/* Sélecteur de quantité (stock) par article. */
.cart-qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }
.cart-qty-btn {
  width: 28px; height: 28px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.cart-qty-n { min-width: 18px; text-align: center; font-weight: 700; }

/* Info stock / vente par lot sur la fiche. */
.d-stock-info {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #9a3412;
}

/* Choix de remise / mode par lot. */
.cart-mode, .cart-mode-fixed {
  margin: 10px 0 4px;
  width: 100%;
  font-size: 16px;
}
.cart-mode {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fafafa;
}
.cart-mode-fixed { color: #555; font-size: 14px; }

/* Point relais (mode envoi). */
.cart-relay { margin: 6px 0 4px; }
.cart-relay-chosen {
  font-size: 13px;
  color: #9a3412;
  margin-bottom: 6px;
}
.cart-relay-chosen.ok { color: #1f7a43; }
.cart-relay-search { display: flex; gap: 8px; }
.cart-relay-input {
  flex: 1 1 auto;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 16px;
}
.cart-relay-btn {
  border: none;
  background: #111;
  color: #fff;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}
.cart-relay-list { margin-top: 8px; max-height: 240px; overflow: auto; }
.cart-relay-list .relay-row {
  display: flex;
  width: 100%;
  text-align: left;
  border: 1px solid #eee;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
  cursor: pointer;
}
.cart-relay-list .relay-row.on { border-color: #111; background: #f6f6f6; }
.cart-relay-list .relay-name { font-weight: 600; font-size: 14px; }
.cart-relay-list .relay-addr { font-size: 12px; color: #666; }
.cart-relay-list .relay-empty { color: #888; font-size: 13px; padding: 8px 4px; }

/* Sous-total d'un lot + récapitulatif global. */
.cart-lot-sub { margin-top: 8px; border-top: 1px dashed #eee; padding-top: 8px; }
.cart-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #444;
  padding: 2px 0;
}
.cart-line.strong { font-weight: 800; color: #111; font-size: 15px; }
.cart-recap {
  border: 1px solid #ececec;
  border-radius: 16px;
  padding: 12px 14px;
  background: #fafafa;
}

/* Pied : bouton Payer. */
.cart-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #eee;
  z-index: 6;
}
.cart-pay-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: #ff5a1f;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
}
.cart-pay-btn:disabled { opacity: .5; cursor: default; }

/* Feuille « Remise sur les lots » (vendeur) — réutilise les classes .sheet*. */
#bd-tiers { margin: 4px 0 12px; }
.bd-tier {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f3f3;
}
.bd-tier-l { flex: 1 1 auto; font-size: 15px; }
.bd-tier-pct {
  width: 76px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  text-align: right;
}
.bd-tier-pc { color: #555; }
.bd-save-btn {
  width: 100%;
  margin-top: 6px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: #111;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
}
