.loader {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(231, 228, 228, 0.96);
    backdrop-filter: blur(4px);
    z-index: 9999;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

/* Conteneur centré */
.loader-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

/* Spinner premium */
.spinner-premium {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    position: relative;
    animation: spin 1s linear infinite;
}

/* cercle de fond */
.spinner-premium::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 5px solid rgba(20, 73, 144, 0.12);
}

/* cercle animé */
.spinner-premium::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 5px solid transparent;
    border-top-color: #144990; /* bleu RSG */
    border-right-color: #c40808; /* rouge */
    box-shadow: 0 0 12px rgba(196, 8, 8, 0.15);
}

/* Texte */
.loader-text {
    font-size: 15px;
    font-weight: 600;
    color: #144990;
    letter-spacing: 0.5px;
    animation: fadeText 1.5s infinite ease-in-out;
}

.loader-logo {
    width: 120px;
    margin-bottom: 5px;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeText {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}