/* dspanier — éléments ajoutés par le module (tous préfixés .dsp-). */

.dsp-cache { display: none !important; }

/* ---------- Bouton « Vider le panier » ---------- */
.dsp-vider {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px; margin: 0;
  border: 1.5px solid #e6b9bc; border-radius: 22px;
  background: #fff; color: #c40d16;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-transform: none;
}
.dsp-vider:hover, .dsp-vider:focus { background: #fff0f1; color: #8f0a11; }
.dsp-vider svg { flex: none; }

.dsp-mini-tete {
  display: flex; justify-content: flex-end;
  padding: 8px 10px; border-bottom: 1px solid #eceef5;
}
.dsp-mini-tete .dsp-vider { min-height: 40px; font-size: 13px; }

/* ---------- Fenêtre de confirmation ---------- */
.dsp-voile {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100000;
  background: rgba(20, 22, 35, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.dsp-dialogue {
  box-sizing: border-box; width: 100%; max-width: 440px;
  background: #fff; color: #373737;
  border-radius: 20px 20px 0 0; padding: 24px 20px;
  font-family: inherit; text-align: left;
}
@media (min-width: 576px) {
  .dsp-voile { align-items: center; }
  .dsp-dialogue { border-radius: 20px; }
}
.dsp-dialogue-picto {
  width: 48px; height: 48px; border-radius: 24px;
  background: #fdeced; color: #c40d16;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.dsp-dialogue-titre { margin: 0 0 8px; font-size: 20px; font-weight: 700; line-height: 1.25; color: #373737; text-transform: none; }
.dsp-dialogue-phrase { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: #5f5f6b; }
.dsp-dialogue-boutons { display: flex; flex-direction: column; gap: 10px; }
.dsp-dialogue-btn {
  min-height: 50px; border-radius: 12px; padding: 0 16px;
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.dsp-dialogue-btn--oui { border: 0; background: #c40d16; color: #fff; }
.dsp-dialogue-btn--oui:hover, .dsp-dialogue-btn--oui:focus { background: #8f0a11; }
.dsp-dialogue-btn--non { border: 1px solid #d5d8e3; background: #fff; color: #373737; }
.dsp-dialogue-btn[disabled] { opacity: .6; cursor: default; }
.dsp-dialogue-erreur { margin: 12px 0 0; font-size: 13px; color: #c40d16; }

/* ---------- En-tête du panier : bouton + étapes ---------- */
.dsp-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 10px; max-width: 100%; min-width: 0; }
.dsp-etapes { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: 13px; font-weight: 500; }
.dsp-etape { display: flex; align-items: center; gap: 6px; }
.dsp-etape-num {
  box-sizing: border-box; width: 24px; height: 24px; border-radius: 12px;
  border: 1.5px solid currentColor; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.dsp-etape--active { font-weight: 700; }
.dsp-etape--active .dsp-etape-num { background: #465cff; border-color: #465cff; color: #fff; }
.dsp-etape-trait { width: 24px; height: 2px; background: currentColor; opacity: .5; }
.dsp-etapes { flex-wrap: wrap; max-width: 100%; }
@media (max-width: 575px) {
  .dsp-etapes { gap: 5px; font-size: 12px; }
  .dsp-etape-trait { width: 8px; }
  .dsp-etape-num { width: 22px; height: 22px; }
}

/* ---------- Bandeau « vous économisez » ---------- */
.dsp-eco {
  display: flex; align-items: center; gap: 12px;
  background: #fff0f1; border: 1.5px dashed #f2a3a8; border-radius: 14px;
  padding: 10px 14px; margin: 0 0 14px; color: #8f0a11; font-size: 14px; line-height: 1.35;
}
.dsp-eco-picto {
  width: 40px; height: 40px; flex: none; border-radius: 20px;
  background: #ff141e; color: #fff; display: flex; align-items: center; justify-content: center;
}
.dsp-eco strong { font-weight: 800; }

/* ---------- Quantité − / + ---------- */
.dsp-qte { display: inline-flex; align-items: center; background: #f0f2ff; border-radius: 22px; vertical-align: middle; }
.dsp-qte-btn {
  width: 44px; height: 44px; flex: none; border-radius: 22px; padding: 0;
  font-size: 20px; font-weight: 600; line-height: 1; cursor: pointer;
}
.dsp-qte-btn--moins { border: 1.5px solid #c9cffb; background: #fff; color: #465cff; }
.dsp-qte-btn--plus { border: 0; background: #465cff; color: #fff; }
.dsp-qte-btn[disabled] { opacity: .4; cursor: default; }
.dsp-qte input.js-cart-line-product-quantity {
  width: 44px; height: 44px; padding: 0; margin: 0; border: 0; background: transparent;
  text-align: center; font-size: 16px; font-weight: 700; color: #373737;
  -moz-appearance: textfield; appearance: textfield;
}
.dsp-qte input.js-cart-line-product-quantity::-webkit-outer-spin-button,
.dsp-qte input.js-cart-line-product-quantity::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Bloc natif à flèches de PrestaShop, quand il est présent : on ne garde que le champ. */
.dsp-qte .bootstrap-touchspin {
  display: block !important; float: none !important; width: 44px !important; min-width: 0 !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: transparent !important;
}
.dsp-qte .bootstrap-touchspin .input-group-btn-vertical,
.dsp-qte .bootstrap-touchspin .input-group-btn,
.dsp-qte .bootstrap-touchspin .input-group-addon { display: none !important; }
.dsp-qte input.js-cart-line-product-quantity {
  display: block !important; float: none !important; width: 44px !important; height: 44px !important;
  border: 0 !important; box-shadow: none !important; background: transparent !important; border-radius: 0 !important;
}

/* Quantité et total côte à côte, sans chevauchement. */
.dsp-rang-qte {
  display: flex !important; flex-wrap: wrap; align-items: flex-start; gap: 8px 22px;
  margin-left: 0 !important; margin-right: 0 !important;
}
.dsp-rang-qte:before, .dsp-rang-qte:after { display: none !important; }
.dsp-rang-qte > .qty, .dsp-rang-qte > .price {
  flex: none; float: none !important; width: auto !important; max-width: none !important;
  padding-left: 0 !important; padding-right: 0 !important;
}
.dsp-rang-qte > .qty > span:first-child, .dsp-rang-qte > .price > span:first-child { display: block; margin-bottom: 6px; }
.dsp-rang-qte > .price .product-price { display: block; line-height: 44px; white-space: nowrap; }

/* ---------- Barre « Commander » (téléphone) ---------- */
.dsp-barre { display: none; }
@media (max-width: 767px) {
  .dsp-barre {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
    display: flex; align-items: center; gap: 14px;
    background: #fff; border-radius: 22px 22px 0 0;
    box-shadow: 0 -6px 20px rgba(40, 50, 120, .12);
    padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .dsp-barre-total { display: flex; flex-direction: column; }
  .dsp-barre-libelle { font-size: 12px; color: #5f5f6b; }
  .dsp-barre-montant { font-size: 20px; font-weight: 800; color: #465cff; white-space: nowrap; }
  .dsp-barre-lien {
    flex: 1; min-height: 52px; border-radius: 26px;
    display: flex; align-items: center; justify-content: center;
    background: #465cff; color: #fff !important; font-size: 16px; font-weight: 700; text-decoration: none !important;
  }
  body.dsp-avec-barre { padding-bottom: 96px; }
}

/* ---------- Bloc Alma dans le récapitulatif ---------- */
.dsp-alma { padding: 12px 0 0; }
.dsp-alma > *, .dsp-alma .alma-pp-container, .dsp-alma [id^="alma-installments"] {
  width: 100% !important; max-width: none !important; margin: 0 !important; float: none !important; box-sizing: border-box !important;
}
.dsp-alma .alma-payment-plans-container {
  width: 100% !important; max-width: none !important; box-sizing: border-box !important; margin: 0 !important;
  background: #fff !important; border: 1px solid #eceef5 !important; border-radius: 12px !important; padding: 12px !important;
}
.dsp-alma .alma-payment-plans-eligibility-line { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 6px 10px !important; }
.dsp-alma .alma-payment-plans-eligibility-options { display: flex !important; flex-wrap: wrap !important; gap: 5px !important; }

/* ---------- Encarts de confiance ---------- */
.dsp-reass { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
@media (min-width: 768px) { .dsp-reass { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dsp-reass-carte {
  display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid #eceef5; border-radius: 16px; padding: 16px 14px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.dsp-reass-carte:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(40, 50, 120, .10); }
.dsp-reass-carte strong { font-size: 13px; font-weight: 700; line-height: 1.3; color: #373737; }
.dsp-reass-carte > span:last-child { font-size: 12px; color: #5f5f6b; }
.dsp-reass-picto { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.dsp-reass-picto--bleu { background: #e9ecff; color: #465cff; }
.dsp-reass-picto--vert { background: #e8f6ec; color: #17753a; }
.dsp-reass-picto--rouge { background: #ffe9ea; color: #c40d16; }
.dsp-reass-picto--ambre { background: #fff4d9; color: #7a5200; }

/* ---------- Animations ---------- */
@keyframes dspPop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes dspBalance { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(12deg); } }
@keyframes dspEntree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.dsp-eco { animation: dspEntree .4s ease-out 1; }
.dsp-eco-picto svg { animation: dspBalance .8s ease-in-out 2; transform-origin: 30% 30%; }
.dsp-sugg-carte { transition: transform .2s ease, box-shadow .2s ease; }
.dsp-sugg-carte:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(40, 50, 120, .10); }
.dsp-qte-btn, .dsp-vider, .dsp-sugg-ajout { transition: background-color .15s ease, color .15s ease, transform .1s ease; }
.dsp-qte-btn:active, .dsp-sugg-ajout:active { transform: scale(.94); }
@media (prefers-reduced-motion: reduce) {
  .dsp-eco, .dsp-eco-picto svg { animation: none; }
  .dsp-sugg-carte, .dsp-reass-carte, .dsp-qte-btn, .dsp-vider, .dsp-sugg-ajout { transition: none; }
  .dsp-sugg-carte:hover, .dsp-reass-carte:hover { transform: none; }
}

/* ---------- Suggestions ---------- */
.dsp-sugg { clear: both; margin: 26px 0; }
.dsp-sugg-titre { margin: 0 0 14px; font-size: 20px; font-weight: 800; line-height: 1.25; color: #373737; text-transform: none; }
.dsp-sugg-grille { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.dsp-sugg-carte {
  position: relative; box-sizing: border-box; flex: none; width: 200px;
  display: flex; flex-direction: column; gap: 6px;
  background: #fff; border: 1px solid #eceef5; border-radius: 16px; padding: 12px;
}
@media (min-width: 992px) {
  .dsp-sugg-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); overflow: visible; }
  .dsp-sugg-carte { width: auto; }
}
.dsp-sugg-photo { display: block; border-radius: 12px; overflow: hidden; background: #f4f5f9; }
.dsp-sugg-photo img { display: block; width: 100%; height: auto; }
.dsp-sugg-cat {
  align-self: flex-start; background: #e9ecff; color: #2f43d6;
  border-radius: 12px; padding: 2px 10px; font-size: 12px; font-weight: 600;
}
.dsp-sugg-nom {
  color: #373737 !important; font-size: 13px; font-weight: 600; line-height: 1.35; text-decoration: none; text-transform: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px;
}
.dsp-sugg-prix-rang { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.dsp-sugg-prix { font-size: 18px; font-weight: 800; color: #465cff; white-space: nowrap; }
.dsp-sugg-prix--promo { color: #ff141e; }
.dsp-sugg-ancien { font-size: 12px; color: #5f5f6b; text-decoration: line-through; white-space: nowrap; }
.dsp-sugg-ajout {
  min-height: 44px; border: 1.5px solid #465cff; border-radius: 22px;
  background: #fff; color: #465cff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.dsp-sugg-ajout:hover, .dsp-sugg-ajout:focus { background: #465cff; color: #fff; }
.dsp-sugg-ajout[disabled] { opacity: .6; cursor: default; }
.dsp-sugg-msg { font-size: 12px; color: #c40d16; }
.dsp-sugg-msg:empty { display: none; }
