/*Gmap*/
.map-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: auto;
}

.map-svg-wrapper {
  position: relative;
  width: 100%;
  height: auto;
}

.map-points-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-point {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: all;
  cursor: pointer;
}

.point-tooltip {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  color: #333;
}

.point-tooltip.visible {
  display: block;
}

/*carte france*/
.svg-popup {
  width: 15px;
  margin-right: 5px;
}
.map-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.city_map {
  cursor: pointer;
}
.map-sidebar {
  width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.map-sidebar-world {
  position: absolute;
  width: 250px;
  top: 0%;
  left: 10%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  z-index: 9;
}
.map-container {
  flex: 1;
  position: relative;
}
.france path {
  fill: white;
}
.france {
  background: var(--color-tertiary);
}
.world path {
  fill: rgba(255, 255, 255, 0.218);
}
.world {
  background: var(--color-primary);
}
.map-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: auto;
}

.map-svg-wrapper {
  position: relative;
  width: 100%;
  height: auto;
  max-height: 771px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.map-points-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-point,
.map-point-world {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: all;
  cursor: pointer;
}
.map-point-world.active {
  background-color: var(--color-secondary) !important;
}
.city_map li:hover {
  color: var(--color-secondary);
}
.point-tooltip {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  color: #333;
}

.point-tooltip.visible {
  display: block;
}
.map-point.active {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}
.map-sidebar li.active,
.map-sidebar-world li.active {
  color: var(--color-secondary);
}
.networkimage {
  /* margin-top: calc(0px - var(--header-height));*/
  height: 40vh;
  overflow: hidden;
  background-color: var(--color-black);
}
/*popup carte*/

.interactive-map-section,
.interactive-map-section-world,
.interactive-map-section-interpro {
  margin-top: 0;
}

.city-popup,
.country-popup,
.popup-interpro {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 40vw;
  padding: 40px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  box-sizing: border-box;
  transform: translateX(100%);
  transition: transform 0.4s ease-out;
}
.city-popup.visible,
.country-popup.visible,
.popup-interpro.visible {
  transform: translateX(0%); /* Glisse vers la gauche */
}
.city-popup .popup-header,
.country-popup .popup-header,
.popup-interpro .popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.city-popup .popup-header h3,
.country-popup .popup-header h3,
.popup-interpro .popup-header h3 {
  margin: 0;
  font-size: 18px;
}

.city-popup .popup-close,
.country-popup .popup-country-close,
.popup-interpro .popup-close {
  background: none;
  border: none;
  border: none;
  background: transparent;
  font-size: 30px;
  cursor: pointer;
  font-weight: bold;
}
.city-popup .popup-close:hover,
.country-popup .popup-close:hover,
.popup-interpro .popup-close:hover {
  color: #ffdddd;
}
.popup-country-close {
  color: var(--color-primary);
}
/*superposition carte france et world*/
.map-container-wrapper {
  position: relative;
  width: 100%;
  height: 90vh;
  overflow: hidden;
  min-height: 700px;
}

.interactive-map-section,
.interactive-map-section-world,
.interactive-map-section-interpro {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
  z-index: 1;
}

.interactive-map-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.interactive-map-section,
.interactive-map-section-world,
.interactive-map-section-interpro {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
  z-index: 1;
}

.interactive-map-section {
  transform: translateX(0); /* Par défaut visible */
  z-index: 11;
}

.interactive-map-section-world,
.interactive-map-section-interpro {
  transform: translateX(100%); /* Par défaut hors écran à droite */
}

.interactive-map-section.active {
  transform: translateX(-100%); /* Sort vers la gauche */
  z-index: 1;
}
.interactive-map-section.return {
  transform: translateX(0); /* Entre par la droite */
  z-index: 11;
}

.interactive-map-section-world.active,
.interactive-map-section-interpro.active {
  transform: translateX(0); /* Entre par la gauche */
  z-index: 11;
}

.interactive-map-section-world.return,
.interactive-map-section-interpro.return {
  transform: translateX(100%); /* Sort vers la droite */
  z-index: 1;
}
.interactive-map-section-interpro.return-inverse {
  transform: translateX(-100%); /* Sort vers la droite */
  z-index: 1;
}
#show-map-france,
#show-map-france-2,
#show-map-interpro-left {
  position: absolute;
  top: 100%;
  left: -20px;
  transform: rotate(-90deg);
  transform-origin: top left;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: none;
  padding: 40px 20px 20px 20px;
  text-transform: uppercase;
  cursor: pointer;
  width: auto;
  box-sizing: border-box;
  width: 90vh;
  min-width: 700px;
  height: auto;
  transition: 0.25s ease-in-out;
}
/*désactivation du volet interpro*/
#show-map-interpro-left,
#show-map-interpro-right {
  display: none !important;
}
/**/
#show-map-france-2:hover,
#show-map-france:hover {
  left: 0px;
}
#show-map-world,
#show-map-world-2,
#show-map-interpro-right {
  position: absolute;
  top: 0;
  right: 57px;
  transform: rotate(-90deg);
  transform-origin: top right;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: none;
  text-transform: uppercase;
  cursor: pointer;
  width: auto;
  box-sizing: border-box;
  width: 90vh;
  min-width: 700px;
  padding: 20px 20px 40px 20px;
  height: auto;
  transition: 0.25s ease-in-out;
}
#show-map-world:hover,
#show-map-world-2:hover {
  right: 77px;
}
#show-map-interpro-right {
  right: 114px;
  z-index: 9;
}
#show-map-interpro-right:hover {
  right: 135px;
}
#show-map-interpro-left {
  left: 2.5%;
  z-index: 10;
}
#show-map-interpro-left:hover {
  left: 3.3%;
}
/* Bouton Monde */
#show-map-world.map-button-reveal {
  opacity: 0;
  right: -137px;

  transition:
    opacity 1.4s ease,
    right 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#show-map-world.map-button-reveal.is-visible {
  opacity: 1;
  right: 57px;
}

/* Bouton France */
#show-map-france.map-button-reveal {
  opacity: 0;
  left: -100px;

  transition:
    opacity 1.4s ease,
    left 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#show-map-france.map-button-reveal.is-visible {
  opacity: 1;
  left: -20px;
}
/* Layout carte France + aperçu international */
.map-france-layout {
  width: 100%;
  height: 100%;
  min-width: 0;
  --map-content-top: 120px;
}

.map-france-main {
  width: 70%;
  height: 100%;
  min-width: 0;
}

.map-france-main .map-sidebar {
  flex: 0 0 280px;
  width: 280px;
  padding-top: var(--map-content-top);
  justify-content: flex-start;
}

.map-france-main .map-container {
  flex: 1;
  min-width: 0;
  max-width: none;
}

/* Aperçu partenariats internationaux */
.map-world-preview {
  width: 30%;
  height: 100%;
  min-width: 0;

  padding: var(--map-content-top) 100px 60px 0;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  box-sizing: border-box;
  cursor: pointer;
}

.map-world-preview h2 {
  max-width: 320px;
}

.map-world-preview-image {
  display: block;

  width: 100%;
  height: auto;

  object-fit: cover;
}

.map-world-preview-cta {
  display: flex;
  align-items: center;
  gap: 15px;

  margin-top: 25px;
}

.map-world-preview-arrow {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid currentColor;
  border-radius: 50%;

  transition: transform 0.25s ease;
}

.map-world-preview:hover .map-world-preview-arrow {
  transform: translateX(5px);
}
.map-world-preview-countries {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  max-width: 100%;
}

.map-world-preview-cta {
  margin-top: 18px;
}
/* Layout carte Monde + aperçu France */
.map-world-layout {
  width: 100%;
  height: 100%;
  min-width: 0;

  --map-world-content-top: 180px;
}

.map-world-main {
  position: relative;
  width: 75%;
  height: 100%;
  min-width: 0;
}
.map-world-main .map-sidebar-world {
  left: 35px;
  top: 0;
  width: 220px;
  justify-content: flex-start;
  padding-top: var(--map-world-content-top);
  box-sizing: border-box;
}

.map-world-main .map-container {
  width: 100%;
  height: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  padding-left: 280px;
  padding-right: 30px;
}

.map-world-main .map-svg-wrapper-world {
  position: relative;
  width: 100%;
  max-width: 1370.67px;
  margin: 140px auto 0;
}
/* Aperçu réseau France */
.map-france-preview {
  width: 25%;
  height: 100%;
  min-width: 0;

  padding: var(--map-world-content-top) 100px 60px 0;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  box-sizing: border-box;
  cursor: pointer;

  color: white;
}

.map-france-preview h2 {
  max-width: 320px;
}

.map-france-preview-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.map-france-preview-cta {
  display: flex;
  align-items: center;
  gap: 15px;

  margin-top: 18px;
}

.map-france-preview-arrow {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid currentColor;
  border-radius: 50%;

  transition: transform 0.25s ease;
}

.map-france-preview:hover .map-france-preview-arrow {
  transform: translateX(5px);
}
.map-sidebar-world .city_map {
  margin-top: 50px !important  ;
}

@media screen and (max-width: 1150px) {
  .map-sidebar-world .city_map {
    margin-top: 0px !important  ;
  }
  .map-france-main,
  .map-france-layout {
    width: 100%;
  }

  .map-france-main .map-container {
    display: none;
  }

  .map-world-preview {
    display: none;
  }

  .map-france-main .map-sidebar {
    flex: 1 1 100%;
    width: 100%;
  }
  .map-world-layout,
  .map-world-main {
    width: 100%;
  }

  .map-world-main .map-container {
    display: none;
  }

  .map-france-preview {
    display: none;
  }
}
/* Apparition mobile du bandeau International */
@keyframes map-world-mobile-bounce {
  0% {
    right: -148px;
    opacity: 0;
  }

  38% {
    right: 64px;
    opacity: 1;
  }

  52% {
    right: 39px;
  }

  65% {
    right: 56px;
  }

  77% {
    right: 44px;
  }

  87% {
    right: 51px;
  }

  94% {
    right: 47px;
  }

  100% {
    right: 48px;
    opacity: 1;
  }
}
/* Rebond du bandeau France depuis la gauche */
@keyframes map-france-mobile-bounce {
  0% {
    left: -100px;
    opacity: 0;
  }

  38% {
    left: 16px;
    opacity: 1;
  }

  52% {
    left: -9px;
  }

  65% {
    left: 8px;
  }

  77% {
    left: -4px;
  }

  87% {
    left: 3px;
  }

  94% {
    left: -1px;
  }

  100% {
    left: 0;
    opacity: 1;
  }
}
@media screen and (max-width: 1024px) {
  #show-map-world.map-button-reveal {
    right: -148px;
    transition: none;
  }

  #show-map-world.map-button-reveal.is-visible {
    right: 48px;
    animation: map-world-mobile-bounce 1.8s ease-out;
  }

  #show-map-france.map-button-reveal {
    left: -100px;
    transition: none;
  }

  #show-map-france.map-button-reveal.is-visible {
    left: 0;
    animation: map-france-mobile-bounce 1.8s ease-out;
  }
  .map-container-wrapper {
    height: 80vh;
  }
  .map-container,
  .networkimage {
    display: none;
  }
  .map-world-main .map-sidebar-world {
    width: 80vw;
    left: 17%;
    top: 5%;
    justify-content: flex-start;
  }
  .map-sidebar,
  .interpro-content,
  .map-sidebar-world {
    padding-left: var(--space-normal);
  }
  .interactive-map-section,
  .map-sidebar-world,
  .interactive-map-section-interpro,
  .map-sidebar,
  .map-sidebar-world .city_map {
    padding-top: var(--space-normal) !important;
  }
  .interactive-map-section-interpro h2,
  .interactive-map-section h2,
  .map-sidebar-world h2 {
    font-size: var(--font-size-xn);
  }
  .map-sidebar {
    justify-content: start;
  }
  #show-map-world,
  #show-map-world-2,
  #show-map-interpro-right {
    right: 48px;
    padding: 17px 20px 40px 20px;
    width: 80vh;
  }
  #show-map-interpro-right {
    right: 97px;
  }
  #show-map-france-2 {
    left: 0;
    padding: 17px 20px 14px 20px;
    width: 65vh;
  }
  #show-map-interpro-left {
    padding: 17px 20px 14px 20px;
    width: 65vh;
    left: 0px;
  }
  #show-map-france {
    padding: 17px 20px 14px 20px;
    width: 80vh;
    left: 0px;
  }
  #show-map-world,
  #show-map-france {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  #show-map-world svg,
  #show-map-france svg {
    flex-shrink: 0;
  }
  .city-popup,
  .country-popup,
  .popup-interpro {
    width: 100vw;
  }

  .interactive-map-section,
  .interactive-map-section.return,
  .interactive-map-section-world.active,
  .interactive-map-section-interpro.active {
    z-index: 2;
  }
}
@media (prefers-reduced-motion: reduce) {
  #show-map-world.map-button-reveal.is-visible,
  #show-map-france.map-button-reveal.is-visible {
    animation: none;
  }
}
/* Petit desktop */
@media screen and (min-width: 1151px) and (max-width: 1450px) {
  .map-world-main {
    width: 70%;
  }

  .map-france-preview {
    width: 30%;

    /* beaucoup moins de perte de largeur */
    padding-right: 40px;
  }

  .map-france-preview h2 {
    max-width: none;
  }

  .map-france-preview-cta {
    width: 100%;
    justify-content: space-between;
    gap: 20px;
  }

  .map-france-preview-cta strong {
    max-width: 190px;
  }

  .map-france-preview-arrow {
    flex-shrink: 0;
  }
}
/* Affichage tablette / petit desktop : France + International côte à côte */
@media screen and (min-width: 801px) and (max-width: 1150px) {
  /* Deux volets visibles simultanément */
  .interactive-map-section {
    width: 50%;
    left: 0;
    transform: none !important;
    z-index: 2;
  }
  .interactive-map-section {
    padding: 50px 28px !important;
  }
  .interactive-map-section-world {
    width: 50%;
    left: 50%;
    transform: none !important;
    z-index: 2;
  }

  /* Volet interpro masqué dans cette configuration */
  .interactive-map-section-interpro {
    display: none;
  }

  /* Layouts internes sur toute la largeur de leur moitié */
  .map-france-layout,
  .map-france-main,
  .map-world-layout,
  .map-world-main {
    width: 100%;
    height: 100%;
  }

  /* Masquer les grandes cartes et les vignettes desktop */
  .map-france-main .map-container,
  .map-world-main .map-container,
  .map-world-preview,
  .map-france-preview {
    display: none;
  }

  /* Colonne France */
  .map-france-main .map-sidebar {
    width: 100%;
    flex: 1 1 100%;

    padding: 0 28px !important;

    justify-content: flex-start;
    box-sizing: border-box;
  }

  /* Liste pays */
  .map-sidebar-world .city_map {
    padding-top: 0 !important;
  }

  /* Colonne International */
  .map-world-main .map-sidebar-world {
    position: relative;

    width: 100%;
    height: 100%;

    left: auto;
    top: auto;

    padding: 50px 28px !important;

    justify-content: flex-start;
    box-sizing: border-box;
  }

  /* Les boutons verticaux ne servent pas dans cette vue */
  #show-map-world,
  #show-map-france,
  #show-map-world-2,
  #show-map-france-2,
  #show-map-interpro-left,
  #show-map-interpro-right {
    display: none !important;
  }

  /*
   * POPUP FRANCE
   * Au clic sur une ville :
   * la popup occupe la moitié droite
   * et conserve son slide depuis la droite
   */
  .interactive-map-section .city-popup {
    width: 50vw;
    right: -100%;
    left: auto;
  }

  /*
   * POPUP MONDE
   * Au clic sur un pays :
   * la popup occupe la moitié gauche
   * et arrive de gauche vers la droite
   */
  .interactive-map-section-world .country-popup {
    width: 50vw;

    left: -100%;
    right: auto;

    transform: translateX(-100%);
  }

  .interactive-map-section-world .country-popup.visible {
    transform: translateX(0);
  }

  /*
   * Gestion du z-index :
   * le volet qui contient une popup ouverte
   * passe temporairement devant l'autre
   */
  .interactive-map-section,
  .interactive-map-section-world {
    z-index: 2;
  }

  .interactive-map-section:has(.city-popup.visible),
  .interactive-map-section-world:has(.country-popup.visible) {
    z-index: 5;
  }
}
/* Écrans très larges */
@media screen and (min-width: 1921px) {
  .map-container-wrapper {
    height: min(90vh, 960px);
  }

  #show-map-france,
  #show-map-france-2,
  #show-map-interpro-left,
  #show-map-world,
  #show-map-world-2,
  #show-map-interpro-right {
    width: min(90vh, 960px);
  }

  .map-france-layout,
  .map-world-layout {
    max-width: 2400px;
    margin-inline: auto;
  }

  .map-france-main .map-container {
    margin-top: var(--map-content-top);
    margin-bottom: auto;
  }

  .map-france-main .map-svg-wrapper {
    margin-inline: auto;
  }
}
