#glossaryTab {
    --gg-safe-top: 0px;

    --gg-bg: rgba(0, 0, 0, 0.35);
    --gg-panel: rgba(255, 255, 255, 0.04);
    --gg-border: rgba(255, 255, 255, 0.10);
    --gg-border2: rgba(255, 255, 255, 0.16);
    --gg-text: rgba(255, 255, 255, 0.88);
    --gg-muted: rgba(255, 255, 255, 0.68);
    --gg-accent: rgba(120, 200, 255, 0.95);
    --gg-warn: rgba(255, 200, 0, 0.95);

    width: 100%;
    height: 100%;
    overflow: auto;

    /* IMPORTANT : on pousse le contenu sous le header recouvrant */
    padding: calc(12px + var(--gg-safe-top)) 12px 12px 12px;
    box-sizing: border-box;

    /* IMPORTANT : scrollIntoView et scrolls “propres” */
    scroll-padding-top: calc(var(--gg-safe-top) + 12px);
}

#glossaryTab .gg-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;

    /* Plus robuste que 50vw (évite les effets chelous selon la taille de fenêtre) */
    width: min(1200px, 92vw);
    margin: 0 auto;
}

/* ------------------------------------------------------------
   Header
------------------------------------------------------------ */

#glossaryTab .gg-header {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--gg-border);
    background: var(--gg-bg);
}

#glossaryTab .gg-title {
    font-weight: 900;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--gg-accent);
    font-size: 16px;
}

#glossaryTab .gg-sub {
    margin-top: 6px;
    color: var(--gg-muted);
    font-size: 13px;
    line-height: 1.35;
}

#glossaryTab .gg-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ------------------------------------------------------------
   Cards / Explorer layout
------------------------------------------------------------ */

#glossaryTab .gg-card {
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--gg-border);
    background: var(--gg-panel);
}

/* ✅ Important : fixe une hauteur au bloc Explorer
   -> la colonne de gauche peut scroller, et elle va jusqu'en bas */
#glossaryTab .gg-card.gg-explorer {
    display: flex;
    flex-direction: column;
    height: clamp(420px, 71vh, 1100px);
    min-height: 0;
}

#glossaryTab .gg-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gg-border);
    margin-bottom: 10px;
}

#glossaryTab .gg-input,
#glossaryTab .gg-select {
    height: 34px;
    border-radius: 12px;
    border: 1px solid var(--gg-border2);
    background: rgba(0, 0, 0, 0.22);
    color: var(--gg-text);
    padding: 0 10px;
    outline: none;
}

#glossaryTab .gg-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

#glossaryTab .gg-input:focus,
#glossaryTab .gg-select:focus {
    border-color: rgba(120, 200, 255, 0.35);
    box-shadow: 0 0 14px rgba(120, 200, 255, 0.16);
}

#glossaryTab .gg-select option {
    color: white;
    background: black;
}

#glossaryTab .gg-input {
    width: 340px;
    max-width: 70vw;
}

#glossaryTab .gg-btn {
    height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(120, 200, 255, 0.30);
    background: rgba(0, 0, 0, 0.18);
    color: var(--gg-text);
    font-weight: 900;
    cursor: pointer;
}

#glossaryTab .gg-btn:hover {
    box-shadow: 0 0 12px rgba(120, 200, 255, 0.18);
}

/* ✅ Le grid prend tout l'espace restant de l'explorer */
#glossaryTab .gg-grid {
    display: grid;
    grid-template-columns: clamp(260px, 28vw, 360px) 1fr;
    align-items: stretch;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0; /* clé pour les scroll internes */
}

#glossaryTab .gg-card.gg-explorer .gg-grid {
    flex: 1 1 auto;
    min-height: 0;
}

/* ✅ Les deux panneaux remplissent la hauteur (gauche = jusqu'en bas) */
#glossaryTab .gg-list,
#glossaryTab .gg-detail {
    border-radius: 14px;
    border: 1px solid var(--gg-border);
    background: rgba(0, 0, 0, 0.18);
    height: 100%;
    box-sizing: border-box;
    max-height: none;
    min-height: 0;
}

#glossaryTab .gg-list {
    padding: 8px;
    overflow: auto;
}

/* Détail : on garde l'overflow, mais on évite la grosse scrollbar visuelle */
#glossaryTab .gg-detail {
    padding: 10px;
    overflow: auto;
}

#glossaryTab .gg-detail::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* ------------------------------------------------------------
   Liste gauche (items)
------------------------------------------------------------ */

#glossaryTab .gg-item {
    width: 100%;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--gg-text);
    cursor: pointer;
    text-align: left;
}

#glossaryTab .gg-item:hover {
    background: rgba(120, 200, 255, 0.07);
    border-color: rgba(120, 200, 255, 0.18);
}

#glossaryTab .gg-item.active {
    background: rgba(120, 200, 255, 0.11);
    border-color: rgba(120, 200, 255, 0.32);
    box-shadow: 0 0 12px rgba(120, 200, 255, 0.12);
}

/* ✅ Correction taille icône (évite les images géantes) */
#glossaryTab .gg-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--gg-border);
    padding: 2px;
    box-sizing: border-box;
}

#glossaryTab .gg-item-icon--empty {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px dashed var(--gg-border2);
    background: rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

#glossaryTab .gg-item-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#glossaryTab .gg-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

#glossaryTab .gg-item-label {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* (anciennes lignes meta supprimées par JS) */
#glossaryTab .gg-item-meta {
    display: none;
}

/* ------------------------------------------------------------
   Détail droite (header)
------------------------------------------------------------ */

#glossaryTab .gg-empty {
    padding: 10px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
}

#glossaryTab .gg-d-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gg-border);
    margin-bottom: 10px;
}

#glossaryTab .gg-d-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

#glossaryTab .gg-d-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: contain;
    padding: 4px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--gg-border);
    box-sizing: border-box;
}

#glossaryTab .gg-d-icon--empty {
    border-style: dashed;
}

#glossaryTab .gg-d-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#glossaryTab .gg-d-name {
    font-weight: 900;
    font-size: 16px;
    color: var(--gg-accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#glossaryTab .gg-d-key {
    display: none; /* demandé */
}

/* ------------------------------------------------------------
   Pills
------------------------------------------------------------ */

#glossaryTab .gg-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 0 16px rgba(120, 200, 255, 0.10);
    font-weight: 900;
    font-size: 12px;
    color: var(--gg-text);
    white-space: nowrap;
}

#glossaryTab .gg-pill-warn {
    border-color: rgba(255, 200, 0, 0.35);
    background: rgba(255, 200, 0, 0.10);
    box-shadow: none;
}

#glossaryTab .gg-pill-gold {
    border-color: rgba(255, 200, 0, 0.35);
    background: rgba(255, 200, 0, 0.08);
    color: rgba(255, 230, 160, 0.95);
    box-shadow: none;
}

/* Tag (panneau détail) un poil plus “premium” */
#glossaryTab .gg-d-right .gg-pill {
    font-size: 13px;
    padding: 7px 12px;
    background: rgba(120, 200, 255, 0.14);
    border-color: rgba(120, 200, 255, 0.35);
    box-shadow: 0 0 18px rgba(120, 200, 255, 0.22);
    margin: 0 3px;
}

/* ------------------------------------------------------------
   Hint
------------------------------------------------------------ */

#glossaryTab .gg-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gg-border);
}

#glossaryTab .gg-hint-text {
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
}

/* ------------------------------------------------------------
   Subtitles / Tables
------------------------------------------------------------ */

#glossaryTab .gg-subtitle {
    margin-top: 12px;
    margin-bottom: 8px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-size: 12px;
}

#glossaryTab .gg-table-wrap {
    overflow: auto;
    border-radius: 12px;
}

#glossaryTab .gg-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: visible; /* ✅ important pour sticky (clipping géré par le wrap) */
    border: 1px solid var(--gg-border);
    background: black;
}

#glossaryTab .gg-table th,
#glossaryTab .gg-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    text-align: left;
    color: rgba(255, 255, 255, 0.82);
}

#glossaryTab .gg-table th {
    background: rgb(0 0 0);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.78);
}

#glossaryTab .gg-table-compact th,
#glossaryTab .gg-table-compact td {
    padding: 6px 8px;
    font-size: 12px;
}

#glossaryTab .gg-rowhead {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.92);
}

/* ------------------------------------------------------------
   Tier pill (générique)
------------------------------------------------------------ */

#glossaryTab .gg-tier {
    --tier-color: #dddddd;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--gg-border2);
    background: rgba(0, 0, 0, 0.16);
    font-weight: 900;
    color: var(--tier-color);
    text-shadow: 0 0 10px color-mix(in srgb, var(--tier-color) 55%, transparent);
}

#glossaryTab .gg-tier::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--tier-color);
    box-shadow: 0 0 10px var(--tier-color);
    display: inline-block;
}

#glossaryTab .gg-tier-star {
    color: gold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.55);
}

/* ------------------------------------------------------------
   Meta blocks (Sources / Poids / Overrides)
------------------------------------------------------------ */

#glossaryTab .gg-meta {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#glossaryTab .gg-meta-line {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    align-items: start;
}

#glossaryTab .gg-meta-k {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.76);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-size: 11px;
    padding-top: 2px;
}

#glossaryTab .gg-meta-v {
    color: rgba(255, 255, 255, 0.82);
    min-width: 0;
}

#glossaryTab .gg-sources {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#glossaryTab .gg-sources-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
    align-items: center;
}

#glossaryTab .gg-sources-label {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

#glossaryTab .gg-sources-value {
    color: rgba(255, 255, 255, 0.84);
    font-size: 12px;
}

/* Icônes d’armes (Sources + Overrides) */
#glossaryTab .gg-weaponIcons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

#glossaryTab .gg-weaponIconItem {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 1px solid var(--gg-border);
    background: rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#glossaryTab .gg-weaponIcon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    image-rendering: auto;
}

#glossaryTab .gg-weaponFallback {
    font-weight: 900;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.82);
}

/* ------------------------------------------------------------
   Tiers table inside stat detail (T10 -> T1 color)
------------------------------------------------------------ */

#glossaryTab .gg-tier-cell {
    --gg-tier-color: rgba(255, 255, 255, 0.78);
}

#glossaryTab .gg-tier-cell--tier {
    font-weight: 900;
    color: var(--gg-tier-color);
    white-space: nowrap;
}

#glossaryTab .gg-tier-cell--tier::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--gg-tier-color);
    box-shadow: 0 0 12px var(--gg-tier-color);
    margin-right: 8px;
    vertical-align: -1px;
}

/* ------------------------------------------------------------
   DETAILS (accordion)
------------------------------------------------------------ */

#glossaryTab .gg-details {
    padding: 0;
}

#glossaryTab .gg-details > summary {
    cursor: pointer;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.92);
    padding: 12px 14px;
    border-radius: 16px;
    list-style: none;
    user-select: none;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    border: 1px solid rgba(255, 255, 255, 0.10);
    background:
        radial-gradient(circle at 10% 0%, rgba(120, 200, 255, 0.14), transparent 55%),
        radial-gradient(circle at 90% 0%, rgba(255, 200, 0, 0.10), transparent 55%),
        rgba(0, 0, 0, 0.16);

    box-shadow: 0 0 18px rgba(0, 0, 0, 0.28);
    position: relative;
}

#glossaryTab .gg-details > summary::after {
    content: "›";
    font-size: 18px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.65);
    transform: rotate(0deg);
    transition: transform 180ms ease, color 180ms ease;
    flex: 0 0 auto;
}

#glossaryTab .gg-details[open] > summary::after {
    transform: rotate(90deg);
    color: rgba(120, 200, 255, 0.85);
}

#glossaryTab .gg-summary-title {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    font-family: "Audiowide", system-ui, sans-serif;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-size: 22px;
}

#glossaryTab .gg-summary-badge {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(120, 200, 255, 0.22);
    background: rgba(120, 200, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

#glossaryTab .gg-details[open] > summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid var(--gg-border);
}

#glossaryTab .gg-details-body {
    padding: 14px;
}

#glossaryTab .gg-note {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.4;
}

/* ------------------------------------------------------------
   Allowed stats (pills) - aligné sur StatsGlossaryUI.js
   (laissé pour compat si tu réactives un ancien rendu)
------------------------------------------------------------ */

#glossaryTab .gg-section-title {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-size: 12px;
    margin: 6px 0 10px 0;
}

#glossaryTab .gg-allowed-root {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#glossaryTab .gg-allowed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#glossaryTab .gg-allowed-grid--weapons {
    grid-template-columns: 1fr 1fr;
}

#glossaryTab .gg-allowed-group {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

#glossaryTab .gg-allowed-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    list-style: none;
}

#glossaryTab .gg-allowed-summary::-webkit-details-marker {
    display: none;
}

#glossaryTab .gg-allowed-name {
    font-weight: 900;
    color: var(--gg-accent);
    font-size: 14px;
}

#glossaryTab .gg-allowed-count {
    min-width: 34px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid var(--gg-border2);
    background: rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
}

#glossaryTab .gg-allowed-body {
    padding: 10px 12px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#glossaryTab .gg-allowed-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#glossaryTab .gg-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.16);
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    font-weight: 900;
    font-size: 12px;
}

#glossaryTab .gg-stat-pill:hover {
    border-color: rgba(120, 200, 255, 0.28);
    box-shadow: 0 0 12px rgba(120, 200, 255, 0.10);
}

#glossaryTab .gg-pill-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 6px;
}

#glossaryTab .gg-pill-label {
    white-space: nowrap;
}

/* ------------------------------------------------------------
   Allowed stats (matrix) — VERSION CLEAN (sticky + scroll)
------------------------------------------------------------ */

#glossaryTab .gg-allowedMatrixRoot {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ✅ Le conteneur du tableau devient la zone de scroll (pour sticky vertical) */
#glossaryTab .gg-allowedMatrixWrap {
    border-radius: 14px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;

    /* ✅ comme tu veux : jamais plus grand que 85vh (donc sticky utile) */
    max-height: min(85vh, 900px);
}

/* ✅ Tableau plus large que le conteneur => scroll horizontal + noms en entier */
#glossaryTab .gg-allowedMatrix {
    table-layout: auto;
    width: max-content;
    min-width: 100%;

    /* ✅ override du .gg-table pour éviter les soucis sticky */
    overflow: visible;
}

#glossaryTab .gg-allowedMatrix th,
#glossaryTab .gg-allowedMatrix td {
    text-align: center;
    vertical-align: middle;
}

#glossaryTab .gg-allowed-thGroup {
    text-align: center;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
    background:
        radial-gradient(circle at 50% 140%, rgba(120, 200, 255, 0.20), transparent 60%),
        rgba(0, 0, 0, 0.18);
}

#glossaryTab .gg-allowed-thGroup--equip {
    background: #5a6663 !important;
    color: #ffffff !important;
}

#glossaryTab .gg-allowed-thGroup--weapon {
    background:
        radial-gradient(circle at 50% 140%, rgba(255, 170, 80, 0.14), transparent 60%),
        rgba(0, 0, 0, 0.18);
}

/* ✅ Colonne "Stat" sticky horizontal */
#glossaryTab .gg-allowed-thStat {
    text-align: left;
    width: 320px;
    position: sticky;
    left: 0;
    z-index: 6;
    background:
        radial-gradient(circle at 30% 120%, rgba(120, 200, 255, 0.12), transparent 55%),
        rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#glossaryTab .gg-allowed-tdStat {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 2;
    background: rgb(0 0 0) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* ✅ Colonnes sources plus larges => nom complet */
#glossaryTab .gg-allowed-thSource {
    padding: 8px 8px;
    min-width: 170px;
    background: rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Head cell layout */
#glossaryTab .gg-srcHead {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

#glossaryTab .gg-srcIconBox {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.20);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#glossaryTab .gg-srcIcon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

#glossaryTab .gg-srcFallback {
    font-weight: 900;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.82);
}

/* ✅ noms complets */
#glossaryTab .gg-srcLabelRow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: none;
}

#glossaryTab .gg-srcLabel {
    font-weight: 900;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.88);
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    max-width: none;
}

#glossaryTab .gg-srcCount {
    min-width: 26px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.80);
}

/* ✅ Sticky header (2 lignes) */
#glossaryTab .gg-allowedMatrix thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
    background: black;
    height: 26px;
}

/* 2e ligne sticky sous la 1ère (hauteur mesurée en JS) */
#glossaryTab .gg-allowedMatrix thead tr:nth-child(2) th {
    top: var(--gg-allowed-head1-h, 38px);
    z-index: 5;
}

/* 1ère ligne au-dessus */
#glossaryTab .gg-allowedMatrix thead tr:first-child th {
    z-index: 6;
}

/* Coin haut-gauche (Stat) au-dessus de tout */
#glossaryTab .gg-allowedMatrix thead th.gg-allowed-thStat {
    z-index: 9;
}

/* Les sources de la 2e ligne au-dessus du body */
#glossaryTab .gg-allowedMatrix thead tr:nth-child(2) th.gg-allowed-thSource {
    z-index: 8;
}

/* Bouton stat */
#glossaryTab .gg-allowed-statBtn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

#glossaryTab .gg-allowed-statBtn:hover {
    border-color: rgba(120, 200, 255, 0.22);
    background: rgba(120, 200, 255, 0.06);
    box-shadow: 0 0 14px rgba(120, 200, 255, 0.10);
}

#glossaryTab .gg-allowed-statBtn:focus-visible {
    outline: none;
    border-color: rgba(120, 200, 255, 0.42);
    box-shadow: 0 0 0 2px rgba(120, 200, 255, 0.16), 0 0 14px rgba(120, 200, 255, 0.10);
}

#glossaryTab .gg-allowed-statIcon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 6px;
    flex: 0 0 auto;
}

#glossaryTab .gg-allowed-statIcon--empty {
    border: 1px dashed rgba(255, 255, 255, 0.20);
    background: rgba(0, 0, 0, 0.18);
}

#glossaryTab .gg-allowed-statLabel {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.90);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ✓ / ✕ */
#glossaryTab .gg-allowCell {
    font-weight: 900;
}

#glossaryTab .gg-allowMark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 22px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.14);
}

#glossaryTab .gg-allowCell.is-yes .gg-allowMark {
    border-color: rgba(120, 255, 210, 0.22);
    background: rgba(120, 255, 210, 0.08);
}

#glossaryTab .gg-allowCell.is-no .gg-allowMark {
    border-color: rgba(255, 120, 120, 0.18);
    background: rgba(255, 120, 120, 0.05);
}

#glossaryTab .gg-allow-yes {
    color: rgba(140, 255, 220, 0.92);
    text-shadow: 0 0 10px rgba(140, 255, 220, 0.22);
}

#glossaryTab .gg-allow-no {
    color: rgba(255, 150, 150, 0.55);
    text-shadow: none;
}

/* Un petit “premium hover” sur la ligne */
#glossaryTab .gg-allowedMatrix tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}
#glossaryTab .gg-allowedMatrix tbody tr:hover .gg-allowed-tdStat {
    background: rgb(0 0 0);
}

#glossaryTab .gg-tier-head {
    font-weight: 900;
    color: color-mix(in srgb, var(--gg-tier-color) 88%, rgba(255, 255, 255, 0.90));
    text-shadow: 0 0 10px color-mix(in srgb, var(--gg-tier-color) 35%, transparent);
}


/* ------------------------------------------------------------
   Glossaire — Poids des tiers : couleurs tiers + raretés
------------------------------------------------------------ */

#glossaryTab .gg-tierWeights {
    table-layout: fixed;
}

#glossaryTab .gg-tierWeights thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

#glossaryTab .gg-tierWeights thead .gg-tierw-th-rarity {
    z-index: 3;
}

#glossaryTab .gg-tierWeights .gg-tierw-th,
#glossaryTab .gg-tierWeights .gg-tierw-td {
    text-align: center;
    vertical-align: middle;
}

#glossaryTab .gg-tierWeights .gg-tierw-th-rarity,
#glossaryTab .gg-tierWeights .gg-tierw-rarity {
    text-align: left;
    width: 180px;
}

#glossaryTab .gg-tierWeights .gg-tierw-row.is-unused {
    opacity: 0.45;
    filter: grayscale(0.75);
}

/* ---- Raretés (couleurs) ---- */
#glossaryTab .gg-tierWeights [data-rarity="common"] { --rarity-color: var(--rarity-common, #c8c8c8); }
#glossaryTab .gg-tierWeights [data-rarity="uncommon"] { --rarity-color: var(--rarity-uncommon, #55aef7); }
#glossaryTab .gg-tierWeights [data-rarity="rare"] { --rarity-color: var(--rarity-rare, #0007c6); }
#glossaryTab .gg-tierWeights [data-rarity="epic"] { --rarity-color: var(--rarity-epic, #b455ff); }
#glossaryTab .gg-tierWeights [data-rarity="legendary"] { --rarity-color: var(--rarity-legendary, #ffb000); }
#glossaryTab .gg-tierWeights [data-rarity="unique"] { --rarity-color: var(--rarity-unique, #ff4b4b); }

#glossaryTab .gg-rarityPill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.16);
}

#glossaryTab .gg-rarityDot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--rarity-color, #dddddd);
    box-shadow: 0 0 10px var(--rarity-color, #dddddd);
    display: inline-block;
}

#glossaryTab .gg-rarityText {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.92);
}

#glossaryTab .gg-rarityUnused {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ---- Tiers (couleurs) ---- */
#glossaryTab .gg-tierWeights [data-tier="1"] { --tier-color: #FFCC00; }
#glossaryTab .gg-tierWeights [data-tier="2"] { --tier-color: #F2C925; }
#glossaryTab .gg-tierWeights [data-tier="3"] { --tier-color: #E8C848; }
#glossaryTab .gg-tierWeights [data-tier="4"] { --tier-color: #E1C867; }
#glossaryTab .gg-tierWeights [data-tier="5"] { --tier-color: #DCCA84; }
#glossaryTab .gg-tierWeights [data-tier="6"] { --tier-color: #DACE9F; }
#glossaryTab .gg-tierWeights [data-tier="7"] { --tier-color: #DBD3B6; }
#glossaryTab .gg-tierWeights [data-tier="8"] { --tier-color: #DEDACB; }
#glossaryTab .gg-tierWeights [data-tier="9"] { --tier-color: #E4E3DE; }
#glossaryTab .gg-tierWeights [data-tier="10"] { --tier-color: #EDEDED; }

/* Colorise un peu l'entête des tiers */
#glossaryTab .gg-tierWeights thead .gg-tierw-th[data-tier] {
    color: rgba(255, 255, 255, 0.88);
    background:
        radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--tier-color) 40%, transparent), transparent 60%),
        rgba(0, 0, 0, 0.18);
}

/* ---- Cellules avec barre de poids ---- */
#glossaryTab .gg-weightCell {
    position: relative;
    height: 18px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
}

#glossaryTab .gg-weightBar {
    position: absolute;
    inset: 0;
    width: var(--w, 0%);
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--tier-color) 55%, transparent),
        color-mix(in srgb, var(--tier-color) 25%, transparent)
    );
    box-shadow: 0 0 10px color-mix(in srgb, var(--tier-color) 45%, transparent);
}

#glossaryTab .gg-weightText {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 900;
    line-height: 18px;
    color: color-mix(in srgb, var(--tier-color) 78%, rgba(255, 255, 255, 0.92));
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.55);
}

/* Case “dominante” (max par rareté) */
#glossaryTab .gg-tierWeights .gg-tierw-td.is-max .gg-weightCell {
    border-color: color-mix(in srgb, var(--tier-color) 55%, rgba(255, 255, 255, 0.12));
    box-shadow: 0 0 14px color-mix(in srgb, var(--tier-color) 35%, transparent);
}

/* ------------------------------------------------------------
   Responsive
------------------------------------------------------------ */

@media (max-width: 980px) {
    #glossaryTab .gg-wrap {
        width: min(980px, 94vw);
    }

    #glossaryTab .gg-grid {
        grid-template-columns: 1fr;
    }

    #glossaryTab .gg-input {
        width: 100%;
        max-width: 100%;
    }

    #glossaryTab .gg-card.gg-explorer {
        height: clamp(420px, 85vh, 900px);
    }

    #glossaryTab .gg-allowed-grid,
    #glossaryTab .gg-allowed-grid--weapons {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------
   FIX: taille des images dans "Overrides"
   (évite que les PNG d'armes s'affichent en énorme)
------------------------------------------------------------ */

#glossaryTab .gg-overrides {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Un override = “chip” compacte */
#glossaryTab .gg-ovItem {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.16);
}

/* Boîte d'icône (crop + centrage) */
#glossaryTab .gg-ovIconBox {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    /* border: 1px solid var(--gg-border); */
    background: rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* L’image elle-même (contrainte) */
#glossaryTab .gg-ovIcon {
    width: 50px;
    height: 50px;
    max-width: 18px;
    max-height: 18px;
    object-fit: contain;
    display: block;
}

/* Fallback texte si pas d’icône */
#glossaryTab .gg-ovFallback {
    font-weight: 900;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.82);
}

#glossaryTab .gg-ovLabel {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
}

#glossaryTab .gg-ovValue {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
    padding-left: 2px;
}

/* Sécurité : si jamais tes Overrides contiennent un <img> sans classe gg-ovIcon */
#glossaryTab .gg-overrides img {
    max-width: 50px;
    max-height: 50px;
    object-fit: contain;
}

/* ------------------------------------------------------------
   Info-bulle (Poids)
   - Tooltip "portail" en position:fixed (pas coupée par les overflow)
------------------------------------------------------------ */

#glossaryTab .gg-weightMeta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#glossaryTab .gg-infoBtn {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(120, 200, 255, 0.35);
    background: rgba(0, 0, 0, 0.28);
    color: rgba(255, 255, 255, 0.88);
    font-weight: 900;
    font-size: 12px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    user-select: none;
}

#glossaryTab .gg-infoBtn:hover {
    box-shadow: 0 0 12px rgba(120, 200, 255, 0.18);
}

#glossaryTab .gg-infoBtn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(120, 200, 255, 0.30);
}

#ggGlossaryTooltip.gg-tooltip {
    position: fixed;
    z-index: 99999;
    max-width: min(340px, calc(100vw - 24px));
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(120, 200, 255, 0.26);
    background: rgba(0, 0, 0, 0.88);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    line-height: 1.35;
    white-space: pre-line;
    pointer-events: none;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.60);
}
