/* ========== PAGE PANIER : violet, blanc, noir ========== */

body {
  background: linear-gradient(180deg, hsl(270, 67%, 96%) 0%, #f0cbf1 60%);
}

.page-panier {
  max-width: 1050px;
  margin: 50px auto 70px;
  padding: 0 24px;
}

.page-panier h1 {
  text-align: center;
  color: #4f2c7a;
  font-size: 2.4rem;
  letter-spacing: 1px;
  margin-bottom: 40px;
}

.page-panier h1::after {
  content: "";
  display: block;
  width: 90px;
  height: 4px;
  background: #6b3fa0;
  border-radius: 4px;
  margin: 12px auto 0;
}

/* ----- Carte produit (plus grande) ----- */
.ligne-panier {
  display: grid;
  grid-template-columns: 170px 1fr auto auto auto;
  align-items: center;
  gap: 28px;
  background: #ffffff;
  border: 1px solid #e6dcf5;
  border-left: 6px solid #6b3fa0;
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(204, 37, 233, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ligne-panier:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(107, 63, 160, 0.2);
}

.ligne-panier img {
  width: 170px;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
  background: #f3ecfb;
}

.infos-panier .nom {
  font-size: 1.35rem;
  font-weight: bold;
  color: #1a1a1a;
  margin: 0 0 10px;
}

.infos-panier .prix {
  font-size: 1.15rem;
  color: #6b3fa0;
  font-weight: 600;
  margin: 0;
}

/* ----- Quantité ----- */
.quantite {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f3ecfb;
  padding: 8px 14px;
  border-radius: 40px;
}

.quantite button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #6b3fa0;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.quantite button:hover {
  background: #4f2c7a;
}

.quantite button:active {
  transform: scale(0.92);
}

.quantite span {
  min-width: 24px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: bold;
  color: #1a1a1a;
}

.sous-total {
  font-size: 1.2rem;
  font-weight: bold;
  color: #f882fe;
  margin: 0;
  white-space: nowrap;
}

.btn-supprimer {
  border: none;
  background: #f3ecfb;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-supprimer:hover {
  background: #e3d2f5;
}

/* ----- Panier vide ----- */
#liste-panier {
  text-align: center;
}

#liste-panier .ligne-panier {
  text-align: left;
}

.panier-vide {
  font-size: 1.2rem;
  color: #555;
  margin: 40px 0 24px;
}

/* ----- Résumé / total ----- */
.resume-panier {
  margin-top: 36px;
  padding: 28px 32px;
  background:white;
  border-radius: 18px;
  text-align: right;
  border-color: 2px #1a1a1a ;
}

.resume-panier p {
  font-size: 1.5rem;
  margin: 0 0 20px;
  color: #120202;
}

.resume-panier strong {
  color: #c9a8f0;
  font-size: 1.8rem;
}

.btn-commander,
.btn-retour {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: bold;
  margin-left: 12px;
  transition: all 0.2s;
}

.btn-commander {
  background: #6b3fa0;
  color: #fff;
  border: 2px solid #6b3fa0;
}

.btn-commander:hover {
  background: #8a5cc4;
  border-color: #8a5cc4;
}

.btn-retour {
  background: #6b3fa0;
  color: #fff;
  border: 2px solid #6b3fa0;
}

.btn-retour:hover {
  background: #8a5cc4;
  border-color: #8a5cc4;
}

/* Quand le panier est vide, le bouton "retour" est dans la liste (fond clair) */
#liste-panier .btn-retour {
  color: #6b3fa0;
  border-color: #6b3fa0;
  margin-left: 0;
}

#liste-panier .btn-retour:hover {
  background: #6b3fa0;
  color: #fff;
}

/* ----- Tablette / téléphone ----- */
@media (max-width: 850px) {
  .ligne-panier {
    grid-template-columns: 130px 1fr;
    gap: 18px;
    padding: 20px;
  }
  .ligne-panier img {
    width: 130px;
    height: 130px;
  }
  .resume-panier {
    text-align: center;
  }
  .btn-commander,
  .btn-retour {
    display: block;
    margin: 12px 0 0;
  }
}