/* Design neutre : noir, blanc, aucun arrondi. Police : Source Sans 3 */

* { box-sizing: border-box; border-radius: 0; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #fff;
  color: #000;
  font-family: "Source Sans 3", sans-serif;
  font-size: 16px;
}
button { font-family: inherit; }

/* ---------- Carte ---------- */
#carte {
  position: fixed;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
#carte.drag { cursor: grabbing; }

#monde {
  position: absolute;
  left: 0;
  top: 0;
  width: 4000px;
  height: 3000px;
  transform-origin: 0 0;
  will-change: transform;
}
#fond {
  display: block;
  pointer-events: none;
  user-select: none;
}

/* ---------- Icônes (deux images qui alternent au survol) ---------- */
/* --inv = 1 / zoom : les icônes gardent la même taille à l'écran */
.icone {
  position: absolute;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(var(--inv, 1));
  background: #fff;
  border: 1px solid #000;
  cursor: pointer;
}
.icone:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.icone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}
.icone img + img { display: none; }
.icone:hover img:first-child,
.icone:focus-visible img:first-child { display: none; }
.icone:hover img + img,
.icone:focus-visible img + img { display: block; }

/* ---------- Outils ---------- */
#outils {
  position: fixed;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
}
#outils button,
.barre button {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  font-size: 16px;
  cursor: pointer;
}
#outils button { width: 36px; height: 36px; margin-bottom: -1px; font-size: 20px; }
#outils button:hover,
.barre button:hover { background: #000; color: #fff; }

#coords {
  position: fixed;
  left: 12px;
  bottom: 12px;
  padding: 2px 6px;
  background: #fff;
  border: 1px solid #000;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Fenêtres ---------- */
.voile {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  background: rgba(255, 255, 255, .85);
}
.voile[hidden] { display: none; }

.panneau {
  width: 100%;
  height: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid #000;
}
#info .panneau { max-width: 800px; }

.barre {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-bottom: 1px solid #000;
}
.barre h2 { flex: 1; margin: 0; font-size: 16px; font-weight: 600; }
.barre button { padding: 4px 12px; }

#cadre { flex: 1; width: 100%; border: 0; background: #fff; }

/* ---------- Fenêtre d'information ---------- */
.contenu { flex: 1; overflow: auto; padding: 24px 28px 40px; font-size: 18px; line-height: 1.5; }
.contenu p { margin: 0 0 1em; }
.contenu h3 { margin: 1.6em 0 .6em; padding-top: .6em; border-top: 1px solid #000; font-size: 18px; font-weight: 600; }
.contenu ol { margin: 0; padding: 0; list-style: none; }
.contenu li { padding: 6px 0; border-bottom: 1px solid #000; }
.contenu li button {
  padding: 0;
  background: none;
  border: 0;
  color: #000;
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.contenu li button:hover { background: #000; color: #fff; text-decoration: none; }
