/* --- LOADER CONTAINER (Séquenceur Maître) --- */
#rocket-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0f172a;
    z-index: 9999;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 20vh;

    /* Séquence ralentie à 4 secondes */
    animation: liftOffSEQUENCE 4s cubic-bezier(0.7, 0, 0.3, 1) forwards;
}

/* Séquence : Attente (2.5s) -> Décollage (1.5s) */
@keyframes liftOffSEQUENCE {
    0% {
        transform: translateY(0);
    }

    60% {
        transform: translateY(0);
    }

    /* On reste au sol 60% du temps */
    100% {
        transform: translateY(-120vh);
        visibility: hidden;
    }
}

/* --- FUSÉE --- */
.rocket-svg {
    width: 80px;
    height: 120px;
    z-index: 10;
    animation: shake 0.5s infinite;
}

.rocket-body {
    fill: #3b82f6;
}

.rocket-window {
    fill: #0f172a;
}

/* --- FLAMMES --- */
.rocket-exhaust {
    width: 10px;
    height: 0;
    background: linear-gradient(to bottom, #f59e0b, #ef4444);
    margin-top: -10px;
    border-radius: 5px;
    box-shadow: 0 0 20px #f59e0b;
    z-index: 5;

    /* Animation d'allumage plus lente */
    animation: ignition 4s forwards;
}

@keyframes ignition {
    0% {
        height: 0;
        opacity: 0;
    }

    40% {
        height: 0;
        opacity: 0;
    }

    /* Allumage retardé */
    55% {
        height: 150px;
        width: 30px;
        opacity: 1;
    }

    /* Moteurs à fond juste avant le décollage */
    100% {
        height: 150px;
        width: 30px;
        opacity: 1;
    }
}

/* --- TEXTE --- */
.rocket-text {
    margin-top: 30px;
    font-family: monospace;
    color: #3b82f6;
    font-size: 1.2rem;
    z-index: 10;
    animation: pulse 1s infinite alternate;
}

/* --- ANIMATIONS DE BASE --- */
@keyframes shake {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-1px, 1px);
    }

    75% {
        transform: translate(1px, -1px);
    }
}

@keyframes pulse {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

/* --- ETOILES CSS --- */
.stars-css {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.5;
    animation: starMove 10s linear infinite;
}

@keyframes starMove {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(200px);
    }
}

/* --- ANIMATION DE FLOU POUR LE SITE PRINCIPAL --- */
.with-intro-blur {
    animation: unblurSite 4s ease-out forwards;
}

@keyframes unblurSite {
    0% {
        filter: blur(30px);
        opacity: 0.8;
    }

    55% {
        filter: blur(30px);
        opacity: 0.8;
    }

    /* Flou tant que la fusée est au sol */
    100% {
        filter: blur(0px);
        opacity: 1;
    }

    /* Net quand la fusée est partie */
}