/* Variables pour les couleurs et dimensions */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #1e40af;
    --sen-green: #00853f;
    --sen-yellow: #fdef42;
    --sen-red: #e31b23;
    --text-color: #1e293b;
    --background-color: #f8fafc;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Dark mode variables */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #3b82f6;
        --secondary-color: #60a5fa;
        --text-color: #f1f5f9;
        --background-color: #0f172a;
        --shadow-color: rgba(0, 0, 0, 0.3);
    }
}

body fuse-splash-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: var(--background-color);
    z-index: 999999;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

body fuse-splash-screen .logo-container {
    position: relative;
    margin-bottom: 2rem;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

body fuse-splash-screen .logo-background {
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(0, 133, 63, 0.15) 0%, transparent 70%);
    opacity: 0.2;
    animation: rotate 8s infinite linear;
    z-index: 1;
}

body fuse-splash-screen .logo-svg {
    width: 100%;
    height: 100%;
    z-index: 2;
}

body fuse-splash-screen .app-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0.5rem 0;
    letter-spacing: -0.025em;
}

body fuse-splash-screen .app-subtitle {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 2rem;
}

body fuse-splash-screen .loading-bar {
    width: 240px;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

body fuse-splash-screen .loading-progress {
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, var(--sen-green), var(--sen-yellow), var(--sen-red));
    background-size: 200% 100%;
    border-radius: 4px;
    animation: loadingProgress 2.5s infinite, moveGradient 3s infinite;
}

/* Animations */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loadingProgress {
    0% { width: 0%; left: 0; }
    50% { width: 70%; left: 30% }
    100% { width: 0%; left: 100%; }
}

@keyframes moveGradient {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Media Queries pour la responsivité */
@media (max-width: 768px) {
    body fuse-splash-screen .logo-container {
        width: 100px;
        height: 100px;
    }
    
    body fuse-splash-screen .app-title {
        font-size: 1.5rem;
    }
    
    body fuse-splash-screen .app-subtitle {
        font-size: 0.9rem;
    }
    
    body fuse-splash-screen .loading-bar {
        width: 200px;
    }
}

@media (max-width: 480px) {
    body fuse-splash-screen .logo-container {
        width: 80px;
        height: 80px;
    }
    
    body fuse-splash-screen .app-title {
        font-size: 1.3rem;
    }
    
    body fuse-splash-screen .app-subtitle {
        font-size: 0.8rem;
    }
    
    body fuse-splash-screen .loading-bar {
        width: 180px;
    }
}

body:not(.fuse-splash-screen-hidden) {
    overflow: hidden;
}

body.fuse-splash-screen-hidden fuse-splash-screen {
    visibility: hidden;
    opacity: 0;
}