:root {
  --fond: #120a1c;
  --violet: #2a1540;
  --orange: #ff8a1f;
  --orange-fonce: #b84a00;
  --texte: #f3e9ff;
  --texte-fonce: #2a1540;

  /* Pour changer de police : modifie ces deux lignes */
  --police-titre: "Redaction 35", serif;
  --police-texte: "Outfit", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police-texte);
  text-align: center;
}

header { padding: 1.5rem 1rem 0.5rem; }

h1 {
  font-family: var(--police-titre);
  font-weight: normal;
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: 1px;
  margin: 0;
  color: var(--orange);
  text-shadow: 0 0 18px rgba(255, 138, 31, 0.5);
}

/* ---- Paragraphe d'introduction ---- */
.intro {
  max-width: 650px;          /* largeur du rectangle */
  position: relative;
  margin: 1rem auto;
  padding: 1rem 1.25rem;
  text-align: justify;
  hyphens: auto;
  font-size: 15px;           /* taille du texte */
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 138, 31, 0.4);
  border-radius: 10px;
  padding-right: 2.4rem;

}
#fermer-intro {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 26px;
  height: 26px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--texte);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

#fermer-intro:hover,
#fermer-intro:focus-visible {
  opacity: 1;
  background: rgba(255, 138, 31, 0.3);
  outline: none;
}

#btn-placement {
  background: var(--violet);
  color: var(--texte);
  border: 1px solid var(--orange);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-family: inherit;
  cursor: pointer;
}

#coords { min-height: 1.5em; color: var(--orange); }

a { color: var(--orange); }
a:hover { color: #fff; }

/* ---- La carte ---- */
#carte {
  position: relative;
  width: min(100%, 1100px);
  margin: 1rem auto;
  border: 2px solid var(--violet);
  border-radius: 10px;
  overflow: visible;
  background: radial-gradient(circle at 50% 40%, #3b1d5c, #120a1c);
}

#carte.sans-image { aspect-ratio: 16 / 9; }

#fond {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ---- Les points ---- */
.point {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--orange);
  cursor: pointer;
  padding: 0;
}

.point:hover,
.point:focus-visible {
  background: #fff;
  outline: none;
  box-shadow: 0 0 14px 4px var(--orange);
}

/* ---- L'infobulle ---- */
#infobulle {
  --taille-item: 100px;
  position: absolute;
  z-index: 10;
  width: 470px;
  max-width: 100%;
  max-height: 90%;
  overflow-y: auto;
  padding: 0.8rem;
  text-align: left;
  background: #f4eef9;
  color: var(--texte-fonce);
  border: 2px solid var(--orange);
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

#infobulle h2 {
  margin: 0 0 0.3rem;
  font-family: var(--police-titre);
  font-weight: normal;
  font-size: 1.6rem;
  color: var(--orange-fonce);
}

#infobulle .infos { margin: 0 0 0.5rem; font-size: 0.85rem; }

#infobulle ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--taille-item));
  gap: 8px;
}

#infobulle li {
  position: relative;
  width: var(--taille-item);
  height: var(--taille-item);
  background: #d9d0e4;
  border: 1px solid rgba(42, 21, 64, 0.15);
  border-radius: 8px;
  overflow: hidden;
}

#infobulle li img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Le nom apparaît au survol, en bandeau sur le bas de l'image */
#infobulle li span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.25rem;
  background: rgba(42, 21, 64, 0.92);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1.15;
  text-align: center;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

#infobulle li:hover span { opacity: 1; }

/* Objet dont l'image est manquante : on affiche son nom en permanence */
#infobulle li.sans-image {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--orange-fonce);
}

#infobulle li.sans-image span {
  position: static;
  opacity: 1;
  background: none;
  color: var(--texte-fonce);
}

footer { padding: 1rem; font-size: 0.8rem; opacity: 0.6; }