/* t173c — fiche réplique partagée (page Répliques + flux superposition existant). */
.mtqc, .mtqc *, .mtqc-box, .mtqc-box *, .mtqc-ov, .mtqc-ov *, .mtqc-pick, .mtqc-pick * { box-sizing: border-box; }
.mtqc { position: relative; display: flex; flex-direction: column; gap: 12px; color: #ece8ff; min-width: 0; width: 100%; }

/* « Enregistré » : toast sous le sous-titre, jamais sur le nom ni le crayon. */
.mtqc-save-slot {
  display: block; height: 22px; margin-top: 5px;
}
.mtqc-saved {
  position: static; transform: none; left: auto; right: auto; top: auto;
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 800;
  color: #042f1e; background: #6ee7b7; box-shadow: 0 4px 12px rgba(16,185,129,.35);
  pointer-events: none; opacity: 0; transition: opacity .18s; white-space: nowrap;
}
.mtqc-saved.on { opacity: 1; }

.mtqc .rq2-sw, .mtqc-box .rq2-sw {
  position: relative; width: 38px; height: 22px; border-radius: 999px; border: 0; padding: 0;
  cursor: pointer; background: #2a2550; flex: none;
}
.mtqc .rq2-sw::after, .mtqc-box .rq2-sw::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #7e78b0; transition: left .15s;
}
.mtqc .rq2-sw.on, .mtqc-box .rq2-sw.on { background: linear-gradient(90deg, #a78bfa, #93c5fd 60%, #67e8f9); }
.mtqc .rq2-sw.on::after, .mtqc-box .rq2-sw.on::after { left: 19px; background: #fff; }

.mtqc-ph { display: flex; align-items: center; gap: 8px; padding-right: 70px; min-width: 0; }
.mtqc-pico { font-size: 26px; flex: none; }
.mtqc-ph-txt { min-width: 0; flex: 1; }
.mtqc-ph h2, .mtqc-name {
  margin: 0; font-size: 21px; color: #fff; line-height: 1.15; font-weight: 800;
  cursor: text; border-radius: 8px; padding: 0 4px 0 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.mtqc-name:hover, .mtqc-name:focus { background: rgba(167,139,250,.16); outline: none; }
.mtqc-name-input {
  font: inherit; font-size: 21px; font-weight: 800; color: #fff; line-height: 1.15;
  width: 100%; max-width: 100%; box-sizing: border-box;
  background: #0e0b1d; border: 1px solid #8b5cf6; border-radius: 8px; padding: 2px 8px;
}
.mtqc-ph small { font-size: 12px; color: #a9a3d8; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtqc-paused { color: #fde68a; }
.mtqc .rq2-sw { flex: none; }

.mtqc-blk { border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); padding: 11px 14px; min-width: 0; width: 100%; overflow: visible; }
.mtqc-blk h4 { margin: 0 0 8px; font-size: 10.5px; letter-spacing: .14em; color: #c4b5fd; font-weight: 800; }

.mtqc-sig { display: flex; align-items: center; gap: 12px; font-size: 14px; min-width: 0; }
.mtqc-sig small { display: block; font-size: 12px; color: #a9a3d8; }
.mtqc-gbig { width: 46px; height: 46px; object-fit: contain; display: grid; place-items: center; font-size: 32px; flex: none; cursor: pointer; }
.mtqc-gbig:hover { filter: brightness(1.15); }
.mtqc-sig b { cursor: pointer; }
.mtqc-sig b:hover { color: #c4b5fd; }
.mtqc-qty { width: 64px; max-width: 100%; box-sizing: border-box; background: #0e0b1d; border: 1px solid #3b3160; color: #fff; border-radius: 8px; padding: 4px 6px; font: inherit; font-weight: 700; }
.mtqc-target-user { margin-top: 6px; width: 100%; max-width: 100%; box-sizing: border-box; background: #0e0b1d; border: 1px solid #3b3160; color: #fff; border-radius: 8px; padding: 5px 8px; font: inherit; }

.mtqc-conds { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mtqc-cond { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: rgba(249,168,212,.12); border: 1px solid rgba(249,168,212,.4); color: #fce7f3; }
.mtqc-none { font-size: 12px; color: #8d87c2; }
.mtqc-addc {
  font: inherit; font-size: 11.5px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px dashed rgba(147,197,253,.55); color: #bfdbfe;
}

.mtqc-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mtqc-steps li { display: flex; gap: 10px; align-items: flex-start; }
.mtqc-steps code { display: block; margin-top: 4px; font-size: 11px; color: #8d87c2; }
.mtqc-n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #14122a; background: linear-gradient(90deg, #a78bfa, #93c5fd 60%, #67e8f9); margin-top: 3px; }
.mtqc-act {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(147,197,253,.16), rgba(103,232,249,.07)); border: 1px solid rgba(147,197,253,.45);
  color: #dbeafe; font-size: 12.5px; font-weight: 700;
}
.mtqc-act i { font-style: normal; }
.mtqc-x {
  margin-left: auto; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(239,68,68,.45);
  background: rgba(239,68,68,.1); color: #fecaca; cursor: pointer; font-size: 13px;
}
.mtqc-addrow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px;
  align-items: center; min-width: 0; width: 100%;
}
.mtqc-addrow .mtqc-dd { min-width: 0; max-width: 100%; }
.mtqc-addrow input {
  grid-column: 1 / -1; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box;
  background: #0e0b1d; border: 1px solid #3b3160; color: #fff; border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 12px;
}

.mtqc-panelrow { display: flex; flex-direction: column; gap: 8px; min-width: 0; width: 100%; }
.mtqc-panelrow input[type="text"], .mtqc-panelrow .mtqc-labin {
  display: block; width: 100%; max-width: 100%; box-sizing: border-box;
  background: #0e0b1d; border: 1px solid #3b3160; color: #fff; border-radius: 8px; padding: 6px 8px; font: inherit;
}

/* Interrupteur « Afficher sur le panneau » */
.mtqc-chk {
  display: flex; align-items: center; gap: 10px; font: inherit; font-size: 13px; color: #ece8ff;
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left; width: 100%;
}
.mtqc-chk i {
  flex: none; position: relative; width: 38px; height: 22px; border-radius: 999px; background: #2a2550;
}
.mtqc-chk i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #7e78b0; transition: left .15s, background .15s;
}
.mtqc-chk.on i { background: linear-gradient(90deg, #a78bfa, #93c5fd 60%, #67e8f9); }
.mtqc-chk.on i::after { left: 19px; background: #fff; }

/* Liste déroulante MoonTik (pas de <select> natif) */
.mtqc-dd { position: relative; min-width: 0; max-width: 100%; }
.mtqc-dd-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; min-height: 32px; padding: 5px 10px 5px 12px; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 700; color: #eeeafc; text-align: left;
  background: linear-gradient(#191434, #191434) padding-box, linear-gradient(90deg, #7c3aed, #67e8f9) border-box;
  border: 1.5px solid transparent;
}
.mtqc-dd-btn::after {
  content: ""; flex: none; width: 8px; height: 8px; margin-top: -3px;
  border-right: 2px solid #c4b5fd; border-bottom: 2px solid #c4b5fd;
  transform: rotate(45deg); transition: transform .15s;
}
.mtqc-dd.open .mtqc-dd-btn { border-color: #a78bfa; }
.mtqc-dd.open .mtqc-dd-btn::after { transform: rotate(225deg); margin-top: 3px; }
.mtqc-dd-list {
  display: none; max-height: 240px; overflow: auto; padding: 4px;
  background: #120e26; border: 1px solid #4c3d7a; border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0,0,0,.5), 0 0 0 1px rgba(167,139,250,.2);
}
.mtqc-dd.open .mtqc-dd-list, .mtqc-dd-list:not([hidden]) { display: flex; flex-direction: column; gap: 2px; }
.mtqc-dd-list[hidden] { display: none !important; }
.mtqc-dd-list button {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: #eeeafc; cursor: pointer;
}
.mtqc-dd-list button:hover { background: rgba(167,139,250,.18); }
.mtqc-dd-list button.on { background: rgba(167,139,250,.28); color: #fff; }
.mtqc-dd.mtqc-dd-grow { flex: 1 1 180px; min-width: 160px; }


.mtqc-pf { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.mtqc-pf .btn { font: inherit; }
.mtqc-b2 {
  font: inherit; font-size: 12.5px; font-weight: 700; padding: 8px 14px; border-radius: 999px; cursor: pointer; color: #ece8ff;
  background: linear-gradient(#15122d, #15122d) padding-box, linear-gradient(90deg, #a78bfa, #67e8f9) border-box; border: 1.5px solid transparent;
}
.mtqc-b2.is-on { color: #fde68a; }
.mtqc-b2.danger { margin-left: auto; background: rgba(239,68,68,.10); border: 1px solid rgba(239,68,68,.45); color: #fecaca; }

/* Modal fiche (flux scène → panneau) */
.mtqc-ov { position: fixed; inset: 0; z-index: 10050; background: rgba(5,4,12,.86); display: grid; place-items: center; padding: 16px; }
.mtqc-box {
  width: min(96vw, 520px); max-height: 90vh; overflow: auto;
  border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(165deg, #1d1846, #120f2b) padding-box, linear-gradient(135deg, #a78bfa, #93c5fd 55%, #67e8f9) border-box;
  border: 1.5px solid transparent; box-shadow: 0 20px 50px rgba(0,0,0,.4), 0 0 30px rgba(167,139,250,.18);
  position: relative;
}
/* Pas de mascotte décorative dans la fiche modale : elle recouvrait ← / →. */
.mtqc-box .mtqc-ph { padding-right: 0; }
.mtqc-nav { display: flex; align-items: center; gap: 8px; color: #c4b5fd; font-size: 12px; font-weight: 700; }
.mtqc-nav .sp { flex: 1; }
.mtqc-film { display: flex; gap: 6px; overflow: auto; padding-bottom: 2px; }
.mtqc-film button {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid #3b3160; background: #191434; padding: 3px; cursor: pointer;
}
.mtqc-film button.on { border-color: #a78bfa; box-shadow: 0 0 0 2px rgba(167,139,250,.4); }
.mtqc-film img { width: 100%; height: 100%; object-fit: contain; }
.mtqc-multi { display: flex; flex-direction: column; gap: 6px; }
.mtqc-multi button {
  text-align: left; font: inherit; font-size: 12.5px; font-weight: 700; padding: 8px 10px; border-radius: 10px;
  background: #191434; border: 1px solid #3b3160; color: #eeeafc; cursor: pointer;
}
.mtqc-multi button.on { border-color: #a78bfa; background: rgba(167,139,250,.16); }

/* Sélecteur de cadeau */
.mtqc-pick { position: fixed; inset: 0; z-index: 10060; background: rgba(5,4,12,.7); display: grid; place-items: end center; padding: 12px; }
.mtqc-pick-box {
  width: min(96vw, 640px); max-height: 70vh; overflow: hidden; display: flex; flex-direction: column; gap: 8px;
  background: #120e26; border: 1px solid #4c3d7a; border-radius: 16px; padding: 12px 14px;
}
.mtqc-pick-box h3 { margin: 0; color: #fff; font-size: 16px; }
.mtqc-pick-q { width: 100%; max-width: 100%; box-sizing: border-box; background: #0e0b1d; border: 1px solid #3b3160; color: #fff; border-radius: 8px; padding: 8px 10px; font: inherit; }
.mtqc-pick-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; overflow: auto; padding: 2px; }
.mtqc-pick-g button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border-radius: 10px;
  background: #191434; border: 1px solid #3b3160; color: #eeeafc; cursor: pointer; font: inherit; font-size: 11px;
}
.mtqc-pick-g button:hover, .mtqc-pick-g button.on { border-color: #a78bfa; }
.mtqc-pick-g img { width: 40px; height: 40px; object-fit: contain; }
.mtqc-pick-g .muted { color: #8d87c2; font-size: 10px; }

.mtqc-fiche-btn {
  width: 100%; margin-top: 6px; font: inherit; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px;
  cursor: pointer; color: #ece8ff; background: #191434; border: 1px solid #8b5cf6;
}
.mtqc-empty { font-size: 13px; color: #b9b3e6; padding: 8px 0; }
