/* Loecsen earth (langues) modal — même format que login / share */
.loecsen-earth-modal-overlay {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.45) !important;
  z-index: 100050 !important;
  pointer-events: auto !important;
  opacity: 0;
}
.loecsen-earth-modal-overlay.is-open {
  display: block !important;
  opacity: 1;
}
.loecsen-earth-modal-overlay.is-open.is-closing {
  opacity: 0;
  pointer-events: none !important;
  transition: opacity 0.18s ease;
}

#earth.loecsen-earth-modal,
#earth.navs.tabcontent.loecsen-earth-modal {
  display: none;
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%);
  margin: 0 !important;
  width: min(520px, calc(100vw - 32px)) !important;
  max-width: 520px !important;
  height: 80vh !important;
  max-height: 80vh !important;
  border-radius: 16px !important;
  border: none !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  z-index: 100051 !important;
  overflow: hidden;
  overflow-x: hidden;
  background-color: #fff;
  padding: 0 !important;
  pointer-events: auto;
  /* Ne pas mettre opacity:0 ici : #earth.navs.tabcontent (3 classes)
     battait .is-open (2 classes) → overlay visible, popup invisible.
     animation:none : .tabcontent { fadeEffect } forçait aussi opacity 0. */
  animation: none !important;
  -webkit-animation: none !important;
}
#earth.loecsen-earth-modal.is-open,
#earth.loecsen-earth-modal.act,
#earth.navs.tabcontent.loecsen-earth-modal.is-open,
#earth.navs.tabcontent.loecsen-earth-modal.act {
  display: flex !important;
  flex-direction: column;
  opacity: 1;
}
#earth.loecsen-earth-modal.is-open.is-closing,
#earth.loecsen-earth-modal.act.is-closing,
#earth.navs.tabcontent.loecsen-earth-modal.is-open.is-closing,
#earth.navs.tabcontent.loecsen-earth-modal.act.is-closing {
  opacity: 0;
  pointer-events: none !important;
  transition: opacity 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
  .loecsen-earth-modal-overlay,
  #earth.loecsen-earth-modal,
  #earth.navs.tabcontent.loecsen-earth-modal {
    transition: none !important;
  }
}

#earth .loecsen-earth-modal__dialog {
  display: flex;
  flex-direction: column;
  height: 80vh;
  max-height: 80vh;
  background: #fff;
  min-height: 0;
}

#earth .loecsen-earth-modal__title,
#earth .title.loecsen-earth-modal__title {
  margin: 0;
  font-size: 26px !important;
  color: var(--newblue, #29a9a4) !important;
  font-weight: 700 !important;
  letter-spacing: normal;
  padding: 10px 20px !important;
  background: #fff;
  background-image: linear-gradient(to right top, #f7eec7, #ffe0ca, #ffd7dd, #f7d5f4, #d1d9ff);
  line-height: 40px;
  flex-shrink: 0;
}
#earth .loecsen-earth-modal__title .close,
#earth .title.loecsen-earth-modal__title .close,
#earth .loecsen-earth-modal__title .close.icon {
  width: 15px !important;
  height: 15px !important;
  fill: var(--newblue, #29a9a4) !important;
  color: var(--newblue, #29a9a4) !important;
  cursor: pointer;
  float: inline-end;
  margin: 7px 0 !important;
  padding: 0 !important;
  position: static !important;
}
#earth .loecsen-earth-modal__title .close:hover {
  fill: #ff6550 !important;
}

#earth .loecsen-earth-modal__body {
  padding: 0;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  height: 100%;
}

#earth .loecsen-earth-modal__title {
  display: flex;
  align-items: center;
  gap: 8px;
}
#earth .loecsen-earth-modal__title .earth-title-text {
  flex: 1;
  min-width: 0;
}
#earth .earth-back {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--newblue, #29a9a4);
  cursor: pointer;
  padding: 4px;
  margin: 0;
  line-height: 0;
  flex-shrink: 0;
}
#earth .earth-back[hidden] {
  display: none !important;
}
#earth .earth-back:hover {
  color: #ff6550;
}
#earth .loecsen-earth-modal__title .close {
  float: none;
  margin: 7px 0 7px auto;
  flex-shrink: 0;
}

#earth .earth-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  max-height: calc(80vh - 60px);
}
#earth .earth-view[hidden] {
  display: none !important;
}

#earth .earth-fromlang-cta {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% - 24px);
  margin: 12px 12px 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--newblue, #29a9a4);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  text-align: center;
}
#earth .earth-fromlang-cta .icon {
  width: 20px;
  height: 20px;
  fill: #fff;
  flex-shrink: 0;
  /* Annule le .icon global (margin-top + padding-top) qui décale le SVG */
  margin: 0;
  padding: 0;
  display: block;
}
#earth .earth-fromlang-cta:hover {
  filter: brightness(0.95);
}

#earth .earth-view-fromlang {
  padding: 8px 12px 16px;
  overflow: auto;
}
#earth .earth-view-fromlang .pr4 {
  width: 100%;
  margin: 0;
}
#earth .earth-view-fromlang .links {
  display: block;
  margin: 10px 0;
  cursor: pointer;
  color: var(--newblue, #29a9a4);
  font-size: 13px;
}
#earth .earth-view-fromlang .links .icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  fill: var(--newblue, #29a9a4);
}
#earth .earth-view-fromlang #back_lang_site {
  display: none;
}
#earth #from_lang_choices {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  max-height: min(360px, calc(80vh - 180px));
  overflow-y: auto;
  height: auto !important;
}
#earth #from_lang_choices li {
  display: flex;
  align-items: flex-start;
  height: 40px;
  padding: 0 4px;
  border-radius: 6px;
}
#earth #from_lang_choices li:hover {
  background: #f4fbfa;
}
#earth #from_lang_choices input[type='checkbox'] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
#earth #from_lang_choices .checkbox {
  width: 18px;
  height: 18px;
  display: inline-block;
  cursor: pointer;
  position: relative;
  background: #fff;
  border-radius: 50%;
  border: 3px solid var(--newblue, #29a9a4);
  box-sizing: border-box;
}
#earth #from_lang_choices input[type='checkbox']:checked + label span.checkbox:before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 8px;
  height: 8px;
  background: var(--newblue, #29a9a4);
  border-radius: 50%;
}
#earth #from_lang_choices .chyptitle {
  float: none;
  margin-left: 12px;
  margin-top: 0;
  color: var(--newblue, #29a9a4);
  font-size: 14px;
}
#earth #from_lang_choices .phypcchecbox {
  float: none;
}

#earth .earth-regions {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
#earth .loecsen-earth-modal__body.earth-regions {
  max-height: calc(80vh - 60px);
}
#earth .earth-view .earth-regions {
  max-height: none;
}
#earth .earth-region-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 12px 0;
  background: #e5f3f2;
  border-bottom: 1px solid #cfe8e6;
  flex-shrink: 0;
}
#earth .earth-region-tab {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--newblue, #29a9a4);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  padding: 8px 10px;
  margin: 0;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.75;
}
#earth .earth-region-tab:hover {
  opacity: 1;
  background: rgba(41, 169, 164, 0.12);
}
#earth .earth-region-tab.active {
  opacity: 1;
  background: #fff;
  border: 1px solid #cfe8e6;
  border-bottom-color: #fff;
}
#earth .earth-region-panels {
  flex: 1;
  min-height: 300px;
  overflow: auto;
  background: #fff;
  padding: 10px 8px 16px;
}
#earth .earth-region-panel {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 8px;
}
#earth .earth-region-panel.active {
  display: block;
}
#earth .earth-region-panel[hidden] {
  display: none !important;
}
#earth .earth-region-panel > li {
  break-inside: avoid;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  margin: 0;
  border-radius: 6px;
}
#earth .earth-region-panel > li:hover {
  background: #f4fbfa;
}
#earth .earth-region-panel > li .phoca-flagbox,
#earth .earth-region-panel > li .toppenu {
  float: none;
  width: 22px;
  height: 16px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
#earth .earth-region-panel > li .phoca-flagbox img,
#earth .earth-region-panel > li .toppenu img {
  width: 22px;
  height: auto;
  display: block;
}
#earth .earth-region-panel > li a {
  color: #333;
  line-height: 1.35;
  text-align: left;
  text-transform: none;
  display: inline;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
}
#earth .earth-region-panel > li a:hover {
  color: var(--newblue, #29a9a4);
  text-decoration: underline;
}

@media screen and (max-width: 740px) {
  #earth .earth-region-panel {
    columns: 1;
  }
  #earth .earth-region-tab {
    font-size: 12px;
    padding: 8px;
  }
}

/* Mobile : croix de fermeture — zone tactile élargie (~35px) sans déplacer l'icône. */
@media screen and (max-width: 899px) {
  #earth .loecsen-earth-modal__title .close {
    padding: 10px !important;
    margin: -3px -10px -3px auto !important;
    box-sizing: content-box;
  }
}
