/* public/assets/css/preloader.css */

/* --- Styles Preloader --- */
.preloader {
    position: fixed; /* Couvre toute la fenêtre */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000; /* Fond noir */
    z-index: 9999; /* Au-dessus de tout */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1; /* Visible initialement */
    visibility: visible; /* Visible initialement */
    /* Transition pour le fondu sortant (fade-out) - 0.5s */
    transition: opacity 0.5s ease-out, visibility 0s linear 0.5s;
}

.preloader-icon img {
    width: 80px; /* Taille de l'icône */
    height: auto;
    /* Animation de pulsation */
    animation: pulse 1.5s infinite ease-in-out;
}

/* Classe ajoutée par JS pour cacher le preloader */
.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Keyframes pour l'animation de pulsation */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* --- Styles pour la transition de page --- */

/* Classe ajoutée au body avant de naviguer */
/* Fait réapparaître le preloader */
body.is-leaving .preloader {
    opacity: 1;
    visibility: visible;
    /* *** MODIFICATION: Transition d'entrée plus longue (0.6s) *** */
    transition: opacity 0.6s ease-in, visibility 0s linear 0s;
}

/* Optionnel: Cacher le contenu pendant la transition sortante */
/* body.is-leaving > *:not(.preloader) {
    opacity: 0;
    transition: opacity 0.2s ease-out;
} */
