/* 
 * Corrections CSS pour le loader - SERVICES-AE
 * Assure que le loader peut être masqué même en cas de problème JavaScript
 */

/* Loader avec timeout CSS automatique */
.bg_load {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Animation automatique de disparition après 3 secondes */
    animation: autoHideLoader 3s ease-in-out forwards;
}

@keyframes autoHideLoader {
    0% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        opacity: 0; 
        visibility: hidden;
        pointer-events: none;
    }
}

/* Animation de rotation pour l'image du loader */
.loader_animation {
    max-width: 80px;
    max-height: 80px;
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Classe pour forcer la disparition */
.bg_load.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
}

/* Media queries pour mobile */
@media (max-width: 768px) {
    .loader_animation {
        max-width: 60px;
        max-height: 60px;
    }
}

/* Style pour les pages de témoignages */
.testimonial-page .bg_load {
    background-color: rgba(248, 249, 250, 0.95);
}

/* Fallback si l'image ne charge pas */
.bg_load::after {
    content: "Chargement...";
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #666;
    font-family: Arial, sans-serif;
}

.loader_animation + .bg_load::after {
    display: none;
}