/* ════════════════════════════════════════════════════════════
   PANIER - Styles
   ════════════════════════════════════════════════════════════ */

/* Badge panier */
#cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Modal panier */
.cart-modal {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 450px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-modal.open {
  right: 0;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}

.cart-overlay.open {
  display: block;
}

/* Header modal */
.cart-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  margin: 0;
  font-size: 20px;
}

.cart-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.cart-close:hover {
  background: #f3f4f6;
}

/* Contenu panier */
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

#cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

#cart-empty svg {
  margin: 0 auto 16px;
  opacity: 0.3;
}

/* Items panier */
.cart-item {
  display: grid;
  grid-template-columns: 60px 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #f3f4f6;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-details {
  min-width: 0;
}

.cart-item-name {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

/* Quantité */
.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.qty-input {
  width: 40px;
  height: 28px;
  text-align: center;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 14px;
}

.cart-item-subtotal {
  font-weight: 600;
  font-size: 15px;
  min-width: 60px;
  text-align: right;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
}

.cart-item-remove:hover {
  background: #fee2e2;
}

/* Footer panier */
.cart-footer {
  border-top: 1px solid #e5e7eb;
  padding: 20px;
  background: #f9fafb;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
}

.cart-actions {
  display: flex;
  gap: 12px;
}

.btn-checkout {
  flex: 1;
  background: #3b82f6;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-checkout:hover {
  background: #2563eb;
}

.btn-clear {
  background: white;
  border: 1px solid #e5e7eb;
  padding: 14px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-clear:hover {
  background: #f3f4f6;
}

/* Mobile */
@media (max-width: 768px) {
  .cart-modal {
    max-width: 100%;
  }
  
  .cart-item {
    grid-template-columns: 50px 1fr auto;
    gap: 10px;
  }
  
  .cart-item-subtotal {
    grid-column: 2 / 3;
    text-align: left;
    margin-top: 8px;
  }
  
  .cart-item-remove {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
  }
}

/* ═══════════════════════════════════════
   BADGE PANIER - Style "0"
   ═══════════════════════════════════════ */

.cart-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e63946;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  min-width: 20px;
  height: 20px;
  padding: 2px 6px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Badge grisé quand panier vide (0 articles) */
/* Badge grisé quand panier vide (0 articles) */
.cart-badge.empty {
  background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%) !important;
  color: #757575 !important;
  opacity: 0.8 !important;
  transform: scale(0.9) !important;
}

.cart-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cart-badge.empty:hover {
  transform: scale(0.95) !important;
  opacity: 0.9 !important;
}




/* Animation au survol */
.cart-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cart-badge.empty:hover {
  transform: scale(0.95);
  opacity: 0.9;
}

