/**
 * fiche.css — styles des composants « fiche / quêtes / actions / avatar / identité ».
 * À charger APRÈS panels.css et AVANT responsive.css (FRONT-A garde la main sur les
 * breakpoints globaux). Sélecteurs volontairement au niveau des anciens (`#personal-stats …`)
 * pour surcharger panels.css sans `!important`.
 *
 * Mobile / compact : < 600 px ou pointeur tactile (cibles ≥ 44 px).
 */

/* ── Rôles & états génériques ────────────────────────────────────────────── */
body.role-public .owner-only { display: none !important; }
.db-meter[hidden],
.debug-zone[hidden],
.personal-alerts[hidden],
.personal-toast[hidden],
.stat-group__grid[hidden],
.wizard-tools[hidden] { display: none !important; }

/* ── Retours visuels (flash, delta flottant, secousse) ───────────────────── */
.fx-flash { animation: fx-flash 0.65s ease-out; }
.fx-press { animation: fx-press 0.6s ease-out; }
.fx-shake { animation: fx-shake 0.5s ease-in-out; }

@keyframes fx-flash {
  0%   { box-shadow: 0 0 0 2px var(--green), 0 0 18px var(--green); filter: brightness(1.6); }
  100% { box-shadow: 0 0 0 0 transparent; filter: none; }
}
@keyframes fx-press {
  0%   { transform: scale(0.94); box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 70%, transparent), 0 0 22px currentColor; filter: brightness(1.8); }
  60%  { transform: scale(1.03); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; filter: none; }
}
@keyframes fx-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.fx-float {
  position: fixed;
  z-index: 10000;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: var(--font-pixel, monospace);
  font-size: var(--type-pixel-md, 16px);
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: 0 0 8px currentColor, 0 2px 0 rgba(0, 0, 0, 0.8);
  animation: fx-rise 1.3s ease-out forwards;
}
.fx-float--good { color: var(--green); }
.fx-float--bad  { color: var(--red); }
.fx-float--warn { color: var(--amber); }
@keyframes fx-rise {
  0%   { opacity: 0; transform: translate(-50%, -30%) scale(0.8); }
  15%  { opacity: 1; transform: translate(-50%, -80%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -260%) scale(1); }
}

/* ── Fiche : en-têtes de groupes Maslow (bouton repliable) ───────────────── */
#personal-stats .stat-group__title {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  min-height: 44px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
}
#personal-stats .stat-group__title:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
#personal-stats .stat-group__head {
  display: flex;
  align-items: center;
  gap: 8px;
}
#personal-stats .stat-group__label { flex: 1 1 auto; min-width: 0; }
#personal-stats .stat-group__meta { align-self: center; padding-top: 0; white-space: nowrap; }
#personal-stats .stat-group__meta[data-state="critical"] { color: var(--red); }
#personal-stats .stat-group__meta[data-state="low"] { color: var(--amber); }
.stat-group__chevron {
  flex: none;
  transition: transform 0.15s ease;
  opacity: 0.8;
}
.stat-group--collapsed .stat-group__chevron { transform: rotate(-90deg); }
.stat-group--collapsed .stat-group__blurb { display: none; }

/* ── Fiche : alertes en tête, toast d'erreur ─────────────────────────────── */
#personal-stats .personal-alerts__chip {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
  min-height: 32px;
}
#personal-stats .personal-alerts__chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.personal-toast {
  margin: 0 0 6px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--red) 55%, #300808);
  background: color-mix(in srgb, var(--red) 14%, #120505);
  color: #ffb4b4;
  font-family: var(--font-mono);
  font-size: var(--type-small);
}

/* ── Jauge : valeur numérique, sens inverse, steppers ────────────────────── */
.stat-bar--ok .stat-bar__icon { animation: none; } /* 18 animations infinies = bruit + coût */

#personal-stats .stat-bar--rpg,
.stat-bar--rpg[data-editable],
.stat-bar--rpg {
  display: grid;
  grid-template-columns: 32px minmax(86px, 1.1fr) minmax(100px, 2fr) minmax(4.6ch, auto);
  grid-template-areas: "icon label track value";
  align-items: center;
  column-gap: 8px;
  row-gap: 0;
  min-width: 0;
}
#personal-stats .stat-bar--rpg[data-editable="1"],
.stat-bar--rpg[data-editable="1"] {
  grid-template-columns: 32px minmax(86px, 1.1fr) 28px minmax(90px, 2fr) 28px minmax(4.6ch, auto);
  grid-template-areas: "icon label minus track plus value";
}
.stat-bar__emoji { grid-area: icon; }
.stat-bar__label {
  grid-area: label;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  min-width: 0;
  white-space: normal;
}
#personal-stats .stat-bar__label { font-size: var(--type-small); line-height: 1.15; }
.stat-bar__name { overflow-wrap: anywhere; }
.stat-bar__tag {
  font-family: var(--font-mono);
  font-size: var(--type-caption);
  letter-spacing: 0.04em;
  text-transform: none;
  padding: 0 4px;
  border: 1px solid color-mix(in srgb, var(--amber) 55%, transparent);
  color: var(--amber);
  border-radius: 2px;
  cursor: help;
}
.stat-bar__hint {
  font-family: var(--font-mono);
  font-size: var(--type-caption);
  text-transform: none;
  letter-spacing: 0;
  color: var(--dim);
}
.stat-bar__track { grid-area: track; }
.stat-bar__value {
  grid-area: value;
  justify-self: end;
  min-width: 4.6ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.stat-bar__value small {
  font-size: 0.62em;
  font-weight: 400;
  opacity: 0.7;
  margin-left: 1px;
}

.stat-bar__step {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
  color: var(--green);
  background: linear-gradient(180deg, #1a221c 0%, #0c100d 100%);
  border: 1px solid color-mix(in srgb, var(--green) 35%, #1a221c);
  border-radius: 3px;
  cursor: pointer;
  touch-action: manipulation;
}
.stat-bar__step--minus { grid-area: minus; }
.stat-bar__step--plus  { grid-area: plus; }
.stat-bar__step:hover  { background: rgba(255, 255, 255, 0.08); }
.stat-bar__step:active { background: var(--green); color: var(--bg); }
.stat-bar--low .stat-bar__step { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, #222); }
.stat-bar--critical .stat-bar__step { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, #222); }

/* Zone de prise élargie sans grossir la barre (touch ≥ 44 px) */
.stat-bar__track[role="slider"]::before {
  content: '';
  position: absolute;
  inset: -16px 0;
}
.stat-bar__track[role="slider"] { cursor: ew-resize; touch-action: pan-y pinch-zoom; }
.stat-bar__track[role="meter"] { cursor: default; }
.stat-bar[data-editable="1"] .stat-bar__fill::after { width: 4px; background: rgba(255, 255, 255, 0.8); }
.stat-bar__track:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* Barre critique : pas de pulsation permanente (le rouge suffit), valeur lisible */
.stat-bar--critical .stat-bar__fill { animation: none; }
.stat-bar--critical .stat-bar__value { color: var(--red); }
.stat-bar--low .stat-bar__value { color: var(--amber); }
.stat-bar--ok .stat-bar__value { color: color-mix(in srgb, var(--green) 85%, #fff); }

.stat-bar--gain { animation: stat-gain 0.9s ease-out; }
.stat-bar--loss { animation: stat-loss 0.9s ease-out; }
@keyframes stat-gain { 0% { box-shadow: 0 0 0 1px var(--green), 0 0 14px var(--green); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes stat-loss { 0% { box-shadow: 0 0 0 1px var(--red), 0 0 14px var(--red); } 100% { box-shadow: 0 0 0 0 transparent; } }
.stat-bar--saving { opacity: 0.85; }
.stat-bar--saving .stat-bar__value::after { content: ' …'; opacity: 0.6; }
.stat-bar--dragging .stat-bar__fill { transition: none; }
.stat-bar--error { animation: fx-shake 0.5s ease-in-out; box-shadow: 0 0 0 1px var(--red); }

/* Compact / tactile : une colonne, valeur toujours visible, cibles ≥ 44 px */
@media (max-width: 599px), (pointer: coarse) {
  #personal-stats .stat-group__grid { grid-template-columns: 1fr; }
  #personal-stats .stat-bar--rpg,
  .stat-bar--rpg {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas:
      "icon label value"
      "track track track";
    row-gap: 8px;
    padding-block: 8px;
  }
  #personal-stats .stat-bar--rpg[data-editable="1"],
  .stat-bar--rpg[data-editable="1"] {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-areas:
      "icon label value"
      "minus track plus";
  }
  #personal-stats .stat-bar__emoji { width: 40px; height: 40px; }
  .stat-bar__step { width: 44px; height: 44px; font-size: 24px; }
  #personal-stats .stat-bar__track { height: 14px; min-width: 0; }
  .stat-bar__value { font-size: var(--type-h3); min-width: 44px; }
  #personal-stats .personal-alerts__chip { min-height: 44px; }
}

/* ── Avatar : boutons MIC / DEBUG ────────────────────────────────────────── */
.wizard-tools {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  padding: 3px 0;
}
.wizard-tools__btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-mono);
  font-size: var(--type-small);
  letter-spacing: 0.06em;
  padding: 3px 10px;
  min-height: 28px;
  color: var(--dim);
  background: #0a0e0b;
  border: 1px solid color-mix(in srgb, var(--green) 25%, #1a221c);
  border-radius: 3px;
  cursor: pointer;
}
.wizard-tools__btn:hover { color: var(--green); }
.wizard-tools__btn:disabled { opacity: 0.5; cursor: progress; }
.wizard-tools__btn--on {
  color: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 8px color-mix(in srgb, var(--green) 40%, transparent);
}
.wizard-tools__btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
#wizard-canvas { image-rendering: auto; } /* canvas DPR : pas de pixellisation du navigateur */
@media (max-width: 599px), (pointer: coarse) {
  .wizard-tools__btn { min-height: 44px; padding: 6px 14px; }
}

/* ── Quêtes : onglets (compact), filtre, chips ───────────────────────────── */
.quest-tabs { display: none; }
.quest-journal__count {
  font-family: var(--font-mono);
  font-size: var(--type-caption);
  color: rgba(255, 215, 106, 0.6);
  margin-left: 4px;
}
.quest-filter {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  padding: 2px 0 4px;
}
.quest-filter__btn {
  appearance: none;
  -webkit-appearance: none;
  flex: 1 1 auto;
  font-family: var(--font-mono);
  font-size: var(--type-caption);
  padding: 3px 6px;
  min-height: 28px;
  color: rgba(255, 215, 106, 0.7);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 200, 80, 0.22);
  border-radius: 2px;
  cursor: pointer;
}
.quest-filter__btn[aria-pressed="true"] {
  color: #1a1204;
  background: #ffd24d;
  border-color: #ffd24d;
}
.quest-journal__foot { padding: 4px 0 2px; text-align: center; }
.quest-journal__all {
  font-family: var(--font-mono);
  font-size: var(--type-small);
  color: #ffd24d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Compact (< 620 px de large pour le journal) : onglets segmentés, une seule colonne visible */
.quest-journal[data-compact="1"] {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  overflow: visible;
  gap: 6px;
}
.quest-journal[data-compact="1"] .quest-tabs {
  display: flex;
  gap: 0;
  position: sticky;
  top: 0;
  z-index: 3;
  border: 1px solid rgba(255, 200, 80, 0.4);
  border-radius: 4px;
  overflow: hidden;
  background: #0d0a03;
}
.quest-tabs__tab {
  appearance: none;
  -webkit-appearance: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 6px 4px;
  font-family: var(--font-mono);
  font-size: var(--type-small);
  line-height: 1.1;
  color: rgba(255, 215, 106, 0.75);
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(255, 200, 80, 0.25);
  cursor: pointer;
}
.quest-tabs__tab:last-child { border-right: 0; }
.quest-tabs__tab[aria-selected="true"] { color: #1a1204; background: #ffd24d; font-weight: 700; }
.quest-tabs__tab:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.quest-tabs__n { font-variant-numeric: tabular-nums; opacity: 0.8; }
.quest-journal[data-compact="1"] .quest-journal__col { display: none; }
.quest-journal[data-compact="1"][data-tab="upcoming"]  .quest-journal__col[data-quest-col="upcoming"],
.quest-journal[data-compact="1"][data-tab="active"]    .quest-journal__col[data-quest-col="active"],
.quest-journal[data-compact="1"][data-tab="completed"] .quest-journal__col[data-quest-col="completed"] { display: flex; }
.quest-journal[data-compact="1"] .quest-journal__head { display: none; } /* l'onglet porte déjà le titre */
.quest-journal[data-compact="1"] .quest-journal__list { max-height: none; overflow: visible; }
.quest-journal[data-compact="1"] .quest-filter__btn { min-height: 44px; }

.quest-chip { gap: 4px; padding: 6px 7px; min-width: 0; }
.quest-chip__top {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.quest-chip__top .quest-chip__t { flex: 1 1 auto; min-width: 0; display: flex; gap: 5px; align-items: baseline; }
.quest-chip__name { min-width: 0; overflow-wrap: anywhere; }
.quest-chip__xp { flex: none; white-space: nowrap; margin-left: 0; }
.quest-chip__mark { flex: none; font-weight: 700; }
.quest-chip__mark--ok { color: var(--green); }
.quest-chip__mark--fail { color: var(--red); text-shadow: var(--red-glow); }
.quest-chip--failed { border-color: rgba(255, 80, 80, 0.35); }
.quest-chip--failed .quest-chip__name { text-decoration: line-through; opacity: 0.7; }
.quest-chip--completed .quest-chip__name { opacity: 0.8; }
.quest-chip__tag--urgency-critical,
.quest-chip__tag--urgency-urgent { color: #ff9a80; border-color: rgba(255, 120, 90, 0.4); }
.quest-chip__tag--priority-high { color: #ffd24d; }
.quest-chip__tag--difficulty-epic,
.quest-chip__tag--difficulty-hard { color: #e6a0ff; border-color: rgba(220, 140, 255, 0.35); }
.quest-chip__btn { min-height: 32px; }
.quest-chip__btn--done { color: var(--green); border-color: rgba(57, 255, 20, 0.35); }
.quest-chip__btn:disabled { opacity: 0.5; cursor: progress; }

/* Sous-tâches (details) */
.quest-chip__subs {
  margin-top: 2px;
  padding: 3px 5px;
  border-left: 2px solid rgba(255, 200, 80, 0.25);
}
.quest-chip__subs > summary {
  cursor: pointer;
  list-style: none;
  font-size: var(--type-small);
  color: rgba(255, 220, 140, 0.85);
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.quest-chip__subs > summary::-webkit-details-marker { display: none; }
.quest-chip__subs > summary::before { content: '▸'; display: inline-block; transition: transform 0.12s; }
.quest-chip__subs[open] > summary::before { transform: rotate(90deg); }
.quest-chip__subs-n { font-family: var(--font-mono); color: rgba(255, 220, 140, 0.6); }
.quest-chip__progress {
  height: 6px;
  margin: 4px 0;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 200, 80, 0.2);
  overflow: hidden;
}
.quest-chip__progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8a6a12, #ffd24d);
  transition: width 0.25s ease-out;
}
.quest-chip__sublist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.quest-chip__subtask { min-height: 24px; align-items: center; }
.quest-chip__subtask input[type="checkbox"] { width: 16px; height: 16px; }
.quest-chip__addform { display: flex; gap: 4px; margin-top: 4px; }
.quest-chip__addinput {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--type-small);
  padding: 3px 6px;
  min-height: 28px;
  color: #ffeab0;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 200, 80, 0.3);
  border-radius: 2px;
}
.quest-chip__addinput:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.quest-chip__add-sub {
  flex: none;
  margin: 0;
  padding: 3px 8px;
  min-height: 28px;
  border: 1px solid rgba(255, 200, 80, 0.35);
  border-radius: 2px;
  color: #ffd24d;
  background: rgba(60, 45, 10, 0.8);
}
.quest-chip__err { margin-top: 3px; color: #ff9a80; font-size: var(--type-caption); }

@media (max-width: 599px), (pointer: coarse) {
  .quest-chip__btn,
  .quest-chip__add-sub,
  .quest-chip__addinput { min-height: 44px; }
  .quest-chip__subs > summary { min-height: 44px; }
  .quest-chip__subtask { min-height: 44px; gap: 10px; }
  .quest-chip__subtask input[type="checkbox"] { width: 22px; height: 22px; }
  .quest-chip__m { gap: 6px; }
}

/* ── Mission principale (Z4) ─────────────────────────────────────────────── */
.mission__progress { display: flex; align-items: center; gap: 8px; }
.mission__progress .quest-chip__progress { flex: 1 1 auto; margin: 2px 0; }
.mission__progress-n { font-family: var(--font-mono); font-size: var(--type-caption); color: rgba(180, 255, 140, 0.8); white-space: nowrap; }
.mission__next { font-size: var(--type-small); color: rgba(200, 255, 180, 0.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mission__none { opacity: 0.65; font-weight: 400; font-size: var(--type-body); }
.mission__name { overflow-wrap: anywhere; }
.hero-quest__actions { flex-wrap: wrap; }
.hero-quest__btn { min-height: 32px; }
.hero-quest__btn:disabled { opacity: 0.5; cursor: progress; }
.hero-quest__meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
@media (max-width: 599px), (pointer: coarse) { .hero-quest__btn { min-height: 44px; padding-inline: 14px; } }

/* ── Actions : icône + libellé, 3 catégories ─────────────────────────────── */
.actions-panel__subhead { margin: 0; display: flex; align-items: center; gap: 6px; }
.actions-panel__n { font-family: var(--font-mono); font-size: var(--type-caption); opacity: 0.6; }
.panel--actions .action-btn,
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 32px;
  white-space: nowrap;
  touch-action: manipulation;
}
.action-btn__icon { flex: none; font-size: 1.15em; line-height: 1; }
.action-btn__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.action-btn--cooldown { opacity: 0.55; cursor: progress; }
.action-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (max-width: 599px), (pointer: coarse) {
  .panel--actions .action-btn,
  .action-btn { min-height: 44px; padding: 6px 12px; }
  .actions-panel__buttons { gap: 6px; }
}

/* ── Bandeau de statuts : lisible, suggestions cliquables ────────────────── */
.status-effects-strip__icon { font-size: 1.15em; }
.status-effects-strip__label { font-weight: 600; }
.status-effects-strip__action { min-height: 28px; border-radius: 2px; }
.status-effects-strip__action:hover { background: color-mix(in srgb, var(--green) 14%, transparent); }
.status-effects-strip__action:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.status-effects-strip__action--minor { opacity: 0.6; border-color: transparent; text-decoration: underline; }
.status-effects-strip__quick { opacity: 0.7; }
.status-effects-strip__arrow { opacity: 0.6; }
body.role-public .status-effects-strip__suggest { display: none !important; }
@media (max-width: 599px), (pointer: coarse) {
  .status-effects-strip__action { min-height: 44px; padding: 4px 10px; }
}

/* ── Barre XP / bandeau d'identité : le rang s'ellipse, jamais masqué par le compteur ── */
.world-xp-bar__head { min-width: 0; }
.world-xp-bar__title { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.world-xp-bar__nums { flex: none; white-space: nowrap; }

.identity-band {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 10px;
  font-family: var(--font-hud);
  font-size: var(--type-small);
  color: var(--green);
}
.identity-band__lv {
  flex: none;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffc107;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.35);
  white-space: nowrap;
}
.identity-band__who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.identity-band__line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.identity-band__name { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: #c8ffb0; }
.identity-band__title {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-muted);
}
.identity-band__xp {
  position: relative;
  height: 14px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid color-mix(in srgb, var(--green) 22%, transparent);
  overflow: hidden;
}
.identity-band__xp-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, #1a6b3a 0%, var(--green) 60%, #b8ff9a 100%);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
  transition: width 0.35s ease;
}
.identity-band__xp-n {
  position: relative;
  display: block;
  padding: 0 6px;
  font-size: var(--type-caption);
  line-height: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 1px 2px #000, 0 0 3px #000;
  white-space: nowrap;
}
.identity-band__side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.identity-band__quests { white-space: nowrap; color: var(--green-muted); font-variant-numeric: tabular-nums; }
.identity-band__conn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--type-caption);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.identity-band__conn[hidden] { display: none; }
.identity-band__conn i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--dim);
}
.identity-band__conn[data-state="live"] { color: var(--green); }
.identity-band__conn[data-state="live"] i { background: var(--green); box-shadow: 0 0 6px var(--green); }
.identity-band__conn[data-state="offline"] { color: var(--red); }
.identity-band__conn[data-state="offline"] i { background: var(--red); }
.identity-band__conn[data-state="reconnecting"],
.identity-band__conn[data-state="connecting"] { color: var(--amber); }
.identity-band__conn[data-state="reconnecting"] i,
.identity-band__conn[data-state="connecting"] i { background: var(--amber); }
@media (max-width: 599px) {
  .identity-band { gap: 8px; padding: 4px 8px; }
  .identity-band__name { max-width: 30%; }
}

/* ── Mouvement réduit ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .fx-flash, .fx-press, .fx-shake, .stat-bar--gain, .stat-bar--loss, .stat-bar--error { animation: none; }
  .fx-float { animation: fx-fade 1.2s linear forwards; }
  .stat-bar__fill, .identity-band__xp-fill, .quest-chip__progress > span { transition: none; }
}
@keyframes fx-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
