/* --- CONFIGURATION --- */
:root {
    --bg-color: #282828;
    --card-bg: #363636;
    --text-main: #e6edf3;
    --text-muted: #8b949e;
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --header-height: 300px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

a {
    color:var(--accent);
}

/* --- HEADER AVEC IMAGE (Responsive) --- */
.lab-header {
    width: 100%;
    height: var(--header-height);
    background: url('img/outofreality.jpg'); /* TON IMAGE DE HEADER */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.header-content h1 {
    font-size: 3rem;
    letter-spacing: 4px;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.header-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* --- GRILLE & CONTENEUR --- */
.container {
    max-width: 1200px;
    margin: -50px auto 50px auto; /* On fait remonter la grille sur le header */
    padding: 0 20px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* --- CARTES DE JEU --- */
.game-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #30363d;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #282828;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid var(--accent);
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column; /* Organise le contenu verticalement */
    height: 100%;
}

.card-body h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.card-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.btn-play {
    margin-top: auto; /* LA MAGIE : Pousse le bouton tout en bas du conteneur flex */
    display: block;
    text-align: center;
    text-decoration: none;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.3s;
    flex-shrink: 0; 
    margin-top: auto;
}

.btn-play:hover {
    background: var(--accent);
    color: var(--bg-color);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    :root { --header-height: 250px; }
    
    .header-content h1 { font-size: 2rem; }
    .container { margin-top: 20px; } /* On ne chevauche plus sur mobile */
    
    .game-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur petit écran */
    }
}

/* --- FOOTER --- */
.lab-footer {
    background-color: #0d1117;
    padding: 60px 20px 30px;
    margin-top: 80px;
    border-top: 1px solid #30363d;
    position: relative;
}

/* Petite ligne lumineuse décorative au-dessus du footer */
.lab-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.accent-text {
    color: var(--accent);
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.social-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent);
}

.copyright {
    font-size: 0.75rem;
    color: #484f58;
    border-top: 1px solid #21262d;
    padding-top: 20px;
}

/* Ajustement mobile */
@media (max-width: 768px) {
    .social-links {
        flex-direction: column;
        gap: 15px;
    }
}