/**
 * Styles modernes pour le système de panier
 * Dégradés violet/jaune et design immersif
 */

/* Variables CSS pour les couleurs */
:root {
    --primary-purple: #6b21a8;
    --primary-purple-dark: #4c1d95;
    --primary-purple-darker: #3730a3;
    --primary-yellow: #fbbf24;
    --primary-yellow-dark: #f59e0b;
    --primary-yellow-darker: #d97706;
    --success-green: #10b981;
    --success-green-dark: #059669;
    --error-red: #ef4444;
    --warning-orange: #f59e0b;
    --info-blue: #3b82f6;
    
    --gradient-primary: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 50%, var(--primary-purple-darker) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-yellow-dark) 50%, var(--primary-yellow-darker) 100%);
    --gradient-success: linear-gradient(135deg, var(--success-green) 0%, var(--success-green-dark) 50%, #047857 100%);
    --gradient-bg: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-purple: 0 4px 12px rgba(107, 33, 168, 0.3);
    --shadow-yellow: 0 4px 12px rgba(251, 191, 36, 0.3);
    
    --border-radius-sm: 6px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Styles globaux pour le système de panier */
.cart-system {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Animations de base */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Styles pour les notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: var(--gradient-success);
    color: white;
}

.notification-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.notification-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.notification-warning {
    background: var(--gradient-secondary);
    color: #7c2d12;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.notification-content i {
    font-size: 1.2rem;
}

/* Styles pour les boutons modernes */
.modern-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-lg);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.modern-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.modern-btn:hover::before {
    left: 100%;
}

.modern-btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-purple);
}

.modern-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 33, 168, 0.4);
}

.modern-btn-secondary {
    background: var(--gradient-secondary);
    color: #7c2d12;
    box-shadow: var(--shadow-yellow);
}

.modern-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.4);
}

.modern-btn-success {
    background: var(--gradient-success);
    color: white;
}

.modern-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

/* Styles pour les cartes modernes */
.modern-card {
    background: white;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(107, 33, 168, 0.1);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.modern-card-header {
    background: var(--gradient-bg);
    padding: 24px 30px;
    border-bottom: 2px solid #e2e8f0;
}

.modern-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modern-card-title i {
    color: var(--primary-purple);
    font-size: 1.3rem;
}

.modern-card-content {
    padding: 30px;
}

/* Styles pour les inputs modernes */
.modern-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius-lg);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: #fafbfc;
    font-family: inherit;
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: white;
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1);
}

.modern-input.error {
    border-color: var(--error-red);
    background: #fef2f2;
}

.modern-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 0.95rem;
}

.modern-label.required::after {
    content: ' *';
    color: var(--error-red);
}

/* Styles pour les badges modernes */
.modern-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--border-radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-badge-primary {
    background: var(--gradient-primary);
    color: white;
}

.modern-badge-secondary {
    background: var(--gradient-secondary);
    color: #7c2d12;
}

.modern-badge-success {
    background: var(--gradient-success);
    color: white;
}

.modern-badge-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* Styles pour les compteurs */
.modern-counter {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    min-width: 24px;
    height: 24px;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-purple);
    animation: bounce 2s infinite;
}

/* Styles pour les loaders */
.modern-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles pour les états de chargement */
.loading-state {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

/* Styles pour les effets de hover */
.hover-lift {
    transition: transform var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.hover-glow {
    transition: box-shadow var(--transition-normal);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(107, 33, 168, 0.3);
}

/* Styles pour les gradients de fond */
.gradient-bg-primary {
    background: var(--gradient-primary);
}

.gradient-bg-secondary {
    background: var(--gradient-secondary);
}

.gradient-bg-success {
    background: var(--gradient-success);
}

.gradient-bg-light {
    background: var(--gradient-bg);
}

/* Styles pour les bordures */
.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--gradient-primary) border-box;
}

/* Styles pour les ombres colorées */
.shadow-purple {
    box-shadow: var(--shadow-purple);
}

.shadow-yellow {
    box-shadow: var(--shadow-yellow);
}

.shadow-green {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Styles pour les animations d'entrée */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Styles pour les effets de particules */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-yellow);
    border-radius: 50%;
    animation: float 6s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Styles responsifs */
@media (max-width: 768px) {
    .modern-card-content {
        padding: 20px;
    }
    
    .modern-card-header {
        padding: 20px;
    }
    
    .modern-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Styles pour les thèmes sombres */
@media (prefers-color-scheme: dark) {
    .modern-card {
        background: #1f2937;
        border-color: rgba(107, 33, 168, 0.3);
    }
    
    .modern-card-header {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    }
    
    .modern-card-title {
        color: #f9fafb;
    }
    
    .modern-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .modern-input:focus {
        background: #1f2937;
        border-color: var(--primary-purple);
    }
}

/* Styles pour l'accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible pour l'accessibilité */
.modern-btn:focus-visible,
.modern-input:focus-visible {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

/* Styles pour les états de validation */
.form-group.success .modern-input {
    border-color: var(--success-green);
    background: #f0fdf4;
}

.form-group.error .modern-input {
    border-color: var(--error-red);
    background: #fef2f2;
}

.form-group.success .modern-label {
    color: var(--success-green);
}

.form-group.error .modern-label {
    color: var(--error-red);
}
