/* Mode « La ville » : barre du haut, carte de l'objectif, invitation au marqueur, bandeaux de fin de mission et titre
   de la radio. Mobile d'abord : cibles tactiles ≥ 44 px, rien sous le joystick (bas gauche) ni le bouton d'action. */
#hud-ville {
  position: fixed;
  z-index: 12;
  inset: 0;
  pointer-events: none;
  font: 600 13px/1.25 Inter, system-ui, sans-serif;
  color: #fff;
}
#hud-ville[hidden],
#hud-ville [hidden] {
  display: none !important;
}
#hud-ville .barre {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top));
  left: 8px;
  right: 8px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: flex-start;
}
#hud-ville .infos,
#hud-ville .boutons {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 14px;
  background: #14212be0;
  border: 1px solid #ffffff22;
  pointer-events: auto;
}
#hud-ville .infos span {
  display: flex;
  flex-direction: column;
  padding: 0 6px;
  white-space: nowrap;
}
#hud-ville .infos small,
#hud-ville .objectif small,
#hud-ville .radio-titre small {
  font-size: 10px;
  color: #cfdde6;
  font-weight: 600;
}
#hud-ville .boutons button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 800;
}
#hud-ville .boutons button[aria-pressed="true"] {
  background: #f7b34c;
  color: #1b1405;
}
#hud-ville .objectif {
  position: absolute;
  top: calc(72px + env(safe-area-inset-top));
  right: 8px;
  max-width: min(320px, calc(100vw - 16px));
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #0d3b66e8;
  border-left: 4px solid #2fa8ff;
}
#hud-ville .objectif strong {
  font-size: 15px;
}
#hud-ville .objectif .temps {
  font: 800 22px/1.1 Inter, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
#hud-ville .objectif .temps.urgent {
  color: #ff8a7a;
}
#hud-ville .invite {
  position: absolute;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(440px, calc(100vw - 180px));
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #14212bee;
  border: 2px solid #ffc23a;
  text-align: center;
}
#hud-ville .invite strong {
  color: #ffc23a;
  font-size: 16px;
}
#hud-ville .invite small {
  color: #cfdde6;
}
#hud-ville .bandeau {
  position: absolute;
  top: 34%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: linear-gradient(90deg, transparent, #000000b0 20%, #000000b0 80%, transparent);
  text-align: center;
}
#hud-ville .bandeau strong {
  font: 900 clamp(26px, 6vw, 48px)/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#hud-ville .bandeau.reussie strong {
  color: #ffc23a;
}
#hud-ville .bandeau.echouee strong {
  color: #ff6b5b;
}
#hud-ville .bandeau span {
  font-size: 15px;
}
#hud-ville .radio-titre {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(72px + env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  border-radius: 14px;
  background: #14212be0;
  border-bottom: 3px solid #f7b34c;
  white-space: nowrap;
}
#hud-ville .appel {
  position: absolute;
  top: calc(72px + env(safe-area-inset-top));
  right: 8px;
  max-width: min(320px, calc(100vw - 16px));
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 16px;
  background: #14212bf0;
  border: 2px solid #3ddc84;
}
#hud-ville .appel .sonnerie {
  font-size: 28px;
  animation: sonne 0.5s ease-in-out infinite alternate;
}
#hud-ville .appel div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#hud-ville .appel small {
  font-size: 10px;
  color: #cfdde6;
}
#hud-ville .appel em {
  font-style: normal;
  color: #3ddc84;
  font-size: 12px;
}
@keyframes sonne {
  from {
    transform: rotate(-14deg);
  }
  to {
    transform: rotate(14deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  #hud-ville .appel .sonnerie {
    animation: none;
  }
}
@media (max-width: 700px) {
  #hud-ville .invite {
    width: calc(100vw - 150px);
    left: 8px;
    transform: none;
    bottom: calc(150px + env(safe-area-inset-bottom));
  }
  #hud-ville .objectif {
    top: calc(64px + env(safe-area-inset-top));
  }
  #hud-ville .radio-titre {
    top: auto;
    bottom: calc(96px + env(safe-area-inset-bottom));
  }
  /* Moins de texte : le titre et l'essentiel (temps, prime) ; le détail se lit sur ordinateur. */
  #hud-ville .invite > span,
  #hud-ville .appel div > span,
  #hud-ville .bandeau.info span {
    display: none;
  }
  #hud-ville .infos small {
    display: none;
  }
  #hud-ville .infos {
    gap: 0;
    padding: 6px 4px;
    align-items: center;
  }
  #hud-ville .infos span {
    padding: 0 5px;
  }
  #hud-ville .boutons {
    gap: 4px;
    padding: 4px;
  }
  #hud-ville .boutons button {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }
  /* Cinq boutons ne tiennent pas : le titre suivant se garde pour l'ordinateur (touche R). */
  #hud-ville [data-ville="suivant"] {
    display: none;
  }
}
