/* ======== CONFIGURATION GLOBALE ======== */
:root {
    --color-black: #0a0a0a;
    --color-dark-grey: #1a1a1a;
    --color-light: #EAEAEA;
    --color-accent: #8B0000; /* Rouge Sang */
    --font-horror: 'Creepster', cursive;
    --font-title: 'Oswald', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-black);
    color: var(--color-light);
    font-family: var(--font-body);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

h1, h2, h3 {
    font-family: var(--font-title);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    text-transform: uppercase;
}

h3 {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin: 10px 0;
}

p {
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: var(--color-accent);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ======== HEADER & NAVIGATION ======== */
header {
    width: 100%;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-dark-grey);
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(10, 10, 10, 0.9);
    z-index: 100;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-light);
}
.logo:hover {
    color: var(--color-accent);
}

.nav-links {
    list-style: none;
    display: none; /* Caché par défaut sur mobile */
}

.nav-links li {
    display: inline-block;
    margin-left: 25px;
}

.nav-links a {
    font-family: var(--font-title);
    text-transform: uppercase;
    font-size: 1rem;
}

/* --- Menu Mobile --- */
.mobile-menu-icon {
    display: flex; /* Visible sur mobile */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
}

.mobile-menu-icon span {
    width: 100%;
    height: 3px;
    background-color: var(--color-light);
    transition: all 0.3s ease;
}

/* --- Style du menu mobile ouvert --- */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px; /* Hauteur du header */
    left: 0;
    width: 100%;
    background-color: var(--color-black);
    padding: 20px;
    border-bottom: 1px solid var(--color-dark-grey);
}

.nav-links.active li {
    margin: 10px 0;
    text-align: center;
}

/* Animation icône hamburger (croix) */
.mobile-menu-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-icon.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}


/* ======== SECTION 1: HERO ======== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    padding-top: 70px; /* Éviter que le header cache le contenu */
}

.hero h1 {
    font-family: var(--font-horror);
    font-size: 3.5rem;
    color: var(--color-accent);
    margin-bottom: 20px;
    position: relative; /* Nécessaire pour l'effet glitch */
}

.hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.cta {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-light);
    padding: 12px 30px;
    font-family: var(--font-title);
    font-size: 1.1rem;
    text-transform: uppercase;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta:hover {
    background-color: #a10000; /* Rouge plus clair */
    color: var(--color-light);
    transform: scale(1.05);
}

/* ======== CSS EFFET GLITCH (pour JS) ======== */
h1.glitching {
    animation: glitch-shake 0.5s infinite;
}

h1.glitching::before,
h1.glitching::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-black);
    overflow: hidden;
}

h1.glitching::before {
    left: 2px;
    text-shadow: -1px 0 var(--color-accent);
    animation: glitch-anim-1 1s infinite alternate-reverse;
}

h1.glitching::after {
    left: -2px;
    text-shadow: -1px 0 var(--color-light);
    animation: glitch-anim-2 1.5s infinite alternate-reverse;
}

/* Keyframes pour l'animation du glitch */
@keyframes glitch-anim-1 {
    0% { clip-path: inset(10% 0 80% 0); }
    100% { clip-path: inset(70% 0 10% 0); }
}
@keyframes glitch-anim-2 {
    0% { clip-path: inset(40% 0 40% 0); }
    100% { clip-path: inset(10% 0 75% 0); }
}
@keyframes glitch-shake {
    0% { transform: translate(0); }
    25% { transform: translate(2px, 2px); }
    50% { transform: translate(-2px, -2px); }
    75% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}


/* ======== SECTIONS GÉNÉRIQUES ======== */
.portfolio {
    padding: 60px 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 colonne sur mobile */
    gap: 30px;
}

.game-card {
    background-color: var(--color-dark-grey);
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(139, 0, 0, 0.3);
}

.game-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.game-card h3,
.game-card p {
    padding: 0 20px;
}

.game-card p {
    padding-bottom: 20px;
}

.services { /* Utilisé pour le Dev Log */
    padding: 60px 0;
    background-color: var(--color-dark-grey);
}

/* ======== FOOTER ======== */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--color-dark-grey);
    text-align: center;
}

.social-links a {
    font-family: var(--font-title);
    margin: 0 15px;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.copyright {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #555;
}

/* ======== RESPONSIVE (Desktop) ======== */
@media (min-width: 768px) {
    /* --- Navigation --- */
    .mobile-menu-icon {
        display: none; /* Cache l'icône hamburger */
    }

    .nav-links {
        display: flex; /* Affiche les liens nav normaux */
        flex-direction: row;
        position: static;
        width: auto;
        background-color: transparent;
        padding: 0;
        border: none;
    }
    
    .nav-links.active {
        /* Annule les styles mobiles */
        flex-direction: row;
        padding: 0;
    }

    .nav-links li {
        margin: 0 0 0 25px; /* Marge à gauche seulement */
    }

    /* --- Hero --- */
    .hero h1 {
        font-size: 5.5rem; /* Titre plus gros sur desktop */
    }

    /* --- Grilles --- */
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr); /* Grille à 3 colonnes */
    }
}
