/* ===========================
   ZOOM TECHNOLOGIE — CART.CSS
   Panier WhatsApp — Drawer + Badge + Animations
   =========================== */

/* ════════════════════════════
   ICÔNE PANIER HEADER
   ════════════════════════════ */
.cart-header-btn{
  position: relative;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: white; font-size: 1.1rem;
  transition: all 0.2s; flex-shrink: 0;
}
.cart-header-btn:hover{
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

/* Badge compteur */
#cartBadge{
  position: absolute;
  top: -7px; right: -7px;
  background: #FF6B00;
  color: white;
  font-size: 0.62rem;
  font-weight: 900;
  font-family: 'Inter', sans-serif;
  min-width: 18px; height: 18px;
  border-radius: 50px;
  display: none;
  align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid #0A0A0F;
  line-height: 1;
}
/* Animation pop au clic */
@keyframes badgePop{
  0%  { transform: scale(1); }
  40% { transform: scale(1.55); }
  70% { transform: scale(0.88); }
  100%{ transform: scale(1); }
}
#cartBadge.badge-pop{ animation: badgePop 0.38s cubic-bezier(0.36,0.07,0.19,0.97); }

/* ════════════════════════════
   OVERLAY
   ════════════════════════════ */
#cartOverlay{
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
#cartOverlay.open{ opacity: 1; pointer-events: all; }

/* ════════════════════════════
   DRAWER LATÉRAL
   ════════════════════════════ */
#cartDrawer{
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 100vw;
  z-index: 3100;
  background: #0f0f1a;
  border-left: 1px solid rgba(255,255,255,0.08);
  box-shadow: -8px 0 48px rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
#cartDrawer.open{ transform: translateX(0); }

/* Header drawer */
.cart-drawer-header{
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.cart-drawer-title{
  display: flex; align-items: center; gap: 10px;
  font-size: 1.05rem; font-weight: 800; color: white;
  font-family: 'Inter', sans-serif;
}
.cart-drawer-title i{ color: #FF6B00; }
#cartCount{
  font-size: 0.72rem; font-weight: 600;
  color: #888899; margin-left: 2px;
}
.cart-close-btn{
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #888899; cursor: pointer; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.cart-close-btn:hover{ background: rgba(255,255,255,0.14); color: white; }

/* Liste des articles */
#cartItemsList{
  flex: 1; overflow-y: auto;
  padding: 14px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
#cartItemsList::-webkit-scrollbar{ width: 4px; }
#cartItemsList::-webkit-scrollbar-track{ background: transparent; }
#cartItemsList::-webkit-scrollbar-thumb{ background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Panier vide */
#cartEmpty{
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 20px; color: #555566;
  font-family: 'Inter', sans-serif;
}
#cartEmpty i{ font-size: 3rem; margin-bottom: 14px; opacity: 0.4; }
#cartEmpty p{ font-size: 0.9rem; text-align: center; line-height: 1.6; }

/* ════════════════════════════
   ARTICLE PANIER
   ════════════════════════════ */
.cart-item{
  display: flex; gap: 14px;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s;
  border-radius: 10px;
  margin-bottom: 4px;
}
.cart-item:hover{ background: rgba(255,255,255,0.03); }
.cart-item:last-child{ border-bottom: none; }

/* Image article */
.ci-img-wrap{
  width: 70px; height: 70px; flex-shrink: 0;
  border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg,#f0f4ff,#e8ecff);
  display: flex; align-items: center; justify-content: center;
}
.ci-img{ width:100%; height:100%; object-fit:cover; display:block; }
.ci-emoji{
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  font-size: 2rem; background: #1a1a2e;
}

/* Infos article */
.ci-info{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ci-name{
  font-size: 0.82rem; font-weight: 700; color: white;
  font-family: 'Inter', sans-serif; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ci-price-unit{ font-size: 0.72rem; color: #666677; font-family: 'Inter', sans-serif; }
.ci-line-total{ font-size: 0.88rem; font-weight: 900; color: #FF6B00; font-family: 'Inter', sans-serif; }

/* Ligne quantité */
.ci-qty-row{
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
}
.ci-qty-btn{
  width: 26px; height: 26px; border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: white; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; line-height: 1; font-family: 'Inter', sans-serif;
}
.ci-qty-btn:hover{ background: rgba(255,255,255,0.18); }
.ci-qty-input{
  width: 38px; height: 26px; border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: white; text-align: center; font-size: 0.82rem;
  font-family: 'Inter', sans-serif; outline: none;
}
.ci-qty-input:focus{ border-color: #0055FF; }
.ci-remove-btn{
  margin-left: auto;
  width: 26px; height: 26px; border-radius: 6px;
  background: rgba(229,62,62,0.12);
  border: 1px solid rgba(229,62,62,0.2);
  color: #e53e3e; cursor: pointer; font-size: 0.72rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.ci-remove-btn:hover{ background: rgba(229,62,62,0.28); }

/* ════════════════════════════
   FOOTER DRAWER — Total + Boutons
   ════════════════════════════ */
#cartFooter{
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 20px 24px;
  background: #0a0a14;
}

/* Ligne total */
.cart-total-row{
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.cart-total-label{
  font-size: 0.85rem; color: #888899;
  font-family: 'Inter', sans-serif; font-weight: 600;
}
#cartTotal{
  font-size: 1.25rem; font-weight: 900; color: white;
  font-family: 'Inter', sans-serif;
}

/* Boutons commande */
.cart-order-btns{ display: flex; flex-direction: column; gap: 10px; }

.cart-btn-wa{
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #25D366; color: white;
  padding: 13px; border-radius: 12px;
  font-size: 0.92rem; font-weight: 800;
  font-family: 'Inter', sans-serif;
  border: none; cursor: pointer; width: 100%;
  transition: all 0.2s;
}
.cart-btn-wa:hover{ background: #128C7E; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,211,102,0.4); }

.cart-btn-ms{
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #0084FF; color: white;
  padding: 11px; border-radius: 12px;
  font-size: 0.88rem; font-weight: 700;
  font-family: 'Inter', sans-serif;
  border: none; cursor: pointer; width: 100%;
  transition: all 0.2s;
}
.cart-btn-ms:hover{ background: #006ACC; transform: translateY(-1px); }

.cart-btn-clear{
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: #666677;
  padding: 9px; border-radius: 10px;
  font-size: 0.78rem; font-weight: 600;
  font-family: 'Inter', sans-serif;
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer; width: 100%; transition: all 0.2s;
}
.cart-btn-clear:hover{ color: #e53e3e; border-color: rgba(229,62,62,0.3); }

/* ════════════════════════════
   BOUTON AJOUTER AU PANIER (cards)
   ════════════════════════════ */
.btn-add-cart{
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(180deg, #FF7A1A, #FF6B00);
  color: white;
  padding: 9px 10px; border-radius: 8px;
  font-size: 0.80rem; font-weight: 800;
  font-family: 'Inter', sans-serif;
  border: none; cursor: pointer; width: 100%;
  transition: all 0.18s;
  box-shadow: 0 2px 8px rgba(255,107,0,0.30);
}
.btn-add-cart:hover{
  background: linear-gradient(180deg, #FF8C00, #FF6B00);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255,107,0,0.45);
}
.btn-add-cart:active{ transform: translateY(0); box-shadow: none; }

/* Bouton dans la modal */
.modal-btn-cart{
  flex: 1.2;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, #FF7A1A, #FF6B00);
  color: white;
  padding: 13px 10px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 800;
  font-family: 'Inter', sans-serif;
  border: none; cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 3px 10px rgba(255,107,0,0.35);
}
.modal-btn-cart:hover{
  background: linear-gradient(180deg, #FF8C00, #FF6B00);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,0,0.50);
}

/* ════════════════════════════
   TOAST PANIER
   ════════════════════════════ */
.cart-toast{
  position: fixed;
  top: 80px; right: 20px;
  z-index: 4000;
  background: #1a1a2e;
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.83rem;
  font-family: 'Inter', sans-serif;
  border-left: 4px solid #25D366;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  max-width: 320px;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  line-height: 1.4;
}
.cart-toast.show{
  opacity: 1;
  transform: translateX(0);
}

/* ════════════════════════════
   RESPONSIVE
   ════════════════════════════ */
@media(max-width: 480px){
  #cartDrawer{ width: 100vw; }
  .cart-toast{ right: 10px; left: 10px; max-width: none; }
}
