/* 
* Easycity-eu.com - Page Transition Loader
* Version: 2.0
* Amélioré avec des transitions fluides et des animations
*/

/* Animation de transition de page - entrée et sortie */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes scaleOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(1.1); opacity: 0; }
}

/* Animation du spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation de pulsation pour le logo */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* État initial de la page à l'entrée */
.page-enter {
    animation: none;
}

/* État de la page lors de la sortie */
.page-exit {
    animation: none;
}

/* Effet de fondu pour les sections principales */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Overlay de chargement qui couvre toute la page */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    /* Pas de background-color ici, défini en JS comme transparent */
}

/* Conteneur du loader et du logo */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

/* Logo dans l'animation de chargement */
.loader-logo {
    font-size: 3.2rem;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    animation: pulse 1.5s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.loader-logo span {
    color: #ff7e5f; /* Utilisation directe de la couleur au lieu de la variable */
    text-shadow: 0 0 15px rgba(255, 126, 95, 0.5); /* RGB direct au lieu de la variable */
}

/* Quand le chargement est actif */
.page-transition-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Animation du loader */
.loader {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    border: 0.5rem solid rgba(255, 255, 255, 0.2);
    border-top: 0.5rem solid white;
    animation: spin 1.5s linear infinite;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Animation pour que le chargeur apparaisse avec un léger délai */
.page-transitioning {
    opacity: 0;
    transition: opacity 0.8s;
}

/* Réglages pour les appareils mobiles */
@media screen and (max-width: 768px) {
    .loader-logo {
        font-size: 2.6rem;
    }
    
    .loader {
        width: 5rem;
        height: 5rem;
    }
}
