/* Importation des polices Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Press+Start+2P&display=swap');

/* Styles généraux du corps de la page */
body {
    font-family: 'Orbitron', sans-serif; /* Police futuriste */
    margin: 0;
    padding: 0;
    background-color: #1a1a2e; /* Fond sombre bleu-violet */
    color: #e0e0e0; /* Texte général gris clair */
    min-height: 100vh; /* Hauteur minimale de la fenêtre */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow-x: hidden; /* Empêche le défilement horizontal dû aux effets de glitch */
    position: relative;
}

/* Pseudo-élément pour un motif de grille en arrière-plan */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(0deg, transparent 24%, rgba(30, 30, 50, 0.5) 25%, rgba(30, 30, 50, 0.5) 26%, transparent 27%, transparent 74%, rgba(30, 30, 50, 0.5) 75%, rgba(30, 30, 50, 0.5) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(30, 30, 50, 0.5) 25%, rgba(30, 30, 50, 0.5) 26%, transparent 27%, transparent 74%, rgba(30, 30, 50, 0.5) 75%, rgba(30, 30, 50, 0.5) 76%, transparent 77%, transparent);
    background-size: 50px 50px; /* Taille des cellules de la grille */
    opacity: 0.2; /* Transparence de la grille */
    z-index: -1; /* Place la grille en arrière-plan */
}

/* Effet de texte néon */
.neon-text {
    color: #ffe400; /* Jaune vif */
    text-shadow:
        0 0 7px #ffe400,
        0 0 10px #ffe400,
        0 0 21px #ffe400,
        0 0 42px #be29ec, /* Lueur violette */
        0 0 82px #be29ec,
        0 0 92px #be29ec,
        0 0 102px #be29ec,
        0 0 151px #be29ec;
    animation: neon-flicker 1.5s infinite alternate; /* Animation de scintillement */
}

/* Animation de scintillement pour le texte néon */
@keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow:
            0 0 7px #ffe400,
            0 0 10px #ffe400,
            0 0 21px #ffe400,
            0 0 42px #be29ec,
            0 0 82px #be29ec,
            0 0 92px #be29ec,
            0 0 102px #be29ec,
            0 0 151px #be29ec;
    }  
}

/* Effet de "glitch" pour certains éléments (appliqué au header) */
.glitch-effect {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Pseudo-éléments pour créer les décalages du glitch */
.glitch-effect::before,
.glitch-effect::after {
    content: ''; /* Le contenu sera hérité des enfants */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a2e; /* Fond pour masquer le texte original */
    overflow: hidden;
    clip: rect(0, 900px, 0, 0); /* Zone de découpe initiale */
}

.glitch-effect::before {
    left: -2px; /* Décalage horizontal */
    text-shadow: 1px 0 #ff00ff; /* Ombre magenta */
    animation: glitch-anim-1 2s infinite linear alternate-reverse; /* Animation de glitch */
}

.glitch-effect::after {
    left: 2px; /* Décalage horizontal opposé */
    text-shadow: -1px 0 #00ffff; /* Ombre cyan */
    animation: glitch-anim-2 2s infinite linear alternate-reverse; /* Animation de glitch */
}

/* Animations pour les effets de glitch */
@keyframes glitch-anim-1 {
    0% { clip: rect(10px, 9999px, 100px, 0); }
    10% { clip: rect(100px, 9999px, 10px, 0); }
    20% { clip: rect(50px, 9999px, 150px, 0); }
    30% { clip: rect(120px, 9999px, 20px, 0); }
    40% { clip: rect(70px, 9999px, 170px, 0); }
    50% { clip: rect(180px, 9999px, 80px, 0); }
    60% { clip: rect(30px, 9999px, 130px, 0); }
    70% { clip: rect(160px, 9999px, 60px, 0); }
    80% { clip: rect(90px, 9999px, 190px, 0); }
    90% { clip: rect(20px, 9999px, 120px, 0); }
    100% { clip: rect(140px, 9999px, 40px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(120px, 9999px, 20px, 0); }
    10% { clip: rect(70px, 9999px, 170px, 0); }
    20% { clip: rect(180px, 9999px, 80px, 0); }
    30% { clip: rect(30px, 9999px, 130px, 0); }
    40% { clip: rect(160px, 9999px, 60px, 0); }
    50% { clip: rect(90px, 9999px, 190px, 0); }
    60% { clip: rect(20px, 9999px, 120px, 0); }
    70% { clip: rect(140px, 9999px, 40px, 0); }
    80% { clip: rect(10px, 9999px, 100px, 0); }
    90% { clip: rect(100px, 9999px, 10px, 0); }
    100% { clip: rect(50px, 9999px, 150px, 0); }
}

/* Styles de l'en-tête */
.cyber-header {
    width: 100%;
    padding: 20px 0;
    text-align: center;
    border-bottom: 2px solid #be29ec; /* Bordure violette */
    box-shadow: 0 0 15px #be29ec; /* Lueur violette */
    background: rgba(26, 26, 46, 0.8); /* Fond sombre légèrement transparent */
    position: relative;
    z-index: 10;
}

.cyber-header h1 {
    font-family: 'Press Start 2P', cursive; /* Police pixelisée pour le titre */
    font-size: 3em;
    margin-bottom: 15px;
}

/* Styles de navigation */
.cyber-nav {
    margin-top: 20px;
}

.cyber-button {
    display: inline-block;
    padding: 10px 25px;
    margin: 0 10px;
    background-color: #be29ec; /* Bouton violet */
    color: #1a1a2e; /* Texte sombre sur le bouton */
    text-decoration: none;
    border: 2px solid #ffe400; /* Bordure jaune */
    border-radius: 5px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px #be29ec; /* Lueur violette */
}

.cyber-button:hover {
    background-color: #ffe400; /* Jaune au survol */
    color: #1a1a2e;
    border-color: #be29ec;
    box-shadow: 0 0 20px #ffe400, 0 0 30px #be29ec; /* Lueur jaune et violette */
    transform: scale(1.05); /* Agrandissement léger */
}

/* Styles du contenu principal */
.cyber-main {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(26, 26, 46, 0.9); /* Fond sombre légèrement transparent */
    border: 1px solid #be29ec; /* Bordure violette */
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(190, 41, 236, 0.5); /* Lueur violette */
    z-index: 5;
}

.hero-section {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3); /* Fond semi-transparent */
    border-radius: 8px;
    border: 1px dashed #ffe400; /* Bordure pointillée jaune */
}

.hero-section h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

/* Texte avec effet de "glitch" */
.glitch-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2em;
    color: #00ffff; /* Cyan pour le texte glitch */
    text-shadow: 1px 1px 0 #ff00ff, -1px -1px 0 #ffe400; /* Ombres magenta et jaune */
    animation: text-glitch 0.5s infinite alternate; /* Animation de décalage */
}

@keyframes text-glitch {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0, 0); }
}

.practice-links {
    margin-top: 50px;
}

.practice-links h3 {
    font-size: 2em;
    text-align: center;
    margin-bottom: 30px;
}

/* Grille de liens */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Colonnes adaptatives */
    gap: 20px; /* Espacement entre les cartes */
    justify-content: center;
}

/* Style des cartes de liens */
.cyber-link-card {
    display: block;
    padding: 20px;
    background: rgba(50, 0, 100, 0.7); /* Fond violet foncé transparent */
    border: 1px solid #ffe400; /* Bordure jaune */
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #ffe400; /* Texte jaune */
    font-family: 'Press Start 2P', cursive;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 228, 0, 0.3); /* Lueur jaune subtile */
}

.cyber-link-card:hover {
    background: rgba(255, 228, 0, 0.2); /* Fond jaune plus clair transparent */
    border-color: #be29ec; /* Bordure violette au survol */
    color: #be29ec; /* Texte violet au survol */
    box-shadow: 0 0 20px #ffe400, 0 0 30px #be29ec; /* Lueur jaune et violette */
    transform: translateY(-5px) scale(1.02); /* Léger déplacement et agrandissement */
}

/* Styles du pied de page */
.cyber-footer {
    width: 100%;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #ffe400; /* Bordure jaune */
    background: rgba(26, 26, 46, 0.8);
    margin-top: 50px;
    font-size: 0.9em;
    color: #8a2be2; /* Texte violet */
    box-shadow: 0 0 15px #ffe400; /* Lueur jaune */
    position: relative;
    z-index: 10;
}

/* Ajustements pour la réactivité sur les petits écrans */
@media (max-width: 768px) {
    .cyber-header h1 {
        font-size: 2em;
    }
    .cyber-button {
        display: block;
        margin: 10px auto;
    }
    .hero-section h2 {
        font-size: 1.8em;
    }
    .glitch-text {
        font-size: 1em;
    }
    .link-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
    }
}
/* Ajustements supplémentaires pour les écrans de taille moyenne (tablettes en mode portrait) */
@media (max-width: 768px) {
    .cyber-header h1 {
        font-size: 2.5em; /* Légèrement plus petit pour les tablettes */
    }

    .cyber-nav {
        flex-direction: column; /* Empile les boutons de navigation */
        align-items: center;
    }

    .cyber-button {
        margin: 10px 0; /* Plus d'espace vertical entre les boutons */
        width: 80%; /* Les boutons prennent plus de largeur */
        max-width: 300px;
    }

    .cyber-main {
        padding: 20px; /* Réduit le padding du contenu principal */
        margin: 20px auto; /* Réduit la marge verticale */
    }

    .hero-section h2 {
        font-size: 2em; /* Taille de police ajustée */
    }

    .glitch-text {
        font-size: 1.1em; /* Taille de police ajustée */
    }

    .practice-links h3 {
        font-size: 1.8em; /* Taille de police ajustée */
    }
}

/* Ajustements pour les très petits écrans (smartphones) */
@media (max-width: 480px) {
    .cyber-header h1 {
        font-size: 1.8em; /* Encore plus petit pour les smartphones */
    }

    .hero-section h2 {
        font-size: 1.5em;
    }
    .glitch-text {
        font-size: 0.9em;
    }
}