@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@200;800&display=swap");

/* Reset global */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Barlow', sans-serif;
  background: white;
  overflow: hidden;
}

/* Canvas Unity */
.main {
  display: grid;
  align-items: center;
  justify-items: center;
  height: 100%;
  width: 100%;
}

.canvasContainer {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1; /* canvas derrière overlays */
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==================================================
   Fullscreen button (top right)
   ================================================== */
.fullscreenButton {
  position: absolute;
  top: 16px;
  right: 16px;
  border-radius: 50%;
  border: solid 1px black;
  padding: 16px;
  background: white;
  cursor: pointer;
  transition: 0.2s;
  z-index: 10;
}

.fullscreenButton:hover {
  transform: scale(1.1);
}

.fullscreenButton img {
  display: block;
  height: 24px;
  width: 24px;
}

/* ==================================================
   Overlay fullscreen avant lancement Unity
   ================================================== */
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto; /* actif tant que bouton visible */
}

/* Bouton rond fullscreen */
.fullscreen-button {
  background: white; /* rond blanc */
  border: none;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.fullscreen-button:hover {
  transform: scale(1.1);
}

.fullscreen-button img {
  width: 50px;
  height: 50px;
}

/* Texte sous le bouton fullscreen */
.fullscreen-text {
  color: black;
  font-size: 1.2rem;
  text-align: center;
  max-width: 80%;
  margin-top: 24px;
}

/* ==================================================
   Overlay loader Unity
   ================================================== */
.overlay-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* Unity reçoit les clics dès que overlay masqué */
}

.overlay-loader img {
  max-width: 200px;
  height: auto;
}

#progressBarContainer {
  width: 256px;
  height: 20px;
  background-color: #f3f3f3;
  border-radius: 20px;
  overflow: hidden;
  margin-top: 32px;
}

#progressBarFill {
  background-color: #2b2b2b;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  transition: width 0.4s ease-in-out;
}
