/* Direction artistique : celle du ZEvent 2026 — noir profond, vert vif, or
   chaud, et la Switzer comme typographie. Ce sont les mêmes valeurs que celles
   utilisées sur zevent.fr ; le site n'en reprend ni le logo ni la marque. */
@import url('https://api.fontshare.com/v2/css?f[]=switzer@400,500,600,700,800&display=swap');

:root {
  --bg: #0b0b0b;
  --bg-2: #121212;
  --bg-3: #1b1b1b;
  --line: #2c2c2c;
  --txt: #f4f4f4;
  --txt-dim: #a5a5a5;
  --accent: #00bd00;
  --accent-soft: #33ca33;
  --accent-2: #efcb73;
  --ok: #33ca33;
  --warn: #ffe095;
  --danger: #f87171;
  --radius: 10px;
  --sidebar-w: 372px;
  --font: 'Switzer', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* `hidden` doit gagner sur les règles d'affichage des composants (grid/flex). */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--txt);
  font: 14px/1.45 var(--font);
}

button, input, select { font: inherit; color: inherit; }

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100%;
}
.app[data-view="wall"] { grid-template-columns: 0 1fr; }
.app[data-view="wall"] .sidebar { display: none; }
.app[data-view="dashboard"] .mosaic { display: none; }
.app[data-view="dashboard"] .main { flex: 0 0 auto; }

/* ---------------- Sidebar ---------------- */

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
}

.pot {
  padding: 16px 16px 14px;
  background: linear-gradient(160deg, rgba(0, 189, 0, .25), rgba(34, 211, 238, .08) 70%, transparent);
  border-bottom: 1px solid var(--line);
}
.pot__brand {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 6px;
  text-decoration: none;
}
/* Wordmark maison : la typo et les couleurs de l'événement, pas son logo. */
.wordmark {
  font-weight: 800; font-size: 22px; letter-spacing: .04em; line-height: 1;
  color: var(--txt);
}
.wordmark__z { color: var(--accent); }
.wordmark__year {
  margin-left: 3px; padding: 1px 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: #0b0b0b; background: var(--accent); border-radius: 4px;
  vertical-align: middle;
}
.pot__unofficial {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--txt-dim);
}
.pot__brand:hover .pot__unofficial { color: var(--accent-2); }
.app[data-sidebar="rail"] .pot__brand { display: none; }

.pot__label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--txt-dim);
}
.pot__amount {
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  margin-top: 2px;
  transition: color .3s ease;
}
.pot__amount.bump { color: var(--ok); }
.pot__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 12px;
  color: var(--txt-dim);
}
.pot__delta {
  font-size: 11px; font-weight: 700;
  color: var(--ok); background: rgba(52, 211, 153, .12);
  border: 1px solid rgba(52, 211, 153, .35);
  padding: 0 6px; border-radius: 999px;
  animation: toast-in .2s ease;
}
.pot__delta[hidden] { display: none; }
.pot__clock {
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--txt); padding: 0 6px; border-left: 1px solid var(--line);
}
.app[data-sidebar="rail"] .pot__clock { display: none; }
.pot__age { font-size: 11px; color: #7c85a0; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--txt-dim); }
.dot--live { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .15); }
.dot--idle { background: var(--warn); }
.dot--down { background: var(--danger); }

.filters { padding: 10px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.filters__row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.input, .select {
  width: 100%;
  padding: 7px 10px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
.select { width: auto; }
.input:focus, .select:focus { border-color: var(--accent); }
.chk { display: flex; align-items: center; gap: 6px; color: var(--txt-dim); font-size: 13px; }

.streamers { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0; padding: 6px; list-style: none; }
.streamers::-webkit-scrollbar { width: 10px; }
.streamers::-webkit-scrollbar-thumb { background: #2a3044; border-radius: 8px; }

.card {
  position: relative;
  display: grid;
  grid-template-columns: 24px 36px minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: var(--radius);
  cursor: grab;
  border: 1px solid transparent;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.card > * { min-width: 0; }
.card:hover { background: var(--bg-3); border-color: var(--line); }
.card.is-open { border-color: rgba(0, 189, 0, .6); background: rgba(0, 189, 0, .12); }
.card.dragging { opacity: .45; }

.card__rank {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #6f7891;
  text-align: right;
}
.card:nth-child(-n+3) .card__rank { color: var(--accent-2); font-weight: 700; }

.card__avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-3); object-fit: cover; }
.card.offline .card__avatar { filter: grayscale(1); opacity: .5; }

.card__name {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card__name .live { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); flex: none; }
.card__sub {
  font-size: 12px; color: #9099b3; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card.offline .card__name { color: #8b93ab; }

.card__right { display: flex; align-items: center; gap: 6px; justify-self: end; }
.card__amount {
  font-size: 14px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #fff;
}
/* Les boutons sortent du flux : la ligne garde toute sa largeur pour le nom,
   le jeu et le montant, qui sont ce qu'on lit vraiment. */
.card__actions {
  position: absolute; top: 7px; right: 8px;
  display: flex; gap: 4px;
  padding-left: 22px;
  opacity: 0; pointer-events: none;
  transition: opacity .12s ease;
  background: linear-gradient(90deg, transparent, var(--bg-3) 20%);
}
.card:hover .card__actions { opacity: 1; pointer-events: auto; }
.iconbtn {
  border: 1px solid var(--line);
  background: var(--bg-3);
  border-radius: 7px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--txt-dim);
  flex: none;
}
.iconbtn:hover { color: var(--txt); border-color: var(--accent); }

.badge {
  font-size: 9px; font-weight: 700; letter-spacing: .08em;
  padding: 1px 5px; border-radius: 999px; flex: none;
  color: #0b0d14; background: var(--accent-2);
}

.goals { grid-column: 3 / -1; margin-top: 2px; }
.goal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: baseline;
  font-size: 11.5px;
  color: #98a1bb;
}
.goal__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal__pct { font-variant-numeric: tabular-nums; color: var(--txt); font-weight: 600; }
.bar { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: #232a3d; overflow: hidden; }
.bar__fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .5s ease; }
.goal--done .goal__title { color: var(--ok); }
.goal__meta {
  grid-column: 1 / -1;
  font-size: 11px; color: #6f7891;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.goals__list {
  grid-column: 1 / -1;
  margin: 6px 0 2px; padding: 0; list-style: none;
  display: grid; gap: 6px; max-height: 200px; overflow-y: auto;
  border-left: 2px solid var(--line); padding-left: 8px;
}
.goals__list .goal--done .goal__title { text-decoration: line-through; opacity: .65; }
.goals__empty { font-size: 11px; color: #6f7891; }

.sidebar__foot {
  display: grid; gap: 6px;
  padding: 8px 12px 10px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--txt-dim);
}
.sidebar__foot-row { display: flex; justify-content: space-between; align-items: center; }
.sidebar__legal { margin: 0; font-size: 10.5px; line-height: 1.45; color: #7d7d7d; }
.sidebar__legal a { color: var(--txt-dim); text-decoration: underline; }
.app[data-sidebar="rail"] .sidebar__legal { display: none; }
.sidebar__foot a { color: var(--accent-2); text-decoration: none; }

/* ---------------- Main / toolbar ---------------- */

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.toolbar {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  flex-wrap: wrap;
}
.toolbar__group { display: flex; align-items: center; gap: 4px; }

/* --- Barre d'outils escamotable (touche B) --- */

.toolbar__hide {
  order: -1;
  padding: 2px 7px; margin-right: 2px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-3); color: var(--txt-dim);
  font-size: 11px; cursor: pointer; line-height: 1.4;
}
.toolbar__hide:hover { color: var(--txt); border-color: var(--accent); }

.app[data-toolbar="hidden"] .toolbar { display: none; }

/* Languette de rappel : discrète, mais toujours au même endroit. */
.toolbar__peek {
  /* Au-dessus de la barre révélée au survol (z-index 9) : sinon, en montant la
     souris vers la languette, la barre surgissait par-dessus et avalait le clic. */
  position: absolute; top: 4px; right: 10px; z-index: 12;
  padding: 5px 12px;
  border: 1px solid var(--accent); border-radius: 999px;
  background: rgba(10, 10, 10, .92); color: var(--txt);
  font-size: 11px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
}
.toolbar__peek[hidden] { display: none; }
.toolbar__peek:hover { color: var(--txt); border-color: var(--accent); }
.main { position: relative; }

/* Une lisière de 8 px en haut ramène la barre au survol — et seulement là, pour
   qu'elle ne surgisse pas dès qu'on bouge la souris dans la mosaïque. */
.toolbar__edge { display: none; }
.app[data-toolbar="hidden"] .toolbar__edge {
  display: block;
  /* La lisière s'arrête avant la languette : on peut donc l'atteindre sans
     déclencher l'apparition de la barre. */
  position: absolute; top: 0; left: 0; right: 150px; height: 8px; z-index: 9;
}
.app[data-toolbar="hidden"] .toolbar__edge:hover ~ .toolbar,
.app[data-toolbar="hidden"] .toolbar:hover {
  display: flex;
  position: absolute; top: 0; left: 0; right: 0; z-index: 9;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}
.toolbar__label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--txt-dim); margin-right: 4px; }
.toolbar__spacer { flex: 1; }

.btn {
  padding: 5px 10px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn[aria-pressed="true"] { background: rgba(0, 189, 0, .22); border-color: var(--accent); color: #fff; }
.btn--danger:hover { border-color: var(--danger); color: var(--danger); }
.range { width: 90px; accent-color: var(--accent); }

/* ---------------- Mosaïque ---------------- */

.mosaic { position: relative; flex: 1; min-height: 0; overflow: hidden; background:
  radial-gradient(circle at 20% 0%, rgba(0, 189, 0, .08), transparent 45%), var(--bg); }
.mosaic.dragover { outline: 2px dashed var(--accent); outline-offset: -8px; }

.drophint { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.drophint__inner {
  display: grid; gap: 4px; text-align: center; color: var(--txt-dim);
  border: 1px dashed var(--line); border-radius: 14px; padding: 26px 34px;
}
.drophint[hidden] { display: none; }

.win {
  position: absolute;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
  contain: strict;
}
.win.is-focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 12px 40px rgba(0, 189, 0, .3); }
.win.is-audio::after {
  content: "🔊";
  position: absolute; right: 8px; bottom: 8px;
  font-size: 12px; opacity: .8; pointer-events: none;
}
.win__player { position: absolute; inset: 0; }
.win__player iframe { width: 100%; height: 100%; border: 0; display: block; }

.win__detached {
  position: absolute; inset: 0;
  display: grid; place-items: center; gap: 8px;
  background: var(--bg-2); color: var(--txt-dim); text-align: center; padding: 12px;
}

.win { --chat-w: clamp(230px, 34%, 420px); }
.win.has-chat .win__player,
.win.has-chat .win__catch,
.win.has-chat .win__veil { right: var(--chat-w); }

.win__chat {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 4;
  width: var(--chat-w);
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border-left: 1px solid var(--line);
}
.win__chat[hidden] { display: none; }
.win__chat-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--txt-dim);
}
.win__chat-bar > span { flex: 1; }
.win__chat-frame { flex: 1; width: 100%; border: 0; display: block; }

.win__catch { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.win__catch[hidden] { display: none; }

.win__veil {
  /* Bandeau, plus voile : le lecteur Twitch doit rester cliquable dessous —
     lui seul peut démarrer une lecture que le navigateur a refusée. */
  position: absolute; inset: auto 0 0 0; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(0deg, rgba(5, 7, 12, .94), rgba(5, 7, 12, .55));
  text-align: left; padding: 8px 10px;
  pointer-events: none;
}
.win__veil > * { pointer-events: auto; }
.win__veil[hidden] { display: none; }
.win__resume {
  padding: 7px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 600;
}
.win__resume:hover { filter: brightness(1.12); }
.win__veil-hint { font-size: 11px; color: var(--txt-dim); }

.win__overlay {
  position: absolute; inset: 0; z-index: 3;
  opacity: 0;
  transition: opacity .12s ease;
  pointer-events: none;
}
.win:hover .win__overlay, .win.show-ui .win__overlay { opacity: 1; }
/* L'overlay ne capte les clics que lorsqu'il est visible : sinon la barre et le
   pied, invisibles, avalaient les clics au centre des petites vignettes. Le pied
   est purement informatif : il ne capte jamais rien. */
.win__overlay > * { pointer-events: none; }
.win:hover .win__overlay > *, .win.show-ui .win__overlay > * { pointer-events: auto; }
.win:hover .win__overlay > .win__foot, .win.show-ui .win__overlay > .win__foot { pointer-events: none; }

.win__bar {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .82), transparent);
  cursor: grab;
}
.win__bar:active { cursor: grabbing; }
.win__title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.win__stats { font-size: 11px; color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.win__tools { display: flex; gap: 4px; margin-left: auto; }
.iconbtn.is-spinning { animation: spin .7s linear; }
@keyframes spin { to { transform: rotate(360deg); } }
.win__tools .iconbtn { background: rgba(10, 12, 20, .75); }
.win__quality {
  background: rgba(10, 12, 20, .8);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px 4px;
  font-size: 12px;
}

.win__foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 10px; align-items: center;
  padding: 6px 8px;
  font-size: 11px; color: var(--txt-dim);
  background: linear-gradient(0deg, rgba(0, 0, 0, .82), transparent);
}
.win__goal { flex: 1; min-width: 0; }
.win__goal .bar { height: 4px; margin-top: 3px; }

/* Les contrôles Twitch occupent le bas du lecteur : on libère la place. */
.win.has-controls .win__foot { display: none; }
.win.has-controls .win__catch { display: none; }

.handle { position: absolute; z-index: 5; }
.handle--e { top: 8px; bottom: 8px; right: -3px; width: 8px; cursor: ew-resize; }
.handle--w { top: 8px; bottom: 8px; left: -3px; width: 8px; cursor: ew-resize; }
.handle--n { left: 8px; right: 8px; top: -3px; height: 8px; cursor: ns-resize; }
.handle--s { left: 8px; right: 8px; bottom: -3px; height: 8px; cursor: ns-resize; }
.handle--se { right: -3px; bottom: -3px; width: 16px; height: 16px; cursor: nwse-resize; }
.handle--sw { left: -3px; bottom: -3px; width: 16px; height: 16px; cursor: nesw-resize; }
.handle--ne { right: -3px; top: -3px; width: 16px; height: 16px; cursor: nesw-resize; }
.handle--nw { left: -3px; top: -3px; width: 16px; height: 16px; cursor: nwse-resize; }

/* Bouclier : empêche les iframes de voler le pointeur pendant drag/resize. */
.shield { position: fixed; inset: 0; z-index: 9999; cursor: grabbing; }
.shield[hidden] { display: none; }

/* ---------------- Vue solo (fenêtre détachée) ---------------- */

.solo { position: fixed; inset: 0; background: #000; }
.solo .win { position: absolute; inset: 0; border: 0; border-radius: 0; box-shadow: none; }

/* ---------------- Toasts ---------------- */

.toasts { position: fixed; right: 14px; bottom: 14px; display: grid; gap: 8px; z-index: 10000; }
.toast {
  background: var(--bg-3); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  padding: 8px 12px; border-radius: 8px; max-width: 320px;
  animation: toast-in .18s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------------- Panneau de pilotage (vue dashboard) ---------------- */

.pilot { display: none; padding: 14px; overflow-y: auto; }
.app[data-view="dashboard"] .pilot { display: block; }
.pilot h2 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--txt-dim); margin: 0 0 10px; }
.pilot__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pilot__row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.pilot__row.is-focus { border-color: var(--accent); }
.pilot__name { font-weight: 600; min-width: 120px; }
.pilot__meta { flex: 1; min-width: 0; font-size: 12px; color: var(--txt-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pilot__empty { color: var(--txt-dim); }

/* ---------------- Menu des dispositions ---------------- */

.menu {
  position: absolute;
  z-index: 500;
  min-width: 260px;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.menu[hidden] { display: none; }
.menu__item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 2px 8px;
  width: 100%;
  padding: 7px 9px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.menu__item:hover { background: var(--bg-3); }
.menu__item[aria-checked="true"] { background: rgba(0, 189, 0, .16); }
.menu__check { color: var(--accent-2); }
.menu__label { font-weight: 600; }
.menu__hint { grid-column: 2; font-size: 11.5px; color: var(--txt-dim); }
.menu__sep { margin: 5px 4px; border-top: 1px solid var(--line); }

/* ---------------- Panneau réduit (rail) ---------------- */

.pot { position: relative; }
.sidebar__toggle {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--txt-dim);
  cursor: pointer;
  z-index: 3;
}
.sidebar__toggle:hover { color: var(--txt); border-color: var(--accent); }

.pot__compact { display: none; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

.app[data-sidebar="rail"] { --sidebar-w: 72px; }
.app[data-sidebar="rail"] .pot { padding: 12px 6px 10px; text-align: center; }
.app[data-sidebar="rail"] .pot__label,
.app[data-sidebar="rail"] .pot__amount,
.app[data-sidebar="rail"] .pot__meta,
.app[data-sidebar="rail"] .filters,
.app[data-sidebar="rail"] .card__rank,
.app[data-sidebar="rail"] .card__id,
.app[data-sidebar="rail"] .card__right,
.app[data-sidebar="rail"] .goals,
.app[data-sidebar="rail"] .sidebar__foot span,
.app[data-sidebar="rail"] .pilot { display: none; }
.app[data-sidebar="rail"] .pot__compact { display: block; margin-top: 18px; }
.app[data-sidebar="rail"] .sidebar__toggle { top: 6px; right: 50%; transform: translateX(50%); }
.app[data-sidebar="rail"] .card {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 6px 4px;
  border-bottom: 0;
}
.app[data-sidebar="rail"] .card__avatar { width: 44px; height: 44px; }
.app[data-sidebar="rail"] .card__actions { top: 4px; right: 4px; padding-left: 0; background: none; }
.app[data-sidebar="rail"] .sidebar__foot { justify-content: center; }

/* ---------------- Mode Discord ---------------- */

.mosaic.discord .win {
  transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease;
}
.mosaic.discord .handle { display: none; }
.mosaic.discord .win__bar { cursor: default; }
.mosaic.discord .win__catch { cursor: zoom-in; }
.mosaic.discord .win.is-spotlight .win__catch { cursor: zoom-out; }
.win.is-spotlight { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 18px 50px rgba(0, 0, 0, .6); }

.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--line); }

/* ---------------- Carte statistiques ---------------- */

.win--chart { background: var(--bg-2); }
.chart {
  position: absolute; inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  /* Le haut est réservé à la barre de fenêtre : sans cette marge, les onglets
     passaient dessous et n'étaient plus cliquables. */
  padding: 38px 10px 6px;
}
.chart__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chart__title { font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.chart__tabs { display: flex; gap: 4px; margin-left: auto; }
.chart__tab {
  padding: 3px 8px;
  font-size: 11px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--txt-dim);
  cursor: pointer;
}
.chart__tab[aria-pressed="true"] { color: #fff; border-color: var(--accent); background: rgba(0, 189, 0, .2); }
.chart__canvas { position: relative; min-height: 0; }
.chart__canvas svg { display: block; width: 100%; height: 100%; }
.chart__legend { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--txt-dim); }
.chart__key { display: inline-flex; align-items: center; gap: 5px; }
.chart__key::before { content: ""; width: 12px; height: 2px; border-radius: 2px; background: currentColor; }
.chart__key--now { color: var(--accent-soft); font-weight: 600; }
.chart__key--prev { color: #94a3b8; }
.chart__note { margin-left: auto; color: #6f7891; }

/* La carte n'a pas de lecteur : le survol ne doit pas la recouvrir de contrôles. */
.win--chart .win__foot { display: none; }
.win--chart .win__bar { background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent); }
.win--chart .win__catch { display: none; }

/* ---------------- Cartes statistiques (classements, paliers) ---------------- */

.card2 {
  position: absolute; inset: 0;
  display: grid; grid-template-rows: auto 1fr;
  gap: 6px;
  /* Comme le graphique : le haut appartient à la barre de fenêtre. */
  padding: 38px 8px 8px;
  /* La carte s'adapte à SA largeur, pas à celle de l'écran : une colonne
     étroite reste lisible même sur un grand moniteur. */
  container-type: inline-size;
}
.card2__bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11px; color: var(--txt-dim);
}
.card2__bar--stack { flex-direction: column; align-items: stretch; gap: 6px; }
.card2__total { margin-left: auto; }
.card2__body { overflow: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.card2__empty { padding: 18px 8px; text-align: center; color: var(--txt-dim); font-size: 12px; }
.card2__chips { display: flex; flex-wrap: wrap; gap: 4px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 4px 2px 8px;
  font-size: 11px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-3);
}
.chip__x { background: none; border: 0; color: var(--txt-dim); cursor: pointer; font-size: 11px; }
.chip__x:hover { color: #fff; }

.srow {
  display: grid;
  grid-template-columns: 22px 24px minmax(0, 1fr) auto;
  align-items: center; gap: 8px;
  width: 100%;
  padding: 4px 6px;
  background: none; border: 0; border-radius: 8px;
  color: var(--txt); text-align: left; cursor: pointer;
}
.srow:hover { background: var(--bg-3); }
.srow.is-off { opacity: .55; }
.srow__rank { font-size: 10px; color: var(--txt-dim); text-align: right; font-variant-numeric: tabular-nums; }
.srow__avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--bg-3); }
.srow__main { display: grid; gap: 3px; min-width: 0; }
.srow__name { display: flex; gap: 6px; align-items: baseline; font-size: 12px; font-weight: 600; }
.srow__name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow__pct { margin-left: auto; font-size: 10px; color: var(--accent); font-weight: 700; }
.srow__sub { font-size: 10px; color: var(--txt-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow__value {
  display: grid; justify-items: end;
  font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.srow__left { color: var(--accent); font-weight: 700; }
.srow__target { font-size: 10px; color: var(--txt-dim); }
.srow--goal.is-hot { background: rgba(0, 189, 0, .12); }
.srow--goal.is-hot .bar__fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.glist { padding: 6px 4px 10px; border-bottom: 1px solid var(--line); }
.glist__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.glist__name { font-size: 12px; font-weight: 700; }
.glist__amount { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.glist__items { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.glist__item {
  display: grid; grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 6px; align-items: baseline;
  font-size: 11px; color: var(--txt-dim);
}
.glist__item.is-done { color: var(--txt); }
.glist__item.is-done .glist__mark { color: #4ade80; }
.glist__title { overflow-wrap: anywhere; }
.glist__flag { color: #fbbf24; cursor: help; }
.glist__req { font-variant-numeric: tabular-nums; white-space: nowrap; }


/* --- Cartes étroites : on retire l'accessoire avant l'essentiel --- */

@container (max-width: 300px) {
  .card2__total { width: 100%; margin-left: 0; }
  .srow { grid-template-columns: 18px 20px minmax(0, 1fr); gap: 6px; }
  .srow__avatar { width: 20px; height: 20px; }
  /* La valeur passe sous le nom : plus de colonne écrasée à droite. */
  .srow__value { grid-column: 3; justify-items: start; font-size: 11px; }
  .srow--goal .srow__value { display: flex; gap: 6px; align-items: baseline; }
  .srow__sub { display: none; }
  .glist__head { flex-wrap: wrap; }
  .glist__amount { margin-left: 0; }
}

@container (max-width: 210px) {
  .card2 { padding: 34px 5px 6px; }
  .card2__bar { font-size: 10px; gap: 6px; }
  .srow { grid-template-columns: 20px minmax(0, 1fr); padding: 3px 4px; }
  .srow__rank { display: none; }
  /* Le rang disparu, la valeur revient sous le nom dans la 2e colonne. */
  .srow__value { grid-column: 2; }
  .srow__name { font-size: 11px; }
  .glist__item { grid-template-columns: 12px minmax(0, 1fr); }
  .glist__req { grid-column: 2; color: var(--accent); }
}

/* ---------------- Mode Master ---------------- */

.masterbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 6px; padding: 8px 12px;
  border: 1px solid var(--accent); border-radius: 12px;
  background: rgba(0, 189, 0, .10);
  font-size: 12px;
}
.masterbar[hidden] { display: none; }
.masterbar__title { font-weight: 800; letter-spacing: .02em; }
.masterbar__hint { color: var(--txt-dim); }
.masterbar__state { margin-left: auto; color: var(--txt); font-variant-numeric: tabular-nums; }

/* Badges de mappage, posés au centre de chaque fenêtre. */
.win__roles {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(6, 10, 6, .72);
}
.win__roles[hidden] { display: none; }
.win__role {
  padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-2); color: var(--txt);
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.win__role[aria-pressed="true"] { border-color: var(--accent); background: rgba(0, 189, 0, .25); }
.win__role--second[aria-pressed="true"] { border-color: var(--accent-2); background: rgba(239, 203, 115, .2); }

/* Une fois le master actif, les deux fenêtres pilotées se repèrent au liseré. */
.win.is-main { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.win.is-second { border-color: var(--accent-2); }
.win.is-main .win__title::before { content: "1 · "; color: var(--accent); font-weight: 800; }
.win.is-second .win__title::before { content: "2 · "; color: var(--accent-2); font-weight: 800; }

/* Bouton discret de réinitialisation, dans la barre du widget Aperçus. */
.thumbs__reset {
  margin-left: 6px; padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--txt-dim); cursor: pointer; font-size: 12px;
}
.thumbs__reset:hover { color: var(--txt); border-color: var(--accent); }
.card2.is-master .card2__total { color: var(--accent); font-weight: 600; }

/* ---------------- Aperçus (miniatures Twitch) ---------------- */

.win--thumbs .card2__body {
  /* Densité maximale : ni titre ni catégorie, le nom et l'audience sont posés
     sur l'image. Deux fois plus de vignettes à surface égale. */
  display: grid; gap: 6px; align-content: start;
  /* `align-items: start` est indispensable : une tuile étirée ET en
     `overflow: hidden` ne contribue plus à la hauteur de sa ligne (elle devient
     un conteneur de défilement), et toutes les vignettes s'écrasaient à 8 px. */
  align-items: start;
  grid-auto-rows: max-content;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}
.thumb {
  /* Pas d'`overflow: hidden` ici : un élément de grille qui devient conteneur de
     défilement ne contribue plus à la hauteur de sa ligne, et les tuiles se
     chevauchaient. C'est l'image seule qui porte les coins arrondis. */
  position: relative;
  display: block;
  padding: 0 0 6px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-3); color: var(--txt); text-align: left; cursor: pointer;
}
.thumb:hover, .thumb:focus-visible { border-color: var(--accent); outline: none; }
/* Hauteur fixe plutôt qu'aspect-ratio : dans une grille en `1fr`, la largeur
   n'est pas définie au moment où la ligne est mesurée, l'image se calculait à
   zéro et les tuiles s'écrasaient à la hauteur de leurs marges. */
.thumb__img {
  width: 100%; aspect-ratio: 16 / 9; height: auto; min-height: 60px;
  object-fit: cover; display: block; background: #000;
  border-radius: 9px;
}
/* Nom et audience posés en surimpression : ils ne prennent aucune hauteur. */
.thumb__meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: baseline; gap: 6px;
  padding: 10px 6px 4px; font-size: 11px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .88), transparent);
  border-radius: 0 0 9px 9px;
  pointer-events: none;
}
.thumb__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px #000; }
.thumb__viewers { margin-left: auto; color: var(--txt-dim); font-variant-numeric: tabular-nums; }
.thumb__title {
  padding: 0 7px; margin: 0; font-size: 11px; color: var(--txt-dim); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.thumb__cat { display: block; padding: 2px 7px 0; font-size: 10px; color: var(--accent); }

/* ---------------- Plan des bureaux ---------------- */

.card2__body--plan { overflow: hidden; display: block; }
.planview {
  position: relative; overflow: hidden;
  width: 100%; height: 100%;
  border-radius: 6px;
  touch-action: none;
  cursor: grab;
}
.planview.is-panning { cursor: grabbing; }
.planview__zoom {
  position: absolute; right: 8px; bottom: 8px; z-index: 6;
  display: flex; gap: 4px;
}
.plan {
  position: relative;
  transform-origin: 0 0;
  width: 100%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-color: #000;
  border-radius: 6px;
}
.desk {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 2px;
  padding: 0; border: 0; background: none; cursor: pointer;
  /* Les pastilles suivent la largeur du plan et la largeur d'un bureau dessiné
     (environ 55 px sur 4096), pour ne pas se recouvrir. */
  width: 1.5%;
}
.desk__img {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  object-fit: cover;
  background: #1b2030;
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .6);
  transition: transform .12s ease, border-color .12s ease;
}
.desk__square {
  display: block; width: 100%; aspect-ratio: 1;
  border-radius: 4px;
  background: #2a3040;
  border: 1px solid rgba(255, 255, 255, .3);
}
.desk__name {
  /* 81 noms superposés seraient illisibles : le nom n'apparaît qu'au survol
     (le plan porte déjà les noms écrits à la main). */
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: 2px; padding: 1px 4px;
  font-size: 10px; line-height: 1.2; color: #fff;
  background: rgba(10, 12, 20, .9); border-radius: 4px;
  white-space: nowrap; pointer-events: none; opacity: 0;
  transition: opacity .1s ease;
}
.desk:hover .desk__name, .desk.is-hit .desk__name { opacity: 1; }
.desk.is-live .desk__img { border-color: var(--accent); }
.desk.is-off { opacity: .5; }
.desk:hover .desk__img, .desk:hover .desk__square { transform: scale(1.8); border-color: #fff; }
.desk:hover { z-index: 3; }
.desk--unknown .desk__name { color: var(--txt-dim); }
.plan.is-searching .desk { opacity: .25; }
.plan.is-searching .desk.is-hit { opacity: 1; }
.plan.is-searching .desk.is-hit .desk__img { border-color: #fbbf24; transform: scale(1.4); }

/* La télécommande doit se trouver du premier coup d'œil : le bouton porte la
   couleur d'accent, et le code du salon quand il y en a un. */
#control {
  border-color: rgba(0, 189, 0, .55);
  color: var(--txt);
}
#control[aria-pressed="true"] {
  background: rgba(0, 189, 0, .18);
  border-color: var(--accent);
  font-weight: 700;
  letter-spacing: .06em;
}

/* ---------------- Mode Régie ---------------- */

/* « Tout à l'écran » : on récupère chaque pixel pour la mosaïque — barres
   compactes, libellés et sections secondaires effacés, panneau en rail. */
.app[data-fit="on"] .toolbar { padding: 3px 8px; gap: 8px; }
.app[data-fit="on"] .toolbar__label { display: none; }
.app[data-fit="on"] .toolbar .btn { padding: 3px 7px; font-size: 11px; }
.app[data-fit="on"] .toolbar .range { width: 90px; }
.app[data-fit="on"] .pilot { display: none; }
.app[data-fit="on"] .sidebar__foot { display: none; }
.app[data-fit="on"] .filters { display: none; }
.app[data-fit="on"] #fit { border-color: var(--accent); background: rgba(0, 189, 0, .16); }


/* Tout est visible en permanence : les overlays des fenêtres restent affichés,
   et les menus déroulants sont remplacés par une rangée de boutons. */
.toolbar--regie {
  border-top: 1px solid var(--line);
  padding-top: 6px;
  gap: 8px;
}
.toolbar--regie .btn { padding: 4px 8px; font-size: 11px; }
.toolbar--regie #regieRoom {
  font-size: 11px; color: var(--txt-dim);
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px;
}

.mosaic.regie .win__overlay { opacity: 1; }
.mosaic.regie .win__overlay > * { pointer-events: auto; }
.mosaic.regie .win__overlay > .win__foot { pointer-events: none; }
.mosaic.regie .win__bar { background: linear-gradient(180deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .35)); }
.mosaic.regie .iconbtn { padding: 1px 5px; font-size: 11px; }
.mosaic.regie .win__quality { font-size: 10px; padding: 1px 4px; }
.mosaic.regie .win__title { font-size: 11px; }
.mosaic.regie .win__goal { display: none; }

.app[data-mode="regie"] .sidebar { font-size: 12px; }

/* ---------------- Compte Twitch et écriture dans le chat ---------------- */

.acct { display: flex; align-items: center; gap: 8px; }
.acct__avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--bg-3); }
.acct__name { font-weight: 700; font-size: 13px; }
.acct .btn { margin-left: auto; }
#twitchAccount[aria-pressed="true"] { border-color: var(--accent); background: rgba(0, 189, 0, .16); }

.win__chat-form {
  display: flex; gap: 4px; padding: 6px;
  border-top: 1px solid var(--line); background: var(--bg-2);
}
.win__chat-input {
  flex: 1; min-width: 0;
  padding: 6px 8px; font-size: 12px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px; color: var(--txt);
}
.win__chat-input:disabled { opacity: .6; }
.win__chat-send {
  padding: 0 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--accent); background: rgba(0, 189, 0, .18); color: var(--txt);
}
.win__chat-send:disabled { opacity: .4; cursor: default; }
/* Le lecteur doit pouvoir rétrécir pour laisser la place à la barre d'écriture. */
.win__chat-frame { min-height: 0; }

/* ---------------- Bannière du son reçu ---------------- */

.audioban {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 70;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--accent); border-radius: 999px;
  background: rgba(10, 14, 10, .96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
  font-size: 12px;
}
.audioban.is-blocked { border-color: #fbbf24; }
.audioban__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
.audioban.is-blocked .audioban__dot { background: #fbbf24; }
.audioban.is-lost { border-color: #f87171; }
.audioban.is-lost .audioban__dot { background: #f87171; animation-duration: .7s; }
@keyframes pulse { 50% { opacity: .3; } }
.audioban .range { width: 110px; }
.audioban .btn { padding: 4px 10px; font-size: 12px; }

/* ---------------- Menu « son distant » ---------------- */

.menu--audiolink { width: 380px; padding: 8px; }
#audioLink.is-trouble { border-color: #fbbf24; color: #fde68a; }
.menu--audiolink .menu__item.is-on { border: 1px solid var(--accent); border-radius: 8px; }

/* ---------------- Menu « compte Twitch » ---------------- */

.menu--twitch { width: 340px; padding: 8px; }
.menu__note { padding: 6px 8px; display: grid; gap: 6px; }
.menu__note p { margin: 0; font-size: 12px; color: var(--txt-dim); line-height: 1.45; }
.menu__warn { color: #f7dfa5 !important; }

/* ---------------- Sélecteur « remplacer par » ---------------- */

.pick {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(3px);
}
.pick[hidden] { display: none; }
.pick__box {
  width: min(420px, calc(100vw - 32px));
  max-height: min(70vh, 620px);
  display: grid; grid-template-rows: auto auto 1fr; gap: 8px;
  padding: 12px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}
.pick__head { display: flex; align-items: center; gap: 8px; }
.pick__head .iconbtn { margin-left: auto; }
.pick__list { overflow: auto; display: grid; gap: 2px; }
.pick__row {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center; gap: 8px;
  padding: 5px 6px;
  background: none; border: 0; border-radius: 8px; color: var(--txt);
  text-align: left; cursor: pointer;
}
.pick__row:hover { background: var(--bg-3); }
.pick__row.is-open { opacity: .4; cursor: not-allowed; }
.pick__avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--bg-3); }
.pick__name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick__meta { font-size: 11px; color: var(--txt-dim); white-space: nowrap; }

/* ---------------- Menu des présets ---------------- */

.menu--presets { width: 320px; padding: 8px; }
.menu__row { display: flex; gap: 6px; padding: 2px; }
.menu__row .input { flex: 1; min-width: 0; }
.menu__list { display: grid; gap: 2px; max-height: 320px; overflow: auto; }
.menu__item--preset { display: flex; align-items: center; gap: 4px; padding: 0; }
.menu__pick {
  flex: 1; min-width: 0;
  display: grid; gap: 1px; text-align: left;
  padding: 6px 8px;
  background: none; border: 0; border-radius: 8px; color: var(--txt); cursor: pointer;
}
.menu__pick:hover { background: var(--bg-3); }
.menu__empty { padding: 12px 8px; text-align: center; color: var(--txt-dim); font-size: 12px; }

/* ---------------- Son seul ---------------- */

/* L'iframe reste en place (la déplacer la rechargerait) : on la recouvre d'une
   vignette faite pour la taille minimale — photo de profil en fond, nom, palier
   en cours et son pourcentage. */
.win__audioface { display: none; }
.win--audio-only .win__audioface {
  position: absolute; inset: 0; z-index: 1;
  display: block; overflow: hidden;
  background: #0d0d0d;
}
.audioface__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(10px) saturate(1.1);
  opacity: .5;
  transform: scale(1.15);
}
.win--audio-only .win__audioface::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 8, 8, .88), rgba(8, 8, 8, .55));
}
.audioface__body {
  position: relative; z-index: 1;
  display: grid; gap: 3px; align-content: center;
  height: 100%; padding: 6px 9px;
}
.audioface__head { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.audioface__icon { font-size: 11px; opacity: .85; }
.audioface__name {
  font-size: 12px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.audioface__pct {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.audioface__goal {
  font-size: 10px; color: var(--txt-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.win--audio-only .win__audioface .bar { height: 3px; }
.win--audio-only { border-color: rgba(0, 189, 0, .45); }
.win--audio-only .win__catch { cursor: default; }
/* Lecture bloquée : on démasque le lecteur pour atteindre son ▶. */
.win--audio-only.is-blocked .win__audioface { display: none; }
/* À taille minimale, le pied ferait doublon avec la vignette. */
.win--audio-only .win__foot { display: none; }

/* ---------------- Plan : aperçu agrandi ---------------- */

.planzoom__back {
  position: absolute; inset: 0; z-index: 4;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(2px);
  cursor: zoom-out;
}
.planzoom {
  position: absolute; z-index: 5;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(56%, 720px);
  display: grid; gap: 0;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--accent);
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .75);
}
.planzoom__player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.planzoom__player iframe { width: 100%; height: 100%; border: 0; display: block; }
.planzoom__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: var(--bg-2);
  font-size: 12px;
}
.planzoom__name { font-weight: 700; }
.planzoom__stat { color: var(--txt-dim); font-variant-numeric: tabular-nums; }
.planzoom__bar .btn { margin-left: auto; }
.planzoom__bar .btn + .btn { margin-left: 0; }
.btn--sm { padding: 3px 8px; font-size: 11px; }
.desk.is-open .desk__img { border-color: var(--accent); }

/* ---------------- Panneau de contrôle multi-machines ---------------- */

.ctrl { width: 320px; display: grid; gap: 8px; padding: 12px; }
.ctrl__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctrl__ws { margin-left: auto; font-size: 11px; color: var(--txt-dim); }
.ctrl__label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--txt-dim); }
.ctrl__code {
  font-size: 28px; font-weight: 800; letter-spacing: .22em; text-align: center;
  padding: 10px; border-radius: 10px; background: var(--bg-3); border: 1px dashed var(--line);
  color: var(--txt-dim);
}
.ctrl__code--on { color: #fff; border-style: solid; border-color: var(--accent); }
.ctrl__qr { display: grid; place-items: center; }
.ctrl__qr img, .ctrl__qr canvas { border-radius: 8px; background: #fff; padding: 6px; }
.ctrl__link { font-size: 11px; color: var(--accent-2); word-break: break-all; text-align: center; text-decoration: none; }
.ctrl__join { width: 110px; text-transform: uppercase; letter-spacing: .1em; }
.ctrl__devices { display: grid; gap: 6px; max-height: 190px; overflow-y: auto; }
.ctrl__device {
  display: grid; gap: 2px;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-3);
}
.ctrl__device.is-me { border-color: var(--accent); }
.ctrl__device-name { font-weight: 600; font-size: 13px; }
.ctrl__device-meta { font-size: 11px; color: var(--txt-dim); }
.ctrl__empty { font-size: 12px; color: var(--txt-dim); }

.chart__canvas { touch-action: none; cursor: crosshair; }
.chart__tip {
  position: absolute; top: 6px;
  padding: 5px 8px;
  font-size: 11px;
  background: rgba(10, 12, 20, .94);
  border: 1px solid var(--line);
  border-radius: 8px;
  pointer-events: none;
  white-space: nowrap;
}
.chart__tip[hidden] { display: none; }
.chart__tip-h { color: var(--txt-dim); }
.chart__tip-prev { color: #94a3b8; }
.chart__reset { font-size: 13px; line-height: 1; padding: 3px 7px; }

/* Barre de défilement du bandeau de vignettes (mode Discord). */
.mosaic__scroll {
  position: absolute; height: 6px; z-index: 30;
  background: rgba(255, 255, 255, .06); border-radius: 999px;
}
.mosaic__scroll-thumb {
  height: 100%; border-radius: 999px;
  background: rgba(0, 189, 0, .75);
  cursor: grab; touch-action: none;
}
.mosaic__scroll-thumb:active { cursor: grabbing; background: var(--accent); }
