/**
 * Styles pour le loader global et les barres de progression
 */

/* Conteneur du loader global */
.global-loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Classe active pour afficher le loader */
.global-loader-container.active {
    opacity: 1;
    visibility: visible;
}

/* Pour la compatibilité avec .hidden */
.global-loader-container.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Pour la compatibilité avec .force-hidden */
.global-loader-container.force-hidden {
    display: none !important;
}

/* Style du loader */
.global-loader {
    background-color: transparent;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 320px;
    width: 90%;
}

/* Cercle du loader */
.global-loader-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--bdsm-red);
    background-image: radial-gradient(circle at center, #ff1a36 0%, #d30a23 70%);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animation de balancier pour le SVG du loader */
.global-loader-svg {
    width: 80px;
    height: 80px;
    animation: swing 1.2s ease-in-out infinite alternate;
    transform-origin: center top;
    filter: contrast(2) brightness(0.9) invert(0.1);
    opacity: 0.85;
}

@keyframes swing {
    0% {
        transform: rotate(-25deg);
    }
    100% {
        transform: rotate(25deg);
    }
}

/* Conteneur de la barre de progression */
.global-loader-progress-container {
    width: 100%;
    height: 8px;
    background-color: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

/* Barre de progression */
.global-loader-progress-bar {
    height: 100%;
    width: 0%;
    background-color: #c30000; /* Rouge assorti au thème */
    transition: width 0.3s ease;
}

/* Message de progression */
.global-loader-message {
    color: #fff;
    font-size: 16px;
    text-align: center;
    font-family: 'Arial', sans-serif;
    margin-top: 15px;
    max-width: 250px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    font-weight: 500;
}

/* Styles responsifs */
@media screen and (max-width: 768px) {
    .global-loader {
        padding: 20px;
        max-width: 280px;
    }
    
    .global-loader-circle {
        width: 60px;
        height: 60px;
    }
    
    .global-loader-svg {
        width: 45px;
        height: 45px;
    }
    
    .global-loader-message {
        font-size: 12px;
    }
}
