/* =========================================================
   Inventaire — synthèse read-only des ressources du joueur
   ========================================================= */
body.inventory-panel-open { overflow:hidden; }

.inventorySideButton {
    position:relative;
    width:50px;
    max-width:50px;
    height:54px;
    margin:0;
    padding:2px;
    border:1px solid rgba(226,194,112,.72);
    border-radius:8px 0 0 8px;
    background:linear-gradient(180deg,rgba(45,66,83,.97),rgba(16,35,52,.99));
    box-shadow:0 6px 15px rgba(0,0,0,.46),inset 0 1px rgba(255,255,255,.13),0 0 12px rgba(255,194,82,.10);
    cursor:pointer;
    overflow:visible;
}
.inventorySideButton img {
    display:block;
    width:auto;
    max-width:48px;
    height:auto;
    max-height:48px;
    margin:auto;
    object-fit:contain;
    filter:drop-shadow(0 3px 4px rgba(0,0,0,.62));
}
.inventorySideButton:hover,.inventorySideButton:focus-visible {
    outline:0;
    transform:translateX(-2px);
    filter:brightness(1.08);
    box-shadow:0 7px 18px rgba(0,0,0,.52),inset 0 1px rgba(255,255,255,.17),0 0 16px rgba(255,205,99,.20);
}
.inventorySideButton:active { transform:translateX(-1px) scale(.96); }

.inventoryPanel {
    position:fixed;
    inset:0;
    z-index:6570;
    display:none;
    font-family:"Poppins",sans-serif;
}
.inventoryPanel.is-open { display:block; }
.inventoryPanelBackdrop {
    position:absolute;
    inset:0;
    margin:0;
    padding:0;
    border:0;
    background:rgba(0,5,14,.76);
    backdrop-filter:blur(5px);
    -webkit-backdrop-filter:blur(5px);
}
.inventoryPanelDialog {
    position:absolute;
    top:50%;
    left:50%;
    display:flex;
    flex-direction:column;
    width:min(calc(100% - 10px),488px);
    max-height:calc(100dvh - max(10px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    overflow:hidden;
    border:1px solid rgba(220,199,139,.58);
    border-radius:16px;
    background:linear-gradient(180deg,#102e4d 0%,#081f37 56%,#06182c 100%);
    box-shadow:0 20px 60px rgba(0,0,0,.75),inset 0 1px rgba(255,255,255,.09);
    color:#fff;
    transform:translate(-50%,-50%);
}
.inventoryPanelHeader {
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:44px;
    padding:5px 7px 5px 10px;
    border-bottom:1px solid rgba(229,209,153,.22);
    background:linear-gradient(180deg,rgba(30,64,94,.98),rgba(11,39,66,.98));
}
.inventoryPanelTitle {
    display:flex;
    align-items:center;
    gap:6px;
    min-width:0;
}
.inventoryPanelTitle img {
    width:40px;
    height:34px;
    object-fit:contain;
    filter:drop-shadow(0 3px 4px rgba(0,0,0,.55));
}
.inventoryPanelTitle strong {
    color:#fff3ca;
    font-size:18px;
    line-height:1;
}
.inventoryPanelClose {
    flex:0 0 auto;
    width:34px;
    height:34px;
    margin:0;
    padding:0;
    border:1px solid rgba(213,235,251,.28);
    border-radius:11px;
    background:rgba(255,255,255,.06);
    color:#fff;
    font-size:20px;
}
.inventoryPanelBody {
    padding:6px;
    overflow:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    scrollbar-color:rgba(128,210,239,.72) rgba(10,24,39,.42);
    background:
        radial-gradient(circle at 50% 12%,rgba(61,148,209,.11),transparent 40%),
        linear-gradient(180deg,rgba(4,20,37,.22),rgba(2,12,24,.46));
}

.inventoryPanelBody::-webkit-scrollbar {
    width:7px;
}
.inventoryPanelBody::-webkit-scrollbar-track {
    background:rgba(7,19,31,.36);
    border-radius:999px;
}
.inventoryPanelBody::-webkit-scrollbar-thumb {
    border-radius:999px;
    background:linear-gradient(180deg,rgba(116,213,245,.82),rgba(43,124,181,.90));
    border:1px solid rgba(205,241,255,.16);
}
.inventoryPanelBody::-webkit-scrollbar-thumb:hover {
    background:linear-gradient(180deg,rgba(143,224,248,.92),rgba(57,142,196,.96));
}
.inventorySection + .inventorySection {
    margin-top:8px;
    padding-top:7px;
    border-top:1px solid rgba(135,198,234,.16);
}
.inventorySectionHeader {
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:6px;
    margin:0 2px 5px;
}
.inventorySectionHeader strong {
    color:#ffd66f;
    font-size:11.5px;
    font-weight:900;
    letter-spacing:.4px;
    text-transform:uppercase;
}
.inventorySectionHeader small {
    color:#79b9df;
    font-size:8.5px;
    font-weight:800;
}
.inventoryGrid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:5px;
}
.inventoryGrid--currencies { grid-template-columns:repeat(2,minmax(0,1fr)); }
.inventoryItem {
    --inventory-accent:170,203,225;
    position:relative;
    display:flex;
    flex-direction:column;
    align-items:center;
    min-width:0;
    min-height:94px;
    padding:6px 4px 5px;
    border:1px solid rgba(var(--inventory-accent),.28);
    border-radius:10px;
    background:linear-gradient(180deg,rgba(var(--inventory-accent),.09),rgba(0,0,0,.20));
    box-shadow:inset 0 1px rgba(255,255,255,.055),0 4px 10px rgba(0,0,0,.16);
    text-align:center;
}
.inventoryItem[data-accent="small"] { --inventory-accent:82,228,126; }
.inventoryItem[data-accent="medium"] { --inventory-accent:255,176,55; }
.inventoryItem[data-accent="legendary"] { --inventory-accent:186,116,255; }
.inventoryItem[data-accent="supreme"] { --inventory-accent:246,91,72; }
.inventoryItem[data-accent="fire"] { --inventory-accent:255,105,70; }
.inventoryItem[data-accent="water"] { --inventory-accent:71,188,255; }
.inventoryItem[data-accent="air"] { --inventory-accent:186,213,226; }
.inventoryItem[data-accent="earth"] { --inventory-accent:115,209,101; }
.inventoryItem[data-accent="light"] { --inventory-accent:255,224,92; }
.inventoryItem[data-accent="dark"] { --inventory-accent:194,106,255; }
.inventoryItem[data-accent="crystal"] { --inventory-accent:80,194,255; }
.inventoryItem[data-accent="seal"] { --inventory-accent:255,199,75; }
.inventoryItem.is-empty { opacity:.48; }
.inventoryItemVisual {
    display:grid;
    place-items:center;
    width:48px;
    height:42px;
}
.inventoryItemVisual img {
    display:block;
    max-width:46px;
    max-height:40px;
    object-fit:contain;
    filter:drop-shadow(0 4px 5px rgba(0,0,0,.55));
}
.inventoryItem[data-kind="currency"] .inventoryItemVisual img { max-width:36px; max-height:36px; }
.inventoryItem[data-kind="currency"] { min-height:96px; }
.inventoryItemName {
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:20px;
    width:100%;
    margin-top:2px;
    overflow:hidden;
    color:#eaf7ff;
    font-size:9px;
    font-weight:900;
    line-height:1.12;
    text-overflow:ellipsis;
}
.inventoryItemAmount {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:44px;
    min-height:20px;
    margin-top:3px;
    padding:2px 6px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:999px;
    background:rgba(0,0,0,.38);
    color:#fff6d8;
    font-size:12px;
    font-weight:900;
    line-height:1;
}
.inventoryItemMeta {
    min-height:10px;
    margin-top:2px;
    color:#8fc9eb;
    font-size:7.6px;
    font-weight:800;
    line-height:1.1;
}
.inventoryEmptyHint {
    margin:6px 2px 0;
    color:#789ab2;
    font-size:8px;
    font-weight:700;
    line-height:1.35;
    text-align:center;
}

@media (max-width:520px) {
    .inventorySideButton {
        width:48px;
        max-width:48px;
        height:52px;
        border-radius:8px 0 0 8px;
    }
    .inventorySideButton img {
        max-width:45px;
        max-height:45px;
    }
    .inventoryPanelDialog { width:calc(100% - 6px); max-height:calc(100dvh - 6px); }
    .inventoryPanelHeader { min-height:42px; padding:4px 6px 4px 9px; }
    .inventoryPanelTitle strong { font-size:17px; }
    .inventoryPanelTitle img { width:36px; height:31px; }
    .inventoryPanelClose { width:32px; height:32px; font-size:18px; }
    .inventoryPanelBody { padding:5px; }
    .inventoryGrid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; }
    .inventoryGrid--currencies { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .inventoryItem { min-height:88px; padding:5px 3px 4px; border-radius:9px; }
    .inventoryItem[data-kind="currency"] { min-height:90px; }
    .inventoryItemVisual { width:42px; height:36px; }
    .inventoryItemVisual img { max-width:40px; max-height:34px; }
    .inventoryItem[data-kind="currency"] .inventoryItemVisual img { max-width:32px; max-height:32px; }
    .inventoryItemName { min-height:18px; font-size:7px; }
    .inventoryItemAmount { min-width:40px; min-height:18px; font-size:11px; }
    .inventoryItemMeta { min-height:9px; font-size:6px; }
    .inventoryEmptyHint { font-size:6.6px; }
}
@media (max-width:360px) {
    .inventoryPanelDialog { width:calc(100% - 4px); border-radius:13px; }
    .inventoryPanelTitle strong { font-size:16px; }
    .inventoryPanelTitle img { width:34px; height:29px; }
    .inventoryGrid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
    .inventoryItemName { font-size:7px; }
}

.inventoryItem[data-accent="prestige"] { --inventory-accent:186,116,255; }

/* Informations compactes : même bouton bleu que les informations du Shop. */
.inventoryItemInfo {
    position:absolute; top:5px; right:5px; display:grid; place-items:center;
    width:22px; height:22px; padding:0; border:1px solid rgba(157,220,255,.65);
    border-radius:50%; background:rgba(4,31,48,.88); color:#bde9ff;
    font-size:11px; cursor:pointer;
}
.inventoryItemInfo:hover,.inventoryItemInfo:focus-visible,.inventoryItemInfo[aria-expanded="true"] {
    border-color:#e3f7ff; background:#115277; color:#fff;
}
.inventoryItemInfo:focus-visible { outline:2px solid #bde9ff; outline-offset:2px; }
.inventoryItemInfoPopover {
    position:fixed; z-index:100000; box-sizing:border-box;
    width:240px; max-width:calc(100vw - 16px); padding:10px 12px;
    border:1px solid rgba(157,220,255,.65); border-radius:9px;
    background:#082336; color:#d9efff; box-shadow:0 5px 18px rgba(0,0,0,.5);
    font-size:12px; line-height:1.45; text-align:left;
}
