/**
 * Styles pour le Loader AJAX
 * Mayram Fashion House
 */

/* === SPINNER DE CHARGEMENT === */
.filter-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #d4af37;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === ÉTAT DE CHARGEMENT === */
.product-grid.loading {
    position: relative;
    min-height: 400px;
}

.product-grid.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* === TRANSITIONS FLUIDES === */
/* Désactivé pour éviter les conflits */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === ÉTAT VIDE === */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.5s ease;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === BARRE DE PROGRESSION (OPTIONNEL) === */
.filter-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #b8941f);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 9999;
}

.filter-progress.active {
    animation: progress 1s ease-in-out;
}

@keyframes progress {
    0% { transform: scaleX(0); }
    50% { transform: scaleX(0.7); }
    100% { transform: scaleX(1); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .filter-spinner {
        padding: 1.5rem;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
}

/* === SKELETON LOADER (OPTIONNEL) === */
.product-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === MESSAGE D'ERREUR === */
.error-state {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* === SMOOTH SCROLL === */
html {
    scroll-behavior: smooth;
}

/* === OVERLAY DE CHARGEMENT === */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease;
}
