/* Définir les variables CSS globales */
:root {
  --primary-color-rgb: 0, 123, 255;
  --background-color: #fff;
  --background-image: none;
  --primary-color: #007bff;
  --primary-background-color: #007bff;
  --primary-hover-color: #0056b3;
  --primary-hover-background-color: #0056b3;
}

/* Style pour le body */
body {
  background-color: var(--background-color);
  background-image: var(--background-image);
}

.text-primary {
  color: var(--primary-background-color) !important;
}

.btn-primary,
#LiveQuestions .btn-primary,
#LiveTestPersoQuestions .btn-primary,
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  color: var(--primary-color);
  border-color: var(--primary-background-color);
  background-color: var(--primary-background-color);
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus,
#LiveChatCpt {
  color: var(--primary-hover-color);
  border-color: var(--primary-hover-background-color);
  background-color: var(--primary-hover-background-color);
}

#LiveSocial > .nav {
  background-color: var(--primary-hover-background-color);
}

#LiveSocial .nav-link,
#LiveSocial .nav-link:hover {
  border: none;
  background: none;
  color: var(--primary-hover-color);
}

#LiveSocial .nav-link.active {
  background: var(--primary-background-color);
  color: var(--primary-color);
}

#ScoreboardInner .table-striped > tbody > tr:nth-of-type(odd) {
  --bs-table-accent-bg: var(--primary-background-color);
  color: var(--primary-color);
}

#ScoreboardInner .table-striped > tbody > tr:nth-of-type(even) {
  --bs-table-accent-bg: var(--primary-color);
  color: var(--primary-background-color);
}

/*--- GLOBAL ---*/
:root {
  --vh: 1vh;
}

body {
  background-size: cover;
  background-position: 50%;
}

a {
  text-decoration: none;
}

.mh100 {
  min-height: calc(var(--vh, 1vh) * 100);
}

.btn {
  box-shadow: none !important;
}

.card-shadow {
  box-shadow: 0 0 5rem rgba(0, 0, 0, 0.3);
}

.cadre-blanc {
  background: rgba(255, 255, 255, 0.85);
  padding: 20px 40px;
}
.card.disabled {
  background-color: #e9ecef;
  opacity: 0.8;
}

/*--- PUBLIC ---*/

#PublicLogin {
  display: grid;
  grid-template-rows: 1fr auto;
}

#PublicLoginInner > .card-shadow {
  max-width: 550px;
}

#PublicFooter {
  text-align: center;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  text-align: center;
  padding: 5px;
}

#Logo {
  max-width: 70vw;
  max-height: 10vh;
}

#ConnexionForm {
  max-width: 800px;
}

h1.title {
  text-align: center;
  text-transform: uppercase;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  margin: 10px 0;
}

h2.date {
  text-align: center;
  font-size: 1rem;
  font-weight: normal;
  margin: 10px 0;
}

.please-connect {
  text-align: center;
  color: #aaa;
}

#Scoreboard {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background-size: cover;
  background-position: 50%;
}

#ScoreboardInner {
  grid-column: 2/2;
}

#ScoreboardInner h1 {
  text-transform: uppercase;
  font-size: 4rem;
}

#ScoreboardInner .fs {
  font-size: 1.5rem;
  text-transform: uppercase;
}

#ScoreboardInner .fs sup {
  text-transform: lowercase;
}

#ScoreboardInner .line0 .fs {
  font-size: 3rem;
  font-weight: bold;
}

#ScoreboardInner .line1 .fs {
  font-size: 2rem;
  font-weight: bold;
}

#ScoreboardInner .line2 .fs {
  font-size: 1.75rem;
  font-weight: bold;
}

#Replay iframe,
#Replay video {
  width: 800px;
  height: 450px;
  max-width: 100%;
}

#Cadeau {
  width: 800px;
  max-width: 100%;
}

/*--- ADMIN ---*/

#AdminToolbar {
  background: #222;
  color: #fff;
  padding: 2px;
  text-align: center;
  font-size: 0.85rem;
}

#AdminToolbar a {
  color: yellow;
}

#AdminMenu {
  background: #444;
  color: #fff;
}

#AdminMenu a {
  display: inline-block;
  color: white;
  padding: 4px 12px;
}

#AdminMenu a.active {
  background-color: #666;
}

/*--- LIVE ---*/

#LiveOuter {
  display: grid;
  grid-template-rows: 1fr auto;
}

#Live {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

mux-player {
  /* --play-button: none; */
  --airplay-button: none;
  --seek-backward-button: none;
  --seek-forward-button: none;
  --captions-button: none;
  --airplay-button: none;
  --pip-button: none;
  --playback-rate-button: none;
  --time-range: none;
  --time-display: none;
  --duration-display: none;
  --rendition-menu-button: none;
  --live-button: none;
}

::part(bottom control-bar) {
  display: flex;
  align-items: center;
  height: 50px;
  margin-bottom: 10px;
  padding: 5px;
  padding-left: 20px;
  padding-right: 20px;
}

::part(mute) {
  transform: scale(1.8);
  transform-origin: center;
  margin-right: 10px;
}

::part(play) {
  transform: scale(1.5);
  transform-origin: center;
  margin-right: 15px;
}

::part(fullscreen) {
  transform: scale(1.5);
  transform-origin: center;
  margin-right: 5px;
}

/* /* Pour cibler des boutons spécifiques */

/* mux-player::part(volume) { */
/*   transform: scale(1.5); */
/*   transform-origin: center; */
/*   margin-left: 30px; */
/* } */
/**/
/* mux-player::part(mute) { */
/*   transform: scale(1.5); */
/*   transform-origin: center; */
/* } */
/**/
/* mux-player::part(fullscreen) { */
/*   transform: scale(1.5); */
/*   transform-origin: center; */
/*   margin-bottom: 10px; */
/* } */

#LiveVideo {
  grid-column: 1/3;
  background: #000;
  position: relative;
}

#LiveSocial {
  grid-column: 3/3;
  background: #fafafa;
}

@media (max-width: 567px) {
  #Live {
    grid-template-columns: auto;
    grid-template-rows: repeat(5, 1fr);
  }

  #LiveVideo {
    grid-column: 1;
    grid-row: 1/4;
  }

  #LiveSocial {
    grid-column: 1;
    grid-row: 4/6;
  }
}

#LiveVideo iframe,
#LiveVideo video {
  width: 100%;
  height: 100%;
}

#LiveVideo #LiveVideoPlayer {
  width: 100%;
  height: 100%;
  display: flex;
}

#LiveVideoPlayerError {
  position: absolute;
  height: 100%;
  width: 100%;
  display: flex;
  background: black;
}

#LiveSocial .nav-link {
  border: none;
  background: none;
}

#LiveSocialContent {
  flex: 1;
}

#LiveChat {
  flex: 1;
}

#LiveChatInner {
  padding: 10px;
}

#LiveChatCpt {
  font-size: 0.85rem;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 10px;
}

#LiveMessages {
  flex: 1 1 auto;
  overflow-y: auto;
  height: 0px;
}

#ProblemeTechnique {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  z-index: 1000;
  text-align: center;
  padding: 40px;
}

@media (max-width: 567px), (max-height: 500px) {
  #LiveSocial {
    font-size: 0.8rem;
  }
}

.chat-msg {
  padding: 2px;
}

.chat-msg > a.text-primary {
  display: none;
}

#Live.admin .chat-msg > a.text-primary {
  display: inline-block;
}

#LiveMessagesPin .chat-msg {
  border: 1px solid red;
  padding: 5px;
  background: #ffe;
  margin-bottom: 2px;
}

.chat-msg i {
  cursor: pointer;
}

#LiveChatInput {
  padding-top: 10px;
}

#LiveChatInput input {
  border-color: #ced4da !important;
  box-shadow: none !important;
}

#LiveReactions {
  display: flex;
  flex-direction: row;
  padding-top: 8px;
}

#my-camera {
  margin-left: auto !important;
  border: none;
  background: none;
  font-size: 1.5rem;
  color: gray;
}

#local-camera-container {
  position: absolute;
  border-radius: 15px;
  bottom: 5px;
  right: 5px;
  aspect-ratio: 4/3;
  width: 10vw;
  height: auto !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.local-camera {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  height: auto;
  border-radius: 15px;
}

#LiveReactions i,
i.reaction.fixed {
  font-size: 1.5rem;
  margin: 0 5px;
  transition: transform 0.1s ease-out;
}

i.reaction.fixed {
  pointer-events: none;
  margin: 0;
  position: fixed;
  animation: reaction 1s;
  animation-timing-function: ease-in-out;
  -webkit-animation-timing-function: ease-in-out;
}

#FondVertReactions i {
  position: absolute;
  transform: translateX(-50%) translateY(-50%);
  font-size: 5rem;
  animation: fvreaction 1s;
  animation-timing-function: ease-in-out;
  -webkit-animation-timing-function: ease-in-out;
}

#LiveReactions i:hover {
  cursor: pointer;
  transform: scale(1.25);
}

#LiveReactions i.fa-thumbs-up,
#FondVertReactions i.fa-thumbs-up,
i.fa-thumbs-up.reaction.fixed {
  color: rgb(22, 85, 227);
}

#LiveReactions i.fa-heart,
#FondVertReactions i.fa-heart,
i.fa-heart.reaction.fixed {
  color: rgb(227, 22, 60);
}

#LiveReactions i.fa-face-grin-squint-tears,
#FondVertReactions i.fa-face-grin-squint-tears,
i.fa-face-grin-squint-tears.reaction.fixed {
  color: rgb(49, 0, 199);
}

#LiveReactions i.fa-hands-clapping,
#FondVertReactions i.fa-hands-clapping,
i.fa-hands-clapping.reaction.fixed {
  color: rgb(199, 138, 0);
}

#LiveReactions i.fa-video,
#FondVertReactions i.fa-video,
i.fa-video.reaction.fixed {
  color: rgb(0, 138, 0);
}

@keyframes reaction {
  0% {
    opacity: 1;
  }
  100% {
    transform: translateY(-30vh);
    opacity: 0;
  }
}

@keyframes fvreaction {
  0% {
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
}

.live-reponse-container {
  display: inline-block;
}

.live-reponse-container + .live-reponse-container {
  margin-left: 20px;
}

#LiveTestPersoQuestions .live-reponse-container {
  display: block;
  margin: 20px 0 0;
}

@media (max-width: 767px) {
  .live-reponse-container {
    display: block;
  }

  .live-reponse-container + .live-reponse-container {
    margin: 10px 0 0;
  }
}

#LiveNuage {
  flex: 1 1 auto;
}

#LiveFooter {
  background: #444;
  color: #fff;
  text-align: center;
  padding: 4px;
  font-size: 0.85rem;
}

#LiveFooter a {
  color: yellow;
}

/*--- GESTION ---*/

#UtilisateursImport {
  padding: 10px;
  background: #eaeaea;
}

.question {
  border-left: 10px solid #444;
}

.question .visible-1 {
  display: none;
}

.question.visible {
  border-left-color: #4ad54a;
}

.question.visible .visible-0 {
  display: none;
}

.question.visible .visible-1 {
  display: inline-block;
}

.question-jauge {
  display: inline-block;
  width: 200px;
  border-radius: 4px;
  overflow: hidden;
  height: 10px;
  background: #ccc;
  position: relative;
}

.question-jauge-inner {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  display: block;
  background: #444;
}

#ReactionStats {
  width: 100%;
  height: 600px;
}

/*--- AFFICHAGE LED ---*/

#LedPreview {
  border: 1px solid #000;
  height: 50vh;
  aspect-ratio: 16/9;
  position: relative;
  background-size: cover;
  background-position: 50%;
}

#LedPreview.portrait {
  aspect-ratio: 9/16;
}

#LedPreview #LedInner {
  border: 2px solid #2ccd2c;
}

#LedInner {
  position: absolute;
}

#LedOuter {
  position: relative;
  background-size: cover;
  background-position: 50%;
}

#FondVertInformation .info {
  width: 100%;
  padding: 30px;
  font-size: 3.5rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  margin-bottom: 30px;
  text-align: center;
}

/*--- NUAGE DE MOTS ---*/

#NuageMots {
  padding: 2vh;
}

#NuageMots text {
  transition: all 0.2s ease-out;
  animation: word 1s;
}

/* ------- PRISE DE PAROLE ------ */

#duplex-container {
  display: flex;
  flex-direction: row;
}

#duplex-user-container {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#duplex-remote-container {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.camera-container {
  border-radius: 15px;
  aspect-ratio: 4/3;

  width: 50%;
  height: auto !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 10;
  background: #000;
}

.local-video-component {
  display: flex;
  height: 100%;
  width: 100%;
  border-radius: 10px;
}

.camera-player {
  height: 100%;
  width: 100%;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.camera-player video {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
}

/* Notification Manager */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.notification {
  margin-bottom: 15px;
  min-width: 300px;
  max-width: 400px;
  transform: translateX(110%);
  transition:
    transform 0.3s ease-out,
    box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  overflow: hidden;
  font-size: 1.1rem;
  padding: 15px 20px;
}

.notification.show {
  transform: translateX(0);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.notification .btn-close {
  font-size: 0.9rem;
  padding: 0.6rem;
  margin: -0.6rem -0.6rem -0.6rem auto;
}

.notification.alert-info {
  border-left: 5px solid #0dcaf0;
}

.notification.alert-danger {
  border-left: 5px solid #dc3545;
}

.notification.alert-warning {
  border-left: 5px solid #ffc107;
}

.notification.alert-success {
  border-left: 5px solid #198754;
}

.video-container:has(.speaking) {
  box-shadow: 0 0 0 6px #4caf50 !important;
}

.speaking {
  box-shadow: 0 0 0 3px #4caf50 !important;
}

#LiveQuiz .modal-body {
  padding: 0px;
}

/* Animation d'entrée */
@keyframes slideIn {
  from {
    transform: translateX(110%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification.show {
  animation: slideIn 0.3s forwards;
}

@keyframes word {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
