/* t119 — refonte visuelle : thèmes/palettes widgets, sidebar, scrollbars, répliques, Fontaine */

/* ========== Scrollbars dégradé MoonTik — toujours visibles ========== */
html {
  scrollbar-width: auto;
  scrollbar-color: #c4b5fd #12081f;
}
* {
  scrollbar-width: auto;
  scrollbar-color: #c4b5fd #12081f;
}
*::-webkit-scrollbar { width: 14px; height: 14px; }
*::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #26184a 0%, #0b0716 48%, #1a1236 100%);
  border-radius: 99px;
  box-shadow: inset 0 0 0 1px rgba(196,181,253,.22);
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #fde68a 0%, #c4b5fd 32%, #22d3ee 68%, #f472b6 100%);
  border-radius: 99px;
  border: 2px solid #12081f;
  box-shadow: 0 0 12px rgba(167,139,250,.7), 0 0 18px rgba(34,211,238,.35);
  min-height: 48px;
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #fff 0%, #fde68a 30%, #c4b5fd 65%, #22d3ee 100%);
}
*::-webkit-scrollbar-corner { background: transparent; }
/* Force a visible bar (not auto-hide, not hover-only) */
.sidebar {
  overflow: hidden !important;
}
.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: scroll !important;
  scrollbar-gutter: stable;
  padding-right: 2px;
}
.sidebar,
.sidebar-scroll,
.content,
.re-canvas,
.re-cfg,
.re-cat,
.re-actions,
.mt-picker .re-cat,
.mt-picker .re-actions,
#libTriggersPane,
#libActionsPane,
.mt-scene-switch-list,
.tr-rules-table-wrap,
.logs {
  overflow-y: scroll !important;
  scrollbar-gutter: stable;
}

/* ========== Sidebar : plus de traits linéaires mal coupés ========== */
.sidebar {
  box-shadow: none !important;
  border-right: 0 !important;
}
.sidebar::before,
.sidebar::after,
.nav-section::before,
.nav-section::after,
.nav-label::after,
.sidebar-foot::before,
.live-box::before,
.live-box::after {
  /* on coupe les filets décoratifs hérités */
}
.nav-section {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 0;
  background-image: linear-gradient(90deg, transparent, rgba(196,181,253,.28), rgba(34,211,238,.2), transparent);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top center;
}
.nav-section:first-of-type,
.sidebar .nav-section:nth-of-type(1) {
  background-image: none;
  padding-top: 0;
}
.sidebar-foot, .topbar { border: 0 !important; box-shadow: none !important; }
.lune-phases { opacity: .85; }

/* Une seule lune dans les titres de section (le ::before de mt_account.css suffit) */
.nav-label { position: relative; }
.topbar h1 { position: relative; }

/* Gear + libellé Config à côté du sélecteur de scène */
.mt-scene-switch-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mt-scene-switch-gear {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #c4b5fd;
  flex: none;
  filter: drop-shadow(0 0 6px rgba(167,139,250,.7));
}
.mt-scene-switch-gear svg { display: block; }
.mt-scene-switch-kicker {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #c4b5fd;
  flex: none;
}

/* ========== Thème / palette : chrome de base de TOUS les widgets ========== */
:root {
  --mt-a: #c4b5fd;
  --mt-b: #22d3ee;
  --mt-c: #f472b6;
  --mt-look-bg: transparent;
  --mt-look-frame: rgba(196,181,253,.35);
  --mt-look-glow: 0 0 16px rgba(167,139,250,.28);
  --mt-look-radius: 16px;
  --mt-look-fill: rgba(12,8,24,.18);
  --mt-look-text: #f8f5ff;
}

html[data-mt-look="classic"], body[data-mt-look="classic"] {
  --mt-look-bg: transparent;
  --mt-look-frame: color-mix(in srgb, var(--mt-a) 55%, #fff 0%);
  --mt-look-glow: 0 8px 22px color-mix(in srgb, var(--mt-a) 28%, transparent);
  --mt-look-radius: 16px;
  --mt-look-fill: color-mix(in srgb, var(--mt-a) 10%, rgba(10,8,20,.2));
}
html[data-mt-look="neon"], body[data-mt-look="neon"] {
  --mt-look-bg: transparent;
  --mt-look-frame: var(--mt-b);
  --mt-look-glow: 0 0 18px var(--mt-a), 0 0 36px var(--mt-b), inset 0 0 18px color-mix(in srgb, var(--mt-c) 35%, transparent);
  --mt-look-radius: 14px;
  --mt-look-fill: color-mix(in srgb, var(--mt-b) 16%, rgba(0,0,0,.25));
  --mt-look-text: #fff;
}
html[data-mt-look="minimal"], body[data-mt-look="minimal"] {
  --mt-look-bg: transparent;
  --mt-look-frame: color-mix(in srgb, var(--mt-a) 35%, #ffffff 20%);
  --mt-look-glow: none;
  --mt-look-radius: 8px;
  --mt-look-fill: rgba(8,8,12,.28);
  --mt-look-text: #f4f4f5;
}
html[data-mt-look="dark"], body[data-mt-look="dark"] {
  --mt-look-bg: transparent;
  --mt-look-frame: color-mix(in srgb, var(--mt-a) 50%, #0b0714);
  --mt-look-glow: 0 0 28px color-mix(in srgb, var(--mt-a) 40%, transparent), inset 0 0 40px rgba(0,0,0,.45);
  --mt-look-radius: 20px;
  --mt-look-fill: rgba(4,2,12,.78);
  --mt-look-text: #ede9fe;
}

/* Cibles génériques présentes dans la plupart des overlays */
html[data-mt-look] .card,
html[data-mt-look] .panel,
html[data-mt-look] .frame,
html[data-mt-look] .box,
html[data-mt-look] .alert,
html[data-mt-look] .alerte,
html[data-mt-look] .widget,
html[data-mt-look] .ov-card,
html[data-mt-look] .lb-card,
html[data-mt-look] .score-board,
html[data-mt-look] .top-card,
html[data-mt-look] .bdx,
html[data-mt-look] .bdx-run,
html[data-mt-look] .rx-stage,
html[data-mt-look] .rx-frame,
html[data-mt-look] .acx,
html[data-mt-look] .canon,
html[data-mt-look] .feux,
html[data-mt-look] .passe-ticket,
html[data-mt-look] .pv-ticket,
html[data-mt-look] [class*="card"],
html[data-mt-look] [class*="frame"],
html[data-mt-look] [class*="board"],
html[data-mt-look] [class*="plaque"],
html[data-mt-look] [class*="banner"] {
  border-color: var(--mt-look-frame) !important;
  box-shadow: var(--mt-look-glow) !important;
  border-radius: var(--mt-look-radius);
  color: var(--mt-look-text);
}
html[data-mt-look="neon"] [class*="card"],
html[data-mt-look="neon"] [class*="frame"],
html[data-mt-look="neon"] .acx,
html[data-mt-look="neon"] .bdx,
html[data-mt-look="neon"] .rx-stage {
  outline: 2px solid var(--mt-b);
  outline-offset: 2px;
  filter: saturate(1.25);
}
html[data-mt-look="minimal"] [class*="card"],
html[data-mt-look="minimal"] [class*="frame"],
html[data-mt-look="minimal"] .acx,
html[data-mt-look="minimal"] .bdx {
  background: var(--mt-look-fill) !important;
  box-shadow: none !important;
  outline: 0;
  filter: saturate(.85);
}
html[data-mt-look="dark"] [class*="card"],
html[data-mt-look="dark"] [class*="frame"],
html[data-mt-look="dark"] .acx,
html[data-mt-look="dark"] .bdx,
html[data-mt-look="dark"] .rx-stage,
html[data-mt-look="dark"] .pv-ticket {
  background: var(--mt-look-fill) !important;
}
/* Texte et accents suivent la palette */
html[data-mt-look] {
  accent-color: var(--mt-a);
}
html[data-mt-look] h1,
html[data-mt-look] h2,
html[data-mt-look] .title,
html[data-mt-look] .name,
html[data-mt-look] .acx-name,
html[data-mt-look] .pseudo {
  text-shadow: 0 0 12px color-mix(in srgb, var(--mt-a) 55%, transparent);
}

/* ========== Pages app : éditeur de répliques / étape / modal ========== */
.rule-editor {
  background:
    radial-gradient(80% 50% at 0% 0%, rgba(124,58,237,.18), transparent 60%),
    linear-gradient(180deg, #120c22, #0a0714);
}
.re-right, .re-center, .mt-picker-card, .re-cfg {
  border: 1px solid rgba(196,181,253,.28);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24,16,48,.92), rgba(10,8,20,.92));
  box-shadow: 0 12px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
}
.re-right-title, .mt-picker-head, .re-cfg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 0;
  background-image: linear-gradient(90deg, transparent, rgba(196,181,253,.3), transparent);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: bottom;
  color: #f5f3ff;
  font-weight: 800;
}
.mt-picker {
  /* modale centrée : pas de texte qui déborde derrière */
}
.rule-editor:has(#mtPicker:not([hidden])) > .re-center,
.rule-editor:has(#mtPicker:not([hidden])) > .re-right {
  filter: blur(2px) brightness(.45);
  pointer-events: none;
  user-select: none;
}
.rule-editor:has(#mtPicker:not([hidden])) > .mt-picker {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5,2,14,.62);
  padding: 24px;
  z-index: 80;
}
.rule-editor:has(#mtPicker:not([hidden])) .mt-picker-card {
  width: min(560px, 92vw);
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mt-picker-card .re-actions,
#libTriggersPane, #libActionsPane {
  min-height: 0;
  overflow: auto;
  flex: 1;
}

/* Répliques compactes — colonnes alignées, puces lisibles */
#rulesBody tr.rq-row > td { padding: 0; border: 0; }
.rq-compact {
  display: grid;
  grid-template-columns: 18px 18px minmax(140px, 1.45fr) 168px 108px 180px auto;
  align-items: center;
  column-gap: 10px;
  padding: 8px 10px;
  margin: 4px 0;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(28,20,54,.9), rgba(14,10,28,.9));
  border: 1px solid rgba(196,181,253,.22);
}
.rq-compact:hover { border-color: rgba(196,181,253,.5); }
tr.is-selected .rq-compact { box-shadow: inset 0 0 0 1px #a78bfa, 0 0 16px rgba(167,139,250,.25); }
tr.is-disabled .rq-compact { opacity: .55; }
.rq-compact .rule-drag-handle {
  cursor: grab;
  color: #9f95c4;
  letter-spacing: -2px;
  justify-self: center;
}
.rq-compact .rule-row-check { accent-color: #a78bfa; justify-self: center; }
.rq-namecol {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rq-name {
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 800;
  font-size: 13.5px;
  text-align: left;
  padding: 2px 4px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  flex: 1;
}
.rq-name-input {
  font: inherit;
  font-weight: 800;
  color: #fff;
  background: rgba(8,6,18,.9);
  border: 1px solid #a78bfa;
  border-radius: 8px;
  padding: 2px 8px;
  min-width: 8rem;
  width: 100%;
}
.rq-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(167,139,250,.16);
  border: 1px solid rgba(196,181,253,.35);
  font-size: 11px;
  font-weight: 700;
  color: #ede9fe;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.rq-chip img, .rq-chip .gift-inline-img { width: 16px; height: 16px; object-fit: contain; flex: none; }
.rq-trig { width: 100%; }
.rq-trig > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-cond {
  border: 0;
  background: transparent;
  color: #22d3ee;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  white-space: nowrap;
  justify-self: start;
}
.rq-cond:hover { text-decoration: underline; }
.rq-act {
  width: 100%;
  max-width: 180px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--mt-a, #a78bfa) 35%, transparent), color-mix(in srgb, var(--mt-c, #f472b6) 22%, transparent));
  border-color: color-mix(in srgb, var(--mt-c, #f472b6) 45%, #fff 10%);
}
.rq-act-ico { flex: none; font-size: 13px; line-height: 1; }
.rq-act-lab {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.rq-compact .row-actions {
  margin-left: 0;
  display: flex;
  gap: 2px;
  justify-self: end;
}
.rq-compact .icon-btn,
.rq-compact .icon-btn.rq-ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #e9e3ff;
}
.rq-compact .icon-btn svg { width: 14px; height: 14px; display: block; }
.rq-compact .icon-btn.is-on { color: #86efac; }
.rq-compact .icon-btn.is-off { color: #9f95c4; }

/* ========== Fontaine : designs distincts + thumbs animés ========== */
.mtf-design { position: relative; overflow: hidden; }
.mtf-dthumb {
  display: block; height: 54px; border-radius: 10px; margin-bottom: 6px;
  position: relative; overflow: hidden;
}
.mtf-dthumb img {
  width: 34px; height: 34px; object-fit: contain;
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  z-index: 2;
}
/* Classique : cadeau nu, pas de bulle */
.dthumb-classique {
  background: #14101c;
}
.dthumb-classique::after { content: none; }
/* Bulle de savon : film irisé */
.dthumb-savon {
  background: radial-gradient(circle at 40% 30%, rgba(255,255,255,.4), transparent 40%), #0c0814;
}
.dthumb-savon .mtf-soap {
  position: absolute; inset: 6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ff9de1, #7dd3fc, #fde68a, #c4b5fd, #fda4af, #ff9de1);
  opacity: .85;
  animation: t119-spin 4s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
}
/* MoonTik : halo lunaire holographique */
.dthumb-moontik {
  background: radial-gradient(circle at 50% 55%, rgba(253,230,138,.35), rgba(124,58,237,.2) 40%, #07050f 70%);
}
.dthumb-moontik .mtf-halo {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(253,230,138,.7), 0 0 16px #c4b5fd, 0 0 28px #22d3ee;
  animation: t119-pulse 2.2s ease-in-out infinite;
}
.dthumb-moontik .mtf-halo::after {
  content: "☾";
  position: absolute; right: -2px; top: -4px;
  font-size: 12px; color: #fde68a;
  text-shadow: 0 0 8px #fde68a;
}

/* Thumbs de style : animations vraiment distinctes */
.mtf-thumb { height: 56px !important; }
.mtf-thumb i {
  width: 10px !important; height: 10px !important;
  background: radial-gradient(circle at 30% 30%, #fff, var(--mt-a, #a78bfa) 55%, var(--mt-c, #7c3aed)) !important;
}
.thumb-fontaine i {
  animation: t119-fontaine 1.6s ease-in-out infinite;
}
.thumb-fontaine i:nth-child(1){ left:50%; --sx: 0px; animation-delay: 0s; }
.thumb-fontaine i:nth-child(2){ left:50%; --sx:-18px; animation-delay: .08s; }
.thumb-fontaine i:nth-child(3){ left:50%; --sx: 18px; animation-delay: .08s; }
.thumb-fontaine i:nth-child(4){ left:50%; --sx:-30px; animation-delay: .16s; }
.thumb-fontaine i:nth-child(5){ left:50%; --sx: 30px; animation-delay: .16s; }
@keyframes t119-fontaine {
  0%   { bottom: 4%;  transform: translateX(var(--sx,0)) scale(.6); opacity: 0; }
  25%  { bottom: 55%; transform: translateX(calc(var(--sx,0) * 1.4)) scale(1); opacity: 1; }
  55%  { bottom: 78%; transform: translateX(calc(var(--sx,0) * 1.6)) scale(.95); }
  100% { bottom: 10%; transform: translateX(calc(var(--sx,0) * 1.1)) scale(.7); opacity: 0; }
}
.thumb-bulles i {
  animation: t119-bulles 2.2s ease-in-out infinite;
}
.thumb-bulles i:nth-child(1){ left:28%; animation-delay: 0s; }
.thumb-bulles i:nth-child(2){ left:50%; animation-delay: .35s; }
.thumb-bulles i:nth-child(3){ left:38%; animation-delay: .7s; }
.thumb-bulles i:nth-child(4){ left:66%; animation-delay: 1.05s; }
@keyframes t119-bulles {
  0%   { bottom: -10%; transform: translateX(0) scale(.7); opacity: 0; }
  15%  { opacity: 1; }
  50%  { transform: translateX(8px) scale(1); }
  100% { bottom: 110%; transform: translateX(-8px) scale(.85); opacity: 0; }
}
.thumb-vague i {
  top: auto !important;
  animation: t119-vague 1.8s linear infinite;
}
.thumb-vague i:nth-child(1){ animation-delay: 0s; }
.thumb-vague i:nth-child(2){ animation-delay: .25s; }
.thumb-vague i:nth-child(3){ animation-delay: .5s; }
.thumb-vague i:nth-child(4){ animation-delay: .75s; }
@keyframes t119-vague {
  0%   { left: -12%; top: 58%; opacity: 0; }
  10%  { opacity: 1; }
  25%  { top: 32%; }
  50%  { top: 62%; }
  75%  { top: 36%; }
  100% { left: 110%; top: 50%; opacity: 0; }
}
@keyframes t119-spin { to { transform: rotate(360deg); } }
@keyframes t119-pulse { 0%,100% { transform: scale(.92); opacity: .75; } 50% { transform: scale(1.08); opacity: 1; } }

/* Preview live : plus de zone noire vide, plus de pastilles par-dessus l'iframe */
#ovPersoLivePreview, .ov-perso-live {
  min-height: 220px;
  background:
    radial-gradient(circle at 50% 70%, rgba(124,58,237,.18), transparent 55%),
    repeating-conic-gradient(#161022 0% 25%, #100c1a 0% 50%) 0 0 / 24px 24px;
  border: 1px solid rgba(196,181,253,.25);
  border-radius: 14px;
  overflow: hidden;
}
#ovPersoLivePreview iframe {
  width: 100%; height: 260px; border: 0; background: transparent; display: block;
}
#ovPersoLivePreview .mtf-seed { display: none !important; }

/* Palette globale dans l'éditeur (tous widgets) */
.ov-perso-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.ov-perso-palette button {
  border: 1px solid rgba(255,255,255,.1);
  background: #0d0a1a;
  border-radius: 10px;
  padding: 6px 4px;
  cursor: pointer;
  color: #e8e2ff;
}
.ov-perso-palette button.active {
  border-color: #a78bfa;
  box-shadow: 0 0 0 1px rgba(167,139,250,.5);
}
.ov-perso-palette .sw {
  display: block; height: 14px; border-radius: 7px; margin-bottom: 3px;
  background: linear-gradient(90deg, var(--a), var(--b), var(--c));
}
.ov-perso-palette b { font-size: 9px; font-weight: 700; }
#ovPersoThemeField label, #ovPersoPaletteField label {
  font-weight: 700; color: #e9e3ff;
}

/* Variantes MTTheme déjà posées sur la scène */
.mt-var-premium_verre {
  /* verre dépoli */
}


/* ========== t120 — thème / palette VISIBLES sur chaque overlay ========== */
/* Ne s'applique que si data-mt-look / data-mt-palette est posé (choix utilisateur). */
html[data-mt-look] .mt-look-chrome,
html[data-mt-look] #bandeau,
html[data-mt-look] .bd-row,
html[data-mt-look] #root,
html[data-mt-look] .alert-root,
html[data-mt-look] .top-card,
html[data-mt-look] .tp-board,
html[data-mt-look] .lb-board,
html[data-mt-look] .tt-board,
html[data-mt-look] .member-card,
html[data-mt-look] #cannon,
html[data-mt-look] .cannon,
html[data-mt-look] .ov-sc,
html[data-mt-look] .mtom-widget,
html[data-mt-look] #card,
html[data-mt-look] .card {
  border-style: solid !important;
  border-width: 2px !important;
  border-color: var(--mt-look-frame) !important;
  box-shadow: var(--mt-look-glow) !important;
  border-radius: var(--mt-look-radius);
}
html[data-mt-look="classic"] .mt-look-chrome,
html[data-mt-look="classic"] #bandeau,
html[data-mt-look="classic"] .bd-row,
html[data-mt-look="classic"] .alert-root,
html[data-mt-look="classic"] .top-card,
html[data-mt-look="classic"] .tp-board,
html[data-mt-look="classic"] .lb-board,
html[data-mt-look="classic"] .tt-board,
html[data-mt-look="classic"] #cannon,
html[data-mt-look="classic"] .ov-sc,
html[data-mt-look="classic"] #card {
  box-shadow: 0 8px 22px color-mix(in srgb, var(--mt-a, #a78bfa) 30%, transparent) !important;
  border-color: color-mix(in srgb, var(--mt-a, #a78bfa) 55%, #fff 10%) !important;
}
html[data-mt-look="neon"] .mt-look-chrome,
html[data-mt-look="neon"] #bandeau,
html[data-mt-look="neon"] .bd-row,
html[data-mt-look="neon"] .alert-root,
html[data-mt-look="neon"] #root,
html[data-mt-look="neon"] .top-card,
html[data-mt-look="neon"] .tp-board,
html[data-mt-look="neon"] .lb-board,
html[data-mt-look="neon"] .tt-board,
html[data-mt-look="neon"] #cannon,
html[data-mt-look="neon"] .ov-sc,
html[data-mt-look="neon"] #card,
html[data-mt-look="neon"] .member-card {
  border-color: var(--mt-b, #22d3ee) !important;
  box-shadow:
    0 0 16px var(--mt-a, #c4b5fd),
    0 0 36px var(--mt-b, #22d3ee),
    inset 0 0 18px color-mix(in srgb, var(--mt-c, #f472b6) 35%, transparent) !important;
}
html[data-mt-look="minimal"] .mt-look-chrome,
html[data-mt-look="minimal"] #bandeau,
html[data-mt-look="minimal"] .bd-row,
html[data-mt-look="minimal"] .alert-root,
html[data-mt-look="minimal"] .top-card,
html[data-mt-look="minimal"] .tp-board,
html[data-mt-look="minimal"] .lb-board,
html[data-mt-look="minimal"] #cannon,
html[data-mt-look="minimal"] .ov-sc,
html[data-mt-look="minimal"] #card {
  border-width: 1px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  background-color: rgba(8,8,12,.28) !important;
}
html[data-mt-look="dark"] .mt-look-chrome,
html[data-mt-look="dark"] #bandeau,
html[data-mt-look="dark"] .bd-row,
html[data-mt-look="dark"] .alert-root,
html[data-mt-look="dark"] .top-card,
html[data-mt-look="dark"] .tp-board,
html[data-mt-look="dark"] .lb-board,
html[data-mt-look="dark"] .tt-board,
html[data-mt-look="dark"] #cannon,
html[data-mt-look="dark"] .ov-sc,
html[data-mt-look="dark"] #card,
html[data-mt-look="dark"] .member-card {
  background-color: rgba(4,2,12,.82) !important;
  border-color: color-mix(in srgb, var(--mt-a, #a78bfa) 50%, #0b0714) !important;
  box-shadow: 0 0 28px color-mix(in srgb, var(--mt-a, #a78bfa) 40%, transparent), inset 0 0 40px rgba(0,0,0,.45) !important;
  border-radius: 20px;
}

/* Bandeau : le badge LIVE et le track suivent la palette / le thème */
html[data-mt-look] .bd-live,
html[data-mt-palette] .bd-live,
html[data-mt-look] .bdx-live,
html[data-mt-palette] .bdx-live {
  background: linear-gradient(90deg, var(--mt-a, #c4b5fd), var(--mt-c, #f472b6)) !important;
  box-shadow: 0 0 14px var(--mt-a, #c4b5fd) !important;
  color: #fff !important;
  border-color: transparent !important;
}
html[data-mt-look="neon"] .bd-live,
html[data-mt-look="neon"] .bdx-live {
  box-shadow: 0 0 10px var(--mt-a), 0 0 22px var(--mt-b) !important;
}
html[data-mt-look="minimal"] .bd-live,
html[data-mt-look="minimal"] .bdx-live {
  box-shadow: none !important;
  background: var(--mt-a, #a78bfa) !important;
}
html[data-mt-look] .bd-track,
html[data-mt-palette] .bd-track,
html[data-mt-look] .bd-text,
html[data-mt-palette] .bd-text {
  color: var(--mt-look-text, #fff);
}
html[data-mt-palette] .bd-track,
html[data-mt-look] .bd-track {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mt-a, #c4b5fd) 45%, transparent);
}

/* Canon / feux / fontaine : accents palette sur le corps / les éclats */
html[data-mt-look] #cannon,
html[data-mt-look] .cannon,
html[data-mt-palette] #cannon,
html[data-mt-palette] .cannon {
  filter: drop-shadow(0 0 14px var(--mt-a, #c4b5fd));
}
html[data-mt-look="neon"] #cannon,
html[data-mt-look="neon"] .cannon { filter: drop-shadow(0 0 10px var(--mt-a)) drop-shadow(0 0 22px var(--mt-b)); }
html[data-mt-look="minimal"] #cannon,
html[data-mt-look="minimal"] .cannon { filter: none; }
html[data-mt-palette] #flash,
html[data-mt-palette] .cn-flash,
html[data-mt-look] #flash,
html[data-mt-look] .cn-flash {
  background: var(--mt-a, #c4b5fd) !important;
  box-shadow: 0 0 24px var(--mt-a, #c4b5fd), 0 0 48px var(--mt-b, #22d3ee) !important;
}
html[data-mt-look] #burst,
html[data-mt-look] .burst,
html[data-mt-palette] #burst,
html[data-mt-palette] .burst {
  filter: drop-shadow(0 0 16px var(--mt-a, #c4b5fd)) drop-shadow(0 0 28px var(--mt-c, #f472b6));
}
html[data-mt-look="dark"] #burst,
html[data-mt-look="dark"] .burst { filter: drop-shadow(0 0 22px var(--mt-a)) contrast(1.15); }
html[data-mt-look="minimal"] #burst,
html[data-mt-look="minimal"] .burst { filter: saturate(.7) brightness(1.05); }

/* Fontaine : le thème change le halo / l'ombre, la palette les anneaux */
html[data-mt-look="classic"] #stage .soap-bubble {
  filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--mt-a, #a78bfa) 35%, transparent));
}
html[data-mt-look="neon"] #stage .soap-bubble,
html[data-mt-look="neon"] #stage .gift-img {
  filter: drop-shadow(0 0 10px var(--mt-a, #c4b5fd)) drop-shadow(0 0 18px var(--mt-b, #22d3ee)) !important;
}
html[data-mt-look="minimal"] #stage .soap-bubble { filter: none; }
html[data-mt-look="dark"] #stage .soap-bubble {
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--mt-a, #a78bfa) 70%, transparent));
}
html[data-mt-palette] #stage.design-bulle_de_savon .soap-bubble {
  box-shadow:
    0 0 18px color-mix(in srgb, var(--pal-a, var(--mt-a)) 70%, transparent),
    inset 0 0 14px color-mix(in srgb, var(--pal-b, var(--mt-b)) 45%, transparent) !important;
  border-color: color-mix(in srgb, var(--pal-c, var(--mt-c)) 70%, #fff) !important;
}

/* Roue / carrousel / stats (souvent canvas) : cadre autour du support, pas du viewport */
html[data-mt-look] #rx,
html[data-mt-look] #c:not(:empty),
html[data-mt-look] canvas {
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--mt-a, #a78bfa) 55%, transparent));
}
html[data-mt-look="neon"] #rx,
html[data-mt-look="neon"] #c:not(:empty),
html[data-mt-look="neon"] canvas {
  filter: drop-shadow(0 0 10px var(--mt-a)) drop-shadow(0 0 24px var(--mt-b));
}
html[data-mt-look="minimal"] #rx,
html[data-mt-look="minimal"] #c:not(:empty),
html[data-mt-look="minimal"] canvas { filter: none; }
html[data-mt-look="dark"] #rx,
html[data-mt-look="dark"] #c:not(:empty),
html[data-mt-look="dark"] canvas {
  filter: drop-shadow(0 0 20px var(--mt-a, #a78bfa)) contrast(1.08);
}

/* Objectif / win / score */
html[data-mt-palette] .ov-sc,
html[data-mt-look] .ov-sc,
html[data-mt-palette] [class*="objectif"],
html[data-mt-palette] .sc-big,
html[data-mt-look] .sc-big {
  color: var(--mt-a, #c4b5fd);
  text-shadow: 0 0 12px var(--mt-a, #c4b5fd);
}

/* Palettes : accents globaux dès que data-mt-palette est posé */
html[data-mt-palette] {
  --accent: var(--mt-a) !important;
}
html[data-mt-palette] .count-bubble,
html[data-mt-palette] .gift-glow,
html[data-mt-look] .count-bubble,
html[data-mt-look] .gift-glow {
  box-shadow: 0 0 16px var(--mt-a, #c4b5fd) !important;
  border-color: color-mix(in srgb, var(--mt-a, #c4b5fd) 65%, #fff) !important;
}


/* t121 — overlay JS retiré : les barres sont les scrollbars natives (bord droit). */
.mt-sb-track, .mt-sb-thumb { display: none !important; }


/* ========== t122 — canevas étape compact et centré ========== */
.re-canvas {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  padding: 28px 24px 36px !important;
}
#ruleBlocks.re-blocks,
.re-canvas .re-blocks {
  display: flex !important;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100% !important;
  max-width: 560px !important;
  margin: 0 auto !important;
  gap: 0;
}
.re-canvas .mt-score {
  width: 100% !important;
  max-width: 560px !important;
  margin: 0 auto;
  gap: 20px;
}
.re-canvas .mt-score-part h3 {
  margin: 0 0 8px 34px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c4b5fd;
}
.re-canvas .mt-score ol {
  position: relative;
  margin: 0 0 8px;
  padding: 0;
  gap: 8px;
}
.re-canvas .mt-score ol::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(196,181,253,.12), rgba(34,211,238,.5), rgba(244,114,182,.25), rgba(196,181,253,.12));
  pointer-events: none;
  z-index: 0;
}
.re-canvas .mt-step {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.re-canvas .mt-step-n {
  width: 22px;
  height: 22px;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(180deg, #3b2a6e, #1a1233);
  border: 1px solid rgba(196,181,253,.5);
  box-shadow: 0 0 10px rgba(167,139,250,.4);
  color: #f5f3ff;
}
.re-canvas .mt-step .re-block,
.re-canvas .re-block {
  width: 100% !important;
  max-width: none !important;
  min-height: 56px;
  padding: 8px 12px !important;
  border-radius: 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.05);
  background: linear-gradient(90deg, rgba(28,20,54,.95), rgba(14,10,28,.95));
  border: 1px solid rgba(196,181,253,.22);
}
.re-canvas .re-block.selected {
  border-color: rgba(167,139,250,.75);
  box-shadow: 0 0 0 1px #a78bfa, 0 0 16px rgba(167,139,250,.28);
}
.re-canvas .re-block-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  margin: 0 !important;
  min-width: 0;
  flex: 1;
}
.re-canvas .re-block-ico {
  width: 28px !important;
  height: 28px !important;
  font-size: 15px;
  border-radius: 8px;
  flex: none;
}
.re-canvas .re-block-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.re-canvas .re-block-gift,
.re-canvas .re-block-stub {
  margin: 0 0 0 auto;
  flex: none;
  min-width: 0;
  max-width: 200px;
}
.re-canvas .re-gift-chip,
.re-canvas .re-block-stub {
  display: inline-block;
  vertical-align: middle;
  max-width: 200px;
  padding: 3px 8px !important;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  background: rgba(167,139,250,.16);
  border: 1px solid rgba(196,181,253,.35);
  color: #ede9fe;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.re-canvas .re-gift-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.re-canvas .re-gift-chip .gift-inline-img {
  width: 16px !important;
  height: 16px !important;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 4px;
}
.re-canvas .mt-step-note { display: none !important; }
.re-canvas .mt-score-wait {
  margin: 0 0 0 34px;
  font-size: 12px;
}
.re-canvas .mt-score [data-score-add] {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: calc(100% - 34px) !important;
  margin-left: 34px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px dashed rgba(196,181,253,.45) !important;
  background: rgba(167,139,250,.07) !important;
  border-radius: 12px;
  color: #c4b5fd !important;
  font-weight: 700;
  font-size: 13px;
  box-shadow: none !important;
}
.re-canvas .mt-score [data-score-add]:hover {
  border-color: rgba(196,181,253,.75) !important;
  background: rgba(167,139,250,.14) !important;
  color: #f5f3ff !important;
}


/* ========== t124 — centrage plein cadre si le panneau droit est fermé ========== */
.rule-editor:has(#cfgPanel[hidden]) {
  grid-template-columns: 1fr !important;
}
.rule-editor:has(#cfgPanel[hidden]) > .re-right {
  display: none !important;
}
.rule-editor:has(#cfgPanel:not([hidden])) {
  grid-template-columns: 1fr 340px !important;
}

/* #ruleBlocks[hidden] was still display:flex (t122 !important), which left a 560px ghost column and shoved the empty card left. */
#ruleBlocks.re-blocks[hidden],
.re-canvas .re-blocks[hidden] {
  display: none !important;
}
.re-canvas:has(> .re-empty:not([hidden])) {
  align-items: center !important;
  justify-content: center !important;
}

/* Empty state : CTA plus grand, carte centrée */
.re-canvas .re-empty {
  margin: 0 auto;
  flex: 0 0 auto;
  align-self: center;
  width: min(480px, 100%);
  max-width: 480px;
  text-align: center;
  padding: 36px 28px 40px;
  border-radius: 20px;
  border: 1px solid rgba(196, 181, 253, 0.28);
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(167, 139, 250, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(28, 20, 54, 0.88), rgba(14, 10, 28, 0.92));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.re-canvas .re-empty-ico {
  width: 80px;
  height: 80px;
  margin: 0 auto 18px;
  border-radius: 50%;
  font-size: 36px;
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.28), rgba(34, 211, 238, 0.12));
  border: 1px solid rgba(196, 181, 253, 0.4);
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.25);
}
.re-canvas .re-empty-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f5f3ff;
  margin-bottom: 8px;
}
.re-canvas .re-empty-hint {
  font-size: 14px;
  line-height: 1.5;
  color: #c4b5fd;
  margin: 0 auto 24px;
  max-width: 34ch;
}
.re-canvas .re-empty [data-score-add],
.re-canvas .re-empty .btn-primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 280px;
  min-height: 52px;
  margin: 0 auto !important;
  padding: 0 28px;
  border: 0 !important;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  color: #1a1233 !important;
  background: linear-gradient(180deg, #e9d5ff, #c4b5fd) !important;
  box-shadow: 0 8px 24px rgba(167, 139, 250, 0.35) !important;
}
.re-canvas .re-empty [data-score-add]:hover,
.re-canvas .re-empty .btn-primary:hover {
  background: linear-gradient(180deg, #f5f3ff, #ddd6fe) !important;
  color: #1a1233 !important;
  border-color: transparent !important;
}
