/* OFQD V241.64 — finition mobile de la grande carte.
   Objectifs : une seule navigation basse, commandes compactes, aucune loupe
   en doublon et suppression des espaces/explications inutiles. */
@media (max-width:760px){
  /* En-tête compact et lisible. */
  .ofqd-map-premium-v266{
    padding:8px 0 calc(var(--ofqd-m-nav,76px) + env(safe-area-inset-bottom,0px))!important;
  }
  .ofqd-map-premium-v266 .ofqd-map-page-head{
    display:flex!important;
    min-height:0!important;
    margin:0 12px 8px!important;
    padding:13px 14px!important;
    border-radius:18px!important;
  }
  .ofqd-map-premium-v266 .ofqd-map-page-head::after,
  .ofqd-map-premium-v266 .ofqd-map-page-head::before{display:none!important;content:none!important}
  .ofqd-map-premium-v266 .ofqd-map-page-head .ofqd-map-kicker,
  .ofqd-map-premium-v266 .ofqd-map-page-head p{display:none!important}
  .ofqd-map-premium-v266 .ofqd-map-page-head h1{
    margin:0!important;
    font-size:30px!important;
    line-height:1.06!important;
  }

  /* La topbar redevient un flux normal : plus de grand blanc/sticky intermédiaire. */
  .ofqd-map-premium-v266 .ofqd-map-topbar{
    position:relative!important;
    top:auto!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    min-height:0!important;
    padding:8px 10px 7px!important;
    gap:7px!important;
    background:#fff!important;
    box-shadow:none!important;
  }
  .ofqd-map-premium-v266 .ofqd-map-search-zone,
  .ofqd-map-premium-v266 .ofqd-map-territory-zone{
    display:flex!important;
    flex-direction:column!important;
    gap:5px!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
  }
  /* Ces libellés répètent ce que font déjà le champ et les boutons. */
  .ofqd-map-premium-v266 .ofqd-map-topbar .ofqd-map-control-title{display:none!important}

  /* Recherche : champ + un seul bouton/loupe. */
  .ofqd-map-premium-v266 .ofqd-map-search-wrap{
    position:relative!important;
    display:flex!important;
    grid-template-columns:none!important;
    width:100%!important;
    height:48px!important;
    min-height:48px!important;
    margin:0!important;
    gap:0!important;
    overflow:visible!important;
    border:1px solid #cfdced!important;
    border-radius:15px!important;
    background:#fff!important;
    box-shadow:none!important;
  }
  .ofqd-map-premium-v266 .ofqd-map-search-icon{display:none!important}
  .ofqd-map-premium-v266 .ofqd-map-search-wrap input,
  .ofqd-map-premium-v266 #ofqdMapSearch{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    height:46px!important;
    min-height:46px!important;
    padding:8px 12px 8px 14px!important;
    border:0!important;
    border-radius:14px 0 0 14px!important;
    font-size:16px!important;
    line-height:1!important;
    background:#fff!important;
  }
  .ofqd-map-premium-v266 .ofqd-map-search-wrap button,
  .ofqd-map-premium-v266 #ofqdMapSearchBtn{
    display:grid!important;
    place-items:center!important;
    flex:0 0 50px!important;
    width:50px!important;
    min-width:50px!important;
    height:46px!important;
    min-height:46px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0 14px 14px 0!important;
    background:linear-gradient(135deg,#153f9d,#2475e7)!important;
    color:#fff!important;
    font-size:0!important;
  }
  .ofqd-map-premium-v266 .ofqd-map-search-wrap button::before,
  .ofqd-map-premium-v266 .ofqd-map-search-wrap button::after,
  .ofqd-map-premium-v266 #ofqdMapSearchBtn::before,
  .ofqd-map-premium-v266 #ofqdMapSearchBtn::after{
    content:none!important;
    display:none!important;
  }
  .ofqd-map-premium-v266 .ofqd-map-search-wrap button svg,
  .ofqd-map-premium-v266 #ofqdMapSearchBtn svg{
    display:block!important;
    width:20px!important;
    height:20px!important;
    stroke:#fff!important;
  }
  .ofqd-map-premium-v266 .ofqd-map-search-wrap button span{display:none!important}

  /* Territoire : une seule ligne horizontale, jamais de bouton coupé verticalement. */
  .ofqd-map-premium-v266 .ofqd-map-view-switch{
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    gap:6px!important;
    padding:0 0 2px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    flex-wrap:nowrap!important;
    scroll-behavior:smooth!important;
    scrollbar-width:none!important;
  }
  .ofqd-map-premium-v266 .ofqd-map-view-switch::-webkit-scrollbar{display:none!important}
  .ofqd-map-premium-v266 .ofqd-map-view-switch button{
    display:inline-flex!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:max-content!important;
    height:38px!important;
    min-height:38px!important;
    padding:0 11px!important;
    white-space:nowrap!important;
    border-radius:11px!important;
    font-size:11px!important;
  }
  /* Ne plus masquer Département/Région/France : le défilement horizontal les gère. */
  .ofqd-map-premium-v266 .ofqd-map-view-switch button:nth-child(n+4){display:inline-flex!important}

  /* Catégories/rayon plus proches de la carte. */
  .ofqd-map-premium-v266 .ofqd-map-filterbar{
    position:relative!important;
    top:auto!important;
    display:flex!important;
    min-height:0!important;
    padding:6px 10px!important;
    gap:6px!important;
  }
  .ofqd-map-premium-v266 .ofqd-map-theme-filters{max-width:calc(100vw - 88px)!important}

  /* La navigation globale Accueil/Événements/Déposer/Partager/Profil suffit.
     L'ancien dock Carte/Sorties/Autour/Favoris créait une double barre. */
  .ofqd-map-premium-v266 .ofqd-map-mobile-dock,
  .ofqd-map-mobile-dock{display:none!important}

  /* La liste flottante se cale désormais au-dessus de la vraie barre globale. */
  .ofqd-map-premium-v266 .ofqd-map-results{
    bottom:calc(var(--ofqd-m-nav,76px) + env(safe-area-inset-bottom,0px) + 8px)!important;
  }
  body:has(.ofqd-map-page) .rodyn-launcher{
    bottom:calc(var(--ofqd-m-nav,76px) + env(safe-area-inset-bottom,0px) + 10px)!important;
    right:10px!important;
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    min-height:50px!important;
  }
  body:has(.ofqd-map-page) .rodyn-launcher-avatar{width:42px!important;height:42px!important}
}
