:root {
    --bg-color: #1a1b26; /* Fond sombre moderne */
    --card-bg: #4a2111; /* Ton marron/chaud rappelant le design généré */
    --card-border: #6a3018;
    --primary-color: #d35400; 
    --text-color: #f1f2f6;
    --gold: #fbc531;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    
    /* Prend au minimum toute la hauteur de l'écran, barre de nav incluse */
    min-height: 100svh; 
    
    /* Structure en colonne pour permettre le scroll naturel */
    display: flex;
    flex-direction: column; 
    overflow-x: hidden;
}

.app-wrapper {
    /* flex-grow: 1 lui dit de prendre toute la hauteur disponible dans le body */
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* C'est ici que la magie du centrage vertical opère en toute sécurité */
    width: 100%;
    max-width: 450px;
    padding: 1rem 1rem 2rem 1rem;
    margin: 0 auto; /* Centre horizontalement sur les grands écrans */
}

header {
    text-align: center;
    margin-bottom: 0.5rem;
    flex-shrink: 0; /* Empêche le header de s'écraser */
}

h1 {
    font-size: 1.6rem;
    color: #ffffff;
    margin-top: 0.5rem;
}

.subtitle {
    color: #a4b0be;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.container {
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centre la carte verticalement s'il y a de la marge */
}

.game-card {
    background: linear-gradient(145deg, #3d1b0c, #5c2812);
    border: 2px solid var(--card-border);
    border-radius: 20px;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), inset 0 0 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 1.2rem; /* Espace géré automatiquement entre les éléments */
    max-height: 100%; /* S'assure que la carte ne dépasse pas du conteneur */
}

.game-title {
    font-size: 2.2rem;
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    margin: 0;
}

/* LA GALERIE EN DIAGONALE */
.split-gallery {
    display: flex;
    width: 95%;
    margin: 0 auto;
    /* La hauteur s'adapte à l'écran : 28% de la hauteur totale */
    height: 28dvh; 
    min-height: 120px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid var(--gold);
    box-shadow: 0 0 12px rgba(251, 197, 49, 0.4);
    background-color: #fff; /* Couleur des lignes de séparation */
    gap: 4px; /* Épaisseur des lignes */
    transform: skewX(-12deg); /* Incline tout le conteneur */
}

.split-item {
    flex: 1;
    overflow: hidden;
}

.inner-img {
    /* On élargit l'image interne pour compenser l'inclinaison et éviter les bords vides */
    width: 160%; 
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: skewX(12deg); /* Redresse l'image pour qu'elle ne soit pas déformée */
    margin-left: -30%; /* Recentre l'image */
    
    /* Style pour les textes de remplacement temporaires */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: rgba(255,255,255,0.7);
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* Couleurs temporaires en attendant tes vrais visuels 2D */
.item-1 .inner-img { background-color: #e1b12c; } 
.item-2 .inner-img { background-color: #00a8ff; } 
.item-3 .inner-img { background-color: #4cd137; } 

.game-desc {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #f5f6fa;
    background-color: rgba(0,0,0,0.25);
    padding: 0.8rem;
    border-radius: 12px;
    margin: 0;
}

.play-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(to bottom, #e74c3c, #c0392b);
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 12px;
    text-transform: uppercase;
    border: 2px solid #ff7979;
    box-shadow: 0 6px 0 #831d1d, 0 10px 15px rgba(0,0,0,0.4);
    transition: transform 0.1s, box-shadow 0.1s;
}

.play-button:active {
    transform: translateY(6px); /* Effet d'enfoncement physique 3D */
    box-shadow: 0 0 0 #831d1d, 0 2px 5px rgba(0,0,0,0.4);
}

.play-icon {
    font-size: 1.2rem;
}

/* --- FOOTER ET LIENS LÉGAUX --- */
.site-footer {
    margin-top: 1.5rem;
    text-align: center;
    flex-shrink: 0; /* Empêche le footer d'être écrasé */
}

.legal-link {
    color: #a4b0be; /* Utilise le même gris que ton sous-titre */
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.legal-link:hover {
    color: var(--gold); /* Devient jaune/doré au survol */
    text-decoration: underline;
}