/* Thème Nintendo DSi : menu système blanc, bulles d'icônes, écran supérieur lumineux. */
:root[data-theme="dsi"],
:root[data-gw-theme="dsi"] {
    --gw-primary: #3daee9;
    --gw-primary-rgb: 61, 174, 233;
    --gw-primary-dark: #2496d4;
    --gw-secondary: #a8d4ff;
    --gw-secondary-rgb: 168, 212, 255;
    --gw-background: #eef6fc;
    --gw-background-accent: #dceefb;
    --gw-surface: rgba(255, 255, 255, 0.98);
    --gw-surface-solid: #ffffff;
    --gw-text: #1e3a4f;
    --gw-muted: #5f7d94;
    --gw-border: #c8dff0;
    --gw-radius-sm: 0.5rem;
    --gw-radius-md: 1rem;
    --gw-radius-lg: 1.25rem;
    --gw-shadow: 0 4px 18px rgba(30, 90, 130, 0.12);
    --gw-shadow-soft: 0 2px 10px rgba(30, 90, 130, 0.08);
    --gw-glow: 0 0 0 3px rgba(61, 174, 233, 0.2);
}

:root[data-theme="dsi"] body,
:root[data-gw-theme="dsi"] body {
    background-color: var(--gw-background);
    background-image:
        linear-gradient(180deg, #dff0ff 0%, #c8e4f8 38%, #1a1f24 38.05%, #252b31 38.2%, #f5faff 38.35%, #eef6fc 100%);
}

:root[data-theme="dsi"] body::before,
:root[data-gw-theme="dsi"] body::before {
    position: fixed;
    z-index: 0;
    inset: 0;
    opacity: .55;
    content: "";
    pointer-events: none;
    background:
        radial-gradient(120% 55% at 50% 16%, rgba(255, 255, 255, .55), transparent 68%),
        radial-gradient(80% 35% at 20% 12%, rgba(168, 212, 255, .35), transparent 70%),
        radial-gradient(70% 30% at 82% 10%, rgba(255, 255, 255, .28), transparent 72%);
}

:root[data-theme="dsi"] .gw-app,
:root[data-gw-theme="dsi"] .gw-app { position: relative; z-index: 1; }

/* Accueil DSi : même profondeur d'interface que la 3DS, charte DSi distincte. */
:root[data-theme="dsi"] .gw-home-shell {
    display: flex;
    flex-direction: column;
    gap: 0;
}

:root[data-theme="dsi"] .gw-3ds-screen { display: block; }

:root[data-theme="dsi"] .gw-3ds-screen--top {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    border: 4px solid #30363b;
    border-bottom: 0;
    border-radius: .7rem .7rem 0 0;
    background: linear-gradient(180deg, #eaf8ff 0%, #a8dff6 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
}

:root[data-theme="dsi"] .gw-3ds-screen--top > .gw-game-hero--home,
:root[data-theme="dsi"] .gw-3ds-screen--top > #actualites-en-avant {
    width: 100%;
    margin-bottom: 0 !important;
}

:root[data-theme="dsi"] .gw-3ds-screen--top > .gw-game-hero--home {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

:root[data-theme="ds"] .gw-3ds-screen--top > .gw-game-hero--home {
    width: 100%;
    margin-bottom: 0 !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

:root[data-theme="dsi"] .gw-3ds-screen--top #actualites-en-avant {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

:root[data-theme="dsi"] .gw-3ds-charniere {
    display: block;
    height: 7px;
    border-inline: 4px solid #30363b;
    background: linear-gradient(180deg, #171a1d, #515960 45%, #171a1d);
    box-shadow: inset 0 1px rgba(255, 255, 255, .22);
}

:root[data-theme="dsi"] .gw-3ds-screen--bottom {
    padding: clamp(.8rem, 2vw, 1.15rem);
    border: 4px solid #30363b;
    border-top: 0;
    border-radius: 0 0 .7rem .7rem;
    background:
        linear-gradient(rgba(255, 255, 255, .82), rgba(235, 242, 246, .92)),
        repeating-linear-gradient(0deg, transparent 0 3px, rgba(89, 112, 127, .06) 3px 4px);
    box-shadow: 0 12px 28px rgba(27, 57, 74, .2), inset 0 0 0 1px #fff;
}

:root[data-theme="dsi"] .gw-3ds-screen--bottom > .gw-home-menu,
:root[data-theme="dsi"] .gw-3ds-screen--bottom > .gw-home-menu--communaute {
    margin-bottom: 1rem !important;
    padding: 0 !important;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

:root[data-theme="dsi"] .gw-home-disposition .btn {
    border-color: #aebdc6;
    color: #344b58;
    background: linear-gradient(#fff, #dfe7eb);
}

:root[data-theme="dsi"] .gw-home-disposition .btn.active {
    border-color: #008fd1;
    color: #fff;
    background: linear-gradient(#28bdf5, #0088c9);
}

:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-collection.row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .7rem;
    margin: 0;
}

:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-collection.row > .col {
    width: auto;
    max-width: none;
    padding: 0;
}

:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-similar-card,
:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-article-card {
    min-height: 145px;
    height: 100%;
    overflow: hidden;
    border: 1px solid #aebdc6;
    border-radius: .55rem;
    background: linear-gradient(180deg, #fff 0%, #e3e9ec 100%);
    box-shadow: inset 0 1px #fff, 0 2px 5px rgba(34, 59, 72, .2);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-similar-card:hover,
:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-similar-card:focus-within,
:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-article-card:hover,
:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-article-card:focus-within {
    z-index: 2;
    border-color: #008fd1;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 174, 239, .3), 0 5px 12px rgba(34, 59, 72, .24);
    transform: translateY(-2px);
}

:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-similar-card__visual,
:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-article-card .card-img-top {
    height: 92px !important;
    min-height: 92px;
    border-bottom: 1px solid #b8c7cf;
    border-radius: .5rem .5rem 0 0;
    object-fit: cover;
}

:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-similar-card > .p-3,
:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-article-card .card-body {
    padding: .55rem .65rem !important;
}

:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-similar-card h3,
:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-article-card .card-title {
    margin: 0;
    color: #263740;
    font-size: .8rem;
    line-height: 1.2;
    text-align: center;
}

:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-similar-card .d-flex.flex-wrap,
:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-similar-card .small.text-secondary,
:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-article-card .badge,
:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-article-card .card-text,
:root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-article-card .small.text-secondary {
    display: none !important;
}

:root[data-theme="dsi"] .gw-home-menu--communaute .gw-activity__item,
:root[data-theme="dsi"] .gw-home-menu--communaute .gw-members__item {
    border: 1px solid #b8c7cf;
    border-radius: .55rem;
    background: linear-gradient(#fff, #e7edf0);
}

:root[data-theme="dsi"][data-bs-theme="dark"] .gw-3ds-screen--bottom {
    background: linear-gradient(180deg, #283139, #161c21);
}

:root[data-theme="dsi"][data-bs-theme="dark"] .gw-home-shell.gw-disposition--grille .gw-similar-card,
:root[data-theme="dsi"][data-bs-theme="dark"] .gw-home-shell.gw-disposition--grille .gw-article-card,
:root[data-theme="dsi"][data-bs-theme="dark"] .gw-home-menu--communaute .gw-activity__item,
:root[data-theme="dsi"][data-bs-theme="dark"] .gw-home-menu--communaute .gw-members__item {
    border-color: #51616b;
    color: #edf8fd;
    background: linear-gradient(#333e46, #20282e);
}

:root[data-theme="dsi"][data-bs-theme="dark"] .gw-home-shell.gw-disposition--grille .gw-similar-card h3,
:root[data-theme="dsi"][data-bs-theme="dark"] .gw-home-shell.gw-disposition--grille .gw-article-card .card-title {
    color: #edf8fd;
}

@media (min-width: 992px) {
    :root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-collection.row {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    :root[data-theme="dsi"] .gw-home-shell.gw-disposition--grille .gw-collection.row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* DSi : écran supérieur lumineux, menu inférieur blanc et bulles de sélection. */
:root[data-theme="dsi"] .gw-topbar,
:root[data-theme="dsi"] .gw-rail,
:root[data-theme="dsi"] .gw-panel,
:root[data-theme="dsi"] .gw-community,
:root[data-theme="dsi"] .gw-search-box,
:root[data-theme="dsi"] .gw-filter-panel,
:root[data-theme="dsi"] .gw-clock {
    background: var(--gw-surface);
    border-color: var(--gw-border);
}

:root[data-theme="dsi"] .gw-topbar {
    padding: .55rem .85rem;
    border: 3px solid #252b31;
    border-radius: 1rem;
    background: linear-gradient(180deg, #f8fcff, #e8f4fc);
    box-shadow: inset 0 1px rgba(255, 255, 255, .95), 0 4px 16px rgba(30, 90, 130, .1);
}

:root[data-theme="dsi"] .gw-rail__item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid #d4e8f6;
    background: linear-gradient(180deg, #fff, #f3f9fd);
    box-shadow: inset 0 1px rgba(255, 255, 255, .98), 0 2px 8px rgba(61, 174, 233, .08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

:root[data-theme="dsi"] .gw-rail__item i {
    position: relative;
    z-index: 1;
    color: #4a7a98;
}

:root[data-theme="dsi"] .gw-rail__item.is-active {
    color: #fff;
    border-color: #2496d4;
    background: radial-gradient(120% 100% at 50% 0, rgba(255, 255, 255, .42), transparent 58%), linear-gradient(180deg, #6cc8f5, #3daee9);
    box-shadow: inset 0 1px rgba(255, 255, 255, .45), 0 0 0 3px rgba(61, 174, 233, .18), 0 6px 18px rgba(61, 174, 233, .28);
}

:root[data-theme="dsi"] .gw-rail__item.is-active i,
:root[data-theme="dsi"] .gw-rail__item.is-active .gw-rail__label {
    color: #fff;
}

:root[data-theme="dsi"] .gw-rail__item:hover:not(.is-active) {
    color: #2496d4;
    transform: translateY(-3px) scale(1.03);
    border-color: #9fd4f3;
    box-shadow: inset 0 1px rgba(255, 255, 255, .98), 0 0 0 4px rgba(168, 212, 255, .35), 0 8px 20px rgba(61, 174, 233, .16);
}

:root[data-theme="dsi"] .gw-rail__item:hover:not(.is-active)::before {
    position: absolute;
    inset: 12%;
    z-index: 0;
    border-radius: 50%;
    content: "";
    background: radial-gradient(circle, rgba(168, 212, 255, .55) 0%, rgba(168, 212, 255, 0) 72%);
}

:root[data-theme="dsi"] .btn-primary,
:root[data-theme="dsi"] .btn-gw {
    border-color: #2496d4;
    color: #fff;
    background-color: #3daee9;
    background-image: linear-gradient(180deg, #7dcef7 0%, #3daee9 100%);
    border-radius: 1rem;
}

:root[data-theme="dsi"] .btn-primary:hover,
:root[data-theme="dsi"] .btn-gw:hover {
    border-color: #1f8ac6;
    color: #fff;
    background-color: #4db8ef;
    background-image: linear-gradient(180deg, #95d9fb 0%, #4db8ef 100%);
}

:root[data-theme="dsi"] .btn-primary:active,
:root[data-theme="dsi"] .btn-primary.active,
:root[data-theme="dsi"] .btn-gw:active,
:root[data-theme="dsi"] .btn-gw.active {
    border-color: #1a7fb5;
    color: #fff;
    background-color: #349fd9;
    background-image: linear-gradient(180deg, #6cc8f5 0%, #349fd9 100%);
}

:root[data-theme="dsi"] :is(.card, .modal-content, .dropdown-menu, .list-group-item, .table, .accordion-item),
:root[data-theme="dsi"] :is(.gw-community__composer, .gw-community__post, .gw-community__side, .gw-similar-card, .gw-comment) {
    color: var(--gw-text);
    background-color: var(--gw-surface-solid);
    border-color: var(--gw-border);
}

:root[data-theme="dsi"] :is(.card, .modal-content, .dropdown-menu, .gw-community__post, .gw-comment) {
    border-radius: 1rem;
    box-shadow: inset 0 1px rgba(255, 255, 255, .85), 0 4px 16px rgba(30, 90, 130, .08);
}

:root[data-theme="dsi"] :is(.form-control, .form-select, .input-group-text) {
    color: var(--gw-text);
    background-color: #fff;
    border-color: #c8dff0;
    border-radius: .85rem;
}

:root[data-theme="dsi"] :is(.form-control, .form-select):focus {
    border-color: #3daee9;
    box-shadow: 0 0 0 .25rem rgba(61, 174, 233, .2);
}

:root[data-theme="dsi"] :is(.nav-pills .nav-link.active, .page-item.active .page-link) {
    color: #fff;
    background: linear-gradient(180deg, #6cc8f5, #3daee9);
    border-color: #2496d4;
    box-shadow: 0 .35rem .85rem rgba(61, 174, 233, .24);
}

/* --- DSi en sombre : coque noire, UI rétroéclairée bleu clair --- */
:root[data-theme="dsi"][data-bs-theme="dark"] {
    --gw-primary: #5ccfff;
    --gw-primary-rgb: 92, 207, 255;
    --gw-primary-dark: #9fe4ff;
    --gw-secondary: #7eb8e8;
    --gw-secondary-rgb: 126, 184, 232;
    --gw-background: #0f1216;
    --gw-background-accent: #171c22;
    --gw-surface: rgba(24, 30, 38, 0.96);
    --gw-surface-solid: #1e252e;
    --gw-text: #e8f4fc;
    --gw-muted: #8fa8bc;
    --gw-border: rgba(126, 184, 232, 0.24);
    --gw-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
    --gw-shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.32);
    --gw-glow: 0 0 0 3px rgba(92, 207, 255, 0.24);
    --bs-body-color: var(--gw-text);
    --bs-body-bg: var(--gw-background);
    --bs-secondary-color: var(--gw-muted);
    --bs-tertiary-bg: #26303c;
    --bs-border-color: var(--gw-border);
}

:root[data-theme="dsi"][data-bs-theme="dark"] body {
    background-image:
        linear-gradient(180deg, #1a2838 0%, #14202e 38%, #050608 38.05%, #080a0c 38.2%, #121820 38.35%, #0f1216 100%);
}

:root[data-theme="dsi"][data-bs-theme="dark"] body::before {
    opacity: .62;
    background:
        radial-gradient(120% 55% at 50% 14%, rgba(92, 207, 255, .16), transparent 68%),
        radial-gradient(80% 35% at 18% 10%, rgba(126, 184, 232, .14), transparent 70%);
}

:root[data-theme="dsi"][data-bs-theme="dark"] .gw-topbar {
    border-color: #080a0c;
    background: linear-gradient(180deg, #243040, #1a222c);
    box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 4px 18px rgba(0, 0, 0, .42);
}

:root[data-theme="dsi"][data-bs-theme="dark"] :is(.card, .modal-content, .dropdown-menu, .list-group-item, .table, .accordion-item),
:root[data-theme="dsi"][data-bs-theme="dark"] :is(.gw-community__composer, .gw-community__post, .gw-community__side, .gw-similar-card, .gw-comment) {
    background-color: var(--gw-surface-solid);
    border-color: var(--gw-border);
}

:root[data-theme="dsi"][data-bs-theme="dark"] :is(.card, .modal-content, .dropdown-menu, .gw-community__post, .gw-comment) {
    box-shadow: inset 0 1px rgba(255, 255, 255, .04), 0 4px 16px rgba(0, 0, 0, .35);
}

:root[data-theme="dsi"][data-bs-theme="dark"] :is(.form-control, .form-select, .input-group-text) {
    background-color: rgba(12, 18, 26, .88);
    border-color: var(--gw-border);
}

:root[data-theme="dsi"][data-bs-theme="dark"] .gw-rail__item i {
    color: var(--gw-muted);
}

:root[data-theme="dsi"][data-bs-theme="dark"] .gw-rail__item {
    border-color: rgba(126, 184, 232, .18);
    background: linear-gradient(180deg, rgba(36, 46, 58, .98), rgba(24, 32, 42, .96));
    box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 2px 8px rgba(0, 0, 0, .28);
}

:root[data-theme="dsi"][data-bs-theme="dark"] .gw-rail__item.is-active {
    border-color: #5ccfff;
    box-shadow: inset 0 1px rgba(255, 255, 255, .14), 0 0 0 3px rgba(92, 207, 255, .22), 0 6px 18px rgba(92, 207, 255, .18);
}

:root[data-theme="dsi"][data-bs-theme="dark"] .gw-rail__item:hover:not(.is-active) {
    color: #9fe4ff;
    box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 0 0 4px rgba(92, 207, 255, .14), 0 8px 20px rgba(0, 0, 0, .35);
}

:root[data-theme="dsi"][data-bs-theme="dark"] .gw-rail__item:hover:not(.is-active)::before {
    background: radial-gradient(circle, rgba(92, 207, 255, .22) 0%, rgba(92, 207, 255, 0) 72%);
}

@media (min-width: 768px) {
    :root[data-theme="dsi"][data-bs-theme="dark"] .gw-rail {
        border-color: #080a0c;
        background: linear-gradient(180deg, #1a222c, #121820);
        box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 4px 18px rgba(0, 0, 0, .42);
    }
}

/* Accueils DSi et DS : mêmes carrés et bulles de titre que l'accueil 3DS. */
:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-home-shell.gw-disposition--grille .gw-collection.row {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    overflow: visible;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-home-shell.gw-disposition--grille .gw-collection.row > .col {
    overflow: visible;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-home-shell.gw-disposition--grille :is(.gw-similar-card, .gw-article-card) {
    position: relative;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1;
    width: 100%;
    min-height: 0;
    height: auto;
    padding: .45rem;
    overflow: visible !important;
    border: 2px solid #9da3a6;
    border-radius: .35rem;
    text-align: center;
    background: linear-gradient(180deg, #fff, #dde1e2);
    box-shadow: 0 0 0 1px #696f72, 0 3px 8px rgba(0, 0, 0, .3), inset 0 1px #fff;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-home-shell.gw-disposition--grille :is(.gw-similar-card, .gw-article-card):is(:hover, :focus-within) {
    z-index: 1065;
    border-color: #4e8998;
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 0 0 1px #385e68, 0 0 0 4px rgba(99, 184, 204, .38), 0 8px 18px rgba(0, 0, 0, .32), inset 0 1px #fff;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-home-shell.gw-disposition--grille .gw-similar-card__visual,
:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-home-shell.gw-disposition--grille .gw-article-card :is(.card-img-top, .gw-article-card__img) {
    display: flex;
    flex: 1;
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border-radius: .45rem;
    object-fit: cover;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-home-shell.gw-disposition--grille :is(.gw-similar-card > .p-3, .gw-article-card .card-body) {
    position: static;
    flex: 0 0 0 !important;
    min-height: 0 !important;
    height: 0;
    padding: 0 !important;
    overflow: visible;
    pointer-events: none;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-home-shell.gw-disposition--grille :is(.gw-similar-card h3, .gw-article-card .card-title) {
    position: absolute;
    z-index: 4;
    bottom: calc(100% + .45rem);
    left: 50%;
    display: block;
    width: max-content;
    max-width: min(220px, 90vw);
    margin: 0;
    padding: .42rem .78rem;
    border: 2px solid #777b7e;
    border-radius: 999px;
    color: #303336;
    background: linear-gradient(180deg, #fdfdfd, #e2e4e5);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(6px) scale(.94);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.25;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-home-shell.gw-disposition--grille :is(.gw-similar-card h3, .gw-article-card .card-title)::after {
    position: absolute;
    top: calc(100% - 3px);
    left: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid #777b7e;
    border-bottom: 2px solid #777b7e;
    content: "";
    background: #e2e4e5;
    transform: translateX(-50%) rotate(45deg);
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-home-shell.gw-disposition--grille :is(.gw-similar-card, .gw-article-card):is(:hover, :focus-within) :is(h3, .card-title) {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-home-shell.gw-disposition--grille :is(.gw-similar-card .d-flex.flex-wrap, .gw-similar-card .gw-tag, .gw-similar-card .small.text-secondary, .gw-article-card .badge, .gw-article-card .card-text, .gw-article-card .small.text-secondary) {
    display: none !important;
}

/* ===============================================================
   Menus DSi et DS : écran de contenu au-dessus, carrousel d'applications
   en dessous, comme sur le menu système d'origine.
   =============================================================== */
:root:is([data-theme="dsi"], [data-theme="ds"]) {
    --gw-rail-width: 100%;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) body {
    background-color: #ececec;
    background-image:
        repeating-linear-gradient(0deg, rgba(106, 114, 119, .035) 0 1px, transparent 1px 3px),
        linear-gradient(180deg, #fafafa 0%, #e5e7e8 100%);
}

:root:is([data-theme="dsi"], [data-theme="ds"]) body::before {
    opacity: .65;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .75), transparent 12%, transparent 88%, rgba(255, 255, 255, .75)),
        repeating-linear-gradient(90deg, transparent 0 4px, rgba(72, 80, 84, .025) 4px 5px);
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-app {
    gap: .45rem;
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-topbar {
    border: 1px solid #a8adaf;
    border-radius: .18rem;
    background: linear-gradient(180deg, #fbfbfb, #e5e7e8);
    box-shadow: inset 0 1px #fff, 0 1px 2px rgba(45, 51, 54, .18);
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-layout {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-main {
    order: 2;
    min-width: 0;
    padding: clamp(.7rem, 1.5vw, 1rem);
    border: 2px solid #73787b;
    border-radius: .22rem;
    background: rgba(246, 247, 247, .94);
    box-shadow: inset 0 0 0 3px #d9dcdd, inset 0 0 0 4px #fff, 0 2px 5px rgba(45, 51, 54, .22);
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail {
    position: static;
    order: 1;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__viewport {
    position: relative;
    display: block;
    max-height: none;
    padding-top: 3.15rem;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-dsi-selection {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: grid;
    place-items: center;
    height: 2.7rem;
    border: 2px solid #777b7e;
    border-radius: .32rem;
    color: #303336;
    background: linear-gradient(180deg, #fdfdfd 0%, #e7e7e7 100%);
    box-shadow: inset 0 0 0 2px #cacccd, inset 0 1px #fff, 0 1px 2px rgba(45, 51, 54, .25);
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: .015em;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-dsi-selection::after {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 14px;
    height: 14px;
    content: "";
    border-right: 2px solid #777b7e;
    border-bottom: 2px solid #777b7e;
    background: #e7e7e7;
    transform: translate(-50%, -7px) rotate(45deg);
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__list {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: safe center;
    gap: .55rem;
    max-height: none;
    margin: 0;
    padding: .3rem 2.25rem .7rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__list::-webkit-scrollbar {
    display: none;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__list > li {
    flex: 0 0 clamp(4.3rem, 9vw, 5.6rem);
    scroll-snap-align: center;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__item {
    width: 100%;
    min-height: 0;
    aspect-ratio: 1;
    gap: .18rem;
    padding: .45rem .25rem;
    overflow: hidden;
    border: 2px solid #a2a6a8;
    border-radius: .42rem;
    color: #30383c;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .85), transparent 38%),
        linear-gradient(180deg, #f8f8f8, #d9dcdd);
    box-shadow: inset 0 0 0 2px #f8f8f8, 0 3px 0 #a9adaf, 0 4px 5px rgba(44, 50, 53, .22);
    transform: none;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__item::after {
    position: absolute;
    inset: .34rem;
    z-index: 0;
    border: 1px solid rgba(98, 105, 108, .18);
    border-radius: .22rem;
    content: "";
    pointer-events: none;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__item i {
    z-index: 1;
    color: #30383c;
    font-size: clamp(1.45rem, 3.2vw, 2rem);
    text-shadow: 0 1px #fff;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__label {
    z-index: 1;
    max-width: 100%;
    color: #40474b;
    font-size: .55rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0;
    text-transform: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__item:hover:not(.is-active) {
    border-color: #7f878b;
    color: #20272a;
    background: linear-gradient(180deg, #fff, #e7e9ea);
    box-shadow: inset 0 0 0 2px #fff, 0 3px 0 #93999c, 0 5px 8px rgba(44, 50, 53, .25);
    transform: translateY(-2px);
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__item:hover:not(.is-active)::before {
    content: none;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__item.is-active {
    border-color: #4f656e;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .5), transparent 38%),
        linear-gradient(180deg, #7ec7d7 0%, #4b8fa2 100%);
    box-shadow: inset 0 0 0 2px #dff5f8, 0 3px 0 #365d69, 0 0 0 3px rgba(91, 151, 166, .2), 0 5px 8px rgba(44, 50, 53, .28);
    transform: translateY(-3px);
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__item.is-active i,
:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__item.is-active .gw-rail__label {
    color: #fff;
    text-shadow: 0 1px 1px rgba(31, 70, 80, .75);
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__suite {
    position: absolute;
    z-index: 4;
    top: 3.45rem;
    bottom: .75rem;
    display: grid;
    width: 1.85rem;
    padding: 0;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, #8db8c3, #537e89);
    text-shadow: 0 1px rgba(0, 0, 0, .35);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), 0 1px 3px rgba(40, 48, 51, .35);
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__suite--haut {
    left: 0;
    right: auto;
    border-radius: 0 .28rem .28rem 0;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__suite--bas {
    right: 0;
    left: auto;
    border-radius: .28rem 0 0 .28rem;
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__suite--haut i::before {
    content: "\f284";
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__suite--bas i::before {
    content: "\f285";
}

:root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__suite[hidden] {
    display: none;
}

@media (max-width: 767.98px) {
    :root:is([data-theme="dsi"], [data-theme="ds"]) .gw-app {
        padding-inline: .35rem;
    }

    :root:is([data-theme="dsi"], [data-theme="ds"]) .gw-topbar {
        grid-template-columns: 1fr auto;
    }

    :root:is([data-theme="dsi"], [data-theme="ds"]) .gw-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    :root:is([data-theme="dsi"], [data-theme="ds"]) .gw-rail__list > li {
        flex-basis: 4.25rem;
    }
}

/* Personnalisation du thème 4. */
:root[data-theme-style="theme4"] {
    --gw-primary: #3daee9;
    --gw-primary-rgb: 61, 174, 233;
    --gw-primary-dark: #247eac;
    --gw-secondary: #70c7b5;
    --gw-secondary-rgb: 112, 199, 181;
    --gw-background: #edf7fc;
    --gw-background-accent: #d8edf8;
    --gw-surface: rgba(255, 255, 255, .96);
    --gw-surface-solid: #fff;
    --gw-text: #24343e;
    --gw-muted: #667985;
    --gw-border: #b8d8e9;
    --gw-radius-md: 1rem;
    --gw-radius-lg: 1.2rem;
}
