/*
 * Fond commun à tous les écrans TV Team Bouchon.
 * Le noir est volontairement la valeur initiale et la valeur de désactivation.
 */
html.tb-tv-screen {
  background: #000 !important;
}

body.tb-tv-screen {
  position: relative;
  isolation: isolate;
  background: transparent !important;
}

body.tb-tv-screen > .ambient,
body.tb-tv-screen > .tv-background {
  display: none !important;
}

body.tb-tv-screen #tbAccountRoot {
  display: none !important;
}

body.tb-tv-screen::before,
body.tb-tv-screen::after {
  content: none !important;
  animation: none !important;
  background: none !important;
}

body.tb-tv-screen.tb-tv-background-on::before,
body.tb-tv-screen.tb-tv-background-on::after {
  content: "" !important;
  position: fixed;
  inset: -12vmax;
  z-index: -2;
  display: block;
  pointer-events: none;
}

body.tb-tv-screen.tb-tv-background-disco::before {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 78, 136, .48), transparent 26%),
    radial-gradient(circle at 80% 28%, rgba(109, 91, 245, .5), transparent 27%),
    radial-gradient(circle at 48% 82%, rgba(217, 255, 67, .3), transparent 30%),
    linear-gradient(135deg, #070711, #130c22 48%, #07151a) !important;
  animation: tbTvDiscoDrift 12s ease-in-out infinite alternate !important;
}

body.tb-tv-screen.tb-tv-background-disco::after {
  z-index: -1;
  background:
    conic-gradient(
      from 0deg,
      transparent 0 9%,
      rgba(255, 78, 136, .2) 10% 13%,
      transparent 14% 28%,
      rgba(93, 169, 255, .22) 29% 32%,
      transparent 33% 49%,
      rgba(217, 255, 67, .18) 50% 53%,
      transparent 54% 100%
    ) !important;
  filter: blur(12px);
  animation: tbTvDiscoSpin 24s linear infinite !important;
}

body.tb-tv-screen.tb-tv-background-photo::before {
  inset: 0;
  background:
    linear-gradient(rgba(5, 5, 10, .3), rgba(5, 5, 10, .62)),
    var(--tb-tv-background-photo) center / cover no-repeat !important;
}

body.tb-tv-screen.tb-tv-background-photo::after {
  display: none;
}

body.tb-tv-screen.tb-tv-background-off::before,
body.tb-tv-screen.tb-tv-background-off::after {
  content: none !important;
  display: none !important;
  animation: none !important;
  background: none !important;
}

/* Les vues plein écran doivent laisser apparaître le fond partagé. */
body.tb-tv-screen .tv-view,
body.tb-tv-screen .combined-tv-view,
body.tb-tv-screen .waiting,
body.tb-tv-screen .idle,
body.tb-tv-screen .games-tv-idle,
body.tb-tv-screen .photo-tv-waiting {
  background-color: transparent !important;
  background-image: none !important;
}

@keyframes tbTvDiscoDrift {
  to {
    filter: hue-rotate(28deg) saturate(1.18);
    transform: scale(1.04);
  }
}

@keyframes tbTvDiscoSpin {
  to {
    transform: rotate(360deg) scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.tb-tv-screen::before,
  body.tb-tv-screen::after {
    animation: none !important;
  }
}
