html,
body {
  overflow: hidden;
  touch-action: none;
}

:root {
  --app-vh: 100svh;
}

/* En PWA (installée) on force 100vh (plein écran réel, pas de bande blanche) */
@media (display-mode: standalone),
(display-mode: fullscreen) {
  :root {
    --app-vh: 100vh;
  }
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background: url('../img/Teemew_Login_Screen.png') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--app-vh);
  color: white;

  /* Évite certains scrolls involontaires */
}

.webgl-content * {
  border: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.webgl-content {
  position: fixed;
  /* top/right/bottom/left: 0 */
  inset: 0;
  width: 100vw;
  height: var(--app-vh);
  z-index: 1;
}

.webgl-content * {
  border: 0;
  margin: 0;
  padding: 0;
}

.webgl-content .logo {
  position: absolute;
  right: 15%;
  top: 28%;
  transform: rotate(0deg);
  width: 66%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo img {
  width: 100%;
  height: auto;
  opacity: 0.85;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  transition: all 0.3s ease;
}


.progress {
  position: absolute;
  right: 15%;
  top: 28%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

.webgl-content .progress {
  transform: rotate(0deg);
  border-radius: 15px;
  height: 20px;
  width: 66%;
  margin-top: 13%;

  background-color: rgba(112, 112, 112, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border-radius: 15px;
  overflow: hidden;
}

.webgl-content .progress .full {
  width: 0%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  transition: width 0.2s ease;
}

#unity-canvas {
  width: 100%;
  height: 100%;
}

#unity-container {
  width: 100%;
  height: 100%;
}

.hidden {
  display: none !important;
}

.sso-spinner {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9999;
}

.sso-spinner .spinner,
.sso-spinner p {
  margin: 0.5rem 0;
}

.sso-spinner .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.sso-spinner p {
  color: #fff;
  font: 500 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
