body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  background: #0d0d0d;
  color: white;
  font-family: sans-serif;
}

#container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ---- CONTROLES ---- */
#controls {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #111;
  border-top: 1px solid #333;
  flex-shrink: 0;
  z-index: 20;
}

button {
  background: #222;
  color: white;
  border: 1px solid #444;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
}

button:hover {
  background: #333;
}

/* ---- VIEWER ---- */
#viewer {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: black;
}

/* ---- WRAPPER DE LA PAGE ---- */
.page-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ---- IMAGE (Centrée absolument) ---- */
#pageImage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ---- CONTENEUR DES HOTSPOTS ---- */
#hotspots {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  /* Les dimensions exactes (top, left, width, height) seront injectées par script.js */
}

/* ---- HOTSPOTS INDIVIDUELS ---- */
.hotspot {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
}

.hotspot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("icons/cliquez-sur.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform .15s ease, filter .15s ease;
}

.hotspot:hover::before {
  transform: scale(1.08);
  filter: drop-shadow(0 0 6px rgba(255,255,255,.5));
}

/* ---- MODE JOUR ---- */
body.day {
  background: #f2f2f2;
  color: black;
}

body.day #controls {
  background: #ddd;
  border-top: 1px solid #999;
}

body.day button {
  background: #ccc;
  color: black;
}

body.day #viewer {
  background: #eaeaea;
}

/* ---- ANIMATIONS ---- */
.page-transition-enter {
  opacity: 0;
  transform: translate(-50%, -50%) translateX(40px); /* Intégration du centrage obligatoire */
  transition: opacity .4s ease, transform .4s ease;
}

.page-transition-enter-active {
  opacity: 1;
  transform: translate(-50%, -50%) translateX(0);
}

.page-transition-exit {
  opacity: 1;
  transform: translate(-50%, -50%) translateX(0);
}

.page-transition-exit-active {
  opacity: 0;
  transform: translate(-50%, -50%) translateX(-40px);
  transition: opacity .4s ease, transform .4s ease;
}

#posInfo {
  position: absolute;
  bottom: 90px;
  left: 20px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.8);
  color: #00ff00;
  font-size: 14px;
  font-family: monospace;
  border-radius: 4px;
  display: none;
  z-index: 9999;
}