@import url("index.css");

/* --- LOADING PAGE DYNAMIQUE --- */
#loader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* Fond sombre profond pour faire ressortir la lumière */
    background: radial-gradient(circle at center, #2d4f5e 0%, #1a2e38 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* --- L'ANIMATION ARCHIPEL --- */
.archipelago-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

/* 1. L'Étoile Centrale (Le Camp) */
.main-star {
    font-size: 3.5rem;
    color: var(--magie); /* Jaune Moutarde */
    /* Animation de respiration (Pulse) */
    animation: pulse-star 2s infinite ease-in-out;
    text-shadow: 0 0 20px rgba(233, 196, 106, 0.6); /* Lueur */
    z-index: 10;
}

/* 2. Les Orbites (Cercles invisibles qui tournent) */
.orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05); /* Piste très subtile */
    display: flex;
    justify-content: center; /* Pour placer la planète sur le bord */
}

/* Orbite 1 : Rapide & Petite (Rouge) */
.orbit-1 {
    width: 100%; height: 100%;
    animation: spin 1.5s infinite linear;
}
.orbit-1 .planet {
    background-color: var(--acccent); /* Rouge */
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-top: -5px; /* Pour la poser sur la ligne */
    box-shadow: 0 0 10px var(--acccent);
}

/* Orbite 2 : Moyenne & Inverse (Orange) */
.orbit-2 {
    width: 70%; height: 70%;
    animation: spin-reverse 2.2s infinite linear;
}
.orbit-2 .planet {
    background-color: var(--secondaire); /* Orange */
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-top: -4px;
    box-shadow: 0 0 8px var(--secondaire);
}

/* Orbite 3 : Lente & Large (Beige) */
.orbit-3 {
    width: 140%; height: 140%; /* Orbite extérieure */
    animation: spin 3s infinite linear;
    border: 1px solid rgba(255, 255, 255, 0.02);
}
.orbit-3 .planet {
    background-color: var(--alternative); /* Beige */
    width: 6px; height: 6px;
    border-radius: 50%;
    margin-top: -3px;
}

/* --- LE TEXTE --- */
.loading-text {
    font-family: var(--font-titre);
    color: var(--alternative);
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 30px;
    animation: fadeText 1.5s infinite ease-in-out;
}

/* --- KEYFRAMES (Mouvements) --- */
@keyframes pulse-star {
    0%, 100% { transform: scale(1); opacity: 1; text-shadow: 0 0 20px rgba(233, 196, 106, 0.6); }
    50% { transform: scale(0.85); opacity: 0.8; text-shadow: 0 0 5px rgba(233, 196, 106, 0.2); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes fadeText {
    0%, 100% { opacity: 0.5; letter-spacing: 3px; }
    50% { opacity: 1; letter-spacing: 4px; } /* Le texte s'écarte un peu */
}