/* Créateur de stuff (assets/stuff.js) : capital à gauche, personnage et cases au centre,
   caractéristiques à droite, onglets en dessous. Couleurs et cartes du thème. */
.st { --st-ok: #4ade80; --st-ko: #ff7a6b; --st-plus: #6fe39a; --st-moins: #ff8f80; --aura: var(--or);
  display: flex; flex-direction: column; gap: 14px; container-type: inline-size; }
.st [hidden] { display: none !important; }
.st h3, .st h4 { margin: 0; font-family: var(--f-titre); font-weight: 600; color: #fff; }
.st-carte { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; min-width: 0; }
.st-mut { color: var(--mut); font-size: 13px; margin: 6px 0; }
.st-i { width: 18px; height: 18px; object-fit: contain; flex: none; vertical-align: -4px; }
.st-i.gris { filter: grayscale(1); opacity: .6; }
.fm-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.st input, .st select, .st textarea { background: var(--inset); color: var(--txt); border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; font-size: 14px; font-weight: 700; color-scheme: dark; }
.st input:focus-visible, .st select:focus-visible, .st button:focus-visible, .st textarea:focus-visible,
.st-choix input:focus-visible, .st-choix select:focus-visible, .st-choix button:focus-visible { outline: 2px solid var(--or); outline-offset: 1px; }
.st button { font-family: inherit; }
.st-b { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--txt); font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.st-b:hover { background: rgba(255,255,255,.1); border-color: rgba(245,166,35,.35); }
.st-b.or { background: var(--or); border-color: var(--or); color: #1a1004; }
.st-b.or:hover { background: var(--or-hi); }
.st-b.danger { color: #ff9b9b; }
.st-b.danger:hover { background: rgba(255,107,107,.12); border-color: rgba(255,107,107,.4); }
.st-seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--inset); border: 1px solid var(--line); flex-wrap: wrap; }
.st-seg button { padding: 6px 11px; border: 0; border-radius: 8px; background: none; color: var(--mut); font-size: 13px; font-weight: 800; cursor: pointer; }
.st-seg button:hover { color: var(--txt); }
.st-seg button.on { background: rgba(245,166,35,.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(245,166,35,.4); }
.st-seg small { color: var(--mut); font-weight: 700; }

/* En-tête */
.st-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.st-nom { flex: 1 1 240px; min-width: 0; padding: 10px 14px !important; border-radius: 12px !important; background: var(--card) !important; font: 600 17px var(--f-titre) !important; }
.st-mes select { max-width: 280px; padding: 10px 12px; border-radius: 12px; background: var(--card); cursor: pointer; }
.st-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.st-alerte { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(160deg, rgba(245,166,35,.16), rgba(245,166,35,.05)); border: 1px solid rgba(245,166,35,.35); font-size: 14px; font-weight: 700; }

/* Grille principale */
.st-grille { display: grid; grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(280px, 330px); gap: 14px; align-items: start; }

/* Personnage */
.st-perso { display: flex; flex-direction: column; gap: 14px; position: relative; }
.st-classe { display: flex; align-items: center; gap: 10px; }
.st-portrait { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--inset); color: var(--txt); cursor: pointer; text-align: left; }
.st-portrait:hover { border-color: rgba(245,166,35,.45); }
.st-portrait img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: rgba(255,255,255,.04); flex: none; }
.st-portrait span { font: 600 16px var(--f-titre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-portrait i { font-style: normal; color: var(--mut); font-size: 12px; }
.st-sexe { display: flex; flex-direction: column; gap: 4px; }
.st-sexe button { width: 34px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: var(--inset); color: var(--mut); font-size: 15px; cursor: pointer; }
.st-sexe button.on { color: var(--or-hi); border-color: rgba(245,166,35,.45); background: rgba(245,166,35,.12); }
.st-classes { position: absolute; z-index: 30; left: 12px; right: 12px; top: 78px; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; padding: 10px;
  background: var(--card-hi); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.5); max-height: 380px; overflow: auto; }
.st-classes button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--txt); cursor: pointer; }
.st-classes button:hover { background: rgba(255,255,255,.06); }
.st-classes button.on { border-color: rgba(245,166,35,.5); background: rgba(245,166,35,.1); }
.st-classes img { width: 44px; height: 44px; object-fit: contain; }
.st-classes small { font-size: 11px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-apparence { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: var(--inset); font-size: 13px; font-weight: 800; color: var(--mut); }
.st-tetes, .st-couleurs { display: flex; align-items: center; gap: 6px; }
.st-tetes span, .st-couleurs span { width: 64px; flex: none; }
.st-tetes b { min-width: 56px; text-align: center; color: var(--txt); font-variant-numeric: tabular-nums; }
.st-tetes button, .st-coul-def { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt); font-weight: 800; cursor: pointer; }
.st-tetes button:hover, .st-coul-def:hover { border-color: var(--or); color: var(--or-hi); }
.st-coul { position: relative; width: 24px; height: 24px; border-radius: 50%; background: var(--c); border: 2px solid rgba(255,255,255,.25); cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.st-coul:hover { border-color: #fff; }
.st-coul.on { border-color: #fff; box-shadow: 0 0 0 2px var(--or), 0 1px 3px rgba(0,0,0,.4); }
.st-hexa { display: flex; align-items: center; gap: 6px; }
.st-hexa label { width: 64px; flex: none; }
.st-hexa label b { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 4px; border-radius: 50%; background: rgba(245,166,35,.16); color: var(--or-hi); font-size: 11px; }
.st-hexa input { width: 110px; padding: 5px 8px !important; font: 700 13px ui-monospace, Consolas, monospace !important; text-transform: lowercase; }
.st-hexa input.ko { border-color: var(--st-ko) !important; color: #ff9b9b; }
.st-coul input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; }
.st-niv { display: grid; grid-template-columns: auto 80px; gap: 6px 10px; align-items: center; }
.st-niv label { font: 600 14px var(--f-titre); }
.st-niv input[type=number] { width: 80px; text-align: center; font: 600 18px var(--f-titre); padding: 5px; }
.st-niv input[type=range] { grid-column: 1 / -1; width: 100%; padding: 0; border: 0; background: none; accent-color: var(--or); }
.st-capital { display: flex; flex-direction: column; gap: 6px; }
.st-cap-t { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--mut); }
.st-cap-t > b { font: 600 14px var(--f-titre); color: #fff; }
.st-cap-t span b { font: 600 18px var(--f-titre); color: var(--or-hi); }
.st-cap-t span b.zero { color: var(--st-ok); } .st-cap-t span b.neg { color: var(--st-ko); }
/* Confirmation « remplacer par la panoplie » */
.st-modal { z-index: 1400; }
.st-confirme { width: min(520px, 100%); display: flex; flex-direction: column; gap: 10px; }
.st-confirme h3 { margin: 0; font: 600 18px var(--f-titre); color: #fff; }
.st-confirme p { margin: 0; color: var(--mut); font-size: 14px; }
.st-conf-l { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.st-conf-l li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; background: var(--inset); font-size: 13.5px; }
.st-conf-case { min-width: 72px; color: var(--mut); font-weight: 800; font-size: 12px; }
.st-conf-l s { color: #ff9b9b; } .st-conf-l b { color: #9ff0bd; } .st-conf-l em { color: var(--or-hi); font-style: normal; }
.st-conf-b { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.st-cap-note { margin: 2px 0 0; font-size: 12px; font-weight: 700; color: var(--or-hi); }
.st-pm[disabled], .st-max[disabled] { opacity: .35; cursor: default; }
.st-cap-barre { height: 6px; border-radius: 99px; background: var(--inset); overflow: hidden; }
.st-cap-barre i { display: block; height: 100%; background: linear-gradient(90deg, var(--or), var(--or-hi)); transition: width .2s; }
.st-cap-barre i.neg { background: var(--st-ko); }
.st-caracs { display: flex; flex-direction: column; gap: 6px; }
.st-carac { display: grid; grid-template-columns: 26px minmax(48px, 1fr) 26px auto auto; grid-template-areas: "n n n n p" "m i pl x x"; align-items: center; gap: 5px 4px;
  padding: 7px 8px 7px 10px; border-radius: 11px; background: var(--inset); border-left: 3px solid var(--c); }
.st-carac-n { grid-area: n; display: flex; align-items: baseline; gap: 6px; font-size: 13.5px; font-weight: 800; min-width: 0; color: var(--c); }
.st-carac-n small { font-size: 10.5px; color: var(--mut); font-weight: 700; white-space: nowrap; }
.st-carac [data-moins] { grid-area: m; } .st-carac [data-plus] { grid-area: pl; } .st-carac .st-max { grid-area: x; justify-self: start; } .st-carac .st-parcho { grid-area: p; justify-self: end; }
.st-carac input[type=number][data-base] { grid-area: i; width: 100%; min-width: 0; padding: 5px 4px; text-align: center; font-variant-numeric: tabular-nums; }
.st-pm { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt); font-weight: 800; cursor: pointer; }
.st-pm:hover { border-color: var(--c); color: var(--c); }
.st-max { padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: var(--mut); font-size: 11px; font-weight: 800; cursor: pointer; text-transform: uppercase; }
.st-max:hover { color: var(--or-hi); }
.st-parcho { display: flex; align-items: center; gap: 2px; font-size: 13px; }
.st-parcho input { width: 46px; padding: 4px 3px !important; text-align: center; font-size: 12px !important; }
.st-raccourcis { display: flex; flex-wrap: wrap; gap: 6px; }
.st-raccourcis .st-b { padding: 6px 10px; font-size: 12px; }
.st-jets { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mut); font-weight: 700; }

/* Mannequin */
.st-mannequin { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px;
  background: radial-gradient(120% 70% at 50% 30%, color-mix(in srgb, var(--aura) 13%, transparent), transparent 62%), var(--card); }
.st-mannequin::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle at 20% 15%, rgba(255,255,255,.08) 0 1px, transparent 1.5px), radial-gradient(circle at 70% 60%, rgba(255,255,255,.06) 0 1px, transparent 1.5px), radial-gradient(circle at 40% 85%, rgba(255,255,255,.05) 0 1px, transparent 1.5px);
  background-size: 140px 140px, 190px 190px, 230px 230px; }
.st-equip { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.st-col { display: flex; flex-direction: column; gap: 12px; }
.st-centre { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center; }
.st-scene { position: relative; width: min(250px, 100%); aspect-ratio: 5 / 6; margin-top: 10px; }
.st-scene img, .st-scene canvas { position: absolute; pointer-events: none; }
.st-quadrillage { left: -14%; width: 128%; bottom: -6%; opacity: .55; }
.st-socle { left: 15%; width: 70%; bottom: 0; filter: drop-shadow(0 14px 18px rgba(0,0,0,.5)); }
.st-lumiere { left: 4%; width: 92%; top: -10%; opacity: .7; mix-blend-mode: screen; }
.st-rendu { left: 0; width: 100%; bottom: 17%; filter: drop-shadow(0 6px 6px rgba(0,0,0,.45)); transition: opacity .2s; }
.st-rendu.charge { opacity: .55; }
.st-rendu.repli { left: 22%; width: 56%; bottom: 38%; border-radius: 50%; }
.st-tourner { position: absolute; left: 0; right: 0; bottom: 4%; display: flex; justify-content: space-between; padding: 0 2%; }
.st-tourner button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: rgba(9,17,26,.7); color: var(--txt); font-size: 16px; cursor: pointer; }
.st-tourner button:hover { border-color: var(--or); color: var(--or-hi); }
.st-ident b { display: block; font: 700 19px/1.15 var(--f-titre); color: #fff; overflow-wrap: anywhere; }
.st-ident span { font-size: 13px; color: var(--mut); font-weight: 700; }
.st-els { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.st-els span { padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.st-els span.vide { --c: var(--mut); }
.st-pb { padding: 5px 12px; border-radius: 99px; border: 1px solid rgba(255,122,107,.45); background: rgba(255,122,107,.12); color: #ffb0a6; font-size: 12px; font-weight: 800; cursor: pointer; }
.st-ok { font-size: 12px; font-weight: 800; color: var(--st-ok); }
.st-ligne { position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.st-dofus { padding-top: 12px; border-top: 1px solid var(--line); }
.st-case { position: relative; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.st-case > small { width: 100%; font-size: 10.5px; font-weight: 700; color: var(--mut); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-case.pleine > small { color: #c3cdd8; }
.st-case-b { position: relative; width: 64px; height: 64px; display: grid; place-items: center; padding: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.01)), var(--inset); border: 1px solid rgba(255,255,255,.09);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.35); transition: transform .12s, border-color .12s, box-shadow .12s; }
.st-case-b:hover { transform: translateY(-2px); border-color: rgba(245,166,35,.6); box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 3px rgba(245,166,35,.12); }
.st-case.pleine .st-case-b { border-color: rgba(245,166,35,.35); background: radial-gradient(circle at 50% 40%, rgba(245,166,35,.16), transparent 70%), var(--inset); }
.st-case.ko .st-case-b { border-color: rgba(255,122,107,.75); box-shadow: 0 0 0 3px rgba(255,122,107,.15); }
.st-case-b img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,.45)); }
.st-case-b em { position: absolute; left: 4px; bottom: 3px; font-style: normal; font: 600 10px var(--f-titre); color: var(--mut); background: rgba(9,17,26,.8); border-radius: 5px; padding: 0 4px; }
.st-case-b img.st-vide { width: 30px; height: 30px; opacity: .22; filter: none; }
.st-exo { position: absolute; top: -6px; right: -6px; padding: 1px 5px; border-radius: 6px; background: linear-gradient(160deg, #e9c8ff, #b57cff); color: #1d0b33; font: 700 10px var(--f-titre); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.st-retirer { position: absolute; top: -7px; left: -5px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); background: var(--card-hi); color: var(--mut); font-size: 13px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s; }
.st-case:hover .st-retirer, .st-retirer:focus-visible { opacity: 1; }
.st-retirer:hover { color: #fff; background: #a3392e; }
.st-astuce { position: relative; margin: 0; text-align: center; font-size: 12px; color: var(--mut2); }

/* Caractéristiques */
.st-stats { display: flex; flex-direction: column; gap: 14px; }
.st-bloc { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-stats h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); }
.st-tuiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.st-tuile { position: relative; display: flex; flex-direction: column; align-items: center; padding: 7px 4px 7px; border-radius: 12px; background: var(--inset); text-align: center; border-top: 2px solid var(--c); cursor: help; }
.st-tuile > .st-i { width: 22px; height: 22px; margin-bottom: 2px; }
.st-tuile b { display: block; font: 700 20px/1.1 var(--f-titre); color: var(--c); font-variant-numeric: tabular-nums; }
.st-tuile b i { font-style: normal; font-size: 12px; }
.st-tuile span { display: block; font-size: 10.5px; font-weight: 800; color: var(--mut); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tuile em { position: absolute; top: 3px; right: 5px; font-style: normal; font-size: 10px; font-weight: 800; color: var(--st-ko); }
.st-tuile.cap { box-shadow: inset 0 0 0 1px rgba(255,122,107,.4); }
.st-ls { display: grid; gap: 2px 14px; }
.st-ls.deux { grid-template-columns: 1fr 1fr; }
.st-l { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.04); cursor: help; min-width: 0; }
.st-l span { display: flex; align-items: center; gap: 6px; min-width: 0; color: #b8c4d1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-l b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-l.nul { opacity: .45; } .st-l.neg b { color: var(--st-ko); }
.st-cap { font-style: normal; font-size: 11px; color: var(--st-ko); }
/* Catégories des caractéristiques (Éléments, Passif, Dommages, Résistances) */
.st-cat { border-radius: 12px; background: rgba(255,255,255,.02); border: 1px solid var(--line); }
.st-cat > summary { display: flex; align-items: baseline; gap: 8px; padding: 9px 12px; cursor: pointer; list-style: none; }
.st-cat > summary::-webkit-details-marker { display: none; }
.st-cat > summary::before { content: '▸'; color: var(--mut); font-size: 11px; transition: transform .15s; }
.st-cat[open] > summary::before { transform: rotate(90deg); }
.st-cat > summary span { font: 600 13px var(--f-titre); text-transform: uppercase; letter-spacing: .07em; color: #fff; }
.st-cat > summary em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-cat-c { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 10px; }
.st-cat-elements { border-top: 2px solid #d08b3a; } .st-cat-passif { border-top: 2px solid #ff7a8a; }
.st-cat-dommages { border-top: 2px solid #ffc35c; } .st-cat-resistances { border-top: 2px solid #7cc4ff; }
.st-cat .st-res tbody th { font-size: 11px; white-space: nowrap; cursor: help; }
.st-tout { align-self: flex-start; padding: 4px 0; border: 0; background: none; color: var(--or-hi); font-size: 12px; font-weight: 800; cursor: pointer; }
.st-tout:hover { color: var(--or); }
.st-res { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.st-res th, .st-res td { padding: 5px 2px; text-align: center; }
.st-res thead th { font-size: 10px; font-weight: 800; }
.st-res thead th .st-i { display: block; margin: 0 auto 2px; width: 20px; height: 20px; }
.st-res tbody th { text-align: left; color: var(--mut); font-size: 12px; }
.st-res td { font-weight: 800; background: var(--inset); border: 2px solid var(--card); border-radius: 6px; }
.st-res td.nul { opacity: .45; } .st-res td.neg { color: var(--st-ko); } .st-res td.cap { color: var(--or-hi); }

/* Bas : onglets */
.st-onglets { display: flex; gap: 22px; border-bottom: 1px solid rgba(255,255,255,.1); overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.st-onglets::-webkit-scrollbar { display: none; }
.st-onglets button { flex: none; padding: 6px 0 11px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--mut); font-size: 15px; font-weight: 800; cursor: pointer; }
.st-onglets button:hover { color: var(--txt); }
.st-onglets button.on { color: var(--txt); border-bottom-color: var(--or); }
.st-onglets i { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 99px; background: rgba(245,166,35,.16); color: var(--or-hi); vertical-align: 2px; }
.st-onglets i.rouge { background: rgba(255,122,107,.16); color: #ffb0a6; }
.st-vide-t { margin: 0; padding: 18px 4px; color: var(--mut); font-size: 14px; }
.st-note { margin: 12px 0 0; font-size: 12px; color: var(--mut2); line-height: 1.45; }

.st-panos { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.st-pano { padding: 12px; border-radius: 14px; background: var(--inset); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.st-pano header { display: flex; align-items: center; gap: 8px; }
.st-pano header b { flex: 1; min-width: 0; font: 600 15px var(--f-titre); color: #fff; }
.st-pano header em { font-style: normal; font: 600 14px var(--f-titre); color: var(--or-hi); }
.st-pips { display: flex; gap: 3px; }
.st-pips i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.12); }
.st-pips i.on { background: var(--or); box-shadow: 0 0 6px rgba(245,166,35,.6); }
.st-pano-objets { display: flex; flex-wrap: wrap; gap: 6px; }
.st-mini { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 10px; border: 1px dashed rgba(255,255,255,.15); background: rgba(255,255,255,.03); cursor: pointer; }
.st-mini img { width: 32px; height: 32px; object-fit: contain; opacity: .45; filter: grayscale(.7); }
.st-mini:hover img { opacity: 1; filter: none; }
.st-mini.on { border-style: solid; border-color: rgba(245,166,35,.5); background: rgba(245,166,35,.08); cursor: default; }
.st-mini.on img { opacity: 1; filter: none; }
.st-bonus { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.st-bonus li { padding: 2px 8px; border-radius: 7px; background: rgba(74,222,128,.1); color: #9ff0bd; font-size: 12.5px; font-weight: 800; }
.st-suivant { margin: 0; font-size: 12px; color: var(--mut); }

.st-alertes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.st-alertes li { padding: 9px 12px 9px 34px; border-radius: 10px; background: var(--inset); font-size: 14px; position: relative; }
.st-alertes li::before { position: absolute; left: 12px; top: 9px; font-weight: 800; }
.st-alertes li.ko { background: rgba(255,122,107,.1); color: #ffc2ba; } .st-alertes li.ko::before { content: '✗'; color: var(--st-ko); }
.st-alertes li.ok::before { content: '✓'; color: var(--st-ok); }
.st-alertes li.inc { color: #c3cdd8; } .st-alertes li.inc::before { content: '!'; color: var(--or-hi); }

.st-cible { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.st-cible > span { font: 600 14px var(--f-titre); }
.st-sorts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 8px; }
.st-sort { position: relative; overflow: hidden; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px 11px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line); }
.st-sort.arme { border-color: rgba(245,166,35,.35); }
.st-sort-i { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.04); display: grid; place-items: center; overflow: hidden; }
.st-sort-i img { width: 40px; height: 40px; object-fit: contain; }
.st-sort-t { min-width: 0; display: flex; flex-direction: column; }
.st-sort-t b { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-sort-t small { font-size: 11.5px; color: var(--mut); font-weight: 700; }
.st-sort-els { display: flex; gap: 3px; margin-top: 3px; }
.st-sort-els i { width: 14px; height: 4px; border-radius: 3px; }
.st-sort-d { display: grid; grid-template-columns: repeat(4, auto); gap: 10px; text-align: right; }
.st-sort-d span { display: flex; flex-direction: column; }
.st-sort-d small { font-size: 10px; color: var(--mut); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.st-sort-d b { font: 600 14px var(--f-titre); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-sort-d .crit b { color: var(--or-hi); } .st-sort-d .moy b { color: #fff; font-size: 16px; }
.st-sort-barre { position: absolute; left: 0; bottom: 0; height: 3px; border-radius: 0 3px 3px 0; opacity: .85; transition: width .3s; }

.st-comp-choix { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; margin-bottom: 12px; }
.st-comp { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.st-comp h4 { font-size: 14px; margin-bottom: 8px; padding-left: 9px; border-left: 3px solid var(--or); }
.st-diff { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.st-diff th, .st-diff td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.05); text-align: right; }
.st-diff th:first-child { text-align: left; color: #b8c4d1; }
.st-diff thead th { font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.st-diff td.plus { color: var(--st-plus); font-weight: 800; } .st-diff td.moins { color: var(--st-moins); font-weight: 800; }
.st-diff.obj td { text-align: left; }
.st-ico { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; margin-right: 6px; }

/* Bulle d'un objet */
.st-bulle { position: fixed; z-index: 1400; width: 300px; padding: 12px; border-radius: 14px; background: var(--card-hi); border: 1px solid rgba(245,166,35,.3); box-shadow: 0 18px 40px rgba(0,0,0,.55); pointer-events: none; font-size: 13px; }
.st-f-tete { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.st-f-tete img { width: 48px; height: 48px; object-fit: contain; flex: none; background: var(--inset); border-radius: 10px; padding: 3px; }
.st-f-tete b { display: block; font: 600 15px/1.2 var(--f-titre); color: #fff; }
.st-f-tete small { display: block; color: var(--mut); font-weight: 700; font-size: 12px; }
.st-f-tete small.st-f-set { color: #9ff0bd; }
.st-f-arme { margin: 0 0 6px; padding: 4px 8px; border-radius: 7px; background: var(--inset); font-size: 12px; font-weight: 800; color: #c3cdd8; }
.st-f-l { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.st-f-l li { display: flex; align-items: center; gap: 7px; font-weight: 700; color: #dbe3ea; }
.st-f-l li.neg { color: var(--st-ko); }
.st-f-l li.exo { color: #d6a4ff; }
.st-f-cond { margin: 8px 0 0; font-size: 12px; font-weight: 800; color: var(--mut); }
.st-f-cond.ko { color: var(--st-ko); } .st-f-cond.ok { color: var(--st-ok); }

/* Choix d'un objet (dans le volet à droite) */
.st-choix { display: flex; flex-direction: column; gap: 12px; }
.st-choix input, .st-choix select, .st-fo input, .st-fo select, .st-partage input, .st-partage textarea { background: var(--inset); color: var(--txt); border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; font-size: 14px; font-weight: 700; color-scheme: dark; font-family: inherit; }
.st-ch-q { position: relative; }
.st-ch-q span { position: absolute; left: 13px; top: 50%; transform: translateY(-52%); color: var(--or); font-size: 19px; pointer-events: none; }
.st-ch-q input { width: 100%; padding: 10px 12px 10px 38px; font-size: 15px; border-radius: 12px; }
.st-ch-f { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; font-weight: 800; color: var(--mut); }
.st-ch-f label { display: inline-flex; align-items: center; gap: 6px; }
.st-ch-f input { width: 64px; text-align: center; }
.st-ch-f select { max-width: 220px; }
.st-ch-filtres summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--mut); margin-bottom: 6px; }
.st-ch-filtres summary i { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 99px; background: rgba(245,166,35,.16); color: var(--or-hi); }
.st-ch-filtres summary i:empty { display: none; }
.st-ch-stats { display: flex; flex-wrap: wrap; gap: 5px; }
.st-ch-stats { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 5px; }
.st-ch-stats button { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--inset); color: #a9b6c4; font-size: 12px; font-weight: 800; cursor: pointer; font-family: inherit; text-align: left; min-width: 0; }
.st-ch-stats button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-ch-stats button:hover { border-color: rgba(245,166,35,.45); color: #fff; }
.st-ch-stats button.on { color: #fff; background: rgba(245,166,35,.16); border-color: var(--or); box-shadow: inset 0 0 0 1px rgba(245,166,35,.35); }
.st-ch-actuel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--inset); font-size: 13px; color: var(--mut); font-weight: 700; }
.st-ch-actuel b { color: #fff; flex: 1; min-width: 120px; }
.st-exo-ch { display: inline-flex; align-items: center; gap: 6px; color: #d6a4ff; }
/* Fiche d'un objet (volet, au clic) */
.st-fo [hidden], .st-choix [hidden] { display: none !important; }
.st-fo input:focus-visible, .st-fo select:focus-visible, .st-fo button:focus-visible { outline: 2px solid var(--or); outline-offset: 1px; }
.st-fo { display: flex; flex-direction: column; gap: 14px; }
.st-fo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-fo-actions .st-b { padding: 9px 14px; }
.st-fo-actions .st-b[data-objet] { color: var(--txt); }
.st-fo-pano { align-self: flex-start; color: #9ff0bd !important; border-color: rgba(74,222,128,.35) !important; }
.st-fo-pano img { width: 18px; height: 18px; }
.st-fo-pano:hover { background: rgba(74,222,128,.1) !important; }
.st-fo-pano[disabled] { opacity: .5; }
.st-res-pano { margin-left: 8px; padding: 1px 7px; border-radius: 6px; border: 1px solid rgba(74,222,128,.35); color: #9ff0bd; font-size: 11px; font-weight: 800; cursor: pointer; }
.st-res-pano:hover { background: rgba(74,222,128,.15); }
.st-pano-tout { align-self: flex-start; padding: 5px 10px !important; font-size: 12px !important; color: #9ff0bd !important; border-color: rgba(74,222,128,.35) !important; }
.st-fo-fiche { padding: 12px; border-radius: 14px; background: var(--inset); }
.st-fo-fiche .st-f-tete img { width: 64px; height: 64px; }
.st-fo-fiche .st-f-tete b { font-size: 18px; }
.st-fo-fiche .st-f-l:empty { display: none; }
.st-fo .st-jets-objet { border-top: 0; padding-top: 0; margin-top: 0; }
.st-ch-actuel .st-b { padding: 6px 10px; font-size: 12px; }
/* Jets de l'objet équipé (volet) */
.st-jets-objet { width: 100%; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.st-jo-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 4px; }
.st-jo-tete b { color: #fff; font: 600 14px var(--f-titre); }
.st-jo-tete small { color: var(--mut); font-weight: 700; flex: 1; }
.st-jo-tete .st-b { padding: 5px 10px; font-size: 12px; }
.st-jo-l { display: grid; grid-template-columns: 18px minmax(0, 1fr) 84px 64px 26px; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; }
.st-jo-l.perso { background: rgba(245,166,35,.08); }
.st-jo-n { color: #dbe3ea; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-jo-l.neg .st-jo-n { color: var(--st-ko); }
.st-jo-l input { width: 84px; text-align: right; padding: 4px 8px !important; font-variant-numeric: tabular-nums; }
.st-jo-l.perso input { border-color: rgba(245,166,35,.6); color: var(--or-hi); }
.st-jo-l.hors input { border-color: #b57cff; color: #d6a4ff; }
.st-jo-b { color: var(--mut); font-weight: 700; font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-jo-r { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--or-hi); cursor: pointer; font-weight: 800; }
.st-jo-r:hover { border-color: var(--or); }
.st-jo-note { margin: 4px 0 0; font-size: 11.5px; color: var(--mut2); font-weight: 600; }
.st-regle { position: absolute; bottom: -6px; right: -6px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--or); color: #1a1004; font-size: 11px; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.st-f-l li.perso { color: var(--or-hi); }
.st-f-l li small { color: var(--mut); font-weight: 600; }
.st-jets small { font-weight: 600; color: var(--mut2); }
.st-ch-fiche { width: 100%; }
.st-ch-fiche summary { cursor: pointer; color: var(--or-hi); font-size: 12px; font-weight: 800; }
.st-ch-fiche > div { margin-top: 8px; color: var(--txt); font-weight: 600; }
.st-ch-res { display: flex; flex-direction: column; gap: 6px; }
.st-res-o { display: flex; flex-direction: column; gap: 9px; width: 100%; padding: 10px 12px 11px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 60%), var(--inset); color: var(--txt); text-align: left; cursor: pointer; font-family: inherit; transition: border-color .12s, transform .12s; }
.st-res-o:hover { border-color: rgba(245,166,35,.6); transform: translateY(-1px); }
.st-res-o.actuel { border-color: rgba(245,166,35,.55); background: rgba(245,166,35,.07); }
.st-res-o.ko { border-color: rgba(255,122,107,.3); }
.st-res-tete { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.st-res-i { position: relative; width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(245,166,35,.18), transparent 70%), #0b1622; border: 1px solid rgba(245,166,35,.45); box-shadow: inset 0 2px 8px rgba(0,0,0,.5); }
.st-res-i img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.st-res-i em { position: absolute; left: 3px; bottom: 2px; font-style: normal; font: 600 10px var(--f-titre); color: var(--mut); background: rgba(9,17,26,.85); border-radius: 5px; padding: 0 4px; }
.st-res-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-res-t b { font: 600 15px/1.2 var(--f-titre); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-res-t small { font-size: 12px; color: var(--mut); font-weight: 700; }
.st-res-t small.st-res-set { display: inline-flex; align-items: center; gap: 5px; color: #9ff0bd; }
.st-res-set img { width: 14px; height: 14px; opacity: .8; }
.st-res-t small.st-res-ko { color: var(--st-ko); }
.st-gain { display: flex; flex-direction: column; align-items: flex-end; font: 600 16px var(--f-titre); white-space: nowrap; color: var(--mut); font-variant-numeric: tabular-nums; }
.st-gain small { font: 800 10px var(--f-txt); text-transform: uppercase; letter-spacing: .05em; color: var(--mut); }
.st-gain.plus { color: var(--st-plus); } .st-gain.moins { color: var(--st-moins); }
.st-gain.eq { font-size: 12px; padding: 3px 8px; border-radius: 7px; background: rgba(245,166,35,.15); color: var(--or-hi); }
.st-res-l { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 12px; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.18); }
.st-li { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; }
.st-li b { font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-li em { font-style: normal; font-weight: 700; color: #b8c4d1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-li.neg b, .st-li.neg em { color: var(--st-ko); }
.st-li.large { grid-column: 1 / -1; }
.st-li.arme em { color: var(--or-hi); }
.st-deltas { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.st-deltas small { font-size: 11px; font-weight: 800; color: var(--mut); margin-right: 2px; }
.st-deltas i { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 11.5px; font-weight: 800; padding: 2px 7px 2px 4px; border-radius: 7px; white-space: nowrap; }
.st-deltas i .st-i { width: 15px; height: 15px; }
.st-deltas i.plus { background: rgba(74,222,128,.12); color: var(--st-plus); }
.st-deltas i.moins { background: rgba(255,122,107,.12); color: var(--st-moins); }

.st-partage h4 { font: 600 14px/1.25 var(--f-titre); margin: 6px 0 8px; padding-left: 9px; border-left: 3px solid var(--or); color: #fff; }
.st-partage h4 + p { margin-top: 0; }
.st-copie { display: flex; gap: 6px; margin-bottom: 16px; }
.st-copie input { flex: 1; min-width: 0; font-size: 12px; }
.st-partage textarea { width: 100%; font: 600 12.5px/1.45 ui-monospace, Consolas, monospace; resize: vertical; }

/* Largeurs */
@container (max-width: 1060px) {
  .st-grille { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); }
  .st-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; gap: 14px 22px; }
  .st-stats > .st-tuiles { grid-column: 1 / -1; grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@container (max-width: 760px) {
  .st-grille { grid-template-columns: minmax(0, 1fr); }
  .st-mannequin { order: -1; }
  .st-stats > .st-tuiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-equip { gap: 8px; }
  .st-col { gap: 8px; }
  .st-case { width: 60px; }
  .st-case-b { width: 54px; height: 54px; border-radius: 12px; }
  .st-case-b img { width: 44px; height: 44px; }
  .st-ligne { gap: 8px; }
  .st-sort { grid-template-columns: 40px minmax(0, 1fr); }
  .st-sort-d { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); text-align: left; }
  .st-retirer { opacity: 1; }
}
@container (max-width: 400px) {
  .st-res-l { grid-template-columns: 1fr; }
  .st-ls.deux { grid-template-columns: 1fr; }
  .st-case { width: 52px; } .st-case > small { display: none; }
  .st-case-b { width: 48px; height: 48px; } .st-case-b img { width: 38px; height: 38px; }
  .st-dofus { gap: 5px; }
  .st-dofus .st-case { width: 44px; } .st-dofus .st-case-b { width: 44px; height: 44px; border-radius: 10px; } .st-dofus .st-case-b img { width: 34px; height: 34px; }
}
@media (hover: none) { .st-bulle { display: none; } }
@media (prefers-reduced-motion: reduce) { .st-case-b, .st-res-o, .st-rendu { transition: none; } }
