/* Extracted from reseau.twig — ne pas éditer main.css pour cette page */
:root {
      --accent: #000000;
      /* Hauteur zone carte + annuaire (header site + filtres déduits du viewport) */
      --detail-frame-height: 420px;
      --sidebar-sticky-top: 5.5rem;
      --detail-frame-min-height: 460px;
      --detail-topbar-height: 84px;
      --map-section-max-height: calc(100dvh - var(--sidebar-sticky-top) - var(--reseau-section-gap));
      --reseau-header-translate-y: 0px;
      /* Espace header → ligne catégories (header dans le flux) */
      --reseau-header-filter-gap: 1.25rem;
      /* Espace filtres → carte = carte → footer */
      --reseau-section-gap: 15px;
    }
    /* Scroll réactivé sur la page */
    html:has(.network-container),
    body:has(.network-container),
    body.reseau-map-page {
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior-y: auto;
    }
    
    /* Page membres : typographie David sur tout le bloc (hors canvas Mapbox) */
    .network-container,
    .network-container .filter-bar,
    .network-container .list-sidebar,
    .network-container .list-sidebar *,
    .network-container .map-container,
    .network-container .reseau-map-toolbar,
    .network-container .lieu-detail-overlay,
    .network-container .lieu-detail-overlay * {
      font-family: "David", serif;
    }
    .network-container #map-global,
    .network-container #map-global * {
      font-family: inherit;
    }

    .network-container {
      /* Aligné sur .popup-meta / .popup-content-wrap (iframe fiche) */
      --reseau-fiche-inline-pad: 20px;
      /* Inset uniforme de la canva carte (marges haut = bas = gauche = droite) */
      --reseau-map-canvas-inset: var(--reseau-fiche-inline-pad);
      --reseau-map-toolbar-inset: 1rem;
      --reseau-detail-header-btn: 2.75rem;
      --reseau-detail-header-pad: 1rem;
      /* Même hauteur map / fiche : le bandeau « annuaire » ne bouge pas à l’ouverture */
      --reseau-detail-header-row-h: calc(
        var(--reseau-detail-header-btn) + var(--reseau-detail-header-pad) + 1px
      );
      display: flex;
      flex-direction: column;
      min-height: 0;
      max-height: none;
      overflow: visible;
      overscroll-behavior: auto;
      position: relative;
      z-index: 1;
      padding-top: 0;
      padding-bottom: var(--reseau-section-gap);
      box-sizing: border-box;
      background: var(--reseau-network-bg, var(--bg-body, #fff));
      /* Surface derrière la barre de filtres (découpe / actif / texte au survol) */
      --reseau-filter-surface: var(--reseau-filter-bg, var(--reseau-network-bg, var(--bg-body, #fff)));
      /* Fond sous Mapbox (token CMS si défini) */
      --reseau-map-canvas-bg: var(--reseau-overlay-map-bg, var(--fixed-gray, #EAEAEA));
      /* Gris « mat » carte (lettres mortes) : survol filtres — évite le blanc si le token carte est fixed-white */
      --reseau-map-letterbox: var(--fixed-gray, #EAEAEA);
    }
    .content-wrapper {
      display: grid;
      grid-template-columns: repeat(12, minmax(0, 1fr));
      flex: 0 0 auto;
      min-height: 0;
      overflow: hidden;
      height: var(--map-section-max-height);
      max-height: var(--map-section-max-height);
      align-items: stretch;
      background: var(--reseau-network-bg, var(--bg-body, #fff));
    }
    /* Fiche ouverte : hauteur de section fixe — annuaire et fiche scrollent indépendamment */
    .network-container.overlay-open:not(.is-fullscreen) {
      overflow: visible;
      background: var(--reseau-network-bg, var(--bg-body, #fff)) !important;
    }
    .network-container.overlay-open:not(.is-fullscreen) .content-wrapper {
      flex: 0 0 auto;
      height: var(--map-section-max-height);
      max-height: var(--map-section-max-height);
      min-height: 0;
      overflow: hidden;
      align-items: stretch;
      background: var(--reseau-network-bg, var(--bg-body, #fff)) !important;
    }
    .network-container.overlay-open:not(.is-fullscreen) .list-sidebar {
      height: 100%;
      max-height: 100%;
      min-height: 0;
      overflow: hidden;
    }
    .network-container.overlay-open:not(.is-fullscreen) .map-container {
      height: 100%;
      max-height: 100%;
      min-height: 0;
      overflow: hidden;
    }
    .network-container.overlay-open:not(.is-fullscreen) .map-container__stage {
      flex: 1 1 auto;
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior-y: contain;
      -webkit-overflow-scrolling: touch;
    }
    /* Lieu ouvert : fond de carte aligné au fond de page */
    .network-container.overlay-open .map-container {
      display: flex;
      flex-direction: column;
      background-color: var(--reseau-network-bg, var(--bg-body, #fff)) !important;
    }
    .network-container.overlay-open .map-container__stage {
      flex: 0 0 auto;
      min-height: 0;
      height: auto;
      position: relative;
      display: flex;
      flex-direction: column;
    }
    .network-container.overlay-open #map-global,
    .network-container.overlay-open .points-layer {
      display: none !important;
    }
    .network-container.overlay-open .lieu-detail-overlay {
      position: relative;
      inset: auto;
      flex: 0 0 auto;
      min-height: 0;
      height: auto;
    }
    .network-container.overlay-open .lieu-detail-panel {
      flex: 0 0 auto;
      height: auto;
    }
    .network-container.overlay-open #map-global,
    .network-container.overlay-open #map-global .mapboxgl-canvas-container,
    .network-container.overlay-open #map-global .mapboxgl-canvas {
      background: var(--reseau-map-canvas-bg) !important;
    }
    
    /* Barre de Filtres */
    /* Évite le saut de layout quand la barre de scroll du document apparaît / disparaît */
    :root:has(.network-container) {
      scrollbar-gutter: stable;
    }

    .filter-bar { 
      padding: 4px 20px var(--reseau-section-gap);
      margin-top: var(--reseau-header-filter-gap);
      margin-bottom: 0;
      display: flex; 
      flex-wrap: nowrap;       /* tout sur une seule ligne */
      gap: 12px; 
      overflow-x: auto;        /* scroll horizontal si nécessaire */
      overflow-y: hidden;
      scrollbar-gutter: auto;
      -webkit-overflow-scrolling: touch;
      position: relative;
      z-index: 6;
      align-items: center;
      min-height: 3.25rem;
      box-sizing: border-box;
      /* Ne jamais laisser le flex « manger » la barre quand la colonne gauche change (scrollbar, etc.) */
      flex: 0 0 auto;
      background: var(--reseau-filter-bg, var(--reseau-network-bg, transparent));
    }

    /*
     * Desktop : header dans le flux (remonte au scroll, pas de pin).
     * Mobile : même flux + shrink forcé (évite la boucle scroll du shrink au scroll).
     */
    @media (min-width: 1022px) {
      body:has(.network-container) > header,
      body.reseau-map-page > header {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        translate: none !important;
        width: 100% !important;
        max-width: none !important;
      }

      body:has(.network-container) > main.site-main,
      body.reseau-map-page > main.site-main {
        margin-top: 0 !important;
      }
    }

    @media (max-width: 1021px) {
      body:has(.network-container) > header,
      body.reseau-map-page > header {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        translate: none !important;
        width: 100% !important;
        max-width: none !important;
      }

      body:has(.network-container):not(.home) > header,
      body.reseau-map-page:not(.home) > header,
      body:has(.network-container):not(.home) > header.header-preload,
      body.reseau-map-page:not(.home) > header.header-preload,
      body:has(.network-container):not(.home) > header.header-shrunk,
      body.reseau-map-page:not(.home) > header.header-shrunk {
        --nav-item-height: calc(clamp(10rem, 12vw, 12.5rem) * 180 / 700) !important;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
      }

      body:has(.network-container) > main.site-main,
      body.reseau-map-page > main.site-main {
        margin-top: 0 !important;
      }
    }

    /* Nav secondaire sous le header : même flux. */
    body:has(.network-container) > nav.hidden.lg\:block {
      position: relative;
    }

    /* Même air sous la carte qu’entre filtres et carte (pas de pt-8 footer en plus) */
    body:has(.network-container) > footer,
    body.reseau-map-page > footer {
      padding-top: 0;
    }

    .filter-btn { 
      cursor: pointer; 
      text-transform: lowercase; 
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    /* Reset complet vs .button global (min-width 8rem, padding variables, --border-width au hover) */
    .filter-bar .filter-btn.button {
      flex: 1 1 auto;
      box-sizing: border-box;
      min-width: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      line-height: 1.25;
      padding: 0.55rem 0.65rem;
      min-height: 2.5rem;
      height: 2.5rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      /* Inactif : fond = token bouton, texte = fond de page (effet découpe) ; trait = inset (pas de layout shift) */
      border: none;
      outline: none;
      box-shadow: inset 0 0 0 1px transparent;
      background-color: var(--reseau-filter-btn-bg, #000);
      color: var(--reseau-filter-surface);
      --border-width: 0;
      transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    }

    .filter-bar .filter-btn.button.button--round {
      border-radius: 999px;
    }

    .filter-bar .filter-btn.button.button--square {
      border-radius: 0;
    }

    .filter-bar .filter-btn.button:hover:not(.active) {
      opacity: 1;
      background-color: #ffffff;
      color: var(--reseau-filter-surface);
      border: none;
      outline: none;
      box-shadow: inset 0 0 0 1px var(--reseau-filter-btn-bg, #000);
    }

   .filter-bar .filter-btn.button.active,
   .filter-bar .filter-btn.button.active:hover {
      opacity: 1;
      /* Actif : fond = page, trait = couleur bouton par défaut, texte = couleur bouton */
      background-color: var(--reseau-filter-surface);
      color: var(--reseau-filter-btn-bg, #000);
      border: none;
      outline: none;
      box-shadow: inset 0 0 0 1px var(--reseau-filter-btn-bg, #000);
    }

    .filter-bar .filter-btn.button:focus-visible {
      outline: 2px solid var(--reseau-filter-btn-bg, #000);
      outline-offset: 2px;
    }

    .filter-bar .filter-btn.button.active:focus-visible {
      outline-color: var(--reseau-filter-btn-bg, #000);
    }

    /* Conteneur des boutons desktop */
    .filter-buttons-desktop {
      display: flex;
      flex-wrap: nowrap;
      gap: 12px;
      align-items: center;
      width: 100%;
    }
    
    /* Menu déroulant mobile - caché par défaut (visible en @media max-width 768px) */
    .filter-select-mobile {
      display: none;
      width: 100%;
      position: relative;
      z-index: 12;
    }

    .filter-select-mobile .ressources-dropdown {
      width: 100%;
    }

    .filter-select-mobile .ressources-dropdown-label,
    .filter-select-mobile .ressources-dropdown-arrow,
    .filter-select-mobile .ressources-dropdown-list {
      background: var(--reseau-filter-btn-bg, #000) !important;
      background-color: var(--reseau-filter-btn-bg, #000) !important;
      border-color: var(--reseau-filter-btn-bg, #000) !important;
    }

    .filter-select-mobile .ressources-dropdown-label {
      color: var(--reseau-filter-btn-text, #fff) !important;
      -webkit-text-fill-color: var(--reseau-filter-btn-text, #fff) !important;
      opacity: 1 !important;
      border-radius: 999px 0 0 999px;
    }

    .filter-select-mobile .ressources-dropdown-arrow {
      color: var(--reseau-filter-btn-text, #fff) !important;
      border-radius: 0 999px 999px 0;
    }

    .filter-select-mobile .ressources-dropdown-arrow svg,
    .filter-select-mobile .ressources-dropdown-arrow svg path {
      fill: currentColor !important;
    }

    .filter-select-mobile .ressources-dropdown-list li button {
      color: var(--reseau-filter-btn-text, #fff) !important;
      -webkit-text-fill-color: var(--reseau-filter-btn-text, #fff) !important;
      opacity: 0.55 !important;
      background-color: transparent !important;
      transition: opacity 160ms ease, color 160ms ease, background-color 120ms ease;
    }

    .filter-select-mobile .ressources-dropdown[open] .ressources-dropdown-list li button {
      color: var(--reseau-filter-btn-text, #fff) !important;
      -webkit-text-fill-color: var(--reseau-filter-btn-text, #fff) !important;
      background-color: transparent !important;
    }

    .network-container [data-reseau-category-filter] .ressources-dropdown-list li button.is-selected {
      opacity: 1 !important;
    }

    .network-container [data-reseau-category-filter] .ressources-dropdown-list li button:hover,
    .network-container [data-reseau-category-filter] .ressources-dropdown-list li button:focus-visible,
    .network-container [data-reseau-category-filter] .ressources-dropdown[open] .ressources-dropdown-list li button:hover,
    .network-container [data-reseau-category-filter] .ressources-dropdown[open] .ressources-dropdown-list li button:focus-visible {
      opacity: 1 !important;
      color: var(--reseau-filter-btn-bg, #000) !important;
      background-color: #ffffff !important;
      -webkit-text-fill-color: var(--reseau-filter-btn-bg, #000) !important;
      border-color: #ffffff !important;
    }

    /* Flèche des options : mask + currentColor (visible au survol sur fond blanc). */
    .network-container [data-reseau-category-filter] .ressources-dropdown-list li button::after {
      background-image: none !important;
      background-color: currentColor !important;
      -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20width%3D%2229%22%20height%3D%2221%22%20viewBox%3D%220%200%2029%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M28%2013V14H29V13H28ZM0.292893%2012.2929C-0.0976311%2012.6834%20-0.0976311%2013.3166%200.292893%2013.7071L6.65685%2020.0711C7.04738%2020.4616%207.68054%2020.4616%208.07107%2020.0711C8.46159%2019.6805%208.46159%2019.0474%208.07107%2018.6569L2.41421%2013L8.07107%207.34315C8.46159%206.95262%208.46159%206.31946%208.07107%205.92893C7.68054%205.53841%207.04738%205.53841%206.65685%205.92893L0.292893%2012.2929ZM28%200H27V13H28H29V0H28ZM28%2013V12H1V13V14H28V13Z%22%20fill%3D%22black%22/%3E%3C/svg%3E") !important;
      mask-image: url("data:image/svg+xml,%3Csvg%20width%3D%2229%22%20height%3D%2221%22%20viewBox%3D%220%200%2029%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M28%2013V14H29V13H28ZM0.292893%2012.2929C-0.0976311%2012.6834%20-0.0976311%2013.3166%200.292893%2013.7071L6.65685%2020.0711C7.04738%2020.4616%207.68054%2020.4616%208.07107%2020.0711C8.46159%2019.6805%208.46159%2019.0474%208.07107%2018.6569L2.41421%2013L8.07107%207.34315C8.46159%206.95262%208.46159%206.31946%208.07107%205.92893C7.68054%205.53841%207.04738%205.53841%206.65685%205.92893L0.292893%2012.2929ZM28%200H27V13H28H29V0H28ZM28%2013V12H1V13V14H28V13Z%22%20fill%3D%22black%22/%3E%3C/svg%3E") !important;
      -webkit-mask-repeat: no-repeat !important;
      mask-repeat: no-repeat !important;
      -webkit-mask-position: center !important;
      mask-position: center !important;
      -webkit-mask-size: contain !important;
      mask-size: contain !important;
    }

    .network-container [data-reseau-category-filter] .ressources-dropdown-list li button:hover::after,
    .network-container [data-reseau-category-filter] .ressources-dropdown-list li button:focus-visible::after,
    .network-container [data-reseau-category-filter] .ressources-dropdown[open] .ressources-dropdown-list li button:hover::after,
    .network-container [data-reseau-category-filter] .ressources-dropdown[open] .ressources-dropdown-list li button:focus-visible::after {
      opacity: 1 !important;
      background-color: currentColor !important;
    }

    .filter-select-mobile .ressources-dropdown[open] .ressources-dropdown-list {
      position: static !important;
      width: 100% !important;
      margin-top: 0 !important;
      border-top-width: 0 !important;
    }

    /* Menu ouvert : bloc unique (pas d’espace entre catégorie active et liste). */
    .network-container [data-reseau-category-filter] .ressources-dropdown[open] {
      display: flex;
      flex-direction: column;
      gap: 0;
      background: var(--reseau-filter-btn-bg, #000) !important;
      overflow: hidden;
    }

    .network-container [data-reseau-category-filter] .ressources-dropdown[open] .ressources-dropdown-summary {
      margin: 0 !important;
      padding: 0 !important;
      border: 0 !important;
      background: var(--reseau-filter-btn-bg, #000) !important;
    }

    .network-container [data-reseau-category-filter] .ressources-dropdown[open] :is(
      .ressources-dropdown-label,
      .ressources-dropdown-arrow,
      .ressources-dropdown-list,
      .ressources-dropdown-list > li,
      .ressources-dropdown-list li button
    ) {
      border: 0 !important;
      border-color: transparent !important;
      outline: none !important;
      box-shadow: none !important;
    }

    .network-container [data-reseau-category-filter] .ressources-dropdown[open] .ressources-dropdown-list {
      margin-top: -1px !important;
    }

    .network-container [data-reseau-category-filter] .ressources-dropdown[open] .ressources-dropdown-list > li:not([hidden]) button {
      border-top: 0 !important;
    }

    .filter-select-mobile .ressources-dropdown[open] .ressources-dropdown-label,
    .filter-select-mobile .ressources-dropdown[open] .ressources-dropdown-arrow {
      border-radius: 0;
    }
    
    .category-select {
      width: 100%;
      padding: 0.75rem 1rem;
      font-size: 1rem;
      font-family: inherit;
      text-transform: lowercase;
      background-color: var(--reseau-filter-btn-bg, #000);
      color: var(--reseau-filter-btn-text, #fff);
      border: 1.5px solid var(--reseau-filter-btn-bg, #000);
      border-radius: 999px;
      cursor: pointer;
      appearance: none;
      -webkit-appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='white'%3E%3Cpath d='M6 8L2 4h8L6 8z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 1rem center;
      padding-right: 2.5rem;
    }
    
    .category-select:focus {
      outline: 2px solid var(--reseau-filter-btn-text, #fff);
      outline-offset: 2px;
    }

    /* Liste Latérale */
    /* Pas de padding-top : la ligne « annuaire » s’aligne avec .popup-topbar (flèche / carte) dans l’iframe */
    /* Même hauteur que .map-container (align-items: stretch) ; la liste défile dans #lieux-list */
    .list-sidebar {
      --reseau-sidebar-inline-pad: 20px;
      grid-column: span 3;
      overflow: hidden;
      border-right: none;
      padding: 0 var(--reseau-sidebar-inline-pad) 20px;
      min-width: clamp(18.5rem, 23vw, 21rem);
      min-height: 0;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      box-sizing: border-box;
      position: relative;
      top: 0;
      max-height: 100%;
      color: var(--reseau-sidebar-text, inherit);
    }
    .list-sidebar-header {
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin: 0;
      padding: 0;
      padding-bottom: var(--reseau-detail-header-pad);
      border-bottom: 1px solid currentColor;
      box-sizing: border-box;
      height: var(--reseau-detail-header-row-h);
      min-height: var(--reseau-detail-header-row-h);
      max-height: var(--reseau-detail-header-row-h);
      overflow: visible;
    }
    /* Fiche ouverte : retour + plein écran sur la même ligne que « annuaire » */
    .network-container.overlay-open .reseau-map-toolbar {
      justify-content: space-between;
      background: var(--reseau-sidebar-bg, var(--reseau-network-bg, var(--bg-body, #fff)));
      overflow: visible;
      max-height: none;
    }
    .annuaire-title {
      font-family: "David", serif;
      font-size: var(--text-3xl);
      line-height: 1.1;
      text-transform: lowercase;
      text-align: left;
      margin: 0;
    }
    #hovered-dept-label {
      margin: 0;
      font-size: 0.85rem;
      line-height: 1.1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    #lieux-list {
      display: block;
      border-top: none;
      margin: 0;
      padding: 0;
      overflow-y: scroll;
      overflow-x: hidden;
      overscroll-behavior-y: contain;
      /* Réserve la largeur de la scrollbar partout (évite le saut quand elle apparaît) */
      scrollbar-gutter: stable;
      scrollbar-width: thin; /* Firefox : prend de la place dans le flux */
      flex: 1 1 auto;
      min-height: 0;
      box-sizing: border-box;
    }
    /* WebKit : largeur fixe = la colonne ne change pas quand la scrollbar s’affiche */
    #lieux-list::-webkit-scrollbar {
      width: 12px;
    }
    #lieux-list::-webkit-scrollbar-track {
      background: transparent;
    }
    #lieux-list::-webkit-scrollbar-thumb {
      background: rgba(0, 0, 0, 0.2);
      border-radius: 6px;
      border: 3px solid transparent;
      background-clip: content-box;
    }
    
    .lieu-item {
      padding: 12px 0;
      /* Ligne de séparation noire de 1px entre chaque lieu */
      border-bottom: 1px solid currentColor;
      cursor: pointer; 
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
      opacity: 0.58;
      transition: opacity 0.15s ease;
    }
    .lieu-item:hover,
    .lieu-item:focus-within,
    .lieu-item.is-active {
      opacity: 1;
    }
    .lieu-item:last-child {
      border-bottom: none;
    }

    /* Lieu actif : fond pleine largeur sans marges négatives (évite le saut de la liste) */
    .lieu-item.is-active {
      position: relative;
      isolation: isolate;
      background-color: transparent;
      color: #fff;
      margin: 0;
      padding: 12px 0;
      border-bottom-color: transparent;
    }
    .lieu-item.is-active::before {
      content: "";
      position: absolute;
      z-index: -1;
      top: 0;
      bottom: 0;
      left: calc(-1 * var(--reseau-sidebar-inline-pad, 20px));
      right: calc(-1 * var(--reseau-sidebar-inline-pad, 20px));
      background-color: #000;
    }
    .lieu-item.is-active h3 {
      color: #fff;
      opacity: 1;
    }
    .lieu-item.is-active:hover h3 { opacity: 1; }
    .lieu-item.is-active .city {
      color: #fff;
    }
    .lieu-item.is-active .lieu-cat-badge {
      border-color: #fff;
      color: #fff;
    }

    .lieu-item:hover h3 { opacity: 1; }
    .lieu-main {
      display: grid;
      grid-template-columns: 1.6fr 1.4fr;
      align-items: baseline;
      gap: 0.8rem;
      min-width: 0;
      padding-inline: 0.45rem;
      box-sizing: border-box;
    }
    .lieu-item h3 {
      font-size: 1.05rem;
      margin: 0;
      color: var(--reseau-sidebar-text, var(--accent));
      text-transform: none;
      min-width: 0;
    }
    .lieu-item .city {
      font-size: 1.05rem;
      text-align: left;
      min-width: 0;
    }
    .lieu-cats {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      min-width: 0;
      padding-inline: 0.45rem;
      box-sizing: border-box;
    }
    .lieu-cat-badge {
      display: inline-flex;
      align-items: center;
      border: 1px solid currentColor;
      margin-top: 0.70rem;
      padding: 0.50rem 0.85rem;
      font-size: 0.72rem;
      line-height: 1;
      text-transform: lowercase;
      white-space: nowrap;
      color: currentColor;
    }
    .lieu-cat-badge--rounded { border-radius: 999px; }
    .lieu-cat-badge--square { border-radius: 0; }

    /* Carte : min hauteur par défaut ; en fiche la hauteur est fixée en JS selon le contenu */
    .map-container {
      grid-column: span 9;
      position: relative;
      display: flex;
      flex-direction: column;
      background: var(--reseau-network-bg, var(--bg-body, #fff));
      min-width: 0;
      min-height: var(--detail-frame-min-height);
      height: 100%;
      align-self: stretch;
      border-radius: 1rem;
      overflow: hidden;
    }
    .map-container__stage {
      position: relative;
      flex: 1 1 auto;
      min-height: 0;
      width: 100%;
    }
    #map-global {
      position: absolute;
      top: var(--reseau-map-canvas-inset);
      bottom: var(--reseau-map-canvas-inset);
      left: var(--reseau-map-canvas-inset);
      right: var(--reseau-map-canvas-inset);
      width: auto;
      height: auto;
      background: var(--reseau-network-bg, var(--bg-body, #fff));
    }
    /* Bandeau carte : plein écran au-dessus de la canva, aligné sur « annuaire » (esprit charte graphique) */
    .reseau-map-toolbar {
      position: relative;
      top: auto;
      right: auto;
      left: auto;
      z-index: 35;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.5rem;
      width: 100%;
      height: var(--reseau-detail-header-row-h);
      min-height: var(--reseau-detail-header-row-h);
      max-height: var(--reseau-detail-header-row-h);
      padding: 0 var(--reseau-fiche-inline-pad) var(--reseau-detail-header-pad);
      box-sizing: border-box;
      border: none;
      background: transparent;
      color: var(--reseau-sidebar-text, inherit);
      overflow: visible;
    }
    .reseau-map-toolbar::after {
      content: "";
      position: absolute;
      left: var(--reseau-fiche-inline-pad);
      right: var(--reseau-fiche-inline-pad);
      bottom: 0;
      height: 1px;
      background-color: currentColor;
      pointer-events: none;
    }
    .reseau-map-toolbar .map-fullscreen-btn {
      width: var(--reseau-detail-header-btn, 2.75rem);
      height: var(--reseau-detail-header-btn, 2.75rem);
      min-width: var(--reseau-detail-header-btn, 2.75rem);
      min-height: var(--reseau-detail-header-btn, 2.75rem);
      flex: 0 0 var(--reseau-detail-header-btn, 2.75rem);
      box-sizing: border-box;
      border: 1px solid #000;
      border-radius: 50%;
    }
    .reseau-overlay-back-btn {
      width: var(--reseau-detail-header-btn, 2.75rem);
      height: var(--reseau-detail-header-btn, 2.75rem);
      min-width: var(--reseau-detail-header-btn, 2.75rem);
      min-height: var(--reseau-detail-header-btn, 2.75rem);
      flex: 0 0 var(--reseau-detail-header-btn, 2.75rem);
      box-sizing: border-box;
      border: 1px solid #000;
      /* 999px (pas 50 %) : au hover la pastille s’étire en capsule, pas en ovale */
      border-radius: 999px;
      background: #000;
      color: var(--reseau-network-bg, var(--bg-body, #fff));
      cursor: pointer;
      display: none;
      align-items: center;
      justify-content: center;
      gap: 0;
      padding: 0;
      overflow: hidden;
      white-space: nowrap;
      flex-shrink: 0;
      transition: none;
    }
    .network-container.overlay-open .reseau-overlay-back-btn {
      display: inline-flex;
      overflow: visible;
    }
    .reseau-overlay-back-btn-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      line-height: 0;
      overflow: visible;
    }
    .reseau-overlay-back-btn svg {
      display: block;
      flex-shrink: 0;
      overflow: visible;
    }
    .reseau-overlay-back-btn svg,
    .reseau-overlay-back-btn svg path {
      fill: currentColor;
    }
    .reseau-overlay-back-btn:hover {
      width: auto;
      min-width: 110px;
      flex-basis: auto;
      height: var(--reseau-detail-header-btn, 2.75rem);
      min-height: var(--reseau-detail-header-btn, 2.75rem);
      border-radius: 999px;
      gap: 8px;
      padding: 0 14px;
      justify-content: flex-start;
      background: var(--reseau-network-bg, var(--bg-body, #fff));
      color: #000;
      transition:
        width 0.22s ease,
        gap 0.22s ease,
        padding 0.22s ease,
        justify-content 0.22s ease,
        background-color 0.15s ease,
        color 0.15s ease;
    }
    .reseau-overlay-back-btn-label {
      max-width: 0;
      overflow: hidden;
      opacity: 0;
      transform: translateX(-4px);
      text-transform: lowercase;
      font-family: "David", serif;
      font-size: 1.15rem;
      line-height: 1.1;
      pointer-events: none;
      flex-shrink: 0;
    }
    .reseau-overlay-back-btn:hover .reseau-overlay-back-btn-label {
      max-width: 5rem;
      overflow: visible;
      opacity: 1;
      transform: translateX(0);
      transition: max-width 0.22s ease, opacity 0.18s ease, transform 0.18s ease;
    }
    #map-global .mapboxgl-canvas-container,
    #map-global .mapboxgl-canvas {
      background: var(--reseau-map-canvas-bg) !important;
    }
    #map-global .mapboxgl-ctrl-logo { display: none !important; }

    /* Bouton plein écran (dans .reseau-map-toolbar) */
    .map-fullscreen-btn {
      position: relative;
      top: auto;
      right: auto;
      z-index: 50;
      background: #000;
      color: var(--reseau-network-bg, var(--page-bg, var(--bg-body, #fff)));
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s, color 0.15s;
      box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }
    .map-fullscreen-btn:hover {
      background: var(--reseau-network-bg, var(--page-bg, var(--bg-body, #fff)));
      color: #000;
    }
    .map-fullscreen-btn svg {
      width: 1.2rem;
      height: 1.2rem;
    }

    /* Mode plein écran complet : fenêtre aux coins arrondis superposée au site */
    .network-container.is-fullscreen {
      position: fixed !important;
      inset: 1.5rem !important;
      z-index: 2147483647 !important;
      padding-top: 0 !important;
      margin-top: 0 !important;
      background: var(--reseau-network-bg, var(--bg-body, #fff)) !important;
      border-radius: 1.5rem;
      overflow: hidden;
      box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
      display: flex;
      flex-direction: column;
      max-height: calc(100vh - 3rem);
      min-height: 0;
    }
    .network-container.is-fullscreen .filter-bar {
      margin-top: 0;
      padding: 0.75rem 1rem;
      flex: 0 0 auto;
      background: var(--reseau-filter-bg, var(--reseau-network-bg, transparent));
    }
    .network-container.is-fullscreen .content-wrapper {
      flex: 1 1 auto;
      height: auto !important;
      max-height: none !important;
      min-height: 0;
      overflow: hidden;
    }
    .network-container.is-fullscreen .map-container {
      border-radius: 0 0 1.5rem 0;
      height: 100%;
      min-height: 0;
      /* hidden : overflow:auto captait les gestes pinch et empêchait zoom/dézoom Mapbox */
      overflow: hidden;
    }
    /* Laisser la carte recevoir pinch + pan (évite scroll du conteneur à la place du zoom) */
    .network-container.is-fullscreen #map-global,
    .network-container.is-fullscreen #map-global .mapboxgl-canvas-container {
      touch-action: none;
    }
    .network-container.is-fullscreen .list-sidebar {
      height: 100%;
      max-height: 100%;
      min-height: 0;
      border-radius: 0 0 0 1.5rem;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      background: var(--reseau-network-bg, var(--bg-body, #fff)) !important;
      color: var(--reseau-sidebar-text, inherit);
    }
    .network-container.is-fullscreen #lieux-list {
      flex: 1 1 auto;
      min-height: 0;
      max-height: none;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior-y: contain;
      -webkit-overflow-scrolling: touch;
    }
    .network-container.is-fullscreen .reseau-map-toolbar {
      flex-shrink: 0;
    }
    .network-container.is-fullscreen .map-fullscreen-btn {
      z-index: 100;
    }
    /* Fiche ouverte en plein écran : annuaire et fiche scrollent chacun dans leur colonne */
    .network-container.is-fullscreen.overlay-open {
      overflow: hidden;
      background: var(--reseau-network-bg, var(--bg-body, #fff)) !important;
    }
    .network-container.is-fullscreen.overlay-open .content-wrapper {
      flex: 1 1 auto;
      min-height: 0;
      max-height: 100%;
      overflow: hidden;
      height: auto !important;
      background: var(--reseau-network-bg, var(--bg-body, #fff)) !important;
    }
    .network-container.is-fullscreen.overlay-open .list-sidebar {
      height: 100%;
      max-height: 100%;
      min-height: 0;
      overflow: hidden;
    }
    .network-container.is-fullscreen.overlay-open .map-container {
      background: var(--reseau-network-bg, var(--bg-body, #fff)) !important;
      height: 100%;
      max-height: 100%;
      min-height: 0;
      overflow: hidden;
    }
    .network-container.is-fullscreen.overlay-open .map-container__stage {
      flex: 1 1 auto;
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior-y: contain;
      -webkit-overflow-scrolling: touch;
    }
    .network-container.is-fullscreen.overlay-open #map-global,
    .network-container.is-fullscreen.overlay-open #map-global .mapboxgl-canvas-container,
    .network-container.is-fullscreen.overlay-open #map-global .mapboxgl-canvas {
      background: var(--reseau-map-canvas-bg) !important;
    }
    /* Fond semi-transparent derrière la fenêtre fullscreen */
    body:has(.network-container.is-fullscreen)::before {
      content: '';
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.4);
      backdrop-filter: blur(3px);
      z-index: 2147483646;
    }
    /* Header et footer restent visibles derrière la fenêtre */
    body:has(.network-container.is-fullscreen) header,
    body:has(.network-container.is-fullscreen) footer {
      opacity: 0.3;
      pointer-events: none;
    }
    /* En fullscreen, l'overlay lieu ne doit pas cacher le bouton fermer */
    .network-container.is-fullscreen .lieu-detail-overlay {
      z-index: 40;
    }
    .points-layer {
      position: absolute;
      top: var(--reseau-map-canvas-inset);
      bottom: var(--reseau-map-canvas-inset);
      left: var(--reseau-map-canvas-inset);
      right: var(--reseau-map-canvas-inset);
      width: auto;
      z-index: 0;
      pointer-events: none;
    }
    
    /* Conteneur du point - sert uniquement au positionnement */
    .point-node {
      position: absolute;
      top: 0;
      left: 0;
      width: 0 !important;
      height: 0 !important;
      pointer-events: none;
      background: black !important;
      border: none !important;
      padding: 0 !important;
      margin: 0 !important;
      overflow: visible !important;
    }
    
    /* Le cercle réel est créé via ::after - totalement isolé */
    .point-node::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: var(--reseau-point-size, 9px);
      height: var(--reseau-point-size, 9px);
      min-width: var(--reseau-point-size, 9px);
      min-height: var(--reseau-point-size, 9px);
      max-width: var(--reseau-point-size, 9px);
      max-height: var(--reseau-point-size, 9px);
      border-radius: 50%;
      background-color: #000;
      box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
      pointer-events: auto;
      cursor: pointer;
      transition: transform 0.12s ease, box-shadow 0.12s ease, border-radius 0.12s ease;
    }
    
    .point-node.is-hidden,
    .point-node.is-orphan {
      opacity: 0;
      pointer-events: none;
    }
    .point-node.is-hidden::after,
    .point-node.is-orphan::after {
      pointer-events: none;
    }
    
    .point-node.marker-list-hover {
      opacity: 1;
    }
    .point-node.marker-list-hover::after {
      pointer-events: auto;
    }
    
    /* Hover / surbrillance liste / lieu dans un département sélectionné : rond → carré (échelle modérée) */
    .point-node:hover::after,
    .point-node.marker-highlighted::after,
    .point-node.point-node--dept-selected::after {
      transform: translate(-50%, -50%) scale(1.06);
      box-shadow: 0 0 3px rgba(0, 0, 0, 0.28);
      border-radius: 0;
    }

    .dept-code-label {
      font-size: var(--reseau-dept-label-size, 0.65rem);
      line-height: 1;
      color: #555;
      text-transform: none;
      pointer-events: none;
      user-select: none;
      background: transparent;
      padding: 0;
      border-radius: 0;
      opacity: 0.7;
    }

    /* Style des popups de lieux (sur les marqueurs) */
    .mapboxgl-popup.lieu-popup .mapboxgl-popup-content {
      background: transparent;
      color: #000;
      border-radius: 0;
      box-shadow: none;
      padding: 0;
      font-size: 1.05rem;
      min-width: 220px;
      max-width: 450px;
    }
    .mapboxgl-popup.lieu-popup {
      z-index: 1!important;
    }

    .mapboxgl-popup.lieu-popup .mapboxgl-popup-tip {
      display: none;
    }

    .lieu-popup-card {
      display: inline-flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
    }
    .lieu-popup-info {
      background: var(--reseau-network-bg, var(--bg-body, #fff));
      color: #000;
      border: 1px solid var(--reseau-network-bg, var(--bg-body, #fff));
      border-radius: 0;
      padding: 0.75rem 0.9rem;
      min-width: 190px;
    }
    /* Même taille que .lieu-item h3 / .city dans la colonne de gauche */
    .lieu-popup-title {
      font-size: 1.05rem;
      line-height: 1.2;
      margin: 0 0 0.2rem;
      font-weight: inherit;
      text-transform: none;
      overflow: visible;
    }
    .lieu-popup-city {
      font-size: 1.05rem;
      opacity: 0.9;
      text-transform: none;
    }
    .lieu-popup-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--reseau-detail-button-bg, #000);
      color: var(--reseau-detail-button-text, #fff) !important;
      border: 1px solid var(--reseau-detail-button-bg, #000);
      border-radius: 999px;
      padding: 0.75rem 1rem;
      text-decoration: none !important;
      text-transform: lowercase;
      white-space: nowrap;
      width: fit-content;
    }
    .lieu-popup-link:hover {
      background: #fff;
      color: var(--reseau-detail-button-bg, #000) !important;
    }

    /* Fiche lieu en overlay au-dessus de la carte */
    .lieu-detail-overlay {
      position: absolute;
      inset: 0;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      z-index: 30;
      overflow: visible;
      background: var(--reseau-sidebar-bg, var(--reseau-network-bg, #fff)) !important;
    }

    .lieu-detail-backdrop {
      position: absolute;
      inset: 0;
      background: transparent;
      backdrop-filter: none;
    }

    .lieu-detail-panel {
      position: relative;
      flex: 0 0 auto;
      min-height: 0;
      width: 100%;
      background: var(--reseau-sidebar-bg, var(--reseau-network-bg, #fff));
      border-radius: 0;
      box-shadow: none;
      overflow: visible;
      display: flex;
      flex-direction: column;
      z-index: 31;
    }

    .lieu-detail-frame {
      /* Couleur pilotée par JS à l’ouverture (évite le blanc natif de l’iframe) */
      background: var(--reseau-sidebar-bg, var(--reseau-network-bg, #f5f5f5));
      border: none;
      flex: 0 0 auto;
      width: 100%;
      display: block;
      height: auto;
      min-height: 0;
      overflow: hidden;
    }
    .network-container.overlay-open .lieu-detail-frame {
      flex: 0 0 auto;
    }

    /* Pagination fiche (mobile uniquement) */
    .lieu-fiche-pagination {
      display: none;
      flex-shrink: 0;
    }

    @media (max-width: 1024px) {
      .content-wrapper {
        grid-template-columns: 3fr 5fr;
      }
      .list-sidebar {
        grid-column: span 1;
      }
      .map-container {
        grid-column: span 1;
      }
      :root:has(.network-container) {
        --reseau-header-filter-gap: 1rem;
      }

      .filter-bar {
        margin-top: var(--reseau-header-filter-gap);
        padding: 4px 15px var(--reseau-section-gap);
        gap: 8px;
      }
      .filter-bar .filter-btn.button {
        padding: 0.45rem 0.55rem;
        font-size: 0.9rem;
        min-height: 2.25rem;
        height: 2.25rem;
      }
      .network-container.is-fullscreen {
        inset: 1rem !important;
        border-radius: 1rem;
        max-height: calc(100vh - 2rem);
      }
      .network-container.is-fullscreen .map-container {
        border-radius: 0 0 1rem 0;
      }
      .network-container.is-fullscreen .list-sidebar {
        border-radius: 0 0 0 1rem;
      }
    }
    @media (max-width: 768px) { 
      .network-container {
        padding-top: 0;
        min-height: auto;
        max-height: none;
        overflow-x: hidden;
        overflow-y: visible;
        max-width: 100%;
        box-sizing: border-box;
        padding-bottom: 0;
        --detail-frame-min-height: 0;
        /* Canva carte : pas de bande grise haut/bas */
        --reseau-map-canvas-inset: 0;
      }

      /* Moins de chrome header : fil d'Ariane masqué, carte plus haute */
      body.reseau-map-page header .breadcrumb {
        display: none !important;
      }

      .network-container #map-global,
      .network-container .points-layer {
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
      }
      
      /* Filtres : menu déroulant (comme annonces), pas la rangée de boutons */
      .filter-buttons-desktop {
        display: none;
      }
      .filter-select-mobile {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
      }

      /* Bandeau catégorie : largeur fixe au viewport, texte tronqué si besoin */
      .network-container [data-reseau-category-filter] .ressources-dropdown {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
      }

      .network-container [data-reseau-category-filter] .ressources-dropdown-summary {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 40px !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        gap: 0 !important;
      }

      .network-container [data-reseau-category-filter] .ressources-dropdown-label {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
        border-radius: 999px 0 0 999px !important;
      }

      .network-container [data-reseau-category-filter] .ressources-dropdown-arrow {
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        height: auto !important;
        min-height: 40px !important;
        max-height: none !important;
        aspect-ratio: unset !important;
        align-self: stretch !important;
        flex: none !important;
        border-radius: 0 999px 999px 0 !important;
        box-sizing: border-box !important;
      }

      .network-container [data-reseau-category-filter] .ressources-dropdown[open] .ressources-dropdown-label,
      .network-container [data-reseau-category-filter] .ressources-dropdown[open] .ressources-dropdown-arrow {
        border-radius: 0 !important;
      }

      .filter-bar {
        flex-wrap: wrap;
        overflow-x: visible;
      }
      
      :root:has(.network-container) {
        /* Espace catégories → carte */
        --reseau-section-gap: 4px;
        --reseau-header-filter-gap: 0;
        /* Fallback avant mesure JS */
        --reseau-mobile-chrome-top: 7rem;
        --reseau-mobile-map-height: calc(100dvh - var(--reseau-mobile-chrome-top));
        --reseau-mobile-annuaire-height: 100dvh;
        --map-section-max-height: calc(100dvh - var(--sidebar-sticky-top) - var(--reseau-section-gap));
      }

      .network-container {
        gap: var(--reseau-section-gap);
      }

      .filter-bar {
        margin-top: var(--reseau-header-filter-gap);
        margin-bottom: 0;
        padding: 0 12px;
        min-height: 0;
        overflow: visible;
        flex: 0 0 auto;
      }

      .network-container [data-reseau-category-filter] .ressources-dropdown-summary,
      .network-container [data-reseau-category-filter] .ressources-dropdown-label,
      .network-container [data-reseau-category-filter] .ressources-dropdown-arrow {
        min-height: 40px !important;
      }

      .network-container [data-reseau-category-filter] .ressources-dropdown-label {
        padding-top: 0.3rem !important;
        padding-bottom: 0.3rem !important;
      }

      .content-wrapper { 
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        height: auto !important;
        max-height: none !important;
        min-height: auto;
        overflow: visible;
        gap: 0;
        box-sizing: border-box;
      }
      .map-container { 
        grid-column: 1 / -1;
        width: 100%;
        height: var(--reseau-mobile-map-height) !important;
        min-height: var(--reseau-mobile-map-height) !important;
        max-height: var(--reseau-mobile-map-height) !important;
        order: 1;
        border-radius: 0;
        flex: 0 0 auto;
        aspect-ratio: auto;
        overflow: hidden;
      }
      .map-container .map-container__stage {
        flex: 1 1 0;
        min-height: 0;
        height: 100%;
      }

      /* Scroll page au doigt sur la carte ; pinch / pan carte à 2 doigts (Mapbox cooperativeGestures) */
      .network-container:not(.is-fullscreen) #map-global,
      .network-container:not(.is-fullscreen) #map-global .mapboxgl-canvas-container {
        touch-action: pan-y pinch-zoom;
      }
      .list-sidebar {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        order: 2;
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        min-height: var(--reseau-mobile-annuaire-height);
        height: var(--reseau-mobile-annuaire-height);
        max-height: var(--reseau-mobile-annuaire-height);
        overflow: hidden;
        box-sizing: border-box;
        padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
      }
      .list-sidebar-header {
        flex-shrink: 0;
      }
      .list-sidebar #lieux-list {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
      }
      .map-container #map-global,
      .map-container .map-container__stage {
        min-height: 100%;
        height: 100%;
      }
      /* Mobile : pas de bandeau carte tant que la fiche n’est pas ouverte */
      .network-container:not(.overlay-open) .reseau-map-toolbar {
        display: none;
      }
      /* Plein écran : désactivé sur mobile */
      .map-fullscreen-btn {
        display: none !important;
      }

      .mapboxgl-popup.lieu-popup {
        z-index: 60 !important;
        max-width: calc(100% - 24px) !important;
      }

      .mapboxgl-popup.lieu-popup .mapboxgl-popup-content {
        min-width: min(280px, calc(100vw - 2.5rem));
        max-width: min(320px, calc(100vw - 2.5rem));
      }

      .lieu-popup-info {
        padding: 0.95rem 1.05rem;
        min-width: min(260px, calc(100vw - 3rem));
      }

      .lieu-popup-link {
        padding: 0.85rem 1.2rem;
        min-height: 44px;
        min-width: 44px;
        box-sizing: border-box;
      }

      .filter-select-mobile .ressources-dropdown-summary,
      .filter-select-mobile .ressources-dropdown-label,
      .filter-select-mobile .ressources-dropdown-arrow {
        min-height: 40px;
      }

      .filter-select-mobile .ressources-dropdown-list li button {
        min-height: 0;
        padding-top: 0.2rem;
        padding-bottom: 0.2rem;
      }

      .lieu-item {
        min-height: 44px;
      }

      /* Fiche ouverte : éviter que overflow / border-radius rognent le bouton retour */
      .network-container.overlay-open .map-container {
        display: flex;
        flex-direction: column;
        overflow: hidden !important;
        border-radius: 0;
      }
      .network-container.overlay-open .reseau-map-toolbar {
        flex-shrink: 0;
        overflow: visible;
        align-items: center;
        z-index: 40;
        height: auto;
        max-height: none;
        min-height: calc(3.25rem + var(--reseau-detail-header-pad) + 1px);
        padding-top: 0.65rem;
        padding-bottom: var(--reseau-detail-header-pad);
        box-sizing: border-box;
      }
      .network-container.overlay-open .map-container__stage {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden !important;
      }
      .network-container.overlay-open .reseau-overlay-back-btn {
        overflow: visible;
        width: 3.25rem;
        height: 3.25rem;
        min-width: 3.25rem;
        min-height: 3.25rem;
        flex: 0 0 3.25rem;
        padding: 0.7rem 0.85rem;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
      }
      .network-container.overlay-open .reseau-overlay-back-btn svg {
        display: block;
        width: 25px;
        height: 9px;
        flex-shrink: 0;
        overflow: visible;
      }
      .network-container.overlay-open .reseau-overlay-back-btn:hover {
        width: auto;
        min-width: 7.25rem;
        flex-basis: auto;
        height: 3.25rem;
        min-height: 3.25rem;
        padding: 0.7rem 1rem 0.7rem 0.85rem;
        overflow: visible;
      }

      .network-container.overlay-open .reseau-overlay-back-btn:hover .reseau-overlay-back-btn-label {
        max-width: none;
        overflow: visible;
      }

      /* Pagination bas de fiche : capsules (coins ronds / carrés), David */
      .network-container.overlay-open .lieu-fiche-pagination:not([hidden]) {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 0.85rem var(--reseau-fiche-inline-pad) max(1rem, env(safe-area-inset-bottom, 0px));
        border-top: 1px solid currentColor;
        background: var(--reseau-sidebar-bg, var(--reseau-network-bg, var(--bg-body, #fff)));
        color: inherit;
        box-sizing: border-box;
      }
      .lieu-fiche-nav-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        min-height: 44px;
        min-width: 0;
        padding: 0.45rem 0.75rem;
        border: 1px solid currentColor;
        background: #000;
        color: var(--reseau-network-bg, var(--bg-body, #fff));
        font-family: "David", serif;
        text-transform: lowercase;
        cursor: pointer;
        box-sizing: border-box;
        max-width: 100%;
        overflow: hidden;
        transition: background-color 0.15s ease, color 0.15s ease, border-radius 0.15s ease;
      }
      .lieu-fiche-nav-btn--rounded {
        border-radius: 999px;
      }
      .lieu-fiche-nav-btn--square {
        border-radius: 0;
      }
      .lieu-fiche-nav-btn--rounded:hover:not(:disabled),
      .lieu-fiche-nav-btn--rounded:focus-visible:not(:disabled) {
        border-radius: 0;
      }
      .lieu-fiche-nav-btn--square:hover:not(:disabled),
      .lieu-fiche-nav-btn--square:focus-visible:not(:disabled) {
        border-radius: 999px;
      }
      .lieu-fiche-nav-btn:hover:not(:disabled),
      .lieu-fiche-nav-btn:focus-visible:not(:disabled) {
        background: var(--reseau-network-bg, var(--bg-body, #fff));
        color: #000;
      }
      .lieu-fiche-nav-btn:disabled {
        opacity: 0.45;
        cursor: default;
      }
      .lieu-fiche-nav-btn svg {
        flex-shrink: 0;
        width: 1.35rem;
        height: auto;
      }
      .lieu-fiche-nav-btn svg,
      .lieu-fiche-nav-btn svg path {
        fill: currentColor;
      }
      #lieu-fiche-next svg {
        transform: scaleX(-1);
      }
      .lieu-fiche-nav-action {
        flex-shrink: 0;
        white-space: nowrap;
      }

      /* Fiche lieu ouverte : masquer filtres + annuaire, carte pleine hauteur */
      .network-container.overlay-open {
        --reseau-mobile-map-offset: 5.25rem;
      }

      .network-container.overlay-open .filter-bar,
      .network-container.overlay-open .list-sidebar {
        display: none !important;
      }

      .network-container.overlay-open .content-wrapper {
        gap: 0;
        min-height: 0;
        height: auto;
      }

      /* Hauteur viewport fixe (JS) : scroll dans le panneau, pagination en bas */
      .network-container.overlay-open .map-container {
        height: auto;
        min-height: 0;
        max-height: none;
        flex: 0 0 auto;
      }

      .network-container.overlay-open #lieu-fiche-anchor,
      .network-container.overlay-open .lieu-detail-overlay {
        position: relative;
        inset: auto;
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        z-index: 31;
      }

      .network-container.overlay-open .lieu-detail-panel {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
      }

      .network-container.overlay-open .lieu-detail-frame {
        flex: 1 1 auto;
        min-height: 0;
        height: 100% !important;
        width: 100%;
        border: none;
        display: block;
      }

      .network-container.overlay-open .lieu-fiche-pagination:not([hidden]) {
        flex-shrink: 0;
        position: relative;
        z-index: 32;
      }

      .lieu-main {
        grid-template-columns: 1fr;
        gap: 0.4rem;
      }

      .network-container.is-fullscreen {
        inset: 0.5rem !important;
        border-radius: 0.75rem;
        max-height: calc(100vh - 1rem);
        overflow: hidden;
      }
      .network-container.is-fullscreen .content-wrapper {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        flex: 1 1 auto;
        height: auto !important;
        min-height: auto;
        max-height: none;
      }
      .network-container.is-fullscreen .list-sidebar {
        min-height: 0;
        height: auto;
        max-height: none;
        order: 2;
        border-radius: 0 0 0.75rem 0.75rem;
        flex: 1 1 0;
        overflow: hidden;
      }
      .network-container.is-fullscreen #lieux-list {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
      }
      .network-container.is-fullscreen .map-container {
        order: 1;
        border-radius: 0;
        flex: 0 0 auto;
        height: var(--reseau-mobile-map-height);
        min-height: var(--reseau-mobile-map-height);
        max-height: var(--reseau-mobile-map-height);
        overflow: hidden;
        touch-action: none;
      }
    }

    /* Typo mobile : text-2xl unifié ; h2, badges cat. et blocs text-4xl inchangés */
    @media (max-width: 767px) {
      .network-container {
        --tablo-text-fs: var(--text-2xl);
        --tablo-text-lh: var(--text-2xl--line-height);
        --reseau-annuaire-entry-fs: var(--text-xl);
        --reseau-annuaire-entry-lh: 1.2;
      }

      .network-container :is(
        p,
        .copy p,
        .prose p,
        .lieu-popup-title,
        .lieu-popup-city,
        .lieu-popup-link,
        .mapboxgl-popup.lieu-popup .mapboxgl-popup-content,
        .category-select,
        .lieu-fiche-nav-btn,
        .lieu-fiche-nav-action,
        .reseau-overlay-back-btn-label,
        #hovered-dept-label,
        .filter-bar .filter-btn.button,
        [data-reseau-category-filter] .ressources-dropdown-label,
        [data-reseau-category-filter] .ressources-dropdown-list li button,
        .filter-select-mobile .ressources-dropdown-label,
        .filter-select-mobile .ressources-dropdown-list li button
      ) {
        font-size: var(--tablo-text-fs) !important;
        line-height: var(--tablo-text-lh) !important;
      }

      /* Entrées annuaire : plus compactes que le corps text-2xl */
      .network-container #lieux-list .lieu-item .lieu-main > h3,
      .network-container #lieux-list .lieu-item .lieu-main > .city {
        font-size: var(--reseau-annuaire-entry-fs) !important;
        line-height: var(--reseau-annuaire-entry-lh) !important;
      }

      /* Blocs Texte tablo : respecte --tablo-text-fs du bloc (ex. text-4xl) */
      .network-container .copy.tablo-text-block.tablo-text-sized :is(p, li) {
        font-size: var(--tablo-text-fs) !important;
        line-height: var(--tablo-text-lh) !important;
      }

      /* Badges catégories annuaire : layout seulement (taille inchangée) */
      .network-container #lieux-list .lieu-item .lieu-cats {
        gap: 0.5rem;
        padding-inline: 0;
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
      }

      .network-container #lieux-list .lieu-item .lieu-cat-badge {
        font-size: clamp(0.8rem, 3.5vw, 1rem) !important;
        line-height: 1 !important;
        padding: 0.62rem 1rem !important;
        margin-top: 0 !important;
      }
    }

    /* Desktop : typo d’origine (avant harmonisation mobile tablo) */
    @media (min-width: 768px) {
      .network-container .annuaire-title {
        font-size: var(--text-3xl);
        line-height: 1.1;
      }

      .network-container #lieux-list .lieu-item .lieu-main > h3,
      .network-container #lieux-list .lieu-item .lieu-main > .city {
        font-size: 1.05rem;
        line-height: 1.2;
      }

      .network-container #lieux-list .lieu-item .lieu-cat-badge {
        font-size: 0.72rem;
        line-height: 1;
      }

      .network-container #hovered-dept-label {
        font-size: 0.85rem;
        line-height: 1.1;
      }

      .network-container .category-select {
        font-size: 1rem;
        line-height: 1.2;
      }

      .network-container .reseau-overlay-back-btn-label {
        font-size: 1.15rem;
        line-height: 1.1;
      }

      .network-container .lieu-popup-title,
      .network-container .lieu-popup-city,
      .network-container .mapboxgl-popup.lieu-popup .mapboxgl-popup-content {
        font-size: 1.05rem;
        line-height: 1.2;
      }

      .network-container .filter-bar .filter-btn.button {
        line-height: 1.15;
      }
    }

    @media (max-width: 480px) {
      .network-container {
        padding-top: 0;
        overflow: visible;
      }
      :root:has(.network-container) {
        --reseau-section-gap: 4px;
        --reseau-header-filter-gap: 0;
        --reseau-mobile-chrome-top: 6.75rem;
      }

      .filter-bar {
        margin-top: var(--reseau-header-filter-gap);
        padding: 0 12px;
      }

      .list-sidebar {
        --reseau-sidebar-inline-pad: 12px;
        padding: 0 12px 12px;
      }
      .network-container {
        --reseau-detail-header-pad: 12px;
        --reseau-detail-header-row-h: calc(
          var(--reseau-detail-header-btn) + var(--reseau-detail-header-pad) + 1px
        );
      }
      .network-container.overlay-open .reseau-map-toolbar {
        padding-left: var(--reseau-fiche-inline-pad);
        padding-right: var(--reseau-fiche-inline-pad);
      }
      .map-container {
        border-radius: 0;
      }
      .network-container.is-fullscreen {
        inset: 0 !important;
        border-radius: 0;
        max-height: 100vh;
        overflow: hidden;
      }
      .network-container.is-fullscreen .list-sidebar {
        border-radius: 0;
        min-height: 0;
        max-height: none;
        flex: 1 1 0;
      }
      .network-container.is-fullscreen .map-container {
        border-radius: 0;
        overflow: hidden;
        touch-action: none;
      }
    }

    /* Mode N&B (noir et blanc) */
    /* Garde-fou : fond page réseau en blanc (pas --reseau-* saisonnier). La carte (.map-container / Mapbox) garde ses styles d’origine. */
    body[data-contrast-mode="bw"] .network-container {
      background: #ffffff !important;
    }

    body[data-contrast-mode="bw"] .filter-bar {
      background: #ffffff !important;
    }

    /* Sélecteurs catégories : découpe / actif alignés sur la logique couleur (fond barre = blanc). */
    body[data-contrast-mode="bw"] .filter-bar .filter-btn.button {
      background-color: #000000 !important;
      color: #ffffff !important;
      border: none !important;
      outline: none !important;
      box-shadow: inset 0 0 0 1px transparent !important;
    }

    body[data-contrast-mode="bw"] .filter-bar .filter-btn.button:hover:not(.active) {
      background-color: var(--reseau-map-letterbox) !important;
      color: #ffffff !important;
      border: none !important;
      outline: none !important;
      box-shadow: inset 0 0 0 1px #000000 !important;
    }

    body[data-contrast-mode="bw"] .filter-bar .filter-btn.button.active,
    body[data-contrast-mode="bw"] .filter-bar .filter-btn.button.active:hover {
      background-color: #ffffff !important;
      color: #000000 !important;
      border: none !important;
      outline: none !important;
      box-shadow: inset 0 0 0 1px #000000 !important;
    }

    body[data-contrast-mode="bw"] .filter-select-mobile .ressources-dropdown-label,
    body[data-contrast-mode="bw"] .filter-select-mobile .ressources-dropdown-arrow,
    body[data-contrast-mode="bw"] .filter-select-mobile .ressources-dropdown-list {
      background: #000000 !important;
      background-color: #000000 !important;
      border-color: #000000 !important;
    }

    body[data-contrast-mode="bw"] .filter-select-mobile .ressources-dropdown-label,
    body[data-contrast-mode="bw"] .filter-select-mobile .ressources-dropdown-arrow {
      color: #ffffff !important;
      -webkit-text-fill-color: #ffffff !important;
    }

    body[data-contrast-mode="bw"] .filter-select-mobile .ressources-dropdown-list li button {
      color: #ffffff !important;
      -webkit-text-fill-color: #ffffff !important;
    }

    body[data-contrast-mode="bw"] .filter-select-mobile .ressources-dropdown-list li button:hover,
    body[data-contrast-mode="bw"] .filter-select-mobile .ressources-dropdown-list li button:focus-visible,
    body[data-contrast-mode="bw"] .filter-select-mobile .ressources-dropdown-list li button.is-selected,
    body[data-contrast-mode="bw"] .network-container [data-reseau-category-filter] .ressources-dropdown-list li button:hover,
    body[data-contrast-mode="bw"] .network-container [data-reseau-category-filter] .ressources-dropdown-list li button:focus-visible {
      color: #000000 !important;
      background-color: #ffffff !important;
      -webkit-text-fill-color: #000000 !important;
      border-color: #ffffff !important;
      opacity: 1 !important;
    }

    body[data-contrast-mode="bw"] #lieux-list {
      background: var(--bw-reseau-sidebar-bg, var(--bw-reseau-network-bg, var(--reseau-sidebar-bg, #fff)));
      color: var(--bw-reseau-sidebar-text, var(--reseau-sidebar-text, inherit));
    }

    body[data-contrast-mode="bw"] .detail-overlay {
      background: var(--bw-reseau-detail-bg, var(--reseau-detail-bg, #fff));
      color: var(--bw-reseau-detail-text, var(--reseau-detail-text, inherit));
    }

    body[data-contrast-mode="bw"] .detail-overlay .button {
      background: var(--bw-reseau-detail-button-bg, var(--reseau-detail-button-bg, #000)) !important;
      color: var(--bw-reseau-detail-button-text, var(--reseau-detail-button-text, #fff)) !important;
    }

    body[data-contrast-mode="bw"] .network-container.is-fullscreen {
      background: #ffffff !important;
    }

    body[data-contrast-mode="bw"] .network-container.is-fullscreen .filter-bar {
      background: #ffffff !important;
    }

    /* ?mapzoom — panneau de réglage du zoom (reseau.twig) */
    .reseau-mapzoom-tune {
      position: absolute;
      left: calc(var(--reseau-fiche-inline-pad, 20px) + 0.5rem);
      bottom: 0.75rem;
      z-index: 60;
      width: min(18rem, calc(100% - 2 * var(--reseau-fiche-inline-pad, 20px) - 1rem));
      padding: 0.65rem 0.75rem;
      border-radius: 0.65rem;
      background: rgba(0, 0, 0, 0.88);
      color: #fff;
      font-family: ui-monospace, monospace;
      font-size: 0.72rem;
      line-height: 1.35;
      pointer-events: auto;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    }
    .reseau-mapzoom-tune__title {
      margin: 0 0 0.35rem;
      font-family: "David", serif;
      font-size: 0.95rem;
      text-transform: lowercase;
    }
    .reseau-mapzoom-tune__hint {
      margin: 0 0 0.5rem;
      opacity: 0.85;
      font-size: 0.68rem;
    }
    .reseau-mapzoom-tune__hint code {
      font-size: inherit;
    }
    .reseau-mapzoom-tune__row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.5rem;
      margin: 0 0 0.35rem;
    }
    .reseau-mapzoom-tune__row input[type="number"] {
      width: 4.25rem;
      padding: 0.15rem 0.35rem;
      border: 1px solid #666;
      border-radius: 0.25rem;
      background: #111;
      color: #fff;
      font: inherit;
    }
    .reseau-mapzoom-tune #reseau-mapzoom-tune-slider {
      width: 100%;
      margin: 0 0 0.5rem;
    }
    .reseau-mapzoom-tune__row a {
      color: #9cf;
      text-decoration: underline;
      word-break: break-all;
    }
    .reseau-mapzoom-tune__copy {
      width: 100%;
      margin: 0.35rem 0;
      padding: 0.35rem 0.5rem;
      border: 1px solid #fff;
      border-radius: 999px;
      background: #fff;
      color: #000;
      font-family: "David", serif;
      font-size: 0.8rem;
      cursor: pointer;
      text-transform: lowercase;
    }
    .reseau-mapzoom-tune__snippet {
      margin: 0;
      padding: 0.4rem;
      border-radius: 0.35rem;
      background: #111;
      white-space: pre-wrap;
      word-break: break-word;
      max-height: 5.5rem;
      overflow: auto;
    }
