.popup-wrapper .second-half {
  display: flex;
  flex-direction: column;
}

.popup-wrapper .second-half .location-summary {
  flex: 1 1 auto;
  margin-top: 10px;
  text-align: justify;
  overflow-y: hidden;
  line-height: 15px;
  min-height: 0; 
}

#leaders-map-page #menu .btn-text-p {
  font-size: 18px;
  font-weight: 100;
  margin: 0;
}
#leaders-map-page #menu .btn__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: flex-start; /* labels left-aligned, all starting at the same x */
    align-items: center;
}
#leaders-map-page #menu .btn__icon {
    flex: 0 0 36px;              /* fixed icon column so every label starts at the same x */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.popup-wrapper .second-half .third-popup-row {
  margin-top: auto;           
  flex-shrink: 0;            
  padding-top: 20px;
}

.mapboxgl-popup-content div.content {
  height: 33px;
  width: 98%;
  border-radius: 8px;
  background-color: #0d5a90;
  text-align: left;
  margin-top: 10px;
}

.popup-wrapper .summary * {
  font-weight: 100 !important;
}

.popup-wrapper .summary ul,
.popup-wrapper .summary ol {
  margin-left:40px;

}

.summary {
  height: 100%;
}

div.explore-button {
  border-color: #0d5a90;
}

.gagnant-block {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 10px;
}

.gagnant-icon {
  font-size: 20px;
  line-height: 1;
}

.gagnant-text {
  display: flex;
  flex-direction: column;
}

.gagnant-label {
  font-size: 18px;
  font-weight: 100;
  padding-bottom: 20px;
}

.gagnant-years {
  font-size: 16px;
  color: #6b6b6b;
}

.mapboxgl-ctrl, .mapboxgl-ctrl * {
  font-family: inherit !important;
}

.third-popup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.third-popup-row a.link-button {
  display: inline-block;
  margin-top: 0;
  padding: 6px 12px;
  white-space: nowrap;
}

.mapboxgl-popup-content a {
    width: 100px;
    display: block;
    padding-top: 11px;
    padding-bottom: 8px;
    border-radius: 6px;
    height: 16px;
    text-align: center;
    text-decoration: none;
    font-size: small;
    font-weight: normal;
    margin-bottom: 4px;
    margin-top: 23px;
    margin-left: -2px;
    background-color: #edeaea;
    color: #000000;
    border: 1px solid var(--moba_blue_pale);
    outline: none;
}

.mapboxgl-popup-content a.link-button {
  text-align: center;
}

.mapboxgl-popup-content a:hover {
  background-color: var(--moba_blue_pale);
  border-color: var(--moba_blue_pale);
  color: #0d5a90;
}

.third-popup-row {
  display: flex;
    align-items: center;
    justify-content: space-between; 
   gap: 10px;
     margin-top: 10px;
 }

 .third-popup-row a {
    display: inline-block;
    margin-top: 0; 
    display: flex;
    padding-left: 40px;
    padding-right: 40px;
    align-self: end;
  }  

   .third-popup-row a p{
    font-weight: 100;
   }
   
   .third-popup-row .gagnant {
    font-size: 14px;
    white-space: nowrap;
  }

i.fa {
  margin-left: 10px;
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
  border-bottom-color: var(--moba_blue_pale);
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
  border-top-color: var(--moba_blue_pale);
}

.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
  border-right-color: var(--moba_blue_pale);
}

.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
  border-left-color: var(--moba_blue_pale);
}

p.type {
  margin-left: 5px;
}

/* layers list */
#menu {
    display: grid;
    z-index: 2001;
    left: 10px;
    padding: 0;
    text-decoration: none;
    padding-top: 15px;
    font-size: 18px;
    text-align: left;
    top: 0;
    position: absolute;
}

.leaders-map-stack {
  position: relative
}

#menu a
 {
    box-sizing: border-box;
    height: 54px;
    width: 320px;             /* wide enough to fit "OBNL et communautaire" */
    justify-content: flex-start;
    border-radius: 100px;
    margin-bottom: 10px;
    color: #000000;
    padding: 7px 18px 7px 22px;  /* generous left pad before the icon */
    text-decoration: none;
    background-color: #ffffff;
    font-size: 16px;
    text-align: left;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
}

/* Fixed-size icon column so every pill's label starts at the same x.
   Each iconFor() PNG has its own aspect ratio (briefcase wide, building tall,
   etc.), but the wrapper forces a consistent 36×36 slot. */
#menu .menu-pill-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#menu .menu-pill-icon img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: 0;
  object-fit: contain;
}
/* Emoji-only icon (Gagnants pill) — center the glyph inside the same slot. */
#menu .menu-pill-icon--emoji {
  font-size: 22px;
  line-height: 1;
}
#menu .menu-pill-label {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

div.icon-border {
  border-radius: 4px;
  display: inline-block;
  border: 2px solid #ffbe0b;
  height: 24px;
  width: 24px;
}

#menu a#all span{
  margin-top: 5px;
}

#menu a.active {
  background-color: #d2ffff;
  color: #0d5a90;
}

/* Toggle-off animation: clicking an active filter pill plays the inverse of
   the hover fill — the blue circle shrinks back to the centre. JS adds
   .is-collapsing on deactivation (and removes it on pointerleave). The
   !important is needed to beat the `.btn:hover .btn__circle { scale(1) }`
   rule, since the pointer is still over the pill right after the click. */
#menu .menu-item.is-collapsing .btn__circle {
  transform: translate(-50%, -50%) scale(0) rotate(0.001deg) !important;
}


.material-icons{
  color: #3c3a3a;
}


.map-overlay {
  position: absolute;
  bottom: 0;
  right: -9px;
  background: rgba(255, 255, 255);
  margin-right: 20px;
  font-family: "Roboto", sans-serif;
  overflow: auto;
  border-radius: 3px;
}

div#layers-custom-control
 {
    display: none;
}

.third-popup-row--link-only {
  justify-content: flex-end;
}

@media screen and (max-width: 1039px) and (min-width: 814px) {
  #menu {
    overflow-y: auto;
  }

  #menu a {
    font-size: 14px;
  }

  #menu img {
    width: 22px;
  }

}

@media screen and (max-width: 813px) and (min-width: 666px) {
  #menu a {
    font-size: 1.7vw;
    padding-top: 7px;
  }

  #menu img {
    position: relative;
    width: 17px;
    height: 21px;
    margin-left: 10px;
  }
}
@media screen and (max-width: 665px) and (min-width: 456px) {
  #menu {
    max-width: 30%;
    height: 300px;
    overflow-y: auto;
  }

  #menu a {
    font-size: 2vw;
  }

  #menu img {
    width: 30px;
    margin-top: 5px;
  }


}

@media screen and (max-width: 455px) and (min-width: 400px) {

  .mapboxgl-ctrl-geocoder mapboxgl-ctrl {
    width: 30%;
  }

  .mapboxgl-ctrl-geocoder {
    width: 25%;
    min-width: 175px;
  }

  #legend {
    margin-bottom: 110px;
  }
}

@media screen and (max-width: 399px) {
  #menu {
    /* display: flex; */
    position: absolute;
    width: 102%;
    height: 178px;
    top: 52%;
    left: -2px;
    overflow-y: scroll;
  }
  .mapboxgl-ctrl-geocoder mapboxgl-ctrl {
    width: 30%;
  }

  .mapboxgl-ctrl-geocoder {
    width: 25%;
    min-width: 175px;
  }
}

#leaders-info-accordion {
    border-bottom:2px solid black;
}

#leaders-info-accordion .header_content h2 {
  font-size:44px;
  padding-top:60px;
  padding-bottom:60px;
}

#leaders-info-accordion .accordion-section {
  max-width: 1200px;
  padding-bottom:0;
}

#leaders-info-accordion .accordion-section ul span {
  font-weight: 100!important;
}

#leaders-info-accordion .accordion-css__item-h3 {
  font-size:38px;
}

#leaders-map-page .sec_restez_connect {
  margin-top:30px;
}

#fixed-popup {
  position: fixed;
  inset: 0;               
  display: none;
  z-index: 2002;  
}

#fixed-popup.is-open { display: block; }

.fixed-popup__panel {
  position: absolute;
  top: calc(50% + 40px); 
  right: 40px;             
  transform: translateY(-50%);
  width: 700px;            /* match your .mapboxgl-popup-content width */
  max-width: min(96vw, 700px);
  height: 681px;           /* match your popup height */
  max-height: 80vh;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #fff;
}

/* inner content uses your existing popup styles */
.fixed-popup__content {
  height: 100%;
  padding: 30px;
  max-height: -moz-available;          
  max-height: -webkit-fill-available; 
  max-height: fill-available;
}

/* close button */
.fixed-popup__close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 34px;
  line-height: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* Reuse your existing popup content rules, but target the fixed panel: */
.fixed-popup__content .popup-wrapper { 
  height: 100%; 
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fixed-popup__content .location-image { height: 100%; }
.fixed-popup__content .first-half, 
.fixed-popup__content .second-half { 
  height: 50%; 
}

.fixed-popup__content .second-half .title > span {
    display: flex;
    align-items: center;
    font-weight: 100;
}

/* Banner, intro text, two-up CTAs, and map all share the same horizontal
   extent: 100px side strips at desktop, scaling down at smaller breakpoints. */
#leaders-map-page .sec_banner_propos {
  padding-left: 100px;
  padding-right: 100px;
}
#leaders-map-page .sec_banner_propos .max_container {
  /* Drop .max_container's 1400px cap so the banner edges line up with
     the map and the two-up CTAs (both of which span full viewport - 200px). */
  max-width: none;
  margin: 0;
}
/* Subtle non-blurry drop-shadow on the banner title — sharpens the title
   against the banner image. Zero blur keeps it crisp; low alpha keeps it
   from looking heavy. */
#leaders-map-page .div_banner_propos h1 {
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
/* SplitText wraps each line of the h1 in .reveal-line__inner; the shadow
   has to live on those inner spans too, otherwise it would be clipped by
   SplitText's overflow:hidden on the line container during the reveal. */
#leaders-map-page .div_banner_propos h1 .reveal-line__inner {
  text-shadow: inherit;
}

/* Intro text (the green CTA block under the banner) — same horizontal extent
   as the banner, with no extra max-width cap. Font size matches the two-up
   CTAs' h2 (44px). */
#leaders-map-page .page_header_wrapper.green .header_content {
  max-width: none;
  margin: 0;
  padding-left: 100px;
  padding-right: 100px;
}
#leaders-map-page .page_header_wrapper.green .header_content h2 {
  font-size: 44px;
}

/* Side strips around the map. Width is shared with the two-up CTA grid above
   it (see .sec_restez_connect--two-up) so the map and the CTAs line up. */
.map-separator {
  padding: 0 100px;
}
/* Generous bottom padding only when the separator carries the bottom line,
   so the map has breathing room before the next section. */
.map-separator.map-separator--with-bottom-line {
  padding-bottom: 200px;
}

/* ===== 4-square filter tabs under the map =====
   The tab row shares the map's horizontal extent (100px / 40px / 10px side
   strips, controlled by the media queries below). Each tab is a square. */
.leaders-filter-tabs {
  /* Top padding matches .leaders-section-intro so the two intro blocks
     (one before the map, one before the tabs) have the same headroom. */
  padding: 60px 100px 120px;
}
.leaders-filter-tabs__row {
  display: grid;
  /* One equal-width column per category. --tab-count is set inline by
     page-leaders.php (= number of catalogue categories), so the squares
     always fill the row at equal width regardless of how many there are.
     Falls back to 4 if the var is missing. */
  grid-template-columns: repeat(var(--tab-count, 4), 1fr);
  gap: 20px;
}
/* Shared title + subtitle block used above the map and above the tab row.
   Same horizontal extent as the map / CTAs (100px / 40px / 10px strips). */
.leaders-section-intro {
  padding: 60px 100px 0;
}
.leaders-section-intro__header,
.leaders-filter-tabs__header {
  text-align: center;
  margin-bottom: 36px;
}
.leaders-section-intro__title,
.leaders-filter-tabs__title {
  font-size: 44px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 16px;
}
.leaders-section-intro__subtitle,
.leaders-filter-tabs__subtitle {
  font-size: 20px;
  font-weight: 300;
  line-height: 1.4;
  margin: 0 auto;
  max-width: 900px;
  color: var(--moba_text_secondary);
}

/* Tab cards — moba grey background by default, rounded, vertical: icon on top,
   label below, both centered. */
.leaders-filter-tab {
  appearance: none;
  border: 0;
  background: var(--moba_grey);
  color: #000;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 36px 20px 30px;
  font-family: inherit;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  transition: background-color .2s ease, color .2s ease;
}
.leaders-filter-tab:hover {
  background: #d6d6d6;
}
.leaders-filter-tab[aria-selected="true"] {
  background: var(--moba_orange);
  color: #fff;
}

/* Icon area at the top of the card — no background, no filters, so each
   category's icon shows in its native design. */
.leaders-filter-tab__icon-wrap {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.leaders-filter-tab__icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.leaders-filter-tab__label {
  display: block;
}

/* List shown below the tab row — two columns. Left = list of places, right =
   white rounded card that grows to fit the marker popup. Columns size to
   their own content (start-aligned), so the card matches the popup's
   natural height. */
.leaders-filter-tabs__list {
  margin-top: 20px;
  padding: 32px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.leaders-filter-tabs__list-col {
  min-width: 0;
}
/* List of places styled as white pill rows, matching the page's accordion
   items (white rounded rectangles, no bullet). */
.leaders-filter-tabs__ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.leaders-filter-tabs__ul .leaders-filter-list-item {
  margin: 0;
}
.leaders-filter-tabs__ul .leaders-filter-list-item button {
  appearance: none;
  width: 100%;
  display: block;
  background: #fff;
  border: 0;
  border-radius: var(--radius-md);
  padding: 18px 26px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--moba_text_secondary);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 200;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.leaders-filter-tabs__ul .leaders-filter-list-item button:hover,
.leaders-filter-tabs__ul .leaders-filter-list-item button.is-active {
  background: var(--moba_orange);
  color: #fff;
}
.leaders-filter-tabs__empty {
  margin: 0;
  color: #555;
  font-style: italic;
}

/* Right column: marker popup gets rendered into this white card. The card
   keeps a fixed minimum height so the popup just fades in/out inside it
   instead of resizing the page on every click. */
.leaders-filter-tabs__list-col--popup {
  display: flex;
}
.leaders-filter-tabs__popup-target {
  position: relative;
  z-index: 1;             /* sits above any decorative lines from siblings */
  background: #fff;       /* card stays fully opaque — only its CONTENTS fade */
  border-radius: var(--radius-md);
  padding: 30px;
  width: 100%;
  /* Fixed height so the card never grows or shrinks between clicks. The
     description inside scrolls if a project's summary is long. */
  height: 650px;
}

/* Inner wrapper carries the opacity transition so the white card itself
   never blinks when switching categories or fiches. Full-height flex column
   so the placeholder text is vertically centered when nothing is selected,
   and so the loaded popup-wrapper (which uses `height: 100%`) has a
   defined parent height to resolve against. */
.leaders-filter-tabs__popup-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 1;
  transition: opacity .25s ease;
}
.leaders-filter-tabs__popup-inner.is-fading { opacity: 0; }
/* Popup inside the right-column card. The card is a fixed 650px so we drive
   the popup as a flex column that fills 100% height: image and title get
   their natural size at the top, the Projet/Gagnant row sticks to the
   bottom, and the summary fills whatever's left, scrolling internally. */
.leaders-filter-tabs__popup-target .popup-wrapper {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  max-width: none;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.leaders-filter-tabs__popup-target .first-half,
.leaders-filter-tabs__popup-target .first-popup-row {
  flex: 0 0 auto;
  height: auto;
  display: block;
}
.leaders-filter-tabs__popup-target .second-half {
  flex: 1 1 auto;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.leaders-filter-tabs__popup-target .second-half > .title {
  flex: 0 0 auto;
}
.leaders-filter-tabs__popup-target .second-half > .second-popup-row,
.leaders-filter-tabs__popup-target .second-half > .second-popup-row .summary,
.leaders-filter-tabs__popup-target .second-half > .second-popup-row .location-summary {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;     /* override the universal 250px cap inside the card */
  overflow-y: auto;
  overscroll-behavior: contain;
}
.leaders-filter-tabs__popup-target .third-popup-row {
  flex: 0 0 auto;       /* always pinned at the bottom of the card */
  margin-top: auto;
}
.leaders-filter-tabs__popup-target .location-image {
  height: auto;
}
.leaders-filter-tabs__popup-target .location-image img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  border-radius: 20px;
}
.leaders-filter-tabs__popup-placeholder {
  margin: 0;
  color: #555;
  font-style: italic;
  font-size: 18px;
  text-align: center;
}

/* Horizontal separator drawn under the map (matches the page's other
   1pt black separators). */
.map-separator.map-separator--with-bottom-line {
  position: relative;
  padding-bottom: 0;
}
.map-separator.map-separator--with-bottom-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #000;
  pointer-events: none;
}

@media (max-width: 1280px) {
  .leaders-filter-tabs { padding-left: 40px; padding-right: 40px; padding-top: 40px; }
  .leaders-section-intro { padding-left: 40px; padding-right: 40px; padding-top: 40px; }
  .leaders-section-intro__title,
  .leaders-filter-tabs__title { font-size: 36px; }
  .leaders-section-intro__subtitle,
  .leaders-filter-tabs__subtitle { font-size: 18px; }
  .leaders-filter-tab { font-size: 18px; padding: 28px 16px 24px; gap: 16px; }
  .leaders-filter-tab__icon-wrap { width: 90px; height: 90px; }
}
@media (max-width: 768px) {
  /* Stack the list and the popup vertically; drop the vertical divider. */
  .leaders-filter-tabs__list {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .leaders-filter-tabs__list::before { display: none; }
  .leaders-filter-tabs__list-col {
    padding: 0;
  }
  .leaders-filter-tabs__list-col--popup {
    border-top: 3px solid #000;
    padding-top: 20px;
  }
}
@media (max-width: 640px) {
  .leaders-filter-tabs { padding-left: 10px; padding-right: 10px; padding-top: 30px; }
  .leaders-section-intro { padding: 30px 10px 0; }
  .leaders-section-intro__title,
  .leaders-filter-tabs__title { font-size: 28px; }
  .leaders-section-intro__subtitle,
  .leaders-filter-tabs__subtitle { font-size: 16px; }
  .leaders-section-intro__header,
  .leaders-filter-tabs__header { margin-bottom: 20px; }
  .leaders-filter-tabs__row {
    grid-template-columns: 1fr 1fr; /* 2x2 on phones — 4 across is too cramped */
    gap: 10px;
  }
  .leaders-filter-tab { font-size: 14px; padding: 20px 10px 16px; gap: 10px; border-radius: 18px; }
  .leaders-filter-tab__icon-wrap { width: 72px; height: 72px; }
  .leaders-filter-tabs__list { padding: 16px 0 0; }
  .leaders-filter-tabs__ul .leaders-filter-list-item { font-size: 16px; }
}
#map {
  height: 100%;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
}
@media (max-width: 1280px) {
  #leaders-map-page .sec_banner_propos,
  #leaders-map-page .page_header_wrapper.green .header_content {
    padding-left: 40px;
    padding-right: 40px;
  }
  .map-separator { padding: 0 40px; }
  .map-separator.map-separator--with-bottom-line { padding-bottom: 100px; }
}
@media (max-width: 640px) {
  #leaders-map-page .sec_banner_propos,
  #leaders-map-page .page_header_wrapper.green .header_content {
    padding-left: 10px;
    padding-right: 10px;
  }
  .map-separator { padding: 0 10px; }
  .map-separator.map-separator--with-bottom-line { padding-bottom: 60px; }
  #map { border-radius: var(--radius-sm); }
}

/* Legacy direct-child rules removed — the menu pill markup now wraps the
   img in .menu-pill-icon and the label in .menu-pill-label, both styled
   above with the fixed-width icon slot + flex gap. */

.marker-icon,
.marker-text {
  vertical-align: middle;
  display: inline-block;
  margin-left: 2px;
}

.marker-text {
  font-size: 20px;
  font-weight: bold;
  margin-right: 8px;
}
.marker {
  height: 20px;
  border-radius: 4px;
  width: 20px;
  opacity: 1;
  cursor: pointer;
  background-repeat: round;
  border: none !important;
}

.marker-inner {
  background-size: cover;
  border-radius: 4px;
  cursor: pointer;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    background-color 0.18s ease-out;
  transform-origin: center center;
}

.marker:hover .marker-inner {
  transform: scale(1.5); 
}

.selectedMarker {
  background-size: cover;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  opacity: 0.8;
  cursor: pointer;
}

.mapboxgl-popup {
    max-width: none!important;
    width: fit-content!important;
}

.mapboxgl-popup-tip {
    display: none!important;
}

.mapboxgl-popup-close-button {
  float: right!important;
  right: 30px!important;
  font-size: 50px!important;
  cursor: pointer!important;
  margin-top: 15px!important;
  padding: 0!important;
  font-family: math;
}

.mapboxgl-popup-close-button:focus-visible {
    outline:0!important;
}


div.first-first-row > div{
    color: #000;
    font-size: 18px;
    font-style: normal;
    font-weight: 100;
    line-height: normal;
    margin-bottom:30px;
}

.mapboxgl-popup-tip {
  margin-left: 1%;
}

.popup-wrapper {
    height:100%;
}

/* Description / summary block in any popup (card or map modal) scrolls
   internally if the project's text is long, so the popup itself never
   overflows its container. */
.popup-wrapper .summary,
.popup-wrapper .location-summary {
    max-height: 250px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.first-popup-row {
    height: calc(100% - 60px);
}

.location-image {
    height:100%;
}

.location-image img {
    border-radius: var(--radius-md);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.first-half,.second-half {
    height:50%;
}

.popup-wrapper .title {
    font-size: 32px;
    line-height: 34px; /* 106.25% */
    display: flex;
}

.mapboxgl-popup-content
 {
    width: 796px;
    height: 681px;
    font: 16px / 14px "Roboto", sans-serif;
    border: none;
    border-radius: var(--radius-md)!important;
    background-color: #ffffff;
    color: #000000;
    text-align: left;
    padding: 30px !important;
}

.mapboxgl-popup-content img {
  width: 100%;
  height:100%;
  padding: 0;
  margin-top: 0;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.mapboxgl-popup-content div.type {
  margin-top: 3px;
}

div.title{
  font-weight: bold;
}

div.title > span > img{
    margin-left: 2px;
    width: 30px;
    margin-right: 10px;
}

p.summary{
  color: #000000;
  font-size: 16px;
}

#leaders-info-accordion ul{
  list-style-type: disc;
}

#leaders-info-accordion .accordion-section {
  margin-bottom: 30px;
}

@media (max-width: 900px) {
  .fixed-popup__panel { right: 2vw; width: 92vw; }
}

@media (max-width: 640px) {
  #leaders-info-accordion .accordion-css__item-top {
    height: auto;                 /* kill the fixed 30px */
    min-height: 60px;             /* optional, just to keep a nice pill */
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    align-items: center;          /* keep the + icon vertically centered */
  }

  #leaders-info-accordion .accordion-css__item-h3 {
    flex: 1;                      /* take full row width */
    white-space: normal;          /* allow wrapping */
    line-height: 1.25;
    font-size:20px;
  }

  #leaders-info-accordion .header_content {
    display: none;
  }
}

/* container under the map (mobile only) */
#leaders-map-detail {
  display: none;
}

@media (max-width: 767px) {
  #leaders-map-detail {
    display: block;
    padding: 24px 16px 40px;
  }

  .leaders-detail-card {
    position: relative;
    background: #ffffff;
    border-radius: var(--radius-md);
    max-width: 640px;
    margin: 0 auto;
    padding: 24px;
  }

  .leaders-detail-card__close {
    position: absolute;
    right: 20px;
    top: 16px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
  }

  .leaders-detail-card .popup-wrapper {
    height: auto;
  }

  .popup-wrapper .second-half {
    margin-top: 30px;
  }

  .gagnant-years {
    flex-wrap: nowrap;
    flex-direction: column;
    gap: 4px;          /* vertical gap between rows */
  }

  .gagnant-year {
    display: inline-flex;
    align-items: center;
    width: 100%;       /* optional, makes each row full width */
  }

  #leaders-map-page #menu .btn-text-p {
    font-size: 14px;
  }

  /* Remove the grey strip above the green banner on mobile: shift the
     header-offset spacer off .moba-page (whose background is light grey)
     and onto the .page_header_wrapper.green block, so the green colour
     fills the whole area down to the white header overlay. */
  #leaders-map-page.moba-page {
    padding-top: 0;
  }
  #leaders-map-page .page_header_wrapper.green {
    padding-top: calc(var(--header-offset) - 1px);
  }

  /* Mobile map-legend pills — icons sit close to the left edge, a small
     gap to the label, and every pill shares the same compact width so the
     stack reads as a clean column instead of fluctuating-width chips. */
  #menu a {
    width: 230px;                 /* uniform, just wide enough for the longest label */
    height: 44px;
    padding: 6px 14px 6px 10px;   /* tighter left pad — icon hugs the left */
    gap: 8px;                     /* less air between icon and label */
    font-size: 14px;
  }
  #menu .menu-pill-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
  }
  #menu .menu-pill-icon--emoji {
    font-size: 18px;
  }

  /* "Filtres" toggle pill — visible on mobile only; clicking it hides
     or reveals the legend pills below it.
     Closed state: black pill, white text.
     Open state  : white pill with black border, black text. */
  .menu-filters-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    width: 230px;
    height: 44px;
    padding: 6px 14px;
    margin-bottom: 10px;
    border: 2px solid #000;
    border-radius: 100px;
    background-color: #000;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color .2s ease, color .2s ease;
  }
  .menu-filters-toggle__chev {
    transition: transform .25s ease;
  }
  .menu-filters-toggle__chev path {
    stroke: currentColor;       /* chevron follows the label colour */
    transition: stroke .2s ease;
  }
  .menu-filters-toggle[aria-expanded="true"] {
    background-color: #fff;
    color: #000;
  }
  .menu-filters-toggle[aria-expanded="true"] .menu-filters-toggle__chev {
    transform: rotate(180deg);
  }
  /* Collapsed: hide every legend pill (anchor child of #menu) but keep
     the toggle button itself visible. */
  #menu.is-collapsed > a {
    display: none;
  }
}

/* Hide the toggle pill on desktop — pills there are always visible. */
@media (min-width: 768px) {
  .menu-filters-toggle {
    display: none !important;
  }
  /* And make sure desktop never inherits the .is-collapsed hide-pills rule. */
  #menu.is-collapsed > a {
    display: flex;
  }
}