/* [93-rackets-bookmarks] Rackets de quartier, domaines peints, lieux favoris de la ville */
/* Rackets de quartier (Greenwich Village) : bâtiment dessiné sur son îlot, plaque d'encaissement dessous */
.neighborhood-racket {
  position: absolute;
  width: 110px;
  height: 110px;
  padding: 0;
  transform: translate(-50%, -72%);
  background: none;
  border: none;
  cursor: default;
  pointer-events: auto;
  transition: transform 0.18s ease;
}
.neighborhood-racket .racket-sprite {
  width: 110px;
  height: 110px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85));
}
/* Badge contre le toit, en haut à droite (comme le badge de niveau) : « $ » vert, horloge, cadenas */
.neighborhood-racket .racket-badge {
  position: absolute;
  top: 40px;
  right: 18px;
  width: 24px;
  height: 24px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.75), 0 3px 6px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}
.racket-badge-ready {
  background: radial-gradient(circle at 36% 30%, #a5ead1 0%, #3c9e7a 38%, #215a45 78%, #12382a 100%);
  border: 1px solid #d8f9ed;
  color: #fff;
  font: 900 15px/1 'Josefin Sans', 'Gill Sans', sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  animation: racket-bob 1.4s ease-in-out infinite;
}
.racket-badge-waiting {
  background: radial-gradient(circle at 38% 32%, #ffffff 0%, #efedea 55%, #c9c5ba 100%);
  border: 1px solid #8c8676;
}
.racket-badge-waiting::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #222;
}
.racket-badge-waiting .clock-hand {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.5px;
  height: 8px;
  margin-left: -0.75px;
  background: #222;
  border-radius: 1px;
  transform-origin: 50% 100%;
  transform: translateY(-100%) rotate(0deg);
  animation: racket-clock 2s linear infinite;
}
.racket-badge-locked {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 7V5a3 3 0 0 1 6 0v2' fill='none' stroke='%23e8c25a' stroke-width='1.8'/%3E%3Crect x='3.5' y='7' width='9' height='7' rx='1' fill='%23e8c25a' stroke='%236b4a08' stroke-width='.8'/%3E%3Ccircle cx='8' cy='10.3' r='1.1' fill='%235a3a06'/%3E%3C/svg%3E") center / 14px no-repeat,
    radial-gradient(circle at 38% 30%, #5a5a5a 0%, #1a1a1a 45%, #000 100%);
  border: 1px solid #c8c8c8;
}
.neighborhood-racket.is-ready { cursor: pointer; }
.neighborhood-racket.is-ready:hover { transform: translate(-50%, -72%) scale(1.06); }
.neighborhood-racket.is-ready .racket-sprite { filter: drop-shadow(0 0 12px rgba(106, 204, 168, 0.6)); }
.neighborhood-racket.is-locked .racket-sprite { filter: grayscale(0.7) brightness(0.75) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85)); }
@keyframes racket-clock {
  from { transform: translateY(-100%) rotate(0deg); }
  to { transform: translateY(-100%) rotate(360deg); }
}
@keyframes racket-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
/* Racket peint sur la carte (First Neighborhood) : seul le badge, centré sur le bâtiment */
.neighborhood-racket.is-painted { width: 30px; height: 30px; transform: translate(-50%, -50%); }
.neighborhood-racket.is-painted.is-ready:hover { transform: translate(-50%, -50%) scale(1.1); }
.neighborhood-racket.is-painted .racket-badge { top: 3px; right: 3px; }

/* Domaine peint d'origine (Greenwich, Atlantic City…) : les bâtiments font partie de l'illustration,
   seules les zones cliquables et les badges restent.
   Domaine évolutif (« estate-layered ») : le fond montre l'état Niveau 0 (en ruines), et chaque bâtiment construit
   (has-level-sprite) affiche son calque de niveau par-dessus sa ruine. */
#scene-estate-layer.estate-painted { background-size: 100% 100%; }
#scene-estate-layer.estate-painted .estate-building-hotspot > img { display: none; }
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.has-level-sprite > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  border-radius: 4px;
  pointer-events: none;
}
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.hotspot-poly.has-level-sprite > img {
  border-radius: 0;
}
#scene-estate-layer.estate-painted .estate-building-hotspot { border-radius: 6px; transition: box-shadow 0.15s, background 0.15s, filter 0.15s; }
#scene-estate-layer.estate-painted .estate-building-hotspot:hover {
  background: rgba(207, 138, 48, 0.1);
  box-shadow: inset 0 0 0 2px rgba(207, 138, 48, 0.65), 0 0 18px rgba(207, 138, 48, 0.35);
}
/* Chantier en cours sur un bâtiment du Domaine : trame d'échafaudages dorée animée */
#scene-estate-layer.estate-painted .estate-building-hotspot.is-upgrading::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 5px;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 12px, rgba(212, 168, 92, 0.38) 12px 14px),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(120, 86, 42, 0.42) 18px 20px),
    repeating-linear-gradient(45deg, transparent 0 24px, rgba(212, 168, 92, 0.22) 24px 25px);
  box-shadow: inset 0 0 0 1px rgba(218, 174, 102, 0.65), inset 0 0 16px rgba(0, 0, 0, 0.55);
}

/* Domaine en scène complète (fullScene) : tous les bâtiments sont peints dans le fond ; un bâtiment encore au niveau 0
   est assombri et passé en gris, en fondu sur les bords, jusqu'à sa construction */
#scene-estate-layer.estate-full .estate-building-hotspot.is-ruined:not(.hotspot-poly)::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-backdrop-filter: grayscale(1) brightness(0.45);
  backdrop-filter: grayscale(1) brightness(0.45);
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 55%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side at 50% 55%, #000 70%, transparent 100%);
}
#scene-estate-layer.estate-full .estate-building-hotspot.is-ruined .estate-building-badge {
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* Bâtiment en biais (mur d'enceinte) : seul le polygone reçoit la souris, son contour s'allume au survol */
#scene-estate-layer.estate-painted .estate-building-hotspot.hotspot-poly { pointer-events: none !important; }
#scene-estate-layer.estate-painted .estate-building-hotspot.hotspot-poly:hover { background: none; box-shadow: none; }
.estate-building-hotspot .hotspot-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.estate-building-hotspot .hotspot-shape polygon {
  pointer-events: all; cursor: pointer; fill: transparent; stroke: transparent; stroke-width: 2;
  vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill 0.15s, stroke 0.15s;
}
.estate-building-hotspot.hotspot-poly:hover .hotspot-shape polygon {
  fill: rgba(207, 138, 48, 0.1); stroke: rgba(207, 138, 48, 0.75); filter: drop-shadow(0 0 6px rgba(207, 138, 48, 0.5));
}

#scene-estate-layer.estate-painted .estate-building-badge {
  top: var(--badge-top, 4px) !important;
  left: var(--badge-left, 50%) !important;
  right: auto !important;
  transform: translateX(-50%) !important;
}
/* La Bibliothèque est en haut à droite sous le bandeau « Protection débutant » : son badge descend sur la coupole */
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.hotspot-library {
  --badge-top: 22%;
}
/* Sur un emplacement au niveau 0 (dalle de fondation), la zone cliquable se resserre sur la dalle au sol (sans la hauteur des cheminées/toits) et le cadenas est centré au milieu de la dalle */
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.is-ruined {
  clip-path: inset(var(--ruined-clip-top, 35%) 0 0 0 round 6px);
}
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.is-ruined .estate-building-badge {
  top: var(--ruined-badge-top, 75%) !important;
  left: var(--ruined-badge-left, 50%) !important;
  transform: translate(-50%, -50%) !important;
}
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.hotspot-library.is-ruined   { --ruined-clip-top: 60%; --ruined-badge-left: 52%; --ruined-badge-top: 86%; }
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.hotspot-warehouse.is-ruined { --ruined-clip-top: 52%; --ruined-badge-left: 49%; --ruined-badge-top: 83%; }
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.hotspot-vault.is-ruined     { --ruined-clip-top: 40%; --ruined-badge-left: 52%; --ruined-badge-top: 72%; }
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.hotspot-garage.is-ruined    { --ruined-clip-top: 38%; --ruined-badge-left: 52%; --ruined-badge-top: 73%; }
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.hotspot-workshop.is-ruined  { --ruined-clip-top: 32%; --ruined-badge-left: 52%; --ruined-badge-top: 63%; }
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.hotspot-guestHouse.is-ruined { --ruined-clip-top: 32%; --ruined-badge-left: 51%; --ruined-badge-top: 67%; }
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.hotspot-armory.is-ruined    { --ruined-clip-top: 10%; --ruined-badge-left: 31%; --ruined-badge-top: 46%; }
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.hotspot-frontGate.is-ruined { --ruined-clip-top: 25%; --ruined-badge-left: 50%; --ruined-badge-top: 60%; }
#scene-estate-layer.estate-painted.estate-layered .estate-building-hotspot.hotspot-guardPost.is-ruined { --ruined-clip-top: 52%; --ruined-badge-left: 53%; --ruined-badge-top: 77%; }

/* Cadenas centrés sur les dalles du Domaine de Greenwich Village (niveau 0) */
#scene-estate-layer[data-domain="greenwich"].estate-layered .estate-building-hotspot.hotspot-library.is-ruined    { --ruined-clip-top: 52%; --ruined-badge-left: 51%; --ruined-badge-top: 82%; }
#scene-estate-layer[data-domain="greenwich"].estate-layered .estate-building-hotspot.hotspot-guestHouse.is-ruined { --ruined-clip-top: 44%; --ruined-badge-left: 50%; --ruined-badge-top: 78%; }
#scene-estate-layer[data-domain="greenwich"].estate-layered .estate-building-hotspot.hotspot-garage.is-ruined     { --ruined-clip-top: 25%; --ruined-badge-left: 48%; --ruined-badge-top: 52%; }
#scene-estate-layer[data-domain="greenwich"].estate-layered .estate-building-hotspot.hotspot-warehouse.is-ruined  { --ruined-clip-top: 30%; --ruined-badge-left: 48%; --ruined-badge-top: 60%; }
#scene-estate-layer[data-domain="greenwich"].estate-layered .estate-building-hotspot.hotspot-workshop.is-ruined   { --ruined-clip-top: 42%; --ruined-badge-left: 48%; --ruined-badge-top: 72%; }
#scene-estate-layer[data-domain="greenwich"].estate-layered .estate-building-hotspot.hotspot-armory.is-ruined     { --ruined-clip-top: 10%; --ruined-badge-left: 45%; --ruined-badge-top: 48%; }
#scene-estate-layer[data-domain="greenwich"].estate-layered .estate-building-hotspot.hotspot-guardPost.is-ruined  { --ruined-clip-top: 48%; --ruined-badge-left: 52%; --ruined-badge-top: 76%; }
#scene-estate-layer[data-domain="greenwich"].estate-layered .estate-building-hotspot.hotspot-frontGate.is-ruined  { --ruined-clip-top: 30%; --ruined-badge-left: 50%; --ruined-badge-top: 68%; }

/* Lieux favoris de la vue Ville : domaines installés + coordonnées enregistrées */
#main-top-hud .nav-bookmarks-label { cursor: pointer; }
.city-bookmarks-menu {
  position: absolute;
  z-index: 300;
  width: 300px;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px 0;
  background: linear-gradient(180deg, #151515 0%, #070707 100%);
  border: 1px solid var(--hud-gold, #9e7949);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.85);
  font-size: 11px;
  color: #e0d6c8;
}
.city-bookmarks-menu.hidden { display: none; }
.city-bookmarks-menu .bm-head {
  padding: 5px 8px 3px;
  color: #d1a46a;
  font-weight: 700;
  letter-spacing: 1px;
  border-top: 1px solid rgba(158, 121, 73, 0.35);
}
.city-bookmarks-menu .bm-head:first-child { border-top: none; }
.city-bookmarks-menu .bm-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  cursor: pointer;
}
.city-bookmarks-menu .bm-row:hover { background: rgba(209, 164, 106, 0.14); }
.city-bookmarks-menu .bm-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.city-bookmarks-menu .bm-coords { color: #9fc6d6; font-variant-numeric: tabular-nums; }
.city-bookmarks-menu .bm-del {
  width: 16px; height: 16px; padding: 0;
  background: #511f19; color: #fff; border: 1px solid #9b4b42; border-radius: 2px;
  font-size: 9px; line-height: 1; cursor: pointer;
}
.city-bookmarks-menu .bm-empty { padding: 3px 8px; color: #8a8270; font-style: italic; }
.city-bookmarks-menu .bm-add {
  display: flex;
  gap: 4px;
  padding: 6px 8px 4px;
  border-top: 1px solid rgba(158, 121, 73, 0.35);
}
.city-bookmarks-menu .bm-input {
  min-width: 0;
  flex: 1;
  height: 18px;
  padding: 0 4px;
  background: #fff;
  color: #111;
  border: 1px solid #777;
  font-family: inherit;
  font-size: 11px;
}
.city-bookmarks-menu .bm-num { flex: 0 0 46px; }
.city-bookmarks-menu .bm-add-btn {
  height: 20px;
  padding: 0 6px;
  background: linear-gradient(180deg, #cc5245 0%, #7a271e 100%);
  color: #fff;
  border: 1px solid #d1a46a;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

/* Bâtiment absent du domaine actif (le Coffre-fort n'existe qu'à First Neighborhood) */
.estate-building-hotspot.hidden { display: none !important; }
/* Portail : sa zone englobe le poste de garde, son cadenas va sur le battant gauche pour ne pas se superposer à celui du poste */
#scene-estate-layer.estate-painted .hotspot-frontGate { --badge-left: 18%; }

/* Racket posé sur la vue du Domaine (Aéroport Doria) : zone en % de l'image, badge au centre */
.estate-racket { transform: translate(-50%, -50%); }
.estate-racket .racket-badge { top: 2px; right: auto; left: 50%; margin: 0 0 0 -12px; pointer-events: auto; cursor: pointer; } /* dans la zone cliquable : un clic sur le badge ouvre la fenêtre */
