/* Page panier : maquette « Refaire page panier ». S'appuie sur mv4.css (variables, boutons). */

body.mv-panier-page {
  background: var(--mv-grey);
}

.mv-cart-page {
  padding: 22px 0 64px;
  color: var(--mv-text);
}

.mv-cart-page :is(h1, h2, h3, p, ul, ol, li, figure) {
  margin: 0;
  padding: 0;
}

.mv-cart-page :is(ul, ol) {
  list-style: none;
}

.mv-cart-page a {
  text-decoration: none;
}

.mv-cart-page :is(h1, h2, strong) {
  color: var(--mv-dark);
}

.mv-cart-page .woocommerce-notices-wrapper,
.mv-cart-page .woocommerce-message,
.mv-cart-page .woocommerce-error,
.mv-cart-page .woocommerce-info {
  width: min(var(--mv-w), calc(100% - 32px));
  margin: 0 auto 16px;
}

.mv-btn--block {
  display: flex;
  width: 100%;
}

.mv-btn--l {
  min-height: 54px;
  font-size: 15.5px;
}

.mv-card {
  background: #fff;
  border: 1px solid var(--mv-line);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(22, 22, 27, 0.04);
}

/* ---- En-tête + étapes ---- */
.mv-cartp__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.mv-cartp__head h1 small {
  font-size: 0.5em;
  font-weight: 700;
  color: var(--mv-mute);
  letter-spacing: 0;
}

.mv-etapes {
  display: flex;
  gap: 26px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--mv-mute);
}

.mv-etapes li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mv-etapes li span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8e8ee;
  font-size: 13px;
}

.mv-etapes li.is-now {
  color: var(--mv-magenta);
}

.mv-etapes li.is-now span {
  background: var(--mv-magenta);
  color: #fff;
}

/* ---- Grille ---- */
.mv-cartp__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 26px;
  align-items: start;
}

.mv-cartp__main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.woocommerce-cart-form {
  display: grid;
  gap: 18px;
  margin: 0;
}

.mv-cartp__maj {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Livraison offerte ---- */
.mv-franco {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  align-items: center;
  padding: 22px 24px;
}

.mv-franco__ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--mv-rose);
  color: var(--mv-magenta);
}

.mv-franco__t {
  font-size: 18px;
  font-weight: 800;
  color: var(--mv-dark);
}

.mv-franco__t strong {
  color: var(--mv-magenta);
}

.mv-franco__s {
  font-size: 13.5px;
  color: var(--mv-mute);
}

.mv-franco__barre,
.mv-franco__bornes {
  grid-column: 1 / -1;
}

.mv-franco__barre {
  height: 8px;
  margin-top: 12px;
  border-radius: 999px;
  background: #ececf2;
  overflow: hidden;
}

.mv-franco__barre i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--mv-magenta);
}

.mv-franco.is-ok .mv-franco__barre i {
  background: #1f9d6b;
}

.mv-franco.is-ok .mv-franco__ico {
  background: var(--mv-menthe);
  color: #14806a;
}

.mv-franco__bornes {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--mv-mute);
}

/* ---- Lignes d'articles ---- */
.mv-lignes {
  padding: 6px 24px;
}

.mv-ligne {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto 110px;
  gap: 8px 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--mv-line);
}

.mv-ligne:last-child {
  border-bottom: 0;
}

.mv-ligne__img {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 14px;
  background: var(--mv-grey);
  overflow: hidden;
}

.mv-ligne__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mv-ligne__marque {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mv-magenta);
}

.mv-ligne__nom {
  margin: 2px 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.mv-ligne__nom a {
  color: var(--mv-dark);
}

.mv-ligne__infos {
  font-size: 14px;
  color: var(--mv-mute);
}

.mv-ligne__rm {
  display: inline-block;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--mv-text);
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.mv-ligne__rm:hover {
  color: var(--mv-magenta);
}

.mv-ligne__prix {
  text-align: right;
  font-size: 19px;
  font-weight: 800;
}

.mv-ligne__cadeau {
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff1cf;
  font-size: 12.5px;
  font-weight: 800;
  color: #8a5a00;
}

.mv-qte {
  display: inline-flex;
  align-items: center;
  height: 44px;
  border: 1.5px solid var(--mv-line);
  border-radius: 12px;
  overflow: hidden;
}

.mv-qte button {
  width: 38px;
  height: 100%;
  border: 0;
  background: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: var(--mv-dark);
  cursor: pointer;
}

.mv-qte button:hover {
  background: var(--mv-grey);
}

.mv-qte .quantity {
  margin: 0;
}

.mv-qte input.qty {
  width: 44px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  -moz-appearance: textfield;
  appearance: textfield;
}

.mv-qte input.qty::-webkit-outer-spin-button,
.mv-qte input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mv-qte > span {
  width: 44px;
  text-align: center;
  font-weight: 800;
}

/* ---- Compléter le panier ---- */
.mv-sugg {
  padding: 24px;
}

.mv-sugg h2 {
  font-size: 21px;
  font-weight: 800;
}

.mv-sugg__s {
  margin: 4px 0 16px;
  font-size: 14px;
  color: var(--mv-mute);
}

.mv-sugg__grille {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.mv-sugg__carte {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--mv-line);
  border-radius: 14px;
  overflow: hidden;
}

.mv-sugg__img {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  background: var(--mv-grey);
}

.mv-sugg__img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.mv-sugg__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #1f9d6b;
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
}

.mv-sugg__corps {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
}

.mv-sugg__nom {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--mv-dark);
}

.mv-sugg__corps small {
  font-size: 12.5px;
  color: var(--mv-mute);
}

.mv-sugg__bas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.mv-sugg__bas strong {
  font-size: 16.5px;
}

.mv-sugg__bas .mv-btn {
  color: #fff !important;
}

.mv-cartp__suite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--mv-magenta);
}

/* ---- Récapitulatif ---- */
.mv-cartp__side {
  position: sticky;
  top: 16px;
}

.mv-recap {
  display: grid;
  gap: 14px;
  padding: 26px;
}

.mv-recap h2 {
  font-size: 22px;
  font-weight: 800;
}

.mv-recap__ligne {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 16px;
}

.mv-recap__ligne strong {
  font-weight: 800;
}

.mv-recap__remise {
  color: #14806a;
}

.mv-recap__remise strong {
  color: #14806a;
}

.mv-recap__remise a {
  margin-left: 6px;
  font-size: 12.5px;
  color: var(--mv-mute);
  text-decoration: underline !important;
}

.mv-recap__titre {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--mv-dark);
}

.mv-recap__note {
  font-size: 13.5px;
  color: var(--mv-mute);
  line-height: 1.45;
}

.mv-mode {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  margin-bottom: 8px;
  padding: 14px 14px 14px 44px;
  border: 1.5px solid var(--mv-line);
  border-radius: 14px;
  cursor: pointer;
}

.mv-mode.is-on {
  border-color: var(--mv-magenta);
  background: #fdf4fa;
}

.mv-mode input {
  position: absolute;
  top: 16px;
  left: 14px;
  width: 18px;
  height: 18px;
  accent-color: var(--mv-magenta);
}

.mv-mode__t {
  font-weight: 800;
  color: var(--mv-dark);
}

.mv-mode__p {
  font-weight: 800;
}

.mv-mode__d {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--mv-mute);
}

.mv-promo {
  border-top: 1px solid var(--mv-line);
  border-bottom: 1px solid var(--mv-line);
  padding: 14px 0;
}

.mv-promo summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  color: var(--mv-dark);
  cursor: pointer;
  list-style: none;
}

.mv-promo summary::-webkit-details-marker {
  display: none;
}

.mv-promo[open] summary .mv-i {
  transform: rotate(180deg);
}

.mv-promo__form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.mv-promo__form input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--mv-line);
  border-radius: 12px;
}

.mv-recap__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.mv-recap__total span {
  font-size: 18px;
  font-weight: 800;
  color: var(--mv-dark);
}

.mv-recap__total strong {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mv-gain {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--mv-rose);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--mv-magenta);
}

.mv-gain a {
  text-decoration: underline !important;
  color: inherit;
}

.mv-gain strong {
  color: var(--mv-magenta);
}

.mv-recap .checkout-button {
  width: 100%;
  margin: 0;
  padding: 0 20px;
  border-radius: 14px;
  background: var(--mv-magenta);
  color: #fff !important;
}

.mv-recap__cb {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mv-recap__cb li {
  padding: 5px 10px;
  border: 1px solid var(--mv-line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--mv-dark);
}

.mv-recap__cb .is-visa {
  color: #1a1f71;
}

.mv-recap__cb .is-autres {
  color: var(--mv-mute);
  font-weight: 600;
}

.mv-recap__garanties {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--mv-line);
  font-size: 14px;
}

.mv-recap__garanties li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--mv-text);
}

.mv-recap__garanties .mv-i {
  color: var(--mv-magenta);
}

.mv-recap__garanties a {
  font-weight: 700;
  color: var(--mv-dark);
}

.mv-sticky {
  display: none;
}

/* ---- Panier vide ---- */
.mv-cartp--vide {
  padding-bottom: 24px;
}

.mv-vide-carte {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 56px 24px;
  text-align: center;
}

.mv-vide-carte__ico {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--mv-rose);
  color: var(--mv-magenta);
}

.mv-vide-carte h2 {
  font-size: 22px;
  font-weight: 800;
}

.mv-vide-carte p {
  color: var(--mv-mute);
}

/* ---- Tablette / mobile ---- */
@media (max-width: 980px) {
  .mv-cartp__grid {
    grid-template-columns: 1fr;
  }

  .mv-cartp__side {
    position: static;
  }

  .mv-sugg__grille {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mv-cartp {
    padding-bottom: 84px;
  }

  .mv-sticky {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--mv-line);
    box-shadow: 0 -6px 20px rgba(22, 22, 27, 0.08);
  }

  .mv-sticky small {
    display: block;
    font-size: 12px;
    color: var(--mv-mute);
  }

  .mv-sticky strong {
    font-size: 21px;
  }

  .mv-sticky .mv-btn {
    min-height: 48px;
    color: #fff !important;
  }
}

@media (max-width: 640px) {
  .mv-cartp__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .mv-etapes {
    gap: 14px;
    font-size: 13px;
  }

  .mv-franco {
    padding: 18px;
  }

  .mv-lignes {
    padding: 4px 16px;
  }

  .mv-ligne {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas:
      "img corps prix"
      "img qte qte";
    gap: 8px 14px;
    align-items: start;
  }

  .mv-ligne__img {
    grid-area: img;
    width: 72px;
    height: 72px;
  }

  .mv-ligne__corps {
    grid-area: corps;
  }

  .mv-ligne__prix {
    grid-area: prix;
    font-size: 17px;
  }

  .mv-qte,
  .mv-ligne__cadeau {
    grid-area: qte;
    justify-self: start;
  }

  .mv-ligne__nom {
    font-size: 16px;
  }

  .mv-sugg {
    padding: 18px 16px;
  }

  .mv-recap {
    padding: 20px 18px;
  }

  .mv-recap__total strong {
    font-size: 28px;
  }
}
