:root {
  color-scheme: dark;
  --ink: #e8e0cc;
  --muted: #9a968c;
  --panel: #1d2323;
  --line: #3b423e;
  --olive: #8f9c6a;
  --olive-dark: #596445;
  --amber: #d6ac62;
  --danger: #b96b59;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, #34403a 0, transparent 34rem),
    linear-gradient(145deg, #0c1011, #171b1b 60%, #0b0d0e);
  font-family: "Segoe UI", system-ui, sans-serif;
}
header {
  max-width: 1780px;
  margin: auto;
  padding: 34px 34px 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  border-bottom: 1px solid #343936;
}
.headerActions {
  display: grid;
  justify-items: end;
  gap: 10px;
}
.headerStatus {
  color: var(--muted);
  font-size: .76rem;
  text-align: right;
  max-width: 24rem;
}
h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 0;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: .9;
  letter-spacing: .025em;
  text-transform: uppercase;
}
h2 { margin-bottom: 8px; font-weight: 650; }
.eyebrow {
  margin-bottom: 8px;
  color: var(--amber);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .17em;
}
main {
  max-width: 1780px;
  margin: auto;
  padding: 24px 34px 70px;
}
.card {
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(120deg, rgba(255,255,255,.025), transparent 45%),
    var(--panel);
  box-shadow: 0 12px 35px rgba(0,0,0,.2);
}
.split, .players {
  display: grid;
  grid-template-columns: repeat(2, minmax(520px, 1fr));
  gap: 28px;
}
.split form {
  min-width: 0;
  overflow: hidden;
}
form { display: grid; gap: 14px; }
input, select, textarea {
  width: 100%;
  min-width: 0;
}
.assignmentPreview {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
}
input, select, textarea, button {
  min-height: 42px;
  border: 1px solid #4b524d;
  border-radius: 3px;
  color: var(--ink);
  background: #111515;
  font: inherit;
}
input, select, textarea { padding: 9px 11px; }
textarea { resize: vertical; }
button {
  padding: 9px 16px;
  cursor: pointer;
  border-color: var(--olive);
  background: linear-gradient(#849260, #657247);
  color: #10130d;
  font-weight: 800;
}
button:hover { filter: brightness(1.1); }
button:disabled {
  cursor: default;
  filter: grayscale(1);
  opacity: .45;
}
button.secondary { color: var(--ink); background: #242a28; }
button.quiet {
  border-color: #555;
  color: var(--muted);
  background: transparent;
}
button.selected {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(214,172,98,.18);
}
.status {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr auto auto;
  gap: 24px;
  align-items: center;
}
.code {
  color: var(--amber);
  font-size: 1.8rem;
  letter-spacing: .15em;
}
.playerCard {
  padding: 18px;
  border-left: 4px solid var(--olive-dark);
  background: #161b1a;
}
.playerCard.me { border-left-color: var(--amber); }
.playerHead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.resources { display: flex; flex-wrap: wrap; gap: 7px; }
.resource {
  padding: 5px 8px;
  border: 1px solid #404742;
  color: #c7c2b6;
  font-size: .78rem;
}
.ownerMapping {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .78rem;
}
.playerNumber {
  width: 64px;
  min-height: 32px;
  padding: 4px 7px;
}
.commanderPlan {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #343b38;
  color: var(--muted);
  font-size: .72rem;
}
.commanderResearch,
.commanderUnits {
  display: flex;
  max-height: 92px;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
  overflow: auto;
}
.commanderResearch span,
.commanderUnits span {
  padding: 3px 6px;
  border: 1px solid #424a45;
  background: #101413;
}
.commanderResearch span { border-color: #566044; color: #cbd2b1; }
.commanderPlan em { color: #777e79; }
.strategicHelp {
  max-width: 1000px;
  color: var(--muted);
  font-size: .82rem;
}
.strategicStats {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 7px;
}
.strategicMap {
  position: relative;
  width: 100%;
  height: 620px;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid #625c48;
  background:
    linear-gradient(rgba(10,13,12,.1), rgba(10,13,12,.34)),
    url("/assets/europe-war-map.png") center / cover no-repeat,
    #151612;
  box-shadow: inset 0 0 80px #000a;
}
.strategicMap .leaflet-tile-pane {
  filter: sepia(.62) saturate(.58) brightness(.62) contrast(1.15);
}
.strategicMap .leaflet-control-zoom a {
  color: var(--ink);
  background: #171b19;
  border-color: #4b524d;
}
.leafletSupplyLine { stroke: #d8cda7; stroke-width: 2; opacity: .58; }
.leafletFrontLine { stroke: #d6ac62; stroke-width: 4; opacity: .9; }
.mapCityMarker { width: auto !important; height: auto !important; }
.mapCityMarker .mapCityDotOnly {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: -5px;
  margin-top: -5px;
  border: 2px solid #b1a480;
  background: #8d8776;
  box-shadow: 0 0 0 2px #0008;
}
.mapCityMarker .mapCityDotOnly.player { background: #778b58; }
.mapCityMarker .mapCityDotOnly.enemy { background: #a34b42; }
.mapCityMarker .mapCityDotOnly.target { background: var(--amber); border-color: #f2d28a; }
.mapCityLabel {
  display: block;
  width: max-content;
  padding: 3px 6px 3px 16px;
  position: relative;
  border: 1px solid #8d846a;
  background: #151918e8;
  color: #eee4cb;
  font-size: .66rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 7px #000b;
}
.mapCityLabel.conflict {
  border-color: #d9b454;
  box-shadow:
    0 0 0 1px #d9b45488,
    0 0 16px #d9b45430,
    0 2px 7px #000b;
}
.mapCityLabel::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #8d8776;
}
.mapCityLabel.player::before { background: #778b58; }
.mapCityLabel.enemy::before { background: #a34b42; }
.mapCityLabel.target { border-color: var(--amber); }
.mapCityLabel.target::before { background: var(--amber); }
.mapCityLabel.keyCity::after { content: " ★"; color: var(--amber); }
.mapCityLabel.conflict::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid #d9b45490;
  border-radius: 3px;
  box-shadow: 0 0 18px #d9b45440;
  pointer-events: none;
}
.strategicSelection {
  min-height: 42px;
  padding: 10px 0 4px;
  color: var(--muted);
}
.strategicSelection strong { color: var(--ink); }
.strategicChoose { min-height: 30px; margin-left: 12px; padding: 3px 9px; }
.officerDoctrine { margin: -4px 0 12px; color: var(--muted); font-size: .75rem; }
.doctrineStar {
  position: absolute;
  z-index: 2;
  top: 3px;
  right: 5px;
  color: var(--amber);
  font-size: 1rem;
  text-shadow: 0 1px 3px #000;
}
.unitVeterancy {
  margin-left: auto;
  color: var(--amber);
  font-size: .62rem;
  white-space: nowrap;
}
#strategicLines,
#strategicCities {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#strategicLines { pointer-events: none; }
#strategicLines line {
  stroke: #bbb08c;
  stroke-width: .22;
  stroke-dasharray: .7 .55;
  opacity: .5;
  vector-effect: non-scaling-stroke;
}
#strategicLines line.frontLine {
  stroke: #d6ac62;
  stroke-width: .38;
  opacity: .9;
}
.strategicCity {
  position: absolute;
  min-height: 25px;
  padding: 4px 7px 4px 20px;
  transform: translate(-10px, -50%);
  border-color: #827b67;
  background: #151918e8;
  color: #e9e1cd;
  font-size: .65rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px #000b;
}
.strategicCity::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translateY(-50%);
  border: 1px solid #e4d6b5;
  border-radius: 50%;
  background: #777;
}
.strategicCity.player::before { background: #778b58; }
.strategicCity.enemy::before { background: #a34b42; }
.strategicCity.neutral::before { background: #8d8776; }
.strategicCity.keyCity::after { content: " ★"; color: var(--amber); }
.strategicCity.target {
  z-index: 2;
  border-color: var(--amber);
  box-shadow: 0 0 0 2px #d6ac6240, 0 3px 12px #000;
}
.strategicCity.target::before { background: var(--amber); }
.strategicCity:disabled {
  cursor: default;
  filter: none;
  opacity: 1;
}
.strategicLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: .72rem;
}
.strategicLegend span { display: inline-flex; align-items: center; gap: 6px; }
.cityDot { width: 9px; height: 9px; border-radius: 50%; background: #777; }
.cityDot.player { background: #778b58; }
.cityDot.enemy { background: #a34b42; }
.cityDot.neutral { background: #8d8776; }
.cityDot.target { background: var(--amber); }
.strategicEvents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
  color: #b9b2a1;
  font-size: .75rem;
}
.sectionTitle {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}
.sectionTitle input { width: min(340px, 45vw); }
.treeHelp {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: .76rem;
}
.treeHelp span { display: inline-flex; align-items: center; gap: 5px; }
.legendDot { width: 9px; height: 9px; border-radius: 50%; background: #555; }
.legendDot.available { background: var(--amber); }
.legendDot.unlocked { background: var(--olive); }
.legendDot.locked { background: #424846; }
.researchViewport {
  height: 610px;
  overflow: auto;
  border: 1px solid #424943;
  background: #0d1110;
  scrollbar-color: #596445 #111514;
}
.research {
  min-width: 100%;
  min-height: 100%;
}
.researchCanvas {
  position: relative;
  min-width: 100%;
  min-height: 100%;
  background:
    linear-gradient(rgba(7,10,9,.62), rgba(7,10,9,.76)),
    url("/api/assets/research-map") center top / cover fixed,
    #101412;
}
.researchLines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.researchLines path {
  fill: none;
  stroke: #414744;
  stroke-width: 3;
  opacity: .8;
}
.researchLines path.unlocked { stroke: #7f8c5e; }
.node {
  position: absolute;
  width: 148px;
  height: 76px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  border: 1px solid #444a47;
  border-left: 4px solid #4b504e;
  background: linear-gradient(145deg, #242826f4, #111513f4);
  box-shadow: 0 6px 18px #0008;
  transition: opacity .15s, filter .15s, border-color .15s;
}
.node.unlocked {
  border-color: var(--olive);
  background: linear-gradient(145deg, #38422cf2, #182016f5);
}
.node.available { border-color: var(--amber); }
.node.locked { filter: grayscale(.85); opacity: .72; }
.node.searchMiss { opacity: .16; }
.node.draggable { cursor: grab; }
.nodeIdentity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.node strong {
  overflow: hidden;
  font-size: .74rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.node small { color: var(--muted); font-size: .64rem; }
.nodeActions { display: flex; gap: 7px; align-items: center; }
.nodeActions button {
  min-height: 24px;
  padding: 2px 7px;
  font-size: .65rem;
}
.stageUnlock { margin-left: auto; color: var(--amber) !important; font-weight: 800; }
.nodeUnitCost { margin-left: auto; color: #d9bb79 !important; font-weight: 800; }
.unitVisual {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #515954;
  background: #121716;
}
.node .unitVisual {
  flex-basis: 30px;
  width: 30px;
  height: 38px;
}
.unitVisual .unitGlyph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.unitPortrait {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 2px;
  object-fit: contain;
  object-position: center;
}
.unitGlyph {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #5a605c;
  background: #171c1a;
  color: #d5cdb8;
  font-family: Georgia, serif;
  font-size: 1rem;
}
.unitGlyph.command { color: var(--amber); }
.unitGlyph.infantry { color: #c5d6a1; }
.unitGlyph.artillery { color: #e1bc7d; }
.unitGlyph.tank { color: #b5c5a2; }
.unitGlyph.vehicle { color: #aebfc0; }
.unitGlyph.support { color: #d0aaa0; }
.unitPool {
  max-height: 245px;
  margin-bottom: 14px;
  padding: 10px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 7px;
  border: 1px solid #3c433f;
  background: #0f1312;
}
.unitCard {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #3f4642;
  background: linear-gradient(135deg, #242a27, #141817);
}
.unitCard strong {
  min-width: 0;
  overflow: hidden;
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poolUnit { min-height: 48px; padding: 6px; position: relative; }
.poolUnit strong { padding-right: 43px; }
.poolUnit.draggable { cursor: grab; }
.poolUnit.draggable:hover { border-color: var(--amber); }
.unitSupplyCost {
  flex: 0 0 auto;
  color: #d9bb79;
  font-size: .62rem;
  font-weight: 800;
  white-space: nowrap;
}
.poolUnit .unitSupplyCost {
  position: absolute;
  top: 3px;
  right: 4px;
}
.captureBadge {
  position: absolute;
  right: 3px;
  bottom: 2px;
  color: var(--amber);
  font-size: .56rem;
  font-weight: 800;
}
.deployment {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.stage {
  min-height: 180px;
  padding: 11px;
  border: 1px dashed #59625b;
  background: #111515;
  transition: background .15s, border-color .15s;
}
.stage.locked { opacity: .55; filter: grayscale(.8); }
.stage.dragOver { border-color: var(--amber); background: #242a1d; }
.stageHead { display: flex; justify-content: space-between; gap: 7px; }
.stage h3 { margin: 0 0 10px; color: var(--amber); }
.stageState { color: var(--muted); font-size: .56rem; font-weight: 800; }
.stageRequirement { color: var(--muted); font-size: .7rem; }
.stageItem {
  justify-content: space-between;
  margin: 5px 0;
  padding: 5px;
  color: #c8c3b9;
}
.stageItem button {
  margin-left: auto;
  min-height: 22px;
  padding: 0 6px;
  border-color: var(--danger);
  background: transparent;
  color: var(--danger);
}
.capturesPanel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.captures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
}
.captureItem {
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto 2fr;
  align-items: center;
  gap: 8px;
  border: 1px solid #404742;
  background: #121616;
}
.captureItem strong { overflow-wrap: anywhere; }
.captureItem select,
.captureItem button { min-height: 34px; }
.maps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.mapVote {
  min-height: 95px;
  background: linear-gradient(140deg, #27302c, #151a19);
  color: var(--ink);
}
.chosen {
  margin: 18px 0 0;
  color: var(--amber);
  font-size: 1.15rem;
  font-weight: 750;
}
.rewardForm {
  grid-template-columns: repeat(5, 1fr) auto;
  align-items: end;
}
.manualResult { margin-top: 18px; color: var(--muted); }
.manualResult summary { cursor: pointer; color: #c8c1af; }
.manualResult .rewardForm { margin-top: 14px; }
.captureImport {
  margin: 12px 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}
.history {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: .88rem;
}
.saveDock {
  position: sticky;
  left: 18px;
  bottom: 16px;
  width: fit-content;
  max-width: 100%;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: #101514f2;
  box-shadow: 0 10px 30px #0007;
  z-index: 5;
}
.saveDock span {
  color: var(--muted);
  font-size: .76rem;
}
#toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 430px;
  padding: 13px 17px;
  border-left: 4px solid var(--danger);
  background: #241b19;
  box-shadow: 0 10px 35px #0008;
  opacity: 0;
  transform: translateY(15px);
  transition: .2s ease;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: none; }
@media (max-width: 850px) {
  header, main { padding-left: 18px; padding-right: 18px; }
  .split, .players, .maps { grid-template-columns: 1fr; }
  .status { grid-template-columns: 1fr 1fr; }
  .deployment { grid-template-columns: 1fr; }
  .rewardForm { grid-template-columns: 1fr 1fr; }
  .strategicMap { min-height: 300px; }
  .strategicEvents { grid-template-columns: 1fr; }
}

/* Réseau stratégique détaillé */
.strategicResources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 8px 0 10px;
  color: #c9c0aa;
  font-size: .72rem;
}
.strategicResourceLine {
  padding: 5px 8px;
  border: 1px solid #414842;
  background: #111514;
}
.strategicResourceLine.player { border-color: #60724d; }
.strategicResourceLine.enemy { border-color: #76453f; }
.strategicToolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0;
  color: var(--muted);
  font-size: .72rem;
}
.strategicToolbar label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.strategicToolbar input { accent-color: var(--amber); }
.leafletRoadLine {
  stroke: #d0c49d;
  stroke-width: 2;
  opacity: .5;
}
.leafletRoadLine.local { stroke-dasharray: 4 5; opacity: .34; }
.leafletRoadLine.major { stroke-width: 2.2; opacity: .55; }
.leafletRoadLine.strategic { stroke: #e0c06b; stroke-width: 3.1; opacity: .8; }
.leafletRailLine {
  stroke: #303532;
  stroke-width: 4.5;
  stroke-dasharray: 2 5;
  opacity: .88;
}
.leafletSeaLine {
  stroke: #7898a2;
  stroke-width: 2.6;
  stroke-dasharray: 8 6;
  opacity: .78;
}
.mapCityMarker .mapCityDotOnly.reachable {
  box-shadow: 0 0 0 3px #d6ac6255, 0 0 9px #d6ac6266;
}
.mapCityLabel.headquarters {
  border-color: #e6d38d;
  background: #1d261ce8;
  box-shadow: 0 0 0 2px #9eb66b55, 0 2px 9px #000d;
}
.mapCityLabel.headquarters::before { background: #c5df86; }
.strategicPosition {
  padding-top: 9px;
  color: #d1c7ac;
  font-size: .76rem;
}
.cityInfrastructure,
.cityStockpile,
.cityHistory {
  margin-top: 5px;
  color: #b6ad99;
  font-size: .72rem;
}
.cityStockpile { color: #d3c49d; }
.cityHistory { font-style: italic; }
.strategicMove,
.strategicChoose {
  min-height: 30px;
  margin: 8px 8px 0 0;
  padding: 3px 9px;
}
.strategicMove { border-color: #71855b; }
.lineKey {
  display: inline-block;
  width: 22px;
  height: 0;
  border-top: 2px solid #d0c49d;
}
.lineKey.rail { border-top: 3px dashed #555e59; }
.lineKey.sea { border-top: 2px dashed #7898a2; }
.convoyPanel {
  margin: 8px 0 12px;
  padding: 9px;
  border: 1px solid #3b403d;
  background: #111514;
}
.strategicConvoys {
  display: grid;
  gap: 5px;
}
.convoyItem {
  padding: 5px 7px;
  border-left: 3px solid #788b59;
  background: #171b19;
  color: #c8bfaa;
  font-size: .72rem;
}
.convoyItem.enemy { border-left-color: #a34b42; }
.convoyItem.empty { border-left-color: #575c57; color: #777e79; }

/* Formations stratégiques mobiles */
.strategicUnitsPanel {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #3c433e;
  background: #101412;
}
.strategicUnitsHead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}
.strategicUnitsHead p { margin: 0; }
.strategicUnitsHead > div > p:last-child {
  max-width: 720px;
  color: var(--muted);
  font-size: .72rem;
}
.strategicUnitColors {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: .68rem;
}
.strategicUnitColors span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.unitColor {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #788b59;
}
.unitColor.enemy { background: #c94138; }
.unitColor.ally { background: #2f70bd; }
.strategicUnitRoster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 6px;
}
.strategicFormationCard {
  min-height: 72px;
  padding: 7px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #465045;
  border-left: 4px solid #788b59;
  background: #171c18;
  color: #ddd5c2;
  text-align: left;
}
.strategicFormationCard.enemy { border-left-color: #c94138; }
.strategicFormationCard.ally { border-left-color: #2f70bd; }
.strategicFormationCard.selected {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px #d6ac6235;
}
.strategicFormationCardVisual {
  width: 58px;
  height: 55px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0c100e;
}
.strategicFormationCardVisual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.strategicFormationCardGlyph {
  font-size: 2rem;
  line-height: 1;
}
.strategicFormationCard.player .strategicFormationCardGlyph { color: #93a96b; }
.strategicFormationCard.enemy .strategicFormationCardGlyph { color: #d65a50; }
.strategicFormationCard.ally .strategicFormationCardGlyph { color: #5794dc; }
.strategicFormationIdentity,
.strategicFormationPower {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.strategicFormationIdentity strong {
  overflow: hidden;
  font-size: .73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strategicFormationIdentity small,
.strategicFormationPower small {
  color: var(--muted);
  font-size: .62rem;
  line-height: 1.18;
}
.strategicFormationPower {
  max-width: 170px;
  text-align: right;
}
.strategicFormationPower strong {
  color: #dac58d;
  font-size: .64rem;
  white-space: nowrap;
}
.strategicUnitSelection {
  min-height: 42px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #343a36;
  background: #131715;
  color: #bdb5a3;
  font-size: .72rem;
}
.strategicUnitSelection strong { color: #ede4d1; }
.strategicFormationMovement,
.strategicFormationStats,
.strategicFormationHistory {
  margin-top: 5px;
}
.strategicFormationMovement { color: #d8c17f; }
.strategicFormationHistory { color: #888f88; font-style: italic; }
.strategicUnitMove {
  min-height: 30px;
  margin: 8px 8px 0 0;
  padding: 3px 9px;
  border-color: #6b8057;
}
.strategicFormationMarkerWrap {
  border: 0 !important;
  background: transparent !important;
}
.strategicFormationMarker {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #8d9a7b;
  border-radius: 50%;
  background: #111713e8;
  box-shadow: 0 2px 8px #000c;
  overflow: hidden;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.strategicFormationMarker.enemy { border-color: #c94a42; }
.strategicFormationMarker.ally { border-color: #3f79bd; }
.strategicFormationMarker.selected {
  transform: scale(1.22);
  box-shadow: 0 0 0 3px #d6ac6275, 0 3px 12px #000e;
}
.strategicFormationMarker img {
  width: 95%;
  height: 95%;
  object-fit: contain;
  pointer-events: none;
}
.strategicFormationGlyph {
  font-size: 1.55rem;
  color: #9db074;
}
.strategicFormationMarker.enemy .strategicFormationGlyph { color: #d34d45; }
.strategicFormationMarker.ally .strategicFormationGlyph { color: #4180c9; }
.strategicFormationRoute {
  fill: none;
  stroke: #87986b;
  stroke-width: 3;
  stroke-dasharray: 7 6;
  opacity: .9;
}
.strategicFormationRoute.enemy { stroke: #c94a42; }
.strategicFormationRoute.ally { stroke: #3f79bd; }
.strategicFormationRoute.air {
  stroke-dasharray: 3 8;
  stroke-width: 2.3;
}
.strategicFormationRoute.navy {
  stroke-dasharray: 10 7;
  stroke-width: 3.2;
}

@media (max-width: 850px) {
  .strategicUnitsHead { align-items: flex-start; flex-direction: column; }
  .strategicFormationCard { grid-template-columns: 52px minmax(0, 1fr); }
  .strategicFormationPower { grid-column: 2; max-width: none; text-align: left; }
}

/* Icônes de commandant par nation et archétype */
.playerIdentity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.playerIdentity h2 {
  margin: 0;
  min-width: 0;
}
.playerArchetypeAvatar {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #6f795e;
  background: #0d110f;
  color: #d8c86f;
  font-size: 1.6rem;
}
.playerCard.me .playerArchetypeAvatar {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(214,172,98,.14);
}
.playerArchetypeAvatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.strategicCommanderMarkerWrap {
  border: 0 !important;
  background: transparent !important;
}
.strategicCommanderMarker {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #d4bd68;
  border-radius: 8px;
  background: #11150fe8;
  box-shadow: 0 0 0 2px #1a1d16cc, 0 3px 10px #000d;
}
.strategicCommanderMarker.guest { border-color: #b8aa74; }
.strategicCommanderMarker.ai { border-style: dashed; opacity: .88; }
.strategicCommanderMarker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

@media (max-width: 850px) {
  .playerHead { align-items: flex-start; }
  .playerArchetypeAvatar { flex-basis: 46px; width: 46px; height: 46px; }
}

/* Scénario historique et garnisons compactes */
.leafletFrontLine {
  stroke: #f3dfa0;
  stroke-width: 5;
  opacity: .96;
  filter: drop-shadow(0 0 3px #ffeaa555);
}
.mapCityMarker .mapCityDotOnly.conflict {
  border-color: #f3dfa0;
  box-shadow: 0 0 0 2px #f3dfa055, 0 0 8px #f3dfa088, 0 0 0 4px #0007;
}
.mapCityMarker .mapCityDotOnly.headquarters {
  border-color: #dceca5;
  box-shadow: 0 0 0 3px #93ad5f66, 0 0 8px #b4cb7a66;
}
.mapCityMarker .mapCityDotOnly.keyCity::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  margin: 1px 0 0 1px;
  border-radius: 50%;
  background: #f3dfa0;
}
.mapCityMarker .mapCityDotOnly.selected {
  transform: scale(1.35);
  box-shadow: 0 0 0 3px #d6ac6255, 0 0 10px #d6ac6299;
}
.strategicFormationMarker.mobile {
  width: 34px;
  height: 34px;
}
.strategicFormationMarker.compact {
  position: relative;
  width: 16px;
  height: 16px;
  border-width: 1px;
  background: #111713f2;
  box-shadow: 0 1px 4px #000e;
  overflow: visible;
}
.strategicFormationMarker.compact img {
  width: 14px;
  height: 14px;
}
.strategicFormationMarker.compact .strategicFormationGlyph {
  font-size: .72rem;
}
.strategicFormationMarker.compact.selected {
  transform: scale(1.28);
  box-shadow: 0 0 0 2px #f3dfa088, 0 1px 5px #000;
}
.strategicGarrisonCount {
  position: absolute;
  right: -10px;
  top: -8px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  border: 1px solid #d8c889;
  border-radius: 8px;
  background: #151815;
  color: #f1e6c5;
  font-size: .5rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 1px 4px #000d;
}
.strategicRosterHeading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  border: 1px solid #414842;
  background: #111514;
  color: #d9cfb7;
}
.strategicRosterHeading small { color: #8f978f; }
.strategicRosterLimit {
  grid-column: 1 / -1;
  padding: 8px 10px;
  border-left: 3px solid #d6ac62;
  background: #1d1b15;
  color: #bcb39e;
  font-size: .7rem;
}
.strategicFormationOfficer,
.strategicFormationParent,
.strategicFormationEquipment {
  margin-top: 5px;
  color: #b9b09c;
}
.strategicFormationOfficer { color: #d2c49e; }
.strategicFormationParent:empty { display: none; }

/* Carte stratégique épurée et tours individuels */
.mapCityLabel { display: none !important; }
.leafletFrontLine { display: none !important; }
.strategicMap .leaflet-control-attribution { display: none !important; }
.mapCityMarker .mapCityDotOnly {
  position: relative;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  margin-top: -4.5px;
}
.mapCityMarker .mapCityDotOnly.conflict {
  border-color: #f6dfa0;
  box-shadow: 0 0 0 3px rgba(246,223,160,.72), 0 0 9px rgba(246,223,160,.72), 0 0 0 5px rgba(0,0,0,.5);
}
.cityDot.conflict {
  background: #8d8776;
  box-shadow: 0 0 0 2px #f6dfa0;
}
.strategicTurnBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 10px;
  padding: 9px 10px;
  border: 1px solid #3d443f;
  background: #111514;
}
.strategicTurnState {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #d8cfbb;
  font-size: .72rem;
}
.strategicTurnState strong { color: #e4c77d; }
.strategicTurnState span { color: #969d96; }
#strategicEndTurn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 4px 10px;
}
.leafletSelectedRoad {
  fill: none;
  stroke: #e5c56f;
  stroke-width: 4;
  opacity: .9;
  filter: drop-shadow(0 0 2px rgba(0,0,0,.85));
}
.strategicSpawn,
.strategicMove {
  min-height: 31px;
  margin: 8px 8px 0 0;
  padding: 4px 9px;
}
.strategicSpawn { border-color: #a6b969; }
.strategicCommanderMarker {
  width: 38px;
  height: 38px;
  border-width: 1px;
  border-radius: 6px;
}
.strategicCommanderMarker.waiting { opacity: .58; filter: grayscale(.35); }
.strategicFormationMarker.compact {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #0c100ef2;
  box-shadow: 0 0 0 1px #000b, 0 2px 5px #000e;
}
.strategicFormationMarker.compact img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}
.strategicGarrisonCount {
  right: -12px;
  top: -10px;
  min-width: 16px;
  height: 16px;
  font-size: .48rem;
}
@media (max-width: 760px) {
  .strategicTurnBar { align-items: stretch; flex-direction: column; }
  #strategicEndTurn { width: 100%; }
}

/* Correctif 2026-07-18 : carte et garnisons réellement compactes */
.strategicFormationMarker.mobile {
  width: 14px !important;
  height: 14px !important;
  border-width: 1px !important;
  border-radius: 3px !important;
  box-shadow: 0 1px 3px #000c !important;
}
.strategicFormationMarker.mobile img {
  width: 13px !important;
  height: 13px !important;
  object-fit: contain !important;
}
.strategicFormationMarker.compact {
  width: 10px !important;
  height: 10px !important;
  border-width: 1px !important;
  border-radius: 2px !important;
  box-shadow: 0 0 0 1px #0009 !important;
}
.strategicFormationMarker.compact img {
  width: 9px !important;
  height: 9px !important;
  object-fit: contain !important;
}
.strategicFormationMarker.compact .strategicFormationGlyph {
  font-size: .48rem !important;
  line-height: 1 !important;
}
.strategicFormationMarker.selected {
  transform: scale(1.12) !important;
  box-shadow: 0 0 0 1px #f3dfa099, 0 1px 3px #000 !important;
}
.strategicGarrisonCount {
  right: -8px !important;
  top: -7px !important;
  min-width: 11px !important;
  height: 11px !important;
  padding: 0 2px !important;
  border-radius: 6px !important;
  font-size: .38rem !important;
  line-height: 1 !important;
}
.strategicCommanderMarker {
  width: 16px !important;
  height: 16px !important;
  border-width: 1px !important;
  border-radius: 3px !important;
  box-shadow: 0 0 0 1px #111b, 0 1px 4px #000d !important;
}
.strategicCommanderMarker img {
  width: 15px !important;
  height: 15px !important;
  object-fit: contain !important;
}

/* Le panneau sous la carte doit rester secondaire et ne jamais avaler l'écran. */
.strategicPosition {
  padding-top: 5px !important;
  font-size: .66rem !important;
  line-height: 1.25 !important;
}
.strategicSelection {
  min-height: 0 !important;
  padding: 5px 0 2px !important;
  font-size: .68rem !important;
  line-height: 1.25 !important;
}
.cityInfrastructure,
.cityStockpile,
.cityHistory {
  margin-top: 2px !important;
  font-size: .62rem !important;
  line-height: 1.2 !important;
}
.strategicUnitsPanel {
  margin: 7px 0 !important;
  padding: 7px !important;
}
.strategicUnitsHead {
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 5px !important;
}
.strategicUnitsHead .eyebrow {
  margin-bottom: 2px !important;
  font-size: .61rem !important;
}
.strategicUnitsHead > div > p:last-child {
  font-size: .62rem !important;
  line-height: 1.2 !important;
}
.strategicUnitColors {
  gap: 6px !important;
  font-size: .58rem !important;
}
.unitColor {
  width: 7px !important;
  height: 7px !important;
}
.strategicUnitRoster {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 3px !important;
  max-height: 260px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 3px !important;
  scrollbar-width: thin;
  scrollbar-color: #586257 #111514;
}
.strategicRosterHeading {
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
  align-items: center !important;
  padding: 4px 6px !important;
  gap: 7px !important;
  font-size: .64rem !important;
}
.strategicRosterHeading small {
  font-size: .55rem !important;
  white-space: nowrap !important;
}
.strategicFormationCard {
  width: 100% !important;
  min-height: 42px !important;
  height: auto !important;
  padding: 4px 6px !important;
  grid-template-columns: 30px minmax(0, 1fr) minmax(105px, 145px) !important;
  gap: 6px !important;
  border-left-width: 3px !important;
  border-radius: 2px !important;
  background: #171c18 !important;
  color: #ddd5c2 !important;
  filter: none !important;
}
.strategicFormationCard:hover {
  background: #1b211d !important;
  filter: none !important;
}
.strategicFormationCardVisual {
  width: 28px !important;
  height: 28px !important;
  background: #0c100e !important;
}
.strategicFormationCardVisual img {
  width: 26px !important;
  height: 26px !important;
  object-fit: contain !important;
}
.strategicFormationCardGlyph {
  font-size: 1rem !important;
}
.strategicFormationIdentity,
.strategicFormationPower {
  gap: 1px !important;
}
.strategicFormationIdentity strong {
  font-size: .66rem !important;
  line-height: 1.15 !important;
}
.strategicFormationIdentity small,
.strategicFormationPower small {
  font-size: .54rem !important;
  line-height: 1.12 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.strategicFormationPower {
  max-width: 145px !important;
  text-align: right !important;
}
.strategicFormationPower strong {
  font-size: .56rem !important;
  line-height: 1.1 !important;
}
.strategicUnitSelection {
  min-height: 0 !important;
  max-height: 105px !important;
  margin-top: 5px !important;
  padding: 5px 6px !important;
  overflow-y: auto !important;
  font-size: .61rem !important;
  line-height: 1.18 !important;
}
.strategicFormationMovement,
.strategicFormationStats,
.strategicFormationHistory,
.strategicFormationOfficer,
.strategicFormationParent,
.strategicFormationEquipment {
  margin-top: 2px !important;
}
.strategicRosterLimit {
  padding: 5px 7px !important;
  font-size: .6rem !important;
}

@media (max-width: 850px) {
  .strategicUnitsHead {
    align-items: flex-start !important;
  }
  .strategicFormationCard {
    grid-template-columns: 28px minmax(0, 1fr) !important;
  }
  .strategicFormationPower {
    grid-column: 2 !important;
    max-width: none !important;
    text-align: left !important;
  }
}

/* Correctif 2026-07-18 : icônes transparentes, grandes et adaptées au zoom */
.strategicFormationMarkerWrap,
.strategicFormationMarkerWrap.compactWrap,
.strategicCommanderMarkerWrap {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.strategicFormationMarker,
.strategicFormationMarker.mobile,
.strategicFormationMarker.compact {
  width: var(--strategic-marker-size, 96px) !important;
  height: var(--strategic-marker-size, 96px) !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  transform-origin: center center !important;
}
.strategicFormationMarker img,
.strategicFormationMarker.mobile img,
.strategicFormationMarker.compact img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .9)) !important;
  transform-origin: center center !important;
  transition: transform .18s ease, filter .18s ease !important;
}
.strategicFormationMarker.facing-left img {
  transform: scaleX(-1) !important;
}
.strategicFormationMarker.facing-right img {
  transform: scaleX(1) !important;
}
.strategicFormationMarker.selected {
  transform: scale(1.12) !important;
  box-shadow: none !important;
}
.strategicFormationMarker.selected img {
  filter:
    drop-shadow(0 0 2px #f3dfa0)
    drop-shadow(0 0 5px rgba(243, 223, 160, .9))
    drop-shadow(0 2px 2px rgba(0, 0, 0, .95)) !important;
}
.strategicGarrisonCount {
  right: 2% !important;
  top: 2% !important;
  min-width: 0 !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff3bd !important;
  font-size: .82rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-shadow: 0 1px 2px #000, 0 0 3px #000, 0 0 5px #000 !important;
  box-shadow: none !important;
}
.strategicCommanderMarker {
  width: var(--strategic-commander-size, 82px) !important;
  height: var(--strategic-commander-size, 82px) !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.strategicCommanderMarker img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .95)) !important;
}
.strategicCommanderMarker.waiting {
  opacity: .58 !important;
  filter: grayscale(.35) !important;
}


/* Correctif 2026-07-18 v2 : suppression totale des carrés Leaflet autour des icônes */
.strategicMap .leaflet-div-icon,
.strategicMap .leaflet-marker-icon,
.strategicMap .leaflet-pane .leaflet-div-icon {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.strategicMap .leaflet-marker-icon:focus,
.strategicMap .leaflet-interactive:focus,
.strategicMap .leaflet-pane .leaflet-div-icon:focus {
  outline: none !important;
}

/* Correctif 2026-07-18 v3 : taille perçue homogène et garnisons miniatures */
.strategicFormationMarker {
  --strategic-facing: 1;
  --strategic-visual-scale: 1;
}
.strategicFormationMarker.facing-left { --strategic-facing: -1; }
.strategicFormationMarker.facing-right { --strategic-facing: 1; }

/* L'infanterie ne dépasse jamais la hauteur visuelle des blindés. */
.strategicFormationMarker.infantry { --strategic-visual-scale: .48; }
/* Blindés et camions : réduction d’un quart par rapport au réglage précédent. */
.strategicFormationMarker.armor,
.strategicFormationMarker.armored { --strategic-visual-scale: .81; }
.strategicFormationMarker.artillery { --strategic-visual-scale: 1.06; }
/* Les avions de transport/logistique gardent leur taille ; les avions de combat sont 25 % plus petits. */
.strategicFormationMarker.air { --strategic-visual-scale: 1; }
.strategicFormationMarker.air-combat { --strategic-visual-scale: .75; }
.strategicFormationMarker.air-logistics { --strategic-visual-scale: 1; }
.strategicFormationMarker.navy { --strategic-visual-scale: 1.08; }
.strategicFormationMarker.camion,
.strategicFormationMarker.truck,
.strategicFormationMarker.logistics_truck,
.strategicFormationMarker.supply_truck,
.strategicFormationMarker.transport_truck { --strategic-visual-scale: .78; }
.strategicFormationMarker.locomotive,
.strategicFormationMarker.train,
.strategicFormationMarker.rail,
.strategicFormationMarker.logistics_train,
.strategicFormationMarker.supply_train { --strategic-visual-scale: 1.04; }

.strategicFormationMarker img,
.strategicFormationMarker.mobile img,
.strategicFormationMarker.compact img {
  transform:
    scale(var(--strategic-visual-scale, 1))
    scaleX(var(--strategic-facing, 1)) !important;
}

/* Une garnison n'est jamais dessinée comme une grande unité sur la carte. */
.strategicFormationMarker.compact {
  opacity: .94 !important;
}
.strategicFormationMarker.compact.selected {
  transform: scale(1.18) !important;
}
.strategicFormationMarker.compact .strategicGarrisonCount,
.strategicFormationMarker.compact + .strategicGarrisonCount {
  font-size: clamp(6px, calc(var(--strategic-marker-size, 10px) * .45), 9px) !important;
  right: -3px !important;
  top: -3px !important;
}

.strategicCommanderMarker {
  --strategic-facing: 1;
  --strategic-commander-visual-scale: 1;
}
.strategicCommanderMarker.facing-left { --strategic-facing: -1; }
.strategicCommanderMarker.facing-right { --strategic-facing: 1; }
.strategicCommanderMarker.infantry { --strategic-commander-visual-scale: .48; }
.strategicCommanderMarker.armor,
.strategicCommanderMarker.armored { --strategic-commander-visual-scale: .81; }
.strategicCommanderMarker.artillery { --strategic-commander-visual-scale: 1.06; }
.strategicCommanderMarker img {
  transform:
    scale(var(--strategic-commander-visual-scale, 1))
    scaleX(var(--strategic-facing, 1)) !important;
}

.strategicConvoyMarkerWrap {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}


/* Correctif 2026-07-18 v4 : informations de ville en fenêtre sur la carte */
.strategicMapShell {
  position: relative;
  width: 100%;
}
.strategicMapPopup {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1200;
  width: min(470px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 10px;
  overflow: hidden;
  border: 1px solid #7d7257;
  border-radius: 4px;
  background: rgba(15, 19, 17, .96);
  color: #ddd5c2;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .72);
  backdrop-filter: blur(3px);
}
.strategicMapPopup[hidden] {
  display: none !important;
}
.strategicMapPopupClose {
  position: absolute;
  top: 5px;
  right: 6px;
  z-index: 2;
  width: 24px;
  min-height: 24px;
  padding: 0;
  border: 1px solid #5c625c;
  border-radius: 3px;
  background: #171b19;
  color: #e9dfc9;
  font-size: 1rem;
  line-height: 20px;
}
.strategicMapPopup .strategicSelection {
  padding: 3px 30px 6px 2px !important;
  border-bottom: 1px solid #353b37;
  color: #bbb3a2;
}
.strategicMapPopup .strategicSelection strong {
  color: #f0e5cc;
  font-size: .82rem;
}
.strategicMapPopup .strategicUnitsPanel {
  margin: 6px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.strategicMapPopup .strategicUnitsHead {
  margin: 0 0 4px !important;
}
.strategicMapPopup .strategicUnitRoster {
  max-height: min(300px, 38vh) !important;
}
.strategicMapPopup .strategicUnitSelection {
  max-height: 110px !important;
}
@media (max-width: 700px) {
  .strategicMapPopup {
    right: 7px;
    bottom: 7px;
    width: calc(100% - 14px);
    max-height: calc(100% - 14px);
    padding: 8px;
  }
  .strategicMapPopup .strategicUnitRoster {
    max-height: 220px !important;
  }
}

/* Tunnel public : indication discrète du port réellement utilisé. */
.tunnelLocalPort {
  margin-left: 3px;
  color: #9d9788;
  font-size: .78rem;
}


/* Correctif 2026-07-18 v6 : le pion du joueur garde la taille du même archétype. */
.strategicCommanderMarker.infantry { --strategic-commander-visual-scale: .48 !important; }
.strategicCommanderMarker.armor,
.strategicCommanderMarker.armored { --strategic-commander-visual-scale: .81 !important; }
.strategicCommanderMarker.artillery { --strategic-commander-visual-scale: 1.06 !important; }

/* Mise à jour 2026-07-18 : ordres d'archétype, campement et couverture DCA. */
.strategicMapPopup .strategicUnitSelection {
  max-height: min(245px, 34vh) !important;
  overflow-y: auto !important;
}
.strategicOrderPanel {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid #3d443f;
}
.strategicOrderPanel summary {
  cursor: pointer;
  color: #d8c99d;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.strategicOrderMeta {
  margin: 5px 0;
  color: #9fa79f;
  font-size: .68rem;
  line-height: 1.25;
}
.strategicOrderButtons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.strategicOrderButtons button {
  min-height: 27px;
  padding: 4px 6px;
  font-size: .68rem;
  line-height: 1.15;
}
.strategicOrderButtons .strategicAttack {
  border-color: #a25449;
  background: #4b2521;
  color: #f2d5cd;
}
.strategicOrderButtons .strategicCamp {
  border-color: #70684e;
  background: #302e25;
  color: #ddd4b6;
}
.strategicOrderButtons .strategicResume {
  border-color: #66805f;
  background: #263725;
  color: #d9ead4;
}
.strategicOrderUnavailable {
  grid-column: 1 / -1;
  color: #95998f;
  font-size: .7rem;
}
.strategicFormationMarker.camped img {
  opacity: .86;
  filter:
    drop-shadow(0 0 2px rgba(215, 204, 158, .8))
    drop-shadow(0 2px 2px rgba(0, 0, 0, .95)) !important;
}
.strategicAirDefenseCoverage {
  stroke-dasharray: 5 5;
  pointer-events: auto;
}
.strategicAirDefenseCoverage.player,
.strategicAirDefenseCoverage.ally {
  stroke: #6799c2;
  fill: #6799c2;
}
.strategicAirDefenseCoverage.enemy {
  stroke: #c8645b;
  fill: #c8645b;
}
@media (max-width: 700px) {
  .strategicOrderButtons {
    grid-template-columns: 1fr;
  }
}

/* Mise à jour 2026-07-19 : trois joueurs et préparation de la bataille. */
.battlePreparation {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #3d443f;
  background: #171b19;
}
.battleContextLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #343a36;
}
.battleContextLine strong {
  color: #e6d49c;
  letter-spacing: .08em;
}
.battleHelp {
  margin: 3px 0 8px;
  color: #a8a99f;
  font-size: .78rem;
}
.battleParticipants {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.battleParticipant {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #454b45;
  background: #202521;
  color: #ded7c6;
  font-size: .78rem;
  cursor: pointer;
}
.battleParticipant input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.battleParticipant span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.battleSaveChooser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}
.battleSaveChooser label {
  margin: 0;
}
.battleSaveChooser select {
  width: 100%;
}

/* Le pion de l'officier est un indicateur de garnison miniature dans une ville,
   puis reprend la taille normale du même archétype pendant son déplacement. */
.strategicCommanderMarker.compact {
  opacity: .96 !important;
}
.strategicCommanderMarker.mobile {
  opacity: 1 !important;
}

@media (max-width: 850px) {
  .battleParticipants {
    grid-template-columns: 1fr;
  }
  .battleSaveChooser {
    grid-template-columns: 1fr;
  }
}

/* Mise à jour : recentrage joueur et routes disponibles. */
.strategicCenterPlayer {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 850;
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(238, 211, 132, .85);
  border-radius: 4px;
  background: rgba(21, 27, 25, .92);
  color: #f2d58b;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .55);
}
.strategicCenterPlayer:hover,
.strategicCenterPlayer.active {
  background: rgba(55, 58, 37, .96);
  box-shadow: 0 0 0 2px rgba(241, 213, 132, .25), 0 2px 9px rgba(0, 0, 0, .65);
}
.leafletPlayerReachableRoad {
  stroke: #f0d776;
  stroke-width: 4;
  stroke-opacity: .72;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px rgba(238, 211, 105, .9));
}
.strategicRadioLogistics {
  border-color: rgba(117, 165, 191, .7) !important;
}
.leafletPlayerActiveRoad {
  stroke: #ffd966;
  stroke-width: 5;
  stroke-opacity: .92;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(255, 218, 105, .95));
}

/* Mise à jour : trois officiers, chaîne de commandement et registre de recherche. */
.players {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.playerCard {
  min-width: 0;
}
.officerHierarchy {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 9px 10px;
  border: 1px solid #39413c;
  background: rgba(8, 11, 10, .35);
  color: #bbb7aa;
  font-size: .76rem;
}
.officerHierarchy span::before {
  content: "› ";
  color: var(--amber);
}
.researchLedger {
  margin: 8px 0;
  color: #d8c38f;
  font-size: .8rem;
  font-weight: 700;
}
.assignmentPreview {
  padding: 9px 10px;
  border-left: 3px solid var(--amber);
  background: rgba(112, 91, 45, .12);
  color: #cfc6ae;
  font-size: .79rem;
  line-height: 1.45;
}
.assignmentPreview[hidden] {
  display: none;
}
.requiredChoice > span,
.requiredChoice::after {
  color: var(--amber);
}
.saveDock {
  position: static !important;
  inset: auto !important;
  margin-top: 28px;
}
@media (max-width: 1150px) {
  .players { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .players { grid-template-columns: 1fr; }
}

/* Export tactique : choix explicite de la carte, du rôle et des ressources. */
.battleExportOptions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
  margin: 10px 0 4px;
}

.battleExportOptions label {
  display: grid;
  gap: 5px;
  font-size: .82rem;
}

.battleExportOptions input,
.battleExportOptions select {
  width: 100%;
}


/* Accueil : les deux formulaires ne doivent jamais se chevaucher. */
@media (max-width: 1180px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  header {
    align-items: flex-start;
  }
}

/* Sélection transactionnelle de la recherche et fiche d'unité. */
.researchLines path.pending {
  stroke: var(--amber);
  stroke-dasharray: 7 5;
}
.node.pending {
  border-color: #e4b85e;
  background: linear-gradient(145deg, #4a3d20f2, #211a0ff5);
  box-shadow: 0 0 0 1px #e4b85e55, 0 7px 20px #0009;
}
.node.selectedResearchNode {
  outline: 2px solid #efe1b7;
  outline-offset: 3px;
  z-index: 3;
}
.nodeActions button.researchActivated,
.researchToggle.selected {
  border-color: #e4b85e;
  background: #6c5326;
  color: #fff4d5;
}
.nodeActions button {
  white-space: nowrap;
}

.researchDetail {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1400;
  width: min(540px, calc(100vw - 36px));
  max-height: min(820px, calc(100vh - 48px));
  padding: 15px;
  overflow: auto;
  border: 1px solid #8b7a55;
  border-radius: 5px;
  background:
    linear-gradient(150deg, rgba(35, 41, 37, .98), rgba(12, 16, 14, .99));
  color: #e3dccb;
  box-shadow: 0 18px 55px #000d, 0 0 0 1px #000;
  backdrop-filter: blur(5px);
}
.researchDetail[hidden] {
  display: none !important;
}
.researchDetailHeading {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.researchDetailHeading h3 {
  margin: 0;
  padding-right: 30px;
  font-size: 1.25rem;
  line-height: 1.12;
}
.researchDetailHeading .eyebrow {
  margin-bottom: 4px;
}
.researchDetailClose {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 30px;
  min-height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 3px;
  font-size: 1.25rem;
  line-height: 1;
}
.researchDetailVisual {
  position: relative;
  width: 100%;
  height: 310px;
  margin-bottom: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #505a53;
  background:
    radial-gradient(circle at 50% 42%, #303a33, #111613 68%);
}
.researchDetailVisual img {
  position: relative;
  z-index: 2;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  object-fit: contain;
  object-position: center;
  cursor: zoom-in;
}
.researchDetailVisual.expanded {
  position: fixed;
  inset: 20px;
  z-index: 1800;
  width: auto;
  height: auto;
  margin: 0;
  padding: 20px;
  background: rgba(5, 8, 7, .98);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .82);
}
.researchDetailVisual.expanded img {
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 80px);
  cursor: zoom-out;
}
.researchDetailVisual.portraitMissing::after {
  content: "Image Valour introuvable pour cette entrée";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 3;
  color: #b9ae94;
  font-size: .68rem;
  text-align: center;
}
.researchDetailGlyph {
  position: absolute;
  z-index: 1;
  font-family: Georgia, serif;
  font-size: 5rem;
  color: #a9b494;
  opacity: .75;
}
.researchDetailVisual.hasPortrait .researchDetailGlyph {
  opacity: 0;
}
.researchDetailStatus {
  margin-bottom: 10px;
  padding: 7px 9px;
  border-left: 4px solid #59615d;
  background: #151a18;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .05em;
}
.researchDetailStatus.unlocked {
  border-color: var(--olive);
  color: #cbd7a8;
}
.researchDetailStatus.pending {
  border-color: var(--amber);
  color: #f2d58b;
}
.researchDetailStatus.available {
  border-color: #d3a855;
  color: #eed9a5;
}
.researchDetailStatus.locked {
  border-color: #716b63;
  color: #aaa49a;
}
.researchDetailFacts {
  display: grid;
  gap: 5px;
  margin-bottom: 11px;
}
.researchDetailFacts > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 8px;
  border: 1px solid #343b37;
  background: #111614;
  font-size: .78rem;
}
.researchDetailFacts span {
  color: var(--muted);
}
.researchDetailFacts strong {
  text-align: right;
}
.researchDetailPrerequisites {
  margin-bottom: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.researchDetailPrerequisites > strong {
  width: 100%;
  font-size: .76rem;
  color: #d5cdb8;
}
.researchDetailPrerequisites > span {
  padding: 5px 7px;
  border: 1px solid #4b514d;
  background: #151a18;
  font-size: .7rem;
  cursor: pointer;
}
.researchDetailPrerequisites > span.fulfilled {
  border-color: #64734e;
  color: #c5d3a0;
}
.researchDetailPrerequisites > span.pending {
  border-color: #b28a43;
  color: #efd084;
}
.researchDetailPrerequisites > span.missing {
  border-color: #704b45;
  color: #c9958c;
}
.researchToggle {
  width: 100%;
  margin-bottom: 11px;
  min-height: 42px;
  font-weight: 900;
}
.researchBasket {
  padding: 10px;
  border: 1px solid #4b514c;
  background: #0e1311;
}
.researchBasketTitle {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  font-size: .78rem;
}
.researchBasketTitle span,
.researchBasket small {
  color: var(--muted);
}
.researchBasketActions {
  margin-top: 9px;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 7px;
}
.researchBasketActions button {
  min-height: 38px;
  padding: 6px 8px;
  font-size: .68rem;
}
.researchBasketActions .researchConfirm {
  border-color: #a58e53;
  background: #7d8f55;
  color: #0a0d0b;
}

@media (max-width: 850px) {
  .researchDetail {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  .researchDetailVisual {
    height: 240px;
  }
}

/* Mise à jour complète : déploiement unique et inventaires séparés */
.deploymentResources {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid #59625b;
  background: #111615;
}
.deploymentResources strong { color: var(--amber); font-size: 1.05rem; }
.deploymentPools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.deploymentPoolColumn { min-width: 0; }
.deploymentPoolColumn .unitPool { min-height: 92px; max-height: 225px; }
.deploymentPoolColumn.capturedColumn .unitPool { border-color: #826c43; }
.deployment { grid-template-columns: 1fr !important; }
.deployment .stage { min-height: 190px; }
.stageItem.captured { border-color: #a88645; }
.stageItem .captureBadgeInline { color: var(--amber); font-size: .58rem; font-weight: 800; }
@media (max-width: 900px) { .deploymentPools { grid-template-columns: 1fr; } }
.strategicStackTabs { display:flex; gap:6px; flex-wrap:wrap; padding:7px 0; }
.strategicStackTabs button { min-height:30px; padding:5px 9px; background:#151a18; }
.strategicStackTabs button.active { border-color:var(--amber); color:var(--amber); }
.leaflet-overlay-pane .strategicRailNetwork { stroke:#5d5141; }
.leaflet-overlay-pane .strategicRoadSegmentNode { stroke:#7c745d; fill:#c0ab72; }

/* Mise à jour réseau segmenté et regroupement des positions. */
.strategicFormationMarker.contested,
.strategicFormationMarker.stack-contested {
  border-color: #d7a742;
  background: #2c2115f2;
  box-shadow: 0 0 0 2px #8e342f99, 0 2px 10px #000d;
}
.strategicFormationMarker.stack-mixed:not(.stack-contested) {
  border-style: double;
  border-width: 3px;
}
.strategicCombatStackGlyph {
  color: #f1c15f !important;
  font-size: calc(var(--strategic-marker-size, 42px) * .48);
  line-height: 1;
  text-shadow: 0 1px 3px #000;
}
.strategicFormationMarkerWrap.contestedWrap {
  z-index: 1800 !important;
}
.strategicSelectedSegmentLabel {
  grid-column: 1 / -1;
  padding: 5px 7px;
  border-left: 3px solid #d0ad63;
  background: #1b1c17;
  color: #d9ceb1;
  font-size: .68rem;
  line-height: 1.25;
}
.strategicOrderButtons .selectedSegmentCamp {
  border-color: #d0ad63;
  background: #4a4027;
  color: #fff0be;
}
.leaflet-overlay-pane .strategicRoadSegmentNode {
  stroke: #7c745d;
  fill: #c0ab72;
  cursor: pointer;
}
.leaflet-overlay-pane .strategicRoadSegmentNode:hover {
  stroke: #fff0b4;
  fill: #e2c374;
}
.leaflet-overlay-pane .strategicRoadSegmentNode.selected {
  stroke: #fff3bd;
  fill: #d59f38;
  filter: drop-shadow(0 0 4px #d59f38);
}

/* Mise à jour réseau/contacts : action tactique toujours visible sur la carte. */
.strategicCombatButton {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 850;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #d8b75d;
  background: #7e2420;
  color: #fff3cf;
  font-weight: 900;
  letter-spacing: .05em;
  box-shadow: 0 4px 18px rgba(0,0,0,.45);
}
.strategicCombatButton:hover { filter: brightness(1.12); }

/* Transmission narrative des ordres et événements */
.eventTransmissionOverlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 30%, rgba(88, 102, 73, .18), transparent 42%),
    rgba(3, 7, 6, .88);
  backdrop-filter: blur(5px);
}

.eventTransmissionOverlay[hidden] {
  display: none !important;
}

.eventTransmissionWindow {
  width: min(760px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid #8b9b60;
  box-shadow: 0 26px 90px rgba(0, 0, 0, .72);
  background: #101713;
}

.eventTransmissionHeader {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(217, 193, 122, .35);
  background: linear-gradient(90deg, #141f18, #0e1512);
}

.eventTransmissionHeader small {
  color: #aab1a7;
  letter-spacing: .08em;
}

.radioPulse {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d5b75c;
  box-shadow: 0 0 0 0 rgba(213, 183, 92, .68);
  animation: radioTransmissionPulse 1.6s infinite;
}

.operationalTransmission .radioPulse {
  background: #b86e57;
  box-shadow: 0 0 0 0 rgba(184, 110, 87, .68);
}

@keyframes radioTransmissionPulse {
  0% { box-shadow: 0 0 0 0 rgba(213, 183, 92, .58); }
  70% { box-shadow: 0 0 0 12px rgba(213, 183, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(213, 183, 92, 0); }
}

.eventSceneFrame {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(139, 155, 96, .28);
  color: #c8c7b9;
  font-style: italic;
  line-height: 1.55;
  background:
    linear-gradient(rgba(12, 18, 15, .88), rgba(12, 18, 15, .88)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.018) 3px 4px);
}

.eventSceneFrame p {
  margin: 0;
}

.eventDocument {
  margin: 20px;
  padding: 20px 22px 24px;
  color: #252016;
  border: 1px solid #8f805d;
  background:
    linear-gradient(rgba(229, 215, 174, .95), rgba(211, 193, 145, .96)),
    repeating-linear-gradient(0deg, rgba(89, 70, 36, .04) 0 1px, transparent 1px 5px);
  box-shadow: inset 0 0 42px rgba(80, 59, 28, .18), 0 8px 28px rgba(0, 0, 0, .28);
}

.eventDocumentTopline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(77, 62, 35, .42);
  font: 700 .72rem/1.2 monospace;
  letter-spacing: .12em;
}

.eventDocument h2 {
  margin: 18px 0 12px;
  color: #252016;
}

.eventDocument pre {
  min-height: 148px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #2f291d;
  font: 600 1rem/1.65 "Courier New", monospace;
}

.eventTransmissionOverlay.typing .eventDocument pre::after {
  content: "▌";
  animation: eventCursorBlink .72s steps(1) infinite;
}

@keyframes eventCursorBlink {
  50% { opacity: 0; }
}

/* Les transmissions orales sont des scènes dialoguées, jamais des documents. */
.dialogueTransmission .eventDocument {
  color: #d9d6c8;
  border-color: rgba(139, 155, 96, .48);
  background:
    radial-gradient(circle at 18% 10%, rgba(117, 126, 91, .10), transparent 34%),
    linear-gradient(145deg, #111a16, #0b110e 72%);
  box-shadow:
    inset 0 0 54px rgba(0, 0, 0, .42),
    0 8px 28px rgba(0, 0, 0, .35);
}

.dialogueTransmission .eventDocumentTopline {
  color: #b8c09e;
  border-bottom-color: rgba(139, 155, 96, .32);
}

.dialogueTransmission .eventDocument h2 {
  color: #eee8d6;
}

.dialogueTransmission .eventDocument pre {
  color: #d9d6c8;
  font: 500 1rem/1.72 Georgia, "Times New Roman", serif;
  letter-spacing: .005em;
}

.dialogueTransmission .eventSkipTyping {
  color: #d3d7c6;
  border-color: rgba(139, 155, 96, .5);
  background: rgba(139, 155, 96, .10);
}

.dialogueTransmission .eventSkipTyping:hover:not(:disabled) {
  background: rgba(139, 155, 96, .22);
}

.inPersonTransmission .eventTransmissionHeader .radioPulse {
  border-radius: 2px;
  transform: rotate(45deg);
  animation-duration: 2.2s;
}

.writtenTransmission .eventSceneFrame {
  color: #d6ccb0;
}

.eventSkipTyping {
  min-height: auto;
  padding: 5px 8px;
  border: 1px solid rgba(73, 59, 33, .48);
  color: #3b321f;
  background: rgba(255, 255, 255, .16);
  font-size: .68rem;
}

.eventUnitSelection {
  margin: 0 20px 18px;
  padding: 14px;
  border: 1px solid rgba(139, 155, 96, .45);
  background: rgba(8, 14, 11, .82);
}

.eventUnitSelectionHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.eventUnitSelectionHeader p { margin: 0 0 4px; }
.eventUnitRequirement { color: #ebe4cf; }
.eventUnitRisk {
  max-width: 330px;
  color: #d5b86b;
  font-size: .78rem;
  text-align: right;
}

.eventUnitOptions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.eventUnitOption {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid rgba(139, 155, 96, .30);
  background: rgba(255, 255, 255, .025);
  cursor: pointer;
}

.eventUnitOption:hover,
.eventUnitOption.selected {
  border-color: #b8a25e;
  background: rgba(139, 155, 96, .14);
}

.eventUnitOption input { accent-color: #b8a25e; }
.eventUnitOptionBody { display: grid; gap: 3px; }
.eventUnitOptionBody strong { color: #eee8d6; }
.eventUnitOptionBody small { color: #aaa99c; }

.eventActions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 0 20px 20px;
}

.eventActions button {
  min-width: 190px;
}

@media (max-width: 680px) {
  .eventTransmissionOverlay { padding: 8px; }
  .eventTransmissionWindow { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .eventDocument { margin: 12px; padding: 16px; }
  .eventUnitSelection { margin: 0 12px 12px; }
  .eventUnitSelectionHeader { flex-direction: column; }
  .eventUnitRisk { text-align: left; }
  .eventActions { flex-direction: column; }
  .eventActions button { width: 100%; min-width: 0; }
}

/* Lobby de profils et synchronisation partagée */
body.lobbyMode {
  overflow: hidden;
  background: #080d0d;
}
body.lobbyMode > header,
body.lobbyMode > main {
  display: none;
}
.profileLobby {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background-image: url('/assets/coop-conquest-lobby.png');
  background-size: cover;
  background-position: center;
  color: #f4edd8;
}
.profileLobby[hidden] { display: none; }
.profileLobbyShade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 8, 10, .10), rgba(3, 7, 8, .72) 68%, rgba(2, 5, 6, .92)),
    linear-gradient(90deg, rgba(3, 7, 8, .48), transparent 42%, rgba(3, 7, 8, .48));
}
.profileLobbyContent {
  position: relative;
  width: min(1120px, calc(100vw - 48px));
  margin-top: min(48vh, 480px);
  padding: 22px;
  border: 1px solid rgba(210, 180, 105, .58);
  background: rgba(7, 14, 14, .91);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .65);
  backdrop-filter: blur(4px);
}
.profileLobbyIntro {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(210, 180, 105, .28);
}
.profileLobbyIntro .eyebrow { margin: 0 auto 0 0; }
.lobbyPermanentLink {
  color: #e6ce91;
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.profileLobby h2 { margin: 16px 0 4px; }
.profileLobby p { color: #c9c7bc; }
.profileCards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.profileCard {
  min-height: 150px;
  padding: 18px;
  text-align: left;
  border: 1px solid #7f8957;
  background: linear-gradient(145deg, rgba(40, 51, 36, .94), rgba(13, 21, 19, .96));
  color: #f5efd9;
  cursor: pointer;
}
.profileCard:hover,
.profileCard:focus-visible {
  border-color: #d4b45e;
  transform: translateY(-2px);
}
.profileCardNumber {
  display: block;
  font-size: 2rem;
  color: #d9bd73;
  line-height: 1;
}
.profileCard strong { display: block; margin-top: 8px; font-size: 1.15rem; }
.profileCard small { display: block; margin-top: 12px; color: #aeb2a5; line-height: 1.4; }
.profileLobbyActions { max-width: 820px; margin: 0 auto; }
.profilePrimaryActions,
.profileSavedSessions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.profileSavedCard {
  padding: 14px;
  border: 1px solid rgba(133, 144, 93, .55);
  background: rgba(20, 29, 25, .86);
}
.profileSavedCard strong,
.profileSavedCard span { display: block; }
.profileSavedCard span { color: #bfc3b5; margin: 6px 0 12px; }
.profileRule { margin-bottom: 0; font-size: .9rem; }
.connectionProfileBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(150, 160, 120, .32);
}
.connectionProfileBar .eyebrow { margin: 0; }
.connectionProfileBar strong { color: #e2c36e; font-size: 1.2rem; }
.battleWrittenMap {
  min-height: 1.2em;
  color: #d8bd70;
  font-weight: 800;
}
.battleRemoteUpload {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(133, 144, 93, .48);
  background: rgba(16, 24, 21, .7);
}
.battleRemoteUpload span { grid-column: 1 / -1; }
.battleSharedActions { flex-wrap: wrap; }
.localSaveImport { margin-top: 12px; }
.buttonLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #7f8957;
  text-decoration: none;
  color: inherit;
}
@media (max-width: 820px) {
  .profileLobbyContent { margin-top: 28vh; width: calc(100vw - 24px); padding: 14px; }
  .profileCards,
  .profilePrimaryActions,
  .profileSavedSessions { grid-template-columns: 1fr; }
  .battleRemoteUpload { grid-template-columns: 1fr; }
}
