/* Vue « Mission en cours » façon MMO (js/features/donjon_live/vue_donjon.js) */
.dialog.lv-dialog { width: min(1360px, calc(100% - 20px)); max-height: calc(100vh - 20px); }
.dialog.lv-dialog .dialog-card { padding: 18px 20px; }
.lv { display: grid; gap: 12px; --lv-gold: #e4b23a; --lv-hp: #4fd17a; --lv-mana: #4ba3ff; }
.lv-head { display: grid; gap: 6px; }
.lv-sub { margin: 0; color: var(--muted); }
.lv-progress-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.lv-progress-row b { color: var(--text); }
.lv-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.lv-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8a5ce6, #4ba3ff); transition: width .4s linear; }
.lv-steps { display: flex; gap: 4px; }
.lv-steps span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); }
.lv-steps span.done { background: var(--lv-gold); }
.lv-steps span.now { background: #fff1b8; box-shadow: 0 0 8px var(--lv-gold); }

.lv-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.lv-panel { min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: rgba(7, 11, 20, .55); }
.lv-panel h3 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--lv-gold); }

.lv-party { display: grid; gap: 6px; max-height: 470px; overflow-y: auto; padding-right: 2px; }
.lv-frame { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 3px 8px; align-items: center; padding: 6px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid transparent; transition: border-color .2s, background .2s; }
.lv-frame img { width: 34px; height: 34px; grid-row: span 3; }
.lv-name { display: flex; justify-content: space-between; gap: 6px; min-width: 0; font-weight: 800; font-size: .84rem; }
.lv-name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-role { flex: none; font-size: .66rem; letter-spacing: .05em; color: var(--muted); }
.lv-meter { position: relative; height: 13px; border-radius: 4px; background: rgba(0,0,0,.5); overflow: hidden; }
.lv-meter.mana { height: 6px; }
.lv-meter i { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(180deg, #6ee695, #2f9e57); transition: width .25s ease; }
.lv-meter.mana i { background: linear-gradient(180deg, #7cc0ff, #2c74c9); }
.lv-meter.low i { background: linear-gradient(180deg, #ff8b94, #c43644); }
.lv-meter b { position: relative; display: block; font-size: .64rem; line-height: 13px; text-align: center; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #000; }
.lv-frame.hit { border-color: rgba(255,95,109,.7); background: rgba(255,95,109,.12); }
.lv-frame.healed { border-color: rgba(125,255,167,.6); }
.lv-frame.ko { opacity: .45; filter: grayscale(.8); }
.lv-layout.many .lv-frame { grid-template-columns: 26px minmax(0, 1fr); padding: 4px 6px; }
.lv-layout.many .lv-frame img { width: 26px; height: 26px; }

.lv-stage { position: relative; padding: 0; overflow: hidden; }
.lv-stage canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; max-width: 100%; background: #04060c; }
.lv-boss { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: min(440px, 86%); padding: 8px 12px 9px; border-radius: 12px; background: rgba(7,11,20,.88); border: 1px solid rgba(255,95,109,.5); }
.lv-boss-row { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; }
.lv-boss-row small { color: var(--muted); font-variant-numeric: tabular-nums; }
.lv-boss .lv-meter { height: 12px; margin-top: 6px; }
.lv-boss .lv-meter i { background: linear-gradient(180deg, #ff7a6a, #b8202a); }
.lv-cast { margin-top: 5px; min-height: 16px; font-size: .8rem; color: #ffb3a8; }
.lv-banner { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); max-width: 92%; padding: 5px 14px; border-radius: 999px; background: rgba(7,11,20,.85); border: 1px solid var(--border); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lv-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.lv-tab { flex: 1; min-height: 32px; border: 1px solid var(--border); border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 800; font-size: .84rem; cursor: pointer; }
.lv-tab[aria-selected="true"] { background: rgba(255,255,255,.06); color: var(--text); border-color: rgba(228,178,58,.5); }
.lv-tab:focus-visible { outline: 2px solid var(--lv-gold); outline-offset: 2px; }
.lv-log { height: 470px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; font-size: .82rem; line-height: 1.35; padding-right: 4px; }
.lv-log p { margin: 0; padding: 3px 6px; border-radius: 6px; }
.lv-log time { margin-right: 6px; color: #6d7790; font-size: .74rem; font-variant-numeric: tabular-nums; }
.lv-log .sys { background: rgba(228,178,58,.1); color: #ffe7a3; font-weight: 700; }
.lv-log .boss { background: rgba(255,95,109,.1); }
.lv-who { font-weight: 800; color: var(--c, var(--text)); }
.lv-dmg { color: #fff; font-weight: 800; }
.lv-crit { color: #ffd23a; font-weight: 800; }
.lv-heal { color: #7dffa7; font-weight: 800; }
.lv-hurt { color: #ff5f6d; font-weight: 800; }
.lv-meter-row { position: relative; display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; padding: 5px 8px; border-radius: 6px; overflow: hidden; background: rgba(0,0,0,.3); font-weight: 800; font-size: .82rem; font-variant-numeric: tabular-nums; }
.lv-meter-row i { position: absolute; inset: 0 auto 0 0; background: var(--c); opacity: .38; transition: width .3s; }
.lv-meter-row span { position: relative; }
.lv-total, .lv-empty { margin: 6px 0 0; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }

@media (max-width: 1180px) {
  .lv-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .lv-party-panel { grid-column: 1 / -1; }
  .lv-party { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); max-height: 220px; }
}
@media (max-width: 820px) {
  .lv-layout { grid-template-columns: minmax(0, 1fr); }
  .lv-log { height: 260px; }
}

/* L'ancienne fenêtre fixe sa hauteur et masque le débordement : la vue MMO défile si besoin. */
.dungeon-mission-dialog.lv-dialog .dialog-card { width: auto !important; max-width: none !important; height: auto !important; max-height: calc(100vh - 20px) !important; overflow-y: auto !important; display: block !important; }
.dungeon-mission-dialog.lv-dialog #dungeonMissionContent { display: block; min-height: 0; }
@media (max-height: 820px) { .lv-stage canvas { max-height: calc(100vh - 230px); width: auto; margin: 0 auto; } .lv-log { height: min(470px, calc(100vh - 300px)); } }
.dialog.dungeon-mission-dialog.lv-dialog { width: min(1360px, calc(100% - 20px)) !important; height: auto !important; max-height: calc(100vh - 20px) !important; margin: auto !important; overflow: hidden auto !important; border-radius: 20px; }

/* Suivi du groupe sur la carte (entre deux donjons, aller, retour) */
.tr { display: flex; flex-direction: column; gap: 10px; }
.tr-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tr-head .eyebrow { margin: 0; }
.tr-head h3 { margin: 2px 0; }
.tr-head small { color: var(--muted); }
.tr-time { display: grid; text-align: right; }
.tr-time strong { font-size: 1.3rem; color: #9fefff; }
.tr-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.tr-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4ba3ff, #63e6ff); transition: width .5s; }
.tr-map { height: min(62vh, 560px); min-height: 320px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: #0b111c; }
.tr-note { margin: 0; color: var(--muted); font-size: .88rem; }
