/* Système de réduction - Styles CSS */

/* Badge de réduction */
.discount-badge {
    animation: pulse-discount 2s infinite;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    font-weight: bold;
    position: relative;
}

.discount-badge::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #dc3545, #ff6b7a);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.7;
}

/* Animation de pulsation pour les badges de réduction */
@keyframes pulse-discount {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 8px rgba(220, 53, 69, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    }
}

/* Prix barré */
.price-strikethrough {
    text-decoration: line-through;
    opacity: 0.7;
    font-size: 0.9em;
}

/* Prix barré dans les boutons */
.btn .text-decoration-line-through {
    opacity: 0.8;
    margin-right: 0.25rem;
}

.btn .fw-bold {
    color: #28a745;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Container de prix avec réduction */
.price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

/* Badge de prix avec réduction */
.price-with-discount {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-with-discount .original-price {
    text-decoration: line-through;
    opacity: 0.7;
    font-size: 0.85em;
}

.price-with-discount .final-price {
    font-weight: bold;
    color: #28a745;
}

/* Tooltip personnalisé pour les réductions */
.discount-tooltip {
    background-color: #dc3545;
    color: white;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.875rem;
    max-width: 200px;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .discount-badge {
        font-size: 0.75rem;
    }
    
    .price-container {
        align-items: center;
    }
    
    .price-with-discount {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* Styles pour le formulaire d'édition */
.discount-form-section {
    background: rgba(108, 117, 125, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.discount-preview {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    border: none;
    color: white;
}

.discount-preview .preview-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 0.5rem 1rem;
}

/* Animation d'apparition pour la prévisualisation */
.discount-preview.show {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icône de réduction avec rotation */
.discount-icon {
    display: inline-block;
    animation: rotate-discount 3s linear infinite;
}

@keyframes rotate-discount {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Effet de survol pour les cartes avec réduction */
.mod-card:has(.discount-badge):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.15);
    transition: all 0.3s ease;
}

/* Badge "PROMO" pour les grandes réductions */
.big-discount-badge {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Styles pour les réductions expirées */
.discount-expired {
    opacity: 0.6;
    filter: grayscale(50%);
}

.discount-expired .discount-badge {
    background-color: #6c757d !important;
    animation: none;
}