/* t97u — 4 cartes carrées (config Widgets d'une scène + Galerie), style MoonTik conservé. */
.ov-grid,
#overlayGrid.ov-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px;
}
.ov-grid .ov-card,
.ov-grid .mtbe-card {
  min-height: 0;
  min-width: 0;
}
.ov-grid .ov-card-preview,
.ov-grid .mtbe-prev,
.ov-grid .mt-fit-wrap.ov-card-preview,
.ov-grid .mt-fit-wrap.mtbe-prev {
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1 / 1;
}
.ov-grid .mtbe-foot,
.ov-grid .ov-card-body,
.ov-grid .ov-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px 8px 8px;
  gap: 6px;
}
.ov-grid .mtbe-foot b,
.ov-grid .ov-card-title {
  flex: 1 0 100%;
  font-size: 12px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ov-grid .mtbe-url,
.ov-grid .ov-url-bandeau {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ovlib-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px;
}
.ovlib-card { min-width: 0; }
.ovlib-prev {
  aspect-ratio: 1 / 1 !important;
  min-height: 0 !important;
  height: auto !important;
}
.ovlib-foot { padding: 8px 10px 10px; gap: 6px; }
.ovlib-foot b { font-size: 12px; line-height: 1.3; }
.ovlib-url input { font-size: 10px; }
.ovlib-scenes {
  font-size: 11px;
  color: #c4b5fd;
  min-height: 1.2em;
}
.ovlib-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ovlib-actions .btn { font-size: 11px; padding: 5px 8px; }
.ovlib-badge.mini { color: #fde68a; border-color: rgba(251,191,36,.45); }
.ovlib-badge.retired { color: #fda4af; border-color: rgba(244,114,182,.4); }
.ovlib-badge.hidden { color: #a1a1aa; }

/* Modale confirmation t97 */
.t97-modal {
  position: fixed; inset: 0; z-index: 12000;
  background: rgba(8,6,20,.62);
  display: grid; place-items: center; padding: 16px;
}
.t97-modal[hidden] { display: none !important; }
.t97-card {
  width: min(480px, 94vw);
  background: #16141f;
  border: 1px solid #3b3160;
  border-radius: 16px;
  padding: 18px 18px 14px;
  color: #f4f4f8;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.t97-card h3 { margin: 0 0 8px; font-size: 17px; }
.t97-card p, .t97-card label { font-size: 13px; color: #c4c0d4; line-height: 1.45; }
.t97-opts { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.t97-opts label {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 8px 10px; border: 1px solid #2b2447; border-radius: 10px;
  background: #12101a; color: #eeeafc; cursor: pointer;
}
.t97-opts label:has(input:checked) { border-color: #a78bfa; background: #1c1630; }
.t97-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.t97-scene-list { max-height: 240px; overflow: auto; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 700px) {
  .ov-grid, #overlayGrid.ov-grid, .ovlib-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
.btn-danger-outline { border-color: rgba(244,114,182,.45); color: #fda4af; background: transparent; }
.ov-card .t97-extra, .mtbe-card .t97-extra {
  font-size: 11px; color: #c4b5fd; padding: 0 8px 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.ov-card.is-hidden, .ovlib-card.is-hidden { opacity: .92; }
.ov-card .t97-extra .ovlib-badges { position: static; display: flex; flex-wrap: wrap; gap: 4px; }

.ovlib-tools { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.ovlib-show-hidden { display:flex; align-items:center; gap:6px; font-size:12px; color:#c4c0d4; white-space:nowrap; cursor:pointer; }
