/* ///////////////////////////////////////////// */
/* Style général */
:root {
  --text-color: #eef1ef;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  margin: 0;
  padding: 0;
  height: 100%; /* Permet d'utiliser toute la hauteur de la fenêtre */
}
body {
  background-color: #0c0910;
  color: var(--text-color);
  touch-action: none;
  font-family: "Trispace", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  line-height: 1.6;

  height: 100%;
}
.page-wrapper {
  padding-top: env(safe-area-inset-top, 10px);
  padding-bottom: env(safe-area-inset-bottom, 10px);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-wrapper {
  padding-top: calc(env(safe-area-inset-top, 10px) + 40px);
  padding-bottom: calc(env(safe-area-inset-bottom, 10px) +10px);
}

.content {
  flex: 1; /* pousse le footer en bas si le contenu est court */
}

footer {
  padding: 20px;
  text-align: center;
}
h2 {
  font-family: "Trispace", sans-serif;
  font-optical-sizing: auto;
  text-transform: uppercase;
  font-weight: 500;
}
a {
  text-decoration: none;
  color: var(--text-color);
}
.nav-item a {
  text-decoration: none;
  color: #0c0910;
}
.home_wrapper {
  display: flex;
  justify-content: center;
}

/* ///////////////////////////////////////////// */
/* Style page d'accueil */
.border_s {
  border: #23ce6b solid 2px;
  border-radius: 20px;
  margin: 5px 0;
  padding: 0 10px;
}
.border_s a {
  margin: 0;
  text-decoration: none;
  color: var(--text-color);
}
.border_l {
  width: 100%;
  height: auto;
  border: #23ce6b solid 2px;
  border-radius: 20px;
  margin: 5px 0;
  padding: 0 10px;
}

/* ///////////////////////////////////////////// */
/* home_view */

/* ///////////////////////////////////////////// */
/* Style wks.1 */

.workshop {
  display: flex;
  flex-direction: column;
  border: #23ce6b solid 15px;
  border-radius: 3rem;
  align-items: center;
  padding: 0;
  width: 100%;
  height: 90vh;
  overflow: hidden;
}
.floor-1 {
  background-color: #ec058e;
}
.loudspeak {
  height: 50px;
}
#custom-volume-icon {
  font-size: 2.5rem !important;
  color: #eef1ef !important;
}
.navbar-toggler-wrapper {
  width: 100%;
}
.navbar-toggler {
  border: none;
  outline: none;
  box-shadow: none;
}
.navbar-toggler:focus,
.navbar-toggler:active {
  border: none;
  outline: none;
  box-shadow: none;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 30 30'%3E%3Cpath stroke='white' stroke-width='4' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
#navbarMenu {
  position: absolute;
  top: 100%; /* juste sous le bouton */
  right: 0;
  background-color: #eef1ef;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  z-index: 1000;
  min-width: 200px;
  white-space: nowrap;
  padding: 10px;
}
.floor-2 {
  padding: 10px;
}
#avatar {
  height: 80px;
  width: 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* espace régulier entre image, badge et bouton */
  align-items: center;
  overflow: hidden;
  border: #ec058e solid 2px;
  border-radius: 0.8rem;
}
#avatar img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  padding: 5px;
}
.id {
  gap: 0.5rem;
}
.pseudo {
  display: flex;
  justify-content: center;
  text-align: center;
  font-size: 0.6rem;
  font-weight: bold;
  padding: 1px;
  border: #23ce6b solid 2px;
  border-radius: 0.5rem;
}
.gear {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding: 2px;
  background-color: #23ce6b;
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
}
.kilo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.6rem;
  padding: 2px;
  border: #23ce6b solid 2px;
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}
.arrow {
  display: flex;
  font-size: 1rem;
  justify-content: center;
  align-items: center;
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
  background-color: #23ce6b;
}
.arrow:hover {
  display: flex;
  font-size: 1rem;
  justify-content: center;
  align-items: center;
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
  background-color: #2bf47f;
}
.bi-caret-right-fill {
  font-size: 2rem;
  font-weight: bolder;
  color: #0c0910;
}
.askletter {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 2rem;
  border: #23ce6b solid 2px;
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}
.ask-letter-char {
  font-family: "Roboto", sans-serif; /* ou une autre police ludique que tu utilises */
  font-size: 2rem;
  color: #eef1ef;
  display: inline-block;
  text-align: center;
}

.floor-3 {
  margin-top: 5px;
}
/* caisson.css */

#caisson-expedition {
  width: 40%;
}
#caisson-dropzone {
  width: 50%;
  height: 100%;
}

#caisson-expedition.caisson-pop {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}
#caisson-expedition {
  transition: transform 0.3s ease;
}

#caisson-dropzone.highlight + #caisson-expedition {
  transform: scale(1.05);
}

/* treadmill.css */

.treadmill-track {
  display: flex;
  gap: 1rem;
  overflow: hidden;
  width: 100%;
  position: relative;
  height: 120px;
}
.treadmill-letter {
  width: 100px;
  height: auto;
  flex-shrink: 0;
  user-select: none;
  touch-action: none;
  cursor: grab;
}
.level_stage {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 0.8rem;
  font-family: "Roboto" sans-serif;
  font-weight: bold;
  color: #23ce6b;
  border: #ec058e solid 2px;
  border-radius: 5px;
  padding: 4px 10px;
}
.treadmill-button-wrapper {
  width: 3rem;
  height: 3rem;
  position: relative;
}

.treadmill-icon {
  font-size: 2.5rem;
  color: #23ce6b;
  cursor: pointer;
  transition: transform 0.1s ease, color 0.2s;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.treadmill-icon:active {
  transform: translate(-50%, -50%) scale(0.9);
}

.fa-circle-play,
.fa-circle-pause {
  color: #23ce6b;
  font-size: 2rem;
}
.score-display {
  display: flex;
  justify-content: center;
  text-align: center;
  font-family: "Roboto" sans-serif;
  font-weight: bold;
  color: #23ce6b;
}
#treadmill-timer {
  padding: 4px 10px;
  border-radius: 6px;
  border: 2px solid #ec058e;
}
.time {
  font-family: monospace;
  font-weight: bold;
  font-size: 1rem;
  color: #ec058e;
}
/* ///////////////////////////////////////////// */
#countdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
#countdown-overlay.countdown-hidden {
  display: none;
}
/* ///////////////////////////////////////////// */
/* Avatar-gallery */
.avatar {
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.avatar img {
  max-height: 120px;
  object-fit: contain;
  width: 70%;
  padding: 1rem;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border: 2px solid #ec058e;
}
.select-avatar {
  background-color: #ec058e;
  width: 70%;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  border: none;
}
.fa-download {
  padding: 2px;
  color: #0c0910;
  font-size: 1.5rem;
}
.fa-download.selected {
  color: #4fef91 !important;
}

@keyframes shake {
  0% {
    transform: translate(0);
  }
  25% {
    transform: translate(-2px, 2px);
  }
  50% {
    transform: translate(2px, -2px);
  }
  75% {
    transform: translate(-2px, 2px);
  }
  100% {
    transform: translate(0);
  }
}

.shake {
  animation: shake 0.2s ease-in-out;
}

/* ///////////////////////////////////////////// */
/* toasts couleurs */
.bg-success {
  background-color: #4fef91 !important;
  color: #0c0910 !important;
}
.bg-success .btn-close {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000000' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 2.5l11 11m0-11l-11 11' stroke='%23000000' stroke-width='2'/%3E%3C/svg%3E");
  opacity: 1;
}

.bg-info {
  background-color: #79188f !important;
}

/* ///////////////////////////////////////////// */
#mention-footer {
  font-size: 0.5rem;
}
/* ///////////////////////////////////////////// */
/*media queries*/

@media (orientation: portrait) {
  #game-container {
    height: 100vh; /* Si l'écran est en portrait, on occupe toute la hauteur */
  }
}

@media (orientation: landscape) {
  #game-container {
    height: 100vh; /* Si l'écran est en paysage, on occupe aussi toute la hauteur */
  }
}

/* Tablet and up */
@media (min-width: 768px) {
  body {
    font-size: 18px;
    padding: 2rem;
  }
  #caisson-expedition {
    width: 20%;
  }
  .pseudo,
  .kilo {
    font-size: 0.6rem;
    font-weight: bold;
  }
  #avatar {
    padding: 0.5rem;
  }
}

/* Desktop and up */
@media (min-width: 1024px) {
  body {
    font-size: 1rem;
    padding: 3rem;
  }
  .pseudo,
  .kilo {
    font-size: 1rem;
    font-weight: bold;
  }
  .arrow,
  .gear {
    font-size: 1.5rem;
  }
  #caisson-expedition {
    width: 15%;
  }
  .treadmill-track {
    display: flex;
    gap: 0.8rem;
    overflow: hidden;
    width: 70%;
    position: relative;
    height: 120px;
    border-radius: 2rem;
    border: #23ce6b solid 2px;
  }
  #avatar {
    padding: 0.5rem;
  }
}
/* Mobile */
@media (max-width: 576px) {
  /* avatars */
  #avatar {
    padding: 0.5rem;
  }
  .avatar {
    height: 160px;
    padding: 0.5rem;
  }

  .avatar img {
    max-height: 80px;
  }
  #avatar img {
    max-height: 80px;
  }

  .badge {
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
  }
}
