/* Sandbox Lobby */
:root {
    /* Couleurs du lobby, définies une seule fois (13/11) */
    --sandbox-ardoise-sombre: #1e293b;
    --sandbox-bleu-nuit: #1e3a5f;
    --sandbox-foret: #1a2e1a;
    --sandbox-nuit-ardoise: #0f172a;
    --sandbox-gris-bleu-rgb: 139, 155, 180;
    --bg: #0f1419;
    --surface: #1a2332;
    --surface-hover: #243044;
    --border: #2d3a4f;
    --text: #e8eef7;
    --text-muted: #8b9bb4;
    --accent: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.15);
    --radius: 16px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

.lobby {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px;
}

.lobby-header {
    text-align: center;
    margin-bottom: 48px;
}

.lobby-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.subtitle {
    color: var(--text-muted);
    margin-top: 8px;
    font-size: 1.1rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.game-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    display: flex;
    flex-direction: column;
}

.game-card:not(.disabled):hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: var(--surface-hover);
}

.game-card.disabled {
    opacity: 0.55;
    cursor: default;
}

.game-card-visual {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sandbox-ardoise-sombre) 0%, var(--sandbox-nuit-ardoise) 100%);
}

.empire-visual {
    background: linear-gradient(135deg, var(--sandbox-bleu-nuit) 0%, var(--sandbox-nuit-ardoise) 60%, var(--sandbox-foret) 100%);
    height: auto;
    aspect-ratio: 960 / 420;
}

.empire-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-card.featured { grid-column: 1 / -1; }

.game-icon {
    font-size: 3.5rem;
}

.game-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.game-card-body h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.game-card-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex: 1;
}

.badge {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent);
}

.badge.muted {
    background: rgba(var(--sandbox-gris-bleu-rgb), 0.15);
    color: var(--text-muted);
}

.lobby-footer {
    margin-top: 64px;
    text-align: center;
}

.lobby-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.lobby-footer a:hover {
    color: var(--text);
}
