/* ═══════════════════════════════════════════════════════════════
   X10 LOBBY SKIN — /casino and /live-casino
   Presentation-only layer on top of list-L127 (casino) and the inline
   styles of pages/live_casino.blade.php. Loaded AFTER both, so it only
   re-themes: no markup, IDs, classes or JS hooks are touched.
   Palette and metrics follow the header skin (header-L15) and the
   x10tn.net /machines-a-sous page: flat #001021 canvas, #1B324E tiles,
   10px radii, 12-13px/800 uppercase headings, #E9A722 accent.
═══════════════════════════════════════════════════════════════ */

:root {
    --casino-bg: #001021;
    --casino-card: #1B324E;
    --casino-card-hover: #234062;
    --casino-accent: #E9A722;
    --casino-accent-hover: #F2B94A;
    --casino-text: #FFFFFF;
    --casino-text-muted: rgba(255,255,255,.7);
    --casino-border: rgba(255,255,255,.08);
    --x10-card-w: 112px;
    --x10-card-ratio: 5 / 4;
    --x10-tile-radius: 12px;
    --x10-tile-ring: inset 0 0 0 1px rgba(255,255,255,.07);
    --x10-tile-shadow: 0 4px 14px rgba(0,0,0,.32);
}

/* Source artwork is 300x250 (6:5). 5:4 keeps ~96% of it visible. */
@media (min-width: 480px)  { :root { --x10-card-w: 124px; } }
@media (min-width: 768px)  { :root { --x10-card-w: 136px; } }
@media (min-width: 1024px) { :root { --x10-card-w: 148px; } }
@media (min-width: 1440px) { :root { --x10-card-w: 164px; } }

body {
    font-family: 'Proxima Nova', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Container & intro ───────────────────────────────────────── */

body .x10-casino-container {
    padding: 10px 10px 40px;
}
@media (min-width: 1024px) {
    body .x10-casino-container { padding: 16px 20px 56px; }
}

body .x10-casino-hero {
    min-height: 0;
    margin: 0 0 6px;
    padding: 6px 0 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
body .x10-casino-eyebrow {
    margin-bottom: 4px;
    color: var(--casino-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}
body .x10-casino-hero h1 {
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 800;
    letter-spacing: .01em;
    text-transform: uppercase;
}
body .x10-casino-hero p {
    margin-top: 4px;
    color: var(--casino-text-muted);
    font-size: 12px;
}

/* ── Last winners strip ──────────────────────────────────────── */

body .x10-demo-winners {
    margin-bottom: 10px;
    background: var(--casino-card);
    border: 0;
    border-radius: var(--x10-tile-radius);
}
body .x10-demo-winners-title { font-size: 11px; font-weight: 800; }
body .x10-demo-winners-label { color: var(--casino-accent); }
body .x10-demo-winner { background: rgba(0,16,33,.45); border: 0; border-radius: 8px; }
body .x10-demo-winner:hover { border-color: transparent; }
body .x10-demo-amount { color: var(--casino-accent); }

/* ── Search + filter row ─────────────────────────────────────── */

body .x10-search-wrapper {
    position: static;
    padding: 0;
    margin: 0 0 12px;
    background: transparent;
}
body .x10-search-input {
    height: 42px;
    padding: 0 14px 0 44px;
    background: var(--casino-card);
    border: 1.5px solid transparent;
    border-radius: var(--x10-tile-radius);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: border-color 200ms ease, background-color 200ms ease;
}
body .x10-search-input::placeholder { color: var(--casino-text-muted); opacity: 1; }
body .x10-search-input:focus {
    background: var(--casino-card-hover);
    border-color: var(--casino-accent);
    outline: none;
}
body .x10-search-icon { left: 14px; color: var(--casino-accent); }

body .x10-favorites-filter { gap: 6px; margin-top: 10px; }
body .x10-favorites-filter-btn {
    min-height: 30px;
    padding: 0 14px;
    background: var(--casino-card);
    border: 1.5px solid transparent;
    border-radius: var(--x10-tile-radius);
    color: #fff;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    transition: background-color 200ms ease, color 200ms ease;
}
body .x10-favorites-filter-btn:hover { background: var(--casino-card-hover); }
body .x10-favorites-filter-btn.is-active {
    background: var(--casino-accent);
    border-color: var(--casino-accent);
    color: #fff;
}
body .x10-results-summary { color: var(--casino-text-muted); font-size: 10px; }

/* ── Section headings ────────────────────────────────────────── */

body .x10-section { margin-bottom: 20px; }
body .x10-live-personal-section { margin-bottom: 20px; padding-top: 0; }

body .x10-section-header { min-height: 28px; margin-bottom: 8px; }

body .x10-section-title,
body .x10-live-casino-title,
body .x10-new-games-title {
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.2;
    text-transform: uppercase;
}
body .x10-live-casino-title { margin-bottom: 8px; }

body .x10-section-logo { height: 20px; }
body .x10-section-count {
    margin-left: 2px;
    color: var(--casino-text-muted);
    font-size: 11px;
    font-weight: 600;
    opacity: 1;
}

body .x10-view-all {
    gap: 4px;
    color: var(--casino-accent);
    font-size: 11px;
    font-weight: 800;
}
body .x10-view-all:hover { color: var(--casino-accent-hover); gap: 6px; }

/* ── Game cards: tile on top, caption below ──────────────────── */

body .x10-games-row,
body .x10-live-personal-section .x10-games-row { gap: 8px; }
@media (min-width: 1024px) {
    body .x10-games-row,
    body .x10-live-personal-section .x10-games-row { gap: 10px; }
}

body .x10-game-card,
body .x10-live-personal-section .x10-game-card {
    width: var(--x10-card-w);
    min-width: var(--x10-card-w);
    background: transparent;
    border: 0;
}

body .x10-game-link {
    display: block;
    background: transparent;
    border-radius: var(--x10-tile-radius);
    box-shadow: none;
    transition: transform 200ms ease;
}
body .x10-game-link:hover {
    transform: translateY(-2px);
    box-shadow: none;
}
body .x10-game-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    transform: translateY(-2px);
}

body .x10-game-thumb,
body .x10-live-personal-section .x10-game-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: var(--x10-card-ratio);
    contain: layout paint;
    background: radial-gradient(ellipse at 50% 40%, #234062 0%, var(--casino-card) 70%);
    border-radius: var(--x10-tile-radius);
    box-shadow: var(--x10-tile-shadow);
    transition: box-shadow 220ms ease;
}
/* Hairline ring sits above the artwork so it survives bright images */
body .x10-game-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    box-shadow: var(--x10-tile-ring);
    pointer-events: none;
    transition: box-shadow 220ms ease;
}
body .x10-game-link:hover .x10-game-thumb {
    box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
body .x10-game-link:hover .x10-game-thumb::before,
body .x10-game-link:focus-visible .x10-game-thumb::before {
    box-shadow: inset 0 0 0 1.5px rgba(233,167,34,.85);
}

body .x10-game-image { border-radius: 0; object-position: center; }
body .x10-game-link:hover .x10-game-image { transform: scale(1.05); }

body .x10-game-overlay {
    background: linear-gradient(180deg, rgba(0,16,33,0) 35%, rgba(0,16,33,.62) 100%);
    align-items: flex-end;
    justify-content: flex-end;
    padding: 8px;
}
body .x10-game-play-btn {
    width: 32px;
    height: 32px;
    padding-left: 2px;
    background: var(--casino-accent);
    color: #001021;
    font-size: 11px;
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
/* Touch screens have no hover: never show a sticky overlay after a tap */
@media (hover: none) {
    body .x10-game-overlay { display: none; }
    body .x10-game-link:hover { transform: none; }
    body .x10-game-link:hover .x10-game-image { transform: none; }
}

/* Reference badge: flat gold tab hugging the tile's top-left corner */
body .x10-game-badges { top: 0; left: 0; gap: 0; }
body .x10-badge {
    padding: 3px 8px 3px 7px;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
    border-radius: 0 0 var(--x10-tile-radius) 0;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.1;
}
body .x10-badge-new,
body .x10-badge-hot { background: var(--casino-accent); color: #001021; }
body .x10-badge-live { background: #E5383B; color: #fff; }

body .x10-live-personal-section .x10-personal-badge {
    left: 0;
    top: 0;
    padding: 3px 7px 3px 6px;
    background: var(--casino-accent);
    border: 0;
    border-radius: 0 0 var(--x10-tile-radius) 0;
    color: #001021;
    font-size: 8px;
}

body .x10-favorite-control {
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    background: rgba(0,16,33,.7);
    border: 0;
    color: #fff;
}
body .x10-favorite-control svg { width: 13px; height: 13px; }
body .x10-favorite-control:hover,
body .x10-favorite-control:focus-visible,
body .x10-favorite-control.is-active { color: var(--casino-accent); background: rgba(0,16,33,.9); }

body .x10-game-info,
body .x10-live-personal-section .x10-game-info {
    padding: 5px 1px 0;
    background: transparent;
}
body .x10-game-name {
    min-height: 28px;
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 14px;
    color: #F2F5F8;
    overflow-wrap: anywhere;
}
body .x10-game-provider {
    margin-top: 3px;
    font-size: 10px;
    font-weight: 500;
    line-height: 12px;
    color: var(--casino-text-muted);
    opacity: .7;
}
/* Inside a provider section the heading already names the provider */
body .x10-provider-section .x10-game-provider { display: none; }

/* "View all" tile at the end of a row */
body .x10-view-all-card {
    background: var(--casino-card);
    border: 0;
    border-radius: var(--x10-tile-radius);
}
body .x10-view-all-card:hover { background: var(--casino-card-hover); border-color: transparent; }
body .x10-view-all-text { font-size: 11px; font-weight: 800; text-transform: uppercase; }

/* ── Provider ribbon ─────────────────────────────────────────── */

body .x10-providers-ribbon { gap: 8px; padding-bottom: 2px; }
body .x10-provider-card {
    width: 96px;
    height: 40px;
    padding: 6px 10px;
    background: var(--casino-card);
    border: 1.5px solid transparent;
    border-radius: var(--x10-tile-radius);
    transition: background-color 200ms ease, border-color 200ms ease;
}
body .x10-provider-card:hover {
    background: var(--casino-card-hover);
    border-color: transparent;
    transform: none;
}
body .x10-provider-card.active {
    background: var(--casino-card-hover);
    border: 1.5px solid var(--casino-accent);
    box-shadow: none;
}
body .x10-provider-logo { max-height: 24px; }
body .x10-provider-name { font-size: 10px; font-weight: 800; text-transform: uppercase; }
@media (min-width: 1024px) {
    body .x10-provider-card { width: 112px; height: 44px; }
}

/* ── Breadcrumb (provider view) ──────────────────────────────── */

body .x10-breadcrumb { padding: 8px 0 12px; }
body .x10-breadcrumb-link {
    color: var(--casino-accent);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
body .x10-breadcrumb-current { font-size: 13px; font-weight: 800; text-transform: uppercase; }
body .x10-breadcrumb-count { color: var(--casino-text-muted); font-size: 11px; }

/* ── Provider view: responsive grid of the same tiles ────────── */

body .x10-casino-container .x10-provider-section.x10-provider-active .x10-games-row {
    grid-template-columns: repeat(auto-fill, minmax(var(--x10-card-w), 1fr));
    gap: 12px 8px;
}
body .x10-casino-container .x10-provider-section.x10-provider-active .x10-game-card {
    width: 100%;
    min-width: 0;
    max-width: none;
}
body .x10-casino-container .x10-provider-section.x10-provider-active .x10-game-link {
    background: transparent;
    border-radius: var(--x10-tile-radius);
}
body .x10-casino-container .x10-provider-section.x10-provider-active .x10-game-thumb {
    height: auto;
    padding-bottom: 0;
    aspect-ratio: var(--x10-card-ratio);
    border-radius: var(--x10-tile-radius);
}
body .x10-casino-container .x10-provider-section.x10-provider-active .x10-game-image { border-radius: 0; }
body .x10-casino-container .x10-provider-section.x10-provider-active .x10-game-info {
    height: auto;
    padding: 5px 1px 0;
}
body .x10-casino-container .x10-provider-section.x10-provider-active .x10-game-name {
    height: auto;
    min-height: 28px;
    margin: 0;
    font-size: 11px;
    line-height: 14px;
}
body .x10-casino-container .x10-provider-section.x10-provider-active .x10-section-title { color: var(--casino-accent); }

@media (min-width: 1024px) {
    body .x10-casino-container .x10-provider-section.x10-provider-active .x10-games-row {
        grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
        gap: 18px 12px;
    }
}

/* ── Load more / states ──────────────────────────────────────── */

body .x10-load-more-btn {
    min-height: 40px;
    padding: 0 22px;
    background: var(--casino-accent);
    border: 0;
    border-radius: var(--x10-tile-radius);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: none;
    transition: background-color 200ms ease;
}
body .x10-load-more-btn:hover { background: var(--casino-accent-hover); transform: none; box-shadow: none; }
body .x10-load-more-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

body .x10-empty {
    padding: 40px 16px;
    background: var(--casino-card);
    border-radius: var(--x10-tile-radius);
}
body .x10-empty-text { color: var(--casino-text-muted); font-size: 13px; font-weight: 600; }

/* Loading skeletons: same palette as the tiles */
body .x10-game-thumb,
body .x10-game-image-wrapper { background: var(--casino-card); }

/* ── Safety: never let the lobby widen the page ──────────────── */

body .x10-casino-container { overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
    body .x10-game-link,
    body .x10-game-thumb,
    body .x10-game-thumb::before,
    body .x10-game-image,
    body .x10-provider-card,
    body .x10-search-input { transition: none; }
}

/* Favourite heart: keep the 26px visible control, extend its hit area to ~44px for touch. */
body .x10-favorite-control::after {
    content: '';
    position: absolute;
    inset: -9px;
}

/* ── Scroll performance (mobile lobby) ───────────────────────────────────────
   Off-screen provider sections skip style/layout/paint until they approach the viewport
   (hundreds of cards per page). `auto` keeps the real height once a section has been rendered,
   so the scrollbar does not jump. IntersectionObserver/lazy images are unaffected. */
.x10-provider-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 280px;
}
/* Touch screens have no hover: no sticky zoom on tap, and no layer promotion for it. */
@media (hover: none) {
    .x10-game-link:hover .x10-game-image { transform: none; will-change: auto; }
}

/* ── Luxury layer (lobby-scoped; this file only loads on /casino and /live-casino) ──────────────
   Tokens reuse the existing --casino-* palette; nothing competes with it. */
:root {
    --x10-lux-surface-1: #0A1C30;
    --x10-lux-surface-2: #11263D;
    --x10-lux-hairline: rgba(255,255,255,.08);
    --x10-lux-gold-soft: rgba(233,167,34,.55);
    --x10-lux-focus: 0 0 0 2px #001021, 0 0 0 4px #E9A722;
}
/* Section labels: refined small-caps feel with a restrained gold hairline. */
body .x10-section-title, body .x10-new-games-title {
    letter-spacing: .06em;
}
body .x10-section-header { position: relative; }
body .x10-section-header::after {
    content: ''; position: absolute; left: 0; bottom: -6px; width: 28px; height: 2px; border-radius: 2px;
    background: var(--x10-lux-gold-soft); pointer-events: none;
}
/* Card text: clearer hierarchy (title bright, provider quiet). */
body .x10-game-name { font-weight: 600; letter-spacing: .005em; color: #fff; }
body .x10-game-provider { color: rgba(255,255,255,.58); letter-spacing: .02em; }
/* Selected provider tile / chip: obvious without relying on colour alone (inset ring + weight). */
body .x10-provider-card[aria-pressed="true"], body .x10-favorites-filter-btn.is-active {
    box-shadow: inset 0 0 0 1.5px var(--casino-accent);
    font-weight: 800;
}
/* Failed thumbnail that fell back: keep the tile calm, not an empty hole. */
body .x10-game-image[data-x10-fb="1"] { object-fit: contain; padding: 18%; background: var(--x10-lux-surface-2); }
/* Keep the gold focus ring inside the navy surfaces without clipping on cards. */
@media (prefers-reduced-motion: reduce) { body .x10-section-header::after { transition: none; } }

/* ── Launch feedback + display preference ─────────────────────────────────────────────────── */
.x10-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body .x10-game-card.is-launching .x10-game-link { opacity: .78; }
body .x10-launch-badge {
    position: absolute; left: 50%; bottom: 8px; z-index: 6; transform: translateX(-50%);
    padding: 4px 10px; border-radius: 999px; background: rgba(0,16,33,.92); border: 1px solid var(--x10-lux-gold-soft);
    color: var(--casino-accent); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; pointer-events: none;
}
body .x10-pref-btn {
    display: inline-flex; align-items: center; min-height: 32px; margin: 8px 0 0 auto; padding: 0 12px;
    border: 1px solid var(--x10-lux-hairline); border-radius: 999px; background: transparent;
    color: rgba(255,255,255,.66); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .04em; cursor: pointer;
}
body .x10-pref-btn:hover:not(:disabled) { color: #fff; border-color: var(--x10-lux-gold-soft); }
body .x10-pref-btn[aria-pressed="true"] { color: var(--casino-accent); border-color: var(--x10-lux-gold-soft); }
body .x10-pref-btn:disabled { opacity: .7; cursor: default; }

/* ═══════════════════════════════════════════════════════════════════════════
   CATALOG DENSITY — more real games per screen on /casino and /live-casino (assets/scripts/x10-catalog.js for load-more).
   Measured on the reference (x10tn.net/machines-a-sous): lobby rows = horizontal strips of 110x152 cards (img 110x120 + 27px name),
   5px gaps; a provider's "see all" page = 3-column grid, 5px column / 15px row gap, 45 games then "Afficher plus".
   The reference is a mobile layout stretched on desktop (3 columns at 1443px), so desktop density here is our own, sized to
   keep names readable (11px, 2 lines).
   ═══════════════════════════════════════════════════════════════════════════ */

/* lobby strips: a little narrower on larger screens = more cards per row (mobile already matches the reference's 110px) */
@media (min-width: 768px)  { :root { --x10-card-w: 124px; } }
@media (min-width: 1024px) { :root { --x10-card-w: 136px; } }
@media (min-width: 1440px) { :root { --x10-card-w: 148px; } }

/* provider view grid: 3 columns on phones (reference), then as many as fit at a readable width */
body .x10-casino-container .x10-provider-section.x10-provider-active .x10-games-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 6px;
}
@media (min-width: 414px) {
    body .x10-casino-container .x10-provider-section.x10-provider-active .x10-games-row {
        grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
        gap: 12px 8px;
    }
}
@media (min-width: 768px) {
    body .x10-casino-container .x10-provider-section.x10-provider-active .x10-games-row {
        grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    }
}
@media (min-width: 1024px) {
    body .x10-casino-container .x10-provider-section.x10-provider-active .x10-games-row {
        grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
        gap: 14px 10px;
    }
}
body .x10-casino-container .x10-provider-section.x10-provider-active .x10-game-name { font-size: 11px; line-height: 14px; min-height: 28px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* provider view: the games come first. Marketing / personal rows are for the lobby, not for browsing one provider. */
body.x10-filtering-provider .x10-casino-hero,
body.x10-filtering-provider .x10-demo-winners,
body.x10-filtering-provider .x10-personal-section,
body.x10-filtering-provider #x10-continue-section,
body.x10-filtering-provider .x10-live-personal-section,
body.x10-filtering-provider #x10-recommended-section { display: none !important; }
body.x10-filtering-provider .x10-search-wrapper { margin-bottom: 8px; }

/* lobby: tighter vertical rhythm so provider rows start higher */
@media (max-width: 767px) {
    body .x10-casino-hero p { display: none; }                       /* the h1 stays; the one-line blurb costs two lines of screen */
    body .x10-casino-hero { margin-bottom: 2px; }
    body .x10-section, body .x10-personal-section { margin-bottom: 12px; }
    body .x10-section-header { margin-bottom: 6px; }
}
