/* Preloader avec fond noir */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #121212; /* Fond noir */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.loader div {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db; /* Couleur bleue pour les éléments du loader */
    animation: loader 1.2s linear infinite;
}

.loader div:nth-child(1) {
    top: 8px;
    left: 8px;
    animation-delay: 0s;
}

.loader div:nth-child(2) {
    top: 8px;
    left: 32px;
    animation-delay: -0.4s;
}

.loader div:nth-child(3) {
    top: 8px;
    left: 56px;
    animation-delay: -0.8s;
}

.loader div:nth-child(4) {
    top: 32px;
    left: 8px;
    animation-delay: -0.4s;
}

.loader div:nth-child(5) {
    top: 32px;
    left: 32px;
    animation-delay: -0.8s;
}

.loader div:nth-child(6) {
    top: 32px;
    left: 56px;
    animation-delay: -1.2s;
}

.loader div:nth-child(7) {
    top: 56px;
    left: 8px;
    animation-delay: -0.8s;
}

.loader div:nth-child(8) {
    top: 56px;
    left: 32px;
    animation-delay: -1.2s;
}

.loader div:nth-child(9) {
    top: 56px;
    left: 56px;
    animation-delay: -1.6s;
}

@keyframes loader {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
