/* Styles pour le badge du panier et les notifications */

/* Badge du panier */
.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: none; /* Caché par défaut si panier vide */
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
  border: 2px solid var(--bg);
  animation: cartBadgePop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes cartBadgePop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Notification popup */
.cart-notification {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 16px 24px;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-width: 90vw;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.cart-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.cart-notification.success {
  border-left: 4px solid #0066cc;
}

.cart-notification.error {
  border-left: 4px solid #d32f2f;
}

.cart-notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-notification-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.cart-notification.success .cart-notification-icon {
  background: #0066cc;
  color: white;
}

.cart-notification.error .cart-notification-icon {
  background: #d32f2f;
  color: white;
}

.cart-notification-text {
  color: #0f1720;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 600px) {
  .cart-notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .cart-notification-text {
    white-space: normal;
  }
}

/* Animation du panier lors de l'ajout */
@keyframes cartShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px) rotate(-5deg); }
  75% { transform: translateX(4px) rotate(5deg); }
}

.cart-link.adding {
  animation: cartShake 0.5s ease-in-out;
}

