/* Hôtel de vente façon DOFUS Rétro (16/10/2026) : onglets Achat / Vente ; achat = catégories | objets, puis l'objet et ses lots ×1 ×10 ×100 ;
   vente = inventaire | mise en vente, puis objets en vente. Tableaux rayés, en-têtes bruns, comme la fenêtre du client. */
#player-market{width:min(980px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;overflow:hidden;color:#2f2a1e;background:#d9d1ad;border-radius:10px}
#player-market[open]{display:flex;flex-direction:column}
#player-market::backdrop{background:#0a080540}:where(html[data-theme="nuit"]) #player-market::backdrop{background:#05070a40}
#player-market .market-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:36px;padding:3px 6px 3px 10px;background:linear-gradient(180deg,#5b5243,#342e24);border-bottom:1px solid #e8780c;color:#fff6dc}:where(html[data-theme="nuit"]) #player-market .market-heading{background:linear-gradient(180deg,#3c4a62,#212937)}
#player-market .market-heading h2{display:flex;align-items:center;gap:7px;margin:0;font:400 16px/1.15 var(--font-display,'Bree Serif',serif);color:#fff6dc}
#player-market .market-heading h2 img{width:18px;height:18px}
#market-close{width:26px;height:26px;border-radius:6px;border:1px solid #0006;background:#0003;color:#fff6dc;font-size:15px;cursor:pointer}
#market-content{flex:1 1 auto;min-height:0;overflow:auto;padding:0 8px 6px;display:flex;flex-direction:column;gap:6px;font-size:12.5px}
.hdv-tabs{display:flex;align-items:flex-end;gap:2px;margin:0 -8px;padding:6px 10px 0;background:#c9c09a;border-bottom:2px solid #5b5243}:where(html[data-theme="nuit"]) .hdv-tabs{border-bottom:2px solid #3c4a62}
.hdv-wallet{margin-left:auto;align-self:center;font-weight:700}
.hdv-coin{display:inline-flex;align-items:center;gap:3px;font-weight:700;white-space:nowrap}.hdv-coin img{width:14px;height:14px}
.hdv-icon{width:26px;height:26px;object-fit:contain;flex:none}
.hdv-msg{margin:0;padding:5px 9px;border-radius:6px;background:#f4ecd0;border:1px solid #c9b98a}.hdv-msg.is-error{background:#f6ddd6;border-color:#c97b6a;color:#7a2418}
.hdv-empty{margin:12px;color:#6b6148;text-align:center}
.hdv-foot{font-size:11px;color:#5e5640;text-align:center;padding-top:2px}
.hdv-col{min-height:0;overflow:auto;border:1px solid #8f8466;border-radius:4px;background:#ece5c8}
.hdv-coltitle{position:sticky;top:0;z-index:1;padding:3px 8px;background:linear-gradient(180deg,#6b6150,#4a4234);color:#fff6dc;font-weight:700;font-size:12px}:where(html[data-theme="nuit"]) .hdv-coltitle{background:linear-gradient(180deg,#475874,#303b4e)}.hdv-coltitle small{font-weight:400;opacity:.8}
.hdv-table{width:100%;border-collapse:collapse}
.hdv-table th{position:sticky;top:0;padding:3px 6px;background:#8f8466;color:#fff6dc;font-weight:700;font-size:11.5px;text-align:left;white-space:nowrap}
.hdv-table td{padding:3px 6px;border-bottom:1px solid #0000000f;vertical-align:middle}
.hdv-table tbody tr:nth-child(even) td{background:#00000008}
.hdv-table tbody tr[data-item]{cursor:pointer}.hdv-table tbody tr[data-item]:hover td{background:#fff7dc}
.hdv-table tbody tr.is-on td{background:#f3d79a!important}
.hdv-num{text-align:right!important;font-variant-numeric:tabular-nums}
.hdv-namecell{display:flex;align-items:center;gap:6px}.hdv-namecell span{display:flex;flex-direction:column}.hdv-namecell small{font-size:10.5px;color:#4b6b12}
.hdv-buy{display:grid;grid-template-columns:200px minmax(0,1fr);gap:6px;height:min(250px,calc(100dvh - 430px));min-height:170px}
.hdv-types{display:flex;flex-direction:column}
.hdv-type{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:3px 8px;border:0;border-bottom:1px solid #0000000d;background:none;text-align:left;cursor:pointer;font-size:12px}
.hdv-type b{min-width:18px;padding:0 5px;border-radius:9px;background:#8f8466;color:#fff;font-size:10.5px;text-align:center}
.hdv-type.is-empty{opacity:.55}
.hdv-search{padding:4px;position:sticky;top:0;z-index:2;background:#ece5c8}.hdv-search input{width:100%;box-sizing:border-box;min-height:26px;padding:3px 8px;border-radius:4px;border:1px solid #8f8466;background:#fffaf0}
.hdv-detail{padding:6px 8px;display:flex;flex-direction:column;gap:6px;min-height:150px}
.hdv-head{display:flex;align-items:center;gap:8px}.hdv-head h3{margin:0;font:400 15px/1.2 var(--font-display,'Bree Serif',serif)}.hdv-head small{opacity:.75}.hdv-head .hdv-icon{width:36px;height:36px}
.hdv-effects{margin-left:auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:2px 10px;font-size:11px;max-width:55%}.hdv-effects .is-other{color:#6b4a9a}
.hdv-lots th:first-child,.hdv-lots td:first-child{width:40%}
.hdv-effcell{font-size:11.5px;color:#4b6b12}
.hdv-lotcell{text-align:right;font-weight:700;cursor:pointer;font-variant-numeric:tabular-nums;border-left:1px solid #0000000f}
.hdv-lotcell small{display:block;font-weight:400;font-size:10px;opacity:.7}
.hdv-lotcell:hover:not(.is-none):not(.is-off){background:#fff3d6!important;box-shadow:inset 0 0 0 1px #e8780c}
.hdv-lotcell.is-on{background:#f0a43a!important;color:#fff;box-shadow:inset 0 0 0 1px #c4650a}
.hdv-lotcell.is-none{text-align:center;color:#0005;cursor:default}
.hdv-lotcell.is-off{opacity:.55;cursor:not-allowed}.hdv-lotcell.is-mine{font-style:italic}
.hdv-other{margin-top:3px;display:flex;flex-wrap:wrap;gap:3px}.hdv-oddlot{padding:0 5px;border-radius:4px;background:#0000000d;font-size:10.5px;color:#2f2a1e;cursor:pointer}.hdv-oddlot.is-on{background:#f0a43a;color:#fff}
.hdv-buybar{display:flex;align-items:center;gap:12px;padding:5px 8px;border-radius:4px;background:#d6cda7;flex-wrap:wrap}.hdv-total{margin-left:auto}
.hdv-sell{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:6px;height:min(270px,calc(100dvh - 390px));min-height:200px}
.hdv-baggrid{display:grid;grid-template-columns:repeat(auto-fill,48px);grid-auto-rows:48px;gap:4px;padding:6px}
.hdv-bagcell{position:relative;width:48px;height:48px;display:grid;place-items:center;padding:2px;border-radius:5px;border:1px solid #8f846680;background:#fffaf0;cursor:grab}
.hdv-bagcell .hdv-icon{width:36px;height:36px}
.hdv-bagcell b{position:absolute;right:2px;bottom:1px;padding:0 3px;border-radius:4px;background:#2f2717d9;color:#fff3cf;font-size:10px;line-height:13px}:where(html[data-theme="nuit"]) .hdv-bagcell b{background:#19202dd9}
.hdv-bagcell:hover{box-shadow:0 0 0 2px #e8780c88}.hdv-bagcell.is-on{box-shadow:0 0 0 2px #e8780c}
.hdv-drop{display:flex;flex-direction:column;gap:6px}
.hdv-drop>*:not(.hdv-coltitle){margin:0 8px}
.hdv-drop.is-empty .hdv-dropzone{flex:1;display:grid;place-items:center;margin:8px;border:2px dashed #8f846680;border-radius:6px;text-align:center;color:#6b6148;font-weight:700}.hdv-dropzone small{font-weight:400}
.hdv-drop.is-over{box-shadow:inset 0 0 0 3px #e8780c;background:#fff3d6}
.hdv-x{margin-left:auto;width:22px;height:22px;border-radius:5px;border:1px solid #0003;background:#fffaf0;cursor:pointer}
.hdv-field{display:flex;align-items:center;gap:8px}.hdv-field>span{width:62px;font-weight:700}
.hdv-field input[type=number]{flex:1;min-height:28px;padding:3px 8px;border-radius:4px;border:1px solid #8f8466;background:#fffaf0;font-weight:700}.hdv-field em{font-style:normal;font-size:11px;opacity:.7;white-space:nowrap}
.hdv-lotpick{display:flex;gap:4px}.hdv-lotpick label{display:flex;align-items:center;gap:3px;padding:2px 9px;border-radius:4px;border:1px solid #8f8466;background:#fffaf0;font-weight:700;cursor:pointer}
.hdv-lotpick label.is-on{background:#5b5243;color:#fff6dc}:where(html[data-theme="nuit"]) .hdv-lotpick label.is-on{background:#3c4a62}.hdv-lotpick label.is-off{opacity:.4;cursor:default}.hdv-lotpick input{margin:0;accent-color:#e8780c}
.hdv-facts{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;margin:0;font-size:12px}.hdv-facts dt{font-weight:700;opacity:.8}.hdv-facts dd{margin:0}.hdv-facts a{color:#8f4600}.hdv-facts small{opacity:.7}
.hdv-primary{min-height:30px;padding:0 18px;border-radius:5px;border:1px solid #8f4600;background:linear-gradient(180deg,#f0922a,#c4650a);color:#fff;font-weight:700;cursor:pointer}.hdv-primary:disabled{opacity:.5;cursor:default}
.hdv-drop .hdv-primary{align-self:flex-start}
.hdv-mine{max-height:180px}.hdv-mine .hdv-table button{min-height:22px;padding:0 8px;border-radius:4px;border:1px solid #0003;background:#fffaf0;cursor:pointer;font-size:11.5px}
.hdv-mine tr.is-elsewhere td{color:#5e5640}
.hdv-legacy{margin:4px 8px;padding:4px 8px;border-radius:4px;background:#fff3d6;border:1px solid #e8780c;font-size:11.5px}
.hdv-confirm{display:flex;align-items:center;gap:10px;padding:5px 9px;border-radius:6px;background:#fff3d6;border:1px solid #e8780c}.hdv-confirm span{flex:1}
.hdv-confirm button:not(.hdv-primary){min-height:28px;padding:0 12px;border-radius:5px;border:1px solid #0003;background:#fffaf0;cursor:pointer}
.hdv-intro{margin:6px 0 0}
.hdv-dir{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:5px}
.hdv-diritem{display:grid;grid-template-columns:1fr auto;gap:0 8px;align-items:center;padding:5px 9px;border-radius:5px;background:#ece5c8;border:1px solid #8f846680}
.hdv-diritem small{grid-column:1;font-size:11px;opacity:.75}.hdv-diritem span{grid-column:1;font-size:11px}.hdv-diritem button{grid-column:2;grid-row:1/4;min-height:26px;padding:0 12px;border-radius:5px;border:1px solid #8f4600;background:#f0922a;color:#fff;font-weight:700;cursor:pointer}
/* priorité sur l'habillage global des boutons (retro-skin.css) */
html[data-theme] body #player-market :is(.hdv-tabs button,.hdv-type,.hdv-x,.hdv-bagcell,.hdv-mine button,.hdv-confirm button:not(.hdv-primary)){text-shadow:none!important;background-image:none!important;box-shadow:none;min-height:0!important}
html[data-theme] body #player-market .hdv-tabs button{position:relative;top:2px;padding:5px 22px!important;border:1px solid #5b5243!important;border-bottom:0!important;border-radius:6px 6px 0 0!important;background-color:#b5ab85!important;color:#3a3326!important;font-weight:700;cursor:pointer}html[data-theme]:where([data-theme="nuit"]) body #player-market .hdv-tabs button{border:1px solid #3c4a62!important}
html[data-theme] body #player-market .hdv-tabs button.is-on{background-color:#ece5c8!important;color:#2f2a1e!important;box-shadow:inset 0 2px 0 #e8780c!important}
html[data-theme] body #player-market .hdv-type{background-color:transparent!important;border:0!important;border-bottom:1px solid #0000000d!important;border-radius:0!important;color:#2f2a1e!important;padding:3px 8px!important}
html[data-theme] body #player-market .hdv-type span{color:inherit!important}
html[data-theme] body #player-market .hdv-type:hover{background-color:#fff7dc!important}
html[data-theme] body #player-market .hdv-type.is-on{background-color:#f3d79a!important;color:#2f2a1e!important;font-weight:700}
html[data-theme] body #player-market .hdv-type b{color:#fff!important}
html[data-theme] body #player-market :is(.hdv-x,.hdv-bagcell,.hdv-mine button,.hdv-confirm button:not(.hdv-primary)){background-color:#fffaf0!important;color:#2f2a1e!important}
html[data-theme] body #player-market .hdv-bagcell{border:1px solid #8f846680!important;padding:2px!important}
html[data-theme] body #player-market .hdv-bagcell b{color:#fff3cf!important}
html[data-theme] body #player-market .hdv-primary{background:linear-gradient(180deg,#f0922a,#c4650a)!important;color:#fff!important;border:1px solid #8f4600!important;text-shadow:0 1px 0 #0004!important}
@media (max-width:700px){
 #player-market{width:100vw;max-height:100dvh}
 .hdv-buy{grid-template-columns:1fr;height:auto}.hdv-types{flex-direction:row;flex-wrap:wrap;max-height:110px}.hdv-items{max-height:220px}
 .hdv-sell{grid-template-columns:1fr;height:auto}
}
html[data-theme] body #player-market .hdv-type{flex:none!important;min-height:24px!important;height:auto!important;line-height:1.3!important}
