/* ===============================================================
   1. Design tokens Glitchworlds
   Source unique de vérité : couleurs, rayons, ombres, espacements.
   =============================================================== */
:root {
    --gw-primary: #2f7df6;
    --gw-primary-rgb: 47, 125, 246;
    --gw-primary-dark: #1f63cf;
    --gw-secondary: #8b5cf6;
    --gw-secondary-rgb: 139, 92, 246;
    --gw-alert: #e11d48;
    --gw-text-size: 1rem;

    --gw-background: #eef5ff;
    --gw-background-accent: #dbe9ff;
    --gw-surface: rgba(255, 255, 255, 0.82);
    --gw-surface-solid: #ffffff;

    --gw-text: #0f172a;
    --gw-muted: #64748b;
    --gw-border: rgba(47, 125, 246, 0.16);

    --gw-radius-sm: 0.5rem;
    --gw-radius-md: 1rem;
    --gw-radius-lg: 1.5rem;
    --gw-radius-pill: 999px;

    --gw-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    --gw-shadow-soft: 0 4px 16px rgba(15, 23, 42, 0.08);
    --gw-glow: 0 0 0 3px rgba(var(--gw-primary-rgb), 0.18);

    --gw-rail-width: 104px;
}

[data-bs-theme="dark"] {
    color-scheme: dark;
    --gw-primary: #60a5fa;
    --gw-primary-rgb: 96, 165, 250;
    --gw-primary-dark: #93c5fd;
    --gw-secondary: #a78bfa;
    --gw-secondary-rgb: 167, 139, 250;
    --gw-alert: #fb3b5c;
    --gw-background: #07101f;
    --gw-background-accent: #101d35;
    --gw-surface: rgba(15, 27, 48, 0.88);
    --gw-surface-solid: #111d31;
    --gw-text: #e5eefc;
    --gw-muted: #9cabc1;
    --gw-border: rgba(148, 180, 225, 0.2);
    --gw-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
    --gw-shadow-soft: 0 4px 18px rgba(0, 0, 0, 0.3);
    --gw-glow: 0 0 0 3px rgba(var(--gw-primary-rgb), 0.24);
    --bs-body-color: var(--gw-text);
    --bs-body-bg: var(--gw-background);
    --bs-secondary-color: var(--gw-muted);
    --bs-tertiary-bg: #17243a;
    --bs-border-color: var(--gw-border);
}

[data-bs-theme="dark"] body {
    background-image:
        radial-gradient(circle at top left, rgba(var(--gw-primary-rgb), 0.17), transparent 42%),
        radial-gradient(circle at top right, rgba(var(--gw-secondary-rgb), 0.12), transparent 38%),
        linear-gradient(180deg, var(--gw-background) 0%, var(--gw-background-accent) 100%);
}

[data-bs-theme="dark"] .gw-message:not(.gw-message--mine) { background: #1d2a40; }
[data-bs-theme="dark"] .gw-profile__avatar { border-color: #1d2a40; background: linear-gradient(145deg, #172a48, #111d31); }
[data-bs-theme="dark"] .text-secondary { color: var(--gw-muted) !important; }

/* ===============================================================
   2. Pont vers Bootstrap
   Nos tokens pilotent les variables Bootstrap : on ne réécrit pas
   les composants, on les reconfigure.
   =============================================================== */
:root {
    --bs-primary: var(--gw-primary);
    --bs-primary-rgb: var(--gw-primary-rgb);
    --bs-secondary: var(--gw-secondary);
    --bs-secondary-rgb: var(--gw-secondary-rgb);
    --bs-body-color: var(--gw-text);
    --bs-body-bg: var(--gw-background);
    --bs-link-color: var(--gw-primary);
    --bs-link-color-rgb: var(--gw-primary-rgb);
    --bs-link-hover-color: var(--gw-primary-dark);
    --bs-border-color: var(--gw-border);
    --bs-border-radius: var(--gw-radius-sm);
    --bs-border-radius-lg: var(--gw-radius-md);
    --bs-border-radius-xl: var(--gw-radius-lg);
}

html[data-gw-text-size="small"] { font-size: 0.9rem; }
html[data-gw-text-size="large"] { font-size: 1.1rem; }
html[data-gw-text-size="xl"] { font-size: 1.2rem; }

html[data-contrast-renforce="true"] {
    --gw-text: #0a1222;
    --gw-muted: #44556d;
    --gw-border: rgba(14, 29, 52, 0.28);
    --gw-background: #f9fbff;
    --gw-background-accent: #edf4ff;
}

body {
    min-height: 100vh;
    background-image:
        radial-gradient(circle at top left, rgba(var(--gw-primary-rgb), 0.26), transparent 42%),
        radial-gradient(circle at top right, rgba(var(--gw-secondary-rgb), 0.18), transparent 38%),
        linear-gradient(180deg, var(--gw-background) 0%, var(--gw-background-accent) 100%);
    background-attachment: fixed;
    font-size: var(--gw-text-size);
}

:focus-visible {
    outline: 3px solid rgba(var(--gw-primary-rgb), 0.55);
    outline-offset: 2px;
}

/* ===============================================================
   3. Shell applicatif : barre haute + rail latéral + barre basse
   =============================================================== */
.gw-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem clamp(0.75rem, 2vw, 1.5rem);
}

/* --- Barre haute ------------------------------------------------ */
.gw-topbar {
    position: relative;
    z-index: 1050;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.gw-logo {
    display: inline-flex;
    flex-direction: column;
    text-decoration: none;
    line-height: 1.05;
}

.gw-logo__name {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--gw-text);
}

.gw-logo__accent {
    background: linear-gradient(90deg, var(--gw-primary), var(--gw-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gw-logo__tagline {
    margin-top: 0.15rem;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gw-muted);
}

.gw-search {
    justify-self: center;
    width: min(560px, 100%);
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.gw-search.is-open {
    position: relative;
    z-index: 1100;
    width: min(650px, 100%);
}

.gw-search form {
    position: relative;
}

.gw-search__icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--gw-primary);
    pointer-events: none;
}

.gw-search__input {
    width: 100%;
    padding: 0.7rem 1.1rem 0.7rem 2.6rem;
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-pill);
    background: var(--gw-surface-solid);
    box-shadow: var(--gw-shadow-soft);
    font-size: 0.95rem;
}

.gw-search__input::placeholder {
    color: var(--gw-muted);
}

.gw-search__input:focus {
    outline: none;
    border-color: var(--gw-primary);
    box-shadow: var(--gw-glow);
}

/* La couleur est posée explicitement : héritée, elle prendrait celle de la
   topbar, blanche sur les thèmes à barre sombre (legacy, DS) donc illisible
   sur le fond clair du panneau. */
.gw-autocomplete { position: absolute; z-index: 1; top: calc(100% + .55rem); left: 0; right: 0; overflow: hidden; border: 1px solid var(--gw-border); border-radius: 1rem; color: var(--gw-text); background: var(--gw-surface-solid); box-shadow: 0 18px 45px rgba(22, 52, 95, .2); }
.gw-autocomplete:not(.d-none) { animation: gw-autocomplete-apparition 0.22s cubic-bezier(0.4, 0, 0.2, 1); }

@keyframes gw-autocomplete-apparition {
    from { opacity: 0; transform: translateY(-0.4rem); }
    to { opacity: 1; transform: translateY(0); }
}
.gw-autocomplete__item { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; color: inherit; text-decoration: none; border-bottom: 1px solid var(--gw-border); }
.gw-autocomplete__item > i, .gw-autocomplete__item > img { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: .7rem; color: var(--gw-primary); background: rgba(59, 130, 246, .12); }
.gw-autocomplete__item > img { object-fit: cover; }
.gw-autocomplete__item span, .gw-autocomplete__item small { display: block; min-width: 0; }
.gw-autocomplete__item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-autocomplete__item small { color: var(--gw-muted); }
.gw-autocomplete__item:hover, .gw-autocomplete__item.is-active { color: inherit; background: rgba(59, 130, 246, .1); }
.gw-autocomplete__all { display: block; padding: .75rem 1rem; color: var(--gw-primary); font-weight: 700; text-align: center; text-decoration: none; }
.gw-autocomplete__empty { padding: 1rem; color: var(--gw-muted); text-align: center; }
.gw-autocomplete__header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .9rem; border-bottom: 1px solid var(--gw-border); color: var(--gw-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gw-autocomplete__header + .gw-autocomplete__item { border-top: 0; }
.gw-autocomplete__count { padding: .1rem .45rem; border-radius: var(--gw-radius-pill); background: rgba(var(--gw-primary-rgb), .12); color: var(--gw-primary); }
.gw-autocomplete__clear { padding: 0; border: 0; background: none; color: var(--gw-primary); font-size: inherit; font-weight: 700; letter-spacing: inherit; text-transform: inherit; }
.gw-autocomplete__clear:hover { text-decoration: underline; }

.gw-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem;
    background: var(--gw-surface);
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-pill);
    box-shadow: var(--gw-shadow-soft);
    backdrop-filter: blur(10px);
}

.gw-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: var(--gw-surface-solid);
    color: var(--gw-primary);
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gw-level-chip { display: grid; grid-template-columns: auto auto; gap: .15rem .65rem; min-width: 170px; padding: .5rem .8rem; border: 1px solid var(--gw-border); border-radius: 1rem; color: var(--gw-text); background: var(--gw-surface-solid); box-shadow: var(--gw-shadow-soft); text-decoration: none; }
.gw-level-chip__points { font-weight: 800; }
.gw-level-chip__points i { margin-right: .35rem; color: #f5b91f; }
.gw-level-chip__level { color: var(--gw-muted); font-size: .78rem; text-align: right; }
.gw-level-chip__bar { grid-column: 1 / -1; height: .3rem; overflow: hidden; border-radius: 999px; background: rgba(var(--gw-primary-rgb), .15); }
.gw-level-chip__bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gw-primary), var(--gw-secondary)); }

.gw-icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--gw-shadow-soft);
    color: var(--gw-primary-dark);
}

.gw-icon-btn__badge {
    position: absolute;
    top: 0.05rem;
    right: 0.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.28rem;
    border-radius: var(--gw-radius-pill);
    background: var(--gw-alert);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -0.01em;
    text-align: center;
    animation: gw-badge-apparition 0.28s ease-out;
}

@keyframes gw-badge-apparition {
    from { transform: scale(0.4); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .gw-icon-btn__badge { animation: none; }
}

/* --- Panneau déroulant de la cloche ----------------------------- */
.gw-notif { position: relative; display: inline-flex; }
.gw-notif-panel {
    position: absolute;
    z-index: 1100;
    top: calc(100% + 0.6rem);
    right: 0;
    width: min(22rem, calc(100vw - 2rem));
    max-height: min(26rem, calc(100vh - 6rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--gw-border);
    border-radius: 1rem;
    background: var(--gw-surface-solid);
    box-shadow: 0 18px 45px rgba(22, 52, 95, .2);
    color: var(--gw-text);
    text-align: left;
    animation: gw-autocomplete-apparition 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.gw-notif-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding: .7rem .9rem; border-bottom: 1px solid var(--gw-border); }
.gw-notif-panel__title { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gw-muted); }
.gw-notif-panel__count { padding: .1rem .45rem; border-radius: var(--gw-radius-pill); background: rgba(var(--gw-primary-rgb), .12); color: var(--gw-primary); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.gw-notif-panel__list { margin: 0; padding: 0; list-style: none; }
.gw-notif-panel__item {
    display: flex;
    gap: .7rem;
    width: 100%;
    padding: .7rem .9rem;
    border: 0;
    border-bottom: 1px solid var(--gw-border);
    background: none;
    color: inherit;
    text-align: left;
}
.gw-notif-panel__item:hover, .gw-notif-panel__item:focus-visible { background: rgba(var(--gw-primary-rgb), .1); }
.gw-notif-panel__item.is-unread { border-left: .2rem solid var(--gw-alert); padding-left: .7rem; }
.gw-notif-panel__icon { display: grid; flex: 0 0 2.2rem; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .7rem; background: rgba(var(--gw-primary-rgb), .12); color: var(--gw-primary); }
.gw-notif-panel__body { display: block; min-width: 0; }
.gw-notif-panel__label { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-notif-panel__message { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--gw-muted); font-size: .85rem; }
.gw-notif-panel__body time { display: block; margin-top: .15rem; color: var(--gw-muted); font-size: .72rem; }
.gw-notif-panel__empty { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: 0; padding: 1.5rem 1rem; color: var(--gw-muted); text-align: center; }
.gw-notif-panel__foot { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; padding: .5rem .9rem; }
.gw-notif-panel__foot form { margin-right: auto; }
.gw-notif-panel__action { padding: .25rem 0; border: 0; background: none; color: var(--gw-primary); font-size: .82rem; font-weight: 700; text-decoration: none; }
.gw-notif-panel__action:hover { text-decoration: underline; }

.gw-icon-btn--avatar {
    background: linear-gradient(135deg, var(--gw-primary), var(--gw-secondary));
    color: #fff;
}

.gw-icon-btn--avatar:hover {
    color: #fff;
}

.gw-status-dot {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 11px;
    height: 11px;
    border: 2px solid var(--gw-surface-solid);
    border-radius: 50%;
    background: #22c55e;
}

/* --- Zone centrale : rail + contenu ----------------------------- */
.gw-layout {
    flex: 1;
    display: grid;
    grid-template-columns: var(--gw-rail-width) minmax(0, 1fr);
    gap: 1rem;
}

.gw-rail {
    position: sticky;
    top: 1rem;
    align-self: start;
    padding: 0.6rem 0.5rem;
    background: var(--gw-surface);
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-lg);
    box-shadow: var(--gw-shadow-soft);
    backdrop-filter: blur(10px);
}

.gw-rail__viewport {
    display: contents;
}

.gw-rail__toggle {
    display: none;
}

.gw-rail__suite {
    display: none;
}

.gw-dsi-selection {
    display: none;
}

@media (min-width: 992px) {
    .gw-rail {
        max-height: calc(100dvh - 7.5rem);
        padding-bottom: 0.45rem;
    }

    .gw-rail__viewport {
        display: block;
        position: relative;
        max-height: calc(100dvh - 8.5rem);
    }

    .gw-rail__list {
        max-height: calc(100dvh - 8.5rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: none;
        padding-bottom: 0.15rem;
    }

    .gw-rail__list::-webkit-scrollbar {
        display: none;
    }

    .gw-rail__suite {
        position: absolute;
        left: 0;
        right: 0;
        z-index: 2;
        display: flex;
        justify-content: center;
        border: 0;
        cursor: pointer;
        color: var(--gw-primary);
    }

    .gw-rail__suite--haut {
        top: 0;
        align-items: flex-start;
        padding: 0.15rem 0 1.4rem;
        background: linear-gradient(to bottom, var(--gw-surface) 58%, transparent);
    }

    .gw-rail__suite--bas {
        bottom: 0;
        align-items: flex-end;
        padding: 1.4rem 0 0.15rem;
        background: linear-gradient(to top, var(--gw-surface) 58%, transparent);
    }

    .gw-rail__suite[hidden] {
        display: none;
    }

    .gw-rail__suite i {
        font-size: 1.15rem;
        line-height: 1;
    }

    .gw-rail__suite:hover {
        color: var(--gw-primary-dark, var(--gw-primary));
    }
}

.gw-rail__list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gw-rail__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem 0.35rem;
    border: 2px solid transparent;
    border-radius: var(--gw-radius-md);
    color: var(--gw-muted);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.gw-rail__item i {
    font-size: 1.35rem;
}

.gw-rail__label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
}

.gw-rail__item:hover {
    background: rgba(var(--gw-primary-rgb), 0.08);
    color: var(--gw-primary);
    transform: translateY(-1px);
}

.gw-rail__item.is-active {
    background: rgba(var(--gw-primary-rgb), 0.12);
    border-color: var(--gw-primary);
    color: var(--gw-primary);
    box-shadow: var(--gw-glow);
}

.gw-rail__item--logout {
    color: #c2410c;
}

.gw-rail__item--logout:hover {
    color: #9a3412;
    background: rgba(194, 65, 12, 0.1);
}

/* ===============================================================
   3 bis. Déclinaisons clair / sombre des ambiances
   La palette (data-theme) et la luminosité (data-bs-theme) sont deux
   axes indépendants. Les blocs ci-dessous ne reprennent que ce que la
   version de base de chaque ambiance fixe en dur : le double attribut
   leur donne la priorité sur les tokens de la palette.
   =============================================================== */

/* --- Barre basse ------------------------------------------------ */
.gw-bottombar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.gw-bottombar__side {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gw-bottombar__side--end {
    justify-content: flex-end;
}

.gw-bottombar__center {
    display: grid;
    justify-items: center;
    gap: .45rem;
}

.gw-bottombar > .gw-legal-footer {
    grid-column: 1 / -1;
    margin: 0;
    padding: .65rem 0 0;
    border: 0;
    border-top: 1px solid var(--gw-border);
    font-size: .68rem;
}

.gw-bottombar > .gw-legal-footer .gw-legal-footer__list {
    gap: .2rem .7rem;
}

.gw-bottombar__copyright {
    display: none;
}

.gw-console-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--gw-surface-solid);
    box-shadow: var(--gw-shadow-soft);
    color: var(--gw-primary);
    text-decoration: none;
    line-height: 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gw-console-btn i {
    font-size: 1.2rem;
}

.gw-console-btn span {
    margin-top: 0.15rem;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gw-console-btn--default span {
    font-size: .58rem;
    letter-spacing: 0;
    text-transform: none;
}

.gw-console-btn--default {
    width: 62px;
    height: 62px;
    padding: 4px;
}

.gw-console-btn--default i {
    font-size: 1.65rem;
}

:is(.gw-console-btn--default, .gw-console-btn--wii) span {
    display: none;
}

.gw-console-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--gw-shadow);
}

.gw-storage {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gw-muted);
    font-size: 0.75rem;
}

.gw-storage i {
    font-size: 1.4rem;
}

.gw-storage strong {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gw-text);
}

.gw-clock {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.5rem;
    background: var(--gw-surface);
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-pill);
    box-shadow: var(--gw-shadow-soft);
    backdrop-filter: blur(10px);
}

.gw-clock time {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.gw-clock strong {
    font-size: 1.35rem;
    font-weight: 700;
}

.gw-clock span {
    font-size: 0.7rem;
    color: var(--gw-muted);
}

.gw-clock i {
    color: #22c55e;
}

.gw-messages {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    background: var(--gw-surface-solid);
    border-radius: var(--gw-radius-pill);
    box-shadow: var(--gw-shadow-soft);
    color: var(--gw-text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gw-messages:hover {
    transform: translateY(-2px);
    box-shadow: var(--gw-shadow);
}

.gw-messages i {
    color: var(--gw-primary);
    font-size: 1rem;
}

.gw-messages__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: var(--gw-radius-pill);
    background: var(--gw-primary);
    color: #fff;
    font-size: 0.65rem;
}

/* ===============================================================
   4. Composants réutilisables
   =============================================================== */
.gw-panel {
    background: var(--gw-surface);
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-lg);
    box-shadow: var(--gw-shadow-soft);
    backdrop-filter: blur(10px);
}

.btn-gw {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--gw-primary);
    --bs-btn-border-color: var(--gw-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--gw-primary-dark);
    --bs-btn-hover-border-color: var(--gw-primary-dark);
    --bs-btn-focus-shadow-rgb: var(--gw-primary-rgb);
    --bs-btn-active-bg: var(--gw-primary-dark);
    --bs-btn-active-border-color: var(--gw-primary-dark);
    --bs-btn-border-radius: var(--gw-radius-md);

    padding: 0.65rem 1.5rem;
    font-weight: 600;
    box-shadow: var(--gw-shadow-soft);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-gw:hover {
    transform: translateY(-1px);
    box-shadow: var(--gw-shadow);
}

.gw-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border: 1px solid rgba(var(--gw-primary-rgb), 0.35);
    border-radius: var(--gw-radius-pill);
    background: rgba(var(--gw-primary-rgb), 0.1);
    color: var(--gw-primary-dark);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.gw-tag--plateforme {
    border-color: rgba(var(--gw-secondary-rgb), 0.35);
    background: rgba(var(--gw-secondary-rgb), 0.1);
    color: #5b21b6;
}

a.gw-tag:hover {
    background: rgba(var(--gw-primary-rgb), 0.2);
}

a.gw-tag--plateforme:hover {
    background: rgba(var(--gw-secondary-rgb), 0.2);
}

/* Catalogue de jeux */
.gw-page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.gw-eyebrow {
    color: var(--gw-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.gw-result-count {
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-pill);
    background: var(--gw-surface);
    color: var(--gw-muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.gw-search-box {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem;
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-lg);
    background: var(--gw-surface);
    box-shadow: var(--gw-shadow-soft);
    backdrop-filter: blur(18px);
}

.gw-search-box:has(.gw-autocomplete:not(.d-none)) {
    z-index: 1100;
}

.gw-search-box .gw-autocomplete {
    grid-column: 1 / -1;
}

form.is-open.position-relative {
    z-index: 1100;
}

.gw-search-box > .bi {
    margin-left: 0.5rem;
    color: var(--gw-muted);
    font-size: 1.25rem;
}

.gw-search-box .form-control {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.gw-filter-panel {
    position: sticky;
    top: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-lg);
    background: var(--gw-surface);
    box-shadow: var(--gw-shadow-soft);
    backdrop-filter: blur(18px);
}

.gw-filter-panel .form-label {
    font-size: 0.85rem;
    font-weight: 700;
}

.gw-game-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-md);
    background: var(--gw-surface-solid);
    box-shadow: var(--gw-shadow-soft);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.gw-game-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--gw-shadow);
}

.gw-game-card__visual {
    display: flex;
    min-height: 145px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    background:
        radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.3), transparent 28%),
        linear-gradient(135deg, var(--gw-primary-dark), var(--gw-secondary));
}

.gw-game-card__visual > .bi {
    font-size: 2.5rem;
}

.gw-game-card__visual > span:not(.gw-note-badge) {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gw-game-card__body {
    padding: 1rem;
}

.gw-game-card__title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.gw-game-card__title a {
    color: var(--gw-text);
    text-decoration: none;
}

.gw-game-card__developer,
.gw-game-card__author,
.gw-game-card__description {
    color: var(--gw-muted);
    font-size: 0.8rem;
}

.gw-game-card__developer,
.gw-game-card__author {
    margin: 0.3rem 0 0.65rem;
}

.gw-game-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0.75rem 0 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.gw-game-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.65rem;
}

/* Fiche jeu */
.gw-game-hero {
    position: relative;
    display: flex;
    min-height: 390px;
    overflow: hidden;
    align-items: end;
    padding: clamp(1.5rem, 4vw, 3.5rem);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--gw-radius-lg);
    color: #fff;
    background:
        linear-gradient(90deg, rgba(4, 24, 43, 0.98) 0%, rgba(6, 67, 70, 0.9) 52%, rgba(47, 125, 246, 0.72) 100%),
        radial-gradient(circle at 75% 30%, rgba(129, 230, 217, 0.75), transparent 34%);
    box-shadow: var(--gw-shadow);
}

.gw-game-hero::after {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    content: '';
    mask-image: linear-gradient(90deg, transparent, #000);
}

.gw-game-hero__content {
    position: relative;
    z-index: 2;
    max-width: min(680px, calc(100% - min(320px, 42%) - 1.5rem));
}

.gw-game-hero__video-controls {
    position: absolute;
    top: clamp(1rem, 2.5vw, 2rem);
    right: clamp(1rem, 2.5vw, 2rem);
    z-index: 3;
    border-color: var(--gw-border);
    background: var(--gw-surface-solid);
    box-shadow: var(--gw-shadow-soft);
}

.gw-game-hero h1 {
    margin: 0.75rem 0;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.gw-game-hero__category,
.gw-game-hero__tag {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--gw-radius-pill);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.gw-game-hero__category {
    padding: 0.35rem 0.75rem;
    text-transform: uppercase;
}

.gw-game-hero__tag {
    padding: 0.3rem 0.65rem;
}

.gw-game-hero__category:hover,
.gw-game-hero__tag:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
}

.gw-game-hero__lead {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
}

.gw-game-hero__icon {
    position: absolute;
    z-index: 1;
    right: 7%;
    top: 12%;
    color: rgba(255, 255, 255, 0.12);
    font-size: clamp(7rem, 16vw, 14rem);
}

.gw-game-cover-wrap {
    display: flex;
    justify-content: center;
}

.gw-game-cover-wrap--hero {
    position: absolute;
    z-index: 1;
    right: clamp(1rem, 2.5vw, 2rem);
    bottom: clamp(1rem, 2.5vw, 2rem);
    display: block;
    max-width: min(320px, 42%);
}

.gw-game-cover-wrap--hero .gw-game-cover {
    max-width: 100%;
    padding: 0.65rem;
    border-color: rgba(255, 255, 255, 0.42);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(4, 24, 43, 0.78));
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.gw-game-cover-wrap--hero .gw-game-cover__img {
    max-width: 100%;
    max-height: clamp(240px, 38vh, 440px);
    object-fit: contain;
    object-position: bottom right;
}

@media (min-width: 992px) {
    .gw-game-hero:has(.gw-game-cover-wrap--hero) .gw-game-hero__content {
        max-width: min(680px, calc(100% - min(320px, 42%) - 1.5rem));
    }
}

.gw-game-cover {
    display: inline-block;
    width: fit-content;
    max-width: min(480px, 100%);
    padding: 0.65rem;
    border: 3px solid rgba(var(--gw-primary-rgb), 0.35);
    border-radius: var(--gw-radius-md);
    background: linear-gradient(145deg, rgba(var(--gw-primary-rgb), 0.08), rgba(255, 255, 255, 0.04));
    box-shadow: var(--gw-shadow-soft);
    line-height: 0;
}

.gw-game-cover__img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(440px, 100%);
    max-height: clamp(260px, 42vh, 480px);
    border-radius: calc(var(--gw-radius-md) - 0.45rem);
}

@media (max-width: 991.98px) {
    .gw-game-cover__img {
        max-height: clamp(240px, 68vw, 380px);
    }
}

/* Variante page d'accueil : accent de marque + chiffres en direct. */
.gw-game-hero--home {
    background:
        radial-gradient(circle at 78% 22%, rgba(var(--gw-secondary-rgb), 0.6), transparent 40%),
        linear-gradient(120deg, rgba(4, 24, 43, 0.98) 0%, rgba(23, 44, 92, 0.92) 45%, rgba(var(--gw-primary-rgb), 0.8) 100%);
}
.gw-game-hero--home .gw-game-hero__content {
    max-width: calc(100% - clamp(5rem, 12vw, 10rem));
}
.gw-game-hero__quick-links {
    flex-wrap: nowrap;
}
.gw-game-hero__quick-links .gw-game-hero__tag {
    white-space: nowrap;
}
.gw-game-hero--home .gw-game-hero__icon {
    animation: gw-hero-flottement 7s ease-in-out infinite alternate;
}
@keyframes gw-hero-flottement {
    from { transform: translateY(0); }
    to { transform: translateY(-12px); }
}
.gw-game-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1.25rem, 4vw, 2.75rem);
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}
.gw-game-hero__stats li { display: flex; flex-direction: column; line-height: 1.1; }
.gw-game-hero__stats strong { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.gw-game-hero__stats span { color: rgba(255, 255, 255, 0.75); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
@media (prefers-reduced-motion: reduce) {
    .gw-game-hero--home .gw-game-hero__icon { animation: none; }
}
:root[data-reduced-motion="true"] .gw-game-hero--home .gw-game-hero__icon { animation: none; }

@media (max-width: 767.98px) {
    .gw-game-hero--home .gw-game-hero__content { max-width: 100%; }
    .gw-game-hero__quick-links {
        margin-right: calc(-1 * clamp(.5rem, 2vw, 1rem));
        padding-right: clamp(.5rem, 2vw, 1rem);
        overflow-x: auto;
        scrollbar-width: thin;
    }
}


/* Badge catégorie sur tuiles actualités. */
.gw-categorie-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--gw-radius-pill);
    background: rgba(7, 16, 31, 0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.gw-categorie-badge i { font-size: 0.78rem; }

.gw-categorie-badge--glitchs i { color: #ffe566; }
.gw-categorie-badge--news i { color: #7dd3fc; }
.gw-categorie-badge--mods i { color: #c4b5fd; }
.gw-categorie-badge--tutoriels i { color: #86efac; }

/* Placeholders tuiles actualités sans vignette. */
.gw-similar-card__visual--news:not(:has(img)) { background: linear-gradient(180deg, #5ec8f2 0%, #00A2E8 100%); }
.gw-similar-card__visual--glitchs:not(:has(img)) { background: linear-gradient(180deg, #ffe566 0%, #f5c400 100%); }
.gw-similar-card__visual--mods:not(:has(img)) { background: linear-gradient(180deg, #c4b5fd 0%, #8b5cf6 100%); }
.gw-similar-card__visual--tutoriels:not(:has(img)) { background: linear-gradient(180deg, #86efac 0%, #22c55e 100%); }

.gw-similar-card__visual--news:not(:has(img)) .bi { color: rgba(255, 255, 255, 0.95); }
.gw-similar-card__visual--glitchs:not(:has(img)) .bi { color: #5a4800; }
.gw-similar-card__visual--mods:not(:has(img)) .bi { color: #2e1065; }
.gw-similar-card__visual--tutoriels:not(:has(img)) .bi { color: #14532d; }

/* Écrans 3DS sur l'accueil : neutres hors thème 3DS. */
.gw-3ds-screen { display: contents; }
.gw-3ds-charniere { display: none; }

/* --- Activité communauté (home) -------------------------------- */
.gw-activity__item {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--gw-border);
}
.gw-activity__item:last-child { border-bottom: 0; }
.gw-activity__avatar {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(var(--gw-primary-rgb), 0.14);
    color: var(--gw-primary);
    font-weight: 700;
}
.gw-activity__avatar img { width: 100%; height: 100%; object-fit: cover; }
.gw-activity__body p { margin: 0; }
.gw-activity__extrait { color: var(--gw-muted); font-size: 0.9rem; }
.gw-activity__type {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.45rem;
    border-radius: var(--gw-radius-pill);
    background: rgba(var(--gw-primary-rgb), 0.12);
    color: var(--gw-primary);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
}
.gw-members__item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--gw-border);
    color: inherit;
    text-decoration: none;
}
.gw-members__item:last-child { border-bottom: 0; }
.gw-members__item:hover { color: inherit; }
.gw-members__item:hover strong { color: var(--gw-primary); }
.gw-members__meta { display: flex; min-width: 0; flex-direction: column; }
.gw-members__meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Navigation Jeu précédent / suivant (héritage legacy) ------- */
.gw-jeu-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
}
.gw-jeu-nav__link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    overflow: hidden;
    padding: 0.75rem;
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-md);
    background: var(--gw-surface-solid);
    box-shadow: var(--gw-shadow-soft);
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.gw-jeu-nav__link:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--gw-primary) 45%, transparent);
    box-shadow: var(--gw-shadow);
    color: inherit;
}
.gw-jeu-nav__link--next {
    text-align: right;
    justify-content: flex-end;
}
.gw-jeu-nav__visual {
    display: grid;
    flex: 0 0 4.5rem;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    overflow: hidden;
    border-radius: var(--gw-radius-sm);
    color: #fff;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--gw-primary-dark), var(--gw-secondary));
}
.gw-jeu-nav__visual img { width: 100%; height: 100%; object-fit: cover; }
.gw-jeu-nav__texte {
    display: flex;
    min-width: 0;
    flex: 1 1 0;
    flex-direction: column;
    gap: 0.15rem;
    overflow: hidden;
}
.gw-jeu-nav__sens { color: var(--gw-muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.gw-jeu-nav__titre {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

@media (max-width: 575.98px) {
    .gw-jeu-nav { grid-template-columns: 1fr; }
    .gw-jeu-nav__titre {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

.gw-comment {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-md);
    background: rgba(255, 255, 255, 0.62);
}

.gw-comment-replies {
    margin-top: .9rem;
    padding-left: 1rem;
    border-left: 2px solid color-mix(in srgb, var(--gw-primary) 35%, transparent);
}

.gw-comment--reply {
    padding: .75rem;
    background: color-mix(in srgb, var(--gw-surface) 88%, var(--gw-primary) 12%);
}

.gw-comment--reply .gw-comment__avatar {
    width: 2.25rem;
    height: 2.25rem;
    font-size: .9rem;
}

.gw-reply-form summary {
    list-style: none;
    cursor: pointer;
}

.gw-reply-form summary::-webkit-details-marker {
    display: none;
}

.gw-comment__avatar {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    border: 2px solid rgba(var(--gw-primary-rgb), 0.25);
    border-radius: 50%;
    overflow: hidden;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gw-primary), var(--gw-secondary));
}
.gw-comment__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gw-member-avatar-link { display: grid; width: 100%; height: 100%; place-items: center; border-radius: inherit; color: inherit; text-decoration: none; }
.gw-member-avatar-link:hover { color: inherit; filter: brightness(1.08); }
.gw-member-avatar-link:focus-visible { outline: 3px solid var(--gw-primary); outline-offset: 2px; }
.gw-member-name-link { color: inherit; text-decoration: none; }
.gw-member-name-link:hover,
.gw-member-name-link:focus-visible { color: var(--gw-primary); text-decoration: underline; text-underline-offset: .18em; }

.gw-author-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gw-border);
}

.gw-author-card__media {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 5.5rem;
    height: 5.5rem;
    overflow: hidden;
    border: 1px solid var(--gw-border);
    border-radius: 0.75rem;
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, var(--gw-primary), var(--gw-secondary));
    box-shadow: var(--gw-shadow-soft);
}

.gw-author-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gw-author-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.gw-author-card__label {
    color: var(--gw-muted);
    font-size: 0.85rem;
}

.gw-author-card__name {
    color: var(--gw-text);
    font-size: 1.15rem;
    font-weight: 700;
    font-style: italic;
    text-decoration: none;
}

a.gw-author-card__name:hover {
    color: var(--gw-primary);
}

.gw-comment__content {
    color: var(--gw-text);
    overflow-wrap: anywhere;
}

.gw-community {
    padding: 1.25rem;
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-lg);
    background: var(--gw-surface);
    box-shadow: var(--gw-shadow-soft);
    backdrop-filter: blur(14px);
}

.gw-community__header,
.gw-community__composer,
.gw-community__post {
    display: flex;
    gap: 1rem;
}

.gw-community__header {
    align-items: center;
    justify-content: space-between;
    padding: .25rem .5rem 1rem;
}

.gw-community__heading-icon,
.gw-community__avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--gw-primary), var(--gw-secondary));
}

.gw-community__heading-icon { width: 3rem; height: 3rem; border-radius: 1rem; font-size: 1.5rem; }
.gw-community__avatar { width: 3rem; height: 3rem; border-radius: 50%; overflow: hidden; font-size: 1.35rem; }
.gw-community__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

.gw-community__tabs {
    gap: .5rem;
    padding: .75rem 0;
    border-top: 1px solid var(--gw-border);
    border-bottom: 1px solid var(--gw-border);
}

.gw-community__tabs .nav-link { border-radius: 999px; }
.gw-community__composer,
.gw-community__post,
.gw-community__side {
    padding: 1rem;
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-md);
    background: var(--gw-surface-solid);
    box-shadow: var(--gw-shadow-soft);
}

.gw-community__post { align-items: flex-start; }
.gw-responsive-picture { display: contents; }
.gw-community__rating { display: flex; align-items: center; gap: .4rem; }
.gw-community__stars { display: inline-flex; gap: .1rem; color: #f5b91f; }
.gw-community__side .list-group-item { background: transparent; }
.min-w-0 { min-width: 0; }
.gw-shop__balance { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.1rem; border: 1px solid var(--gw-border); border-radius: 1rem; background: var(--gw-surface-solid); box-shadow: var(--gw-shadow-soft); }
.gw-shop__balance > i { color: #f5b91f; font-size: 1.8rem; }
.gw-shop__balance strong { font-size: 1.35rem; }
.gw-rewards-group__icon { display: grid; flex: 0 0 46px; width: 46px; height: 46px; place-items: center; border: 1px solid var(--gw-border); border-radius: .85rem; color: var(--gw-primary); background: var(--gw-surface-solid); box-shadow: var(--gw-shadow-soft); font-size: 1.35rem; }
.gw-shop-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.gw-shop-card:hover { transform: translateY(-4px); box-shadow: var(--gw-shadow); }
.gw-shop-card__visual { display: grid; flex-shrink: 0; min-height: 150px; place-items: center; background-image: radial-gradient(circle at 35% 25%, rgba(255,255,255,.4), transparent 35%); }
.gw-shop-card__visual i { font-size: 4.5rem; filter: drop-shadow(0 .35rem .5rem rgba(0,0,0,.2)); }
.gw-shop-card { --reward-color: #58c8e8; --reward-color-dark: #31a9cd; --reward-color-soft: #e2f6fb; --reward-text: #11647d; }
.gw-reward-tier--commun { --reward-color: #58c8e8; --reward-color-dark: #31a9cd; --reward-color-soft: #e2f6fb; --reward-text: #11647d; }
.gw-reward-tier--rare { --reward-color: #62d48a; --reward-color-dark: #3ebc6a; --reward-color-soft: #e3f7ea; --reward-text: #236e3c; }
.gw-reward-tier--epique { --reward-color: #f3d458; --reward-color-dark: #dfb92e; --reward-color-soft: #fbf4d4; --reward-text: #745d0c; }
.gw-reward-tier--mythique { --reward-color: #fa9a4b; --reward-color-dark: #e77d2d; --reward-color-soft: #fce9d9; --reward-text: #82400f; }
.gw-reward-tier--legendaire { --reward-color: #e95461; --reward-color-dark: #d63848; --reward-color-soft: #f9e1e4; --reward-text: #8d2430; }
.gw-shop-card__visual { color: #fff; background: var(--reward-color); }
.gw-shop-card__visual i { filter: drop-shadow(0 .3rem .35rem rgba(35, 45, 70, .22)); }
.gw-shop-card__visual[class*="gw-shop-card__visual--effet-"] { position: relative; isolation: isolate; overflow: hidden; }
.gw-shop-card__visual[class*="gw-shop-card__visual--effet-"] i { position: relative; z-index: 3; }
.gw-shop-card__visual[class*="gw-shop-card__visual--effet-"]::before,
.gw-shop-card__visual[class*="gw-shop-card__visual--effet-"]::after { position: absolute; inset: 0; content: ""; pointer-events: none; }
.gw-shop-card__visual--effet-aura-neon { background: radial-gradient(circle, #4338ca 0%, #16234a 58%, #081227 100%); box-shadow: inset 0 0 28px #22d3ee, inset 0 0 55px rgba(168, 85, 247, .7); }
.gw-shop-card__visual--effet-aura-neon::after { inset: 18% 25%; border: 3px solid #67e8f9; border-radius: 50%; box-shadow: 0 0 12px #67e8f9, 0 0 32px #a855f7, inset 0 0 18px #22d3ee; animation: gw-reward-neon 2.2s ease-in-out infinite; }
.gw-shop-card__visual--effet-scanlines-retro { background: linear-gradient(135deg, #405468, #17212b); }
.gw-shop-card__visual--effet-scanlines-retro::before { z-index: 2; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .42) 0 2px, rgba(129, 230, 217, .08) 2px 5px); }
.gw-shop-card__visual--effet-scanlines-retro::after { width: 100%; height: 22%; background: linear-gradient(transparent, rgba(132, 255, 224, .28), transparent); animation: gw-reward-scan 2.4s linear infinite; }
.gw-shop-card__visual--effet-hologramme { background: linear-gradient(135deg, #075985, #6d28d9 52%, #be185d); }
.gw-shop-card__visual--effet-hologramme::after { inset: -35%; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .78) 48%, rgba(103, 232, 249, .55) 53%, transparent 66%); transform: translateX(-45%); animation: gw-reward-hologram 3s ease-in-out infinite; }
.gw-shop-card__visual--effet-distorsion-glitch { background: linear-gradient(135deg, #111827, #312e81); }
.gw-shop-card__visual--effet-distorsion-glitch::before { z-index: 2; opacity: .75; background: repeating-linear-gradient(0deg, transparent 0 17px, #22d3ee 18px 20px, transparent 21px 36px, #fb7185 37px 39px); animation: gw-reward-glitch 2.2s steps(1, end) infinite; }
.gw-shop-card__visual--effet-distorsion-glitch i { text-shadow: -7px 0 #22d3ee, 7px 0 #fb7185; }
.gw-shop-card__badge-preview { padding: .8rem 1.15rem; font-size: 1.05rem; box-shadow: 0 .45rem 1rem rgba(20, 30, 55, .2); }
.gw-shop-card__badge-preview i { font-size: 1.15em; filter: none; }
.gw-shop-card__identity-preview { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .65rem; padding: 1rem; color: var(--gw-text); border-radius: .85rem; background: var(--gw-surface-solid); box-shadow: 0 .45rem 1rem rgba(20, 30, 55, .18); }
.gw-shop-card__identity-preview strong { font-size: 1.15rem; }
.gw-shop-card__identity-preview .badge { font-size: .9rem; }
.gw-shop-card__identity-preview i { font-size: inherit; filter: none; }
.gw-shop-card__frame-preview { display: grid; width: 100%; min-height: 150px; place-items: center; }
.gw-shop-card__frame-preview .gw-profile__avatar { width: 104px; height: 104px; margin: 0; font-size: 2.35rem; }
.gw-shop-card__showcase-preview { width: calc(100% - 1.5rem); margin-top: .35rem; color: var(--gw-text); text-align: left; }
.gw-shop-card__showcase-preview .gw-profile-showcase__label { top: -10px; padding: .24rem .6rem; font-size: .62rem; }
.gw-shop-card__showcase-preview .gw-profile-showcase__label i { font-size: .7rem; filter: none; }
.gw-shop-card__showcase-preview .gw-profile-showcase__card { grid-template-columns: 58px minmax(0, 1fr) auto; min-height: 88px; gap: .65rem; padding: .7rem; }
.gw-shop-card__showcase-preview .gw-profile-showcase__card > img,
.gw-shop-card__showcase-preview .gw-profile-showcase__fallback { width: 58px; height: 58px; border-radius: .55rem; }
.gw-shop-card__showcase-preview .gw-profile-showcase__card strong { overflow: hidden; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.gw-shop-card__showcase-preview .gw-profile-showcase__card em { font-size: .72rem; }
.gw-shop-card__showcase-preview .gw-profile-showcase__card > i { font-size: 1.25rem; filter: none; }
.gw-shop-card__showcase-preview .gw-profile-showcase__fallback i { font-size: 1.55rem; filter: none; }
@keyframes gw-reward-neon { 50% { opacity: .7; transform: scale(1.12); } }
@keyframes gw-reward-scan { from { transform: translateY(-100%); } to { transform: translateY(560%); } }
@keyframes gw-reward-hologram { 50%, 100% { transform: translateX(45%); } }
@keyframes gw-reward-glitch { 0%, 84%, 100% { transform: translate(0); } 86% { transform: translate(7px, -3px); } 89% { transform: translate(-5px, 4px); } 92% { transform: translate(3px, 1px); } }
.gw-shop-card__type { color: var(--reward-text); background: var(--reward-color-soft); }
.gw-shop-card__price { color: var(--reward-text); }
.gw-shop-card:hover { border-color: var(--reward-color); }
[data-bs-theme="dark"] .gw-shop-card__type { color: #fff; background: color-mix(in srgb, var(--reward-color-dark) 68%, #172033); }
[data-bs-theme="dark"] .gw-shop-card__price { color: color-mix(in srgb, var(--reward-color) 82%, #fff); }

.gw-profile--effet-aura-neon .gw-profile__hero {
    border: 2px solid rgba(85, 220, 255, .9) !important;
    box-shadow: 0 0 0 4px rgba(137, 77, 255, .28), 0 0 24px rgba(54, 210, 255, .8), 0 0 52px rgba(143, 74, 255, .58) !important;
    animation: gw-profile-neon-pulse 3.2s ease-in-out infinite;
}
.gw-profile--effet-scanlines-retro .gw-profile__banner,
.gw-profile--effet-hologramme .gw-profile__banner,
.gw-profile--effet-distorsion-glitch .gw-profile__banner { position: relative; isolation: isolate; }
.gw-profile--effet-scanlines-retro .gw-profile__banner::after {
    position: absolute; inset: 0; z-index: 2; content: ""; pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .13) 0 1px, transparent 1px 4px);
}
.gw-profile--effet-hologramme .gw-profile__banner::after {
    position: absolute; inset: 0; z-index: 2; content: ""; pointer-events: none; opacity: .38;
    background: linear-gradient(115deg, transparent 15%, rgba(83, 235, 255, .65) 38%, rgba(255, 104, 235, .55) 52%, transparent 75%);
    background-size: 220% 100%; animation: gw-profile-hologram 7s ease-in-out infinite;
}
.gw-profile--effet-distorsion-glitch .gw-profile__hero {
    animation: gw-profile-glitch-pulse 4s steps(1, end) infinite;
}
@keyframes gw-profile-hologram { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
@keyframes gw-profile-neon-pulse {
    0%, 100% { filter: saturate(1); }
    50% { filter: saturate(1.2) brightness(1.035); }
}
@keyframes gw-profile-glitch-pulse {
    0%, 91%, 100% { box-shadow: var(--gw-shadow); transform: translateX(0); }
    92% { box-shadow: -5px 0 #22d3ee, 5px 0 #f43f5e; transform: translateX(1px); }
    94% { box-shadow: 4px 0 #22d3ee, -4px 0 #f43f5e; transform: translateX(-1px); }
    96% { box-shadow: var(--gw-shadow); transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .gw-shop-card__visual[class*="gw-shop-card__visual--effet-"]::before,
    .gw-shop-card__visual[class*="gw-shop-card__visual--effet-"]::after,
    .gw-profile--effet-hologramme .gw-profile__banner::after,
    .gw-profile--effet-distorsion-glitch .gw-profile__hero,
    .gw-profile--effet-aura-neon .gw-profile__hero { animation: none; }
}
.gw-game-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .85rem; }
.gw-game-gallery-grid img { display: block; width: 100%; height: clamp(140px, 18vw, 220px); border: 1px solid var(--gw-border); border-radius: .85rem; object-fit: cover; }

/* Fiche jeu — disposition console */
.gw-game-dashboard { --gw-console-radius: 1.35rem; }
.gw-game-hero--console {
    min-height: clamp(340px, 39vw, 520px);
    align-items: center;
    padding: clamp(1.5rem, 4vw, 3.25rem);
    border: 3px solid rgba(255, 255, 255, .82);
    border-radius: var(--gw-console-radius);
    box-shadow: 0 1rem 2.5rem rgba(25, 55, 86, .22), 0 0 0 1px rgba(47, 125, 246, .3);
}
.gw-game-hero--console::after { background-size: 38px 38px; opacity: .55; }
.gw-game-hero--console .gw-game-hero__content { max-width: min(520px, 58%); }
.gw-game-hero--console h1 { font-size: clamp(2.3rem, 4.5vw, 4.3rem); text-shadow: 0 .2rem .8rem rgba(0, 0, 0, .35); }
.gw-game-console-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
    padding-inline: .25rem;
}
.gw-game-console-gallery a { display: block; min-width: 0; }
.gw-game-console-gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 8.3;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, .9);
    border-radius: .9rem;
    box-shadow: 0 .4rem 1rem rgba(30, 61, 91, .18);
}
.gw-game-console-actions { display: grid; grid-template-columns: 1.25fr 1fr 1.45fr .8fr; gap: .75rem; }
.gw-game-console-actions form { display: contents; }
.gw-game-console-actions .btn {
    display: flex;
    min-height: 3.65rem;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    border-color: rgba(139, 164, 190, .35);
    border-radius: 999px;
    color: var(--gw-primary);
    font-size: .92rem;
    font-weight: 800;
    box-shadow: 0 .45rem 1.1rem rgba(34, 67, 99, .14), inset 0 1px 0 #fff;
}
.gw-game-console-actions .btn-primary { color: #fff; box-shadow: 0 .55rem 1.25rem rgba(var(--gw-primary-rgb), .35), inset 0 1px 0 rgba(255, 255, 255, .45); }
.gw-game-console-actions .bi { font-size: 1.35rem; }
.gw-console-panel {
    border: 1px solid rgba(144, 168, 193, .3);
    border-radius: var(--gw-console-radius);
    background: linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(241, 246, 251, .78));
    box-shadow: 0 .7rem 1.7rem rgba(38, 67, 94, .13), inset 0 1px 0 rgba(255, 255, 255, .95);
    backdrop-filter: blur(18px);
}
.gw-game-dashboard .gw-quick-info { padding: 1.25rem; }
.gw-game-dashboard .gw-quick-info__item { padding-block: .72rem; }
.gw-game-dashboard .gw-quick-info__item > i { color: #3aa7e8; font-size: 1.45rem; }
.gw-game-community { padding: 1.25rem; text-align: center; }
.gw-game-community h2 { text-align: left; text-transform: uppercase; }
.gw-game-community__score { display: flex; align-items: baseline; justify-content: center; gap: .3rem; color: var(--gw-primary); }
.gw-game-community__score .bi { margin-right: .45rem; font-size: 2.1rem; }
.gw-game-community__score strong { font-size: clamp(2.3rem, 4vw, 3.4rem); line-height: 1; }
.gw-game-community__score span { color: var(--bs-secondary-color); font-size: 1.15rem; }
.gw-game-community__stars { margin: .65rem 0 .45rem; color: #ffad17; font-size: 1.25rem; letter-spacing: .14rem; }
.gw-game-overview .gw-console-panel { min-height: 190px; }
.gw-overview-tags { display: flex; flex-wrap: wrap; gap: .55rem; }
.gw-overview-tags a { padding: .38rem .7rem; border-radius: 999px; color: #226c78; font-size: .8rem; text-decoration: none; background: #c9f2f1; }
.gw-overview-similar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; }
.gw-overview-similar a { min-width: 0; color: var(--gw-text); text-align: center; text-decoration: none; }
.gw-overview-similar img, .gw-overview-similar a > span { display: grid; width: 100%; aspect-ratio: 3 / 4; place-items: center; border-radius: .55rem; object-fit: cover; background: rgba(var(--gw-primary-rgb), .1); }
.gw-overview-similar small { display: -webkit-box; overflow: hidden; margin-top: .35rem; line-height: 1.15; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
[data-bs-theme="dark"] .gw-console-panel { background: linear-gradient(145deg, rgba(20, 34, 54, .94), rgba(10, 25, 44, .88)); }

@media (max-width: 1199.98px) {
    .gw-game-hero--console { min-height: 460px; }
    .gw-game-dashboard aside { grid-template-columns: 2fr 1fr; }
}
@media (max-width: 767.98px) {
    .gw-game-hero--console { min-height: 400px; align-items: end; background-position: 65% center !important; }
    .gw-game-hero--console .gw-game-hero__content { max-width: 100%; }
    .gw-game-console-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gw-game-console-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gw-game-dashboard aside { grid-template-columns: 1fr; }
}
@media (max-width: 479.98px) {
    .gw-game-console-actions .btn { min-height: 3.25rem; padding-inline: .5rem; font-size: .78rem; }
    .gw-game-console-actions .bi { font-size: 1rem; }
    .gw-game-hero--console h1 { font-size: 2.25rem; }
}
.gw-lg-item { cursor: zoom-in; }
.gw-lg-item img { cursor: zoom-in; }
.lg-backdrop.in { opacity: .85 !important; }
.lg-outer .lg-inner { background-color: transparent; }
.lg-outer .lg-toolbar { background-color: transparent; height: 0; }
.lg-outer .lg-toolbar .lg-icon { color: #fff; }
.lg-outer .lg-img-wrap { padding: 12px; }
.gw-gallery-admin-image { position: relative; display: block; overflow: hidden; border: 1px solid var(--gw-border); border-radius: .8rem; cursor: pointer; }
.gw-gallery-admin-image img { display: block; width: 100%; height: 110px; object-fit: cover; }
.gw-gallery-admin-image span { display: block; padding: .4rem .55rem; font-size: .8rem; }

[data-bs-theme="dark"] .gw-community {
    background: rgba(8, 20, 38, 0.72);
    border-color: rgba(var(--gw-primary-rgb), 0.2);
}

[data-bs-theme="dark"] .gw-community__composer,
[data-bs-theme="dark"] .gw-community__post,
[data-bs-theme="dark"] .gw-community__side {
    background: rgba(17, 29, 49, 0.94);
    border-color: rgba(148, 180, 225, 0.16);
}

[data-bs-theme="dark"] .gw-community__tabs .nav-link:not(.active) { color: #b8c8df; }
[data-bs-theme="dark"] .gw-community__tabs .nav-link:not(.active):hover { color: #fff; background: rgba(var(--gw-primary-rgb), 0.12); }
[data-bs-theme="dark"] .gw-community__side .list-group-item { color: var(--gw-text); border-color: var(--gw-border); }
[data-bs-theme="dark"] .gw-community__side .list-group-item:hover { background: rgba(var(--gw-primary-rgb), 0.1); }
[data-bs-theme="dark"] .gw-community .form-control { color: var(--gw-text); background-color: #0b1729; border-color: rgba(148, 180, 225, 0.25); }

.gw-messenger {
    display: grid;
    grid-template-columns: minmax(230px, 28%) minmax(0, 1fr) minmax(210px, 23%);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid var(--gw-border);
    border-radius: var(--gw-radius-lg);
    background: var(--gw-surface-solid);
    box-shadow: var(--gw-shadow);
}

.gw-messenger__list,
.gw-messenger__profile { border-right: 1px solid var(--gw-border); }
.gw-messenger__profile { border-right: 0; border-left: 1px solid var(--gw-border); }
.gw-messenger__contact { display: flex; gap: .75rem; align-items: center; padding: .85rem 1rem; border-bottom: 1px solid var(--gw-border); color: var(--gw-text); text-decoration: none; }
.gw-messenger__contact:hover,
.gw-messenger__contact.active { background: rgba(var(--gw-primary-rgb), .1); }
.gw-messenger__chat { display: flex; min-width: 0; flex-direction: column; }
.gw-messenger__messages { display: flex; flex: 1; flex-direction: column; gap: .75rem; overflow-y: auto; padding: 1.25rem; }
.gw-message { align-self: flex-start; max-width: 75%; padding: .65rem .9rem; border-radius: 1rem 1rem 1rem .25rem; background: #e9edf3; }
.gw-message--mine { align-self: flex-end; border-radius: 1rem 1rem .25rem 1rem; color: #fff; background: linear-gradient(135deg, var(--gw-primary), var(--gw-primary-dark)); }
.gw-message p { margin: 0; }
.gw-message time { display: block; margin-top: .25rem; font-size: .7rem; opacity: .75; text-align: right; }

@media (max-width: 1199.98px) { .gw-messenger { grid-template-columns: minmax(220px, 32%) minmax(0, 1fr); } }
@media (max-width: 767.98px) { .gw-messenger { grid-template-columns: 1fr; } .gw-messenger__list { max-height: 260px; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--gw-border); } }

@media (max-width: 768px) {
    .gw-page-heading {
        align-items: start;
        flex-direction: column;
    }

    .gw-filter-panel {
        position: static;
    }

    .gw-search-box {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .gw-search-box .btn {
        grid-column: 1 / -1;
    }
}

body.gw-has-video-background .gw-app {
    position: relative;
    z-index: 1;
}

body.gw-has-video-background .player {
    pointer-events: none;
}

body.gw-has-video-background .inlinePlayButton,
body.gw-has-video-background .inlinePlayButtonMobile,
.mbYTP_wrapper .inlinePlayButton,
.mbYTP_wrapper .inlinePlayButtonMobile,
.YTPFullscreen .inlinePlayButton,
.YTPFullscreen .inlinePlayButtonMobile,
#bgndVideo .inlinePlayButton,
#bgndVideo .inlinePlayButtonMobile,
.mb_YTPlayer:hover .inlinePlayButton,
.mb_YTPlayer:hover .inlinePlayButtonMobile {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

body.gw-video-fullscreen .gw-ytplayer-controls--fullscreen {
    position: fixed;
    top: clamp(1rem, 2.5vw, 2rem);
    right: clamp(1rem, 2.5vw, 2rem);
    z-index: 10001;
    pointer-events: auto;
}

body.gw-video-fullscreen .mb_YTPBar,
body.gw-video-fullscreen .inlinePlayButton,
body.gw-video-fullscreen .inlinePlayButtonMobile {
    display: none !important;
}

.gw-ytplayer-controls {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    padding: .18rem;
    border: 1px solid var(--gw-border);
    border-radius: 999px;
    background: var(--gw-surface);
    backdrop-filter: blur(8px);
    pointer-events: auto;
}

.gw-ytplayer-controls__btn {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--gw-primary);
    font-size: .92rem;
    background: transparent;
    transition: color .15s ease, background-color .15s ease;
}

.gw-ytplayer-controls__btn:hover,
.gw-ytplayer-controls__btn:focus-visible {
    color: var(--gw-primary-dark);
    background: rgba(var(--gw-primary-rgb), .12);
}

.gw-ytplayer-controls__btn:disabled {
    opacity: .55;
    cursor: wait;
}

.gw-page-over-video {
    position: relative;
    z-index: 1;
}

/*
 * On rend les panneaux légèrement moins opaques
 * uniquement lorsqu'une vidéo est derrière.
 */
.gw-page-over-video .gw-panel,
.gw-page-over-video .gw-quick-info {
    backdrop-filter: blur(10px);
}

@media (prefers-reduced-motion: reduce) {
    #bgndVideo.player {
        display: none;
    }
}

/* ===============================================================
   5. Responsive
   Le rail devient une barre horizontale scrollable sur mobile.
   =============================================================== */
@media (max-width: 991.98px) {
    .gw-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .gw-search {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }

    .gw-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .gw-rail {
        position: static;
    }

    :root[data-theme="3ds"] .gw-rail {
        position: static;
        width: 100%;
    }

    .gw-rail__toggle {
        display: grid;
        width: 2.75rem;
        height: 2.5rem;
        margin-left: auto;
        padding: 0;
        place-items: center;
        border: 1px solid var(--gw-border);
        border-radius: .35rem;
        color: var(--gw-text);
        background: var(--gw-surface);
        font-size: 1.35rem;
    }

    .gw-rail:not(.is-open) .gw-rail__viewport,
    .gw-rail:not(.is-open) .gw-rail__list {
        display: none !important;
    }

    .gw-rail.is-open .gw-rail__viewport {
        display: contents;
    }

    :root[data-theme="3ds"] .gw-rail__list {
        flex-direction: unset;
        grid-template-columns: repeat(auto-fit, minmax(4.65rem, 4.65rem));
        justify-content: center;
        gap: .65rem;
    }

    :root[data-theme="3ds"] .gw-rail__item {
        flex: unset;
        min-width: 0;
    }

    .gw-rail__list {
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .gw-rail__list::-webkit-scrollbar {
        display: none;
    }

    .gw-rail__item {
        flex: 0 0 84px;
    }

    .gw-bottombar {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 0.75rem;
    }

    .gw-bottombar__side--end {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .gw-logo__tagline,
    .gw-storage span {
        display: none;
    }
    .gw-level-chip { min-width: 0; padding: .45rem .6rem; }
    .gw-level-chip__level, .gw-level-chip__bar { display: none; }

    :root[data-theme="wii"] .gw-rail,
    :root[data-theme="ps3"] .gw-rail {
        position: fixed;
        z-index: 1040;
        top: auto;
        left: .75rem;
        right: .75rem;
        bottom: .7rem;
        padding: .4rem;
        border-radius: 1.15rem;
    }

    :root[data-theme="wii"] .gw-rail__item,
    :root[data-theme="ps3"] .gw-rail__item {
        flex: 1 1 auto;
        min-width: 0;
        padding: .55rem .3rem;
    }

    :root[data-theme="wii"] .gw-main,
    :root[data-theme="ps3"] .gw-main {
        padding-bottom: 6rem;
    }
}

/* ===============================================================
   6. Accessibilité : mouvement réduit
   =============================================================== */
@media (prefers-reduced-motion: reduce) {
    .gw-icon-btn,
    .gw-rail__item,
    .gw-console-btn,
    .gw-messages,
    .btn-gw {
        transition: none;
    }

    .gw-icon-btn:hover,
    .gw-rail__item:hover,
    .gw-console-btn:hover,
    .gw-messages:hover,
    .btn-gw:hover {
        transform: none;
    }
}
.gw-profile__banner { min-height: 180px; background: linear-gradient(120deg, #1769d2, #54b9ff 55%, #8b5cf6); background-position: center; background-size: cover; }
.gw-profile__banner--editable { position: relative; }
.gw-profile__banner--editable form, .gw-profile__banner-btn { width: 100%; height: 180px; }
.gw-profile__banner-btn { display: block; padding: 0; border: 0; background: transparent; cursor: pointer; }
.gw-profile__banner-btn:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.gw-profile__banner-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .5rem; color: #fff; background: rgba(15, 23, 42, .48); font-weight: 700; opacity: 0; transition: opacity .18s ease; pointer-events: none; }
.gw-profile__banner-overlay i { font-size: 1.35rem; }
.gw-profile__banner-btn:hover .gw-profile__banner-overlay, .gw-profile__banner-btn:focus-visible .gw-profile__banner-overlay { opacity: 1; }
/* L’avatar remonte sur la bannière, qui devient positionnée dès qu’un effet de
   profil est équipé : sans rang d’empilement propre, elle recouvrait le cadre
   et le halo de la photo. */
.gw-profile__identity { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 1.25rem; flex-wrap: wrap; }
.gw-profile__avatar { width: 132px; height: 132px; margin-top: -58px; flex: 0 0 auto; border: 5px solid rgba(255,255,255,.95); border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg,#dceeff,#fff); color: var(--gw-blue); font-size: 3rem; font-weight: 800; box-shadow: 0 8px 24px rgba(31,75,130,.2); }
.gw-profile__avatar img { width: 100%; height: 100%; object-fit: cover; }
.gw-profile__avatar--editable form { width: 100%; height: 100%; }
.gw-profile__avatar-btn { position: relative; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: inherit; color: inherit; font: inherit; cursor: pointer; }
.gw-profile__avatar-btn:focus-visible { outline: 3px solid var(--gw-primary); outline-offset: 3px; }
.gw-profile__avatar-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; background: rgba(15, 23, 42, .58); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1.1; opacity: 0; transition: opacity .18s ease; pointer-events: none; }
.gw-profile__avatar-overlay i { font-size: 1.35rem; }
.gw-profile__avatar-btn:hover .gw-profile__avatar-overlay,
.gw-profile__avatar-btn:focus-visible .gw-profile__avatar-overlay { opacity: 1; }
.gw-profile__bio { max-width: 620px; }
.gw-profile__numbers strong, .gw-profile__numbers span { display: block; }
.gw-profile__numbers strong { font-size: 1.35rem; }
.gw-profile__numbers span { color: var(--bs-secondary-color); font-size: .8rem; }

.gw-profile--cadre-avatar-pixel .gw-profile__avatar {
    border: 6px solid #f8fafc; border-radius: 12px;
    box-shadow: 0 0 0 4px #334155, 5px 0 0 4px #94a3b8, 0 8px 24px rgba(15, 23, 42, .3);
}
.gw-profile--cadre-avatar-pixel .gw-profile__avatar-btn { border-radius: 6px; }
.gw-profile--cadre-avatar-glitch .gw-profile__avatar {
    border-color: #f8fafc;
    box-shadow: -6px 0 0 #22d3ee, 6px 0 0 #f43f5e, 0 8px 25px rgba(15, 23, 42, .32);
}
.gw-profile--cadre-avatar-neon .gw-profile__avatar {
    border-color: #82e9ff;
    box-shadow: 0 0 0 3px #8b5cf6, 0 0 18px #22d3ee, 0 0 34px rgba(139, 92, 246, .85);
}
.gw-profile--cadre-avatar-retro .gw-profile__avatar {
    border: 6px double #f8fafc;
    box-shadow: 0 0 0 4px #274060, 0 0 0 7px #e8b44f, 0 8px 24px rgba(15, 23, 42, .28);
}
.gw-profile--cadre-avatar-dore .gw-profile__avatar {
    border-color: #ffe08a;
    box-shadow: 0 0 0 3px #b7791f, 0 0 0 6px #ffd76a, 0 8px 28px rgba(180, 120, 20, .48);
    background: linear-gradient(145deg, #fff4bf, #fff);
}
.gw-profile-showcase {
    position: relative; padding: 3px; border-radius: 1.15rem;
    background: linear-gradient(115deg, #f6c453, #fff0a8 28%, #58c8ff 58%, #9b6cff);
    box-shadow: 0 12px 32px rgba(33, 74, 128, .22);
}
.gw-profile-showcase__label {
    position: absolute; z-index: 2; top: -12px; left: 1.25rem; padding: .3rem .75rem;
    border: 2px solid #f6c453; border-radius: 999px; color: #2f260a; background: #fff4bd;
    font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.gw-profile-showcase__card {
    display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; align-items: center; gap: 1rem;
    min-height: 108px; padding: 1rem; border-radius: calc(1.15rem - 3px); color: var(--gw-text);
    background: var(--gw-surface-solid); text-decoration: none;
}
.gw-profile-showcase__card > img, .gw-profile-showcase__fallback { width: 82px; height: 76px; border-radius: .75rem; object-fit: cover; }
.gw-profile-showcase__fallback { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--gw-primary), var(--gw-secondary)); font-size: 2rem; }
.gw-profile-showcase__card span { min-width: 0; }
.gw-profile-showcase__card small, .gw-profile-showcase__card strong, .gw-profile-showcase__card em { display: block; }
.gw-profile-showcase__card small { color: var(--gw-primary); font-weight: 700; }
.gw-profile-showcase__card strong { margin: .1rem 0; font-size: 1.15rem; }
.gw-profile-showcase__card em { overflow: hidden; color: var(--bs-secondary-color); font-size: .88rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.gw-profile-showcase__card > i { color: var(--gw-primary); font-size: 1.7rem; transition: transform .18s ease; }
.gw-profile-showcase__card:hover > i { transform: translateX(4px); }
@media (max-width: 575.98px) {
    .gw-profile-showcase__card { grid-template-columns: 64px minmax(0, 1fr); }
    .gw-profile-showcase__card > img, .gw-profile-showcase__fallback { width: 64px; height: 64px; }
    .gw-profile-showcase__card > i { display: none; }
}

.gw-bibliotheque-thumb {
    position: relative;
    display: inline-block;
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
}
.gw-bibliotheque-thumb img,
.gw-bibliotheque-thumb__fallback {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: .75rem;
    object-fit: cover;
}
.gw-bibliotheque-thumb__fallback {
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--gw-primary-dark), var(--gw-secondary));
}
.gw-bibliotheque-thumb .gw-note-badge {
    top: 0.25rem;
    right: 0.25rem;
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
}
@media (max-width: 767.98px) { .gw-profile__banner { min-height: 120px; } .gw-profile__banner--editable form, .gw-profile__banner-btn { height: 120px; } .gw-profile__avatar { width: 96px; height: 96px; margin-top: -38px; } .gw-profile__numbers { width: 100%; justify-content: space-around; } }

.gw-bbcode-toolbar { padding: .65rem; border: 1px solid var(--bs-border-color); border-radius: 1rem; background: color-mix(in srgb, var(--gw-surface) 92%, var(--gw-primary) 8%); }
.gw-bbcode-comment-toolbar {
    width: fit-content;
    padding: .3rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .65rem;
    background: color-mix(in srgb, var(--gw-surface) 95%, var(--gw-primary) 5%);
}
.gw-comment-editor textarea { min-height: 6rem; }
.gw-comment__content .blockquote {
    margin: .5rem 0;
    padding: .5rem .75rem;
    border-left: .2rem solid var(--gw-primary);
    color: var(--bs-secondary-color);
    background: color-mix(in srgb, var(--gw-surface) 94%, var(--gw-primary) 6%);
    font-size: .95em;
}
.gw-bbcode-emoji-wrap { position: relative; }
.gw-bbcode-emoji-menu {
    position: absolute;
    z-index: 1080;
    top: calc(100% + .5rem);
    right: 0;
    padding: .35rem;
    border: 1px solid var(--gw-border);
    border-radius: .85rem;
    background: var(--gw-surface-solid);
    box-shadow: 0 16px 42px rgba(15, 23, 42, .24);
}
.gw-bbcode-emoji-menu[hidden] { display: none; }
.gw-bbcode-emoji-menu emoji-picker {
    display: block;
    width: min(352px, calc(100vw - 2rem));
    height: min(420px, calc(100vh - 4rem));
    --border-size: 0;
}
@media (max-width: 575.98px) {
    .gw-bbcode-emoji-menu {
        position: fixed;
        top: 50%;
        right: auto;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}
.gw-bbcode-preview { min-height: 8rem; padding: 1.25rem; border: 1px solid var(--bs-border-color); border-radius: 1rem; background: var(--gw-surface); overflow: hidden; }
.gw-bbcode-preview::after { display: block; clear: both; content: ''; }
.gw-text-violet { color: var(--gw-secondary) !important; }
.gw-bbcode-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-block: 1rem; }
.gw-bbcode-gallery img { width: 100%; height: 100%; max-height: 320px; object-fit: cover; border-radius: 1rem; }
.gw-bbcode-icon { width: 2rem; height: 2rem; object-fit: contain; margin-right: .4rem; }
.gw-bbcode-section { clear: both; margin-block: 1.5rem; padding: 1.25rem; border: 1px solid var(--bs-border-color); border-radius: 1rem; background: var(--gw-surface); }
.gw-game-sections { display: grid; gap: 1.25rem; }
.gw-game-sections--blocs { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.gw-game-sections--blocs .gw-game-section {
  grid-column: span 4;
  border-color: color-mix(in srgb, var(--bs-border-color) 72%, white 28%);
  border-radius: 1.25rem;
  background: linear-gradient(145deg, color-mix(in srgb, var(--gw-surface) 92%, white 8%), color-mix(in srgb, var(--gw-surface) 96%, var(--gw-primary) 4%));
  box-shadow: 0 .75rem 2rem rgba(24, 52, 79, .1), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.gw-game-sections--blocs .gw-game-section[open] { grid-column: 1 / -1; }
.gw-game-sections--blocs .gw-game-section::before { display: none; }
.gw-game-section__summary {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  min-height: 4.5rem;
  padding: .9rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.gw-game-section__summary::-webkit-details-marker { display: none; }
.gw-game-section__header {
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  gap: .75rem;
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--bs-border-color);
  text-align: left;
  background: color-mix(in srgb, var(--gw-primary) 5%, transparent);
}
.gw-game-section__summary:hover { background: color-mix(in srgb, var(--gw-primary) 6%, transparent); }
.gw-game-section__summary:focus-visible { outline: .2rem solid color-mix(in srgb, var(--gw-primary) 35%, transparent); outline-offset: -.2rem; }
.gw-game-section__icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 2.25rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gw-section-color, var(--gw-primary)) 16%, transparent);
  color: var(--gw-section-color, var(--gw-primary));
  font-size: 1.1rem;
}
.gw-game-section--presentation { --gw-section-color: #2587f5; }
.gw-game-section--avis { --gw-section-color: #e9a008; }
.gw-game-section--histoire { --gw-section-color: #8b5cf6; }
.gw-game-section--fonctionnalites,
.gw-game-section--gameplay { --gw-section-color: #22a864; }
.gw-game-section--pokedex,
.gw-game-section--personnages { --gw-section-color: #089fb7; }
.gw-game-section--region { --gw-section-color: #ef5f55; }
.gw-game-section--starters { --gw-section-color: #e87924; }
.gw-game-section--langues,
.gw-game-section--plateformes { --gw-section-color: #6366df; }
.gw-game-section--date_sortie { --gw-section-color: #2677cf; }
.gw-game-section--captures,
.gw-game-section--trailer { --gw-section-color: #d946a5; }
.gw-game-section--telechargement { --gw-section-color: #16a05d; }
.gw-game-section--credits { --gw-section-color: #65758b; }
.gw-game-section__heading { display: grid; flex: 1; gap: .25rem; min-width: 0; }
.gw-game-section__title { display: flex; min-height: 2.25rem; align-items: center; font-size: .86rem; font-weight: 800; letter-spacing: .025em; line-height: 1.2; text-transform: uppercase; }
.gw-game-section__preview {
  display: -webkit-box;
  overflow: hidden;
  color: var(--bs-secondary-color);
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.35;
  text-transform: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.gw-game-section[open] .gw-game-section__preview { display: none; }
.gw-game-reading-section[open] .gw-game-section__preview { display: none; }
.gw-game-section__toggle { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--gw-primary); transition: transform .2s ease, background-color .2s ease; }
.gw-game-section__summary:hover .gw-game-section__toggle { background: color-mix(in srgb, var(--gw-primary) 12%, transparent); }
.gw-game-section[open] .gw-game-section__toggle { transform: rotate(180deg); }
.gw-game-reading-section[open] .gw-game-section__toggle { transform: rotate(180deg); }
.gw-game-section__body { padding: 1.15rem 1.25rem 1.35rem; border-top: 1px solid var(--bs-border-color); }
.gw-game-section { position: relative; overflow: hidden; }
.gw-game-section::before { content: ''; position: absolute; inset: 0 auto 0 0; width: .25rem; background: var(--gw-primary); }
.gw-game-reading-section { border-bottom: 1px solid var(--gw-border); }
.gw-game-reading-section__summary {
  align-items: center;
  min-height: 4rem;
  border-radius: var(--gw-radius, .75rem);
  background: transparent;
}
.gw-game-reading-section__body { padding: 1.25rem .75rem 1.75rem; }
@media (max-width: 1199.98px) {
  .gw-game-sections--blocs .gw-game-section { grid-column: span 6; }
  .gw-game-sections--blocs .gw-game-section[open] { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
  .gw-game-sections--blocs { grid-template-columns: 1fr; }
  .gw-game-sections--blocs .gw-game-section { grid-column: 1 / -1; }
}
.gw-bbcode-slide { margin-block: 1rem; padding: 1rem; border-left: .25rem solid var(--gw-primary); background: color-mix(in srgb, var(--gw-surface) 90%, var(--gw-primary) 10%); }
.gw-bbcode-float { width: min(45%, 360px); margin-bottom: 1rem; }
.gw-bbcode-float--left { float: left; margin-right: 1rem; }
.gw-bbcode-float--right { float: right; margin-left: 1rem; }
.gw-bbcode-animation { animation: gw-bbcode-apparition .45s ease both; }
.gw-bbcode-animation--fade-left { animation-name: gw-bbcode-gauche; }
.gw-bbcode-animation--fade-right { animation-name: gw-bbcode-droite; }
.gw-bbcode-animation--zoom-in { animation-name: gw-bbcode-zoom; }
@keyframes gw-bbcode-apparition { from { opacity: 0; transform: translateY(1rem); } }
@keyframes gw-bbcode-gauche { from { opacity: 0; transform: translateX(-1rem); } }
@keyframes gw-bbcode-droite { from { opacity: 0; transform: translateX(1rem); } }
@keyframes gw-bbcode-zoom { from { opacity: 0; transform: scale(.96); } }
@media (max-width: 575.98px) { .gw-bbcode-float { float: none; width: 100%; margin-inline: 0; } }

/* Paramètres */
.gw-settings__nav { top: 1rem; }
.gw-settings__nav-link { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-radius: .9rem; color: var(--gw-text); font-weight: 700; text-decoration: none; }
.gw-settings__nav-link:hover { color: var(--gw-primary); background: rgba(var(--gw-primary-rgb), .1); }
.gw-settings__icon { display: grid; width: 3rem; height: 3rem; place-items: center; border-radius: 1rem; color: #fff; font-size: 1.3rem; background: linear-gradient(135deg, var(--gw-primary), var(--gw-secondary)); }
.gw-theme-card { position: relative; height: 100%; padding: .75rem; border: 2px solid var(--gw-border); border-radius: 1.25rem; color: var(--gw-text); background: var(--gw-surface); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.gw-theme-card:hover { transform: translateY(-2px); border-color: rgba(var(--gw-primary-rgb), .55); }
.gw-theme-card.is-active { border-color: var(--gw-primary); box-shadow: 0 0 0 .2rem rgba(var(--gw-primary-rgb), .12); }
.gw-theme-card__preview { position: relative; display: grid; width: 100%; height: 7rem; margin-bottom: .75rem; place-items: center; overflow: hidden; border-radius: .85rem; background-position: center top; background-repeat: no-repeat; background-size: cover; font-size: 2rem; isolation: isolate; }
.gw-theme-card__preview--system { color: #fff; background: linear-gradient(115deg, #edf5ff 0 49%, #12213a 51%); }
.gw-theme-card__preview--light { color: #f6b91c; background: linear-gradient(145deg, #fff, #dcecff); }
.gw-theme-card__preview--dark { color: #b993ff; background: linear-gradient(145deg, #17253d, #080f1c); }
.gw-theme-card__preview--glitchworlds { color: #fff; background: linear-gradient(145deg, #2f7df6, #8b5cf6); }
.gw-theme-card__preview--wii { color: #fff; background: radial-gradient(120% 100% at 0 0, rgba(255,255,255,.35), transparent 55%), linear-gradient(145deg, #5dc9ff, #168de4); }
.gw-theme-card__preview--ps3 { color: #d9ebff; background: radial-gradient(circle at 70% 20%, rgba(72,184,255,.75), transparent 35%), radial-gradient(circle at 20% 80%, rgba(139,108,255,.45), transparent 35%), linear-gradient(145deg, #07192c, #020912); }
.gw-theme-card__preview--legacy { color: #fff; background: linear-gradient(180deg, #294b85, #34305e 52%, #ec8058 78%, #f4bc78); box-shadow: inset 0 0 0 4px #343a40; }
.gw-theme-card__preview--ds { color: #fff; background: linear-gradient(180deg, #f2f4f7 0 46%, #9aa8b8 46% 48%, #dce8f2 48% 100%); box-shadow: inset 0 0 0 3px #9eb8cc, inset 0 0 0 6px #6b7d8d; }
.gw-theme-card__preview--dsi { color: #fff; background: radial-gradient(circle at 50% 22%, rgba(255,255,255,.75), transparent 42%), linear-gradient(180deg, #c8e4f8 0 36%, #252b31 36% 38%, #fff 38% 100%); box-shadow: inset 0 0 0 3px #252b31; }
.gw-theme-card__preview--3ds { color: #142838; background: linear-gradient(180deg, #e6f4fc 0%, #d0ebfa 100%); box-shadow: inset 0 0 0 3px #101014, inset 0 0 0 6px #00a2e8; }
.gw-theme-card__preview em { position: absolute; z-index: 2; top: .5rem; left: .5rem; max-width: calc(100% - 1rem); padding: .2rem .5rem; overflow: hidden; border-radius: 999px; color: currentColor; background: rgba(255,255,255,.25); font-size: .62rem; font-style: normal; font-weight: 800; line-height: 1.25; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.gw-theme-card__preview > i { position: relative; z-index: 1; }
.gw-theme-card strong, .gw-theme-card small { display: block; }
.gw-theme-card small { margin-top: .2rem; color: var(--bs-secondary-color); }
.gw-theme-card__check { position: absolute; top: 1rem; right: 1rem; display: none; width: 1.6rem; height: 1.6rem; place-items: center; border-radius: 50%; color: #fff; background: var(--gw-primary); }
.gw-theme-card.is-active .gw-theme-card__check { display: grid; }
:root[data-theme="wii"] .gw-theme-card.is-active { box-shadow: 0 0 0 .2rem rgba(21, 159, 232, .16), 0 .55rem 1.35rem rgba(70, 120, 155, .2); }
:root[data-theme="ds"] .gw-theme-card.is-active { box-shadow: 0 0 0 .2rem rgba(0, 132, 199, .18), 0 .45rem 1.2rem rgba(43, 49, 55, .14); }
:root[data-theme="dsi"] .gw-theme-card.is-active { box-shadow: 0 0 0 .2rem rgba(61, 174, 233, .2), 0 .5rem 1.35rem rgba(30, 90, 130, .14); }
:root[data-theme="3ds"] .gw-theme-card.is-active { box-shadow: 0 0 0 .2rem rgba(0, 162, 232, .22), 0 .55rem 1.4rem rgba(0, 100, 150, .16); }
:root[data-theme="ps3"] .gw-theme-card.is-active { box-shadow: 0 0 0 .2rem rgba(72, 184, 255, .2), 0 .65rem 1.8rem rgba(5, 10, 18, .45); }
.gw-settings__avatar { display: grid; width: 4.5rem; height: 4.5rem; flex: 0 0 auto; place-items: center; overflow: hidden; border: 3px solid rgba(var(--gw-primary-rgb), .3); border-radius: 50%; color: var(--gw-primary); background: rgba(var(--gw-primary-rgb), .1); font-size: 1.75rem; font-weight: 800; }
.gw-settings__avatar img { width: 100%; height: 100%; object-fit: cover; }
.gw-settings__list .list-group-item { padding: 1rem 0; color: var(--gw-text); background: transparent; border-color: var(--gw-border); }
.scroll-mt { scroll-margin-top: 1rem; }
[data-reduced-motion="true"] *, [data-reduced-motion="true"] *::before, [data-reduced-motion="true"] *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }

/* Bouton flottant « retour en haut » : apparaît après un scroll significatif. */
.gw-retour-haut {
    position: fixed;
    z-index: 40;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1.1rem, env(safe-area-inset-bottom));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid var(--gw-border);
    border-radius: 50%;
    color: var(--gw-primary);
    background: var(--gw-surface-solid);
    box-shadow: var(--gw-shadow);
    font-size: 1.65rem;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.65rem) scale(0.92);
    transition: opacity .22s ease, transform .22s ease, box-shadow .15s ease, color .15s ease;
}

.gw-retour-haut.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.gw-retour-haut:hover {
    color: var(--gw-primary-dark);
    box-shadow: var(--gw-shadow), var(--gw-glow);
    transform: translateY(-2px) scale(1.03);
}

.gw-retour-haut:focus-visible {
    outline: 2px solid var(--gw-primary);
    outline-offset: 3px;
}

/* Laisse de la place à la barre basse hors thème PS3. */
:root:not([data-theme="ps3"]) .gw-retour-haut {
    bottom: max(5.5rem, calc(env(safe-area-inset-bottom) + 4.8rem));
}

:root[data-gw-retour-haut="0"] .gw-retour-haut {
    display: none !important;
}

/* Sur desktop PS3, la colonne d'icônes occupe déjà le bord droit. */
@media (min-width: 768px) {
    :root[data-theme="ps3"] .gw-retour-haut {
        right: calc(var(--gw-ps3-rail-width, 6rem) + 1.25rem);
        bottom: max(1.4rem, env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .gw-retour-haut,
    .gw-retour-haut.is-visible,
    .gw-retour-haut:hover {
        transition: none;
        transform: none;
    }
}

:root[data-reduced-motion="true"] .gw-retour-haut,
:root[data-reduced-motion="true"] .gw-retour-haut.is-visible,
:root[data-reduced-motion="true"] .gw-retour-haut:hover {
    transition: none;
    transform: none;
}

/* ===============================================================
   Popup « succès débloqué », façon overlay de console.
   Entrée, maintien et sortie sont entièrement pilotés en CSS pour
   rester fonctionnels sans JavaScript ; le contrôleur Stimulus
   n'ajoute que le son et le nettoyage du DOM.
   =============================================================== */
.gw-succes-popup {
    position: fixed;
    z-index: 1090;
    /* Aligné à droite sur la gouttière de .gw-app : la colonne de lecture,
       à gauche, reste dégagée pendant l'affichage. */
    right: clamp(.75rem, 2vw, 1.5rem);
    /* Le décalage est mesuré sous la topbar par le contrôleur Stimulus :
       sa hauteur change d'un thème à l'autre. La valeur de repli couvre le
       cas sans JavaScript. */
    top: var(--gw-succes-decalage, 5.5rem);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .55rem;
    width: min(28rem, calc(100vw - 1.5rem));
    pointer-events: none;
}

.gw-succes-popup__carte {
    --gw-succes-couleur: #fbbf24;
    --gw-succes-couleur-rgb: 251, 191, 36;
    /* Teinte vive illisible sur une surface claire : on l'assombrit pour le
       texte. Le thème sombre la reprend telle quelle plus bas. */
    --gw-succes-accent: color-mix(in srgb, var(--gw-succes-couleur) 66%, #0b1220);
    --gw-succes-reflet: rgba(var(--gw-succes-couleur-rgb), .28);
    /* Ni halo ni lueur colorée sur surface claire : les deux débordent sur la
       carte et salissent le blanc. Ils ne sont rallumés qu'en thème sombre. */
    --gw-succes-halo: transparent;
    --gw-succes-lueur-icone: 0 .3rem .7rem rgba(15, 23, 42, .16);
    --gw-succes-rang: 0;
    /* Les cartes s'enchaînent au lieu de se superposer. */
    --gw-succes-tempo: calc(var(--gw-succes-rang) * 1.2s);
    /* Temps de lecture avant le départ de l'animation de sortie. */
    --gw-succes-lecture: 9s;

    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .9rem;
    width: 100%;
    padding: .8rem 1.05rem;
    overflow: hidden;
    border: 1px solid rgba(var(--gw-succes-couleur-rgb), .5);
    border-radius: 1.15rem;
    color: var(--gw-text);
    text-decoration: none;
    background: var(--gw-surface-solid);
    box-shadow: var(--gw-shadow), 0 0 0 .35rem rgba(var(--gw-succes-couleur-rgb), .1);
    pointer-events: auto;
    animation:
        gw-succes-entree .7s cubic-bezier(.16, 1, .3, 1) var(--gw-succes-tempo) both,
        gw-succes-sortie .55s ease-in calc(var(--gw-succes-tempo) + var(--gw-succes-lecture)) forwards;
}

:root[data-bs-theme="dark"] .gw-succes-popup__carte {
    --gw-succes-accent: var(--gw-succes-couleur);
    --gw-succes-reflet: rgba(255, 255, 255, .18);
    --gw-succes-halo: rgba(var(--gw-succes-couleur-rgb), .32);
    --gw-succes-lueur-icone: 0 0 1.4rem rgba(var(--gw-succes-couleur-rgb), .5);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, .07),
        var(--gw-shadow),
        0 0 0 .35rem rgba(var(--gw-succes-couleur-rgb), .12);
}

/* Survol ou focus : la sortie attend que l'utilisateur ait lu. */
.gw-succes-popup__carte:hover,
.gw-succes-popup__carte:focus-visible {
    animation-play-state: paused;
}

.gw-succes-popup__carte--commun { --gw-succes-couleur: #58c8e8; --gw-succes-couleur-rgb: 88, 200, 232; }
.gw-succes-popup__carte--rare { --gw-succes-couleur: #62d48a; --gw-succes-couleur-rgb: 98, 212, 138; }
.gw-succes-popup__carte--epique { --gw-succes-couleur: #f3d458; --gw-succes-couleur-rgb: 243, 212, 88; }
.gw-succes-popup__carte--mythique { --gw-succes-couleur: #fa9a4b; --gw-succes-couleur-rgb: 250, 154, 75; }
.gw-succes-popup__carte--legendaire { --gw-succes-couleur: #e95461; --gw-succes-couleur-rgb: 233, 84, 97; }

.gw-succes-popup__halo {
    position: absolute;
    inset: -50% -10% auto -10%;
    height: 220%;
    background: radial-gradient(58% 58% at 14% 50%, var(--gw-succes-halo), transparent 70%);
    animation: gw-succes-halo 2.6s ease-in-out infinite;
}

.gw-succes-popup__icone {
    position: relative;
    display: grid;
    place-items: center;
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 1rem;
    color: #08101c;
    font-size: 1.5rem;
    background: linear-gradient(150deg, var(--gw-succes-couleur), rgba(var(--gw-succes-couleur-rgb), .62));
    box-shadow: var(--gw-succes-lueur-icone);
    animation: gw-succes-icone .85s cubic-bezier(.2, 1.55, .4, 1) calc(var(--gw-succes-tempo) + .12s) both;
}

/* Anneau lumineux : deux tours au déblocage, puis extinction. */
.gw-succes-popup__icone::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -.34rem;
    border-radius: inherit;
    opacity: 0;
    background: conic-gradient(from 0deg, transparent 0 58%, rgba(var(--gw-succes-couleur-rgb), .95) 80%, transparent 100%);
    animation: gw-succes-anneau 2.5s cubic-bezier(.3, 0, .25, 1) calc(var(--gw-succes-tempo) + .1s) both;
}

.gw-succes-popup__corps {
    display: grid;
    gap: .08rem;
    min-width: 0;
}

.gw-succes-popup__label {
    color: var(--gw-succes-accent);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.gw-succes-popup__nom,
.gw-succes-popup__description {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gw-succes-popup__nom { font-size: 1.02rem; font-weight: 800; line-height: 1.25; }
.gw-succes-popup__description { color: var(--gw-muted); font-size: .78rem; }

.gw-succes-popup__points {
    display: grid;
    justify-items: center;
    padding: .35rem .6rem;
    border: 1px solid rgba(var(--gw-succes-couleur-rgb), .45);
    border-radius: .8rem;
    background: rgba(var(--gw-succes-couleur-rgb), .14);
    line-height: 1;
}

.gw-succes-popup__points strong { color: var(--gw-succes-accent); font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.gw-succes-popup__points small { color: var(--gw-muted); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; }

/* Reflet qui balaie la carte une fois ouverte. */
.gw-succes-popup__eclat {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, var(--gw-succes-reflet) 50%, transparent 65%);
    transform: translateX(-120%);
    animation: gw-succes-eclat 1.1s ease-out calc(var(--gw-succes-tempo) + .4s) both;
}

@keyframes gw-succes-entree {
    from {
        opacity: 0;
        transform: translate(1.5rem, -.9rem) scale(.94);
        clip-path: inset(0 100% 0 0 round 1.15rem);
    }
    to {
        opacity: 1;
        transform: translate(0, 0) scale(1);
        clip-path: inset(0 0 0 0 round 1.15rem);
    }
}

@keyframes gw-succes-sortie {
    from { opacity: 1; transform: translate(0, 0) scale(1); }
    to { opacity: 0; visibility: hidden; transform: translate(1.2rem, -.4rem) scale(.97); }
}

@keyframes gw-succes-halo {
    0%, 100% { opacity: .5; }
    50% { opacity: 1; }
}

@keyframes gw-succes-icone {
    from { opacity: 0; transform: scale(.35) rotate(-20deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes gw-succes-anneau {
    from { opacity: 0; transform: rotate(0); }
    12% { opacity: 1; }
    78% { opacity: 1; }
    to { opacity: 0; transform: rotate(2turn); }
}

@keyframes gw-succes-eclat {
    from { transform: translateX(-120%); }
    to { transform: translateX(120%); }
}

/* Mouvement réduit : la carte apparaît et disparaît sans transition,
   mais reste affichée le même temps de lecture. */
@media (prefers-reduced-motion: reduce) {
    .gw-succes-popup__carte { animation-duration: .01ms, .01ms; }
}

@media (prefers-reduced-motion: reduce) {
    .gw-succes-popup__halo,
    .gw-succes-popup__icone,
    .gw-succes-popup__icone::before,
    .gw-succes-popup__eclat { animation: none; }
}

:root[data-reduced-motion="true"] .gw-succes-popup__halo,
:root[data-reduced-motion="true"] .gw-succes-popup__icone,
:root[data-reduced-motion="true"] .gw-succes-popup__icone::before,
:root[data-reduced-motion="true"] .gw-succes-popup__eclat {
    animation: none;
}

@media (max-width: 575.98px) {
    /* Trop étroit pour un alignement à droite : la popup occupe la largeur. */
    .gw-succes-popup { left: .75rem; right: .75rem; width: auto; }
    .gw-succes-popup__carte { gap: .7rem; padding: .7rem .85rem; }
    .gw-succes-popup__icone { width: 2.6rem; height: 2.6rem; font-size: 1.25rem; }
    .gw-succes-popup__description { display: none; }
}

/* Back-office */
.gw-admin { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.5rem; }
.gw-admin .bi { line-height: 1; }
.gw-admin .bi::before { display: block; vertical-align: 0; }
.gw-admin > aside { align-self: start; position: sticky; top: 1rem; }
.gw-admin-nav { display: grid; gap: .25rem; }
.gw-admin-nav__link { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border-radius: .85rem; color: var(--gw-text); font-weight: 700; text-decoration: none; }
.gw-admin-nav__link:hover, .gw-admin-nav__link.is-active { color: #fff; background: linear-gradient(135deg, var(--gw-primary), var(--gw-primary-dark)); }
.gw-admin-nav__link > i { display: grid; width: 1.5rem; height: 1.5rem; flex: 0 0 1.5rem; place-items: center; text-align: center; }
.gw-admin-stat { display: flex; align-items: center; gap: 1rem; height: 100%; padding: 1.25rem; }
.gw-admin-stat__icon, .gw-admin-activity__icon { display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 1rem; line-height: 0; }
.gw-admin-stat__icon > i, .gw-admin-activity__icon > i { display: grid; place-items: center; width: 100%; height: 100%; }
.gw-admin-stat__icon { width: 3.4rem; height: 3.4rem; font-size: 1.4rem; }
.gw-admin-stat strong, .gw-admin-stat span { display: block; }
.gw-admin-stat strong { font-size: 1.8rem; line-height: 1; }
.gw-admin-stat span { margin-top: .3rem; color: var(--gw-muted); }
.gw-admin-activity { display: grid; }
.gw-admin-activity__item { display: flex; align-items: center; gap: .85rem; padding: .8rem 0; border-bottom: 1px solid var(--gw-border); color: var(--gw-text); text-decoration: none; }
.gw-admin-activity__item:last-child { border-bottom: 0; }
.gw-admin-activity__item time, .gw-admin-quick small { display: block; color: var(--gw-muted); font-size: .78rem; }
.gw-admin-activity__icon { width: 2.7rem; height: 2.7rem; }
.gw-admin-quick { display: flex; align-items: center; gap: .85rem; padding: .9rem; border: 1px solid var(--gw-border); border-radius: 1rem; color: var(--gw-text); text-decoration: none; }
.gw-admin-quick:hover { border-color: var(--gw-primary); background: rgba(var(--gw-primary-rgb), .08); }
.gw-admin-quick > i { display: grid; width: 2rem; height: 2rem; flex: 0 0 2rem; place-items: center; color: var(--gw-primary); font-size: 1.35rem; }
.gw-admin-quick strong { display: block; }
.gw-admin-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; min-height: 230px; padding: 1rem 1rem 0; border-left: 1px solid var(--gw-border); border-bottom: 1px solid var(--gw-border); background: repeating-linear-gradient(to top, transparent 0 52px, var(--gw-border) 53px 54px); }
.gw-admin-chart__day { display: flex; min-width: 0; flex-direction: column; justify-content: end; align-items: center; gap: .5rem; }
.gw-admin-chart__bars { display: flex; width: 100%; height: 180px; align-items: end; justify-content: center; gap: .2rem; }
.gw-admin-chart__bar { width: min(1rem, 42%); height: max(3px, var(--gw-chart-height)); border-radius: .35rem .35rem 0 0; transition: height .35s ease; }
.gw-admin-chart__day small { color: var(--gw-muted); font-size: .7rem; text-transform: uppercase; }
.gw-admin-summary { display: flex; height: 100%; align-items: center; gap: .75rem; padding: .8rem; border: 1px solid var(--gw-border); border-radius: 1rem; }
.gw-admin-summary > i { display: grid; width: 2rem; height: 2rem; flex: 0 0 2rem; place-items: center; font-size: 1.5rem; }
.gw-admin-summary span { min-width: 0; flex: 1; }
.gw-admin-summary strong, .gw-admin-summary small { display: block; }
.gw-admin-summary strong { font-size: 1.25rem; }
.gw-admin-summary small { color: var(--gw-muted); }
.gw-admin-summary em { font-size: .78rem; font-style: normal; font-weight: 800; }
.min-w-0 { min-width: 0; }
@media (max-width: 991.98px) { .gw-admin { grid-template-columns: 1fr; } .gw-admin > aside { position: static; } .gw-admin-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .gw-admin-nav { grid-template-columns: 1fr 1fr; } .gw-admin-nav__link { justify-content: center; padding-inline: .5rem; font-size: .8rem; } }
.gw-achievement{width:3.5rem;height:3.5rem;border-radius:1rem;display:grid;place-items:center;font-size:1.5rem;flex:0 0 auto;color:#fff;background:var(--reward-color, #58c8e8)}.gw-notification{display:flex;align-items:center;gap:1rem;padding:1.15rem 1.25rem 1.15rem 1.45rem;border-bottom:1px solid var(--bs-border-color);position:relative;transition:background-color .15s ease}.gw-notification:last-child{border-bottom:0}.gw-notification:hover{background:rgba(var(--gw-primary-rgb),.05)}.gw-notification--unread::before{content:"";position:absolute;top:0;bottom:0;left:0;width:.2rem;background:var(--gw-alert)}.gw-notification__icon{width:2.75rem;height:2.75rem;border-radius:.85rem;display:grid;place-items:center;background:rgba(var(--gw-primary-rgb),.14);color:var(--gw-primary);font-size:1.2rem;flex:0 0 auto}
.gw-presence{display:inline-block;width:.55rem;height:.55rem;border-radius:50%;background:var(--bs-secondary-bg);border:1px solid var(--bs-border-color)}.gw-presence--online{background:#35c759;border-color:#fff;box-shadow:0 0 0 2px rgba(53,199,89,.2)}.gw-community__avatar--sm{width:2rem;height:2rem;font-size:.85rem;flex:0 0 auto}.gw-community__media{width:100%;max-height:32rem;object-fit:cover}.gw-community__link{display:flex;align-items:center;gap:.65rem;padding:.8rem 1rem;border:1px solid var(--bs-border-color);border-radius:1rem;text-decoration:none;overflow:hidden}.gw-community__link span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gw-poll{padding:1rem;border-radius:1rem;background:rgba(var(--bs-primary-rgb),.06)}.gw-poll__option{position:relative;display:flex;align-items:center;gap:.6rem;padding:.65rem .75rem;margin:.4rem 0;border:1px solid var(--bs-border-color);border-radius:.75rem;overflow:hidden;cursor:pointer}.gw-poll__option>*:not(i){position:relative;z-index:1}.gw-poll__option span{flex-grow:1}.gw-poll__option i{position:absolute;inset:0 auto 0 0;background:rgba(var(--bs-primary-rgb),.14)}.gw-replies{border-left:3px solid rgba(var(--bs-primary-rgb),.2);padding-left:1rem}.gw-reply{display:flex;gap:.65rem;padding:.65rem 0;border-bottom:1px solid var(--bs-border-color)}.gw-reply:last-child{border-bottom:0}

/* Navigation compacte inspirée de la barre Bootstrap de l'ancien site. */
:root .gw-article-content,
:root .gw-article-content > *,
:root .gw-article-content .text-center,
:root .gw-article-content .text-start,
:root .gw-article-content .text-end,
:root .jeu-contenu,
:root .jeu-contenu > *,
:root .jeu-contenu .text-center,
:root .jeu-contenu .text-start,
:root .jeu-contenu .text-end {
    max-width: 100%;
}

:root .gw-article-content img,
:root .jeu-contenu img {
    display: inline-block;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
}

/* Centre les illustrations ordinaires dans les sections de fiche. Les images
   avec un flottement explicite et celles des galeries conservent leur mise en page. */
:root .gw-game-section .jeu-contenu > img:not([style*="float"]) {
    display: block !important;
    margin-inline: auto !important;
}

:root .gw-game-section .jeu-contenu > .gw-lg-item:not([style*="float"]) {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
}

.gw-game-presentation--complete .jeu-contenu {
    text-align: center;
}

.gw-game-section--presentation .jeu-contenu {
    text-align: center;
}

#a-propos:not(.gw-game-presentation--complete) > .gw-author-card {
    position: relative;
    margin-top: 3rem;
    padding: 1.1rem;
    border: 1px solid var(--gw-border);
    border-radius: 1.15rem;
    background: linear-gradient(145deg, color-mix(in srgb, var(--gw-surface) 94%, white 6%), color-mix(in srgb, var(--gw-surface) 96%, var(--gw-primary) 4%));
    box-shadow: var(--gw-shadow-soft);
}

#a-propos:not(.gw-game-presentation--complete) > .gw-author-card::before {
    position: absolute;
    right: 0;
    bottom: calc(100% + 1.5rem);
    left: 0;
    border-top: 1px solid var(--gw-border);
    content: '';
}


:root .gw-game-section--presentation .jeu-contenu {
    text-align: center;
}

/* La carte « Écrit par » vit à l’intérieur du contenu : sans exception, la
   règle ci-dessus rend l’avatar à son ratio d’origine et laisse le dégradé du
   cadre apparaître sous la photo. */
:root .gw-article-content .gw-author-card__media img,
:root .jeu-contenu .gw-author-card__media img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

:root .gw-article-content .gw-bbcode-gallery img,
:root .jeu-contenu .gw-bbcode-gallery img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 320px;
    margin: 0;
    object-fit: cover;
}

@media (max-width: 991.98px) {
    .gw-level-chip,
    .gw-icon-btn--sound {
        display: none !important;
    }

    :root .gw-rail {
        position: static;
        inset: auto;
        display: flex;
        width: 100%;
        padding: 0;
        flex-direction: column;
        align-items: stretch;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    :root .gw-rail__toggle {
        flex: 0 0 auto;
        align-self: flex-end;
    }

    :root .gw-rail.is-open .gw-rail__viewport {
        display: block;
        width: 100%;
        margin-top: .45rem;
        padding: .45rem;
        border: 1px solid var(--gw-border);
        border-radius: .5rem;
        background: var(--gw-surface);
        box-shadow: var(--gw-shadow-soft);
    }

    :root .gw-rail.is-open .gw-rail__list {
        display: flex !important;
        width: 100%;
        min-width: 0;
        max-height: none;
        flex-flow: column nowrap !important;
        gap: .1rem;
        overflow: visible;
    }

    :root .gw-rail.is-open .gw-rail__list > li {
        width: 100%;
        flex: 0 0 auto;
    }

    :root .gw-rail.is-open .gw-rail__item {
        width: 100%;
        min-width: 0;
        flex-flow: row nowrap;
        justify-content: flex-start;
        gap: .7rem;
        padding: .65rem .75rem;
        border-width: 1px;
        border-radius: .35rem;
    }

    :root .gw-rail.is-open .gw-rail__item i {
        width: 1.4rem;
        flex: 0 0 1.4rem;
        font-size: 1rem;
        text-align: center;
    }

    :root .gw-rail.is-open .gw-rail__label {
        font-size: .8rem;
        letter-spacing: .02em;
        text-align: left;
    }

    /* Legacy teinte son rail en blanc pour la barre sombre du haut. Le tiroir
       replié, lui, repose sur --gw-surface : sans reprise de la couleur du
       thème, le libellé passe blanc sur blanc. */
    :root[data-theme="legacy"] .gw-rail.is-open .gw-rail__item,
    :root[data-theme="legacy"] .gw-rail.is-open .gw-rail__item:is(:hover, :focus-visible) {
        color: var(--gw-text);
    }

    :root[data-theme="legacy"] .gw-rail.is-open .gw-rail__item:is(:hover, :focus-visible) {
        background: rgba(var(--gw-primary-rgb), .1);
    }

    :root[data-theme="legacy"] .gw-rail.is-open .gw-rail__item.is-active {
        color: #fff;
    }

    /* Les libellés sont masqués sous 768px pour la barre horizontale ; dans le
       tiroir, il ne resterait que des icônes. */
    :root[data-theme="legacy"] .gw-rail.is-open .gw-rail__label {
        display: block;
    }

    :root .gw-rail__suite,
    :root .gw-dsi-selection {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .gw-games-search__filters {
        order: 1;
    }

    .gw-games-search__content {
        order: 2;
    }

    .gw-search-form > * {
        order: 1;
    }

    .gw-search-form__query {
        order: 2;
    }

    .gw-search-form__reset {
        order: 3;
    }

    :root .gw-article-content .gw-bbcode-gallery,
    :root .jeu-contenu .gw-bbcode-gallery {
        width: calc(100% + 1rem);
        max-width: calc(100% + 1rem) !important;
        justify-content: center;
        justify-items: center;
        margin-inline: -.5rem;
    }

    .gw-ranking-wrap {
        overflow: visible;
    }

    .gw-ranking-table,
    .gw-ranking-table tbody {
        display: block;
        width: 100%;
    }

    .gw-ranking-table thead {
        display: none;
    }

    .gw-ranking-table .gw-ranking__row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: .4rem .7rem;
        margin-bottom: .6rem;
        padding: .75rem;
        align-items: center;
        border: 1px solid var(--gw-border);
        border-radius: .65rem;
        background: var(--gw-surface);
    }

    .gw-ranking-table .gw-ranking__row > * {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .gw-ranking__rank {
        grid-row: 1 / 3;
        min-width: 2rem;
        font-size: 1.1rem;
    }

    .gw-ranking__member {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gw-ranking__points {
        font-weight: 700;
        white-space: nowrap;
    }

    .gw-ranking__level {
        grid-column: 2;
    }

    .gw-ranking__xp {
        grid-column: 3;
        color: var(--gw-muted);
        font-size: .78rem;
        white-space: nowrap;
    }

    .gw-ranking__xp::before {
        content: attr(data-label) " ";
        font-weight: 700;
    }

    .gw-ranking-table .gw-ranking__empty,
    .gw-ranking-table .gw-ranking__empty td {
        display: block;
        width: 100%;
    }

    .gw-pagination {
        flex-wrap: nowrap;
    }

    .gw-pagination .gw-pagination__page,
    .gw-pagination__desktop-status,
    .gw-pagination__label {
        display: none;
    }

    .gw-pagination .page-link {
        min-width: 2.55rem;
        padding-inline: .65rem;
        text-align: center;
    }

    .gw-pagination .gw-pagination__mobile-status {
        display: block;
    }

    .gw-pagination .gw-pagination__mobile-status .page-link {
        min-width: 8.5rem;
        color: var(--gw-text);
        background: var(--gw-surface);
        font-weight: 700;
    }
}

@media (min-width: 576px) {
    .gw-pagination__mobile-status {
        display: none;
    }
}

/* Accueil : carrousel horizontal de neuf éléments, quatre visibles sur grand écran. */
.gw-home-carousel__stage { min-width: 0; }
.gw-home-carousel__arrow {
    display: none;
    width: 2rem; height: 2rem; padding: 0; place-items: center;
    border: 1px solid var(--gw-border); border-radius: 50%; color: var(--gw-text);
    background: var(--gw-surface-solid); box-shadow: var(--gw-shadow-soft);
    transition: color .16s ease, border-color .16s ease, transform .16s ease, opacity .16s ease;
}
.gw-home-carousel__arrow:not(:disabled):hover { border-color: var(--gw-primary); color: var(--gw-primary); transform: scale(1.06); }
.gw-home-carousel__arrow:disabled { opacity: .25; cursor: default; }
.gw-home-shell.gw-disposition--carrousel .gw-home-carousel__stage { display: grid; grid-template-columns: 2rem minmax(0, 1fr) 2rem; align-items: center; gap: .75rem; }
.gw-home-shell.gw-disposition--carrousel .gw-home-carousel__arrow { display: grid; position: relative; z-index: 3; }
.gw-home-shell.gw-disposition--carrousel .gw-collection.row {
    --bs-gutter-x: 0;
    display: flex !important; flex-wrap: nowrap !important; gap: 1rem; margin: 0;
    overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; scroll-snap-type: x mandatory;
    scrollbar-width: none; overscroll-behavior-inline: contain;
}
.gw-home-shell.gw-disposition--carrousel .gw-collection.row::-webkit-scrollbar { display: none; }
.gw-home-shell.gw-disposition--carrousel .gw-collection.row > .col {
    flex: 0 0 calc((100% - 3rem) / 4) !important; width: calc((100% - 3rem) / 4) !important;
    max-width: none !important; padding: 0; scroll-snap-align: start;
}
.gw-home-shell.gw-disposition--carrousel .gw-collection :is(.gw-similar-card, .gw-article-card) { height: 100%; }
.gw-home-shell.gw-disposition--carrousel .gw-home-menu { padding: 1rem !important; }
.gw-home-shell.gw-disposition--carrousel .gw-similar-card__visual { height: clamp(175px, 18vw, 240px); min-height: 0; background: color-mix(in srgb, var(--gw-surface-solid) 88%, var(--gw-primary) 12%); }
.gw-home-shell.gw-disposition--carrousel .gw-collection--jeux .gw-similar-card__visual { height: auto; aspect-ratio: 1; }
.gw-home-shell.gw-disposition--carrousel .gw-similar-card__visual img { width: 100% !important; height: 100% !important; object-fit: contain !important; object-position: center; }
.gw-home-shell.gw-disposition--carrousel .gw-similar-card > .p-3 { padding: .75rem !important; }
.gw-home-shell.gw-disposition--carrousel .gw-similar-card h3 { display: -webkit-box; overflow: hidden; font-size: .9rem; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.gw-home-shell.gw-disposition--carrousel .gw-home-card-meta { margin-top: .5rem !important; font-size: .75rem; }
.gw-home-order--organizing .gw-home-sortable-section { min-height: 0 !important; padding: .75rem 1rem !important; cursor: grab; }
.gw-home-order--organizing .gw-home-sortable-section:active { cursor: grabbing; }
.gw-home-order--organizing .gw-home-sortable-section > :not(.gw-home-menu__entete) { display: none !important; }
.gw-home-order--organizing .gw-home-menu__entete { margin-bottom: 0 !important; }
.gw-home-order--organizing .gw-home-menu__entete h2 { font-size: 1rem; }
.gw-home-order--organizing .gw-home-menu__lien { display: none; }
.gw-home-order--organizing .gw-home-drag-handle { color: #fff; border-color: var(--gw-primary); background: var(--gw-primary); }
.gw-home-shell:not(.gw-disposition--carrousel) .gw-collection--jeux > .col:nth-child(n + 9),
.gw-home-shell:not(.gw-disposition--carrousel) .gw-collection--actualites > .col:nth-child(n + 5) { display: none; }

/* Sous 1200 px, quatre vignettes deviennent trop étroites pour rester lisibles. */
@media (max-width: 1199.98px) {
    .gw-home-shell.gw-disposition--carrousel .gw-collection.row > .col { flex-basis: calc((100% - 2rem) / 3) !important; width: calc((100% - 2rem) / 3) !important; }
}

@media (max-width: 767.98px) {
    .gw-home-shell.gw-disposition--carrousel .gw-collection.row > .col { flex-basis: calc((100% - 1rem) / 2) !important; width: calc((100% - 1rem) / 2) !important; }
    .gw-home-shell.gw-disposition--carrousel .gw-collection--actualites .gw-similar-card__visual { height: 210px; }
}

@media (max-width: 479.98px) {
    .gw-home-shell.gw-disposition--carrousel .gw-collection.row > .col { flex-basis: 100% !important; width: 100% !important; }
    .gw-home-shell.gw-disposition--carrousel .gw-collection--jeux .gw-similar-card__visual { height: 280px; aspect-ratio: auto; }
    .gw-home-menu__entete { align-items: flex-start !important; }
}

.gw-home-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .35rem .75rem;
    color: var(--gw-muted);
    font-size: .75rem;
}

.gw-home-card-meta :is(time, span) {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.gw-home-card-meta i {
    color: var(--gw-primary);
}

.gw-home-drag-handle,
.gw-home-order-button {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--bs-border-color) 80%, transparent);
    border-radius: .55rem;
    background: color-mix(in srgb, var(--bs-body-bg) 88%, var(--bs-primary) 12%);
    color: var(--bs-secondary-color);
    cursor: grab;
    touch-action: none;
}

.gw-home-drag-handle:hover,
.gw-home-drag-handle:focus-visible,
.gw-home-order-button:hover,
.gw-home-order-button:focus-visible {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.gw-home-drag-handle:active {
    cursor: grabbing;
}

.gw-home-order-button {
    cursor: pointer;
}

.gw-home-order-button:disabled {
    opacity: .35;
    cursor: default;
}

.gw-home-section--chosen {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bs-primary) 30%, transparent);
}

.gw-home-section--ghost {
    opacity: .35;
}

@media (prefers-reduced-motion: reduce) {
    .gw-home-sortable-section {
        transition: none !important;
    }
}

.gw-legal-page {
    max-width: 1180px;
    margin-inline: auto;
}

.gw-legal-page__icon {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1.25rem;
    background: color-mix(in srgb, var(--bs-primary) 16%, var(--bs-body-bg));
    color: var(--bs-primary);
    font-size: 2rem;
}

.gw-legal-page__nav {
    position: sticky;
    top: 1rem;
    display: grid;
    gap: .2rem;
}

.gw-legal-page__nav a {
    padding: .55rem .65rem;
    border-radius: .65rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
}

.gw-legal-page__nav a:hover,
.gw-legal-page__nav a:focus-visible {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
}

.gw-legal-page__nav a[aria-current="page"] {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
    font-weight: 600;
}

.gw-legal-footer {
    margin-top: 1.5rem;
    padding: .85rem clamp(.75rem, 2vw, 1.5rem);
    border-top: 1px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
    font-size: .875rem;
}

.gw-legal-footer__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .35rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gw-legal-footer__list a {
    color: inherit;
    text-decoration: none;
}

.gw-legal-footer__list a:is(:hover, :focus-visible) {
    color: var(--bs-primary);
    text-decoration: underline;
}

.gw-legal-footer__consent {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.gw-legal-footer__consent:is(:hover, :focus-visible) {
    color: var(--bs-primary);
}

.gw-legal-page__content section {
    scroll-margin-top: 1rem;
}

.gw-legal-page__content section + section {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--bs-border-color);
}

.gw-legal-page__content h2 {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: 1rem;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.gw-legal-page__content h2 i {
    color: var(--bs-primary);
}

.gw-legal-page__content :is(p, li) {
    line-height: 1.7;
}

.gw-game-rate__panel {
    display: grid;
    gap: 1rem;
}

.gw-game-rate__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.gw-game-rate__summary {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--bs-secondary-color);
    font-size: .95rem;
}

.gw-game-rate__summary .bi {
    color: #f59e0b;
}

.gw-game-rate__summary strong {
    color: var(--bs-body-color);
    font-size: 1.1rem;
}

.gw-game-rate__summary--empty {
    font-size: .9rem;
}

.gw-game-rate__hint {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--bs-success-text-emphasis);
    font-size: .9rem;
}

.gw-game-rate__hint .bi {
    flex: 0 0 auto;
}

.gw-game-rate__guest {
    font-size: .95rem;
}

.gw-game-rate__form {
    display: grid;
    gap: 1rem;
}

.gw-game-rate__stars .form-label {
    margin-bottom: .5rem;
    font-size: .9rem;
    font-weight: 600;
}

.gw-game-rate__stars .form-check {
    display: inline-flex;
    align-items: center;
    margin: 0 .85rem 0 0;
    padding: 0;
}

.gw-game-rate__stars .form-check-input {
    margin: 0 .35rem 0 0;
}

.gw-game-rate__stars .form-check-label {
    font-size: .9rem;
}

.gw-game-rate__body {
    display: grid;
    gap: .75rem;
}

.gw-game-rate__comment .form-control {
    min-height: calc(3.5rem + 2px);
    resize: vertical;
}

.gw-game-rate__actions {
    display: flex;
    justify-content: stretch;
}

.gw-game-rate__actions .btn {
    width: 100%;
}

@media (min-width: 768px) {
    .gw-game-rate__body {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 1rem;
    }

    .gw-game-rate__actions {
        justify-content: flex-end;
    }

    .gw-game-rate__actions .btn {
        width: auto;
        white-space: nowrap;
    }
}

.gw-ranking-wrap {
    border: 1px solid #111;
    border-radius: .75rem;
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .gw-legal-page__nav {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gw-legal-page__nav strong {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .gw-legal-page__nav {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 767.98px) {
    .gw-ranking-wrap {
        border: 0;
        border-radius: 0;
        overflow: visible;
    }
}
