/* Fenêtres premium et compactes (15/10/2026), sur ordinateur : cadre fin, barre de titre basse, marges serrées, pas de voile.
   Chargée en dernier ; mobile (feuilles plein écran) inchangé. Les fenêtres ne bloquent plus le jeu (window-manager.js). */
@media (min-width:701px) and (pointer:fine){
 html[data-theme] :is(#player-dialog,#player-dialog-char,#class-dialog,#adventure-panel,#player-market,#astrub-shop,#companions-dialog,#leaderboard-dialog,#bestiary-dialog,#community-dialog){
  border:1px solid #17120b!important;border-radius:10px!important;
  box-shadow:inset 0 0 0 1px #ffffff26,0 14px 34px #000a,0 2px 8px #0006!important;
  background:linear-gradient(180deg,var(--window-paper,#ddd6b4) 0%,var(--window-paper-deep,#cbc39c) 100%)!important;
  padding:0!important;
 }html[data-theme]:where([data-theme="nuit"]) :is(#player-dialog,#player-dialog-char,#class-dialog,#adventure-panel,#player-market,#astrub-shop,#companions-dialog,#leaderboard-dialog,#bestiary-dialog,#community-dialog){border:1px solid #0c1016!important}
 /* aucune fenêtre du jeu n'assombrit plus l'écran (non modales) ; les rares modales gardent un voile léger */
 html[data-theme] :is(#player-dialog,#class-dialog,#adventure-panel,#player-market,#astrub-shop,#companions-dialog,#leaderboard-dialog,#bestiary-dialog,#community-dialog)::backdrop{background:#0a080540!important;backdrop-filter:none!important}html[data-theme]:where([data-theme="nuit"]) :is(#player-dialog,#class-dialog,#adventure-panel,#player-market,#astrub-shop,#companions-dialog,#leaderboard-dialog,#bestiary-dialog,#community-dialog)::backdrop{background:#05070a40!important}
 /* fenêtre de devant : ombre plus marquée ; les autres un peu en retrait */
 html[data-theme] dialog.rv-win:not(.rv-win-front){box-shadow:inset 0 0 0 1px #ffffff1a,0 8px 20px #0007!important}
 html[data-theme] dialog.rv-win:not(.rv-win-front)>header{filter:saturate(.7) brightness(.92)}
 /* barre de titre : 36 px, titre 16 px, surtitre en ligne discret */
 html[data-theme] :is(#player-dialog,#player-dialog-char,#class-dialog,#adventure-panel)>header,
 html[data-theme] #astrub-shop>.shop-heading,html[data-theme] #player-market .market-heading,
 html[data-theme] :is(#companions-dialog,#leaderboard-dialog,#bestiary-dialog,#community-dialog)>header{
  min-height:36px!important;padding:3px 6px 3px 10px!important;gap:8px!important;border-radius:9px 9px 0 0!important;
  background:linear-gradient(180deg,#5b5243 0%,#3f382c 55%,#342e24 100%)!important;border-bottom:1px solid #e8780c!important;box-shadow:inset 0 1px #ffffff1c!important;
 }html[data-theme]:where([data-theme="nuit"]) :is(#player-dialog,#player-dialog-char,#class-dialog,#adventure-panel)>header,html[data-theme]:where([data-theme="nuit"]) #astrub-shop>.shop-heading,html[data-theme]:where([data-theme="nuit"]) #player-market .market-heading,html[data-theme]:where([data-theme="nuit"]) :is(#companions-dialog,#leaderboard-dialog,#bestiary-dialog,#community-dialog)>header{background:linear-gradient(180deg,#3c4a62 0%,#283243 55%,#212937 100%)!important}
 html[data-theme] :is(#player-dialog,#player-dialog-char,#class-dialog,#adventure-panel)>header h2,
 html[data-theme] #astrub-shop .shop-heading h2,html[data-theme] #player-market .market-heading h2,
 html[data-theme] :is(#companions-dialog,#leaderboard-dialog,#bestiary-dialog,#community-dialog)>header h2{font-size:16px!important;line-height:1.15!important;margin:0!important;gap:7px!important}
 html[data-theme] :is(#player-dialog,#player-dialog-char,#class-dialog,#adventure-panel)>header h2:before,html[data-theme] #astrub-shop .shop-heading h2:before{width:18px!important;height:18px!important}
 html[data-theme] #player-market .market-heading h2 img{width:18px!important;height:18px!important}
 html[data-theme] :is(.adventure-eyebrow,.shop-eyebrow),html[data-theme] #player-market .market-heading>div>span{display:none!important}
 html[data-theme] :is(#player-dialog-close,#close-book,#adventure-close,#shop-close,#market-close),
 html[data-theme] :is(#player-dialog,#player-dialog-char,#companions-dialog,#leaderboard-dialog,#bestiary-dialog,#community-dialog)>header button:last-child{width:26px!important;height:26px!important;min-width:26px!important;min-height:26px!important;font-size:14px!important;border-radius:6px!important;padding:0!important}
 /* contenu : marges serrées */
 html[data-theme] #player-dialog-content,html[data-theme] #player-dialog-char-content{padding:8px!important}
 html[data-theme] #adventure-panel #adventure-content,html[data-theme] #adventure-panel>section,html[data-theme] #adventure-panel .adventure-body{padding:8px 10px!important}
 html[data-theme] #player-market .market-body,html[data-theme] #astrub-shop .shop-body{padding:8px 10px!important}
 html[data-theme] #adventure-panel :is(.adventure-recipe,.adventure-card,article){padding:8px 10px!important;margin:0 0 6px!important;border-radius:8px!important;box-shadow:none!important}
 html[data-theme] #adventure-panel .adventure-intro{margin:0 0 6px!important;font-size:12.5px!important}
 html[data-theme] :is(#adventure-panel,#player-market,#astrub-shop) :is(button,select,input:not([type=checkbox],[type=radio],[type=range])){min-height:28px!important}
 /* poignée de redimensionnement discrète */
 html[data-theme] dialog.rv-win .rv-grip{opacity:.35}
 html[data-theme] dialog.rv-win:hover .rv-grip{opacity:.8}
}
@media (min-width:701px) and (pointer:fine){
 /* Fiche personnage : trois colonnes (identité | caractéristiques | statistiques), sans défilement sur un écran 1280×720 */
 html[data-theme] body #player-dialog-char[data-view][open] #player-dialog-char-content{padding:8px!important}
 html[data-theme] body #player-dialog-char[data-view][open] .character-layout{display:grid!important;grid-template-columns:200px minmax(0,1fr) minmax(260px,300px)!important;grid-template-areas:none!important;gap:8px!important;align-items:start!important}
 html[data-theme] body #player-dialog-char[data-view][open] .character-identity{grid-column:1!important;grid-row:1!important;padding:10px!important;width:auto!important}
 html[data-theme] body #player-dialog-char[data-view][open] .character-alloc{grid-column:2!important;grid-row:1!important;gap:6px!important;width:auto!important;min-width:0!important}
 html[data-theme] body #player-dialog-char[data-view][open] .character-layout>.character-stats{grid-column:3!important;grid-row:1!important;padding:10px!important;gap:8px!important;width:auto!important;margin:0!important}
 html[data-theme] body #player-dialog-char[data-view][open] :is(.attribute-disclosure,.attr-panel){width:auto!important;max-width:none!important}
 html[data-theme] body #player-dialog-char[data-view][open] .attr-panel{padding:8px!important}
 html[data-theme] body #player-dialog-char[data-view][open] .attr-row :is(td,th){padding-top:4px!important;padding-bottom:4px!important}
 html[data-theme] body #player-dialog-char[data-view][open] .attr-row{min-height:0!important}
 html[data-theme] body #player-dialog-char[data-view][open] :is(.stat-chips,.secondary-stats){width:auto!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
 html[data-theme] body #player-dialog-char[data-view][open] .stat-chips>span{padding:6px 4px!important;min-height:0!important}
 html[data-theme] body #player-dialog-char[data-view][open] .secondary-stats{display:block!important;padding:6px 8px!important}
 html[data-theme] body #player-dialog-char[data-view][open] .stat-help-links{flex-wrap:wrap!important;gap:6px!important}
 html[data-theme] body #player-dialog-char[data-view][open] .character-next{padding:6px 8px!important}
 html[data-theme] #player-dialog-char:not([data-rv-sized]){width:min(1100px,calc(100vw - 40px))!important;height:auto!important;max-height:calc(100dvh - 40px)!important}
 /* Hôtel de vente : plus de cadre intérieur ni de hauteur fixe */
 html[data-theme] #player-market #market-content{padding:8px 10px!important}
 html[data-theme] #player-market .market-body{border:0!important;padding:8px 0 0!important;background:none!important}
 html[data-theme] #player-market .market-login{padding:6px 10px!important}
 html[data-theme] #player-market .market-filters label{gap:2px!important}
 html[data-theme] #player-market:not([data-rv-sized]){height:auto!important;max-height:calc(100dvh - 40px)!important}
 html[data-theme] #player-market .market-empty{padding:14px!important}
 /* Boutique : cartes plus serrées */
 html[data-theme] #astrub-shop :is(.shop-offer,.shop-card,article){padding:8px 10px!important;gap:6px!important}
 html[data-theme] #astrub-shop .shop-body,html[data-theme] #astrub-shop>div{padding:8px 10px!important}
}
@media (min-width:701px) and (pointer:fine){
 html[data-theme] body #player-dialog-char[data-view][open]:not([data-rv-sized]){width:min(1060px,calc(100vw - 40px))!important;height:auto!important;max-height:calc(100dvh - 40px)!important}
 html[data-theme] body #player-dialog-char[data-view][open] .character-layout>.character-stats{display:flex!important;flex-direction:column!important;align-self:start!important}
 html[data-theme] body #player-dialog-char[data-view][open] .stat-chips{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:auto!important}
 html[data-theme] body #player-dialog-char[data-view][open] .stat-chips>span{height:auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:0!important}
 html[data-theme] body #player-dialog-char[data-view][open] .secondary-stats{width:auto!important}
 html[data-theme] body #player-dialog-char[data-view][open] .attr-row{padding-top:2px!important;padding-bottom:2px!important;height:auto!important;min-height:44px!important}
 html[data-theme] body #player-dialog-char[data-view][open] .attr-row>*{padding-top:2px!important;padding-bottom:2px!important}
 html[data-theme] body #player-dialog-char[data-view][open] .attr-panel{gap:5px!important}
 html[data-theme] body #player-dialog-char[data-view][open] .attr-panel>header,html[data-theme] body #player-dialog-char[data-view][open] .attr-panel>div:first-child{padding:4px 6px!important;min-height:0!important;margin-bottom:4px!important}
}
@media (min-width:701px) and (pointer:fine){
 html[data-theme] body #player-dialog-char[data-view][open]:not([data-rv-sized]){height:fit-content!important;min-height:0!important}
 html[data-theme] body #player-dialog-char[data-view][open]:not([data-rv-sized]) #player-dialog-char-content{flex:0 1 auto!important;min-height:0!important;height:auto!important}
}
@media (min-width:701px) and (pointer:fine){
 /* Sac : plus étroit, onglets compacts, pas de bandeau de comptage (le poids reste en bas) */
 html[data-theme] body #player-dialog[data-view=inventory][open]:not([data-rv-sized]){width:min(1060px,calc(100vw - 40px))!important;height:fit-content!important;min-height:0!important;max-height:calc(100dvh - 40px)!important}
 html[data-theme] body #player-dialog[data-view=inventory][open] #player-dialog-content{padding:8px!important;gap:6px!important}
 html[data-theme] body #player-dialog[data-view=inventory][open]:not([data-rv-sized]) #player-dialog-content{flex:0 1 auto!important;height:auto!important;min-height:0!important}
 html[data-theme] body #player-dialog[data-view=inventory][open] .bag-topline{display:none!important}
 html[data-theme] body #player-dialog[data-view=inventory][open] .bag-tabs{padding:0!important;gap:4px!important;justify-content:flex-start!important}
 html[data-theme] body #player-dialog[data-view=inventory][open] .bag-tabs>button{flex:0 0 auto!important;min-height:28px!important;height:28px!important;padding:0 12px!important;font-size:12.5px!important}
 html[data-theme] body #player-dialog[data-view=inventory][open] .bag-layout{gap:8px!important}
 html[data-theme] body #player-dialog[data-view=inventory][open] :is(.bag-equipment,.bag-storage){padding:8px!important;gap:6px!important}
 html[data-theme] body #player-dialog[data-view=inventory][open] .bag-grid{padding:4px!important;gap:4px!important}
}
/* Sac (16/10/2026) : lignes à la hauteur des cases (38 px imposés pour des cases de 64 px : la grille se chevauchait et se tronquait) */
html[data-theme] body #player-dialog[data-view] .bag-layout>.bag-storage>.bag-grid{grid-template-rows:none!important;grid-auto-rows:max-content!important;align-content:start!important}
html[data-theme] body #player-dialog[data-view] .bag-layout .bag-grid>.bag-cell{aspect-ratio:1!important;height:auto!important;min-height:auto!important}
