/**
 * assets/css/loader.css
 * ------------------------------------------------------------
 * Préchargeur plein écran : logo central + 3 points en orbite.
 * Affiché au chargement de chaque page et lors des navigations
 * internes (voir assets/js/loader.js).
 * ------------------------------------------------------------
 */

#bhp-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.97);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

#bhp-loader.bhp-loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.bhp-loader-orbit {
    position: relative;
    width: 84px;
    height: 84px;
}

/* Logo central, statique */
.bhp-loader-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(13, 110, 253, 0.35);
}

/* Conteneur qui tourne, portant les 3 points */
.bhp-loader-dots {
    position: absolute;
    inset: 0;
    animation: bhp-orbit-spin 1.1s linear infinite;
}

.bhp-loader-dots span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0d6efd;
    transform-origin: 0 0;
}

.bhp-loader-dots span:nth-child(1) {
    transform: rotate(0deg) translate(42px) translate(-5px, -5px);
    opacity: 1;
}
.bhp-loader-dots span:nth-child(2) {
    transform: rotate(120deg) translate(42px) translate(-5px, -5px);
    opacity: 0.65;
}
.bhp-loader-dots span:nth-child(3) {
    transform: rotate(240deg) translate(42px) translate(-5px, -5px);
    opacity: 0.35;
}

@keyframes bhp-orbit-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .bhp-loader-dots {
        animation: none;
    }
}
