/* [73-building-upgrade] Fenêtre d'amélioration de bâtiment, petits éléments du quartier et de l'attaque */
/* ==========================================================================
   FENÊTRE D'AMÉLIORATION D'UN BÂTIMENT (façon original)
   ========================================================================== */
#building-modal .game-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%, #27221c 0%, #0e0c09 75%);
  border: 1px solid #433523;
  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, #17191b 0%, #0b0c0c 100%);
  border: 1px solid #504331;
  box-shadow: inset 0 0 0 1px #000;
}

.bm-level-num {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  color: #c9bfb3;
  font-size: 9px;
  letter-spacing: 1px;
  border-right: 1px solid #342d23;
  padding-right: 12px;
}

.bm-level-num strong {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 26px;
  line-height: 1;
  color: #fff;
}

.bm-level-stats {
  font-size: 12px;
  line-height: 1.5;
  color: #e0d6c8;
}

.bm-level-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  font-size: 26px;
  color: #bd8d4d;
  text-shadow: 0 0 8px rgba(189, 141, 77, 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, #0f1113, #080809);
  border: 1px solid #342d23;
}

.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, #222528, #0d0c0a);
  border: 1px solid var(--gold-old);
  border-top: none;
  border-radius: 0 0 4px 4px;
  font-family: 'Limelight', serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--gold-amber);
  z-index: 60;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
}

/* Dossier : rapports de bataille */
.rep-layout { display: flex; gap: 14px; min-height: 380px; max-height: 65vh; }
.rep-sidebar { width: 280px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.rep-actions-bar { display: flex; gap: 6px; }
.rep-action-btn { flex: 1; padding: 6px 8px; font-family: 'Josefin Sans', sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; background: rgba(15,15,15,0.7); border: 1px solid rgba(184, 142, 86,0.4); color: var(--gold-primary); cursor: pointer; border-radius: 2px; transition: all .15s; }
.rep-action-btn:hover { background: rgba(184, 142, 86,0.18); color: var(--gold-amber); border-color: var(--gold-amber); }
.rep-action-btn-danger { border-color: rgba(178, 72, 60,0.5); color: #e4aba5; }
.rep-action-btn-danger:hover { background: rgba(178, 72, 60,0.25); color: #e97568; border-color: #e97568; }
.rep-list { flex: 1; overflow-y: auto; border: 1px solid rgba(184, 142, 86,.4); background: rgba(0,0,0,.35); border-radius: 2px; }
.rep-item { padding: 8px 10px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: #ccc; border-bottom: 1px solid rgba(255,255,255,.06); transition: background .12s; }
.rep-item:hover { background: rgba(255,255,255,0.04); }
.rep-item.unread { font-weight: bold; color: #fff; border-left: 3px solid var(--gold-bright); }
.rep-item.active { background: rgba(184, 142, 86,.2); border-left: 3px solid var(--gold-primary); }
.rep-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rep-item-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-item-main small { color: #888; font-size: 11px; }
.rep-item-delete { background: transparent; border: none; color: #777; font-size: 13px; font-weight: bold; cursor: pointer; padding: 2px 6px; border-radius: 3px; line-height: 1; transition: all .15s; }
.rep-item-delete:hover { color: #e97568; background: rgba(178, 72, 60,0.25); }
.rep-detail { flex: 1; overflow-y: auto; padding: 4px 10px; color: #ddd; font-size: 13px; display: flex; flex-direction: column; }
.rep-detail-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); }
.rep-btn-del-single { background: rgba(178, 72, 60,0.15); border: 1px solid rgba(178, 72, 60,0.5); color: #e4aba5; font-family: 'Josefin Sans', sans-serif; font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; padding: 5px 12px; cursor: pointer; border-radius: 2px; transition: all .15s; }
.rep-btn-del-single:hover { background: rgba(178, 72, 60,0.3); color: #e97568; border-color: #e97568; }
.rep-banner { text-align: center; padding: 10px 0 6px; margin: -4px -8px 0; border-bottom: 2px solid; }
.rep-banner-won { background: linear-gradient(180deg, rgba(28, 72, 56,.6) 0%, rgba(14, 36, 28,.3) 100%); border-color: #58a387; }
.rep-banner-lost { background: linear-gradient(180deg, rgba(43, 98, 79,.6) 0%, rgba(21, 49, 40,.3) 100%); border-color: #b2483c; }
.rep-banner-title { font-family: 'Josefin Sans', sans-serif; font-size: 28px; font-weight: 700; letter-spacing: 6px; text-transform: uppercase; }
.rep-banner-won .rep-banner-title { color: #20dc97; text-shadow: 0 0 12px rgba(88, 163, 135,.6); }
.rep-banner-lost .rep-banner-title { color: #e8695b; text-shadow: 0 0 12px rgba(178, 72, 60,.6); }

.rep-versus { display: flex; align-items: flex-start; justify-content: space-between; padding: 12px 0 8px; gap: 8px; }
.rep-fighter { text-align: center; flex: 1; }
.rep-fighter-crest { font-size: 36px; margin-bottom: 2px; }
.rep-fighter-name { font-family: 'Josefin Sans', sans-serif; font-size: 15px; font-weight: 600; color: #ddcebb; }
.rep-fighter-family { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.rep-fighter-stat { font-size: 12px; color: #bbb; }
.rep-fighter-winner .rep-fighter-name { color: var(--gold-bright); }

.rep-center-badge { text-align: center; flex: 0 0 120px; padding-top: 4px; }
.rep-respect-icon { font-size: 32px; }
.rep-respect-label { font-size: 10px; color: var(--gold-old); text-transform: uppercase; letter-spacing: 1px; margin: 2px 0; }
.rep-respect-val { font-family: 'Josefin Sans', sans-serif; font-size: 22px; font-weight: 700; color: var(--gold-bright); text-shadow: 0 0 8px rgba(207, 138, 48,.4); }

.rep-tabs { display: flex; gap: 0; margin: 8px -8px 0; border-bottom: 2px solid rgba(184, 142, 86,.4); }
.rep-tab { flex: 1; padding: 7px 0; text-align: center; font-family: 'Josefin Sans', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 1px; color: #999; background: rgba(0,0,0,.3); border: none; cursor: pointer; text-transform: uppercase; transition: all .15s; }
.rep-tab:hover { color: #ddd; background: rgba(184, 142, 86,.1); }
.rep-tab.active { color: var(--gold-amber); background: rgba(184, 142, 86,.2); border-bottom: 2px solid var(--gold-amber); margin-bottom: -2px; }

.rep-tab-content { padding: 10px 0 4px; }
.rep-tab-content.hidden { display: none; }

.rep-flavor { font-style: italic; color: #bbb; margin: 0 0 10px; font-size: 12px; line-height: 1.5; }

.rep-loot-box { background: rgba(0,0,0,.3); border: 1px solid rgba(184, 142, 86,.3); border-radius: 3px; padding: 8px 12px; }
.rep-loot-box h4 { margin: 0 0 6px; color: var(--gold-primary); font-size: 13px; }
.rep-loot-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; color: #ddd; border-bottom: 1px solid rgba(255,255,255,.05); }
.rep-loot-row span { flex: 1; margin-left: 6px; }
.rep-loot-row strong { color: #20dc97; }

.rep-date { text-align: right; font-size: 10px; color: #666; margin-top: 8px; }

.rep-armies { display: flex; gap: 12px; }
.rep-army-col { flex: 1; }
.rep-army-col h4 { margin: 0 0 6px; color: var(--gold-primary); font-size: 12px; }

.rep-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.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 th { color: var(--gold-old); font-size: 10px; text-transform: uppercase; }
.rep-lost { color: #db7064; }
.rep-surv { color: #20dc97; }
.rep-empty { color: #777; font-style: italic; }

/* Sélection des troupes avant l'assaut */
.army-picker { margin-top: 12px; border: 1px solid #362b1d; background: rgba(11, 12, 13,.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: #251f17; 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: #362b1d; }
.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: #0e1013; 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: #7ad4b3; letter-spacing: 0.2px; }
.res-rate.negative { color: #ed8b80; }

/* Bouton Démolir */
.btn-big-demolish {
  display: block; width: 100%; margin-top: 8px; padding: 10px 16px;
  background: linear-gradient(180deg, #38735f 0%, #21493c 100%);
  border: 1px solid #e8695b; border-radius: 6px;
  color: #f9d9d6; font-weight: 700; font-size: 12px; text-transform: uppercase;
  cursor: pointer; letter-spacing: 1px;
}
.btn-big-demolish:hover { background: linear-gradient(180deg, #498772 0%, #2a5849 100%); }
/* action rare : petit bouton discret à côté d'Améliorer, pas un gros bouton */
.bm-actions .btn-big-demolish { flex: 0 0 auto; width: auto; margin-top: 0; align-self: center; padding: 6px 12px; font-size: 10px; opacity: 0.85; }
.bm-actions .btn-big-demolish:hover { opacity: 1; }

/* File d'entraînement */
.training-queue-box { margin-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 8px; }
.training-queue-box h4 { margin: 0 0 6px; font-size: 11px; color: #bbb; text-transform: uppercase; letter-spacing: 1px; }
.training-queue-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px; margin-bottom: 3px; background: rgba(0,0,0,0.25); border-radius: 4px;
  font-size: 11px; color: #ddd;
}
.btn-cancel-train {
  background: none; border: none; color: #ec8579; cursor: pointer;
  font-size: 13px; padding: 2px 6px;
}
.btn-cancel-train:hover { color: #e65c4c; }

/* -------------------------------------------------------------------------
   MARCH CAPACITY BADGE (Attaque)
   ------------------------------------------------------------------------- */
.march-cap-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(182, 140, 85, 0.4);
  border-radius: 4px;
  font-size: 11px;
  color: #bbb;
  margin-right: 6px;
}
.march-cap-badge strong {
  color: var(--gold-bright);
  font-size: 12px;
}
