#zoom-buttons {
      position: absolute;
      top: 150px;
      right: 10px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      z-index: 1000;
    }
#info-button{
    top: 10px;
      right: 10px;
    position: fixed; /* au lieu de absolute */
      display: flex;
      flex-direction: column;
      z-index: 1000;
}
#zoom-out span {
    transform: translateY(-2.5px);
}
.pan-image img {
  display:block;
  width:100%;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
    #zoom-buttons button, #info-button {
    width: 60px;
  height: 60px;
  font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    font-family: var(--font--sans);
    border-radius: 50%;
    background: var(--color1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease-in-out;
    border: 3px solid white;
    }

    #zoom-buttons button:hover,#info-button button:hover,  #info-button:hover, #toggle-panel-button:hover  {
    color: var(--color1);
    background: var(--color2);
    border: 4px solid var(--color2);
    }




/* 3.  Conteneur principal -------------------------- */
.app-wrapper {
  position:fixed;      /* occupe tout l’écran */
  inset:0;
  overflow:hidden;
  touch-action:none;   /* pour que Hammer.js capte tous les gestes */
}

/* 4.  Image pannable/zoomable ---------------------- */
.pan-image {
  position:absolute;
  top:0; left:0;
  /* taille réelle mise en JS (width / height) */
  transform-origin: 0 0;
  transition: transform .35s cubic-bezier(0,0,0,1);
  will-change: transform;
    cursor: grab;          /* standards */
  cursor: -webkit-grab;  /* Safari / vieux Chrome */
}


/* quand on est en train de draguer (grabbing) */
.pan-image.grabbing,
.pan-image:active{        /* fallback sans JS */
  cursor: grabbing;
  cursor: -webkit-grabbing;
}


.pan-image img { display:block; width:100%; }

/* Supprimer totalement l’encadrement (pseudo‑éléments) */
.pan-image::before,
.pan-image::after { content:none; }


/* 6. (Optionnel) Points d’annotation --------------- */
.annotation-point{
  position:absolute;
  width:6rem; height:6rem;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:var(--color1);
  /* border:2px solid #000; */
  cursor:pointer;
  z-index:1000;
}
.annotation-point:hover{
  transform:translate(-50%,-50%) scale(1.25);
	background: var(--color2);
}

.map-tooltip{
  position:fixed;
  z-index:2000;
  max-width:220px;
  padding:6px 10px;
  border-radius:6px;
  background:var(--color1);
  color:#fff;
  pointer-events:none;
  transform:translateX(-50%);   /* centre sur la pastille */
  box-shadow:0 2px 6px rgba(0,0,0,.35);
}

/* ----- panneau de 32 numéros ----- */
/* ---------- panneau latéral ---------- */
.number-panel{
  position:fixed;
  top:4rem;                
  left:10px;
  width:24rem;              
  max-height:calc(92vh - 4rem);
  padding:1rem .75rem;
  background:var(--color1);
  color:#fff;
  overflow-y:auto;
  z-index:1200;
	border-radius:40px;

}

.grid-item:hover {
  background: var(--color2);
  color: black;
}
/* ---------- grille 2 colonnes x 16 lignes ---------- */
.number-grid{
  display:grid;
  /* grid-auto-flow:column;            */
  /* grid-template-rows:repeat(16, auto); */
  gap:.6rem;                    /* espace vertical / horizontal */
  list-style:none;
  margin:0;
  padding:0;
    grid-template-columns: 1fr; /* ✅ une seule colonne */
  
}

/* ---------- chaque ligne ---------- */
.number-grid li{
  display:flex;                      /* numéro + texte côte à côte */
  /* align-items:center; */
  gap:1.5rem;
  cursor:pointer;
  user-select:none;
  line-height:1.4rem;
}

/* numéro */
.number-grid .num{
  width:2rem;                        
  text-align:center;
  font-weight:700;
  border-radius: 50%;
  /* background:white;
  color:var(--color1); */
  transition:background .2s;
}

  .number-grid li {
    flex: 0 0 auto;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    
    min-width: 140px;
  }
/* texte */
.number-grid .txt{
  flex:1;                           
    white-space: normal;        
  overflow-wrap: break-word;  
}

/* survol = met le numéro en jaune + souligne le texte */
.number-grid li:hover .num{
  /* background:#ffdb05; */
  color:#000;
}


/* (facultatif) cacher le panneau sur petits écrans */
@media (max-width:600px){
  .number-panel{display:none;}
}




.grid-item.flash{
  background-color: #ffdb05;
  color: black;
}

/* couche sombre pleine page */
.map-popup{
  position:fixed; inset:0;
  background: var(--color3);
  display:flex;               /* centre la boîte */
  align-items:center;
  justify-content:center;
  z-index:3000
}

/* le contenu */
.popup-inner{
  max-width:60rem;
  width:90%;
  background:#fff;
  padding:1.5rem 2rem;
  border-radius:8px;
  box-shadow:0 4px 16px rgba(0,0,0,.35);
  position:relative;
  font-family:var(--font--sans, sans-serif);
}

.popup-close{
  position:absolute; top:8px; right:12px;
  border:none; background:none;
  font-size:1.8rem; line-height:1;
  cursor:pointer;
}

/* -------- bouton “?” (même gabarit que + / −) -------- */



/* -------- pop‑up -------- */
.popup{
  position:fixed;inset:0;     /* plein écran */
  background: var(--color3);
  display:none;place-items:center;
  z-index:4000;
}

.popup[aria-hidden="false"]{ display:grid; } /* visible */

.popup-box{
  background:#fff;color:#111;
  max-width:60rem;
  padding:2rem 2.5rem;
  border-radius:12px;
  box-shadow:0 10px 40px rgba(0,0,0,.25);
  position:relative;
  font-family:system-ui,sans-serif;
}

.popup-box h2{
  margin:0 0 0.75rem;font-size:1.6rem;
	text-transform: uppercase;
	text-align: center;
}

.popup-box .close{
  position:absolute;top:0.5rem;right:0.75rem;
  background:none;border:none;font-size:1.75rem;
  line-height:1;cursor:pointer;color:#666;
}
.popup-box .close:hover{ color:#000; }

/* Style cohérent avec + / − / ? */
#toggle-panel-button {
  position: fixed;
  top: 10px;
  left: 10px;
  width: 60px;
  height: 60px;
  font-size: 32px;
  font-weight: bold;
  color: white;
  background: var(--color1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 3px solid white;
  z-index: 1201;
  transition: all 0.3s ease;
}



/* Masquer le panneau et les pastilles par défaut — via opacity/visibility
   (et non display) pour permettre le fondu, synchronisé avec la carte (0.6s) */
.number-panel,
.annotation-point {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

/* Quand actif, on affiche tout en fondu */
body.panel-visible .number-panel,
body.panel-visible .annotation-point {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0s linear 0s;
}
.annotation-point.hovered {
  transform: translate(-50%, -50%) scale(1.25);
  box-shadow: 0 0 0 4px var(--color2);
  background: var(--color2);
}

/* ---------- Popup style "carte couleur" façon Parity ---------- */
.map-popup .popup-inner {
  max-width: 900px;
  width: 90%;
  background: fff);
  border-radius: 4px;
  padding: 2.5rem;
  display: flex;
  gap: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
  position: relative;
  color: black;
}

.map-popup .popup-text {
  flex: 1;
  min-width: 0;
}

.map-popup .popup-text h2 {
  font-size: 1.6rem;
  margin: 0 0 1rem;
}

.map-popup .popup-text #popup-content {
  font-size: 1rem;
  line-height: 1.5;
}

.map-popup .popup-image-frame {
  flex-shrink: 0;
  width: 280px;
  background: #fff;
  padding: 0.5rem;
  position: relative;
}

.map-popup .popup-image-frame img#popup-main-image {
  width: 100%;
  display: block;
  object-fit: cover;
}

.popup-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: none;
  color: #111;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.popup-gallery-arrow:hover {
  color: var(--color1);
}

.popup-gallery-prev { left: 0px; top:100%; }
.popup-gallery-next { right: 0px; top:100%; }

@media (max-width: 700px) {
  .map-popup .popup-inner {
    flex-direction: column;
  }
  .map-popup .popup-image-frame {
    width: 100%;
  }
}

.map-popup .popup-image-frame img#popup-main-image {
  width: 100%;
  display: block;
  object-fit: cover;
}

.map-popup .popup-image-caption {
  font-size: 0.75rem;
  margin-top: 0.4rem;
  color: #111;
}

.map-popup .popup-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.map-popup .popup-gallery-thumbs img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
  transition: 0.2s;
}
.map-popup .popup-image-frame {
  flex-shrink: 0;
  width: 20rem;
  height: 20rem;

  padding: 0.5rem;
  position: relative;
  box-sizing: border-box;

  display: flex;
  align-items: center;      /* centre verticalement */
  justify-content: center;  /* centre horizontalement */
}

.map-popup .popup-image-frame img#popup-main-image {
  width: auto !important;
  height: auto;
  max-width: 100%;
  max-height: 100%;         /* évite de dépasser verticalement */
  margin: 0 !important;
}
.map-popup .popup-gallery-thumbs img:hover,
.map-popup .popup-gallery-thumbs img.active {
  opacity: 1;
  border-color: #000;
}

@media (max-width: 700px) {
  .map-popup .popup-inner {
    flex-direction: column;
  }
  .map-popup .popup-image-frame {
    width: 100%;
  }
}
.annotation-point {
  display: flex;
  align-items: center;
  justify-content: center;
}

.annotation-number {
  color: #fff;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.annotation-point:hover .annotation-number {
  color: var(--color1) !important;
}