/**
 * Fond animé de l'écran de connexion (#auth-container).
 * Même principe visuel que le loader de démarrage (modules/loadingScreenBackground.css) :
 * dégradé qui « coule » + orbes flous en mouvement. Keyframes indépendantes
 * (préfixe auth-bg-*) pour ne pas dépendre du chargement du loader de démarrage,
 * qui n'est pas présent sur toutes les pages (ex: admin_panel.html).
 */

#auth-container {
    overflow: hidden;
}

#auth-container .auth-container__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#auth-container .auth-container__bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        125deg,
        #2563eb 0%,
        #4f46e5 22%,
        #7c3aed 48%,
        #9333ea 72%,
        #6366f1 100%
    );
    background-size: 320% 320%;
    animation: auth-bg-gradient-flow 5s ease-in-out infinite;
}

#auth-container .auth-container__bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(56px);
    opacity: 0.62;
    will-change: transform;
}

#auth-container .auth-container__bg-orb--blue {
    width: min(88vmax, 620px);
    height: min(88vmax, 620px);
    top: -22%;
    right: -18%;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.95) 0%, rgba(147, 197, 253, 0) 68%);
    animation: auth-bg-orb-blue 5s ease-in-out infinite alternate;
}

#auth-container .auth-container__bg-orb--violet {
    width: min(82vmax, 580px);
    height: min(82vmax, 580px);
    bottom: -26%;
    left: -20%;
    background: radial-gradient(circle, rgba(196, 181, 253, 0.92) 0%, rgba(196, 181, 253, 0) 70%);
    animation: auth-bg-orb-violet 5.5s ease-in-out infinite alternate;
}

#auth-container .auth-container__bg-orb--indigo {
    width: min(68vmax, 460px);
    height: min(68vmax, 460px);
    top: 32%;
    left: 22%;
    background: radial-gradient(circle, rgba(165, 180, 252, 0.88) 0%, rgba(165, 180, 252, 0) 66%);
    animation: auth-bg-orb-indigo 4.5s ease-in-out infinite alternate-reverse;
}

#auth-container > .text-center {
    position: relative;
    z-index: 1;
}

@keyframes auth-bg-gradient-flow {
    0% {
        background-position: 0% 40%;
    }
    50% {
        background-position: 100% 60%;
    }
    100% {
        background-position: 0% 40%;
    }
}

@keyframes auth-bg-orb-blue {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(-14vw, 12vh) scale(1.22);
    }
}

@keyframes auth-bg-orb-violet {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(16vw, -10vh) scale(1.18);
    }
}

@keyframes auth-bg-orb-indigo {
    0% {
        transform: translate(0, 0) scale(0.9);
    }
    100% {
        transform: translate(-12vw, -11vh) scale(1.15);
    }
}

@media (prefers-reduced-motion: reduce) {
    #auth-container .auth-container__bg-gradient,
    #auth-container .auth-container__bg-orb {
        animation: none !important;
    }

    #auth-container .auth-container__bg-gradient {
        background-size: 100% 100%;
        background-position: 50% 50%;
    }
}
