/**
 * Styles pour l'animation de chargement du module de recherche
 * Pol'Art Noir - recherche.php
 * Style sobre, élégant, en accord avec l'esthétique film noir du site
 */

/* Overlay du loader */
.search-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Conteneur du loader */
.search-loader-content {
    text-align: center;
    padding: 3rem;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    animation: fadeInScale 0.4s ease;
}

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

/* Spinner animé - 3 anneaux concentriques */
.loader-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: rgba(255, 255, 255, 0.6);
    animation-duration: 1.8s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    border-top-color: rgba(255, 255, 255, 0.3);
    animation-duration: 2.1s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Textes du loader */
.loader-text {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.5px;
    animation: pulse 2s ease-in-out infinite;
}

.loader-subtext {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Animation alternative - Points de suspension */
.loader-text::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Responsive */
@media (max-width: 768px) {
    .search-loader-content {
        padding: 2rem;
        margin: 1rem;
    }
    
    .loader-spinner {
        width: 60px;
        height: 60px;
    }
    
    .loader-text {
        font-size: 1rem;
    }
    
    .loader-subtext {
        font-size: 0.85rem;
    }
}

/* Effet sur les résultats pendant le chargement */
.fenetre-resultats {
    transition: opacity 0.3s ease;
}
