/* ========================================
   PAGE PANIER - THÈME NOËL COMPLET
   Couleurs: Bleu #0099ff → Rouge #dc143c
======================================== */

body {
  background: linear-gradient(135deg, #f7f8fb 0%, #ffffff 100%);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
}

/* ========================================
   CONTAINER PANIER
======================================== */
.cart-container {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 20px;
}

/* ========================================
   ITEM PANIER
======================================== */
.cart-item {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 12px rgba(0, 153, 255, 0.15);
  margin-bottom: 16px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

.cart-item:hover {
  border-color: #0099ff;
  box-shadow: 0 8px 20px rgba(0, 153, 255, 0.25);
  transform: translateY(-3px);
}

.cart-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #0099ff 0%, #dc143c 100%);
  border-radius: 16px 0 0 16px;
  transition: width 0.3s ease;
}

.cart-item:hover::before {
  width: 6px;
}

/* ========================================
   IMAGE PRODUIT
======================================== */
.item-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid #0099ff;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0, 153, 255, 0.2);
}

.cart-item:hover .item-img {
  border-color: #dc143c;
  transform: scale(1.05);
  box-shadow: 0 5px 12px rgba(220, 20, 60, 0.3);
}

/* ========================================
   CONTRÔLES QUANTITÉ
======================================== */
.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-controls .btn {
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0099ff 0%, #0077cc 100%);
  color: white;
  border: none;
  font-weight: bold;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0, 153, 255, 0.3);
}

.qty-controls .btn:hover {
  background: linear-gradient(135deg, #dc143c 0%, #b01030 100%);
  box-shadow: 0 5px 12px rgba(220, 20, 60, 0.4);
  transform: scale(1.1);
}

.qty-controls input {
  width: 50px;
  height: 38px;
  text-align: center;
  border: 2px solid #0099ff;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  background: #f9f9f9;
  transition: all 0.3s ease;
}

.qty-controls input:focus {
  outline: none;
  border-color: #dc143c;
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.15);
  background: white;
}

/* ========================================
   BOUTON SUPPRIMER
======================================== */
.btn-remove {
  position: relative;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: -45px;
  background: linear-gradient(135deg, #dc143c 0%, #b01030 100%);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(220, 20, 60, 0.3);
  font-weight: 600;
}

.btn-remove:hover {
  background: linear-gradient(135deg, #b01030 0%, #8a0c25 100%);
  box-shadow: 0 4px 10px rgba(220, 20, 60, 0.5);
  transform: translateY(-2px);
}

.btn-remove i {
  font-size: 10px;
}

/* Variantes de position */
.btn-move-top-left {
  position: absolute;
  top: 8px;
  left: 8px;
  margin-top: 0;
}

.btn-move-top-right {
  position: absolute;
  top: 8px;
  right: 8px;
  margin-top: 0;
}

.btn-move-bottom-right {
  position: absolute;
  bottom: 8px;
  right: 8px;
  margin-top: 0;
}

.btn-move-bottom-left {
  position: absolute;
  bottom: 8px;
  left: 8px;
  margin-top: 0;
}

/* ========================================
   CARTE RÉCAPITULATIF
======================================== */
.summary-card {
  position: sticky;
  top: 18px;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 6px 20px rgba(0, 153, 255, 0.2);
  border: 3px solid #0099ff;
  transition: all 0.3s ease;
}

.summary-card:hover {
  border-color: #dc143c;
  box-shadow: 0 10px 28px rgba(220, 20, 60, 0.25);
}

.summary-card h4 {
  color: #0099ff;
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 20px;
  border-bottom: 2px solid #0099ff;
  padding-bottom: 10px;
}

.summary-card .total-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0099ff;
  margin: 15px 0;
  text-shadow: 1px 1px 2px rgba(0, 153, 255, 0.1);
}

/* ========================================
   PANIER VIDE
======================================== */
.empty-cart {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  padding: 50px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 153, 255, 0.15);
  border: 3px dashed #0099ff;
  transition: all 0.3s ease;
}

.empty-cart:hover {
  border-color: #dc143c;
  box-shadow: 0 12px 32px rgba(220, 20, 60, 0.2);
}

.empty-cart i {
  font-size: 4rem;
  color: #0099ff;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.empty-cart:hover i {
  color: #dc143c;
  transform: scale(1.1);
}

.empty-cart h3 {
  color: #0099ff;
  font-weight: 700;
  margin-bottom: 15px;
}

.empty-cart p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 25px;
}

/* ========================================
   BOUTONS GÉNÉRAUX
======================================== */
.btn-ghost {
  background: transparent;
  border: 2px solid #0099ff;
  color: #0099ff;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0, 153, 255, 0.2);
}

.btn-ghost:hover {
  background: linear-gradient(135deg, #dc143c 0%, #b01030 100%);
  border-color: #dc143c;
  color: white;
  box-shadow: 0 5px 12px rgba(220, 20, 60, 0.3);
  transform: translateY(-2px);
}

/* ========================================
   BADGE PANIER
======================================== */
.badge-cart {
  background: linear-gradient(135deg, #ffd700 0%, #ffb84d 100%);
  color: #333;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
  border: 2px solid white;
}

/* ========================================
   BARRE CTA (Call To Action)
======================================== */
.cta-bar {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, #fff 0%, #f8f9fa 100%);
  border-top: 3px solid #0099ff;
  padding: 16px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0, 153, 255, 0.15);
  transition: all 0.3s ease;
}

.cta-bar:hover {
  border-top-color: #dc143c;
}

.btn-commande {
  flex: 1;
  background: linear-gradient(135deg, #0099ff 0%, #0077cc 100%);
  color: #fff;
  border: none;
  border-radius: 35px;
  padding: 16px 20px;
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 6px 16px rgba(0, 153, 255, 0.4);
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.btn-commande::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #dc143c 0%, #b01030 100%);
  transition: left 0.4s ease;
  z-index: 0;
}

.btn-commande:hover::before {
  left: 0;
}

.btn-commande span {
  position: relative;
  z-index: 1;
}

.btn-commande:hover {
  box-shadow: 0 10px 24px rgba(220, 20, 60, 0.5);
  transform: translateY(-3px);
}

/* ========================================
   DRAWER / MODALE
======================================== */
.drawer-bottom {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: bottom 0.4s ease, opacity 0.3s ease;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
}

.drawer-bottom.active {
  bottom: 0;
  opacity: 1;
  pointer-events: all;
}

/* ========================================
   CONTENU DRAWER
======================================== */
.drawer-content {
  background: linear-gradient(to bottom, #fff 0%, #f8f9fa 100%);
  width: 100%;
  max-height: 95%;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 28px;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
  animation: slideUp 0.4s cubic-bezier(0.25, 1.3, 0.5, 1);
  position: relative;
}

/* Poignée drawer */
.drawer-content::before {
  content: "";
  width: 50px;
  height: 5px;
  background: linear-gradient(to right, #0099ff, #dc143c);
  border-radius: 3px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}

.drawer-content:hover::before {
  width: 70px;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ========================================
   HEADER DRAWER
======================================== */
.drawer-content h3 {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #0099ff;
  margin: 20px 0 8px 0;
  border-bottom: 2px solid #0099ff;
  padding-bottom: 12px;
  transition: all 0.3s ease;
}

.drawer-content h3:hover {
  color: #dc143c;
  border-color: #dc143c;
}

.drawer-content .subtitle {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-bottom: 25px;
}

/* ========================================
   INPUTS DRAWER
======================================== */
.drawer-content input,
.drawer-content select {
  width: 100%;
  padding: 14px;
  margin-bottom: 18px;
  border: none;
  border-bottom: 3px solid #0099ff;
  outline: none;
  background: #fff;
  font-size: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.drawer-content input:focus,
.drawer-content select:focus {
  border-color: #dc143c;
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.15);
  transform: translateY(-2px);
  background: #fafafa;
}

/* ========================================
   CONTRÔLES QUANTITÉ DRAWER
======================================== */
.quantity-container {
  margin-bottom: 20px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 12px;
  border: 2px solid #e0e0e0;
}

.quantity-container label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #0099ff;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.quantity-controls button {
  width: 40px;
  height: 40px;
  border: 3px solid #0099ff;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 153, 255, 0.2);
  color: #0099ff;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quantity-controls button:hover {
  background: linear-gradient(135deg, #dc143c 0%, #b01030 100%);
  border-color: #dc143c;
  color: white;
  box-shadow: 0 6px 14px rgba(220, 20, 60, 0.35);
  transform: scale(1.15);
}

.quantity-controls input {
  width: 60px;
  text-align: center;
  border: 2px solid #0099ff;
  background: #fff;
  font-size: 18px;
  font-weight: bold;
  padding: 10px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.quantity-controls input:focus {
  border-color: #dc143c;
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.15);
}

/* ========================================
   RÉCAP PRODUIT DRAWER
======================================== */
.recap-produit {
  display: flex;
  gap: 15px;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 153, 255, 0.15);
  margin-bottom: 20px;
  border: 2px solid #0099ff;
  transition: all 0.3s ease;
}

.recap-produit:hover {
  border-color: #dc143c;
  box-shadow: 0 6px 16px rgba(220, 20, 60, 0.2);
  transform: translateX(5px);
}

.recap-produit img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid #0099ff;
  transition: all 0.3s ease;
}

.recap-produit:hover img {
  border-color: #dc143c;
  transform: scale(1.05);
}

.recap-info {
  flex: 1;
}

.produit-nom {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 6px;
  color: #333;
}

.produit-prix {
  font-weight: bold;
  font-size: 16px;
  margin-top: 6px;
  color: #0099ff;
}

.frais-livraison {
  font-size: 13px;
  color: #666;
  font-style: italic;
}

/* ========================================
   TOTAL RÉCAP
======================================== */
.recap-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  color: #0099ff !important;
  font-weight: 800;
  margin-bottom: 25px;
  padding: 16px;
  background: linear-gradient(135deg, #e6f5ff 0%, #cce9ff 100%);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 153, 255, 0.15);
  border: 2px solid #0099ff;
  transition: all 0.3s ease;
}

.recap-total:hover {
  border-color: #dc143c;
  color: #dc143c !important;
}

/* ========================================
   INFOS CLIENT
======================================== */
.recap-client {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  padding: 18px;
  border-radius: 12px;
  margin-bottom: 25px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
}

.recap-client:hover {
  border-color: #0099ff;
  box-shadow: 0 5px 14px rgba(0, 153, 255, 0.15);
}

.recap-client h4 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #0099ff;
  border-bottom: 2px solid #0099ff;
  padding-bottom: 8px;
}

.recap-client p {
  margin: 10px 0;
  font-size: 14px;
  color: #555;
}

/* ========================================
   PAIEMENT
======================================== */
.paiement {
  text-align: center;
  font-size: 14px;
  margin: 25px 0;
  color: #555;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 10px;
  border: 2px dashed #0099ff;
}

.paiement .delai {
  color: #dc143c;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  display: block;
}

/* ========================================
   BOUTONS DRAWER
======================================== */
.btn-suivant,
.btn-valider {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #0099ff 0%, #0077cc 100%);
  border: none;
  border-radius: 30px;
  color: white;
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 6px 16px rgba(0, 153, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-suivant::before,
.btn-valider::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #dc143c 0%, #b01030 100%);
  transition: left 0.4s ease;
  z-index: 0;
}

.btn-suivant:hover::before,
.btn-valider:hover::before {
  left: 0;
}

.btn-suivant span,
.btn-valider span {
  position: relative;
  z-index: 1;
}

.btn-suivant:hover,
.btn-valider:hover {
  box-shadow: 0 10px 24px rgba(220, 20, 60, 0.5);
  transform: translateY(-3px);
}

/* ========================================
   NOTIFICATIONS / ALERTES
======================================== */
.custom-alert-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 340px;
}

.custom-alert {
  background: linear-gradient(135deg, #2d5016 0%, #1e3510 100%);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(45, 80, 22, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideIn 0.4s ease;
  position: relative;
  border: 2px solid #ffd700;
  overflow: hidden;
}

.custom-alert::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0099ff 0%, #dc143c 100%);
  opacity: 0.2;
  transition: left 0.5s ease;
}

.custom-alert:hover::before {
  left: 0;
}

.custom-alert i {
  margin-right: 10px;
  font-size: 18px;
  color: #ffd700;
  position: relative;
  z-index: 1;
}

.custom-alert span {
  position: relative;
  z-index: 1;
}

@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.fade-out {
  animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(120%);
  }
}

/* ========================================
   RESPONSIVE MOBILE
======================================== */
@media (max-width: 767px) {
  .summary-card {
    position: static;
    margin-top: 20px;
  }

  .cart-item {
    padding: 14px;
  }

  .item-img {
    width: 80px;
    height: 80px;
  }

  .qty-controls .btn {
    min-width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .btn-commande {
    font-size: 1rem;
    padding: 14px 16px;
  }

  .custom-alert-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

@media (max-width: 576px) {
  .cart-container {
    margin: 20px auto;
    padding: 0 10px;
  }

  .drawer-content {
    padding: 20px;
  }

  .recap-produit {
    flex-direction: column;
    text-align: center;
  }

  .recap-produit img {
    width: 100%;
    height: 150px;
    margin: 0 auto;
  }
}