/**
 * Styles pour les notifications du panier
 */

/* Animation de pulsation pour l'icône du panier */
@keyframes cartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.cart-pulse {
    animation: cartPulse 0.5s ease-in-out;
}

/* Styles pour les toasts de notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 400px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 15px;
    z-index: 9999;
    display: flex;
    align-items: center;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-icon {
    margin-right: 15px;
    font-size: 24px;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 16px;
}

.toast-message {
    font-size: 14px;
    color: #666;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

/* Animation pour l'ajout au panier */
.floating-product {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Indicateur de chargement pour le bouton */
.add-to-cart-btn.loading {
    position: relative;
    color: transparent !important;
}

.add-to-cart-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Badge de compteur du panier */
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e53637;
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Pour cacher le compteur quand il est à zéro */
.cart-count:empty {
    display: none;
}
