/* Variables globales pour les couleurs et dimensions */
:root {
    --neon-green: #39ff14;
    --neon-blue: #00ffff;
    --neon-red: #ff0055;
    --neon-yellow: #ffff00;
    --content-width: min(90%, 600px);
}

/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Configuration de base HTML et Body */
html, body {
    height: 100vh;
    width: 100%;
    overflow: hidden;
    position: fixed;
}

/* Styles du corps de la page */
body {
    background-color: #180f16;
    font-family: 'Press Start 2P', cursive;
    display: flex;
    flex-direction: column;
    padding: clamp(10px, 5vw, 40px); /* un outil super pratique pour créer des designs responsifs sans avoir besoin d'écrire plein de media queries */
    color: var(--neon-green);
    font-size: clamp(0.8rem, 2vw, 1rem);
    max-height: 100vh;
}

/* Layout principal */
main {
    width: var(--content-width);
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(20px, 5vh, 40px);
}

/* Styles de l'en-tête */
header {
    text-align: center;
    width: var(--content-width);
    margin: 0 auto;
    margin-bottom: clamp(20px, 5vh, 40px);
}

/* Container des photos de profil */
.profile-container {
    position: relative;
    width: clamp(80px, 30vw, 150px);
    aspect-ratio: 1;
    margin: 0 auto;
}

/* Styles des photos de profil */
.profile-pic, .profile-pic-alt {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: clamp(2px, 0.5vw, 4px) solid var(--neon-blue);
}

/* Classe pour les éléments cachés visuellement mais accessibles */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Styles des titres */
h1 {
    font-size: clamp(1.2rem, 4vw, 2rem);
    margin: clamp(10px, 3vh, 20px) 0;
}

h2 {
    color: var(--neon-yellow);
    font-size: clamp(0.8rem, 3vw, 1.2rem);
}

/* Container des liens principaux */
.links-container {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 3vh, 20px);
    width: 100%;
}

/* Style des boutons néon */
.neon-btn {
    padding: clamp(10px, 3vh, 20px);
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    letter-spacing: clamp(2px, 1vw, 4px);
    text-decoration: none;
    color: var(--neon-blue);
    border: 2px solid var(--neon-blue);
    text-transform: uppercase;
    text-align: center;
}

/* Container des icônes sociales */
.social-icons {
    display: flex;
    justify-content: center;
    gap: clamp(15px, 5vw, 30px);
    margin-top: clamp(20px, 5vh, 40px);
}

/* Style des icônes pixelisées */
.pixel-icon {
    width: clamp(30px, 8vw, 50px);
    height: clamp(30px, 8vw, 50px);
    color: var(--neon-blue);
}

/* Style du pied de page */
footer {
    text-align: center;
    padding: clamp(10px, 3vh, 20px) 0;
    font-size: clamp(0.6rem, 1.5vw, 0.8rem);
    width: var(--content-width);
    margin: 0 auto;
}

/* Animation 1: Effet arc-en-ciel pour le titre */
@keyframes rainbow {
    0% { color: var(--neon-red); }
    25% { color: var(--neon-yellow); }
    50% { color: var(--neon-green); }
    75% { color: var(--neon-blue); }
    100% { color: var(--neon-red); }
}

/* Animation 2: Effet d'alternance pour les photos */
@keyframes profile-switch {
    0%, 45% { opacity: 1; }
    50%, 95% { opacity: 0; }
    100% { opacity: 1; }
}

/* Animation 3: Effet de lueur néon */
@keyframes neon-glow {
    0% { 
        box-shadow: 0 0 5px var(--neon-blue),
                   0 0 10px var(--neon-blue);
    }
    50% { 
        box-shadow: 0 0 20px var(--neon-blue),
                   0 0 30px var(--neon-blue);
    }
    100% { 
        box-shadow: 0 0 5px var(--neon-blue),
                   0 0 10px var(--neon-blue);
    }
}

/* Animation 4: Effet shake pour le titre */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Animation 5: Effet pulse pour les icônes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Animation 6: Effet glitch pour les boutons */
@keyframes glitch {
    0% { transform: translate(0); }
    25% { transform: translate(-5px, 5px); }
    50% { transform: translate(5px, -5px); }
    75% { transform: translate(-3px, -3px); }
    100% { transform: translate(0); }
}

/* Application des animations principales */
.rainbow-text {
    animation: rainbow 4s linear infinite;
}

.profile-pic {
    animation: profile-switch 2s infinite;
}

.profile-pic-alt {
    opacity: 0;
    animation: profile-switch 2s infinite reverse;
}

.neon-btn {
    animation: neon-glow 1.5s infinite;
}

/* Application des micro-interactions */
h1:hover {
    animation: shake 0.5s ease-in-out;
    cursor: pointer;
}

.pixel-icon:hover {
    animation: pulse 0.5s ease-in-out;
    filter: brightness(1.5);
}

.neon-btn:hover {
    animation: glitch 0.3s ease-in-out;
    text-shadow: 2px 2px var(--neon-red),
                -2px -2px var(--neon-blue);
}

/* Media Queries pour les grands écrans */
@media (min-width: 1536px) {
    :root {
        --content-width: min(70%, 800px);
    }

    .links-container {
        gap: 30px;
    }

    .neon-btn:hover {
        transform: translateY(-5px);
    }
}