/* =========================================================
   FCR — Carte des projets de recherche
   ========================================================= */

.fcr-map {
  position: relative;
  max-width: 850px;
  margin: 0 auto;
}

/* =========================================================
   Carte
   ========================================================= */

.fcr-map__stage {
  position: relative;
  width: 100%;
}

.fcr-map__background {
  display: block;
  width: 100%;
  height: auto;
}

.fcr-map__markers {
  position: absolute;
  inset: 0;
}

/* =========================================================
   Marqueurs
   ========================================================= */

.fcr-map__marker {
  position: absolute;
  z-index: 1;
  transform: translate(-50%, -50%);

  width: 26px;
  height: 26px;
  padding: 0;

  border: 2px solid #fff;
  border-radius: 50%;

  background: #e4002b;
  color: #fff;

  font: 700 12px/1 Arial, sans-serif;
  cursor: pointer;

  box-shadow: 0 1px 5px rgba(0, 0, 0, .25);
  transition: background-color .15s ease, box-shadow .15s ease;
}

.fcr-map__marker:hover,
.fcr-map__marker:focus-visible,
.fcr-map__marker[aria-expanded="true"] {
  background: #9b0020;
  z-index: 3;
  box-shadow: 0 2px 9px rgba(100, 0, 20, .3);
}

.fcr-map__marker:focus-visible {
  outline: 2px solid #9b0020;
  outline-offset: 3px;
}

/* Regroupement de plusieurs villes */

.fcr-map__marker--cluster {
  width: 32px;
  height: 32px;
  background: #7b3547;
  font-size: 13px;
}

.fcr-map__marker--cluster:hover,
.fcr-map__marker--cluster:focus-visible,
.fcr-map__marker--cluster[aria-expanded="true"] {
  background: #512332;
}

/* =========================================================
   Boîte de détail / infobulle
   ========================================================= */

.fcr-map__details {
  position: relative;
  z-index: 5;

  margin-top: 12px;
  padding: 18px 20px;

  min-width: 0;
  max-height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;

  background: #fff;
  color: #333;

  border: 1px solid #e6dfe1;
  border-top: 4px solid #e4002b;
  border-radius: 8px;

  box-shadow: 0 6px 25px rgba(0, 0, 0, .12);

  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.fcr-map__details[hidden] {
  display: none;
}

/* =========================================================
   Titres des villes
   Niveau 1 : bandeau gris, sans indentation
   ========================================================= */

.fcr-map__details .fcr-map__city-title {
  display: block;

  margin: 20px 0 10px;
  padding: 9px 12px;

  background: #f0f1f3;
  color: #343a40;

  border: 0;
  border-radius: 3px;

  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
}

/* Premier titre de ville */

.fcr-map__details .fcr-map__city-title:first-child {
  margin-top: 0;
}

/* =========================================================
   Projets
   Niveau 2 : rouge, indentation 20px
   ========================================================= */

.fcr-map__details .fcr-map__project-name {
  display: block;

  margin: 10px 0 5px 20px;
  padding: 0;

  color: #c90027;

  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}

/* Liens éventuels des projets */

.fcr-map__details .fcr-map__project-name a {
  color: inherit;
  text-decoration: none;
}

.fcr-map__details .fcr-map__project-name a:hover {
  color: #890019;
  text-decoration: underline;
}

/* =========================================================
   Établissements
   Niveau 3 : gris, indentation 32px
   ========================================================= */

.fcr-map__details ul {
  margin: 0 0 16px 32px;
  padding: 0 0 0 12px;

  list-style: none;
  border-left: 2px solid #d5d9dd;
}

.fcr-map__details li {
  margin: 0;
  padding: 2px 0;

  color: #69717a;

  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

/* =========================================================
   Autres liens
   ========================================================= */

.fcr-map__details a {
  color: #343a40;
  text-decoration: none;
}

.fcr-map__details a:hover {
  color: #c90027;
  text-decoration: underline;
}

/* =========================================================
   Indications
   ========================================================= */

.fcr-map__hint {
  margin: 0;
  color: #777;
  font-size: .85rem;
}

/* =========================================================
   Desktop : infobulle positionnée sur la carte
   ========================================================= */

@media (min-width: 900px) {
  .fcr-map__details {
    position: absolute;
    width: min(360px, 40vw);
    max-height: 400px;
    margin: 0;
  }
}

/* =========================================================
   Mobile : panneau sous la carte
   ========================================================= */

@media (max-width: 899px) {
  .fcr-map__details {
    width: 100%;
    max-height: 400px;
    padding: 15px;
    font-size: 13px;
  }

  .fcr-map__details .fcr-map__city-title {
    font-size: 14px;
  }

  .fcr-map__details .fcr-map__project-name {
    margin-left: 16px;
  }

  .fcr-map__details ul {
    margin-left: 28px;
  }
}


/* Masquer uniquement les noms des projets */
.fcr-map--compact .fcr-map__project-name,
.fcr-map--compact .fcr-map__details>h4:not(.fcr-map__city-title) {
  display: none;
}

/* Réduire le padding du panneau */
.fcr-map--compact .fcr-map__details {
  padding: 15px;
}

/* Conserver les villes bien visibles */
.fcr-map--compact .fcr-map__city-title {
  display: block;
  margin: 12px 0 6px;
  padding: 8px 10px;
}

/* Établissements : supprimer les retraits excessifs */
.fcr-map--compact .fcr-map__details ul {
  margin: 5px 0 12px;
  padding-left: 10px;
  list-style: none;
}

.fcr-map--compact .fcr-map__details li {
  margin: 0 0 6px;

}