/* 
Palette de couleurs inspirée de la NES & Modern Retro
- Fond: #0f0c29 (Bleu nuit profond)
- Surface: #1e1e1e (Gris foncé)
- Texte: #f0f0f0
- Accent: #ff3e3e (Rouge néon)
- Secondaire: #00d2ff (Bleu cyan)
- Vert Retro: #39ff14
*/

/* --- Styles Généraux --- */
body {
    background-color: #0f0c29; 
    color: #f0f0f0;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(76, 29, 149, 0.5) 0px, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(255, 62, 62, 0.25) 0px, transparent 50%),
        radial-gradient(circle at 50% 90%, rgba(0, 210, 255, 0.3) 0px, transparent 60%);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

h1, h2, h3 {
    font-family: 'Press Start 2P', monospace;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 2px 2px 0px #ab000d;
    letter-spacing: 1px;
    line-height: 1.4;
}

a {
    color: #ff3e3e;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:focus-visible, button:focus-visible {
    outline: 3px solid #ff3e3e;
    outline-offset: 4px;
    border-radius: 4px;
}

img {
    max-width: 100%;
    display: block;
}

/* --- En-tête --- */
header {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #333;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease-out;
}

.header--hidden { transform: translateY(-100%); }

header h1 {
    font-size: 1.5rem;
    margin: 0;
    text-shadow: none;
    color: #ff3e3e;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

nav a, .dropdown-btn {
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

nav a:hover, .dropdown-btn:hover {
    color: #fff;
    background-color: rgba(255, 62, 62, 0.2);
}

/* --- Dropdown --- */
.dropdown { position: relative; display: inline-block; }

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1e1e1e;
    min-width: 220px;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.2s, margin-top 0.2s;
}

.dropdown-content.show, .dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    margin-top: 5px;
}

.dropdown-content a {
    color: #e0e0e0;
    padding: 10px 15px;
    display: block;
    border-radius: 6px;
    margin-bottom: 2px;
}

.dropdown-content a:hover {
    background-color: #ff3e3e;
    color: #fff;
    transform: translateX(5px);
}

/* --- Hero Section (Index) --- */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: radial-gradient(circle at center, rgba(255, 62, 62, 0.15) 0%, transparent 70%);
    position: relative;
    overflow: hidden;
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 62, 62, 0.6);
}

.hero p {
    font-size: 1.1rem;
    color: #aaa;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    padding: 0 10px;
}

/* Boutons */
.btn-cta {
    display: inline-block;
    background-color: transparent;
    color: #ff3e3e;
    border: 3px solid #ff3e3e;
    padding: 12px 30px;
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(255, 62, 62, 0.4), inset 0 0 10px rgba(255, 62, 62, 0.1);
    transition: all 0.2s ease;
    animation: pulse 2s infinite;
    cursor: pointer;
}

.btn-cta:hover {
    background-color: #ff3e3e;
    color: #fff;
    box-shadow: 0 0 30px rgba(255, 62, 62, 0.8), inset 0 0 20px rgba(255, 62, 62, 0.4);
    transform: scale(1.05);
}

.btn-back {
    display: inline-block;
    color: #aaa;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.1rem;
}
.btn-back:hover { color: #ff3e3e; transform: translateX(-5px); }

@keyframes pulse {
    0% { box-shadow: 0 0 10px rgba(255, 62, 62, 0.4); }
    50% { box-shadow: 0 0 20px rgba(255, 62, 62, 0.7); }
    100% { box-shadow: 0 0 10px rgba(255, 62, 62, 0.4); }
}

/* --- Grille des jeux --- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 2rem;
    padding-bottom: 2rem;
}

.game-card {
    background-color: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    /* Effet de présentoir par défaut, ajustable par .game-card--for-sale */
    transform-style: preserve-3d;
    perspective: 1000px;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 62, 62, 0.3);
    border-color: #ff3e3e;
}

.game-card img {
    width: 100%;
    height: 250px;
    object-fit: contain; 
    background-color: #0d0d0d; 
    padding: 10px;
    box-sizing: border-box; 
    transition: transform 0.5s ease;
}

.game-card:hover img { transform: scale(1.02); }

.game-card-content {
    padding: 1rem;
    text-align: center;
    background: linear-gradient(to top, #1e1e1e 80%, transparent);
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.game-card h3 {
    font-size: 0.85rem;
    color: #fff;
    text-shadow: none;
    margin: 0;
}

/* Styles pour les jeux à vendre (présentoir) */
.game-card--for-sale {
    border: 2px solid #00d2ff; /* Bordure cyan pour distinguer */
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3); /* Légère lueur cyan */
    transform: rotateX(8deg) translateY(-10px) scale(0.98); /* Incline et soulève légèrement */
    transition: all 0.4s ease;
}

.game-card--for-sale:hover {
    transform: rotateX(0deg) translateY(-15px) scale(1.02); /* Se redresse au survol */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 210, 255, 0.6); /* Lueur plus intense */
    border-color: #00d2ff;
}

.game-card--for-sale .for-sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff3e3e; /* Rouge vif */
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transform: rotate(5deg); /* Légèrement incliné */
}

/* --- FORMULAIRE --- */
.contact-box {
    background-color: rgba(30, 30, 30, 0.6);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #444;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.retro-form .form-group { margin-bottom: 1.5rem; }

.retro-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ff3e3e;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.retro-form input, .retro-form textarea {
    width: 100%;
    padding: 12px;
    background-color: #121212;
    border: 2px solid #333;
    border-radius: 4px;
    color: #f0f0f0;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.retro-form input:focus, .retro-form textarea:focus {
    border-color: #ff3e3e;
    box-shadow: 0 0 10px rgba(255, 62, 62, 0.2);
    outline: none;
    background-color: #1a1a1a;
}

/* --- PAGE DETAILS JEU --- */
.game-detail-container {
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid #444;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    margin-bottom: 3rem;
}

.game-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #333;
    padding-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.game-header h2 { font-size: 2rem; margin: 0; color: #fff; text-shadow: 0 0 15px rgba(255, 62, 62, 0.5); }

.game-badges .badge {
    background: #333;
    color: #ccc;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: 'Press Start 2P', monospace;
    margin-left: 5px;
    border: 1px solid #555;
}

.game-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

/* CRT Frame Effect */
.crt-frame {
    position: relative;
    border: 10px solid #111;
    border-radius: 20px;
    background: #000;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    overflow: hidden;
}

.crt-frame img {
    width: 100%;
    display: block;
    filter: contrast(1.1) brightness(1.1);
}

.screen-glare {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 10px;
}

/* HUD Panel Droite */
.game-info-hud h3 {
    font-size: 1rem;
    color: #00d2ff; /* Cyan cyber */
    margin-bottom: 1.5rem;
    text-shadow: none;
}

.data-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.data-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px dashed #444;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

.data-list li span { color: #888; }
.data-list li strong { color: #39ff14; /* Vert Retro */ text-shadow: 0 0 5px rgba(57, 255, 20, 0.3); }

.story-module {
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid #ff3e3e;
    padding: 1rem;
}

.story-module p { margin: 0; color: #ddd; font-style: italic; }

.game-full-desc h3 { font-size: 1rem; color: #00d2ff; margin-bottom: 1rem; margin-top: 2rem; }
.game-full-desc p { color: #ccc; text-align: justify; margin-bottom: 1.5rem; }

/* Effet CRT Global */
.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.6;
}

/* Footer */
footer {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    text-align: center;
    color: #ccc;
    font-family: monospace;
    font-size: 0.9rem;
    border-top: 1px solid #333;
    position: relative;
    z-index: 10;
}

/* Responsive */
@media (max-width: 900px) {
    .game-layout { grid-template-columns: 1fr; }
    .game-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
    .hero h2 { font-size: 1.5rem; }
    header h1 { font-size: 1.2rem; }
    nav { gap: 10px; }
    .game-detail-container { padding: 1.5rem; }
    .game-header h2 { font-size: 1.5rem; }
}