/* ==========================================================================
   BlueVault — Thème « Futur » : fond noir, header transparent, 3D, néon bleu.
   Aucun filtre noir/blanc sur les visuels. Zéro dépendance externe.
   ========================================================================== */

/* ----------------------------------------------------------------------- */
/*  1. Variables                                                            */
/* ----------------------------------------------------------------------- */
:root {
    /* Palette bleue / cyan néon */
    --blue-900: #04112c;
    --blue-800: #071a3d;
    --blue-700: #0b2a63;
    --blue-600: #123a8a;
    --blue-500: #1e6dff;
    --blue-400: #3b82f6;
    --blue-300: #60a5fa;
    --blue-200: #93c5fd;
    --cyan: #22d3ee;

    --accent: #3b82f6;
    --accent-2: #22d3ee;
    --accent-strong: #1e6dff;

    /* Fond noir + surfaces en verre */
    --bg: #000000;
    --bg-2: #04060e;
    --bg-elev: #080b16;
    --bg-elev-2: #0b1120;
    --surface: rgba(255, 255, 255, .035);
    --surface-hover: rgba(59, 130, 246, .14);
    --border: rgba(120, 160, 240, .16);
    --border-strong: rgba(120, 165, 255, .34);

    --text: #eef3ff;
    --text-soft: #aebbe0;
    --text-muted: #7385ad;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;

    --shadow-sm: 0 2px 12px rgba(0, 0, 0, .5);
    --shadow: 0 18px 50px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, .7);
    --glow: 0 0 0 1px rgba(59, 130, 246, .35), 0 0 34px rgba(59, 130, 246, .35);
    --glow-cyan: 0 0 30px rgba(34, 211, 238, .45);

    --container: 1280px;
    --header-h: 78px;
    --ease: cubic-bezier(.22, .61, .36, 1);
    --transition: .3s var(--ease);

    color-scheme: dark;
}

/* ----------------------------------------------------------------------- */
/*  2. Base                                                                 */
/* ----------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Halo d'ambiance discret, jamais un filtre plein. */
body::before {
    content: "";
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(1200px 620px at 78% -8%, rgba(30, 109, 255, .18), transparent 60%),
        radial-gradient(900px 500px at 8% 4%, rgba(34, 211, 238, .10), transparent 55%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; }

.container {
    width: 100%; max-width: var(--container); margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 34px);
}

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 300;
    background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
::selection { background: var(--accent-strong); color: #fff; }

/* ----------------------------------------------------------------------- */
/*  3. Grille 3D « synthwave » (réutilisable : héros, footer)               */
/* ----------------------------------------------------------------------- */
.grid-3d {
    position: absolute; inset: auto 0 0 0; height: 64%; z-index: 0;
    perspective: 420px; overflow: hidden; pointer-events: none;
}
.grid-3d::before {
    content: ""; position: absolute; inset: -60% -60% -2px -60%;
    background-image:
        linear-gradient(rgba(59, 130, 246, .28) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, .28) 1px, transparent 1px);
    background-size: 46px 46px;
    transform: rotateX(74deg); transform-origin: bottom center;
    -webkit-mask-image: linear-gradient(transparent, #000 55%);
            mask-image: linear-gradient(transparent, #000 55%);
    animation: gridflow 5.5s linear infinite;
}
@keyframes gridflow { to { background-position: 0 46px, 0 0; } }

/* ----------------------------------------------------------------------- */
/*  4. Boutons                                                              */
/* ----------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55em;
    font: inherit; font-weight: 600; cursor: pointer; position: relative;
    padding: .78em 1.5em; border-radius: 999px; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--blue-400) 45%, var(--accent-strong));
    color: #001028; font-weight: 700;
    box-shadow: 0 10px 30px rgba(30, 109, 255, .45), 0 0 22px rgba(34, 211, 238, .4);
}
.btn--primary:hover { box-shadow: 0 16px 40px rgba(30, 109, 255, .6), 0 0 34px rgba(34, 211, 238, .55); }
.btn--ghost { background: var(--surface); }
.btn--ghost:hover { background: var(--surface-hover); border-color: var(--accent); box-shadow: var(--glow); }
.btn--danger { background: rgba(239, 68, 68, .12); color: #ff9b9b; border-color: rgba(239, 68, 68, .4); }
.btn--danger:hover { background: rgba(239, 68, 68, .22); }
.btn--block { width: 100%; }
.btn--sm { padding: .48em .9em; font-size: .85rem; }

/* ----------------------------------------------------------------------- */
/*  5. Header transparent futuriste                                         */
/* ----------------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: transparent; border-bottom: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}
/* Au défilement : léger verre translucide pour la lisibilité (jamais opaque). */
.site-header.is-scrolled {
    background: linear-gradient(180deg, rgba(4, 7, 16, .72), rgba(4, 7, 16, .35));
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border-bottom-color: var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}
.header-inner { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.3rem; }
.brand-mark {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--accent-strong)); color: #001028;
    box-shadow: 0 0 22px rgba(34, 211, 238, .55), inset 0 0 12px rgba(255, 255, 255, .25);
    animation: markpulse 4s ease-in-out infinite;
}
@keyframes markpulse {
    50% { box-shadow: 0 0 34px rgba(59, 130, 246, .8), inset 0 0 12px rgba(255, 255, 255, .35); }
}
.brand-name {
    background: linear-gradient(90deg, #fff, var(--cyan), var(--blue-300));
    background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: sheen 6s linear infinite;
}
@keyframes sheen { to { background-position: 200% center; } }

.main-nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
    position: relative; padding: .55em .95em; border-radius: 999px; font-weight: 600;
    color: var(--text-soft); letter-spacing: .01em; transition: color var(--transition);
}
.nav-link::after {
    content: ""; position: absolute; left: 50%; right: 50%; bottom: 6px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--accent-strong));
    transition: left var(--transition), right var(--transition), box-shadow var(--transition);
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after, .nav-link.is-active::after { left: 14px; right: 14px; box-shadow: var(--glow-cyan); }
.nav-link.is-active { color: #fff; }

.header-search { flex: 1; max-width: 480px; margin-left: auto; position: relative; }
.nav-toggle { display: none; }

/* ----------------------------------------------------------------------- */
/*  6. Recherche premium                                                    */
/* ----------------------------------------------------------------------- */
.search-box { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 15px; width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.search-box input {
    width: 100%; font: inherit; color: var(--text);
    padding: .72em 1em .72em 2.7em; border-radius: 999px;
    background: rgba(255, 255, 255, .04); border: 1px solid var(--border-strong);
    backdrop-filter: blur(8px);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus {
    outline: none; border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, .2), var(--glow-cyan);
    background: rgba(4, 10, 24, .7);
}
.search-suggest {
    position: absolute; top: calc(100% + 12px); left: 0; right: 0; z-index: 120;
    background: rgba(6, 10, 22, .92); border: 1px solid var(--border-strong); border-radius: var(--radius);
    box-shadow: var(--shadow-lg), var(--glow); overflow: hidden; padding: 6px;
    backdrop-filter: blur(20px);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    max-height: 70vh; overflow-y: auto;
}
.search-suggest.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 11px; cursor: pointer; transition: background var(--transition); }
.suggest-item:hover, .suggest-item.is-active { background: var(--surface-hover); }
.suggest-item img { width: 66px; height: 31px; object-fit: cover; border-radius: 6px; flex: none; }
.suggest-item__title { font-weight: 600; font-size: .95rem; }
.suggest-item__meta { font-size: .78rem; color: var(--text-muted); }
.suggest-empty { padding: 16px; text-align: center; color: var(--text-muted); font-size: .9rem; }

/* ----------------------------------------------------------------------- */
/*  7. Héros (fond noir, 3D, aucun filtre sur l'image)                      */
/* ----------------------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden; isolation: isolate;
    padding-block: clamp(56px, 11vw, 130px) clamp(40px, 7vw, 90px);
    margin-top: calc(var(--header-h) * -1);
}
.hero__glow {
    position: absolute; z-index: 0; top: -20%; right: -5%; width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
    background: radial-gradient(circle, rgba(30, 109, 255, .3), transparent 62%); pointer-events: none;
    filter: blur(10px);
}
.hero__content {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(24px, 5vw, 60px);
}
.hero__eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    text-transform: uppercase; letter-spacing: .28em; font-size: .72rem; font-weight: 700;
    color: var(--cyan); margin-bottom: 16px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.hero__eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--cyan); box-shadow: var(--glow-cyan); }
.hero__title {
    font-size: clamp(2.4rem, 6.5vw, 4.6rem); font-weight: 800; line-height: 1.02; margin-bottom: .35em;
    text-shadow: 0 0 40px rgba(30, 109, 255, .35);
}
.hero__desc { font-size: 1.08rem; color: var(--text-soft); max-width: 54ch; margin-bottom: 1.8em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Illustration : couverture flottante en 3D, sans filtre. */
.hero__art { display: block; position: relative; transform-style: preserve-3d; }
.hero__art img {
    width: 100%; border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg), var(--glow);
    transform: perspective(1100px) rotateY(-16deg) rotateX(6deg); transition: transform .6s var(--ease);
    animation: floaty 7s ease-in-out infinite;
}
.hero__art:hover img { transform: perspective(1100px) rotateY(-6deg) rotateX(2deg) scale(1.03); }
@keyframes floaty { 50% { translate: 0 -14px; } }
.hero--empty { text-align: center; }
.hero--empty .hero__content { grid-template-columns: 1fr; justify-items: center; }

/* ----------------------------------------------------------------------- */
/*  8. Sections & grilles                                                   */
/* ----------------------------------------------------------------------- */
.section { padding-block: clamp(30px, 5vw, 58px); position: relative; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section__title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; display: flex; align-items: center; gap: .6em; }
.section__title::before {
    content: ""; width: 5px; height: 1.05em; border-radius: 3px;
    background: linear-gradient(var(--cyan), var(--accent-strong)); box-shadow: var(--glow-cyan);
}
.section__link { color: var(--blue-300); font-weight: 600; transition: color var(--transition); }
.section__link:hover { color: var(--cyan); text-shadow: var(--glow-cyan); }

.games-grid { display: grid; gap: clamp(14px, 2vw, 24px); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); perspective: 1200px; }

/* ----------------------------------------------------------------------- */
/*  9. Cartes de jeu (verre + inclinaison 3D)                               */
/* ----------------------------------------------------------------------- */
.game-card {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); transform-style: preserve-3d;
    transition: transform .25s var(--ease), box-shadow var(--transition), border-color var(--transition);
    will-change: transform;
}
.game-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg), var(--glow); }
.game-card__media { position: relative; aspect-ratio: 460 / 215; overflow: hidden; background: var(--bg-elev-2); }
.game-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.game-card:hover .game-card__media img { transform: scale(1.08); }
.game-card__glow { position: absolute; inset: 0; opacity: 0; transition: opacity var(--transition); background: linear-gradient(180deg, transparent 45%, rgba(30, 109, 255, .4)); }
.game-card:hover .game-card__glow { opacity: 1; }
.game-card__body { padding: 15px 17px 17px; display: flex; flex-direction: column; gap: 8px; transform: translateZ(30px); }
.game-card__title { font-size: 1.04rem; font-weight: 700; margin: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.game-card__meta { margin: 0; font-size: .82rem; color: var(--text-muted); }
.game-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

.badge {
    position: absolute; top: 11px; left: 11px; z-index: 3;
    padding: 4px 11px; border-radius: 999px; font-size: .72rem; font-weight: 700; color: #001028;
    background: linear-gradient(135deg, var(--cyan), var(--accent-strong)); box-shadow: var(--glow-cyan);
}
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--surface-hover); color: var(--blue-200); border: 1px solid var(--border); }

.chip-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: .55em 1.15em; border-radius: 999px; font-weight: 600; color: var(--text-soft); background: var(--surface); border: 1px solid var(--border-strong); transition: all var(--transition); }
.chip:hover { color: #001028; background: linear-gradient(135deg, var(--cyan), var(--accent-strong)); border-color: transparent; transform: translateY(-2px); box-shadow: var(--glow-cyan); }

/* ----------------------------------------------------------------------- */
/*  10. En-têtes de page, barre d'outils, pagination                       */
/* ----------------------------------------------------------------------- */
.page-head { padding-block: clamp(28px, 6vw, 52px) 8px; }
.page-head__eyebrow a { color: var(--blue-300); font-weight: 600; }
.page-head__title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; }
.page-head__count { color: var(--text-muted); }

.toolbar { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 26px; }
.toolbar__group { display: flex; flex-direction: column; gap: 6px; }
.toolbar__group label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.toolbar select, .admin-form select {
    font: inherit; color: var(--text); padding: .58em 2.3em .58em .95em; border-radius: 11px;
    background: var(--bg-elev) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237385ad' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right .85em center;
    border: 1px solid var(--border-strong); appearance: none; cursor: pointer; min-width: 190px;
}
.toolbar select:focus { outline: none; border-color: var(--cyan); box-shadow: var(--glow-cyan); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 44px 0 12px; }
.page-link { min-width: 44px; padding: .55em .85em; text-align: center; border-radius: 11px; font-weight: 600; background: var(--surface); border: 1px solid var(--border); color: var(--text-soft); transition: all var(--transition); }
.page-link:hover { background: var(--surface-hover); color: #fff; border-color: var(--border-strong); }
.page-link.is-active { background: linear-gradient(135deg, var(--cyan), var(--accent-strong)); color: #001028; border-color: transparent; box-shadow: var(--glow-cyan); }
.page-ellipsis { padding: .55em; color: var(--text-muted); }

.category-grid { display: grid; gap: 15px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.category-tile {
    display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: var(--radius);
    background: linear-gradient(150deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .01)); border: 1px solid var(--border);
    box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.category-tile:hover { transform: translateY(-6px); box-shadow: var(--shadow), var(--glow); border-color: var(--border-strong); }
.category-tile__name { font-weight: 700; font-size: 1.12rem; }
.category-tile__count { font-size: .82rem; color: var(--text-muted); }

.empty-state { text-align: center; padding: clamp(40px, 8vw, 90px) 20px; color: var(--text-muted); }
.empty-state--lg h1 { font-size: 2rem; color: var(--text); margin-bottom: .3em; }
.empty-state--lg { display: flex; flex-direction: column; align-items: center; gap: 16px; }

/* ----------------------------------------------------------------------- */
/*  11. Fiche de jeu (bannière sans filtre, fondu par transparence)         */
/* ----------------------------------------------------------------------- */
.game__banner {
    position: relative; min-height: clamp(240px, 36vw, 460px);
    background-image: var(--banner); background-size: cover; background-position: center;
    margin-top: calc(var(--header-h) * -1);
    /* Fondu vers le bas par masque (transparence) → révèle le fond noir, pas un filtre. */
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
            mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.game__banner-inner { position: relative; height: 100%; display: flex; align-items: flex-end; padding-block: 26px; min-height: inherit; }
.breadcrumb { font-size: .85rem; color: var(--text-soft); background: rgba(0, 0, 0, .35); padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(6px); }
.breadcrumb a { color: var(--cyan); }

.game__layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 38px; padding-block: 0 70px; align-items: start; }
.game__heading { display: flex; gap: 24px; margin-bottom: 34px; margin-top: -90px; position: relative; z-index: 2; }
.game__cover {
    width: 230px; aspect-ratio: 460/215; height: auto; object-fit: cover; border-radius: var(--radius);
    border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg), var(--glow); flex: none; background: var(--bg-elev-2);
}
.game__title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; text-shadow: 0 0 30px rgba(30, 109, 255, .3); }
.game__tagline { color: var(--text-soft); margin-bottom: 14px; }
.game__genres { display: flex; flex-wrap: wrap; gap: 8px; }

.game__section { margin-bottom: 40px; }
.game__section h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

.video-embed { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow), var(--glow); background: #000; border: 1px solid var(--border); }
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }

.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gallery__item { padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: var(--bg-elev-2); aspect-ratio: 16/9; transition: transform var(--transition), box-shadow var(--transition); }
.gallery__item:hover { transform: translateY(-4px); box-shadow: var(--shadow), var(--glow); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }

.rich-text { color: var(--text-soft); }
.rich-text img { border-radius: var(--radius-sm); margin: 14px 0; }
.rich-text h1, .rich-text h2, .rich-text h3 { color: var(--text); }
.rich-text ul, .rich-text ol { padding-left: 1.3em; }
.rich-text--sm { font-size: .9rem; }

.reqs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.reqs__col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.reqs__col h3 { font-size: 1rem; color: var(--cyan); margin-bottom: 10px; }

.game__aside { position: sticky; top: calc(var(--header-h) + 18px); }
.info-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
    border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 24px;
    box-shadow: var(--shadow), var(--glow); backdrop-filter: blur(10px);
}
.info-card__note { font-size: .78rem; color: var(--text-muted); margin: 10px 0 4px; text-align: center; }
.info-list { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.info-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.info-list dt { color: var(--text-muted); font-size: .88rem; }
.info-list dd { margin: 0; text-align: right; font-weight: 600; }

.lightbox { position: fixed; inset: 0; z-index: 400; display: none; place-items: center; padding: 24px; background: rgba(0, 0, 0, .94); backdrop-filter: blur(8px); }
.lightbox.is-open { display: grid; }
.lightbox__img { max-width: 94vw; max-height: 88vh; border-radius: var(--radius); box-shadow: var(--shadow-lg), var(--glow); }
.lightbox__close { position: absolute; top: 20px; right: 24px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.lightbox__close:hover { background: var(--surface-hover); box-shadow: var(--glow); }

/* ----------------------------------------------------------------------- */
/*  12. Footer incroyable                                                   */
/* ----------------------------------------------------------------------- */
.site-footer { position: relative; margin-top: 90px; overflow: hidden; border-top: 1px solid var(--border); isolation: isolate; }
.site-footer .grid-3d { height: 100%; opacity: .5; }
.footer__glow { position: absolute; z-index: 0; left: 50%; top: -30px; translate: -50% 0; width: 80vw; max-width: 900px; height: 200px; background: radial-gradient(60% 100% at 50% 0, rgba(30, 109, 255, .38), transparent 70%); pointer-events: none; }
.footer-inner { position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 34px; padding-block: 56px 30px; }
.footer-brand .brand-name { font-size: 1.6rem; font-weight: 800; }
.footer-tagline { color: var(--text-soft); margin: 8px 0 14px; }
.footer-legal { font-size: .82rem; color: var(--text-muted); max-width: 46ch; }
.footer-nav { display: flex; flex-direction: column; gap: 9px; }
.footer-nav h3 { font-size: .74rem; text-transform: uppercase; letter-spacing: .16em; color: var(--cyan); margin-bottom: 8px; font-family: ui-monospace, Menlo, monospace; }
.footer-nav a { color: var(--text-soft); transition: color var(--transition), transform var(--transition); width: fit-content; }
.footer-nav a:hover { color: #fff; transform: translateX(4px); text-shadow: var(--glow-cyan); }

/* Immense filigrane en dégradé animé. */
.footer__watermark {
    position: relative; z-index: 1; text-align: center; font-weight: 900; line-height: .8;
    font-size: clamp(3rem, 15vw, 12rem); letter-spacing: -.04em; padding-bottom: 6px; user-select: none;
    background: linear-gradient(90deg, rgba(34, 211, 238, .18), rgba(59, 130, 246, .5), rgba(34, 211, 238, .18));
    background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: sheen 8s linear infinite;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent);
            mask-image: linear-gradient(180deg, #000, transparent);
}
.footer-bottom { position: relative; z-index: 2; border-top: 1px solid var(--border); padding-block: 20px; font-size: .84rem; color: var(--text-muted); }

/* ----------------------------------------------------------------------- */
/*  13. Alertes                                                             */
/* ----------------------------------------------------------------------- */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; border: 1px solid var(--border-strong); }
.alert ul { margin: 0; padding-left: 1.2em; }
.alert--error { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .45); color: #ffb4b4; }
.alert--success { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .45); color: #9be7b6; }

/* ----------------------------------------------------------------------- */
/*  14. Révélation au défilement                                           */
/* ----------------------------------------------------------------------- */
.reveal-group > * { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-group.is-visible > * { opacity: 1; transform: none; }
.reveal-group.is-visible > *:nth-child(2) { transition-delay: .06s; }
.reveal-group.is-visible > *:nth-child(3) { transition-delay: .12s; }
.reveal-group.is-visible > *:nth-child(4) { transition-delay: .18s; }
.reveal-group.is-visible > *:nth-child(5) { transition-delay: .24s; }
.reveal-group.is-visible > *:nth-child(n+6) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .reveal-group > * { opacity: 1; transform: none; }
    .hero__art img { animation: none; transform: none; }
}

/* ----------------------------------------------------------------------- */
/*  15. Responsive                                                          */
/* ----------------------------------------------------------------------- */
@media (max-width: 1000px) {
    .hero__content { grid-template-columns: 1fr; }
    .hero__art { max-width: 420px; margin-inline: auto; }
    .hero__art img { transform: none; }
    .game__layout { grid-template-columns: 1fr; }
    .game__aside { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex; flex-direction: column; gap: 5px; justify-content: center;
        width: 44px; height: 44px; padding: 0 11px; order: 5;
        background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; cursor: pointer;
    }
    .nav-toggle span { height: 2px; background: var(--text); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
        background: rgba(5, 8, 18, .96); border-bottom: 1px solid var(--border); padding: 14px clamp(16px, 4vw, 32px);
        backdrop-filter: blur(20px);
        transform: translateY(-120%); transition: transform var(--transition); box-shadow: var(--shadow);
    }
    .main-nav.is-open { transform: translateY(0); }
    .nav-link { padding: .8em 1em; }
    .nav-link::after { display: none; }
    .header-search { order: 4; max-width: none; flex-basis: 100%; }
    .header-inner { flex-wrap: wrap; height: auto; padding-block: 12px; gap: 12px; }
    .brand { margin-right: auto; }
    .game__heading { flex-direction: column; margin-top: -60px; }
    .game__cover { width: 170px; }
    .reqs { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
    .hero__actions .btn { flex: 1; }
}
