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

body {
    cursor: none; /* masque le curseur système */
}
#cursor {
  position: fixed;
  pointer-events: none; /* ne bloque pas les clics */
  transform: translate(-50%, -50%);
  z-index: 10000;
}

body {
  overflow: hidden;
}

#container {
  overflow: hidden;
  position: fixed;
  inset: 5px; /* marge autour de l'écran */
}

/* Le wrapper qui bouge */
#viewport {
  position: absolute;
  will-change: transform;
  transition: transform 0.4s ease-out;
}

#content {
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none; /* évite de bloquer les clics des hotspots */
}

/* HOTSPOTS */
.hotspot {
  position: absolute;
  width: 40px;
  height: 40px;
  background: rgba(255,0,0,0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  border: 2px solid white;
}
.hotspot:hover {
  background: yellow;
}
.hotspot-img {
    position: absolute;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
}

.hotspot-img:hover {
    transform: translate(-50%, -50%) scale(1.2);
    transition: 0.2s;
}

.layer {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.layer.hidden {
  opacity: 0;
  pointer-events: none;
}

#controls {
  position: fixed;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 10px;
  z-index: 999;
}

#controls button {
  padding: 8px 14px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 6px;
}
#timeline {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 2000;
    backdrop-filter: blur(5px);
}



    


/* Grimoire fixe en haut à droite */
#grimoire {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 120px;         /* taille du livre */
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.25s ease;
}

#grimoire:hover {
    transform: scale(1.12);   /* agrandissement au survol */
}











.burger {
position: fixed;
top: 50px;
left: 50px;
width: 40px;
height: 40px;
z-index: 1000;
  transition: transform 0.2s;
}

.burger:hover {
  transform: scale(1.2);
}

.burger span {
display: block;
height: 4px;
background: #000000;
margin-bottom: 5px;
border-radius: 2px;
transition: 0.3s;
}



/* Menu */
.menu {
position: fixed;
top: 0;
left: -250px;
width: 250px;
height: 100vh;
background: #f5f5f5;
box-shadow: 2px 0 5px rgba(0,0,0,0.2);
padding: 100px 20px;
transition: 0.3s;
display: flex;
flex-direction: column;
gap: 20px;
}


.menu.open {
left: 0;
}


.menu a,
.menu button {
text-decoration: none;
background: #2c2929;
border: none;
padding: 12px 15px;
font-size: 16px;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(16, 15, 15, 0.575);
cursor: pointer;
transition: 0.2s;
color: rgb(255, 255, 255);
text-align: center;
}



.menu a:hover,
.menu button:hover {
transform: scale(1.05);
}



/* Fond gris derrière la popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 9000;
}

/* Le carré blanc */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;      /* largeur du carré */
    height: 550px;     /* hauteur du carré */
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    display: none;
    z-index: 10000;
    overflow: hidden;
}

/* L’iframe prend toute la boîte */
.popup iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Le grimoire reste bien visible */
#grimoire {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 120px;
    cursor: pointer;
    z-index: 11000; /* AU-DESSUS DE TOUT */
}