/* Background color for the page */
body {
    margin: 0;
    overflow: hidden; /* Empêche le défilement lorsque le preloader est actif */
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('img/back.png') no-repeat center center;
    background-size: cover;
    filter: blur(7px);
    z-index: -1;
}

/* Preloader container */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6); /* Fond semi-transparent avec une teinte noire */
    z-index: 1000; /* S'assurer que le preloader est au-dessus de tout */
}

/* Loader with rotating rings */
.loader {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #6f2dbd;
    animation: spin 2s linear infinite;
}

.loader:before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #8b5bd1;
    animation: spin 3s linear infinite reverse;
}

.loader:after {
    content: "";
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #4b1f7a;
    animation: spin 1.5s linear infinite;
}

/* Star at the center */
.star {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background-color: #6f2dbd;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: pulse 1s infinite;
}

/* Keyframes for rotating animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Keyframes for star pulsing (scintillating) */
@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.7;
    }
}
