/* MoonTik — éditeur d'overlay : aperçu à gauche, réglages à droite (jamais empilés). */

.ov-wizard-overlay .ov-wizard {
  max-width: min(1280px, calc(100vw - 32px));
  width: 1280px;
  height: min(900px, calc(100vh - 24px));
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
}
.ov-wizard-overlay .ov-wiz-perso {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
}
.ov-wizard-overlay .ov-wiz-perso > h3 { display: none; }

.ov-perso-layout,
.ov-perso-layout.is-score {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px) !important;
  gap: 0 !important;
  align-items: stretch !important;
  flex-direction: unset !important;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.ov-perso-layout.is-score .ov-perso-preview-col,
.ov-perso-layout .ov-perso-preview-col {
  width: auto !important;
  min-width: 0;
  order: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px 16px 72px;
  overflow: auto;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(40, 44, 70, 0.45), transparent 55%),
    #0c0d12;
}
.ov-perso-layout.is-score .ov-perso-fields,
.ov-perso-layout .ov-perso-fields {
  width: auto !important;
  min-width: 0;
  order: 1 !important;
  overflow: auto;
  padding: 12px 14px 88px;
  background: #14151c;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}
.ov-cfg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e4e4e7;
  margin: 0 0 12px;
}
.ov-cfg-head::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background:
    conic-gradient(from 30deg, #71717a, #a1a1aa, #71717a);
  mask: radial-gradient(circle at 50% 50%, transparent 35%, #000 36%);
}

.ov-perso-layout.is-score .ov-perso-live,
.ov-perso-layout .ov-perso-live {
  aspect-ratio: auto !important;
  min-height: 240px;
  flex: 1;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: #111216;
  background-image: repeating-conic-gradient(#1a1b22 0% 25%, #121318 0% 50%);
  background-size: 20px 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ov-flow { display: flex; align-items: center; gap: 18px; flex: 1; min-height: 0; }
.ov-flow-trigger {
  flex: 0 0 210px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ov-flow-trigger[hidden],
.ov-flow-reactions[hidden] { display: none !important; }
.ov-node {
  background: #16171f;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.ov-node-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
  background: #1e3a5f;
  border-radius: 8px;
  padding: 3px 8px;
  margin-bottom: 8px;
}
.ov-node-title { font-size: 14px; font-weight: 650; color: #f4f4f5; }
.ov-node-cond {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}
.ov-node-cond .ov-kicker-gold {
  color: #fde68a;
  background: #3f3a1e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
  padding: 2px 7px;
  margin-bottom: 6px;
}
.ov-add-cond {
  width: 100%;
  background: transparent;
  color: #a1a1aa;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.ov-add-cond:hover { border-color: #60a5fa; color: #e4e4e7; }
.ov-node-add {
  border: 1px dashed rgba(96, 165, 250, 0.45);
  color: #93c5fd;
  background: transparent;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}
.ov-flow-stage { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ov-flow-reactions {
  background: #111216;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 12px 12px;
  padding: 8px 12px 10px;
  margin-top: -8px;
}
.ov-flow-reactions h4 {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #fbbf24;
  text-transform: uppercase;
}
.ov-rx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  color: #e4e4e7;
}
.ov-rx-dot { width: 7px; height: 7px; border-radius: 50%; background: #a1a1aa; display: inline-block; margin-right: 8px; }
.ov-rx-dot.on { background: #fbbf24; }
.ov-rx-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #ca8a04;
  background: #1a1404;
  color: #fbbf24;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.ov-flow-bar {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  background: #1b1c24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 6px 8px;
  z-index: 4;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.ov-wizard { position: relative; }
.ov-flow-bar .btn { border-radius: 999px; }
.ov-flow-bar .btn-primary { background: #fff; color: #111; border-color: #fff; }

/* Module pages : aperçu à gauche, formulaire à droite */
.mp.mp-split { max-width: none; }
.mp-split .mp-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 46%);
  gap: 16px;
  align-items: start;
}
.mp-split .mp-prev {
  height: min(68vh, 640px);
  position: sticky;
  top: 8px;
  order: 0;
}
.mp-split .mp-form {
  order: 1;
  max-height: calc(100vh - 150px);
  overflow: auto;
}
.mp-split .mp-gal-wrap { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .ov-perso-layout,
  .ov-perso-layout.is-score {
    grid-template-columns: 1fr !important;
  }
  .mp-split .mp-body { grid-template-columns: 1fr; }
}
