/* États de chargement */
.btn-quantity:disabled,
.btn-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-quantity.loading,
.btn-delete.loading {
    position: relative;
    color: transparent !important;
}

.btn-quantity.loading::after,
.btn-delete.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ff6600;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
/* Styles des alertes */
.alert {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-success .btn-close {
    filter: invert(30%) sepia(50%) saturate(500%) hue-rotate(100deg);
}

/* Animation suppression améliorée */
.cart-item.removing {
    opacity: 0;
    transform: translateX(-100%) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: -20px;
}

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

/* Animation quantité */
.quantity-value {
    display: inline-block;
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s ease;
}

.quantity-value.updating {
    transform: scale(1.3);
    color: #ff6600;
}

/* Animation suppression */
.cart-item.removing {
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.3s ease;
}

/* Feedback erreur */
.quantity-control.error {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}