/**
 * Les verdicts : cartes de la vue « Simple », pastilles par joueur, causes des
 * morts et moments clés, résumé des erreurs, frise des erreurs.
 */

/* ---------- Moments clés ---------- */
.keyline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px dashed var(--accent);
  opacity: 0.55;
  z-index: 1;
}
.keyline.bad {
  border-left-color: var(--lvl-bad);
  opacity: 0.8;
}
.m-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
}
.moment {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  border-left: 3px solid var(--line);
}
.moments .moment {
  cursor: pointer;
}
.moments .moment:hover {
  background: var(--panel-2);
}
.drawer .moment {
  margin-bottom: 14px;
  padding: 10px 10px 10px 0;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  grid-template-columns: 0 minmax(0, 1fr);
}
.drawer .moment .m-time {
  visibility: hidden;
}
.moment.bad {
  border-left-color: var(--lvl-bad);
}
.moment.warn {
  border-left-color: var(--lvl-warn);
}
.m-time {
  font-size: 13px;
  color: var(--muted);
  padding-top: 2px;
}
.m-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.moment .ico {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  flex: none;
}
.moment .ico.plain {
  display: inline-block;
  background: var(--line);
}
.m-verdict {
  flex: none;
  font-size: 11px;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--line);
  color: var(--muted);
}
.m-verdict.filter {
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
}
.m-verdict.filter:hover {
  color: var(--fg);
}
.m-verdict.filter.on {
  border-color: var(--accent);
  color: var(--accent);
}
.moment.bad .m-verdict {
  background: color-mix(in srgb, var(--lvl-bad) 16%, transparent);
  color: var(--lvl-bad);
}
.moment.warn .m-verdict {
  background: color-mix(in srgb, var(--lvl-warn) 16%, transparent);
  color: var(--lvl-warn);
}
.victim {
  font: inherit;
  font-size: 12.5px;
  color: var(--fg);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.victim:hover b {
  text-decoration: underline;
}
.m-kickers {
  display: grid;
  gap: 3px;
  margin: 6px 0 0 30px;
}
.kicker {
  display: grid;
  grid-template-columns: 16px 110px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
}
.kicker .ico {
  width: 16px;
  height: 16px;
}
.kicker b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kicker.idle span {
  color: var(--lvl-bad);
  font-weight: 600;
}
.kicker.wasted span,
.kicker.tried span {
  color: var(--lvl-warn);
}
.kicker.busy span,
.kicker.dead span {
  color: var(--muted);
}
td.alert {
  color: var(--c-miss);
  font-weight: 650;
}
.causes {
  display: grid;
  gap: 4px;
  margin: 6px 0 0 30px;
  font-size: 12.5px;
}
.drawer .causes {
  margin: 0 0 14px;
}
.cause {
  display: grid;
  grid-template-columns: 16px 128px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}
.cause .ico {
  width: 16px;
  height: 16px;
  align-self: start;
}
.cause .c-label {
  font-weight: 650;
  color: var(--lvl-warn);
}
.cause.bad .c-label {
  color: var(--lvl-bad);
}
.c-hint {
  color: var(--muted);
}
.lane.enemies,
.name-row.enemies {
  background: rgba(232, 121, 166, 0.04);
  border-bottom: 1px solid var(--line);
}
.enemy-glyph {
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  color: var(--c-cast);
}
.name-row.enemies .n {
  color: var(--c-cast);
}

/* ---------- Vue simple ---------- */
/* Bascule cartes / frise, posée dans l'en-tête de la clé. */
.viewsw {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  margin-left: 8px;
}
.vbtn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  padding: 4px 12px;
  cursor: pointer;
}
.vbtn-ico {
  font-size: 11px;
  line-height: 1;
  opacity: 0.8;
}
.vbtn:hover {
  color: var(--fg);
  background: var(--line-soft);
}
.vbtn.on {
  background: var(--panel);
  color: var(--accent);
  box-shadow: 0 1px 3px #0006;
}
.vbtn.on .vbtn-ico {
  opacity: 1;
}

/* ===================== Vue Rapport =====================
   Le compte rendu se lit de haut en bas : l'issue, ce qui a coûté, qui l'a fait.
   Aucun bloc n'y porte de chiffre inventé — un score n'apprendrait rien, alors
   qu'une barre dit l'ordre de grandeur sans prétendre à la précision. */

/* ---------- L'issue ---------- */
.outcome {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
  margin: 18px 0 8px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  /* Le liseré porte le verdict : plus lisible qu'un fond teinté sur toute la carte. */
  border-left: 4px solid var(--line);
}
.outcome.ok {
  border-left-color: var(--lvl-good);
}
.outcome.ko {
  border-left-color: var(--lvl-bad);
}
.outcome.depl,
.outcome.wip {
  border-left-color: var(--lvl-warn);
}
.oc-main {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.oc-verdict {
  font-size: 22px;
  font-weight: 650;
}
.outcome.ok .oc-verdict {
  color: var(--text-good);
}
.outcome.ko .oc-verdict {
  color: var(--text-bad);
}
.oc-time {
  font-size: 18px;
  color: var(--muted);
}
.oc-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 12.5px;
  color: var(--muted);
}
.oc-fact b {
  font-size: 15px;
  color: var(--fg);
  margin-right: 3px;
}
.oc-fact.bad b {
  color: var(--text-bad);
}

/* ---------- Ce qui a coûté le plus ---------- */
.rk {
  margin-top: 34px;
}
.rk > .table-title,
.rp > .table-title {
  padding: 0 0 12px;
}
.rk-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--panel-2);
  /* Le niveau se lit au liseré : le fond reste sobre, sinon un combat un peu sale
     devient un mur rouge et plus rien ne ressort. */
  border-left: 3px solid var(--lvl-warn);
  margin-bottom: 6px;
}
.rk-row.bad {
  border-left-color: var(--lvl-bad);
}
.rk-ico {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--sunken) center / cover no-repeat;
  font-size: 15px;
}
.rk-title {
  font-size: 14px;
  font-weight: 650;
  color: var(--lvl-warn);
}
.rk-row.bad .rk-title {
  color: var(--text-bad);
}
.rk-who,
.rk-cause {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.rk-who .k {
  color: var(--muted);
}
.rk-times {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 220px;
  font-size: 12px;
  color: var(--muted);
}
/* Un instant cliquable : le chemin le plus court vers le détail d'une erreur. */
.rk-at {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sunken);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 2px 7px;
  cursor: pointer;
}
.rk-at:hover {
  border-color: var(--line-hot);
  color: var(--fg);
}

/* ---------- Les flops ---------- */
.rp {
  margin-top: 34px;
}
.rp-row {
  position: relative;
  display: grid;
  grid-template-columns: 20px 130px 110px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--panel-2);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.rp-row:hover {
  background: var(--raise);
}
/* Le trait sous la ligne donne l'ordre de grandeur de ce qu'on reproche au joueur,
   jamais un score : aucun chiffre ne l'accompagne, seule sa longueur relative se lit.
   Posé sur toute la largeur, il se compare d'une ligne à l'autre d'un seul regard. */
.rp-row::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: var(--gravite, 0%);
  min-width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--cls);
  opacity: 0.85;
}
.rp-row .cls-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}
.rp-name {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-spec {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-tally {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}
/* Les joueurs sans reproche restent de la partie : les taire ferait croire qu'ils
   n'étaient pas là. Repliés, ils ne prennent pas la place des fautifs. */
.rp-clean {
  margin-top: 10px;
}
.rp-clean summary {
  padding: 6px 0;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
}
.rp-clean .rp-row {
  opacity: 0.5;
}
.rp-clean .rp-row:hover {
  opacity: 1;
}

/* ---------- Recount : dégâts et soins côte à côte ---------- */
.recount {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}
.recount > .table-title {
  grid-column: 1 / -1;
  padding: 0 0 12px;
}
.recount-col {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--sunken);
}
.recount-title {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.recount-row {
  position: relative;
  display: grid;
  grid-template-columns: 20px 20px minmax(0, 1fr) 72px 62px;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 5px 9px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.recount-row::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0 auto 0 0;
  width: var(--bar);
  background: var(--cls);
  opacity: 0.42;
}
.recount-row > * {
  position: relative;
  z-index: 1;
}
.recount-row:hover {
  background: var(--raise);
}
.recount-row.low {
  box-shadow: inset 3px 0 var(--lvl-warn);
}
.recount-rank {
  font-family: var(--mono);
  color: var(--muted);
  text-align: right;
}
.recount-row .cls-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}
.recount-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.recount-total,
.recount-rate {
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}
.recount-rate {
  color: var(--cls);
  font-weight: 650;
}
.recount-gap {
  grid-column: 3 / -1;
  margin-top: -4px;
  font-size: 10.5px;
  color: var(--lvl-warn);
}

@media (max-width: 850px) {
  .recount {
    grid-template-columns: 1fr;
  }
}

/* ---------- Une erreur en ligne, dans un panneau ---------- */
/* L'icône est hors du bouton : elle porte le lien Wowhead, le bouton ouvre le détail. */
.fx-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 7px 9px;
  margin-bottom: 4px;
  border-left: 3px solid var(--lvl-warn);
  border-radius: 0 7px 7px 0;
  background: var(--panel-2);
}
.fx-item.bad {
  border-left-color: var(--lvl-bad);
}
.fx-item:hover {
  background: var(--raise);
}
.fx-open {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.fx-item .ts {
  color: var(--muted);
}
.fx-item .ico {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  font-size: 12px;
}
.fx-item .ico.plain {
  display: inline-block;
  background: var(--sunken);
}
.fx-item .sp {
  display: block;
  font-size: 13px;
}
.fx-item .src {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
/* Une ligne de détail, sans rien derrière : pas de main au survol. */
.fx-open.static {
  cursor: default;
}
/* Le kick réussi d'un autre que ce raté doublait : ce n'est plus un réflexe, c'est de la coordination. */
.fx-double {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--fg);
}

/* ---------- Communs ---------- */
.nothing {
  grid-column: 1 / -1;
  padding: 14px 0;
  color: var(--muted);
}
.pill {
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--lvl-warn);
  background: var(--lvl-warn-bg);
}
.pill.bad {
  color: var(--lvl-bad);
  background: var(--lvl-bad-bg);
}
.pill b {
  font-variant-numeric: tabular-nums;
}
.pill.ok {
  color: var(--muted);
  background: transparent;
  padding-left: 0;
}

.fx-title.bad {
  color: var(--lvl-bad);
}
.fx-title.warn {
  color: var(--lvl-warn);
}
.fx-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.fx-card .ico {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  flex: none;
}
.fx-card .sp {
  font-size: 13.5px;
}
.fx-card .src {
  font-size: 12px;
  color: var(--muted);
}
.fx-stay {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line-soft);
}
.fx-stay.on {
  color: var(--c-interrupt);
}
.fx-stay .ts {
  color: var(--muted);
}
.fx-hint {
  margin-top: 14px;
  padding: 8px 10px;
  border-left: 3px solid var(--accent);
  background: var(--panel-2);
  font-size: 12.5px;
  color: var(--muted);
}
.drawer .k {
  color: var(--muted);
}
.drawer .idle-note {
  color: var(--c-miss);
}
/* Arrivé d'une ligne du rapport : les erreurs de cette famille ressortent. */
.fx-item.hot {
  background: var(--raise);
  box-shadow: inset 0 0 0 1px var(--accent);
}
