/* ===================================================
   STREAM OVERLAY (OBS / VMIX) - FOND COUCHE ALPHA TRANSPARENT
   Direction Artistique Officielle - 1920x1080 Full HD
=================================================== */

html, body.stream-body {
  background: transparent !important;
  background-color: transparent !important;
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: var(--font-body);
  user-select: none;
}

/* Conteneur Plein Écran 1920x1080 pour OBS */
.stream-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 35px;
  box-sizing: border-box;
}

/* ===================================================
   SCOREBOARD DISCRET (HAUT DROITE DA)
=================================================== */
.stream-scoreboard-top {
  position: absolute;
  top: 40px;
  right: 57px;
  display: flex;
  gap: 10px;
  z-index: 100;
}
.stream-score-team-item {
  position: relative;
  width: 126px;
  height: 40px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.stream-score-team-item.team-eliminated {
  filter: grayscale(100%) contrast(85%) drop-shadow(0 2px 6px rgba(0,0,0,0.4)) !important;
  opacity: 0.35 !important;
}

.stream-score-team-item.team-gb {
  background-image: url('/assets/da/scores_gb.png');
}
.stream-score-team-item.team-info {
  background-image: url('/assets/da/scores_info.png');
}
.stream-score-team-item.team-mmi {
  background-image: url('/assets/da/scores_mmi.png');
}
.stream-score-team-item.team-tc {
  background-image: url('/assets/da/scores_tc.png');
}

.stream-score-pts {
  position: absolute;
  left: 84%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cal Sans', var(--font-alt), sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: #1a1a2e;
  line-height: 1;
  text-align: center;
  padding: 0;
  margin: 0;
}

/* ===================================================
   LOWER-THIRD BROADCAST
=================================================== */
.stream-lower-third {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: min(88vw, 1360px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 50;
}

.stream-lower-third.hidden {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(24px) !important;
  pointer-events: none !important;
}

/* ===================================================
   BANDEAU QUESTION
=================================================== */
.stream-question-wrapper {
  width: 100%;
  max-width: 1360px;
  display: flex;
  justify-content: center;
  margin-bottom: 3px;
}

.stream-question-banner {
  width: 100%;
  aspect-ratio: 1588 / 107;
  background: url('/assets/da/question.png') no-repeat center center;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 50px;
  box-sizing: border-box;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.7));
  animation: streamQuestionSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stream-question-text {
  font-family: 'Trasandina Regular', var(--font-body), sans-serif;
  font-size: clamp(1.05rem, 1.5vw, 1.5rem);
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  line-height: 1.2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.01em;
  max-width: 95%;
}

@keyframes streamQuestionSlideUp {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================================
   SCÈNE DES PROPOSITIONS & CHRONO CENTRAL
=================================================== */
.stream-propositions-stage {
  width: 100%;
  max-width: 1360px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-sizing: border-box;
  max-height: 220px;
  opacity: 1;
  transform: translateY(0) scaleY(1);
  transform-origin: top center;
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.35s ease, 
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
              gap 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
}

.stream-propositions-stage.stage-collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  transform: translateY(-14px) scaleY(0.7) !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.stream-propositions-stage.stage-visible {
  max-height: 220px !important;
  opacity: 1 !important;
  transform: translateY(0) scaleY(1) !important;
  pointer-events: auto !important;
}

/* Remonte la question de 50px uniquement quand les propositions sont fermées */
.stream-lower-third:has(.stage-collapsed) {
  transform: translateX(-50%) translateY(-50px);
}

.stream-prop-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================================
   CARTES PROPOSITIONS
=================================================== */
.stream-choice-card {
  position: relative;
  width: 100%;
  aspect-ratio: 766 / 98;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.65));
  transition: transform 0.25s ease, filter 0.25s ease, opacity 0.3s ease;
}

/* Cartes Gauche : Option 1 & 3 */
.stream-choice-card.card-left {
  justify-content: flex-end;
  padding-right: 88px; /* Marge suffisante pour ne pas toucher le losange */
  padding-left: 18px;
}
.stream-choice-card.card-left .stream-choice-text {
  text-align: right;
  margin-left: auto;
}
.stream-choice-card.card-left .stream-choice-pastilles {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

/* Cartes Droite : Option 2 & 4 */
.stream-choice-card.card-right {
  justify-content: flex-start;
  padding-left: 88px; /* Marge suffisante pour ne pas toucher le losange */
  padding-right: 18px;
}
.stream-choice-card.card-right .stream-choice-text {
  text-align: left;
  margin-right: auto;
}
.stream-choice-card.card-right .stream-choice-pastilles {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.stream-choice-card.choice-1 { background-image: url('/assets/da/reponse_1.png'); }
.stream-choice-card.choice-2 { background-image: url('/assets/da/reponse_2.png'); }
.stream-choice-card.choice-3 { background-image: url('/assets/da/reponse_3.png'); }
.stream-choice-card.choice-4 { background-image: url('/assets/da/reponse_4.png'); }

#streamChoice0.winner {
  background-image: url('/assets/da/reponse_1_vert.png') !important;
  transform: scale(1.02);
  filter: drop-shadow(0 0 16px rgba(34, 197, 94, 0.9));
  z-index: 5;
}
#streamChoice1.winner {
  background-image: url('/assets/da/reponse_2_vert.png') !important;
  transform: scale(1.02);
  filter: drop-shadow(0 0 16px rgba(34, 197, 94, 0.9));
  z-index: 5;
}
#streamChoice2.winner {
  background-image: url('/assets/da/reponse_3_vert.png') !important;
  transform: scale(1.02);
  filter: drop-shadow(0 0 16px rgba(34, 197, 94, 0.9));
  z-index: 5;
}
#streamChoice3.winner {
  background-image: url('/assets/da/reponse_4_vert.png') !important;
  transform: scale(1.02);
  filter: drop-shadow(0 0 16px rgba(34, 197, 94, 0.9));
  z-index: 5;
}

.stream-choice-card.loser {
  opacity: 0.82;
  filter: grayscale(0.2) drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.stream-choice-text {
  font-family: 'Trasandina Regular', var(--font-body), sans-serif;
  font-size: clamp(1rem, 1.3vw, 1.35rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 10px);
}

/* ===================================================
   PASTILLES DES DUOS
=================================================== */
.stream-choice-pastilles {
  position: absolute;
  display: flex;
  gap: 6px;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.stream-pastille-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.7));
  animation: streamPastillePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

@keyframes streamPastillePop {
  0% { transform: scale(0.2); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
/* ===================================================
   CHRONO CENTRAL & TRANSITION HORIZONTALE STRICTE
=================================================== */
.stream-center-timer-wrap {
  width: 100px;
  min-width: 100px;
  aspect-ratio: 166 / 102;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  margin: 0 -25px;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              min-width 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              margin 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease,
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.stream-hexagon-timer {
  width: 100%;
  height: 100%;
  background: url('/assets/da/chrono_fond.png') no-repeat center center;
  background-size: contain;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stream-timer-num {
  font-family: 'Cal Sans', var(--font-alt), sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.stream-propositions-stage.timer-collapsed {
  gap: 0px;
}

/* Écrasement du chrono uniquement sur l'axe X (largeur) */
.stream-propositions-stage.timer-collapsed .stream-center-timer-wrap {
  width: 0 !important;
  min-width: 0 !important;
  opacity: 0;
  transform: scaleX(0);
  margin: 0;
  pointer-events: none;
}

/* Rapprochement uniquement horizontal des 2 colonnes */
.stream-prop-col {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.stream-propositions-stage.timer-collapsed .stream-col-left {
  transform: translateX(12px);
}

.stream-propositions-stage.timer-collapsed .stream-col-right {
  transform: translateX(-12px);
}

/* ===================================================
   STREAM FINALE 90s
=================================================== */
.stream-finale-wrap {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: min(88vw, 1360px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 55;
}

.stream-finale-wrap.hidden {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(24px) !important;
  pointer-events: none !important;
  display: none !important;
}

.stream-finale-top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 6px;
}

.stream-theme-badge {
  font-family: 'Retrokia Caps', var(--font-title), sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(15, 23, 42, 0.85);
  padding: 6px 22px;
  border-radius: 9999px;
  border: 1px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.stream-finale-timer {
  font-family: 'Cal Sans', var(--font-mono), monospace;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--gold-accent);
  text-shadow: 0 0 16px rgba(245, 158, 11, 0.7);
  background: rgba(15, 23, 42, 0.85);
  padding: 2px 20px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  line-height: 1.1;
}

.stream-finale-score-badge {
  font-family: 'Cal Sans', var(--font-alt), sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #86efac;
  background: rgba(15, 23, 42, 0.85);
  padding: 6px 20px;
  border-radius: 9999px;
  border: 1px solid rgba(34, 197, 94, 0.5);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  text-transform: uppercase;
}

/* ===================================================
   MODE PODIUM STREAM
=================================================== */
.stream-full-podium {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
  z-index: 200;
}

.stream-full-podium.hidden {
  opacity: 0;
  pointer-events: none;
}

.stream-podium-card {
  background: rgba(11, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 30px 48px;
  width: 700px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.9);
}