/**************************************************************
  1. Styles globaux
**************************************************************/

/* Réduction du padding dans le header */
body .header-default {
    padding-top: 20px;
    padding-bottom: 15px;
}

/* Images globales */
img,
.thumbnail img,
.widget img,
.wp-post-image {
    border-radius: 10px !important; /* Arrondi des images */
}

/* Désactiver le scroll horizontal en mobile */
@media (max-width: 767px) {
    html, body {
        overflow-x: hidden;
    }
}

/* Catégories (H2) : plus grandes et visibles */
#search-results h2 {
    font-size: 1em;
        /*color: #559295;*/
    font-weight: 600;      /* <-- un peu plus gras que normal (400) mais pas trop */
    margin-top: 0;
    margin-bottom: 0;
}


/* Entreprises (H3) : plus petites mais claires */
#search-results h3 {
    font-size: 1em;
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* =================================================================
   MASQUER TEMPORAIREMENT LES FILTRES HEURE, PRIX MAX, PLACES
   ================================================================= */

/* Masquer les dropdowns */
#heure-dropdown, 
#prix-dropdown, 
#places-dropdown {
    display: none !important;
}

/* Masquer les panneaux mobiles correspondants */
#mobile-heure-panel,
#mobile-prix-panel, 
#mobile-places-panel {
    display: none !important;
}

/* 
   POUR RÉACTIVER PLUS TARD : 
   Supprimez simplement ce bloc CSS !
*/

/* ===== Google Review : Barre d'avis ===== */

.google-review-bar-archive {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  white-space: nowrap;
  flex-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95em;
  line-height: 1;
}

.google-review-left {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  white-space: nowrap;
  flex-wrap: nowrap;
  line-height: 1;
  color: #555;
}

.google-review-left svg,
.google-review-left span,
.google-review-left small {
  display: inline-block;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1;
}

.icon-google {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.google-review-left {
  flex-direction: row !important;
  align-items: center !important;
}






/**************************************************************
  2. Conteneur principal : mise en page mobile-first
**************************************************************/

.main-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    display: flex;
    /* Par défaut en mobile : colonne */
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
}

/* Colonne de gauche (liste) */
.results-container {
    width: 100%;
    padding: 0;
    margin-left: 5px;
    background-color: #ffffff;
}

/* marge entre liste et scrollbar (OverlayScrollbars) */
.os-content {
    padding-right: 15px !important;
}

/* Colonne de droite (carte) */
.map-container {
    width: 100%;
    max-width: 100%;
    background-color: #ffffff;
    padding: 0;
    margin-right: 5px;
    margin-left: 10px;
    flex: 1 1 auto;
    position: relative; /* pour positionnement absolu des enfants */
}

/* MOBILE (max-width: 767px) : carte en haut, liste en dessous */
@media (max-width: 767px) {
  .map-container {
    order: 1;
  }
  .results-container {
    order: 2;
  }

.map-container {
    padding-right: 18px;
}

.results-container {
    padding-right: 8px;

}

}



/**************************************************************
  2.1.1. Mode Tablette (768px à 1023px) : Carte en haut, liste en dessous
**************************************************************/
@media (min-width: 768px) and (max-width: 1023px) {
  .main-container {
    flex-direction: column; /* Vertical sur tablette */
  }
  .map-container {
    order: 1; /* Carte en haut */
  }
  .results-container {
    order: 2; /* Liste en dessous */
  }
}


/**************************************************************
  3. Mode Desktop (≥ 1024px)
**************************************************************/
@media (min-width: 1024px) {
    .main-container {
        flex-direction: row; /* Alignement horizontal en desktop */
    }
    /* Pas de largeur imposée ici, ajusté plus bas */
}

/**************************************************************
  3.1. Hauteur égale & overflow sur la liste en Desktop
**************************************************************/
@media (min-width: 1024px) {
    .results-container {
        /* Permet d'étirer les colonnes sur la même hauteur */
        overflow-y: auto;
    }
}

/**************************************************************
  3.2. Overlayscrollbar pour la liste en Desktop
**************************************************************/
@media (min-width: 1024px) {
  .results-container {
    position: relative;
    scrollbar-width: thin; 
    scrollbar-color: #0073aa #e6f4f7; 
  }

  .results-container::-webkit-scrollbar {
    width: 10px;
  }
  .results-container::-webkit-scrollbar-thumb {
    background-color: #0073aa;
    border-radius: 8px;
  }
  .results-container::-webkit-scrollbar-track {
    background-color: #e6f4f7;
  }

  /* OverlayScrollbars (classes .os-scrollbar etc.) */
  .results-container .os-scrollbar {
    background-color: #eeeeee !important; 
    overflow: visible;
    margin-right: 0px;
    margin-left: 10px;
    border-radius: 8px !important;
  }
  .results-container .os-scrollbar-handle {
    background-color: #0073aa !important; 
    border-radius: 8px !important; 
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
  .results-container .os-scrollbar-handle:hover {
    background-color: #005a87 !important; 
    transform: scale(1.2);
  }
  .results-container .os-scrollbar-horizontal {
    height: 10px !important;
    margin-bottom: 14px;
  }
  .results-container .os-scrollbar-vertical {
    width: 14px !important;
  }
}


/**************************************************************
  4. Filtres et formulaire
**************************************************************/
.filters-container {
    width: 100%;
    margin: 0;
    padding: 10px;
    padding-bottom: 20px; /* ✅ AJOUT : Réserver l'espace pour la scrollbar */
    border-radius: 20px;
    background-color: #ffffff;
    overflow-x: auto;
    white-space: nowrap;

    /* scrollbar perso (section 9) */
    scrollbar-width: thin;
    scrollbar-color: #0073aa #e6f4f7;
    position: relative;
    
    /* ✅ AJOUT : Hauteur minimale pour éviter le sursaut */
    min-height: 70px; /* Hauteur boutons + espace scrollbar */
}



#search-form {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    width: 100%;
    margin-bottom: 18px; 
}

#search-form input[type="text"],
#search-form select {
    padding: 10px 30px; /* Haut / Droite / Bas / Gauche */
    border: 1px solid #ccc;
    border-radius: 40px;
    min-width: 250px;
}

#reset-search {
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    border-radius: 40px;
    cursor: pointer;
    border: none;
}

.mobile-cat-panel,
.mobile-neighborhood-panel {
  display: none;
}


/**************************************************************
  5. Liste des résultats (NOUVELLE VERSION OPTIMISÉE)
**************************************************************/

/* Liste sans puces/marges */
#search-results ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Chaque vignette entreprise */
#search-results li {
  margin-bottom: 5px;
  padding: 5px;
  border-radius: 5px;
  background-color: #ffffff;
  box-shadow: none;
  transition: box-shadow 0.3s ease;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px; /* ajuste selon ton contenu */
}

/* Contenu lien dans la vignette */
#search-results li a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  text-decoration: none;
  color: inherit;
}

/* Bloc image */
.thumbnail-wrapper {
  width: 100%;
  max-width: 400px;
  height: 200px;
  margin: 0 auto 10px;
  float: none;
  overflow: hidden;
  border-radius: 7px;
  position: relative;
}

.thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Bloc infos entreprise (structure verticale) */
.enterprise-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: flex-start;
  text-align: left;
        margin-bottom: 20px;
}

/* Titre entreprise */
.enterprise-info h2 {
  font-size: 1em;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 1;
}


/* Sous-catégorie (ligne verte) */
.enterprise-info p.sub-category-text {
  font-size: 1.3em;
  font-weight: 600;
  color: #32bea6;
  margin: 2px 0 2px 0;
  line-height: 1.2;
}

/* Quartier + zone */
.enterprise-info .neighborhood-text {
  font-size: 0.9em;
  margin: 0 0 6px 0;
}

/* Bouton "Voir" toujours en bas si possible */
.cta-wrapper {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}

/* ligne specialités */
.specialites-text {
  color: #559295;
    margin-bottom: 6px;
    min-height: 1.3em; /* Réserve de la place même s'il n'y a pas de texte */
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    line-clamp: 1;

}


/**************************************************************
  6. Carte
**************************************************************/
#map {
    width: 100%;
    border-radius: 10px;
    background-color: #eaeaea;
    /* Hauteur gérée selon le contexte (cf. section finale + media queries) */
}


/* Hauteur réduite en mobile (commenté par défaut, à activer si tu veux) 
@media (max-width: 767px) {
    #map {
        height: 200px !important;
    }
}
*/


/**************************************************************
  7. Titre et switcher sur la même ligne
**************************************************************/
body .header-container {
    padding-top: 10px;
    padding-bottom: 0;
}

.header-container {
    display: flex;
    align-items: center; 
    justify-content: space-between;
    width: 100%;
    padding: 10px 0;
}

.page-title-container {
    flex: 1 1 auto; 
    text-align: center;
    margin: 0;
}

.page-title {
    font-size: 2em;
    font-weight: bold;
    margin-right: 10px;
    margin-left: 50px;
}

@media (max-width: 767px) {
    .header-container {
        flex-direction: column; /* Met les éléments les uns sous les autres */
        align-items: flex-start; /* Aligne à gauche (ou à droite selon ton besoin) */
    }

    .page-title-container {
        text-align: center; /* Ou center / right selon ton besoin */
        width: 100%;
    }

    .header-container .page-title {
        font-size: 1em;
        width: 100%; /* Force le h1 à occuper toute la largeur */
        white-space: normal; /* Assure que le texte puisse aller à la ligne normalement */
                margin-left: 5px; /* Corrige la marge qui décale le texte */
        margin-right: 5px; /* Optionnel pour vraiment centrer */
                margin-top: 5px;
        margin-bottom: 5px;
    }
}


/* 7.1. Assure que le header reste au-dessus des labels */
.header-container {
  position: relative;
  z-index: 1 !important;
}


/**************************************************************
  8. Switcher : styles spécifiques
**************************************************************/
.map-toggle-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  width: 96px;
  height: 48px;
  background: #e6f4fb;
  border-radius: 24px;
  cursor: pointer;
}

.map-toggle-input {
    display: none;
}

.map-toggle-label {
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 18px;
    position: relative;
    width: 100%;
    height: 100%;
    padding: 8px !important; 
    box-sizing: border-box;
}

/* Pour écrans ≥ 768px */
@media (min-width: 768px) {
    .map-toggle-label {
        padding: 2px !important;
        gap: 6px;
    }
}

.map-toggle-indicator {
    position: absolute;
    width: 43.2px;
    height: 43.2px;
    background: white;
    border-radius: 50%;
    transition: transform 0.4s ease;
    box-shadow: 0px 2.4px 6px rgba(0, 0, 0, 0.2);
    top: 2.4px;
    left: 2.4px;
}

.map-toggle-icon {
    width: 43.2px;
    height: 43.2px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ccc;
    font-size: 1.2rem;
    z-index: 1;
}

.list-view {
    color: #ccc;
}
.map-view {
    color: #ccc;
}

.map-toggle-input:checked ~ .map-toggle-label .map-toggle-indicator {
    transform: translateX(48px); 
}
.map-toggle-input:not(:checked) ~ .map-toggle-label .list-view {
    color: #0a0d77; /* Actif pour la Liste */
}
.map-toggle-input:checked ~ .map-toggle-label .map-view {
    color: #0a0d77; /* Actif pour la Carte */
}


/**************************************************************
  9. Scroll bar uniforme (optionnel)
**************************************************************/
/* (Déjà géré partiellement dans .filters-container & .results-container) */

.os-scrollbar {
    background-color: #eeeeee !important; 
    overflow: visible; 
    margin-right: 0px;
    margin-left: 10px;
    border-radius: 8px !important;
}
.os-scrollbar-handle {
    background-color: #0073aa !important; 
    border-radius: 8px !important; 
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.os-scrollbar-handle:hover {
    background-color: #005a87 !important; 
    transform: scale(1.2);
}
.os-scrollbar-horizontal {
    height: 10px !important;
    margin-bottom: 14px;
}
.os-scrollbar-vertical {
    width: 14px !important;
}

.filters-container::-webkit-scrollbar {
    height: 10px;
}
.filters-container::-webkit-scrollbar-thumb {
    background-color: #0073aa !important;
    border-radius: 8px !important;
}
.filters-container::-webkit-scrollbar-track {
    background-color: #e6f4f7 !important;
}


/**************************************************************
  10. Liste en 3 colonnes quand la map est masquée (desktop)
**************************************************************/
/* Quand la carte est affichée => .main-container.map-visible */
@media (min-width: 1024px) {
  .map-visible .results-container {
    flex: 0 0 50%;
    max-width: 50%;
    min-width: 200px;
  }
  .map-visible .map-container {
    flex: 1 1 50%;
    max-width: 50%;
    min-width: 300px;
  }
}

@media (min-width: 1024px) {
  .map-visible #search-results ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
}

/* Quand la carte est masquée => .results-container en 3 colonnes */
@media (min-width: 1024px) {
  .results-container.three-columns {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  .results-container.three-columns #search-results ul {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
  }
}


/**************************************************************
  10.1. Mode Tablette (768px à 1023px) : Liste en 2 colonnes
**************************************************************/
@media (min-width: 768px) and (max-width: 1023px) {
  #search-results ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  #search-results li {
    margin-bottom: 0; /* géré par le gap */
  }
}


/**************************************************************
  11. Sous-catégorie cachée par défaut
**************************************************************/
#sub-neighborhood-select {
  display: none; 
}


/**************************************************************
  11.1 Sous-catégorie : cachée par défaut + style identique
**************************************************************/
#subcategory-dropdown {
  display: none; 
}
#subcategory-dropdown .custom-dropdown-toggle {
  padding: 8px 10px;
  background-color: #32bea6;
  color: #fff;
  border-radius: 30px;
  cursor: pointer;
  border: none;
  min-width: 150px;
  text-align: center;
  font-weight: normal;
  font-size: 18px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}


/**************************************************************
  11.2 Sous-quartier (zone) : caché par défaut
**************************************************************/
#sub-neighborhood-dropdown {
  display: none; 
}
#sub-neighborhood-dropdown .custom-dropdown-toggle {
  padding: 8px 10px;
  background-color: #32bea6;
  color: #fff;
  border-radius: 30px;
  cursor: pointer;
  border: none;
  min-width: 150px;
  text-align: center;
  font-weight: normal;
  font-size: 18px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}


/**************************************************************
  12. marqueur membre sur carte
**************************************************************/
/* Conteneurs pour marqueur membre / non-membre */
.member-marker,
.non-member-marker {
    position: relative;
}

/* Dimensions */
.member-marker {
    width: 46px;
    height: 46px;
}
.non-member-marker {
    width: 40px;
    height: 40px;
}

/* Forme en goutte (SVG) - Membre */
.member-marker .marker-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%2332bea6%22%20d%3D%22M12%2C2C8.13%2C2%2C5%2C5.13%2C5%2C9c0%2C5.25%2C7%2C13%2C7%2C13s7-7.75%2C7-13C19%2C5.13%2C15.87%2C2%2C12%2C2z%20M12%2C11.5c-1.38%2C0-2.5-1.12-2.5-2.5S10.62%2C6.5%2C12%2C6.5c1.38%2C0%2C2.5%2C1.12%2C2.5%2C2.5S13.38%2C11.5%2C12%2C11.5z%22/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
/* Forme en goutte (SVG) - Non-Membre */
.non-member-marker .marker-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%230073aa%22%20d%3D%22M12%2C2C8.13%2C2%2C5%2C5.13%2C5%2C9c0%2C5.25%2C7%2C13%2C7%2C13s7-7.75%2C7-13C19%2C5.13%2C15.87%2C2%2C12%2C2z%20M12%2C11.5c-1.38%2C0-2.5-1.12-2.5-2.5S10.62%2C6.5%2C12%2C6.5c1.38%2C0%2C2.5%2C1.12%2C2.5%2C2.5S13.38%2C11.5%2C12%2C11.5z%22/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Icônes internes */
.member-marker .marker-icon {
    position: absolute;
    top: 41%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px;
    height: 25px;
    background-image: url("https://parentsbarcelone.com/wp-content/uploads/2025/02/checked-2.png");
    background-size: cover;
    background-repeat: no-repeat;
}
.non-member-marker .marker-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-image: url("https://exemple.com/path/to/non-member-icon.png");
    background-size: cover;
    background-repeat: no-repeat;
}

/* Clusters */
.cluster-marker {
    width: 30px !important;
    height: 30px !important;
    background-color: #0073aa;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px !important; 
    font-weight: normal !important;
}

.cluster-marker.has-member {
    box-shadow: 0 0 0 4.5px #32bea6, 0 0 15px #32bea6;
}


/**************************************************************
  15. Boutons filtre
**************************************************************/

/* 15.1. Desktop (≥ 824px) */
@media (min-width: 824px) {
  .custom-dropdown {
    position: relative;
    display: inline-block;
    margin-right: 5px;
  }
  .custom-dropdown-toggle {
    min-width: 220px !important; 
    padding: 10px 15px;
    font-size: 18px;
    height: 45px;
  }
}

@media (min-width: 824px) {
  #reset-search,
  #search-form input[type="text"] {

    height: 45px !important;
    font-size: 18px !important;
    padding: 10px 15px !important;
    font-family: inherit !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}



/* 15.2. Mobile (< 824px) */
@media (max-width: 823px) {
  .custom-dropdown {
    position: relative;
    display: inline-block;
    margin-right: 5px;
  }
  .custom-dropdown-toggle {
    min-width: 150px;
    padding: 8px 10px;
    font-size: 16px;
    height: 40px;
  }

}

@media (max-width: 823px) {
  #search-form input[type="text"],
  #reset-search,
  #subcategory-dropdown .custom-dropdown-toggle,
  #sub-neighborhood-dropdown .custom-dropdown-toggle {
    height: 40px !important;
    font-size: 16px !important;
    padding: 8px 10px !important;
    font-family: inherit !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}




/* Style général des boutons (valable pour tous écrans) */
.custom-dropdown-toggle {
  background-color: #0073aa; /* bleu */
  color: #fff;
  border-radius: 30px;
  cursor: pointer;
  border: none;
  text-align: center;
  font-weight: normal;
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-dropdown-toggle:after {
  margin-left: 10px;
  color: #fff; 
}

/* Menu déroulant */
.custom-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  max-height: 450px;
  overflow-y: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  padding: 0;
  margin: 0;
  list-style: none;
}
.custom-dropdown-menu li {
  padding: 10px;
  cursor: pointer;
  color: #222; 
}


/* Hover VERT uniquement pour les sous-catégories et sous-quartiers */
.custom-dropdown-menu.is-subcategory li:hover,
.custom-dropdown-menu.is-subneighborhood li:hover {
  background-color: #32bea6 !important;
  color: #fff !important;
}


.custom-dropdown-menu li:hover {
  background-color: #0073aa;
  color: #fff;
}

.custom-dropdown-menu::-webkit-scrollbar {
    width: 10px;
}
.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background-color: #0073aa;
    border-radius: 8px;
}
.custom-dropdown-menu::-webkit-scrollbar-track {
    background-color: #eeeeee;
}

/* Firefox support */
.custom-dropdown-menu {
    scrollbar-width: thin;
    scrollbar-color: #0073aa #eeeeee;
}


/* 15.3. Bouton filtre membre : style orange */
#member-filter-dropdown .custom-dropdown-toggle {
  background-color: #fff;
  color: #F37E37;
  border: 2px solid #F37E37;
}

#member-filter-dropdown .custom-dropdown-toggle.selected {
  background-color: #F37E37;
  color: #fff;
  border: 2px solid transparent;
}


/**************************************************************
 16.1. Panneau mobile "slide from bottom"
**************************************************************/
.mobile-cat-panel {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: transparent;
  display: none;
}

/* Overlay (fond semi-transparent) */
.mobile-cat-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.6, 1);
  z-index: 1;
}
.mobile-cat-panel.open::before {
  opacity: 1;
}

/* Slide (partie blanche) */
.mobile-cat-panel .mobile-cat-slide {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background-color: #fff;
  border-radius: 20px 20px 0 0;
  max-height: 80vh;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.6, 1);
  z-index: 2;
}
.mobile-cat-panel.open .mobile-cat-slide {
  transform: translateY(0);
}


/**************************************************************
 16.2. Panneau mobile : en-tête, bouton fermer, liste
**************************************************************/
.mobile-cat-header {
  position: sticky;
  top: 0;
  background-color: #fff;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2em;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
  z-index: 10;

  border-top-left-radius: 25px;  
  border-top-right-radius: 25px; 
  overflow: hidden;
}

.mobile-cat-header h2 {
  flex-grow: 1;
  text-align: center;
  margin: 0;
  font-size: 1.2em;
}

/* bouton "Fermer" */
.mobile-cat-header [id^="close-mobile"] {
  position: absolute;
  right: 10px;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
  color: #222;
}
.mobile-cat-header [id^="close-mobile"]:hover {
  color: #000;
}

.mobile-cat-content {
  overflow-y: auto;
  height: calc(80vh - 60px);
  padding: 10px;
}

.mobile-cat-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  font-size: 1em;
  color: #333;
}
.mobile-cat-content ul li {
  padding: 15px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}
.mobile-cat-content ul li:hover {
  background-color: #f0f0f0;
}


/**************************************************************
 16.3. Panneau mobile - Sous-catégories
**************************************************************/
#mobile-subcat-panel {
  display: none;
}


/**************************************************************
 16.4 : Style par défaut Catégories/Quartiers
**************************************************************/
/* ✅ NOUVEAU : Filtres principaux en BLEU */
#category-dropdown .custom-dropdown-toggle,
#neighborhood-dropdown .custom-dropdown-toggle {
  background-color: #fff;
  color: #0073aa;
  border: 2px solid #0073aa;
}

/* ✅ NOUVEAU : Filtres avancés en GRIS */
#age-dropdown .custom-dropdown-toggle,
#jour-dropdown .custom-dropdown-toggle,
#langue-dropdown .custom-dropdown-toggle,
#competition-dropdown .custom-dropdown-toggle {
  background-color: #fff !important;
  color: #666 !important;
  border: 2px solid #ccc !important;
}

/* ✅ Selected BLEU pour filtres principaux */
#category-dropdown .custom-dropdown-toggle.selected,
#neighborhood-dropdown .custom-dropdown-toggle.selected {
  background-color: #0073aa;
  color: #fff;
  border: 2px solid transparent;
}

/* ✅ Selected GRIS pour filtres avancés */
#age-dropdown .custom-dropdown-toggle.selected,
#jour-dropdown .custom-dropdown-toggle.selected,
#langue-dropdown .custom-dropdown-toggle.selected,
#competition-dropdown .custom-dropdown-toggle.selected {
  background-color: #666 !important;
  color: #fff !important;
  border: 2px solid #666 !important;
}


/**************************************************************
 16.5 : Style Sous-catégorie / Zones
**************************************************************/
#subcategory-dropdown .custom-dropdown-toggle,
#sub-neighborhood-dropdown .custom-dropdown-toggle {
  background-color: #fff;
  color: #32bea6;
  border: 2px solid #32bea6;
}
#subcategory-dropdown .custom-dropdown-toggle.selected,
#sub-neighborhood-dropdown .custom-dropdown-toggle.selected {
  background-color: #32bea6;
  color: #fff;
  border: 2px solid transparent;
}

/* Scrollbar verte uniquement pour sous-catégorie et sous-quartier */
#subcategory-dropdown .custom-dropdown-menu::-webkit-scrollbar-thumb,
#sub-neighborhood-dropdown .custom-dropdown-menu::-webkit-scrollbar-thumb {
  background-color: #32bea6;
  border-radius: 8px;
}

#subcategory-dropdown .custom-dropdown-menu::-webkit-scrollbar-track,
#sub-neighborhood-dropdown .custom-dropdown-menu::-webkit-scrollbar-track {
  background-color: #eeeeee;
}

#subcategory-dropdown .custom-dropdown-menu,
#sub-neighborhood-dropdown .custom-dropdown-menu {
  scrollbar-width: thin;
  scrollbar-color: #32bea6 #eeeeee !important;
}




/**************************************************************
 17. Popup en bas de la carte (NOUVEAU)
**************************************************************/
/* main apparait quand on survol le pop-up */

#bottom-map-popup {
    cursor: pointer;
}

#bottom-map-popup-member,
#bottom-map-popup-category {
  display: none !important;
}
/* -----------------------------------------------------------------
   1. Boîte générale du pop‑up
------------------------------------------------------------------*/
#bottom-map-popup{
    position:absolute;                /* flottant sur la carte   */
    bottom:10px;
    left:50%;
  transform: translateX(calc(-50% - 9px)); /* décalage vers la droite */
    width:90%;
    max-width:400px;
    height:150px;                 /* garde une hauteur mini  */
    background:#fff;
    border:1px solid #ccc;
    border-radius:10px;
    box-shadow:0 2px 6px rgba(0,0,0,.2);
    padding:0;
    display:none;                     /* affiché via JS          */
    z-index:9999;
        box-sizing: border-box;  
    overflow: hidden;        
}

/* -----------------------------------------------------------------
   2. Bouton de fermeture
------------------------------------------------------------------*/
#bottom-map-popup-close{
    position:absolute;
    top:6px; right:10px;
    cursor:pointer;
    font-size:1.25em;
    color:#333;
}

/* -----------------------------------------------------------------
   3. Contenu principal : image + colonne texte
------------------------------------------------------------------*/
#bottom-map-popup .popup-flex{
    display:flex;                     /* ➜ image + texte côte à côte */
    flex-direction:row;
    align-items:stretch;
}

/* ---- 3.1 Image -------------------------------------------------*/
#bottom-map-popup .thumbnail-wrapper{
    flex:0 0 150px;                   /* largeur fixe             */
    width:150px; height:150px;
    position:relative;
    overflow:hidden;
    border-radius:10px 0 0 10px;      /* coins gauche arrondis     */
}

#bottom-map-popup-image{             /* l’<img> interne           */
    width:100%; height:100%;
    object-fit:cover;
}

/* ---- 3.2 Colonne de texte -------------------------------------*/
#bottom-map-popup-text{
    flex:1 1 auto;                   /* prend tout l’espace restant */
    min-width:0;                     /* autorise le text‑clamp       */
    padding:12px 16px;
    display:flex;
    flex-direction:column;

}



/* -----------------------------------------------------------------
   4. Titres et textes
------------------------------------------------------------------*/

/* 4.1 Titre (1 ligne max) */
#bottom-map-popup h3{
    margin:-2px 0 2px 0;
    font-size:1em;
    font-weight:600;
    display:-webkit-box;
    -webkit-line-clamp:1;
    -webkit-box-orient:vertical;
    overflow:hidden;
    line-clamp: 1;
}

/* 4.2 Sous‑catégorie (1 ligne max) – facultative */
#bottom-map-popup-subtitle{
    margin:0 0 2px 0!important;
    font-size:1.05em;
    font-weight:600;
    color:#32bea6;
    display:-webkit-box;
    -webkit-line-clamp:1;
    -webkit-box-orient:vertical;
    overflow:hidden;
    line-clamp: 1;

}

/* 4.3 Spécialités (2 lignes max) – facultatif */
#bottom-map-popup-specialites{
    margin:0 0 6px 0!important;
    font-size:.9em;
    color:#559295;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    line-clamp: 1;
}

/* -----------------------------------------------------------------
   5. Bouton CTA « Voir » – reste toujours en bas du texte
------------------------------------------------------------------*/
#bottom-map-popup-link {
  margin-left: auto;                /* <-- Ajouté pour l'envoyer à droite */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #8F9BAD;
  border: 1px solid #32bea6;
  padding-top: 5px;
  border-radius: 20px;
  font-size: .8em;
  font-weight: 500;
  text-decoration: none;
  line-height: 1;
  transition: all .3s ease;
}

#bottom-map-popup-link svg {
  width: 14px;
  height: 14px;
  stroke: #32bea6;
}






/**************************************************************
  18. Label de catégorie sur l'image (Bas droit)
**************************************************************/
.label-category.label-on-image {
    position: absolute;
    bottom: 10px;
    right: 10px; /* 👉 à droite, pas left */
    background-color: #ffffff;
    color: #0073aa;
    font-size: 0.85em;
    padding: 5px 11px 4px 11px;
    font-weight: 500;
    border-radius: 12px; /* coins arrondis sur tous les bords */
    font-family: "Poppins", "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* effet flottant */
    z-index: 1; /* au-dessus de l’image */
}

.thumbnail-wrapper {
    position: relative; 
}



/**************************************************************
  18.3 : Bandeau "Verified" (Haut gauche)
**************************************************************/

.verified-ribbon {
    position: absolute;
    top: 10px; /* détaché du haut */
    left: 10px; /* détaché du bord gauche */
    background-color: #32bea6;
    color: #fff;
    font-size: 0.80em;
    padding: 5px 11px 4px 10px;
    font-weight: 500;
    border-radius: 12px; /* coins arrondis sur tous les bords */
    font-family: "Poppins", "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* effet flottant */
    z-index: 1; /* au-dessus de l’image */
}

.verified-ribbon-activite {
    padding: 5px 5px 4px 10px;
}

.extra-info-bar{
    color: #db7853;
}
.verified-ribbon .verified-check {
    margin-right: 6px;
    vertical-align: middle;
    stroke: #fff;
    width: 16px;
    height: 16px;
}

/* Variante "single" : coin supérieur droit */
.verified-ribbon.verified-single {
    top: 10px;
    left: 10px;
    border-radius: 12px;
    font-size: 0.95em;
    padding: 7px 14px;
}

/* Version mobile */
@media (max-width: 767px) {
  .verified-ribbon,
  .verified-ribbon.verified-single {
    top: 8px;
    left: 8px;
    right: auto;
    font-size: 0.8em;
    padding: 5px 11px 5px 10px;
  }

  .verified-ribbon.verified-single {
    right: auto;
    left: 8px;
  }

  .verified-ribbon .verified-check,
  .verified-ribbon .icon-exclamation {
    width: 14px;
    height: 14px;
  }
}

.verified-ribbon .ribbon-info-icon {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.verified-ribbon .icon-exclamation {
  width: 16px;
  height: 16px;
  stroke: #fff;
}



/**************************************************************
  18.4 : call to action
**************************************************************/
.cta-wrapper {
    margin-top: 10px;
    display: flex;
    justify-content: flex-start;
}

.verified-badge-green {
  width: 32px;
  height: 32px;
  display: none;
  flex-shrink: 0;
}

.lucide-badge-check {
  width: 100%;
  height: 100%;
  display: block;
}

.popup-cta-line {
            margin-top: -1px !important;
  }

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #fff;
    color: #32bea6;
    border: 1px solid #32bea6;
    padding: 4px 15px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    transition: all 0.3s ease;
    max-width: max-content;
}
.cta-button svg {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}
.cta-icon {
    stroke: #32bea6;
    transition: stroke 0.3s ease;
}


/**************************************************************
 19 : STYLE DE LA SOUS‑CATÉGORIE / QUARTIER / ZONE dans la liste
**************************************************************/
.sub-category-line {
    font-size: 0.9em;
    margin: 3px 0;
}

.sub-category-text {
    font-size: 1.3em;
    color: #32bea6;
    font-weight: 600;
    min-height: 1.3em;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    line-clamp: 1;
}


.quartier-line {
    font-size: 0.9em;
    margin: 3px 0;
}
.zone-line {
    font-size: 0.9em;
    margin: 3px 0;
}


/**************************************************************
 20 : cadre gris si pas de photo
**************************************************************/
.thumbnail-wrapper.no-image {
    background-color: #ccc; 
    background-size: cover;
    background-position: center;
}





/**************************************************************
 21 : MAp et liste meme hauteur
**************************************************************/



/* 1) On enlève complètement les déclarations d'overflow sur .main-container */
@media (min-width: 1024px) {
  /* 1) L'enveloppe */
  .main-container {
    height: calc(100vh - 325px); 
    overflow: hidden; 
    display: flex;  
  }

  /* 2) Liste à gauche */
  .results-container {
    flex: 1;
    height: 100%;
    overflow-y: auto; /* scrolle la liste */
  }

  /* 3) Carte à droite */
  .map-container {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; 
  }

  /* 4) #map occupe tout l'espace vertical restant */
  #map {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
  }
}


/* En mobile, on repasse en colonne comme tu le faisais */
@media (max-width: 767px) {
  .main-container {
    flex-direction: column;
    height: auto; /* la page s’étire naturellement, c’est le body qui scrolle */
    overflow: visible; /* on évite l’overflow hidden ici aussi */
  }
        
  .results-container,
  .map-container {
    height: auto;
    max-height: none; /* en mobile, on ne fixe pas forcément de max-height */
}
        

        
        
  #map {
    height: 400px; /* hauteur fixe pour la map mobile, comme tu avais déjà fait */
            margin-top: 5px;
        margin-bottom: 5px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #map {
    height: 400px; /* ou 50vh, comme tu préfères */
  }
}



/**************************************************************
 22 : STYLE DU TOGGLE CENTRES / ACTIVITÉS
**************************************************************/


/* ✅ Conteneur du toggle */
.view-type-toggle {
  margin-top: 0;
  margin-left: 10px;
  margin-bottom: 5px;
  display: inline-flex;
  align-items: center;
  font-family: poppins, "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #333;
}

/* ✅ Label à gauche du select */
.view-type-toggle label {
  margin-right: 4px;
}

/* ✅ Style du select */
#view-type-select {
  font-size: 16px;
  font-family: poppins, "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-weight: 600;
  color: #003e7e; /* Bleu Parents Barcelone */
  padding: 6px 6px;
  border: none;
  background-color: transparent;
  cursor: pointer;

  /* Supprimer styles natifs */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* Ajouter la flèche ▼ */
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23003e7e' height='26' viewBox='0 0 24 24' width='18' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 26px 26px;
  padding-right: 28px; /* espace pour la flèche */
}

/* Focus sans bordure moche */
#view-type-select:focus {
  outline: none;
  
}



#view-type-select,
#view-type-select:focus,
#view-type-select:active {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/**************************************************************
 23 : filytres caché 
**************************************************************/

/* ✅ SOLUTION : Conteneur en display: none + animation des enfants */
.advanced-filters-container {
    display: none; /* Complètement hors du flow quand caché */
}

.advanced-filters-container.visible {
    display: block; /* Reprend sa place normale dans le flow */
}

/* ✅ Animation slide sur les filtres individuels */
.advanced-filters-container .custom-dropdown {
    display: inline-block;
    margin-right: 5px;
    vertical-align: top;
    
    /* Animation slide de gauche à droite */
    transform: translateX(-100px);
    opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.3s ease-out;
}

/* ✅ Quand le conteneur devient visible, animer les filtres */
.advanced-filters-container.visible .custom-dropdown {
    transform: translateX(0);
    opacity: 1;
}

/* ✅ Délai pour effet cascade (optionnel) */
.advanced-filters-container.visible .custom-dropdown:nth-child(1) { transition-delay: 0.1s; }
.advanced-filters-container.visible .custom-dropdown:nth-child(3) { transition-delay: 0.2s; }
.advanced-filters-container.visible .custom-dropdown:nth-child(5) { transition-delay: 0.3s; }
.advanced-filters-container.visible .custom-dropdown:nth-child(7) { transition-delay: 0.4s; }

/* ✅ Bouton "Plus de filtres" - inchangé */
.more-filters-btn {
    background-color: #fff !important;
    color: #666 !important;
    border: 2px solid #ccc !important;
    position: relative;
}

.more-filters-btn.active {
    background-color: #666 !important;
    color: #fff !important;
    border: 2px solid #666 !important;
}

.more-filters-btn .more-filters-icon {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.more-filters-btn.active .more-filters-icon {
    transform: rotate(180deg);
}

/* ========================================
   ALTERNATIVE SANS EFFET CASCADE :
   ======================================== */

/* Si vous ne voulez pas l'effet cascade, remplacez par : */
/*
.advanced-filters-container.visible .custom-dropdown {
    transform: translateX(0);
    opacity: 1;
    transition-delay: 0s !important;
}
*/

/* ========================================
   POURQUOI CETTE SOLUTION FONCTIONNE :
   ======================================== */

/*
PROBLÈME avec max-width + overflow:
- Même avec display: block, max-width + overflow sort du flow
- Les éléments suivants ne "voient" pas le conteneur qui grandit

SOLUTION avec display: none/block :
✅ display: none = 0 espace réservé
✅ display: block = reprend sa place normale
✅ transform sur les enfants = animation slide
✅ Les éléments suivants sont poussés naturellement
✅ Scrollbar horizontale préservée car flow normal

RÉSULTAT :
- Animation slide gauche→droite
- Aucun chevauchement
- Scrollbar fonctionnelle
- Effet cascade élégant (optionnel)
*/