/* ============================================================
   bot-v2.css — Bot v2 · Canal (écran autonome plein écran).
   DA validée : léger/aéré, carré net DoZX 2px, accent bleu Telegram,
   fond navy dashboard. Tout scopé sous #botv2 → n'affecte rien d'autre.
   ============================================================ */

#botv2 {
  --bg: #0f1623; --bg-2: #0b111c; --card: #141d2e; --card-hi: #1a2537;
  --line: rgba(255,255,255,0.07); --line-2: rgba(255,255,255,0.13);
  --ink: #eaf0f8; --muted: #8b98ad; --faint: #5c6879;
  --accent: #2aabee; --accent-2: #2481cc; --accent-sf: rgba(42,171,238,0.12);
  --ok: #4fc98a; --bad: #ff8a8a;
  --display: "Bricolage Grotesque", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;

  position: fixed; top: 0; left: 0; right: 0; bottom: auto;
  height: 100dvh; z-index: 9000;
  background: radial-gradient(140% 120% at 50% -30%, #16233c 0%, var(--bg) 46%, var(--bg-2) 100%);
  color: var(--ink);
  font-family: var(--body); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  animation: bv2-in .18s ease;
}
@keyframes bv2-in { from { opacity: 0; } }
#botv2 * { box-sizing: border-box; }

/* Header */
#botv2 .bv2-top {
  max-width: 680px; margin: 0 auto;
  padding: 22px 20px 0;
  display: flex; align-items: center; justify-content: space-between;
}
#botv2 .bv2-top-l { display: flex; align-items: baseline; gap: 12px; }
#botv2 .bv2-title { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
#botv2 .bv2-badge {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; padding: 3px 7px;
  border: 1px solid var(--accent-sf); background: var(--accent-sf); border-radius: 2px;
}
#botv2 .bv2-x {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; color: var(--muted);
  border-radius: 2px; cursor: pointer; font-size: 16px;
  transition: color .15s, background .15s;
}
#botv2 .bv2-x:hover { color: var(--ink); background: var(--card); }

/* Column */
#botv2 .bv2-col {
  max-width: 680px; margin: 0 auto;
  padding: 20px 20px 80px;
  display: flex; flex-direction: column; gap: 18px;
}

/* Vers quel canal */
#botv2 .bv2-to { display: flex; align-items: center; gap: 12px; }
#botv2 .bv2-to-label { font-family: var(--display); font-size: 13px; color: var(--muted); font-weight: 500; white-space: nowrap; }
#botv2 .bv2-chan { flex: 1; position: relative; }
#botv2 .bv2-select {
  width: 100%; appearance: none; -webkit-appearance: none;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 500;
  padding: 11px 40px 11px 14px; border-radius: 2px; cursor: pointer;
  transition: border-color .15s;
}
#botv2 .bv2-select:hover { border-color: var(--line-2); }
#botv2 .bv2-select:focus { outline: none; border-color: var(--accent); }
#botv2 .bv2-chan::after {
  content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}

/* Compose */
#botv2 .bv2-compose {
  background: var(--card); border: 1px solid var(--line); border-radius: 2px; overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
#botv2 .bv2-compose:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 4px rgba(42,171,238,0.06); }
#botv2 .bv2-msg {
  width: 100%; background: transparent; border: 0; outline: none; color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.6; padding: 16px; min-height: 130px; resize: vertical;
}
#botv2 .bv2-msg::placeholder { color: var(--faint); }
#botv2 .bv2-bar {
  display: flex; align-items: center; gap: 2px; padding: 6px 10px; border-top: 1px solid var(--line);
}
#botv2 .bv2-fmt {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: transparent; border: 0; color: var(--muted); border-radius: 2px; cursor: pointer;
  font-family: var(--display); font-size: 14px; transition: color .12s, background .12s;
}
#botv2 .bv2-fmt:hover { color: var(--ink); background: var(--card-hi); }
#botv2 .bv2-fmt.b { font-weight: 700; } #botv2 .bv2-fmt.i { font-style: italic; } #botv2 .bv2-fmt.u { text-decoration: underline; }
#botv2 .bv2-fmt.s { text-decoration: line-through; }
#botv2 .bv2-sep { width: 1px; height: 16px; background: var(--line); margin: 0 6px; }
#botv2 .bv2-count { margin-left: auto; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; padding-right: 4px; }

/* Affordances */
#botv2 .bv2-add-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#botv2 .bv2-add {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  font: inherit; font-size: 13.5px; font-weight: 500; padding: 8px 14px; border-radius: 2px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
#botv2 .bv2-add:hover { color: var(--ink); border-color: var(--line-2); background: var(--card); }
#botv2 .bv2-add .plus { color: var(--accent); font-size: 15px; line-height: 1; }
#botv2 .bv2-add.is-on { color: var(--accent); border-color: var(--accent); background: var(--accent-sf); }
#botv2 .bv2-media-name { color: var(--muted); font-size: 13px; }
#botv2 .bv2-media-name b { color: var(--ok); }

/* CTA */
#botv2 .bv2-cta { display: none; flex-direction: column; gap: 8px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 2px; }
#botv2 .bv2-cta.is-open { display: flex; }
#botv2 .bv2-cta-row { display: flex; gap: 8px; }
#botv2 .bv2-cta input {
  flex: 1; min-width: 0; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink);
  font: inherit; font-size: 14px; padding: 9px 12px; border-radius: 2px; outline: none;
}
#botv2 .bv2-cta input:focus { border-color: var(--accent); }
#botv2 .bv2-cta input.txt { flex: 0 0 34%; }
#botv2 .bv2-cta-del {
  flex: none; width: 34px; background: transparent; border: 1px solid var(--line); color: var(--faint);
  border-radius: 2px; cursor: pointer; font-size: 15px;
}
#botv2 .bv2-cta-del:hover { color: var(--bad); border-color: var(--bad); }
#botv2 .bv2-cta-more {
  align-self: flex-start; background: transparent; border: 1px dashed var(--line-2); color: var(--muted);
  font: inherit; font-size: 12.5px; padding: 6px 12px; border-radius: 2px; cursor: pointer;
}
#botv2 .bv2-cta-more:hover { color: var(--ink); border-color: var(--accent); }

/* Aperçu */
#botv2 .bv2-peek {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; padding: 2px 0;
}
#botv2 .bv2-peek:hover { color: var(--ink); }
#botv2 .bv2-peek .eye { color: var(--accent); }
#botv2 .bv2-preview { display: none; background: linear-gradient(180deg, #17212b, #0e1620); border: 1px solid rgba(255,255,255,0.06); border-radius: 2px; padding: 14px; }
#botv2 .bv2-preview.is-open { display: block; }
#botv2 .bv2-pv-bubble { background: #1c2836; color: #eaf3fb; border-radius: 10px 10px 10px 3px; padding: 11px 13px; font-size: 14px; line-height: 1.5; max-width: 80%; white-space: pre-wrap; overflow-wrap: anywhere; }
#botv2 .bv2-pv-btn { margin-top: 5px; max-width: 80%; background: #24405a; color: #62b8ef; text-align: center; padding: 9px; border-radius: 8px; font-weight: 600; font-size: 13px; }

/* Résolu */
#botv2 .bv2-rnote { display: none; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
#botv2 .bv2-rnote.is-on { display: flex; }
#botv2 .bv2-rnote .rn-dot { color: var(--accent); }
#botv2 .bv2-rnote b { color: var(--ink); font-weight: 600; }
#botv2 .bv2-rnote .rn-rel { margin-left: auto; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; background: var(--accent-sf); padding: 2px 7px; border-radius: 2px; }

/* Envoi */
#botv2 .bv2-send { display: flex; align-items: center; gap: 12px; margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--line); }
#botv2 .bv2-when-wrap { position: relative; }
#botv2 .bv2-when {
  display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid var(--line);
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; padding: 10px 15px; border-radius: 2px; cursor: pointer;
  transition: border-color .15s;
}
#botv2 .bv2-when:hover { border-color: var(--line-2); }
#botv2 .bv2-when.is-set { border-color: var(--accent); }
#botv2 .bv2-when .clock { color: var(--accent); }
#botv2 .bv2-when .caret { width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-1px); }
#botv2 .bv2-spacer { flex: 1; }
#botv2 .bv2-publish {
  background: var(--accent); color: #06121e; border: 0; font: inherit; font-size: 15px; font-weight: 700;
  padding: 11px 26px; border-radius: 2px; cursor: pointer; transition: background .15s, transform .05s;
}
#botv2 .bv2-publish:hover { background: #45baef; }
#botv2 .bv2-publish:active { transform: translateY(1px); }
#botv2 .bv2-publish:disabled { opacity: .5; cursor: not-allowed; }

/* Popover date/heure */
#botv2 .bv2-pop {
  position: absolute; bottom: calc(100% + 8px); left: 0; width: 300px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 2px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.45); padding: 6px; z-index: 40;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .14s, transform .14s, visibility .14s;
}
#botv2 .bv2-pop.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
#botv2 .bv2-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; background: transparent; border: 0;
  color: var(--ink); font: inherit; font-size: 14px; text-align: left; padding: 10px 12px; border-radius: 2px; cursor: pointer; transition: background .12s;
}
#botv2 .bv2-opt b { font-variant-numeric: tabular-nums; font-weight: 600; }
#botv2 .bv2-opt::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; transition: background .12s, box-shadow .12s; }
#botv2 .bv2-opt:hover { background: var(--card-hi); }
#botv2 .bv2-opt.is-sel { color: var(--accent); }
#botv2 .bv2-opt.is-sel::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-sf); }
#botv2 .bv2-pop-div { height: 1px; background: var(--line); margin: 6px 4px; }
#botv2 .bv2-custom { padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 8px; }
#botv2 .bv2-custom-lab { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
#botv2 .bv2-dt {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink);
  font: inherit; font-size: 14px; padding: 9px 11px; border-radius: 2px; outline: none; color-scheme: dark; transition: border-color .14s;
}
#botv2 .bv2-dt:focus { border-color: var(--accent); }
#botv2 .bv2-dt-set {
  width: 100%; background: var(--accent-sf); border: 1px solid var(--accent); color: var(--accent);
  font: inherit; font-size: 13px; font-weight: 600; padding: 9px; border-radius: 2px; cursor: pointer; transition: background .14s, color .14s;
}
#botv2 .bv2-dt-set:hover { background: var(--accent); color: #06121e; }

/* ─── Onglets (Canal / Broadcast / Joueurs) ───────────────── */
#botv2 .bv2-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11,17,28,0.86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
#botv2 .bv2-tabs {
  max-width: 680px; margin: 0 auto;
  padding: 0 20px;
  display: flex; gap: 4px;
}
#botv2 .bv2-tab {
  background: transparent; border: 0; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  letter-spacing: 0.02em;
  padding: 12px 12px; margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 7px;
  transition: color .15s, border-color .15s;
}
#botv2 .bv2-tab:hover { color: var(--ink); }
#botv2 .bv2-tab.is-active { color: var(--ink); border-bottom-color: var(--accent); }
#botv2 .bv2-tab .tb-count {
  font-size: 11px; font-weight: 700; color: var(--faint);
  background: var(--card); padding: 1px 6px; border-radius: 2px;
  font-variant-numeric: tabular-nums;
}
#botv2 .bv2-tab.is-active .tb-count { color: var(--accent); background: var(--accent-sf); }

#botv2 .bv2-view { display: none; }
#botv2 .bv2-view.is-active { display: block; }

/* ─── Case "Accepter 1 min avant" (visible quand programmé) ── */
#botv2 .bv2-approve {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 2px;
  color: var(--muted); font-size: 13px; cursor: pointer;
}
#botv2 .bv2-approve:hover { border-color: var(--line-2); color: var(--ink); }
#botv2 .bv2-approve input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
#botv2 .bv2-approve b { color: var(--ink); font-weight: 600; }

/* ─── Récap "Programmées" (onglet Canal) ──────────────────── */
#botv2 .bv2-queue-sec { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
#botv2 .bv2-queue-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  color: var(--ink); margin-bottom: 12px;
}
#botv2 .bv2-queue-count {
  color: var(--accent); background: var(--accent-sf);
  font-family: var(--mono, ui-monospace); font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 2px; font-variant-numeric: tabular-nums;
}
#botv2 .bv2-queue-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
#botv2 .bv2-qcard {
  display: grid; grid-template-columns: 96px minmax(0,1fr) auto; gap: 14px; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--line); position: relative; transition: background .12s;
}
#botv2 .bv2-qcard:last-child { border-bottom: 0; }
#botv2 .bv2-qcard::before { content:""; position:absolute; left:0; top:12px; bottom:12px; width:2px; background:var(--accent); opacity:0; transition:opacity .12s; }
#botv2 .bv2-qcard:hover { background: var(--card); }
#botv2 .bv2-qcard:hover::before { opacity: 1; }
#botv2 .bv2-qday { color: var(--faint); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }
#botv2 .bv2-qhour { color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.1; margin-top: 2px; font-variant-numeric: tabular-nums; }
#botv2 .bv2-qbody { min-width: 0; }
#botv2 .bv2-qchan { color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 3px; }
#botv2 .bv2-qtext { color: var(--ink); font-size: 13px; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#botv2 .bv2-qtags { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
#botv2 .bv2-qtag { color: var(--faint); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; padding: 2px 6px; border: 1px solid var(--line); border-radius: 2px; }
#botv2 .bv2-qtag.media { color: var(--accent); border-color: rgba(42,171,238,0.35); }
#botv2 .bv2-qtag.live { color: var(--ok); border-color: rgba(79,201,138,0.4); }
#botv2 .bv2-qacts { display: flex; flex-direction: column; gap: 5px; }
#botv2 .bv2-qact {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  font: inherit; font-size: 11px; font-weight: 600; padding: 6px 12px; border-radius: 2px; cursor: pointer; white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
#botv2 .bv2-qact:hover { color: var(--ink); border-color: var(--line-2); background: var(--card-hi); }
#botv2 .bv2-qact.del:hover { color: var(--bad); border-color: var(--bad); background: rgba(255,138,138,0.08); }

/* Bannière d'édition (au-dessus du composer quand on modifie) */
#botv2 .bv2-edit-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: var(--accent-sf); border: 1px solid rgba(42,171,238,0.35); border-radius: 2px;
  color: var(--accent); font-size: 13px; font-weight: 600;
}
#botv2 .bv2-edit-banner .cn-edit-cancel {
  background: transparent; border: 1px solid rgba(42,171,238,0.5); color: var(--accent);
  font: inherit; font-size: 11px; font-weight: 600; padding: 5px 11px; border-radius: 2px; cursor: pointer; white-space: nowrap;
}
#botv2 .bv2-edit-banner .cn-edit-cancel:hover { background: var(--accent); color: #06121e; }

/* ─── Broadcast : bannière destinataires + progression ────── */
#botv2 .bv2-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--accent-sf);
  border: 1px solid rgba(42,171,238,0.3);
  border-radius: 2px;
}
#botv2 .bv2-banner .bn-ic { color: var(--accent); font-size: 18px; flex: none; }
#botv2 .bv2-banner .bn-t { font-size: 14px; }
#botv2 .bv2-banner .bn-t b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
#botv2 .bv2-banner .bn-sub { color: var(--muted); font-size: 12px; margin-top: 1px; }

#botv2 .bv2-progress {
  display: none;
  padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 2px;
}
#botv2 .bv2-progress.is-on { display: block; }
#botv2 .bv2-progress-top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px; font-size: 13px;
}
#botv2 .bv2-progress-top b { color: var(--ink); font-variant-numeric: tabular-nums; }
#botv2 .bv2-progress-top .pr-state { color: var(--accent); font-weight: 600; font-size: 12px; }
#botv2 .bv2-bar-track { height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
#botv2 .bv2-bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
#botv2 .bv2-progress-meta { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
#botv2 .bv2-progress-meta b { color: var(--ink); font-variant-numeric: tabular-nums; }
#botv2 .bv2-progress-meta .ok b { color: var(--ok); }
#botv2 .bv2-progress-meta .bad b { color: var(--bad); }

#botv2 .bv2-danger {
  background: rgba(255,138,138,0.10) !important;
  border-color: rgba(255,138,138,0.4) !important;
  color: var(--bad) !important;
}

/* ─── Joueurs : stats + recherche + liste ─────────────────── */
#botv2 .bv2-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
#botv2 .bv2-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 2px;
  padding: 14px 16px;
}
#botv2 .bv2-stat-v { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
#botv2 .bv2-stat-k { color: var(--faint); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; margin-top: 6px; }
#botv2 .bv2-stat.accent .bv2-stat-v { color: var(--accent); }

#botv2 .bv2-search {
  width: 100%;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  font: inherit; font-size: 14px; padding: 11px 14px; border-radius: 2px; outline: none;
}
#botv2 .bv2-search:focus { border-color: var(--accent); }

#botv2 .bv2-users { border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
#botv2 .bv2-user {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  transition: background .12s;
}
#botv2 .bv2-user:last-child { border-bottom: 0; }
#botv2 .bv2-user:hover { background: var(--card); }
#botv2 .bv2-user-av {
  width: 34px; height: 34px; border-radius: 999px; flex: none;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: #06121e;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
#botv2 .bv2-user-main { flex: 1; min-width: 0; }
#botv2 .bv2-user-name { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#botv2 .bv2-user-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#botv2 .bv2-user-sub .uid { color: var(--faint); font-variant-numeric: tabular-nums; }
#botv2 .bv2-user-date { font-size: 11px; color: var(--faint); white-space: nowrap; flex: none; }
#botv2 .bv2-user-credit {
  flex: none; background: transparent; border: 1px solid var(--line);
  color: var(--muted); font: inherit; font-size: 11px; font-weight: 600;
  padding: 6px 11px; border-radius: 2px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
#botv2 .bv2-user-credit:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-sf); }

#botv2 .bv2-loadmore {
  width: 100%; background: transparent; border: 1px solid var(--line);
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 11px; border-radius: 2px; cursor: pointer;
}
#botv2 .bv2-loadmore:hover { color: var(--ink); border-color: var(--line-2); }
#botv2 .bv2-loadmore:disabled { opacity: .5; cursor: default; }
#botv2 .bv2-empty { padding: 24px; text-align: center; color: var(--faint); font-size: 13px; }

/* ─── RELANCE (mass DM) ───────────────────────────────────── */
#botv2 .rl-ins { display:inline-flex; align-items:center; gap:5px; background:var(--accent-sf); border:1px solid rgba(42,171,238,.3); color:var(--accent); font:inherit; font-size:12px; font-weight:600; padding:5px 10px; border-radius:999px; cursor:pointer; }
#botv2 .rl-ins:hover { background:rgba(42,171,238,.2); }
#botv2 .rl-hint { margin-left:auto; color:var(--faint); font-size:11px; }

#botv2 .rl-manual { background:var(--card); border:1px solid rgba(42,171,238,.28); border-radius:2px; padding:14px 16px; display:flex; flex-direction:column; gap:10px; }
#botv2 .rl-manual-h { font-size:14px; font-weight:700; color:var(--ink); }
#botv2 .rl-manual-sub { font-size:12px; color:var(--muted); line-height:1.5; }
#botv2 .rl-unames { width:100%; min-height:60px; background:var(--bg-2); border:1px solid var(--line); color:var(--ink); font:inherit; font-size:15px; padding:10px 12px; border-radius:2px; outline:none; resize:vertical; }
#botv2 .rl-unames:focus { border-color:var(--accent); }
#botv2 .rl-unbtn { align-self:flex-start; background:var(--accent); color:#06121e; border:0; font:inherit; font-size:14px; font-weight:700; padding:10px 18px; border-radius:2px; cursor:pointer; }
#botv2 .rl-unbtn:hover:not(:disabled) { background:#45baef; }
#botv2 .rl-unbtn:disabled { opacity:.5; cursor:not-allowed; }
#botv2 .rl-unresult { display:flex; flex-direction:column; gap:4px; }
#botv2 .rl-unresult:empty { display:none; }
#botv2 .rl-unr { font-size:13px; padding:6px 10px; border-radius:2px; font-variant-numeric:tabular-nums; }
#botv2 .rl-unr.ok { color:var(--ok); background:rgba(79,201,138,.10); }
#botv2 .rl-unr.ko { color:var(--bad); background:rgba(255,138,138,.10); }
#botv2 .rl-thead-sub { color:var(--faint); font-weight:400; text-transform:none; letter-spacing:0; font-size:11px; }

#botv2 .rl-target { background:var(--card); border:1px solid var(--line); border-radius:2px; overflow:hidden; }
#botv2 .rl-thead { padding:12px 16px 10px; border-bottom:1px solid var(--line); font-size:11px; letter-spacing:.14em; text-transform:uppercase; font-weight:700; color:var(--faint); }
#botv2 .rl-tbody { padding:14px 16px; display:flex; flex-direction:column; gap:14px; }
#botv2 .rl-opt { display:flex; align-items:center; gap:11px; cursor:pointer; }
#botv2 .rl-opt input[type=radio] { accent-color:var(--accent); width:17px; height:17px; flex:none; }
#botv2 .rl-omain { flex:1; display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; }
#botv2 .rl-otxt { font-size:14.5px; color:var(--ink); }
#botv2 .rl-mini { position:relative; display:inline-block; }
#botv2 .rl-mini select { appearance:none; -webkit-appearance:none; background:var(--bg-2); border:1px solid var(--line-2); color:var(--ink); font:inherit; font-size:13px; font-weight:600; padding:5px 26px 5px 11px; border-radius:2px; cursor:pointer; }
#botv2 .rl-mini::after { content:""; position:absolute; right:9px; top:50%; width:5px; height:5px; border-right:1.5px solid var(--muted); border-bottom:1.5px solid var(--muted); transform:translateY(-70%) rotate(45deg); pointer-events:none; }
#botv2 .rl-count { margin-left:auto; font-family:var(--display,inherit); font-weight:700; color:var(--accent); font-size:16px; font-variant-numeric:tabular-nums; white-space:nowrap; }
#botv2 .rl-count.muted { color:var(--muted); }

#botv2 .rl-exclude { display:flex; align-items:center; gap:10px; padding:12px 14px; background:var(--card); border:1px solid var(--line); border-radius:2px; color:var(--muted); font-size:13.5px; cursor:pointer; flex-wrap:wrap; }
#botv2 .rl-exclude input[type=checkbox] { accent-color:var(--accent); width:16px; height:16px; flex:none; }

#botv2 .rl-safe { display:flex; gap:9px; padding:11px 13px; background:rgba(245,183,78,0.08); border:1px solid rgba(245,183,78,0.3); border-radius:2px; color:#e5c07b; font-size:12.5px; line-height:1.5; }
#botv2 .rl-safe b { color:#f0d090; }

#botv2 .rl-summary { display:flex; align-items:center; gap:8px; padding:12px 14px; background:var(--bg-2); border:1px solid var(--line); border-radius:2px; color:var(--muted); font-size:13px; flex-wrap:wrap; }
#botv2 .rl-summary .s-ic { color:var(--accent); }
#botv2 .rl-summary b { color:var(--ink); font-weight:600; }
#botv2 .rl-summary .sep { color:var(--faint); }

#botv2 .rl-list:empty { display:none; }
#botv2 .rl-list { border:1px solid var(--line); border-radius:2px; overflow:hidden; }
#botv2 .rl-list-h { padding:11px 14px; border-bottom:1px solid var(--line); background:var(--card); color:var(--muted); font-size:12px; }
#botv2 .rl-list-h b { color:var(--ink); font-weight:700; }
#botv2 .rl-li { display:flex; align-items:center; gap:11px; padding:9px 14px; border-bottom:1px solid var(--line); }
#botv2 .rl-li:last-child { border-bottom:0; }
#botv2 .rl-li-av { width:30px; height:30px; border-radius:999px; flex:none; display:grid; place-items:center; font-weight:700; font-size:12px; color:#06121e; background:linear-gradient(135deg,var(--accent),var(--accent-2)); }
#botv2 .rl-li-n { flex:1; min-width:0; font-size:14px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#botv2 .rl-li-d { color:var(--faint); font-size:11px; white-space:nowrap; }
#botv2 .rl-note { padding:12px 14px; color:var(--warn,#f5b74e); font-size:12px; background:rgba(245,183,78,0.06); border-top:1px solid var(--line); }
#botv2 .rl-note b { color:#f0d090; }
#botv2 .rl-testmode { color:var(--accent); font-weight:700; font-size:11px; letter-spacing:.02em; }
#botv2 .rl-testhint { padding:11px 14px; background:var(--accent-sf); border:1px solid rgba(42,171,238,.3); border-radius:2px; color:var(--muted); font-size:12.5px; line-height:1.5; }
#botv2 .rl-testhint b { color:var(--accent); }
#botv2 .rl-lsearch { width:calc(100% - 20px); margin:10px; background:var(--bg-2); border:1px solid var(--line); color:var(--ink); font:inherit; font-size:14px; padding:9px 12px; border-radius:2px; outline:none; }
#botv2 .rl-lsearch:focus { border-color:var(--accent); }
#botv2 .rl-liwrap { max-height:340px; overflow-y:auto; }
#botv2 label.rl-li { cursor:pointer; }
#botv2 label.rl-li input.rl-lchk { accent-color:var(--accent); width:17px; height:17px; flex:none; margin-right:2px; }
#botv2 label.rl-li:hover { background:var(--card); }
#botv2 label.rl-li.rl-sent { background:rgba(79,201,138,0.10); }
#botv2 label.rl-li.rl-sent .rl-li-d::after { content:" ✓"; color:var(--ok); font-weight:700; }
#botv2 label.rl-li.rl-fail { background:rgba(255,138,138,0.10); }
#botv2 label.rl-li.rl-fail .rl-li-d::after { content:" ✗"; color:var(--bad); font-weight:700; }
#botv2 .rl-testbar { display:flex; align-items:center; gap:12px; padding:11px 14px; border-top:1px solid var(--line); background:var(--card); }
#botv2 .rl-seln { color:var(--muted); font-size:13px; font-variant-numeric:tabular-nums; }
#botv2 .rl-testbtn { margin-left:auto; background:var(--accent); color:#06121e; border:0; font:inherit; font-size:14px; font-weight:700; padding:10px 18px; border-radius:2px; cursor:pointer; }
#botv2 .rl-testbtn:hover:not(:disabled) { background:#45baef; }
#botv2 .rl-testbtn:disabled { opacity:.45; cursor:not-allowed; }

/* Toast */
#botv2-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 9500; background: #142334; border: 1px solid var(--accent, #2aabee); color: #fff;
  font-family: "Bricolage Grotesque", "Inter", sans-serif; font-weight: 600; font-size: 14px;
  padding: 12px 18px; border-radius: 2px; box-shadow: 0 14px 40px rgba(0,0,0,0.4);
  opacity: 0; transition: opacity .2s, transform .2s;
}
#botv2-toast.is-on { opacity: 1; }
#botv2-toast.err { border-color: #ff8a8a; }

/* Loading state pour le select */
#botv2 .bv2-select.loading { color: var(--faint); }

/* ─────────────────── MOBILE ─────────────────── */
@media (max-width: 640px) {
  /* Anti-zoom iOS : TOUT champ focusable >= 16px (sinon Safari zoome
     au tap et provoque les micro-sauts). */
  #botv2 .bv2-select,
  #botv2 .bv2-msg,
  #botv2 .bv2-cta input,
  #botv2 .bv2-dt,
  #botv2 .bv2-when,
  #botv2 .bv2-add,
  #botv2 .bv2-opt { font-size: 16px !important; }

  /* Header collant + fond, le ✕ reste atteignable au scroll */
  #botv2 .bv2-top {
    position: sticky; top: 0; z-index: 20;
    padding: 14px 16px;
    background: rgba(11,17,28,0.9);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }

  /* Colonne : marge basse large + safe-area (le contenu clear le clavier) */
  #botv2 .bv2-col {
    padding: 16px 14px calc(80px + env(safe-area-inset-bottom, 0px));
    gap: 16px;
  }

  /* "Vers" : le label passe au-dessus si trop serré */
  #botv2 .bv2-to { flex-wrap: wrap; gap: 8px; }
  #botv2 .bv2-to-label { flex: 0 0 auto; }
  #botv2 .bv2-chan { flex: 1 1 100%; }

  /* Message : pas de poignée de resize (source de sauts) */
  #botv2 .bv2-msg { resize: none; min-height: 120px; }

  /* Rangée d'ajout : wrap propre, le nom de fichier sur sa ligne */
  #botv2 .bv2-add-row { gap: 8px; }
  #botv2 .bv2-media-name { flex: 1 1 100%; order: 3; }

  /* CTA : texte pleine largeur, puis lien + poubelle */
  #botv2 .bv2-cta-row { flex-wrap: wrap; }
  #botv2 .bv2-cta input.txt { flex: 1 1 100%; }
  #botv2 .bv2-cta input.url { flex: 1 1 auto; min-width: 0; }

  /* Envoi : "quand" pleine largeur en haut, "publier" pleine largeur dessous */
  #botv2 .bv2-send { flex-wrap: wrap; gap: 10px; }
  #botv2 .bv2-when-wrap { flex: 1 1 100%; }
  #botv2 .bv2-when { width: 100%; justify-content: flex-start; }
  #botv2 .bv2-spacer { display: none; }
  #botv2 .bv2-publish { flex: 1 1 100%; padding: 13px; font-size: 16px; }

  /* Popover date : ne déborde jamais l'écran */
  #botv2 .bv2-pop {
    width: min(320px, calc(100vw - 28px));
    left: 0; right: auto;
  }
  #botv2 .bv2-dt { font-size: 16px; }

  /* Onglets : scroll horizontal si trop serré */
  #botv2 .bv2-tabs { padding: 0 14px; overflow-x: auto; scrollbar-width: none; }
  #botv2 .bv2-tabs::-webkit-scrollbar { display: none; }
  #botv2 .bv2-tab { padding: 12px 10px; }

  /* Stats joueurs : 3 tuiles compactes */
  #botv2 .bv2-stats { gap: 8px; }
  #botv2 .bv2-stat { padding: 12px 10px; }
  #botv2 .bv2-stat-v { font-size: 22px; }
  #botv2 .bv2-stat-k { font-size: 9px; letter-spacing: 0.08em; }

  /* Ligne joueur : la date passe sous le nom si serré */
  #botv2 .bv2-user-date { display: none; }

  /* Relance : compteur passe sous l'option, champs 16px */
  #botv2 .rl-omain { width: 100%; }
  #botv2 .rl-count { margin-left: 0; width: 100%; text-align: right; }
  #botv2 .rl-opt { flex-wrap: wrap; }
  #botv2 .rl-mini select, #botv2 .rl-ins { font-size: 16px; }

  /* Récap Programmées : carte plus compacte, actions côte à côte */
  #botv2 .bv2-qcard { grid-template-columns: 78px minmax(0,1fr); gap: 10px; }
  #botv2 .bv2-qacts { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  #botv2 .bv2-qhour { font-size: 15px; }

  /* Toast : au-dessus du clavier, marge safe */
  #botv2-toast { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); width: calc(100vw - 28px); max-width: 420px; text-align: center; }
}

/* Ancien breakpoint fin (garde le publish full-width sous 400) */
@media (max-width: 400px) {
  #botv2 .bv2-top-l { gap: 8px; }
  #botv2 .bv2-add { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) { #botv2, #botv2 * { animation: none !important; transition: none !important; } }

/* ══ GRAND ENVOI (blast) + progression ══ */
#botv2 .rl-blast-wrap{ margin-top:18px; padding-top:16px; border-top:1px solid rgba(255,255,255,.08); text-align:center; }
#botv2 .rl-blast-sep{ font:700 11px/1 'Bricolage Grotesque',sans-serif; letter-spacing:.16em; text-transform:uppercase; color:rgba(255,255,255,.38); margin-bottom:12px; }
#botv2 .rl-blast{ width:100%; padding:15px 18px; border:0; border-radius:2px; cursor:pointer;
  font:700 16px/1 'Bricolage Grotesque',sans-serif; color:#04121e;
  background:linear-gradient(180deg,#3fbaf2,#2aabee); box-shadow:0 6px 20px rgba(42,171,238,.32); transition:transform .08s, box-shadow .2s; }
#botv2 .rl-blast:hover{ box-shadow:0 9px 28px rgba(42,171,238,.5); }
#botv2 .rl-blast:active{ transform:translateY(1px); }
#botv2 .rl-blast:disabled{ opacity:.55; cursor:default; box-shadow:none; }
#botv2 .rl-blast-note{ margin-top:9px; font:400 12px/1.45 system-ui,sans-serif; color:rgba(255,255,255,.46); }
#botv2 .rl-progress{ margin-top:16px; }
#botv2 .rl-pg{ border:1px solid rgba(255,255,255,.1); border-radius:2px; padding:16px; background:rgba(255,255,255,.035); }
#botv2 .rl-pg.run{ border-color:rgba(42,171,238,.45); box-shadow:inset 0 0 0 1px rgba(42,171,238,.18); }
#botv2 .rl-pg.done{ border-color:rgba(56,199,120,.5); }
#botv2 .rl-pg.err{ border-color:rgba(229,72,77,.55); }
#botv2 .rl-pg.pause{ border-color:rgba(240,185,50,.5); }
#botv2 .rl-pg-h{ font:700 15px/1.25 'Bricolage Grotesque',sans-serif; color:#eaf4ff; margin-bottom:12px; }
#botv2 .rl-pg-bar{ height:9px; border-radius:2px; background:rgba(255,255,255,.09); overflow:hidden; }
#botv2 .rl-pg-bar > i{ display:block; height:100%; width:0; background:linear-gradient(90deg,#2aabee,#5cc6ff); transition:width .4s ease; }
#botv2 .rl-pg.done .rl-pg-bar > i{ background:linear-gradient(90deg,#2fae6a,#46d488); }
#botv2 .rl-pg.err .rl-pg-bar > i{ background:linear-gradient(90deg,#e5484d,#ff6b70); }
#botv2 .rl-pg.pause .rl-pg-bar > i{ background:linear-gradient(90deg,#e0a92e,#f4cf6a); }
#botv2 .rl-pg-stats{ margin-top:10px; font:600 13px/1 system-ui,sans-serif; color:#cfe3f5; }
#botv2 .rl-pg-stats b{ color:#fff; font-size:15px; }
#botv2 .rl-pg-cur{ margin-top:6px; font:400 12px/1.3 system-ui,sans-serif; color:rgba(255,255,255,.5); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#botv2 .rl-pg-err{ margin-top:8px; font:400 12px/1.4 system-ui,sans-serif; color:#ff9ea1; }
#botv2 .rl-pgctrl{ margin-top:14px; display:flex; gap:8px; }
#botv2 .rl-pgbtn{ flex:1; padding:10px; border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.05); color:#dfeefb; border-radius:2px; cursor:pointer; font:600 13px/1 'Bricolage Grotesque',sans-serif; }
#botv2 .rl-pgbtn:hover{ background:rgba(255,255,255,.1); }
#botv2 .rl-pgbtn.danger{ border-color:rgba(229,72,77,.4); color:#ff9ea1; }
#botv2 .rl-pgbtn.danger:hover{ background:rgba(229,72,77,.14); }
