/* Journal en temps réel, détails de combat et discussions */
#missionHistoryWidget, #chatWidget { display: none !important; }
.jv-ico { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.jv-widget, .cv2-widget { position: fixed; right: 18px; z-index: 3000; font-family: inherit; }
.jv-widget { bottom: 18px; }
.cv2-widget { bottom: 88px; z-index: 2999; }
.jv-toggle, .cv2-toggle { position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(180, 151, 255, .55); background: linear-gradient(145deg, #1b2b47, #0e1828); color: #e8eefc; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.cv2-toggle { border-color: rgba(95, 224, 255, .5); }
.jv-toggle[aria-expanded="true"], .cv2-toggle[aria-expanded="true"] { background: #5fe0ff; color: #06202a; }
.jv-count, .cv2-count { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box; border-radius: 99px; background: #b48cff; color: #12082a; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.cv2-count { background: #ff7d8d; color: #2a0610; }
.jv-panel, .cv2-panel { position: fixed; right: 86px; bottom: 18px; width: min(520px, calc(100vw - 110px)); height: min(76vh, 760px); display: flex; flex-direction: column; gap: 10px; padding: 16px; box-sizing: border-box; border-radius: 20px; background: #0e1828; border: 1px solid #22324d; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); color: #e8eefc; }
.jv-panel[hidden], .cv2-panel[hidden] { display: none !important; }
.jv-head { display: flex; align-items: center; gap: 8px; }
.jv-head > div { flex: 1; min-width: 0; }
.jv-head .eyebrow { margin: 0; }
.jv-head h2 { margin: 2px 0 0; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jv-icon { width: 40px; height: 40px; border-radius: 12px; border: 1px solid #2c4060; background: transparent; color: #b8c6e0; display: grid; place-items: center; cursor: pointer; }
.jv-icon:hover { background: #142238; color: #e8eefc; }
.jv-tabs, .cv2-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: #0a1322; border: 1px solid #22324d; }
.jv-tabs button, .cv2-tabs button { flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: #b8c6e0; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.jv-tabs button.on, .cv2-tabs button.on { background: #5fe0ff; color: #06202a; }
.cv2-tabs em { font-style: normal; min-width: 18px; padding: 0 5px; border-radius: 99px; background: #ff7d8d; color: #2a0610; font-size: .7rem; }
.jv-filter { display: flex; gap: 6px; }
.jv-filter button { flex: 1; min-height: 34px; border-radius: 10px; border: 1px solid #2c4060; background: transparent; color: #b8c6e0; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.jv-filter button.on { border-color: #5fe0ff; color: #e8eefc; background: #13233b; }
.jv-filter button.on.ok { border-color: #54e39e; color: #9ff0c4; background: rgba(84, 227, 158, .1); }
.jv-filter button.on.ko { border-color: #ff7d8d; color: #ffb4bd; background: rgba(255, 125, 141, .1); }
.jv-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.jv-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: #0a1322; border: 1px solid #22324d; border-left: 4px solid #54e39e; }
.jv-card.ko { border-left-color: #ff7d8d; }
.jv-card.craft { border-left-color: var(--tc); }
.jv-cardhead { display: flex; align-items: center; gap: 10px; }
.jv-type { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, #0a1322); flex: none; }
.jv-title { flex: 1; min-width: 0; display: grid; }
.jv-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.jv-title small { color: #8ea0bf; font-size: .76rem; }
.jv-result { padding: 4px 10px; border-radius: 99px; font-size: .72rem; font-weight: 800; background: rgba(84, 227, 158, .14); color: #9ff0c4; flex: none; }
.ko .jv-result { background: rgba(255, 125, 141, .14); color: #ffb4bd; }
.jv-result.craft { background: #142238; color: #b8c6e0; }
.jv-team { margin: 0; display: flex; align-items: center; gap: 6px; color: #b8c6e0; font-size: .8rem; }
.jv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jv-chips > span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; background: #0e1828; font-size: .78rem; font-weight: 700; color: #e8eefc; }
.jv-ri { width: 16px; height: 16px; }
.jv-loot { display: flex; flex-wrap: wrap; gap: 5px; }
.jv-loot span { padding: 3px 8px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--rc, #b8c6e0) 45%, transparent); color: var(--rc, #b8c6e0); font-size: .74rem; font-weight: 700; }
.jv-loot span.more { color: #8ea0bf; border-color: #2c4060; }
.jv-cardfoot { display: flex; justify-content: flex-end; }
.jv-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid #5fe0ff; background: transparent; color: #5fe0ff; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.jv-btn:hover:not(:disabled) { background: rgba(95, 224, 255, .12); }
.jv-btn:disabled { border-color: #2c4060; color: #5d6f8f; cursor: not-allowed; }
.jv-muted { margin: 0; color: #8ea0bf; font-size: .8rem; }
.jv-empty { margin: 0; padding: 30px 10px; text-align: center; color: #8ea0bf; border: 1px dashed #22324d; border-radius: 12px; }

/* Détails du combat */
.dialog.cd-dialog { width: min(1080px, calc(100vw - 32px)); max-width: none; }
.cd-dialog .dialog-card { width: 100%; box-sizing: border-box; max-height: 92vh; overflow: auto; }
.cd { display: flex; flex-direction: column; gap: 14px; color: #e8eefc; }
.cd-head { display: flex; align-items: center; gap: 14px; padding: 14px 52px 14px 16px; border-radius: 16px; background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 16%, #0e1828), transparent 80%); border: 1px solid color-mix(in srgb, var(--tc) 35%, #22324d); }
.cd-head > div { flex: 1; min-width: 0; }
.cd-head .eyebrow { margin: 0; color: var(--tc); }
.cd-head h2 { margin: 2px 0; }
.cd-head small { color: #b8c6e0; }
.cd-type { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; color: var(--tc); border: 2px solid var(--tc); flex: none; }
.cd-badge { padding: 8px 14px; border-radius: 12px; font-weight: 800; }
.cd-badge.ok { background: rgba(84, 227, 158, .15); color: #9ff0c4; }
.cd-badge.ko { background: rgba(255, 125, 141, .15); color: #ffb4bd; }
.cd-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.cd-kpis > div { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: #0a1322; border: 1px solid #22324d; min-width: 0; }
.cd-kpis span { font-size: .72rem; color: #8ea0bf; }
.cd-kpis strong { font: 700 1.15rem Sora, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-kpis strong.small { font-size: .9rem; }
.cd .red { color: #ff9aa6; } .cd .green { color: #9ff0c4; } .cd .warn { color: #ffb05f; }
.cd-two { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 12px; }
.cd-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 14px; background: #0a1322; border: 1px solid #22324d; min-width: 0; }
.cd-card h3 { margin: 0; font-size: 1rem; }
.cd-table { display: grid; gap: 2px; overflow: auto; }
.cd-row { display: grid; grid-template-columns: minmax(140px, 1.4fr) repeat(3, minmax(90px, 1fr)) 110px; gap: 10px; align-items: center; padding: 7px 4px; border-top: 1px solid #1a2840; font-size: .85rem; min-width: 560px; }
.cd-th { border-top: 0; font-size: .68rem; font-weight: 800; letter-spacing: .06em; color: #8ea0bf; text-transform: uppercase; }
.cd-who { display: grid; border-left: 3px solid var(--rc); padding-left: 8px; min-width: 0; }
.cd-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-who small { color: #8ea0bf; font-size: .72rem; }
.cd-bar { position: relative; display: block; height: 22px; border-radius: 6px; background: #1a2840; overflow: hidden; }
.cd-bar i { position: absolute; inset: 0 auto 0 0; opacity: .45; }
.cd-bar b { position: relative; display: block; padding: 0 6px; line-height: 22px; font-size: .78rem; }
.cd-ko { color: #ff9aa6; font-weight: 800; }
.cd-up { color: #9ff0c4; font-size: .8rem; }
.cd-rew { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.cd-rew > div { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px; border-radius: 10px; background: #0e1828; }
.cd-rew > div > :first-child { grid-row: span 2; width: 22px; height: 22px; }
.cd-rew span { font-size: .72rem; color: #8ea0bf; }
.cd-log { margin: 0; padding: 0; list-style: none; max-height: 340px; overflow: auto; display: grid; gap: 2px; }
.cd-log li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 5px 8px; border-radius: 8px; font-size: .84rem; color: #c9d5ea; }
.cd-log li:nth-child(odd) { background: #0e1828; }
.cd-log time { color: #5fe0ff; font-variant-numeric: tabular-nums; font-weight: 700; }
.cd-log li.sys { color: #f2c45a; }
.cd-log li.boss, .cd-log li.sys.boss { color: #ff9aa6; }

/* Discussions */
.cv2-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.cv2-msgs { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 4px 0; }
.cv2-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 86%; }
.cv2-msg > div { padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: #142238; min-width: 0; }
.cv2-msg strong { display: block; font-size: .74rem; color: #5fe0ff; margin-bottom: 2px; }
.cv2-msg p { margin: 0; font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; }
.cv2-msg small { display: block; margin-top: 3px; font-size: .66rem; color: #8ea0bf; text-align: right; }
.cv2-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.cv2-msg.mine > div { background: #0e3946; border-radius: 14px 14px 4px 14px; }
.cv2-msg.mine .cv2-av { display: none; }
.cv2-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #1b2b47; border: 2px solid #d6b56a; color: #f2c45a; font-style: normal; font-weight: 800; font-size: .8rem; flex: none; }
.cv2-av.ghost { visibility: hidden; }
.cv2-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; color: #8ea0bf; padding: 20px; }
.cv2-empty strong { color: #e8eefc; }
.cv2-search { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 12px; background: #0a1322; border: 1px solid #22324d; color: #8ea0bf; }
.cv2-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: #e8eefc; font: inherit; outline: none; }
.cv2-contacts { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.cv2-contact { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 0; background: transparent; color: #e8eefc; font: inherit; text-align: left; cursor: pointer; }
.cv2-contact:hover { background: #142238; }
.cv2-contact > span { display: grid; flex: 1; min-width: 0; }
.cv2-contact small { color: #8ea0bf; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv2-contact time { color: #8ea0bf; font-size: .7rem; }
.cv2-convhead { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #22324d; }
.cv2-back { width: 36px; height: 36px; border-radius: 10px; border: 1px solid #2c4060; background: transparent; color: #e8eefc; display: grid; place-items: center; cursor: pointer; }
.cv2-note { color: #8ea0bf; text-align: center; }
.cv2-compose { display: flex; gap: 8px; }
.cv2-compose input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid #2c4060; background: #0a1322; color: #e8eefc; font: inherit; }
.cv2-compose input:focus { outline: none; border-color: #5fe0ff; }
.cv2-send { width: 46px; min-height: 44px; border-radius: 12px; border: 0; background: #5fe0ff; color: #06202a; display: grid; place-items: center; cursor: pointer; }

@media (max-width: 760px) {
  .jv-panel, .cv2-panel { right: 10px; left: 10px; bottom: 84px; width: auto; height: calc(100vh - 110px); }
  .jv-widget { right: 10px; bottom: 10px; }
  .cv2-widget { right: 10px; bottom: 76px; }
  .cd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cd-two { grid-template-columns: minmax(0, 1fr); }
}
.cv2-count[hidden] { display: none; }

/* Bandeau de sauvegarde */
.sf-banner { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 9000; display: flex; align-items: center; gap: 12px; max-width: min(760px, calc(100vw - 24px)); padding: 12px 16px; border-radius: 14px; background: #3a1020; border: 1px solid #ff7d8d; color: #ffe1e5; font-weight: 700; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.sf-banner[hidden] { display: none; }
.sf-banner button { flex: none; min-height: 38px; padding: 0 14px; border-radius: 10px; border: 0; background: #ff7d8d; color: #2a0610; font: inherit; font-weight: 800; cursor: pointer; }
