/* ===================================================
   PAGE STREAM 2 (OBS / VMIX) - THÈMES & CLASSEMENT
   Fondtest.png - 1920x1080 Full HD
=================================================== */

html,
body.stream2-body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: var(--font-body);
  user-select: none;
  background-color: #0b0f19;
  background-image: url('/assets/da/fondtest.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

.stream2-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.stream2-container {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  transform: scale(1);
}

.stream2-container.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ===================================================
   VUE 1 : CHOIX DES THÈMES (RÉDUCTION À 90%)
=================================================== */
.stream2-themes-view {
  gap: 30px;
  transform: scale(1.1);
  transform-origin: center center;
}

.themes-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 6px;
}

.themes-title-img {
  width: min(85vw, 560px);
  height: auto;
  aspect-ratio: 610 / 104;
  object-fit: contain;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.8));
  animation: themesTitlePop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes themesTitlePop {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(2, 650px);
  grid-gap: 20px;
  justify-content: center;
  align-items: center;
  max-width: 1400px;
}

/* Cartes de Thèmes Stream 2 */
.theme-card {
  width: 650px;
  height: 126px;
  aspect-ratio: 705 / 137;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  box-sizing: border-box;
  text-align: center;
  border-radius: 16px;
  /* Permet un arrondi parfait de l'ombre */
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65);
  /* Ombre propre sans masque noir */
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  animation: themeCardFade 0.5s ease backwards;
}

/* 1. État Normal */
.theme-card.normal {
  background-image: url('/assets/da/theme_rectangle.png');
}

/* 2. État Choisi (Vert) */
.theme-card.vert {
  background-image: url('/assets/da/theme_rectangle_vert.png') !important;
  transform: scale(1.025);
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.85);
  /* Halo vert néon */
}

/* 3. État Fait / Validé (Gris) */
.theme-card.gris {
  background-image: url('/assets/da/theme_rectangle_gris.png') !important;
  opacity: 0.7;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.theme-card:nth-child(1) {
  animation-delay: 0.05s;
}

.theme-card:nth-child(2) {
  animation-delay: 0.1s;
}

.theme-card:nth-child(3) {
  animation-delay: 0.15s;
}

.theme-card:nth-child(4) {
  animation-delay: 0.2s;
}

@keyframes themeCardFade {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Les 3 états du rectangle thème */
.theme-card.normal {
  background-image: url('/assets/da/theme_rectangle.png');
}

.theme-card.vert {
  background-image: url('/assets/da/theme_rectangle_vert.png');
  transform: scale(1.025);
  filter: drop-shadow(0 0 25px rgba(34, 197, 94, 0.85));
}

.theme-card.gris {
  background-image: url('/assets/da/theme_rectangle_gris.png');
  opacity: 0.75;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

.theme-title {
  font-family: 'Retrokia Caps', var(--font-title), sans-serif;
  font-size: clamp(1.6rem, 2.1vw, 2.2rem);
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.85);
  line-height: 1.15;
}

/* ===================================================
   VUE 2 : CLASSEMENT OFFICIEL
=================================================== */
.stream2-classement-view {
  gap: 30px;
  transform: scale(1.25);
  transform-origin: center center;
}

.classement-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.classement-title-img {
  width: min(85vw, 560px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.8));
  animation: themesTitlePop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.classement-title {
  font-family: 'Retrokia Caps', var(--font-title), sans-serif;
  font-size: 3.8rem;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9), 0 0 25px rgba(245, 158, 11, 0.4);
  line-height: 1;
}

.classement-round-badge {
  font-family: 'Cal Sans', var(--font-alt), sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-accent);
  background: rgba(15, 23, 42, 0.75);
  padding: 6px 20px;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.classement-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.classement-row {
  width: 706px;
  height: 60px;
  aspect-ratio: 706 / 60;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  box-sizing: border-box;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.7));
  animation: classementRowIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  transition: transform 0.25s ease;
}

@keyframes classementRowIn {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Couleurs des rectangles joueur */
.classement-row.row-vert {
  background-image: url('/assets/da/classement_joueur_vert.png');
}

.classement-row.row-rouge {
  background-image: url('/assets/da/classement_joueur_rouge.png');
}

.classement-row.row-normal {
  background-image: url('/assets/da/classement_joueur.png');
}

.classement-left-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.classement-rank {
  font-family: 'Cal Sans', var(--font-alt), sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  min-width: 28px;
}

.classement-name {
  font-family: 'Trasandina Regular', var(--font-body), sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
  letter-spacing: 0.02em;
}

.classement-score {
  font-family: 'Cal Sans', var(--font-alt), sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.04em;
}

.stream2-media-container {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stream2-media-element {
  max-width: 88vw;
  max-height: 84vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  object-fit: contain;
}
.stream2-media-container.hidden,
.stream2-media-element.hidden { display: none !important; }