.eosc-map {
  --eosc-primary-800: #112b2b;
  --eosc-primary-500: #1F4F4F;
  --eosc-primary-400: #4c7272;
  --eosc-primary-200: #98AEAE;
  --eosc-surface: #ffffff;
  --eosc-radius: 15px;

  /* Palette de la carte. */
  --eosc-sea: #F7F8F8;
  --eosc-land: #e4e9e9;          /* pays sans logo */
  --eosc-land-tagged: #98AEAE;   /* pays ayant au moins un logo */
  --eosc-land-hover: #4c7272;
  --eosc-border: #ffffff;

  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  box-sizing: border-box;
}
.eosc-map *,
.eosc-map *::before,
.eosc-map *::after { box-sizing: border-box; }

.eosc-map .eosc-map__stage {
  position: relative;
  background-color: var(--eosc-sea);
  border-radius: var(--eosc-radius);
  overflow: hidden;
}

.eosc-map .eosc-map__svg {
  display: block;
  width: 100%;
  height: auto;
}

.eosc-map .eosc-map__country {
  fill: var(--eosc-land);
  stroke: var(--eosc-border);
  stroke-width: 0.6;
  stroke-linejoin: round;
  transition: fill .18s ease;
}

/* Pays porteur d'au moins un logo : teinte plus soutenue, et survolable. */
.eosc-map .eosc-map__country.is-tagged {
  fill: var(--eosc-land-tagged);
  cursor: pointer;
}
.eosc-map .eosc-map__country.is-tagged:hover,
.eosc-map .eosc-map__country.is-active {
  fill: var(--eosc-land-hover);
}
.eosc-map .eosc-map__country.is-tagged:focus-visible {
  outline: none;
  fill: var(--eosc-land-hover);
  stroke: var(--eosc-primary-800);
  stroke-width: 1.4;
}

/* --- Pastilles et logos, en surimpression du SVG -------------------------- */

.eosc-map .eosc-map__marker {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  pointer-events: none;   /* laisse le survol atteindre le pays en dessous */
}

.eosc-map .eosc-map__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--eosc-primary-500);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .75);
  transition: opacity .18s ease, transform .18s ease;
  /* Survolable : sur Malte ou le Luxembourg, le pays fait quelques pixels et
     la pastille est la seule cible atteignable a la souris. */
  pointer-events: auto;
  cursor: pointer;
}
.eosc-map .eosc-map__marker.is-active .eosc-map__dot {
  opacity: 0;
  transform: scale(.4);
}

.eosc-map .eosc-map__logos {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 7px;
  background-color: rgba(255, 255, 255, .92);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(17, 43, 43, .18);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.9);
  transition: opacity .18s ease, transform .18s ease;
}
.eosc-map .eosc-map__marker.is-active .eosc-map__logos {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  /* Actif seulement : sinon un logo invisible masquerait le pays voisin. */
  pointer-events: auto;
}

.eosc-map .eosc-map__logo {
  display: block;
  max-width: none;   /* les dimensions sont calculees pour egaliser les surfaces */
  object-fit: contain;
}

/* Logo cliquable : uniquement quand la ligne porte un lien. */
.eosc-map a.eosc-map__link {
  display: block;
  border: none;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity .15s ease;
}
.eosc-map a.eosc-map__link:hover { opacity: .7; }
.eosc-map a.eosc-map__link:focus-visible {
  outline: 2px solid var(--eosc-primary-500);
  outline-offset: 3px;
}

/* Le pays actif passe au-dessus des autres pastilles. */
.eosc-map .eosc-map__marker.is-active { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .eosc-map .eosc-map__country,
  .eosc-map .eosc-map__dot,
  .eosc-map .eosc-map__logos { transition: none; }
}
