/* AZUR v67 — sac à dos (inventaire). */
.v67-inv-shade { display: grid !important; place-items: center !important; background: radial-gradient(ellipse at center, rgba(16, 10, 44, .55), rgba(6, 4, 20, .82)) !important; backdrop-filter: blur(3px); padding: 16px !important; }
.v67-inv {
  width: min(980px, 100%); max-height: calc(100vh - 32px); overflow: auto; color: #fff; font-family: Barlow, system-ui, sans-serif;
  background: linear-gradient(180deg, rgba(40, 22, 96, .96), rgba(16, 10, 46, .96)); border: 3px solid #fff; border-radius: 18px;
  box-shadow: 0 16px 0 rgba(4, 2, 16, .45), 0 0 0 4px rgba(255, 210, 63, .25); padding: 16px 18px 18px; transition: box-shadow .2s;
}
.v67-inv.drop-out { box-shadow: 0 16px 0 rgba(4, 2, 16, .45), 0 0 0 5px #ff4d5a; }
.v67-inv header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.v67-inv h2 { margin: 0; font: italic 900 30px/1 "Barlow Condensed", Impact, sans-serif; letter-spacing: .04em; text-shadow: 0 3px 0 #120c2a; }
.v67-inv-hint { flex: 1; font-size: 12px; color: #cfc6ff; }
.v67-btn { font: 800 13px/1 Barlow, sans-serif; letter-spacing: .06em; color: #120c2a; background: linear-gradient(180deg, #fff27a, #ffd23f); border: 3px solid #120c2a; border-radius: 10px; padding: 11px 16px; cursor: pointer; box-shadow: 0 4px 0 #b47d00; }
.v67-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b47d00; }
.v67-btn.danger { color: #fff; background: linear-gradient(180deg, #ff7a7a, #d6283f); box-shadow: 0 4px 0 #7a1020; }
.v67-btn.ghost { color: #fff; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .6); box-shadow: none; }
.v67-inv-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.v67-inv-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.v67-slot {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-height: 128px; padding: 8px 6px;
  border: 3px solid rgba(255, 255, 255, .85); border-radius: 12px; color: #fff; cursor: grab; touch-action: none; user-select: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(0, 0, 0, .25)); box-shadow: 0 5px 0 rgba(4, 2, 16, .45); font-family: inherit; transition: transform .12s, box-shadow .12s;
}
.v67-slot.empty { border-style: dashed; border-color: rgba(255, 255, 255, .35); cursor: default; }
.v67-slot.tool { background: linear-gradient(180deg, #5a6a86, #2c3550); cursor: default; }
.v67-slot.r0 { background: linear-gradient(180deg, #a7b4c4, #5b6676); } .v67-slot.r1 { background: linear-gradient(180deg, #6fe08a, #23874a); }
.v67-slot.r2 { background: linear-gradient(180deg, #62b6ff, #1f5fc9); } .v67-slot.r3 { background: linear-gradient(180deg, #c18cff, #6a35c9); }
.v67-slot.r4 { background: linear-gradient(180deg, #ffc35c, #d9761a); }
.v67-slot.gold { border-color: #ffd34d; box-shadow: 0 5px 0 rgba(4, 2, 16, .45), 0 0 18px rgba(255, 211, 77, .75); }
.v67-slot.sel { transform: translateY(-6px); border-color: #fff27a; box-shadow: 0 9px 0 rgba(4, 2, 16, .45), 0 0 0 3px #ffd23f; }
.v67-slot.over { transform: scale(1.06); box-shadow: 0 0 0 4px #5fe3ff; }
.v67-slot.dragging { opacity: .35; }
.v67-slot kbd { position: absolute; left: 7px; top: 6px; font: 800 12px/1 Barlow, sans-serif; color: #fff; background: rgba(0, 0, 0, .35); padding: 3px 6px; border-radius: 5px; }
.v67-slot.eq::after { content: "EN MAIN"; position: absolute; right: 6px; top: 6px; font: 900 9px/1 Barlow, sans-serif; color: #120c2a; background: #fff27a; padding: 3px 5px; border-radius: 4px; }
.v67-slot-ico { flex: 1; display: grid; place-items: center; width: 100%; font-size: 30px; }
.v67-slot-ico svg { width: 78%; max-height: 62px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
.v67-slot b { font: italic 800 13px/1.05 "Barlow Condensed", Impact, sans-serif; text-align: center; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.v67-slot small { font-size: 11px; font-weight: 700; opacity: .9; }
.v67-inv-mats { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.v67-inv-mats span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .2); font-weight: 700; font-size: 13px; }
.v67-inv-mats i { font-style: normal; font-size: 16px; } .v67-inv-mats b { font: italic 900 18px/1 "Barlow Condensed", Impact, sans-serif; }
.v67-inv-detail { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 2px solid rgba(255, 255, 255, .2); }
.v67-inv-big { display: grid; place-items: center; height: 110px; border-radius: 12px; border: 3px solid rgba(255, 255, 255, .85); }
.v67-inv-big svg { width: 72%; max-height: 92px; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35)); }
.v67-inv-big.r0 { background: linear-gradient(180deg, #a7b4c4, #5b6676); } .v67-inv-big.r1 { background: linear-gradient(180deg, #6fe08a, #23874a); }
.v67-inv-big.r2 { background: linear-gradient(180deg, #62b6ff, #1f5fc9); } .v67-inv-big.r3 { background: linear-gradient(180deg, #c18cff, #6a35c9); }
.v67-inv-big.r4 { background: linear-gradient(180deg, #ffc35c, #d9761a); } .v67-inv-big.gold { border-color: #ffd34d; box-shadow: 0 0 22px rgba(255, 211, 77, .7); }
.v67-inv-detail h3 { margin: 0; font: italic 900 24px/1 "Barlow Condensed", Impact, sans-serif; text-shadow: 0 2px 0 #120c2a; }
.v67-inv-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.v67-rar { font: 900 10px/1 Barlow, sans-serif; letter-spacing: .08em; padding: 4px 7px; border-radius: 5px; color: #120c2a; background: #ccd6e0; }
.v67-rar.r1 { background: #6fe08a; } .v67-rar.r2 { background: #62b6ff; } .v67-rar.r3 { background: #c18cff; } .v67-rar.r4 { background: #ffc35c; } .v67-rar.gold { background: #ffd34d; } .v67-rar.eq { background: #fff; }
.v67-stats { display: flex; flex-direction: column; gap: 7px; }
.v67-stat { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #e8e2ff; }
.v67-stat i { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .15); overflow: hidden; } .v67-stat i b { display: block; height: 100%; background: linear-gradient(90deg, #5fe3ff, #ffd23f); }
.v67-stat em { font-style: normal; color: #fff; white-space: nowrap; } .v67-stat-line { grid-template-columns: 70px 1fr; }
.v67-inv-desc { margin: 0; font-size: 13px; color: #e8e2ff; line-height: 1.4; }
.v67-inv-actions { display: flex; gap: 8px; margin-top: auto; } .v67-inv-actions .v67-btn { flex: 1; }
.v67-inv-empty { display: flex; flex-direction: column; gap: 6px; padding: 30px 6px; text-align: center; color: #cfc6ff; } .v67-inv-empty b { color: #fff; font-size: 16px; }
.v67-ghost-card { position: fixed !important; left: 0; top: 0; width: 90px; min-height: 110px !important; z-index: 2147483600; pointer-events: none; opacity: .92; box-shadow: 0 14px 30px rgba(0, 0, 0, .5) !important; }

/* Bouton SAC (mobile) : à gauche de la barre d'objets. */
html body.touch-ui[data-screen="game"] .touch-controls .v67-bag { position: fixed !important; left: calc(50% - 164px) !important; bottom: max(10px, env(safe-area-inset-bottom)) !important; width: 40px !important; height: 40px !important; min-width: 40px !important; min-height: 40px !important; border-radius: 10px !important; pointer-events: auto; background: radial-gradient(circle at 50% 30%, #ffd86b, #c98a12) !important; color: #120c2a !important; border-color: #120c2a !important; }
html body.touch-ui.driving[data-screen="game"] .touch-controls .v67-bag, html body.v67-cine .touch-controls .v67-bag { display: none !important; }
@media (max-width: 760px) and (orientation: landscape) { html body.touch-ui[data-screen="game"] .touch-controls .v67-bag { left: calc(43% - 150px) !important; } }
@media (orientation: portrait) { html body.touch-ui[data-screen="game"] .touch-controls .v67-bag { left: 312px !important; width: 36px !important; min-width: 36px !important; height: 36px !important; min-height: 36px !important; } }

/* Sac sur petit écran : tout tient sans défiler en paysage. */
@media (max-width: 900px), (max-height: 520px) {
  .v67-inv { padding: 10px 12px 12px; border-radius: 14px; }
  .v67-inv h2 { font-size: 22px; } .v67-inv-hint { display: none; }
  .v67-inv header { margin-bottom: 8px; } .v67-inv-body { grid-template-columns: minmax(0, 1fr) 230px; gap: 10px; }
  .v67-inv-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .v67-slot { min-height: 74px; padding: 5px 4px; } .v67-slot-ico svg { max-height: 34px; } .v67-slot b { font-size: 11px; } .v67-slot small { font-size: 9px; }
  .v67-inv-mats { margin-top: 8px; gap: 6px; } .v67-inv-mats span { padding: 5px 8px; font-size: 11px; }
  .v67-inv-detail { padding: 9px; gap: 6px; } .v67-inv-big { height: 64px; } .v67-inv-big svg { max-height: 54px; }
  .v67-inv-detail h3 { font-size: 18px; } .v67-stat { font-size: 10px; grid-template-columns: 58px 1fr auto; gap: 5px; } .v67-btn { padding: 9px 10px; font-size: 11px; }
}
@media (orientation: portrait) { .v67-inv-body { grid-template-columns: 1fr; } }
/* Le sac passe au-dessus de tout le HUD (boutons tactiles compris). */
#overlay:has(.v67-inv-shade) { z-index: 2147483400 !important; }
.v67-slot-ico svg, .v67-slot-ico .weapon-icon { width: 82% !important; height: auto !important; max-height: 62px !important; }
.v67-inv-big svg, .v67-inv-big .weapon-icon { width: 70% !important; height: auto !important; max-height: 92px !important; }
@media (max-width: 900px), (max-height: 520px) { .v67-slot-ico svg, .v67-slot-ico .weapon-icon { max-height: 36px !important; } .v67-inv-big svg, .v67-inv-big .weapon-icon { max-height: 54px !important; } }
