/* ==========================================================================
   STYLE FIDÈLE THE GODFATHER: FIVE FAMILIES (KABAM 2012-2019)
   Art Déco 1935, velours carmin impérial, bordures biseautées or & acajou
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Playfair+Display:ital,wght@0,700;1,400&family=Oswald:wght@500;600;700&family=Roboto+Condensed:wght@400;700&display=swap');

:root {
  --bg-dark: #080606;
  --gold-highlight: #fff2a8;
  --gold-primary: #d6ad38;
  --gold-dark: #7d5904;
  --gold-shadow: #3b2800;
  
  --red-velvet: #6b0c0c;
  --red-crimson: #9e1414;
  --red-bright: #cc1b1b;
  --red-dark: #3b0505;

  --panel-bg: #140e0e;
  --panel-border: #4d3319;
  --text-gold: #f5e4a8;
  --text-main: #f0e6d6;
  --text-dim: #a89a88;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background: radial-gradient(ellipse at center, #1c1411 0%, #050303 75%);
  color: var(--text-main);
  font-family: 'Roboto Condensed', sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   PORTAIL SUPÉRIEUR WEB (Wrapper navigateur officiel 2012)
   ========================================================================== */
#portal-header-bar {
  height: 36px;
  background: linear-gradient(180deg, #1b1616 0%, #0d0a0a 100%);
  border-bottom: 1px solid #3d2a1b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11px;
  z-index: 150;
  flex-shrink: 0;
}

.portal-left-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-puppet-strings {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-title {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.brand-subtitle {
  font-family: 'Oswald', sans-serif;
  font-size: 9px;
  letter-spacing: 3px;
  color: #c92222;
  font-weight: 700;
  margin-top: 1px;
}

.portal-center-nav {
  display: flex;
  gap: 16px;
}

.portal-link {
  color: #bbb;
  text-decoration: none;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  transition: color 0.2s;
}

.portal-link:hover, .portal-link.active {
  color: #ff3333;
  text-shadow: 0 0 5px rgba(255, 51, 51, 0.5);
}

.portal-right-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #999;
}

.user-greeting strong {
  color: var(--gold-highlight);
}

.portal-sep {
  color: #444;
}

/* ==========================================================================
   CONTENEUR PRINCIPAL DU JEU
   ========================================================================== */
/* Hôte du cadre : occupe l'espace sous le portail ; le cadre y est centré et mis à l'échelle par app.js */
#stage-host {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

/* Cadre de jeu fixe 980x640 (format du client d'origine) */
#game-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 980px;
  height: 640px;
  transform-origin: 0 0;
  background: #000;
  overflow: hidden;
  box-shadow: 0 0 0 1px #3b2800, 0 0 40px rgba(0, 0, 0, 0.95);
}

/* ==========================================================================
   1. BARRE DU TRÈS HAUT : RUBAN BORDEAUX ET TICKER D'ANNONCES
   ========================================================================== */
#upper-bar {
  height: 28px;
  background: linear-gradient(180deg, #6b0c0c 0%, #3a0606 100%);
  border-bottom: 1px solid #8e1c1c;
  border-top: 1px solid #a82424;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 11px;
  z-index: 120;
  flex-shrink: 0;
}

.upper-left-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-select {
  background: #1c0a0a;
  color: var(--gold-highlight);
  border: 1px solid var(--gold-dark);
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 2px;
  cursor: pointer;
}

.btn-upper-red {
  background: linear-gradient(180deg, #b81d1d 0%, #660c0c 100%);
  border: 1px solid #ff7b7b;
  color: #fff;
  font-weight: bold;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-upper-red:hover {
  filter: brightness(1.2);
}

/* Ticker central officiel sur fond ivoire */
.ticker-ribbon {
  background: #fff8eb;
  color: #520b0b;
  font-weight: 700;
  padding: 2px 20px;
  border-radius: 2px;
  border: 1px solid #c29d66;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.ticker-more-btn {
  background: #801212;
  color: #fff;
  border: 1px solid #a32222;
  padding: 1px 6px;
  font-size: 9px;
  border-radius: 2px;
  cursor: pointer;
  font-weight: bold;
}

.upper-right-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ddd;
}

.audio-toggle-btn {
  background: linear-gradient(180deg, #3d1b1b 0%, #1a0a0a 100%);
  border: 1px solid #7a2b2b;
  color: #ffd700;
  border-radius: 3px;
  width: 24px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.1), 0 1px 3px rgba(0,0,0,0.5);
  transition: all 0.2s;
  padding: 0;
}

.audio-toggle-btn:hover {
  filter: brightness(1.25);
  border-color: #ffd700;
  transform: scale(1.05);
}

.audio-toggle-btn.muted {
  color: #888;
  border-color: #444;
  background: #151515;
  filter: grayscale(1);
}

#upper-clock-display {
  font-family: monospace;
  color: var(--gold-highlight);
  font-weight: bold;
  font-size: 11px;
}

.server-pill-btn {
  display: flex;
  border: 1px solid #8e2b2b;
  border-radius: 2px;
  overflow: hidden;
  font-size: 10px;
  font-weight: bold;
}

.server-badge {
  background: #fff8eb;
  color: #4a0c0c;
  padding: 1px 6px;
}

.server-name {
  background: #801212;
  color: #fff;
  padding: 1px 6px;
}

/* ==========================================================================
   2. HUD SUPÉRIEUR : BANDEAU NOIR DES RESSOURCES + MÉDAILLON DU JOUEUR
   ========================================================================== */
#main-top-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  z-index: 110;
}

.hud-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: linear-gradient(180deg, #181412 0%, #030202 100%);
  border-bottom: 1px solid #4a3a1a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  padding: 0 4px 0 96px;
}

.hud-player-name {
  width: 150px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resources-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.resource-cell {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Petite caisse rouge/or de boost devant chaque ressource */
.res-boost {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #e0aa28 0 48%, #b01818 52% 100%);
  border: 1px solid #f3d27a;
  border-radius: 2px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 1px #000;
  cursor: pointer;
}

.res-boost:hover {
  filter: brightness(1.25);
}

.res-icon {
  width: 16px;
  font-size: 12px;
  text-align: center;
}

.res-icon-cash {
  color: #e8c25a;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 14px;
}

.res-num {
  min-width: 64px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.hud-diamonds {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 36px;
}

.hud-diamonds .res-num {
  min-width: 36px;
  color: #bfefff;
}

.btn-add-green {
  height: 20px;
  padding: 0 16px;
  background: linear-gradient(180deg, #67dc4f 0%, #2e9a20 55%, #1c6b12 100%);
  border: 1px solid #a6f494;
  border-radius: 3px;
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  text-shadow: 0 1px 1px #0b3a05;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-add-green:hover {
  filter: brightness(1.15);
}

/* Médaillon du joueur */
.hud-avatar-block {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 96px;
}

.avatar-disc {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 3px solid #1b1b1b;
  box-shadow: 0 0 0 2px #8a7340, 0 3px 10px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  background: #000;
}

.avatar-disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-level-crest {
  position: absolute;
  top: 58px;
  left: 60px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ec3a32, #8a0b0b 70%);
  border: 2px solid #1b1b1b;
  box-shadow: 0 0 0 1px #c9a24a, 0 2px 4px rgba(0, 0, 0, 0.8);
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-respect-ribbon {
  position: absolute;
  top: 24px;
  left: 62px;
  width: 128px;
  height: 27px;
  padding-left: 22px;
  background: linear-gradient(180deg, #2c2622 0%, #0d0b0a 100%);
  box-shadow: inset 0 -3px 0 #a01818;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-family-crest {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1px solid #c9a24a;
  background: #2f6b3a;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-respect-value {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

/* ==========================================================================
   3. ZONE CENTRALE : SCÈNES ISOMÉTRIQUES & HUD SURIMPOSÉ
   ========================================================================== */
#scene-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #080606;
}

.scene-layer {
  position: absolute;
  inset: 0;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.3s ease;
}

#scene-estate-layer {
  background-image: url('../assets/images/estate_bg.jpg');
  display: block;
}

#scene-neighborhood-layer.scene-neighborhood-pan-container {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  background: #080606;
  position: relative;
  overflow: hidden;
  display: none;
}

#neighborhood-pan-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  user-select: none;
}

#neighborhood-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 1200px;
  height: 1080px;
  background-image: url('../assets/images/neighborhood_bg.jpg');
  background-size: 1200px 1080px;
  background-repeat: no-repeat;
  background-position: 0 0;
  transform-origin: 0 0;
  will-change: transform;
}

.neighborhood-controls-hint {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 12, 10, 0.88);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 4px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  color: #ddd;
  pointer-events: auto;
  z-index: 50;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.9);
}

#scene-city-layer {
  background: #2f2b26;
  display: none;
}

.interactive-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ==========================================================================
   BÂTIMENTS DU DOMAINE (ESTATE HOTSPOTS & ROUND LEVEL BADGES)
   ========================================================================== */
.estate-building-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto !important;
  z-index: 10;
  transition: transform 0.2s ease, filter 0.2s ease;
  border-radius: 4px;
}

.estate-building-hotspot:hover {
  transform: translate(-50%, -50%) scale(1.04);
  filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.75));
  z-index: 40;
}

.estate-building-badge {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #9e1414 0%, #4a0606 100%);
  border: 1.5px solid var(--gold-highlight);
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0,0,0,0.85);
  pointer-events: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.estate-building-badge.badge-locked {
  background: linear-gradient(180deg, #383030 0%, #151313 100%);
  border-color: #8c7853;
  font-size: 11px;
}

.estate-building-hotspot:hover .estate-building-badge {
  transform: scale(1.15);
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.9);
}

/* Ruban d'amélioration en cours */
.building-upgrading-ribbon {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #9e1414 0%, #4a0606 100%);
  border: 1px solid var(--gold-highlight);
  border-radius: 3px;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0,0,0,0.9);
  z-index: 50;
  animation: ribbonPulse 2s infinite alternate;
}

@keyframes ribbonPulse {
  0% { transform: translateX(-50%) translateY(0); box-shadow: 0 3px 8px rgba(0,0,0,0.9); }
  100% { transform: translateX(-50%) translateY(-3px); box-shadow: 0 5px 12px rgba(255, 50, 50, 0.6); }
}

.btn-ribbon-speedup {
  background: linear-gradient(180deg, #0e2029 0%, #061117 100%);
  border: 1px solid #8be5ff;
  color: #8be5ff;
  font-size: 9px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ribbon-speedup:hover {
  background: #1a4f66;
  color: #fff;
}

/* ==========================================================================
   PARCELLES DU QUARTIER (GROUND SLOTS DIRECTEMENT AU SOL - KABAM ORIGINAL)
   ========================================================================== */
.neighborhood-ground-slot {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto !important;
  z-index: 15;
  transition: transform 0.18s ease, filter 0.18s ease;
}

/* 1. Parcelles Isométriques au Sol (Losanges SVG Kabam) */
.neighborhood-ground-slot.slot-locked,
.neighborhood-ground-slot.slot-empty {
  width: 86px;
  height: 56px;
}

.ground-lot-surface.diamond-surface {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.slot-diamond-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.9));
  overflow: visible;
}

/* Losange Verrouillé */
.neighborhood-ground-slot.slot-locked .diamond-polygon {
  fill: rgba(14, 10, 8, 0.72);
  stroke: rgba(218, 165, 32, 0.65);
  stroke-width: 1.5;
  transition: all 0.2s ease;
}

.neighborhood-ground-slot.slot-locked:hover .diamond-polygon {
  fill: rgba(35, 20, 10, 0.88);
  stroke: #ffd700;
  stroke-width: 2.2;
}

.neighborhood-ground-slot.slot-locked:hover .ground-lot-surface {
  transform: scale(1.06);
  filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.7));
}

/* Losange Vide Débloqué (+ BÂTIR) */
.neighborhood-ground-slot.slot-empty .diamond-polygon {
  fill: rgba(10, 8, 6, 0.45);
  stroke: rgba(255, 215, 0, 0.7);
  stroke-width: 1.8;
  stroke-dasharray: 5 3;
  transition: all 0.2s ease;
}

.neighborhood-ground-slot.slot-empty:hover .diamond-polygon {
  fill: rgba(255, 215, 0, 0.25);
  stroke: #ffd700;
  stroke-width: 2.5;
  stroke-dasharray: none;
}

.neighborhood-ground-slot.slot-empty:hover .ground-lot-surface {
  transform: scale(1.08);
  filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.85));
}

/* Contenu centré dans le losange */
.slot-diamond-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.slot-padlock-icon {
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.95));
  animation: lockGlow 2.5s infinite alternate;
}

@keyframes lockGlow {
  0% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.9)); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8)); }
}

.slot-req-text {
  font-family: 'Oswald', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px #000;
  margin-top: 2px;
}

.ground-lot-action {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 4px #000;
}

/* 3. Parcelle Occupée : Sprite isométrique officiel Kabam sur la dalle */
.neighborhood-ground-slot.slot-occupied {
  width: 100px;
  height: 100px;
  transform: translate(-50%, -72%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.neighborhood-ground-slot.slot-occupied:hover {
  transform: translate(-50%, -72%) scale(1.08);
  z-index: 35;
}

.slot-building-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.85));
  transition: filter 0.2s ease;
}

.neighborhood-ground-slot.slot-occupied:hover .slot-building-sprite {
  filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.8)) brightness(1.1);
}

.slot-level-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #9e1414 0%, #4a0606 100%);
  border: 1.5px solid #ffd700;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

/* ==========================================================================
   PASTILLES DE QUÊTES SUR LE BORD GAUCHE (sous le médaillon du joueur)
   ========================================================================== */
#left-quest-badges-strip {
  position: absolute;
  top: 104px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 80;
}

.quest-portrait-disc {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid #1b1b1b;
  box-shadow: 0 0 0 2px #8a7340, 0 0 12px rgba(80, 170, 220, 0.45), 0 4px 10px rgba(0, 0, 0, 0.8);
  position: relative;
  cursor: pointer;
  background: radial-gradient(circle at 40% 35%, #3a2a22, #0d0908);
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quest-portrait-disc:hover {
  transform: scale(1.08);
}

.quest-portrait-disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.quest-disc-inner {
  font-size: 22px;
  color: #fff;
}

.quest-alert-dot {
  position: absolute;
  bottom: -3px;
  right: -5px;
  background: #cc1b1b;
  border: 1.5px solid #fff;
  color: #fff;
  font-weight: 900;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   FILES ACTIVES & OFFRE DÉBUTANT (sous le bandeau, à gauche des boutons rouges)
   ========================================================================== */
#right-queues-strip {
  position: absolute;
  top: 32px;
  right: 48px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 80;
  width: 230px;
}

.sale-timer-ribbon {
  background: rgba(10, 8, 8, 0.85);
  border: 1px solid #6b5326;
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.active-queue-card {
  background: rgba(14, 10, 10, 0.92);
  border: 1px solid #6b5326;
  border-radius: 3px;
  padding: 6px 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.queue-row-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 4px;
}

.queue-tag {
  background: #8e1414;
  color: #fff;
  font-size: 8px;
  font-weight: bold;
  padding: 1px 4px;
  border-radius: 2px;
}

.queue-progress-track {
  height: 8px;
  background: #000;
  border: 1px solid #4d3319;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.queue-progress-bar {
  height: 100%;
  width: 45%;
  background: linear-gradient(90deg, #8a1414, #ff3333);
  transition: width 0.3s ease;
}

.queue-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
}

.queue-countdown {
  font-family: monospace;
  font-weight: bold;
  color: var(--gold-highlight);
}

.btn-speedup-red {
  background: linear-gradient(180deg, #b81d1d 0%, #660c0c 100%);
  border: 1px solid #ff7b7b;
  color: #fff;
  font-size: 9px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 2px;
  cursor: pointer;
}

/* ==========================================================================
   COLONNE DE BOUTONS ROUGES SUR LE BORD DROIT (comme l'original)
   ========================================================================== */
#right-gold-action-bar {
  position: absolute;
  top: 32px;
  right: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 80;
}

.gold-icon-btn {
  width: 34px;
  height: 34px;
  background: linear-gradient(180deg, #d42a22 0%, #8e1010 55%, #5c0606 100%);
  border: 1px solid #f0c25a;
  border-radius: 3px;
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px #3b0303, inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 6px rgba(0, 0, 0, 0.8);
  transition: transform 0.15s, filter 0.15s;
}

.gold-icon-btn:hover {
  transform: scale(1.08);
  filter: brightness(1.15);
}

/* ==========================================================================
   4. HUD INFÉRIEUR EN SURIMPRESSION (la scène reste visible derrière)
   ========================================================================== */
#bottom-bar-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

#bottom-bar-hud > * {
  pointer-events: auto;
}

/* Panneau commun : cuir sombre et liseré or */
.mini-chat-box,
.view-nav-center-wrapper,
.main-menu-panel {
  background: linear-gradient(180deg, rgba(28, 22, 18, 0.96) 0%, rgba(10, 8, 7, 0.98) 100%);
  border: 1px solid #6b5326;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 220, 140, 0.12);
}

/* Chat 3 onglets en bas à gauche */
.mini-chat-box {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 288px;
  height: 196px;
  background: rgba(0, 0, 0, 0.74);
  border-left: none;
  border-bottom: none;
  border-radius: 0 4px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: height 0.2s ease;
}

.mini-chat-box.collapsed {
  height: 52px;
}

.mini-chat-box.collapsed .chat-stream-list {
  display: none;
}

.chat-channel-tabs {
  display: flex;
  flex-shrink: 0;
}

.chat-tab-btn {
  flex: 1;
  text-align: center;
  padding: 5px 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #e5c768;
  cursor: pointer;
  background: linear-gradient(180deg, #2e2b29 0%, #141211 100%);
  border-right: 1px solid #000;
  border-top: 1px solid #4a4440;
}

.chat-tab-btn:hover {
  color: #fff2a8;
}

.chat-tab-btn.active {
  background: linear-gradient(180deg, #a01818 0%, #4a0606 100%);
  color: #ffd36b;
  border-top-color: #ff6a5a;
}

.chat-stream-list {
  flex: 1;
  padding: 6px 8px;
  overflow-y: auto;
  font-size: 11px;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 4px;
  user-select: text;
}

.chat-msg-system {
  color: #e5c768;
  font-style: italic;
  font-size: 10px;
}

.chat-msg-sender {
  color: #ff9933;
  font-weight: bold;
}

.chat-msg-text {
  color: #eae0d0;
}

.chat-submit-row {
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  border-top: 1px solid #2e1a0e;
  background: rgba(10, 6, 6, 0.9);
  flex-shrink: 0;
}

.chat-text-input {
  flex: 1;
  background: #1c1212;
  border: 1px solid #4a2f1c;
  color: #fff;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 2px;
  outline: none;
  user-select: text;
}

.chat-text-input:focus {
  border-color: var(--gold-primary);
}

.chat-collapse-btn {
  width: 20px;
  background: linear-gradient(180deg, #a01818, #4a0606);
  border: 1px solid #c9a24a;
  color: #fff;
  font-size: 10px;
  border-radius: 2px;
  cursor: pointer;
}

/* Sélecteur central des 3 vues */
.view-nav-center-wrapper {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  padding: 7px 10px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.view-nav-center {
  display: flex;
  gap: 10px;
}

.view-card-btn {
  width: 66px;
  height: 66px;
  padding: 3px;
  background: #0c0a08;
  border: 2px solid #8a6a2c;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px #000, 0 3px 6px rgba(0, 0, 0, 0.8);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.view-card-btn:hover {
  border-color: #ffd36b;
}

.view-card-btn.active {
  background: #6b0c0c;
  border-color: #d11d1d;
  box-shadow: 0 0 0 1px #ffd36b, 0 0 12px rgba(209, 29, 29, 0.7);
}

.view-card-thumb {
  width: 100%;
  height: 100%;
  border: 1px solid #000;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.thumb-estate {
  background-image: url('../assets/images/estate_bg.jpg');
}

.thumb-neighborhood {
  background-image: url('../assets/images/neighborhood_bg.jpg');
}

.thumb-city {
  background-image: url('../assets/images/city_map_bg.jpg');
}

.estate-subnav-row {
  display: flex;
  gap: 8px;
}

.estate-sub-btn {
  width: 22px;
  height: 17px;
  background: linear-gradient(180deg, #2e2622, #14100e);
  border: 1px solid #8a6a2c;
  color: #e5c768;
  font-size: 10px;
  font-weight: bold;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.estate-sub-btn.active {
  background: linear-gradient(180deg, #b01c1c, #5c0606);
  border-color: #ffd36b;
  color: #fff;
}

.estate-sub-btn.locked {
  font-size: 8px;
  opacity: 0.6;
  cursor: default;
}

/* Menu principal libellé en bas à droite */
.main-menu-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 270px;
  border-right: none;
  border-bottom: none;
  border-radius: 4px 0 0 0;
}

.main-menu-row {
  display: flex;
  padding: 5px 4px 2px;
  border-bottom: 1px solid #3a2a14;
}

.menu-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  position: relative;
  padding: 0;
}

.menu-icon {
  width: 36px;
  height: 36px;
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 35%, #3a2c1c, #0c0906 75%);
  border: 2px solid #b8923a;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px #3b2400, 0 2px 4px rgba(0, 0, 0, 0.9);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.menu-btn:hover .menu-icon {
  border-color: #ffe08a;
  box-shadow: inset 0 0 0 1px #3b2400, 0 0 10px rgba(255, 210, 100, 0.6);
  transform: translateY(-2px);
}

.menu-label {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 10.5px;
  color: #e8dcc0;
  text-shadow: 0 1px 2px #000;
}

.btn-badge-count {
  position: absolute;
  top: -4px;
  right: 2px;
  background: #cc1b1b;
  color: #fff;
  border: 1px solid #fff;
  font-size: 9px;
  font-weight: bold;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-toggles-strip {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 2px 10px 3px;
  font-size: 11px;
  cursor: pointer;
}

.audio-btn {
  opacity: 0.75;
}

.audio-btn:hover {
  opacity: 1;
}

/* Conseiller au fedora au-dessus du menu, avec bulle et languette de repli */
#bottom-bar-hud > .advisor-dock {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: 270px;
  height: 130px;
  pointer-events: none;
}

.advisor-portrait-frame {
  pointer-events: auto;
  position: absolute;
  right: 18px;
  bottom: 0;
  width: 92px;
  height: 116px;
  border: 2px solid #b8923a;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.9);
}

.advisor-portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.consigliere-speech-bubble {
  position: absolute;
  right: 120px;
  bottom: 54px;
  width: 170px;
  background: #fff8eb;
  color: #3b0a0a;
  border: 1px solid #c29d66;
  border-radius: 5px;
  padding: 6px 9px;
  font-size: 10.5px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.bubble-arrow {
  position: absolute;
  right: -7px;
  bottom: 12px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 7px solid #fff8eb;
}

.advisor-toggle-tab {
  pointer-events: auto;
  position: absolute;
  right: 0;
  bottom: 30px;
  width: 15px;
  height: 28px;
  background: linear-gradient(180deg, #c42020, #6b0606);
  border: 1px solid #ffd36b;
  border-right: none;
  border-radius: 3px 0 0 3px;
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  padding: 0;
}

.advisor-dock.collapsed .advisor-portrait-frame,
.advisor-dock.collapsed .consigliere-speech-bubble {
  display: none;
}

/* ==========================================================================
   5. FENÊTRE MODALE UNIVERSELLE FIDÈLE (EXACT REVIEW_1 & REVIEW_4)
   ========================================================================== */
.kabam-modal-curtain {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.kabam-modal-curtain.hidden {
  display: none !important;
}

.kabam-modal-box {
  width: 740px;
  background: linear-gradient(180deg, #1f1616 0%, #100b0b 100%);
  border: 2px solid var(--gold-primary);
  border-radius: 6px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.95), 0 0 15px rgba(214, 173, 56, 0.35);
  position: relative;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Plaque de titre trapézoïdale Art Déco dorée */
.modal-crown-trapezoid {
  background: linear-gradient(180deg, #261914 0%, #140d0a 100%);
  border-bottom: 2px solid var(--gold-primary);
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-crown-title {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 900;
  color: var(--gold-highlight);
  letter-spacing: 1.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.modal-corner-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #801212;
  border: 1.5px solid var(--gold-highlight);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.modal-corner-close:hover {
  transform: translateY(-50%) scale(1.15);
  background: #a31414;
}

/* Barre des onglets de modale (DÉTAILS | RECHERCHE | RECRUTEMENT) */
.modal-nav-tabs {
  display: flex;
  background: #140d0d;
  border-bottom: 1px solid #4a2f1c;
  padding: 0 16px;
  gap: 4px;
}

.modal-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #999;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  letter-spacing: 1px;
}

.modal-tab-btn.active {
  color: var(--gold-highlight);
  border-bottom-color: var(--gold-primary);
  background: rgba(214, 173, 56, 0.1);
}

.modal-inner-padding {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}

.modal-flavor-intro {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.45;
  color: #d1b894;
  margin-bottom: 14px;
  border-left: 3px solid var(--gold-primary);
  padding-left: 10px;
}

.modal-middle-grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  margin-bottom: 14px;
}

.building-artwork-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.building-artwork-portrait {
  width: 190px;
  height: 140px;
  border: 1.5px solid var(--gold-dark);
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.building-artwork-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.level-transition-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  color: var(--gold-highlight);
}

.lvl-arrow {
  color: #ff3333;
  font-size: 14px;
}

/* Tableau Kabam fidèle */
.kabam-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  background: rgba(10, 7, 7, 0.85);
  border: 1px solid #3d2616;
}

.kabam-table th {
  background: linear-gradient(180deg, #261616 0%, #140a0a 100%);
  color: var(--gold-highlight);
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid #4a2f1c;
}

.kabam-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #24140c;
  color: #eee;
}

.kabam-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.status-check {
  color: #55ff55;
  font-weight: bold;
}

.status-cross {
  color: #ff4444;
  font-weight: bold;
}

/* Bulle de dialogue du Conseiller dans la modale */
.advisor-speech-bubble-row {
  background: rgba(255, 248, 235, 0.95);
  color: #4a0c0c;
  border: 1px solid #c29d66;
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.1);
}

.advisor-bubble-face {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #8e1b1b;
  overflow: hidden;
  flex-shrink: 0;
}

.advisor-bubble-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.advisor-speech-text {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
}

/* Boutons d'action : BUILD & BUILD NOW */
.modal-bottom-buttons-row {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.btn-big-red-build {
  flex: 1;
  background: linear-gradient(180deg, #b81414 0%, #6e0909 100%);
  border: 1.5px solid #ff7b7b;
  border-radius: 4px;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(184, 20, 20, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: filter 0.2s, transform 0.1s;
}

.btn-big-red-build:hover:not(:disabled) {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

.btn-big-red-build:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.build-btn-time {
  font-size: 10px;
  color: #ffe066;
  font-family: monospace;
}

.btn-big-grey-instant {
  flex: 1;
  background: linear-gradient(180deg, #332822 0%, #1a1412 100%);
  border: 1.5px solid var(--gold-dark);
  border-radius: 4px;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
  transition: border-color 0.2s;
}

.btn-big-grey-instant:hover:not(:disabled) {
  border-color: var(--gold-primary);
}

.btn-big-grey-instant:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.build-btn-cost {
  font-size: 10px;
  color: #8be5ff;
}

/* ==========================================================================
   ONGLET RECHERCHE (STYLE REVIEW_4.JPG)
   ========================================================================== */
/* Fenêtre élargie pour l'onglet Recherche */
.kabam-modal-box.modal-wide {
  width: 880px;
}

.research-tree-layout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

/* Plateau : capture de l'arbre original (bibliothèque, cartes et liaisons) */
.research-tree-board {
  position: relative;
  flex-shrink: 0;
  width: 542px;
  height: 476px;
  background: #050403 url('../assets/images/research.png') no-repeat 0 0;
  border: 1px solid #4d3319;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

/* Carte interactive posée exactement sur la carte de l'original (117x51) */
.research-card {
  position: absolute;
  width: 117px;
  height: 51px;
  cursor: pointer;
  border-radius: 1px;
  transition: box-shadow 0.15s, background-color 0.15s;
}

.research-card:hover {
  box-shadow: 0 0 0 2px #ffe08a, 0 0 12px rgba(255, 210, 100, 0.6);
}

.research-card.is-selected {
  box-shadow: 0 0 0 2px #ffd36b, 0 0 16px rgba(255, 200, 80, 0.85);
}

.research-card.is-locked {
  background: rgba(0, 0, 0, 0.62);
}

.research-card.is-locked:hover {
  background: rgba(0, 0, 0, 0.45);
}

.research-card.is-researching {
  animation: researchPulse 1.4s ease-in-out infinite;
}

@keyframes researchPulse {
  0%, 100% { box-shadow: 0 0 0 2px #3ccf5a, 0 0 6px rgba(60, 207, 90, 0.4); }
  50% { box-shadow: 0 0 0 2px #7dff94, 0 0 16px rgba(60, 207, 90, 0.9); }
}

/* Nom dans le bandeau noir du bas de la carte */
.research-card-name {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 3px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  color: #f0d78a;
  text-align: center;
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.research-card.is-locked .research-card-name {
  color: #8c8273;
}

.research-card-lock,
.research-card-timer {
  position: absolute;
  left: 50%;
  top: 9px;
  transform: translateX(-50%);
  font-size: 15px;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
}

/* Pastille de niveau : recouvre le cercle blanc de l'original (centre ≈ x+111, y+6) */
.research-level-pip {
  position: absolute;
  left: 96px;
  top: -9px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffffff 0%, #e6eef0 70%, #c9d6da 100%);
  border: 2px solid #4f8fa3;
  box-shadow: 0 0 0 1px #0b2a33, 0 2px 4px rgba(0, 0, 0, 0.8);
  color: #1b1b1b;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.research-card.is-locked .research-level-pip {
  background: radial-gradient(circle at 40% 35%, #8a8a8a, #4a4a4a);
  border-color: #3b3b3b;
  color: #ddd;
}

.research-card.is-maxed .research-level-pip {
  background: radial-gradient(circle at 40% 35%, #ffe9a0, #d6ad38 75%);
  border-color: #7d5904;
}

/* Fiche de détail à droite de l'arbre */
.research-detail-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.research-detail-header h3 {
  color: #ffcc66;
  font-family: 'Cinzel', serif;
  font-size: 16px;
}

#research-selected-lvl {
  color: #bbb;
  font-size: 12px;
}

.research-art-frame {
  width: 230px;
  height: 75px;
  border: 2px solid var(--gold-dark);
  border-radius: 2px;
  background: #000 url('../assets/images/research.png') no-repeat;
  image-rendering: auto;
  align-self: center;
}

.research-desc-box {
  font-size: 11.5px;
  color: #d1b894;
  line-height: 1.35;
}

.research-prereq-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
}

.prereq-row.ok {
  color: #7be08a;
}

.prereq-row.ko {
  color: #ff7b6b;
}

.research-cost-table th,
.research-cost-table td {
  padding: 3px 5px;
  font-size: 11px;
}

.research-buttons-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.research-buttons-col .btn-big-red-build,
.research-buttons-col .btn-big-grey-instant {
  width: 100%;
  padding: 7px 8px;
  font-size: 12px;
}

/* ==========================================================================
   ONGLET RECRUTEMENT / FORMATION DES TROUPES (grille de portraits)
   ========================================================================== */
.training-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.troop-grid-col {
  flex-shrink: 0;
  width: 300px;
  max-height: 470px;
  overflow-y: auto;
  padding-right: 4px;
}

.troop-group-title {
  margin: 8px 0 5px;
  padding-bottom: 3px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #e5c768;
  border-bottom: 1px solid #4d3319;
}

.troop-group-title:first-child {
  margin-top: 0;
}

.troop-grid {
  display: grid;
  grid-template-columns: repeat(4, 64px);
  gap: 8px;
}

.troop-tile {
  position: relative;
  width: 64px;
  height: 64px;
  border: 2px solid #6b5326;
  background: #0c0a08;
  box-shadow: inset 0 0 0 1px #000, 0 2px 4px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.troop-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.troop-tile:hover {
  border-color: #ffd36b;
}

.troop-tile.is-selected {
  border-color: #d11d1d;
  box-shadow: 0 0 0 1px #ffd36b, 0 0 12px rgba(209, 29, 29, 0.8);
}

.troop-tile.is-locked img {
  filter: grayscale(1) brightness(0.45);
}

.troop-tile-count {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 0 4px;
  background: rgba(0, 0, 0, 0.82);
  border-top-left-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #ffd36b;
}

.troop-tile-lock {
  position: absolute;
  left: 3px;
  top: 2px;
  font-size: 13px;
  text-shadow: 0 1px 3px #000;
}

.training-detail-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.troop-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.troop-portrait-frame {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border: 2px solid #b8923a;
  background: #0c0a08;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.8);
}

.troop-portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.troop-head-text h3 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: #ffcc66;
}

.troop-class-chip {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 8px;
  background: linear-gradient(180deg, #a01818, #4a0606);
  border: 1px solid #c9a24a;
  border-radius: 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
}

.troop-owned {
  margin-top: 5px;
  font-size: 11.5px;
  color: #d1b894;
}

.troop-stat-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.troop-stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}

.troop-stat-label {
  width: 92px;
  color: #cfc4ad;
}

.troop-stat-track {
  flex: 1;
  height: 8px;
  background: #050403;
  border: 1px solid #3a2e1d;
}

.troop-stat-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8a6a1c, #e0a62a);
}

.troop-stat-value {
  width: 62px;
  text-align: right;
  color: #fff;
}

.troop-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  font-size: 11.5px;
  color: #d1b894;
}

.troop-extra strong {
  color: #fff;
}

.troop-strong-vs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.troop-chip-img {
  width: 24px;
  height: 24px;
  border: 1px solid #6b5326;
}

.training-qty-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.training-qty-row label {
  margin-right: 4px;
  color: #ffd700;
  font-weight: bold;
  font-size: 13px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #3a2c1c, #140d08);
  border: 1px solid #b8923a;
  border-radius: 2px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.qty-btn:hover {
  border-color: #ffe08a;
}

.qty-input {
  width: 74px;
  height: 26px;
  flex-shrink: 0;
  background: #1c1212;
  border: 1px solid #4a2f1c;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  border-radius: 2px;
  outline: none;
  user-select: text;
}

.qty-input:focus {
  border-color: var(--gold-primary);
}

.qty-btn-max {
  height: 26px;
  padding: 0 10px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #c42a22, #7e0e0e);
  border: 1px solid #e8a85a;
  border-radius: 2px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.qty-slider {
  --fill: 0%;
  flex: 1;
  min-width: 0;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, #e0a62a var(--fill), #050403 var(--fill));
  border: 1px solid #5a4528;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.qty-slider:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.qty-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 22px;
  background: linear-gradient(180deg, #d42a22, #7e0e0e);
  border: 1px solid #ffd36b;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.qty-slider::-moz-range-thumb {
  width: 14px;
  height: 20px;
  background: linear-gradient(180deg, #d42a22, #7e0e0e);
  border: 1px solid #ffd36b;
  border-radius: 3px;
}

.troop-warning {
  min-height: 0;
  font-size: 11px;
  color: #ff7b6b;
}

.troop-warning:empty {
  display: none;
}

.troop-train-btn {
  width: 100%;
  padding: 8px 10px;
}

/* ==========================================================================
   6. ÉCRAN DE SÉLECTION DE FAMILLE (STYLE EXACT REVIEW_2.JPG)
   ========================================================================== */
.unified-auth-modal {
  width: 880px;
  max-width: 95vw;
  transition: all 0.3s ease;
}

.auth-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 12.5px;
  margin-bottom: 12px;
  transition: all 0.25s ease;
}

.auth-status-pill.status-neutral {
  background: linear-gradient(180deg, #221812 0%, #120c08 100%);
  border: 1px solid #4a3622;
  color: #cfb895;
}

.auth-status-pill.status-existing {
  background: linear-gradient(180deg, #30210b 0%, #181005 100%);
  border: 1.5px solid #d4af37;
  color: #fff2a8;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.auth-status-pill.status-new {
  background: linear-gradient(180deg, #112918 0%, #08160c 100%);
  border: 1.5px solid #4caf50;
  color: #a3e9a4;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.25);
}

.auth-row-inputs {
  display: flex;
  gap: 14px;
  margin-bottom: 6px;
}

.auth-row-inputs .flex-1 {
  flex: 1;
}

.auth-input-hint {
  font-size: 11px;
  color: #a8947f;
  margin-top: 4px;
  min-height: 16px;
  line-height: 1.3;
}

.auth-existing-actions {
  margin-top: 8px;
  margin-bottom: 4px;
}

.auth-new-section {
  margin-top: 10px;
  transition: all 0.3s ease;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.auth-form-group label,
.auth-field-label {
  color: #e8d8b8;
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  background: #120b08;
  border: 1px solid #4a3420;
  color: #fff;
  padding: 8px 12px;
  font-size: 13.5px;
  border-radius: 3px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.7);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(214, 173, 56, 0.4), inset 0 1px 3px rgba(0,0,0,0.8);
}

.auth-error-banner {
  background: linear-gradient(180deg, #4d1010 0%, #2b0808 100%);
  border: 1px solid #ff4d4d;
  color: #ffcccc;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.auth-actions-row {
  margin-top: 6px;
}

.btn-auth-primary {
  width: 100%;
  padding: 11px 0;
  background: linear-gradient(180deg, #b81414 0%, #630808 100%);
  border: 1px solid #ff6666;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
  transition: all 0.2s;
}

.btn-auth-primary:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(184, 20, 20, 0.4);
}

.btn-auth-primary:active {
  transform: translateY(1px);
}

.auth-quick-accounts-wrapper {
  margin-top: 10px;
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border: 1px dashed #3d2a1a;
  border-radius: 4px;
  text-align: left;
}

.auth-quick-accounts-label {
  font-size: 11px;
  color: #9c8a77;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.auth-quick-accounts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.auth-account-chip {
  background: linear-gradient(180deg, #2b1f18 0%, #17100b 100%);
  border: 1px solid #5a3e26;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 11px;
  color: #f0dfc8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.auth-account-chip:hover {
  border-color: #ffd700;
  color: #ffd700;
  background: #382618;
  transform: scale(1.03);
}

.auth-switch-link-row {
  margin-top: 10px;
  font-size: 12px;
  color: #a8947f;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-switch-link {
  color: var(--gold-highlight);
  text-decoration: underline;
  font-weight: bold;
  cursor: pointer;
}

.auth-switch-link:hover {
  color: #fff;
  text-shadow: 0 0 6px var(--gold-primary);
}

.login-name-prompt-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.auth-input-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.login-subtitle-note {
  font-size: 11.5px;
  color: #bbb;
  margin-bottom: 12px;
}

.family-5columns-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.family-card-column {
  background: linear-gradient(180deg, #1f1616 0%, #0d0808 100%);
  border: 1.5px solid #4a331e;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.family-card-column:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
  box-shadow: 0 6px 15px rgba(214, 173, 56, 0.3);
}

.family-card-column.selected {
  border-color: #ffd700;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.5);
  background: linear-gradient(180deg, #3d1414 0%, #170808 100%);
}

.family-crest-shield {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.family-name-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-highlight);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.family-motto-text {
  font-size: 10.5px;
  color: #ccc;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 10px;
  flex: 1;
}

.family-bonus-tag {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid var(--gold-primary);
  color: var(--gold-highlight);
  font-size: 10px;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 2px;
  margin-bottom: 10px;
  text-align: center;
}

.btn-join-family {
  width: 100%;
  background: linear-gradient(180deg, #b81414 0%, #6e0909 100%);
  border: 1px solid #ff7b7b;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 0;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 1px;
}

.btn-join-family:hover {
  filter: brightness(1.2);
}

/* ==========================================================================
   VILLE : GRILLE ISOMÉTRIQUE (canvas), BARRE X / Y ET BULLE DE CASE
   ========================================================================== */
#city-map-canvas {
  position: absolute;
  inset: 0;
  width: 980px;
  height: 640px;
  cursor: grab;
  display: block;
}

/* Barre accrochée sous le bandeau, juste après le médaillon (comme l'original) */
.city-nav-coords-bar {
  position: absolute;
  top: 26px;
  left: 196px;
  height: 24px;
  padding: 0 4px 0 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(180deg, #2a2420 0%, #0e0b09 100%);
  border: 1px solid #4a3a1a;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.7);
  z-index: 90;
  font-size: 11px;
  white-space: nowrap;
}

.coord-label {
  color: #e5c768;
  font-weight: 700;
}

.coord-sep {
  color: #777;
}

.coord-input {
  width: 46px;
  height: 18px;
  background: #3a3632;
  border: 1px solid #1a1612;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border-radius: 2px;
  outline: none;
  user-select: text;
  -moz-appearance: textfield;
  appearance: textfield;
}

.coord-input::-webkit-outer-spin-button,
.coord-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.coord-input:focus {
  border-color: var(--gold-primary);
}

.btn-city-red {
  height: 18px;
  padding: 0 12px;
  background: linear-gradient(180deg, #c42a22 0%, #7e0e0e 60%, #5c0606 100%);
  border: 1px solid #e8a85a;
  border-radius: 2px;
  color: #fff;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-city-red:hover:not(:disabled) {
  filter: brightness(1.15);
}

.btn-city-red:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-city-home {
  height: 18px;
  width: 22px;
  background: linear-gradient(180deg, #3a2c1c, #140d08);
  border: 1px solid #b8923a;
  border-radius: 2px;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

/* Bulle d'information au-dessus du pâté sélectionné */
.city-tile-popup {
  position: absolute;
  z-index: 95;
  min-width: 190px;
  max-width: 290px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(30, 24, 20, 0.97), rgba(10, 8, 7, 0.97));
  border: 1px solid #b8923a;
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.85);
  font-size: 11px;
  color: #e8dcc0;
}

.city-tile-popup.hidden {
  display: none;
}

.city-popup-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 800;
  color: #ffd36b;
}

.city-popup-coords {
  color: #a89a88;
  font-size: 10px;
  margin-bottom: 4px;
}

.city-popup-line {
  margin-top: 2px;
}

.city-popup-note {
  color: #a89a88;
  font-style: italic;
}

.city-popup-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.city-popup-actions:empty {
  display: none;
}

.city-popup-actions .btn-city-red {
  height: 22px;
  flex: 1;
}

/* ==========================================================================
   PARCELLES DE FONDATION DU QUARTIER (ZONES ENTIÈREMENT CLIQUABLES AU SOL)
   ========================================================================== */
.neighborhood-slot-zone {
  pointer-events: auto !important;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 130px;
  height: 95px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 15;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Slot vide : dalle de terrain au sol entièrement cliquable sans bouton intrusif */
.neighborhood-slot-zone.slot-empty {
  border: 2px dashed rgba(255, 215, 0, 0.45);
  border-radius: 6px;
  background: rgba(22, 14, 10, 0.25);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.55);
}

.neighborhood-slot-zone.slot-empty:hover {
  border-color: #ffd700;
  border-style: solid;
  background: rgba(255, 215, 0, 0.2);
  box-shadow: 0 0 22px rgba(255, 215, 0, 0.65), inset 0 0 16px rgba(255, 215, 0, 0.3);
  transform: translate(-50%, -52%) scale(1.08);
  z-index: 35;
}

.slot-empty-ground-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}

.slot-ground-number {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 0.5px;
}

.slot-ground-action {
  font-family: 'Cinzel', serif;
  font-size: 9.5px;
  font-weight: 700;
  color: #fff2a8;
  background: rgba(14, 8, 6, 0.85);
  border: 1px solid rgba(214, 173, 56, 0.6);
  border-radius: 2px;
  padding: 1px 6px;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.neighborhood-slot-zone.slot-empty:hover .slot-ground-action {
  background: #ffd700;
  color: #000;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Slot occupé : le sprite officiel isométrique Kabam est érigé sur la dalle */
.neighborhood-slot-zone.slot-occupied {
  width: 135px;
  height: 125px;
}

.slot-building-sprite {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85));
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s;
  pointer-events: none;
}

.neighborhood-slot-zone.slot-occupied:hover {
  transform: translate(-50%, -54%) scale(1.1);
  z-index: 40;
}

.neighborhood-slot-zone.slot-occupied:hover .slot-building-sprite {
  filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.85)) brightness(1.12);
}

.slot-badge-crown {
  position: absolute;
  top: 4px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #9e1414 0%, #4a0606 100%);
  border: 1.5px solid var(--gold-highlight);
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0,0,0,0.9);
  pointer-events: none;
}

.slot-name-tag {
  position: absolute;
  bottom: 2px;
  background: rgba(14, 8, 6, 0.94);
  border: 1px solid var(--gold-primary);
  border-radius: 3px;
  padding: 1px 7px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 800;
  color: var(--gold-highlight);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.85);
  pointer-events: none;
}

/* Chantier en cours sur le slot */
.slot-under-construction {
  border: 2px solid #e65c00 !important;
  background: rgba(30, 15, 5, 0.6) !important;
}

.slot-construction-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(18, 10, 6, 0.92);
  border: 1px solid #ff9900;
  border-radius: 4px;
  padding: 4px 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.9);
  pointer-events: none;
}

.slot-construction-title {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 800;
  color: #ffaa33;
}

/* ==========================================================================
   MODALE DE SÉLECTION DE CONSTRUCTION POUR PARCELLE DU QUARTIER
   ========================================================================== */
.plot-buildings-choice-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.plot-choice-card {
  background: linear-gradient(180deg, #241914 0%, #120b08 100%);
  border: 1.5px solid #4a3420;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.plot-choice-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
  box-shadow: 0 4px 12px rgba(214, 173, 56, 0.4);
}

.plot-choice-icon {
  font-size: 32px;
  margin-bottom: 6px;
}

.plot-choice-title {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-highlight);
  text-align: center;
  margin-bottom: 4px;
}

.plot-choice-desc {
  font-size: 10px;
  color: #bbb;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 8px;
  flex: 1;
}

.plot-choice-cost {
  font-size: 9.5px;
  color: #ffcccc;
  background: rgba(0,0,0,0.5);
  border-radius: 2px;
  padding: 3px 6px;
  width: 100%;
  text-align: center;
  margin-bottom: 8px;
}

.btn-plot-build-select {
  width: 100%;
  background: linear-gradient(180deg, #b81414 0%, #6e0909 100%);
  border: 1px solid #ff7b7b;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 10.5px;
  font-weight: 800;
  padding: 5px 0;
  border-radius: 2px;
  cursor: pointer;
}

.btn-plot-build-select:hover {
  filter: brightness(1.2);
}

/* ==========================================================================
   MODALE TACTIQUE DE GANG (ATTAQUE / DÉTAILS)
   ========================================================================== */
.gang-modal-split-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
}

.gang-art-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.gang-art-box img {
  width: 200px;
  height: 140px;
  object-fit: cover;
  border: 1.5px solid var(--gold-dark);
  border-radius: 4px;
}

.gang-coords-tag {
  background: #140d0d;
  border: 1px solid var(--gold-dark);
  color: var(--gold-highlight);
  font-family: monospace;
  font-size: 10.5px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 2px;
}

.gang-details-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gang-stat-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.g-lbl {
  font-size: 11px;
  color: #ddd;
  font-weight: bold;
}

.g-val {
  font-size: 12px;
}

.gang-loot-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: rgba(14, 10, 10, 0.85);
  border: 1px solid #3d2616;
  border-radius: 3px;
  padding: 6px;
  font-size: 10px;
  font-weight: bold;
}

.gang-defenders-list {
  background: rgba(14, 10, 10, 0.85);
  border: 1px solid #3d2616;
  border-radius: 3px;
  padding: 6px 10px;
  font-size: 11px;
  color: #ffcccc;
}


.city-popup-free {
  color: #7be08a;
}

.city-popup-drops {
  color: #d1b894;
  font-size: 10px;
}


/* ==========================================================================
   FENÊTRE D'AMÉLIORATION D'UN BÂTIMENT (façon original)
   ========================================================================== */
#building-modal .kabam-modal-box:not(.modal-wide) {
  width: 560px;
}

.bm-top {
  display: flex;
  gap: 14px;
  align-items: stretch;
  margin-top: 10px;
}

.bm-art {
  width: 190px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: radial-gradient(ellipse at 50% 60%, #2a2219 0%, #0f0b08 75%);
  border: 1px solid #4d3319;
  border-radius: 3px;
}

.bm-art img {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.8));
}

.bm-table {
  flex: 1;
  align-self: flex-start;
}

.bm-table th,
.bm-table td {
  padding: 5px 8px;
  font-size: 12px;
}

.bm-prereq {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 6px;
  font-size: 11px;
  min-height: 0;
}

.bm-prereq:empty {
  display: none;
}

.bm-levels {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 12px;
}

.bm-level-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  min-height: 62px;
  background: linear-gradient(180deg, #1c1816 0%, #0d0b0a 100%);
  border: 1px solid #5a4528;
  box-shadow: inset 0 0 0 1px #000;
}

.bm-level-num {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  color: #cfc4ad;
  font-size: 9px;
  letter-spacing: 1px;
  border-right: 1px solid #3a2e1d;
  padding-right: 12px;
}

.bm-level-num strong {
  font-family: 'Oswald', sans-serif;
  font-size: 26px;
  line-height: 1;
  color: #fff;
}

.bm-level-stats {
  font-size: 12px;
  line-height: 1.5;
  color: #e8dcc0;
}

.bm-level-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  font-size: 26px;
  color: #e0a62a;
  text-shadow: 0 0 8px rgba(224, 166, 42, 0.6);
}

.bm-levels.is-maxed .bm-level-arrow {
  color: #555;
  text-shadow: none;
}

.bm-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #14100e, #0a0807);
  border: 1px solid #3a2e1d;
}

.bm-actions .btn-big-red-build,
.bm-actions .btn-big-grey-instant {
  flex: 1;
}


/* Nom du quartier affiché en haut de la vue Quartier */
.neighborhood-name-tag {
  position: absolute;
  top: 26px;
  left: 196px;
  padding: 2px 22px;
  background: linear-gradient(180deg, #2a2420, #0e0b09);
  border: 1px solid #b8923a;
  border-top: none;
  border-radius: 0 0 4px 4px;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #ffd36b;
  z-index: 60;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
}

/* Dossier : rapports de bataille */
.rep-layout { display: flex; gap: 12px; min-height: 340px; max-height: 60vh; }
.rep-list { width: 260px; overflow-y: auto; border: 1px solid rgba(214,173,56,.4); background: rgba(0,0,0,.35); }
.rep-item { padding: 8px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: #ccc; border-bottom: 1px solid rgba(255,255,255,.06); }
.rep-item.unread { font-weight: bold; color: #fff; }
.rep-item.active { background: rgba(214,173,56,.2); }
.rep-item small { color: #888; white-space: nowrap; }
.rep-detail { flex: 1; overflow-y: auto; padding: 4px 8px; color: #ddd; font-size: 13px; }
.rep-head { display: flex; justify-content: space-between; padding: 8px 10px; border-left: 4px solid; margin-bottom: 8px; }
.rep-head.rep-won { border-color: #4caf50; background: rgba(76,175,80,.12); }
.rep-head.rep-lostbattle { border-color: #c62828; background: rgba(198,40,40,.12); }
.rep-head span { color: #999; font-size: 11px; }
.rep-outcome { margin: 4px 0 10px; font-style: italic; color: #bbb; }
.rep-side h4, .rep-rewards h4 { margin: 8px 0 4px; color: var(--gold-primary); font-size: 12px; text-transform: uppercase; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rep-table th, .rep-table td { padding: 3px 6px; text-align: right; border-bottom: 1px solid rgba(255,255,255,.08); }
.rep-table th:first-child, .rep-table td:first-child { text-align: left; }
.rep-table tfoot td { font-weight: bold; border-top: 1px solid rgba(214,173,56,.5); }
.rep-lost { color: #ef5350; }
.rep-rewards { display: flex; gap: 32px; margin-top: 10px; }
.rep-loot { display: inline-block; margin-right: 10px; font-weight: bold; }
.rep-empty { color: #777; font-style: italic; }

/* Sélection des troupes avant l'assaut */
.army-picker { margin-top: 12px; border: 1px solid #3d2616; background: rgba(14,10,10,.85); border-radius: 3px; padding: 8px 10px; }
.army-picker-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.army-mini-btn { background: #2a1a12; color: var(--gold-highlight); border: 1px solid var(--gold-dark); font-size: 10px; padding: 2px 8px; cursor: pointer; margin-left: 4px; }
.army-mini-btn:hover { background: #3d2616; }
#army-picker-rows { max-height: 170px; overflow-y: auto; }
.army-row { display: grid; grid-template-columns: 28px 100px 1fr 64px 60px; align-items: center; gap: 8px; padding: 2px 0; font-size: 11px; color: #ddd; }
.army-row img { width: 28px; height: 28px; object-fit: contain; }
.army-num { width: 64px; background: #140d0d; color: #fff; border: 1px solid var(--gold-dark); padding: 2px 4px; font-size: 11px; }
.army-max { color: #999; }
.army-picker-total { margin-top: 6px; font-size: 11px; color: var(--gold-highlight); }
.army-empty { color: #999; font-style: italic; font-size: 11px; }

/* Production horaire sous chaque ressource */
.res-stack { display: flex; flex-direction: column; line-height: 1.1; }
.res-rate { font-size: 9.5px; font-weight: 700; color: #7fe36b; letter-spacing: 0.2px; }
.res-rate.negative { color: #ff7d6e; }
