/* Définition des animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 5px #fff, 0 0 10px #00aaff, 0 0 15px #00aaff;
    }
    50% {
        text-shadow: 0 0 10px #fff, 0 0 20px #00aaff, 0 0 30px #00aaff;
    }
}

/* ANIMATION DE FLOTTEMENT : Ajustée pour être plus rapide et plus ample */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        /* MODIFICATION : La distance est augmentée */
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}


/* Style général */
:root {
    --background-color: #12181f;
    --text-color: #e0e0e0;
    --primary-color: #00aaff;
    --white-color: #ffffff;
    --hint-color: #6c757d;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    text-align: center;
    box-sizing: border-box;
    /* Empêche le débordement causé par l'animation */
    overflow: hidden; 
}

main {
    width: 100%;
    max-width: 800px;
}

/* Styles pour les sections */
section {
    padding: 2rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    /* Application des animations */
    /* MODIFICATION : La durée de l'animation est réduite à 4s */
    animation: fadeIn 1.2s ease-out forwards, float 4s ease-in-out infinite;
    animation-delay: 0s, 1.2s; /* On retarde le début de l'animation de flottement */
    /* AMÉLIORATION : On indique au navigateur de se préparer à une animation de transformation pour une meilleure fluidité */
    will-change: transform;
}

/* Styles du contenu */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Taille de police adaptative */
    font-weight: 600;
    color: var(--white-color);
    margin-bottom: 1rem;
}

p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hint {
    font-size: 0.9rem;
    color: var(--hint-color);
    margin-top: 2rem;
}

/* Style pour l'indice qui brille */
.glow {
    color: var(--primary-color);
    font-weight: 600;
    animation: glow 2.5s infinite ease-in-out;
}

/* Style pour le bouton de retour */
.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.4);
}
