/* ============================================================
   DESTINY 2 MANAGER — « terminal de Gardien »
   Noir spatial, panneaux chanfreinés, HUD lumineux.
   ============================================================ */

:root {
  --bg0: #06070b;
  --bg1: #0b0e16;
  --panel: rgba(17, 21, 32, 0.88);
  --panel-2: rgba(26, 31, 46, 0.9);
  --line: rgba(130, 145, 185, 0.16);
  --line-strong: rgba(148, 165, 210, 0.35);
  --text: #e9ecf4;
  --dim: #98a1b6;
  --faint: #5d6579;
  --gold: #d8a927;
  --gold-soft: rgba(216, 169, 39, 0.14);
  --blue: #7fc5f2;
  --green: #6fd18b;
  --red: #e0554f;
  --exotic: #ceae33;
  --legendary: #a06bc4;
  --rare: #6c9fd4;
  --common: #b9c0cc;
  --cut: 14px;
  font-size: 15px;
}

* { box-sizing: border-box; margin: 0; }

html { scrollbar-color: #333c52 var(--bg0); }

body {
  background: var(--bg0);
  color: var(--text);
  font-family: "Titillium Web", sans-serif;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Nébuleuse + étoiles */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1000px 600px at 85% -10%, rgba(45, 58, 110, 0.35), transparent 60%),
    radial-gradient(900px 700px at -10% 100%, rgba(24, 60, 74, 0.28), transparent 55%),
    var(--bg0);
}
.stars {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.6;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #cfd8ff 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 74%, #9fb4e8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 63% 31%, #e8ecff 50%, transparent 51%),
    radial-gradient(1px 1px at 81% 62%, #cfd8ff 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 48%, #8fa0cc 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 91% 14%, #dfe6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 88%, #aebde6 50%, transparent 51%),
    radial-gradient(1px 1px at 7% 81%, #dfe6ff 50%, transparent 51%);
  animation: twinkle 9s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 0.75; } }

h1, h2, h3, .display { font-family: "Rajdhani", sans-serif; letter-spacing: 0.08em; }

.hidden { display: none !important; }

/* ---------- primitives ---------- */
.panel-cut {
  background: var(--panel);
  border: 1px solid var(--line);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

.btn {
  display: inline-block; cursor: pointer; text-decoration: none; text-align: center;
  font-family: "Rajdhani", sans-serif; font-weight: 700; letter-spacing: 0.14em;
  padding: 12px 26px; font-size: 14px; border: none;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: filter 0.15s, transform 0.15s;
}
.btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn-gold { background: linear-gradient(120deg, #e3b52f, #b8860b); color: #14161c; }

.btn-ghost-sm {
  background: none; border: 1px solid var(--line); color: var(--dim);
  padding: 6px 10px; cursor: pointer; font-size: 14px; border-radius: 2px;
}
.btn-ghost-sm:hover { color: var(--gold); border-color: var(--gold); }

.action-btn {
  cursor: pointer; font-family: "Rajdhani", sans-serif; font-weight: 600; letter-spacing: 0.1em;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line-strong);
  padding: 10px 16px; font-size: 13px; text-transform: uppercase;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: border-color 0.15s, color 0.15s;
}
.action-btn:hover { border-color: var(--gold); color: var(--gold); }
.action-btn.primary { background: linear-gradient(120deg, #e3b52f, #c9971a); border-color: transparent; color: #14161c; }
.action-btn.primary:hover { color: #000; filter: brightness(1.1); }
.action-btn.danger:hover { border-color: var(--red); color: var(--red); }
.action-btn:disabled { opacity: 0.4; pointer-events: none; }

select, .pe-input, .search {
  background: rgba(10, 13, 20, 0.9); color: var(--text);
  border: 1px solid var(--line); padding: 9px 12px; font-size: 14px;
  font-family: "Titillium Web", sans-serif;
}
select:focus, .pe-input:focus, .search:focus { outline: none; border-color: var(--gold); }

/* ---------- badges & tiers ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em;
  padding: 3px 9px; border: 1px solid var(--line); color: var(--dim);
  background: rgba(10, 13, 20, 0.6); white-space: nowrap;
}
.b-owned   { color: var(--green); border-color: rgba(111, 209, 139, 0.55); }
.b-craft   { color: var(--blue);  border-color: rgba(127, 197, 242, 0.55); }
.b-buy     { color: var(--gold);  border-color: rgba(216, 169, 39, 0.6); background: var(--gold-soft); }
.b-missing { color: var(--red);   border-color: rgba(224, 85, 79, 0.5); }
.b-effort  { color: var(--faint); }

.tier-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; font-family: "Rajdhani", sans-serif;
  font-weight: 700; font-size: 15px;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
.t-s { background: linear-gradient(135deg, #f0c23c, #c08a10); color: #14161c; }
.t-a { background: linear-gradient(135deg, #86c9f5, #4a86bb); color: #0d1420; }
.t-b { background: #3d4457; color: var(--text); }

/* ============================================================
   CONNEXION & CHARGEMENT
   ============================================================ */
.login-screen, .loading-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}
.login-card { max-width: 520px; padding: 56px 48px; animation: rise 0.6s ease both; }
.login-mark { font-size: 34px; color: var(--gold); margin-bottom: 18px; animation: spin-slow 14s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.login-card h1 { font-size: 34px; font-weight: 700; }
.login-card h1 span { color: var(--gold); }
.login-card p { color: var(--dim); margin: 14px 0 30px; line-height: 1.6; }
.login-hint { color: var(--red); font-size: 13px; margin-top: 16px; min-height: 1em; }

.loader-diamond {
  width: 34px; height: 34px; background: var(--gold); margin-bottom: 22px;
  transform: rotate(45deg); animation: pulse-d 1.1s ease-in-out infinite alternate;
}
@keyframes pulse-d { from { opacity: 0.35; transform: rotate(45deg) scale(0.85); } to { opacity: 1; transform: rotate(45deg) scale(1); } }
.loading-screen { flex-direction: column; }
.loading-screen p { color: var(--dim); letter-spacing: 0.08em; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ============================================================
   COQUILLE / BARRE HAUTE
   ============================================================ */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 30px;
  padding: 0 28px; height: 62px;
  background: rgba(8, 10, 16, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(8px);
}
.brand { font-family: "Rajdhani", sans-serif; font-weight: 700; letter-spacing: 0.18em; font-size: 15px; white-space: nowrap; }
.brand-diamond { color: var(--gold); margin-right: 4px; }

.main-nav { display: flex; gap: 6px; margin: 0 auto; height: 100%; }
.nav-btn {
  position: relative; background: none; border: none; cursor: pointer;
  color: var(--dim); font-family: "Rajdhani", sans-serif; font-weight: 600;
  font-size: 15px; letter-spacing: 0.16em; padding: 0 22px; height: 100%;
  border-bottom: 2px solid transparent; transition: color 0.15s;
}
.nav-btn:hover { color: var(--text); }
.nav-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.nav-dot {
  position: absolute; top: 16px; right: 10px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold);
}

.identity { display: flex; align-items: center; gap: 14px; }
.id-text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
#id-name { font-size: 13px; font-weight: 600; }
.id-light { color: var(--gold); font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: 14px; }

.sale-banner {
  background: linear-gradient(90deg, var(--gold-soft), transparent 70%);
  border-bottom: 1px solid rgba(216, 169, 39, 0.35);
  padding: 9px 28px; font-size: 13.5px;
}
.sale-banner b { color: var(--gold); }

/* ============================================================
   VUE ÉQUIPEMENT
   ============================================================ */
.view-gear {
  flex: 1; display: grid; grid-template-columns: 360px 1fr; gap: 22px;
  padding: 22px 28px; align-items: start;
  animation: rise 0.4s ease both;
}

/* — colonne personnage — */
.char-tabs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.char-tab {
  position: relative; height: 64px; cursor: pointer; overflow: hidden;
  border: 1px solid var(--line);
  background-size: cover; background-position: center;
  display: flex; align-items: center; padding-left: 78px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: border-color 0.15s, transform 0.15s;
}
.char-tab::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,6,10,0.15), rgba(5,6,10,0.72) 75%); }
.char-tab:hover { transform: translateX(3px); }
.char-tab.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.char-tab > * { position: relative; z-index: 1; }
.ct-text { margin-left: auto; text-align: right; padding-right: 14px; }
.ct-name { font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: 17px; letter-spacing: 0.1em; text-transform: uppercase; }
.ct-sub { font-size: 12px; color: #cdd5e6; }
.ct-light { color: var(--gold); font-weight: 700; }
.char-tab.vault-tab { background: var(--panel); padding-left: 16px; height: 48px; }
.char-tab.vault-tab .ct-name { font-size: 14px; color: var(--dim); }
.char-tab.vault-tab.active .ct-name { color: var(--gold); }

/* — panneau équipé — */
.equipped-panel { display: flex; flex-direction: column; gap: 18px; }
.eq-subclass {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--line);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.eq-subclass img { width: 46px; height: 46px; }
.eq-sub-name { font-family: "Rajdhani", sans-serif; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 15px; }
.eq-sub-tag { font-size: 12px; color: var(--dim); }

.eq-group-title {
  font-family: "Rajdhani", sans-serif; font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.22em; color: var(--faint); text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.eq-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.eq-rows { display: flex; flex-direction: column; gap: 6px; }
.eq-row {
  display: flex; align-items: center; gap: 12px; padding: 7px 10px 7px 7px;
  background: var(--panel); border: 1px solid var(--line); cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.eq-row:hover { border-color: var(--line-strong); background: var(--panel-2); }
.eq-row img.eq-icon { width: 46px; height: 46px; flex-shrink: 0; }
.eq-row.rar-exotic img.eq-icon { outline: 1px solid var(--exotic); }
.eq-row.rar-legendary img.eq-icon { outline: 1px solid rgba(160, 107, 196, 0.7); }
.eq-info { min-width: 0; flex: 1; }
.eq-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-type { font-size: 11.5px; color: var(--dim); }
.eq-power { font-family: "Rajdhani", sans-serif; font-weight: 700; color: var(--blue); font-size: 15px; }
.eq-power::before { content: "◆"; font-size: 8px; vertical-align: 2px; margin-right: 3px; color: var(--gold); }

/* — colonne inventaire — */
.inv-col { min-width: 0; animation: rise 0.5s 0.06s ease both; }
.inv-toolbar { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; flex-wrap: wrap; }
.inv-tabs { display: flex; gap: 4px; }
.inv-tab {
  background: none; border: 1px solid var(--line); color: var(--dim); cursor: pointer;
  font-family: "Rajdhani", sans-serif; font-weight: 600; font-size: 13.5px; letter-spacing: 0.14em;
  padding: 9px 20px;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.inv-tab.active { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.count-chip { font-size: 11px; color: var(--faint); margin-left: 4px; }
.search { flex: 1; min-width: 200px; max-width: 380px; margin-left: auto; }

.bucket-title {
  font-family: "Rajdhani", sans-serif; font-weight: 600; font-size: 13px;
  letter-spacing: 0.22em; color: var(--faint); text-transform: uppercase;
  margin: 22px 0 10px; display: flex; align-items: center; gap: 12px;
}
.bucket-title:first-child { margin-top: 0; }
.bucket-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, 62px); gap: 8px; }
.tile {
  position: relative; width: 62px; height: 62px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line);
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.tile img { width: 100%; height: 100%; display: block; }
.tile:hover { transform: scale(1.07); z-index: 2; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6); }
.tile .t-power {
  position: absolute; bottom: 0; right: 0; font-family: "Rajdhani", sans-serif;
  font-size: 11px; font-weight: 700; color: #ffe9a8;
  background: rgba(5, 6, 10, 0.82); padding: 0 4px; line-height: 15px;
}
.tile .t-lock { position: absolute; top: 1px; left: 3px; font-size: 9px; }
.tile.rar-exotic { border-color: var(--exotic); }
.tile.rar-legendary { border-color: rgba(160, 107, 196, 0.75); }
.tile.rar-rare { border-color: rgba(108, 159, 212, 0.6); }
.tile.equipped-tile { outline: 2px solid var(--gold); outline-offset: 1px; }

.empty-note { color: var(--faint); font-size: 13.5px; padding: 26px 0; text-align: center; }

/* ============================================================
   VUE MÉTA
   ============================================================ */
.view-meta { flex: 1; padding: 22px 28px 60px; max-width: 1240px; margin: 0 auto; width: 100%; animation: rise 0.4s ease both; }

.meta-hero { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding: 20px 26px; margin-bottom: 22px; }
.mh-kicker { font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: 19px; letter-spacing: 0.12em; }
.mh-kicker span { color: var(--gold); }
.mh-note { color: var(--dim); font-size: 13px; max-width: 640px; margin-top: 6px; line-height: 1.55; }
.mh-right { text-align: right; font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.mh-right b { display: block; color: var(--green); font-size: 13px; }

.meta-steps { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 14px; }
.step-label { font-family: "Rajdhani", sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; color: var(--faint); margin-bottom: 7px; }
.seg { display: flex; gap: 4px; }
.seg-wrap { flex-wrap: wrap; }
.seg button {
  background: var(--panel); border: 1px solid var(--line); color: var(--dim); cursor: pointer;
  font-family: "Rajdhani", sans-serif; font-weight: 600; font-size: 13.5px; letter-spacing: 0.1em;
  padding: 8px 18px; text-transform: uppercase;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.seg button:hover { color: var(--text); border-color: var(--line-strong); }
.seg button.on { color: #14161c; background: linear-gradient(120deg, #e3b52f, #c9971a); border-color: transparent; }

.legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 18px; }
.legend-hint { font-size: 12px; color: var(--faint); }

.meta-subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.subnav-btn {
  background: none; border: none; cursor: pointer; color: var(--dim);
  font-family: "Rajdhani", sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0.16em;
  padding: 10px 20px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.subnav-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

/* — builds — */
.build-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.build-card {
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--gold);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
  animation: rise 0.4s ease both;
}
.build-card.tier-a-card { border-top-color: #6ea8d6; }
.build-card.tier-b-card { border-top-color: #3d4457; }
.bd-head { display: flex; align-items: center; gap: 10px; }
.bd-title { font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase; flex: 1; }
.bd-tags { display: flex; gap: 6px; font-size: 11.5px; color: var(--dim); }
.bd-tag { border: 1px solid var(--line); padding: 2px 8px; }
.bd-summary { font-size: 13.5px; color: var(--dim); line-height: 1.55; }
.bd-check { display: flex; flex-direction: column; gap: 5px; }
.bd-check-row { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 6px 9px; background: rgba(9, 12, 19, 0.6); border: 1px solid var(--line); }
.bd-check-row img { width: 26px; height: 26px; }
.bd-check-row .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-progress { font-size: 12px; color: var(--faint); }
.bd-progress b { color: var(--green); }
.bd-actions { display: flex; gap: 8px; margin-top: 2px; }
.bd-details { border-top: 1px solid var(--line); padding-top: 12px; display: none; flex-direction: column; gap: 9px; }
.build-card.open .bd-details { display: flex; }
.kv { font-size: 13px; line-height: 1.5; }
.kv b {
  display: block; font-family: "Rajdhani", sans-serif; font-weight: 600; font-size: 11px;
  letter-spacing: 0.18em; color: var(--gold); text-transform: uppercase; margin-bottom: 2px;
}
.kv span { color: var(--text); }
.kv small { color: var(--dim); }

/* — armes par tier — */
.tier-section { margin-bottom: 26px; }
.tier-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.tier-big {
  font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: 26px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.tier-head .lbl { color: var(--faint); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; }
.weapon-rows { display: flex; flex-direction: column; gap: 7px; }
.weapon-row {
  display: grid; grid-template-columns: 54px 1.4fr 1fr auto; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); padding: 8px 14px 8px 8px; cursor: pointer;
  transition: border-color 0.12s, transform 0.12s;
}
.weapon-row:hover { border-color: var(--line-strong); transform: translateX(3px); }
.weapon-row img.w-icon { width: 54px; height: 54px; }
.weapon-row.rar-exotic img.w-icon { outline: 1px solid var(--exotic); }
.w-name { font-weight: 600; font-size: 14.5px; }
.w-type { font-size: 12px; color: var(--dim); }
.w-why { font-size: 12.5px; color: var(--dim); line-height: 1.45; }
.w-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }

/* — presets — */
.preset-toolbar { display: flex; gap: 8px; margin-bottom: 16px; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.preset-card { background: var(--panel); border: 1px solid var(--line); padding: 16px 18px; cursor: pointer; transition: border-color 0.12s; }
.preset-card:hover { border-color: var(--gold); }
.pc-name { font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: 16px; letter-spacing: 0.06em; }
.pc-meta { font-size: 12.5px; color: var(--dim); margin: 4px 0 10px; }
.pc-items { display: flex; gap: 5px; flex-wrap: wrap; }
.pc-items img { width: 30px; height: 30px; border: 1px solid var(--line); }
.pc-more { font-size: 11px; color: var(--faint); align-self: center; }

/* ============================================================
   VUE WISHLIST
   ============================================================ */
.view-wishlist { flex: 1; padding: 22px 28px 60px; max-width: 900px; margin: 0 auto; width: 100%; animation: rise 0.4s ease both; }
.wl-section-title { font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: 16px; letter-spacing: 0.16em; text-transform: uppercase; margin: 4px 0 14px; }
.wl-section-title.gold { color: var(--gold); }
.wish-row {
  display: flex; gap: 14px; align-items: center; padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--line); margin-bottom: 9px;
}
.wish-row.buyable-row { border-color: rgba(216, 169, 39, 0.5); background: linear-gradient(100deg, var(--gold-soft), var(--panel) 45%); }
.wish-row img.wi { width: 48px; height: 48px; flex-shrink: 0; }
.wish-noicon { width: 48px; height: 48px; background: var(--panel-2); flex-shrink: 0; }
.wish-mid { flex: 1; min-width: 0; }
.wish-name { font-weight: 600; font-size: 14.5px; }
.wish-src { color: var(--dim); font-size: 12.5px; margin-top: 3px; line-height: 1.5; }
.wish-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.mini-btn { background: none; border: 1px solid var(--line); color: var(--dim); cursor: pointer; padding: 4px 9px; font-size: 12px; min-width: 36px; min-height: 36px; }
.mini-btn:hover { color: var(--gold); border-color: var(--gold); }
.mini-btn.del:hover { color: var(--red); border-color: var(--red); }

/* ============================================================
   TIROIR DÉTAIL
   ============================================================ */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(3, 4, 7, 0.6); z-index: 60; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 96vw); z-index: 61;
  background: var(--bg1); border-left: 1px solid var(--line-strong);
  overflow-y: auto; animation: slide-in 0.24s ease both;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
}
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.dr-hdr { padding: 20px 24px 16px; color: #fff; position: relative; }
.dr-hdr::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,0.025) 3px 4px); pointer-events: none; }
.hdr-exotic { background: linear-gradient(120deg, #a9821c, #6d5410); }
.hdr-legendary { background: linear-gradient(120deg, #4e2d61, #35203f); }
.hdr-rare { background: linear-gradient(120deg, #2f4f75, #223a58); }
.hdr-common { background: linear-gradient(120deg, #383e4d, #262b37); }
.dr-close { position: absolute; top: 4px; right: 6px; z-index: 2; background: none; border: none; color: rgba(255,255,255,0.8); font-size: 24px; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; }
.dr-close:hover { color: #fff; }
.dr-name { font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: 23px; letter-spacing: 0.1em; text-transform: uppercase; }
.dr-sub { display: flex; justify-content: space-between; font-size: 13px; opacity: 0.85; margin-top: 3px; }
.dr-shot { width: 100%; display: block; }
.dr-body { padding: 18px 24px 90px; display: flex; flex-direction: column; gap: 16px; }
.dr-powerline { display: flex; align-items: center; gap: 10px; }
.dr-powerline .dmg-icon { width: 24px; height: 24px; }
.dr-powerline .pv { font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: 30px; color: var(--blue); }
.ammo-tag { font-size: 11.5px; border: 1px solid var(--line-strong); padding: 2px 8px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }

.stat-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stat-list li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.stat-name { width: 128px; color: var(--dim); flex-shrink: 0; text-align: right; }
.stat-bar { flex: 1; height: 9px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.stat-bar span { display: block; height: 100%; background: #dfe5f2; animation: grow 0.5s ease both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.stat-val { width: 30px; text-align: right; font-weight: 600; }
.stat-num-row { justify-content: flex-start; }
.stat-num-row .stat-num { font-weight: 700; margin-left: 8px; }

.perk-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.perk-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; }
.perk-list img { width: 30px; height: 30px; flex-shrink: 0; background: rgba(255,255,255,0.04); border-radius: 50%; }
.perk-list small { color: var(--dim); display: block; }

.flavor { font-style: italic; color: var(--dim); font-size: 13px; border-left: 2px solid var(--gold); padding-left: 12px; line-height: 1.6; }

.dr-actions {
  position: sticky; bottom: 0; margin: 0 -24px -90px; padding: 14px 24px;
  background: rgba(8, 10, 16, 0.95); border-top: 1px solid var(--line);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.dr-actions select { flex: 1; min-width: 120px; }

.kv.buyable b { color: var(--green); }

/* ============================================================
   MODALE PRESET
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 4, 7, 0.7); }
.modal-card { position: relative; padding: 26px 28px; max-width: 520px; width: 94%; max-height: 86vh; overflow-y: auto; }
.modal-close { position: absolute; top: 2px; right: 8px; background: none; border: none; color: var(--dim); font-size: 24px; cursor: pointer; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; }
.modal-close:hover { color: var(--text); }
.modal-card h3 { font-size: 20px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.pe-label { display: block; font-family: "Rajdhani", sans-serif; font-size: 11.5px; font-weight: 600; letter-spacing: 0.18em; color: var(--faint); text-transform: uppercase; margin: 14px 0 5px; }
.pe-input { width: 100%; }
.pe-two { display: flex; gap: 12px; }
.pe-two > div { flex: 1; }
.pe-two select { width: 100%; }
.pe-results { max-height: 150px; overflow-y: auto; }
.pe-hit { padding: 7px 10px; cursor: pointer; font-size: 13px; }
.pe-hit:hover { background: var(--panel-2); color: var(--gold); }
.pe-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: var(--panel-2); margin-top: 5px; font-size: 13px; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

/* ============================================================
   TOASTS
   ============================================================ */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--text);
  padding: 11px 22px; font-size: 13.5px; z-index: 90;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  animation: rise 0.25s ease both;
}
.toast.error { border-color: var(--red); color: var(--red); }
.toast.ok { border-color: var(--green); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1020px) {
  .view-gear { grid-template-columns: 1fr; }
  .char-col { order: -1; }
  .equipped-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .eq-subclass { grid-column: 1 / -1; }
  .weapon-row { grid-template-columns: 44px 1fr auto; }
  .w-why { display: none; }
}
@media (max-width: 920px) {
  .topbar { gap: 14px; padding: 0 16px; }
  .brand { display: none; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 10px; gap: 8px; }
  .main-nav { gap: 2px; }
  .nav-btn { padding: 0 10px; letter-spacing: 0.08em; }
  .view-gear, .view-meta, .view-wishlist { padding: 16px 14px 50px; }
  .equipped-panel { grid-template-columns: 1fr; }
  .meta-hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .mh-right { text-align: left; }
  .identity .id-text { display: none; }
}

/* focus clavier visible sur les éléments interactifs générés */
[role="button"]:focus-visible, .nav-btn:focus-visible, .inv-tab:focus-visible,
.subnav-btn:focus-visible, .seg button:focus-visible, .action-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
