* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: #000;
  overflow: hidden;
}

/* Hidden panel for beamer projection */
.hidden-panel {
  display: none !important;
}

/* Floating title overlay */
.title-overlay {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  text-align: center;
}

.title-overlay h1 {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  margin: 0;
}

.title-overlay .subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  font-weight: 400;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  margin-top: 5px;
}

/* Speed scale overlay (visible for beamer) */
.speed-overlay {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 15px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#video-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

#overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #fff;
  background: rgba(0,0,0,0.3);
  padding: 10px;
  border-radius: 6px;
  font-size: 16px;
  z-index: 10;
}

#start-btn, #wahoo-btn {
  margin-top: 10px;
  padding: 8px 12px;
  font-size: 16px;
  cursor: pointer;
}

#wahoo-status {
  margin-left: 10px;
  font-weight: bold;
  font-size: 16px;
}

/* Barre graduée */
#speed-scale {
  position: relative;
  width: 250px;
  height: 28px;
  pointer-events: none;
  display: flex;
}

.level {
  height: 100%;
  text-align: center;
  line-height: 24px;
  font-size: 12px;
  color: #fff;
  font-weight: bold;
  text-shadow: 0 0 4px rgba(0,0,0,0.7);
}

.level1 { background: rgba(0,255,0,0.5); width: 16.6%; }
.level2 { background: rgba(255,255,0,0.5); width: 25%; }
.level3 { background: rgba(255,0,0,0.5); width: 58.4%; }

/* Flèche */
#arrow {
  position: absolute;
  top: 0;
  font-size: 26px;
  font-weight: bold;
  color: #00ffff;
  text-shadow: 0 0 6px rgba(0,255,255,1),0 0 12px rgba(255,255,255,0.8);
  transition: left 0.3s ease-out;
  animation: pulse 1.2s ease-in-out infinite;
  transform: rotate(180deg);
}

@keyframes pulse {
  0%,100% { transform: rotate(180deg) translateY(0); }
  50% { transform: rotate(180deg) translateY(2px); }
}

/* Simulation container */
#sim-container {
  margin-top: 10px;
  padding: 8px;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(0, 255, 255, 0.3);
}

#sim-container label {
  display: block;
  margin-bottom: 6px;
  color: #00ffff;
  font-size: 14px;
}

#sim-slider {
  width: 100%;
  cursor: pointer;
}

#sim-value {
  font-weight: bold;
}
