/* ==========================================================================
   TAVERNE - STYLE GLOBAL FRONT-END (Rétro PC Fond Clair)
   Inspiré des interfaces PC 90s/2000 - Lisibilité & Contrastes Optimaux
   ========================================================================== */

:root {
    --bg-main: #d4d0c8;         /* Fond gris rétro clair (style Windows 95/2000) */
    --bg-card: #ffffff;         /* Cartes et conteneurs en blanc pur */
    --bg-panel: #ece9d8;        /* Fond gris très doux pour blocs secondaires */
    --bg-header: #1b2838;       /* Bleu nuit pour le header */
    --bg-title: #2c4d75;        /* Bleu acier pour les barres de titre */
    
    --text-main: #111111;       /* Texte principal noir pour une lisibilité maximale */
    --text-muted: #555555;      /* Texte secondaire sombre */
    --text-light: #ffffff;      /* Texte blanc sur fond sombre */
    
    --accent: #2c4d75;          /* Bleu rétro principal */
    --gold: #b8860b;            /* Touche dorée rétro */
    --gold-bright: #fbbf24;     /* Jaune/Or vif au survol */
    --link-blue: #1d4ed8;       /* Bleu lien classique très lisible */
    
    --border: #808080;          /* Bordures gris foncé */
    --font-mono: 'Courier New', Courier, monospace;
    --font-sans: Tahoma, Verdana, 'Segoe UI', Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    color: var(--link-blue);
    text-decoration: underline;
    font-weight: bold;
}

a:hover {
    color: var(--gold);
}

/* --- STRUCTURE GLOBALE --- */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-layout {
    display: flex;
    gap: 25px;
    margin-top: 25px;
}

.content-area {
    flex: 1;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* --- EN-TÊTE / HEADER RÉTRO --- */
header.site-header {
    background: linear-gradient(180deg, #101820 0%, var(--bg-header) 100%);
    border-bottom: 4px solid var(--gold-bright);
    padding: 25px 0 20px 0;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.logo-container h1 {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 38px;
    letter-spacing: 4px;
    color: var(--gold-bright);
    text-shadow: 2px 2px 0px #000000;
}

.logo-container h1 a {
    color: var(--gold-bright) !important;
    text-decoration: none !important;
}

.logo-container p {
    margin: 6px 0 0 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
}

nav.main-nav {
    margin-top: 18px;
}

nav.main-nav a {
    margin: 0 6px;
    font-size: 14px;
    font-weight: bold;
    color: #000000 !important;
    background: #e2e8f0;
    padding: 7px 16px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    text-decoration: none !important;
    display: inline-block;
    border-radius: 2px;
}

nav.main-nav a:hover {
    background: var(--gold-bright);
    color: #000000 !important;
}

/* --- PANNEAUX ET BOÎTES EN RELIEF (WINDOWS / DOS) --- */
.box-retro {
    background-color: var(--bg-card);
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 18px;
    margin-bottom: 25px;
    color: var(--text-main);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.15);
}

.title-bar {
    background: linear-gradient(90deg, var(--bg-title) 0%, #3a5a80 100%);
    color: #ffffff;
    padding: 8px 14px;
    font-weight: bold;
    font-size: 15px;
    margin: -18px -18px 18px -18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #000000;
}

/* --- GRILLE DES JEUX --- */
.grid-jeux {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.card-jeu {
    background-color: var(--bg-card);
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.15);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

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

.card-jeu .thumb-box {
    width: 100%;
    height: 165px;
    background-color: #000000;
    overflow: hidden;
    border-bottom: 1px solid #808080;
}

.card-jeu .thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-jeu .card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    color: var(--text-main);
}

.card-jeu h3 {
    margin: 0 0 10px 0;
    font-size: 17px;
    color: var(--bg-title);
    font-weight: bold;
}

.badge-tag {
    display: inline-block;
    background-color: #e2e8f0;
    color: #1e293b;
    font-size: 11px;
    padding: 3px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 2px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-weight: bold;
}

.btn-voir {
    display: block;
    text-align: center;
    background: #cbd5e1;
    color: #000000 !important;
    font-weight: bold;
    padding: 10px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    margin-top: auto;
    text-decoration: none !important;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: background-color 0.15s;
}

.btn-voir:hover {
    background: var(--gold-bright);
    color: #000000 !important;
}

/* --- PUBLICITÉS --- */
.pub-container {
    text-align: center;
    margin: 20px 0;
}

.pub-container img {
    max-width: 100%;
    height: auto;
    border: 2px inset #808080;
}

/* --- RESPONSIVE --- */
@media (max-width: 850px) {
    .main-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
}