html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* 🔥 supprime TOUS les scrolls */
}


/* Top bar */
.top-bar {
    width: 100%;
    height: 70px;
    background: #0C131F;
    display: flex;
    align-items: center;
    padding-left: 25px;
    flex-shrink: 0;
}
.logo-bzh { 
  width: 100px; 
  margin: 20px;
}

body {
  background: #0f0f14;
  color: #f1f1f1;
  font-family: Arial, sans-serif;
}

/* Titre */
h1 {
  text-align: center;
  margin: 10px 0;
  color: #ff6fae;
}

/* Carte */
#map {
  width: 100%;
  height: calc(100vh - 70px);
}


/* Sidebar */
#sidebar {
  position: fixed;
  top: 0;
  right: -360px;
  width: 550px;
  height: 100%;
  background: #16161e;
  padding: 20px;
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.7);
  transition: right 0.3s ease;
  z-index: 1000;
  max-width: 100vw;
}

#sidebar.open {
  right: 0;
}

#sidebar h2 {
  margin-top: 40px;
  color: #ff6fae;
}

#sidebar img {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 15px;
  border-radius: 8px;
}

/* Bouton fermer */
#closeSidebar {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
}

#closeSidebar:hover {
  color: #ff6fae;
}

.counter {
  margin-left: auto;
  margin-right: 25px;
  font-size: 16px;
  color: #ff6fae;
  font-weight: 500;
}

.commune-badge {
  margin-left: auto;
  margin-right: 50px; /* ← décollé du bord droit */
  padding: 8px 16px;
  border-radius: 999px;
  background: #1e1e2a;
  border: 1px solid #ff6fae;
  color: #ff6fae;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
}

/* Petit bandeau en bas à gauche */
.inspiration-banner {
    position: fixed;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7); /* fond semi-transparent pour contraste */
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    z-index: 1000; /* au-dessus de la carte */
}

.inspiration-banner a {
    color: #ff69b4; /* rose clair pour le lien */
    text-decoration: none;
    margin-left: 5px;
}

.inspiration-banner a:hover {
    text-decoration: underline;
}

/* Progression communes */
.progress-container {
  margin-left: auto;
  margin-right: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 220px;
}

.progress-text {
  font-size: 12px;
  color: #ff6fae;
  text-align: right;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #1e1e2a;
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff6fae, #ff9fc9);
  transition: width 0.4s ease;
}

/* ==============================
   Sprites animés (EMOJIS humains)
============================== */

.animated-sprite {
  pointer-events: none;
}

.sprite {
  font-size: 20px;
  line-height: 1;
  animation: sprite-walk 1.6s infinite ease-in-out;
  transform-origin: center;
  user-select: none;
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.45));
}

/* Animation marche légère */
@keyframes sprite-walk {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(1px, -1px) scale(1.05); }
  50%  { transform: translate(0, 0) scale(1); }
  75%  { transform: translate(-1px, -1px) scale(1.05); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ==============================
   Bouton habitants
============================== */

#toggle-inhabitants {
  display: block;
  margin: 20px auto 10px auto;
  padding: 10px 18px;
  background: #ff6fae;
  color: #000;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

#toggle-inhabitants:hover {
  transform: scale(1.05);
}

#toggle-inhabitants.off {
  opacity: 0.6;
}

.sprite img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  pointer-events: none;
}

