/**
 * Splash Screen Mobile - UMOA
 * Écran de démarrage animé avec fond transparent
 * 
 * @package UMOA
 * @version 2.0
 */

#splash-screen {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: all;
}

/* Conteneur du logo et du cercle de chargement */
#splash-screen .splash-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Logo miniature */
#splash-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    animation: logoPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 8px rgba(13, 110, 253, 0.2));
    transition: opacity 0.3s ease;
}

/* Cercle de chargement autour du logo */
#splash-loader-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    z-index: 1;
}

/* Cercle extérieur animé */
#splash-loader-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    margin: -50px 0 0 -50px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #0d6efd;
    border-right-color: #0d6efd;
    animation: rotateRing 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.15);
}

/* Cercle intérieur animé (sens inverse) */
#splash-loader-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-bottom-color: #0d6efd;
    border-left-color: #0d6efd;
    opacity: 0.6;
    animation: rotateRingReverse 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

/* Texte optionnel (masqué par défaut pour design minimaliste) */
#splash-text {
    display: none;
}

/* Ancien loader (masqué) */
#loader {
    display: none;
}

/* Animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.03);
        opacity: 0.95;
    }
}

@keyframes rotateRing {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotateRingReverse {
    0% {
        transform: rotate(360deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* Masquer le splash une fois caché */
#splash-screen[style*="opacity: 0"] {
    pointer-events: none;
    visibility: hidden;
}

/* Support pour les écrans très petits */
@media (max-width: 320px) {
    #splash-logo {
        width: 56px;
        height: 56px;
    }
    
    #splash-loader-ring {
        width: 88px;
        height: 88px;
    }
    
    #splash-loader-ring::before {
        width: 88px;
        height: 88px;
        margin: -44px 0 0 -44px;
    }
    
    #splash-loader-ring::after {
        width: 72px;
        height: 72px;
        margin: -36px 0 0 -36px;
    }
}

/* Support pour les écrans moyens */
@media (min-width: 321px) and (max-width: 767px) {
    #splash-logo {
        width: 64px;
        height: 64px;
    }
}

/* Support pour les écrans grands */
@media (min-width: 768px) {
    #splash-logo {
        width: 72px;
        height: 72px;
    }
    
    #splash-loader-ring {
        width: 112px;
        height: 112px;
    }
    
    #splash-loader-ring::before {
        width: 112px;
        height: 112px;
        margin: -56px 0 0 -56px;
    }
    
    #splash-loader-ring::after {
        width: 90px;
        height: 90px;
        margin: -45px 0 0 -45px;
    }
}

/* Mode sombre (si nécessaire) */
@media (prefers-color-scheme: dark) {
    #splash-screen {
        background: rgba(0, 0, 0, 0.75);
    }
}

