.ldgm-map {
  --ldgm-bg: #07111f;
  --ldgm-panel: #0d1c31;
  --ldgm-panel-soft: #12243c;
  --ldgm-border: rgba(174, 197, 226, 0.24);
  --ldgm-text: #f7fbff;
  --ldgm-muted: #aebfd4;
  --ldgm-accent: #69d2ff;
  --ldgm-gold: #d6b15f;
  --ldgm-stable: #2fbf71;
  --ldgm-watch: #f2c94c;
  --ldgm-tension: #f2994a;
  --ldgm-crisis: #eb5757;
  --ldgm-war: #7f1d1d;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ldgm-border);
  border-radius: 8px;
  background: var(--ldgm-bg);
  color: var(--ldgm-text);
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  box-shadow: 0 18px 38px rgba(5, 11, 20, 0.2);
}

.ldgm-map *,
.ldgm-map *::before,
.ldgm-map *::after {
  box-sizing: border-box;
}

.ldgm-map [hidden] {
  display: none !important;
}

.ldgm-map__header,
.ldgm-map__toolbar,
.ldgm-map__legend {
  padding: 14px;
}

.ldgm-map__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--ldgm-border);
  background: #0a1728;
}

.ldgm-map__eyebrow,
.ldgm-map__panel-kicker,
.ldgm-map__legend-title {
  margin: 0 0 4px;
  color: var(--ldgm-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ldgm-map__title {
  margin: 0;
  color: var(--ldgm-text);
  font-size: 1.2rem;
  line-height: 1.2;
}

.ldgm-map__status {
  min-width: 94px;
  border: 1px solid var(--ldgm-border);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--ldgm-muted);
  font-size: 0.78rem;
  text-align: center;
  white-space: nowrap;
}

.ldgm-map__toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 10px;
  align-items: center;
  background: #0b192d;
}

.ldgm-map__search {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--ldgm-border);
  border-radius: 6px;
  background: #f8fbff;
  color: #0d1726;
  padding: 8px 10px;
  font: inherit;
}

.ldgm-map__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ldgm-map__filter {
  min-height: 34px;
  border: 1px solid var(--ldgm-border);
  border-radius: 6px;
  background: var(--ldgm-panel-soft);
  color: var(--ldgm-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  padding: 6px 9px;
}

.ldgm-map__filter.is-active,
.ldgm-map__filter:focus {
  border-color: var(--ldgm-accent);
  outline: none;
}

.ldgm-map__layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 3fr);
  min-height: 720px;
}

.ldgm-map__canvas {
  position: relative;
  min-height: 720px;
  background:
    linear-gradient(rgba(105, 210, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 210, 255, 0.055) 1px, transparent 1px),
    #0c1a2a;
  background-position: left top;
  background-repeat: repeat;
  background-size: 48px 48px;
}

.ldgm-map__leaflet {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 720px;
  background: transparent;
}

.ldgm-map__leaflet.is-loading::after {
  content: "Chargement de la carte";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 500;
  transform: translate(-50%, -50%);
  border: 1px solid var(--ldgm-border);
  border-radius: 6px;
  background: rgba(7, 17, 31, 0.9);
  color: var(--ldgm-text);
  padding: 10px 12px;
}

.ldgm-map .leaflet-container {
  background: transparent;
  font: inherit;
}

.ldgm-map .leaflet-control-zoom a {
  color: #0d1726;
}

.ldgm-map .leaflet-interactive {
  transition: fill-opacity 140ms ease, opacity 140ms ease, stroke-width 140ms ease, filter 140ms ease;
}

.ldgm-map .leaflet-interactive:focus {
  outline: 2px solid var(--ldgm-accent);
  outline-offset: 2px;
}

.ldgm-map .ldgm-map__country-selected {
  filter: drop-shadow(0 0 6px rgba(105, 210, 255, 0.58));
}

.ldgm-map__conflict-zone {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #edf6ff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.78);
}

.ldgm-map__conflict-zone span {
  position: relative;
  display: block;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--ldgm-crisis);
  box-shadow: 0 0 8px rgba(235, 87, 87, 0.48);
  animation: ldgm-marker-pulse 1.8s ease-in-out infinite;
}

.ldgm-map__conflict-zone strong {
  display: inline-flex;
  max-width: 58px;
  overflow: hidden;
  border: 1px solid rgba(174, 197, 226, 0.18);
  border-radius: 3px;
  background: rgba(7, 17, 31, 0.74);
  padding: 2px 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ldgm-map__conflict-zone--war span {
  background: var(--ldgm-war);
  box-shadow: 0 0 9px rgba(235, 87, 87, 0.54);
}

.ldgm-map__conflict-zone--tension span {
  background: var(--ldgm-tension);
  box-shadow: 0 0 8px rgba(242, 153, 74, 0.48);
}

@keyframes ldgm-marker-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.92);
  }

  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

.ldgm-map__panel {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  border-left: 1px solid var(--ldgm-border);
  background:
    linear-gradient(180deg, rgba(13, 28, 49, 0.98), rgba(7, 17, 31, 0.98)),
    var(--ldgm-panel);
  padding: 16px;
  max-height: 720px;
  box-shadow: -20px 0 38px rgba(0, 0, 0, 0.26);
}

.ldgm-map__panel-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--ldgm-border);
  border-radius: 6px;
  background: #10233c;
  color: var(--ldgm-text);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.ldgm-map__panel-empty {
  display: grid;
  min-height: 240px;
  place-items: center;
  color: var(--ldgm-muted);
  text-align: center;
}

.ldgm-map__panel-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  position: relative;
  z-index: 1;
  padding-right: 44px;
}

.ldgm-map__panel-head h3 {
  margin: 0;
  color: var(--ldgm-text);
  font-size: 1.25rem;
  line-height: 1.25;
}

.ldgm-map__flag,
.ldgm-map__flag-placeholder {
  width: 56px;
  height: 40px;
  border: 1px solid var(--ldgm-border);
  border-radius: 4px;
  object-fit: cover;
  flex: 0 0 auto;
}

.ldgm-map__flag-placeholder {
  display: grid;
  place-items: center;
  background: #152944;
  color: var(--ldgm-accent);
  font-weight: 700;
}

.ldgm-map__country-hero {
  position: relative;
  overflow: hidden;
  margin: -4px -4px 14px;
  border: 1px solid rgba(214, 177, 95, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(105, 210, 255, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    #0a1728;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 28px rgba(0, 0, 0, 0.2);
}

.ldgm-map__hero-watermark {
  position: absolute;
  right: -22px;
  top: 50%;
  width: 168px;
  max-width: 52%;
  transform: translateY(-50%) rotate(-6deg);
  border-radius: 8px;
  opacity: 0.12;
  pointer-events: none;
}

.ldgm-map__iso {
  display: inline-flex;
  margin-top: 5px;
  border: 1px solid rgba(214, 177, 95, 0.42);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--ldgm-gold);
  font-size: 0.68rem;
  font-weight: 800;
}

.ldgm-map__status-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.72);
  padding: 7px 10px;
  color: var(--ldgm-text);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ldgm-map__geoint-index {
  margin: 0 0 12px;
  border: 1px solid rgba(174, 197, 226, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  padding: 13px;
}

.ldgm-map__geoint-index-top,
.ldgm-map__geoint-index-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.ldgm-map__geoint-index-top span,
.ldgm-map__geoint-index-bottom {
  color: var(--ldgm-muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ldgm-map__geoint-index-top strong {
  color: var(--ldgm-text);
  font-size: 1.55rem;
  line-height: 1;
}

.ldgm-map__gauge {
  overflow: hidden;
  height: 10px;
  margin: 11px 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.ldgm-map__gauge span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ldgm-watch);
  box-shadow: 0 0 16px rgba(242, 201, 76, 0.36);
}

.ldgm-geoint-stable .ldgm-map__gauge span,
.ldgm-geoint-stable.ldgm-map__geoint-index .ldgm-map__gauge span {
  background: var(--ldgm-stable);
  box-shadow: 0 0 16px rgba(47, 191, 113, 0.34);
}

.ldgm-geoint-watch .ldgm-map__gauge span,
.ldgm-geoint-watch.ldgm-map__geoint-index .ldgm-map__gauge span {
  background: var(--ldgm-watch);
}

.ldgm-geoint-tension .ldgm-map__gauge span,
.ldgm-geoint-tension.ldgm-map__geoint-index .ldgm-map__gauge span {
  background: var(--ldgm-tension);
  box-shadow: 0 0 16px rgba(242, 153, 74, 0.36);
}

.ldgm-geoint-crisis .ldgm-map__gauge span,
.ldgm-geoint-crisis.ldgm-map__geoint-index .ldgm-map__gauge span {
  background: var(--ldgm-crisis);
  box-shadow: 0 0 16px rgba(235, 87, 87, 0.38);
}

.ldgm-geoint-war .ldgm-map__gauge span,
.ldgm-geoint-war.ldgm-map__geoint-index .ldgm-map__gauge span {
  background: var(--ldgm-war);
  box-shadow: 0 0 18px rgba(127, 29, 29, 0.52);
}

.ldgm-map__dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.ldgm-map__dashboard div {
  border: 1px solid rgba(174, 197, 226, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 9px;
}

.ldgm-map__dashboard span {
  display: block;
  color: var(--ldgm-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ldgm-map__dashboard strong {
  display: block;
  margin-top: 4px;
  color: var(--ldgm-text);
  font-size: 1.08rem;
  line-height: 1;
}

.ldgm-map__flash {
  margin: 14px 0;
  border: 1px solid rgba(214, 177, 95, 0.24);
  border-radius: 8px;
  background: rgba(214, 177, 95, 0.06);
  padding: 12px;
}

.ldgm-map__flash h4 {
  margin: 0 0 8px;
  color: var(--ldgm-gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ldgm-map__flash p {
  margin: 4px 0;
  color: var(--ldgm-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.ldgm-map__flash strong {
  color: var(--ldgm-text);
}

.ldgm-risk-green {
  background: var(--ldgm-stable);
}

.ldgm-risk-yellow {
  background: var(--ldgm-watch);
}

.ldgm-risk-orange {
  background: var(--ldgm-tension);
}

.ldgm-risk-red {
  background: var(--ldgm-crisis);
}

.ldgm-risk-dark_red {
  background: var(--ldgm-war);
  color: #fff;
}

.ldgm-map__facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.ldgm-map__facts div {
  border-top: 1px solid var(--ldgm-border);
  padding-top: 10px;
}

.ldgm-map__facts dt {
  margin: 0 0 3px;
  color: var(--ldgm-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ldgm-map__facts dd {
  margin: 0;
  color: var(--ldgm-text);
  font-size: 0.92rem;
  line-height: 1.45;
}

.ldgm-map__articles {
  margin-top: 18px;
  border-top: 1px solid var(--ldgm-border);
  padding-top: 14px;
}

.ldgm-map__articles h4,
.ldgm-map__article-group h5 {
  margin: 0;
  color: var(--ldgm-text);
  line-height: 1.25;
}

.ldgm-map__articles h4 {
  font-size: 1rem;
}

.ldgm-map__article-group h5 {
  color: var(--ldgm-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ldgm-map__articles-count,
.ldgm-map__articles-empty {
  margin: 6px 0 0;
  color: var(--ldgm-muted);
  font-size: 0.9rem;
}

.ldgm-map__article-group {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ldgm-map__article-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.ldgm-map__article-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(174, 197, 226, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 7px;
  color: var(--ldgm-text);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.ldgm-map__article-card:hover,
.ldgm-map__article-card:focus {
  border-color: rgba(105, 210, 255, 0.48);
  background: rgba(105, 210, 255, 0.08);
  color: var(--ldgm-text);
  outline: none;
  transform: translateY(-1px);
}

.ldgm-map__article-thumb {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 6px;
  object-fit: cover;
  background: #10233c;
  color: var(--ldgm-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
}

.ldgm-map__article-body {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.ldgm-map__article-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ldgm-text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ldgm-map__article-meta {
  display: block;
  margin-top: 2px;
  color: var(--ldgm-muted);
  font-size: 0.78rem;
}

.ldgm-map__articles-link {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 16px;
  border: 1px solid var(--ldgm-accent);
  border-radius: 6px;
  background: rgba(105, 210, 255, 0.08);
  padding: 10px 12px;
  color: var(--ldgm-text);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.ldgm-map__articles-link:hover,
.ldgm-map__articles-link:focus {
  background: rgba(105, 210, 255, 0.12);
  color: var(--ldgm-text);
}

.ldgm-map__country-links,
.ldgm-map__metrics,
.ldgm-map__empty-state {
  margin-top: 18px;
  border-top: 1px solid var(--ldgm-border);
  padding-top: 14px;
}

.ldgm-map__country-links h4,
.ldgm-map__metrics h4,
.ldgm-map__empty-state h4 {
  margin: 0 0 10px;
  color: var(--ldgm-text);
  font-size: 0.96rem;
  line-height: 1.25;
}

.ldgm-map__badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ldgm-map__country-badge {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(174, 197, 226, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ldgm-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  padding: 5px 9px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.ldgm-map__country-badge:hover,
.ldgm-map__country-badge:focus {
  border-color: var(--ldgm-accent);
  background: rgba(105, 210, 255, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.ldgm-map__country-badge--allies {
  border-color: rgba(47, 191, 113, 0.32);
  background: rgba(47, 191, 113, 0.08);
}

.ldgm-map__country-badge--adversaries {
  border-color: rgba(235, 87, 87, 0.34);
  background: rgba(235, 87, 87, 0.09);
}

.ldgm-map__country-badge--neighbors {
  border-color: rgba(214, 177, 95, 0.28);
  background: rgba(214, 177, 95, 0.07);
}

.ldgm-map__country-badge span {
  color: var(--ldgm-muted);
  font-size: 0.72rem;
}

.ldgm-map__metrics dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.ldgm-map__metrics div {
  border: 1px solid rgba(174, 197, 226, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 8px;
}

.ldgm-map__metrics dt {
  margin: 0 0 3px;
  color: var(--ldgm-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ldgm-map__metrics dd {
  margin: 0;
  color: var(--ldgm-text);
  font-size: 0.92rem;
  font-weight: 800;
}

.ldgm-map__empty-state {
  display: grid;
  gap: 8px;
  color: var(--ldgm-muted);
}

.ldgm-map__empty-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(105, 210, 255, 0.32);
  border-radius: 8px;
  background: rgba(105, 210, 255, 0.08);
  color: var(--ldgm-accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
}

.ldgm-map__legend {
  border-top: 1px solid var(--ldgm-border);
  background: #0a1728;
}

.ldgm-map__legend-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ldgm-map__legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ldgm-muted);
  font-size: 0.84rem;
}

.ldgm-map__legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  flex: 0 0 auto;
}

@media (max-width: 920px) {
  .ldgm-map__toolbar,
  .ldgm-map__layout {
    grid-template-columns: 1fr;
  }

  .ldgm-map__layout,
  .ldgm-map__canvas,
  .ldgm-map__leaflet {
    min-height: 460px;
  }

  .ldgm-map__panel {
    border-top: 1px solid var(--ldgm-border);
    border-left: 0;
    max-height: none;
  }

  .ldgm-map__article-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ldgm-map__article-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .ldgm-map__article-thumb {
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 640px) {
  .ldgm-map {
    border-radius: 0;
  }

  .ldgm-map__header {
    display: grid;
  }

  .ldgm-map__layout,
  .ldgm-map__canvas,
  .ldgm-map__leaflet {
    min-height: 380px;
  }

  .ldgm-map__filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .ldgm-map__filter {
    white-space: nowrap;
  }

  .ldgm-map__panel {
    padding: 14px;
  }

  .ldgm-map__panel-head {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .ldgm-map__country-hero {
    margin-right: 0;
    margin-left: 0;
  }

  .ldgm-map__hero-watermark {
    width: 124px;
  }

  .ldgm-map__geoint-index-top strong {
    font-size: 1.34rem;
  }

  .ldgm-map__dashboard {
    grid-template-columns: 1fr 1fr;
  }

  .ldgm-map__flag,
  .ldgm-map__flag-placeholder {
    width: 48px;
    height: 34px;
  }

  .ldgm-map__article-list,
  .ldgm-map__metrics dl {
    grid-template-columns: 1fr;
  }

  .ldgm-map__article-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .ldgm-map__article-thumb {
    width: 56px;
    height: 56px;
  }
}
