/* SOS, zones interdites et mode master (régie). (chargé après 05-lobby.css, l'ordre compte pour la cascade) */

/* ---------- Sécurité : SOS et zones interdites ---------- */
.list-item.sos-item {
  font-weight: 700;
}
.pin.sos {
  background: var(--danger);
  animation: sos-pulse 1s infinite;
}
@keyframes sos-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(200, 40, 40, 0.7);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(200, 40, 40, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(200, 40, 40, 0);
  }
}
.banner.sos .btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.banner.sos .banner-row + .btn-row + .banner-row {
  margin-top: 10px;
}
.forbid-pin {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.forbid-pin::after {
  content: '';
  width: 56%;
  height: 18%;
  background: #fff;
  border-radius: 2px;
} /* sens interdit */
.forbid-pin.sm {
  width: 22px;
  height: 22px;
}
.fz-r {
  min-width: 52px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
@media (prefers-reduced-motion: reduce) {
  .pin.sos {
    animation: none;
    box-shadow: 0 0 0 6px rgba(200, 40, 40, 0.45);
  }
}

/* ---------- Mode master (écran de régie en partie) ---------- */
.chip.master {
  border-color: var(--master);
  color: var(--warn-text);
}
#roleBadge {
  cursor: default;
}
.list-item.master-item {
  font-weight: 700;
}
.master-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.master-switch > .ic {
  width: 22px;
  height: 22px;
  color: var(--warn-text);
  flex: none;
}
.master-switch.on {
  background: var(--warn-50);
}
.master-switch .row-main {
  display: flex;
  flex-direction: column;
}
.master-switch .row-title {
  font-weight: 700;
  white-space: normal;
}
.master-switch .btn {
  flex: none;
}
.master-tool-chip {
  position: absolute;
  z-index: 1001;
  left: 50%;
  transform: translateX(-50%);
  top: calc(var(--top-h) + 8px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border-radius: var(--radius);
  background: var(--master);
  color: var(--on-master);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-2);
  white-space: nowrap;
}
.master-tool-chip .ic {
  width: 18px;
  height: 18px;
}
.master-tool-chip .icon-btn {
  color: var(--on-master);
}
/* mode dev */
.dev-tool-chip {
  background: var(--dev);
  color: #fff;
  top: calc(var(--top-h) + 52px);
}
.dev-tool-chip .icon-btn {
  color: #fff;
}
.dev-control-bar {
  position: absolute;
  z-index: 1001;
  left: 8px;
  right: 64px;
  top: calc(var(--top-h) + 8px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 12px;
  border-radius: var(--radius);
  background: var(--dev-strong);
  color: #fff;
  font-size: 0.85rem;
  box-shadow: var(--shadow-2);
}
.dev-control-bar .ic {
  width: 18px;
  height: 18px;
  flex: none;
}
.dev-control-bar .dcb-txt {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dev-control-bar .icon-btn {
  color: #fff;
}
.dev-control-bar .btn {
  flex: none;
}
.dev-control-bar:not(.hidden) ~ .dev-tool-chip {
  top: calc(var(--top-h) + 56px);
  left: 8px;
  transform: none;
  max-width: calc(100% - 72px);
}
#timeChip.time-chip {
  background: var(--dev-strong);
  color: #fff;
  font-weight: 800;
  flex: none;
}
#timeChip.time-chip .ic {
  color: #fff;
}
.dev-range {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dev-range input[type='range'] {
  flex: 1;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  accent-color: var(--dev);
}
.dev-range b {
  min-width: 48px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dev-body {
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dev-body .avatar .ic {
  width: 18px;
  height: 18px;
}
.dev-body .icon-btn.on {
  background: var(--surface-2);
  color: var(--accent);
}
.msg-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.msg-row input,
.msg-row select {
  flex: 1;
  min-width: 0;
}
button.pt-num {
  border: none;
  cursor: pointer;
  flex: none;
}
.pt-num.done {
  background: var(--offline);
}
.pt-num.cur {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
.chip-x {
  border: none;
  background: none;
  padding: 0;
  margin-left: 2px;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
}
.chip-x .ic {
  width: 14px;
  height: 14px;
}
.card-owner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0;
}
.card-owner + .card-owner {
  border-top: 1px solid var(--surface-2);
}
.card-owner .modes {
  justify-content: flex-start;
  padding-top: 0;
}
.app-version {
  margin: 14px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
} /* un appui ouvre le mode dev (master) */
.pin.dev-bot {
  cursor: grab;
  outline: 2px dashed var(--dev);
  outline-offset: 2px;
}

.list-item:disabled {
  opacity: 0.5;
  cursor: default;
}
.list-item:disabled:hover {
  background: none;
}
.list-item.two-lines {
  align-items: flex-start;
  text-align: left;
}
.li-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.li-text small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}
