/* ====== STRUCTURE GÉNÉRALE ====== */

.bie-mm-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin: 40px 0;
}

@media (max-width: 992px) {
  .bie-mm-wrap { grid-template-columns: 1fr; }
}

/* ====== LISTE ====== */

.bie-mm-list {
  max-height: 600px; /* même hauteur que la carte */
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.bie-mm-list::-webkit-scrollbar {
  width: 6px;
}
.bie-mm-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
.bie-mm-list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* ====== ITEM ====== */

.bie-mm-item {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #000;
  cursor: pointer;
  position: relative;
  overflow: hidden; /* empêche le noir de déborder */
  min-height: 100px;
}

/* Logo */
.bie-mm-item img {
  width: 140px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent !important;
  margin-right: 30px;
}

/* Zone de droite */
.bie-mm-item-body {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #000;
  transition: all 0.3s ease;
}

/* Description courte */
.bie-mm-desc {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
  color: #000;
}

/* ====== ÉTAT ACTIF ====== */

.bie-mm-item.bie-mm-active .bie-mm-item-body {
  background: #000;
  color: #fff;
  padding: 0 40px; /* uniquement horizontal */
  min-height: 200px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
}

/* ====== CONTENU DÉTAILLÉ ====== */

.bie-mm-hover {
  display: none;
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
  text-align: right;
  max-height: 200px; /* bloque la hauteur */
  overflow-y: auto; /* ✅ scroll interne si trop long */
  scrollbar-width: thin;
  scrollbar-color: #555 transparent;
}

.bie-mm-hover::-webkit-scrollbar {
  width: 4px;
}
.bie-mm-hover::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 10px;
}

.bie-mm-item.bie-mm-active .bie-mm-hover {
  display: block;
}

.bie-mm-hover p {
  margin: 0;
  padding: 0;
}

.bie-mm-hover a {
  color: #fff;
  text-decoration: none;
}

.bie-mm-hover a:hover {
  text-decoration: underline;
}

/* ====== RESPONSIVE ====== */

@media (max-width: 992px) {
  .bie-mm-wrap { grid-template-columns: 1fr; }
  .bie-mm-list { max-height: none; overflow: visible; }
}

/* Quand le bloc est actif, tout le texte devient blanc */
.bie-mm-item.bie-mm-active .bie-mm-item-body,
.bie-mm-item.bie-mm-active .bie-mm-item-body * {
  color: #fff !important;
  fill: #fff !important; /* si icônes SVG */
}

/* Lien sur fond noir */
.bie-mm-item.bie-mm-active .bie-mm-item-body a {
  color: #fff !important;
  text-decoration: none;
}
.bie-mm-item.bie-mm-active .bie-mm-item-body a:hover {
  text-decoration: underline;
}

/* === Bloc noir actif === */
.bie-mm-item.bie-mm-active .bie-mm-item-body {
  background: #000;
  color: #fff;
  padding: 10px 40px; /* ✅ marge haut/bas 10px */
  min-height: 200px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
}

/* === Scroll interne dans le bloc noir === */
.bie-mm-hover {
  display: none;
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
  text-align: right;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* ✅ Apparence de la barre de défilement */
.bie-mm-hover::-webkit-scrollbar {
  width: 14px;
}

.bie-mm-hover::-webkit-scrollbar-track {
  background: #fff; /* fond de la piste */
  border: 1px solid #000;
  border-radius: 10px; /* effet capsule */
}

.bie-mm-hover::-webkit-scrollbar-thumb {
  background: #000; /* barre noire */
  border-radius: 10px;
  border: 3px solid #fff; /* espace intérieur blanc */
}

.bie-mm-hover::-webkit-scrollbar-thumb:hover {
  background: #222; /* effet hover léger */
}

/* Pour Firefox */
.bie-mm-hover {
  scrollbar-color: #000 #fff; /* barre / fond */
  scrollbar-width: thin;
}

/* Couleur et alignement texte */
.bie-mm-item.bie-mm-active .bie-mm-item-body,
.bie-mm-item.bie-mm-active .bie-mm-item-body * {
  color: #fff !important;
  fill: #fff !important;
}

/* ====== CONTENEUR DE GAUCHE ====== */
.bie-mm-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%; /* important */
  min-height: 600px;
  gap: 24px;
  align-items: start;
  margin: 40px 0;
}

.bie-mm-list {
  flex: 1;
  overflow-y: auto;
  max-height: 100%;
  padding-right: 10px;
}

/* ====== FILTRES ====== */
.bie-mm-filters {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.bie-mm-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid #e5a135;
  border-radius: 60px;
  padding: 20px 30px;
  color: #e5a135;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.bie-mm-filter:hover {
  background: #e5a135;
  color: #fff;
}

.bie-mm-arrow {
  font-size: 24px;
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

.bie-mm-filter:hover .bie-mm-arrow {
  transform: rotate(0deg);
}

/* ====== ADAPTATION HAUTEUR ====== */
.bie-mm-list,
.bie-mm-filters {
  flex-shrink: 0;
}
.bie-mm-left {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Scroll et carte */
#bie-mm-map {
  width: 100%;
  height: 100%;
  min-height: 600px;
  border: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 992px) {
  .bie-mm-wrap {
    grid-template-columns: 1fr;
    height: auto;
  }
  #bie-mm-map {
    height: 400px;
  }
}

.bie-mm-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
  height: 100%;
  min-height: 600px;
}

/* Colonne gauche = filtres + liste */
.bie-mm-left {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Filtres */
.bie-mm-filters {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.bie-mm-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid #e5a135;
  border-radius: 60px;
  padding: 20px 30px;
  color: #e5a135;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.bie-mm-filter:hover {
  background: #e5a135;
  color: #fff;
}

.bie-mm-arrow {
  font-size: 24px;
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}
.bie-mm-filter:hover .bie-mm-arrow {
  transform: rotate(0deg);
}

/* Liste scrollable */
.bie-mm-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: #000 #fff;
}

/* Scroll stylisé */
.bie-mm-list::-webkit-scrollbar {
  width: 10px;
}
.bie-mm-list::-webkit-scrollbar-track {
  background: #fff;
  border: 1px solid #000;
  border-radius: 10px;
}
.bie-mm-list::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 10px;
}

/* Carte */
#bie-mm-map {
  width: 100%;
  height: 100%;
  min-height: 600px;
  border: 1px solid #ddd;
}

/* Responsive */
@media(max-width:992px){
  .bie-mm-wrap { grid-template-columns: 1fr; height: auto; }
  .bie-mm-list { max-height: none; overflow: visible; }
  #bie-mm-map { height: 400px; }
}

.bie-mm-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  height: 100%;
  min-height: 600px;
}

.bie-mm-left {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ✅ Colonne gauche scrollable */
.bie-mm-left-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #000 #fff;
}
.bie-mm-left-scroll::-webkit-scrollbar {
  width: 10px;
}
.bie-mm-left-scroll::-webkit-scrollbar-track {
  background: #fff;
  border: 1px solid #000;
  border-radius: 10px;
}
.bie-mm-left-scroll::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 10px;
}

/* Filtres */
.bie-mm-filters {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bie-mm-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid #e5a135;
  border-radius: 60px;
  padding: 20px 30px;
  color: #e5a135;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.bie-mm-filter:hover {
  background: #e5a135;
  color: #fff;
}

/* Dropdown */
.bie-mm-dropdown {
  display: none;
  list-style: none;
  padding: 10px 20px;
  margin: 0;
  border: 1px solid #e5a135;
  border-radius: 20px;
  background: #fff;
}
.bie-mm-dropdown li {
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}
.bie-mm-dropdown li:last-child { border-bottom: none; }
.bie-mm-dropdown li:hover {
  color: #e5a135;
}

/* Carte */
#bie-mm-map {
  width: 100%;
  height: 100%;
  min-height: 600px;
  border: 1px solid #ddd;
}

/* === Disposition principale === */
.bie-mm-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
  height: 100%;
  min-height: 600px;
}

/* Colonne gauche complète */
.bie-mm-left {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden; /* empêche de dépasser */
}

/* Scroll interne (filtres + liste) */
.bie-mm-left-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #000 #fff;
}
.bie-mm-left-scroll::-webkit-scrollbar {
  width: 10px;
}
.bie-mm-left-scroll::-webkit-scrollbar-track {
  background: #fff;
  border: 1px solid #000;
  border-radius: 10px;
}
.bie-mm-left-scroll::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 10px;
}

/* === Filtres === */
.bie-mm-filters {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 20px;
}

.bie-mm-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid #e5a135;
  border-radius: 60px;
  padding: 20px 30px;
  color: #e5a135;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.bie-mm-filter:hover {
  background: #e5a135;
  color: #fff;
}

/* Dropdowns */
.bie-mm-dropdown {
  display: none;
  list-style: none;
  padding: 10px 20px;
  margin: 0;
  border: 1px solid #e5a135;
  border-radius: 20px;
  background: #fff;
}
.bie-mm-dropdown li {
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}
.bie-mm-dropdown li:last-child { border-bottom: none; }
.bie-mm-dropdown li:hover {
  color: #e5a135;
}

/* === Liste des membres === */
.bie-mm-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* === Carte === */
#bie-mm-map {
  width: 100%;
  height: 100%;
  min-height: 600px;
  border: 1px solid #ddd;
}

/* === Responsive === */
@media(max-width:992px){
  .bie-mm-wrap { grid-template-columns: 1fr; height: auto; }
  .bie-mm-left { overflow: visible; }
  #bie-mm-map { height: 400px; }
}

/* === Layout général === */
.bie-mm-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr; /* gauche = filtres+liste / droite = carte */
  gap: 24px;
  align-items: stretch;
  height: 100%;
  min-height: 600px;
}

/* Colonne gauche */
.bie-mm-left {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ✅ Filtres (fixes en haut) */
.bie-mm-filters {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

/* ✅ Liste scrollable uniquement */
.bie-mm-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: #000 #fff;
}

/* Scroll stylisé */
.bie-mm-list::-webkit-scrollbar {
  width: 10px;
}
.bie-mm-list::-webkit-scrollbar-track {
  background: #fff;
  border: 1px solid #000;
  border-radius: 10px;
}
.bie-mm-list::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 10px;
}

/* === Carte === */
#bie-mm-map {
  width: 100%;
  height: 100%;
  min-height: 600px;
  border: 1px solid #ddd;
}

/* === Filtres === */
.bie-mm-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid #e5a135;
  border-radius: 60px;
  padding: 20px 30px;
  color: #e5a135;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.bie-mm-filter:hover {
  background: #e5a135;
  color: #fff;
}

.bie-mm-dropdown {
  display: none;
  list-style: none;
  padding: 10px 20px;
  margin: 0;
  border: 1px solid #e5a135;
  border-radius: 20px;
  background: #fff;
}
.bie-mm-dropdown li {
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}
.bie-mm-dropdown li:last-child { border-bottom: none; }
.bie-mm-dropdown li:hover {
  color: #e5a135;
}

/* === Liste des entreprises === */
.bie-mm-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  border-bottom: 1px solid #000;
  padding: 20px 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.bie-mm-item img {
  width: 120px;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent !important;
  padding: 5px 0; /* ✅ 5px en haut et bas */
}

.bie-mm-item-body {
  flex: 1;
  position: relative;
}

.bie-mm-desc {
  margin: 0;
  font-size: 16px;
  color: #000;
  font-weight: 500;
}

/* Bloc noir quand actif */
.bie-mm-hover {
  background: #000;
  color: #fff;
  padding: 10px 40px; /* ✅ réduit */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  line-height: 1.4;
}

.bie-mm-item.bie-mm-active .bie-mm-hover {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  height: auto;
}

/* Liens blancs à l’intérieur du bloc noir */
.bie-mm-item.bie-mm-active .bie-mm-hover a,
.bie-mm-item.bie-mm-active .bie-mm-hover p,
.bie-mm-item.bie-mm-active .bie-mm-desc {
  color: #fff !important;
}

.bie-mm-hover p {
  margin: 0;
  padding: 0;
}

/* Responsive */
@media(max-width:992px){
  .bie-mm-wrap { grid-template-columns: 1fr; height: auto; }
  #bie-mm-map { height: 400px; }
  .bie-mm-list { max-height: none; overflow: visible; }
}

/* === Layout général === */
.bie-mm-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr; /* gauche = filtres+liste / droite = carte */
  gap: 24px;
  align-items: stretch;
  height: 100%;
  min-height: 600px;
}

/* Colonne gauche */
.bie-mm-left {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ✅ Filtres (fixes en haut) */
.bie-mm-filters {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

/* ✅ Liste scrollable uniquement */
.bie-mm-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: #000 #fff;
}

/* Scroll stylisé */
.bie-mm-list::-webkit-scrollbar {
  width: 10px;
}
.bie-mm-list::-webkit-scrollbar-track {
  background: #fff;
  border: 1px solid #000;
  border-radius: 10px;
}
.bie-mm-list::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 10px;
}

/* === Carte === */
#bie-mm-map {
  width: 100%;
  height: 100%;
  min-height: 600px;
  border: 1px solid #ddd;
}

/* === Filtres === */
.bie-mm-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid #e5a135;
  border-radius: 60px;
  padding: 20px 30px;
  color: #e5a135;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.bie-mm-filter:hover {
  background: #e5a135;
  color: #fff;
}

.bie-mm-dropdown {
  display: none;
  list-style: none;
  padding: 10px 20px;
  margin: 0;
  border: 1px solid #e5a135;
  border-radius: 20px;
  background: #fff;
}
.bie-mm-dropdown li {
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}
.bie-mm-dropdown li:last-child { border-bottom: none; }
.bie-mm-dropdown li:hover {
  color: #e5a135;
}

/* === Liste des entreprises === */
.bie-mm-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  border-bottom: 1px solid #000;
  padding: 20px 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.bie-mm-item img {
  width: 120px;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent !important;
  padding: 5px 0; /* ✅ 5px en haut et bas */
}

.bie-mm-item-body {
  flex: 1;
  position: relative;
}

.bie-mm-desc {
  margin: 0;
  font-size: 16px;
  color: #000;
  font-weight: 500;
}

/* Bloc noir quand actif */
.bie-mm-hover {
  background: #000;
  color: #fff;
  padding: 10px 40px; /* ✅ réduit */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  line-height: 1.4;
}

.bie-mm-item.bie-mm-active .bie-mm-hover {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  height: auto;
}

/* Liens blancs à l’intérieur du bloc noir */
.bie-mm-item.bie-mm-active .bie-mm-hover a,
.bie-mm-item.bie-mm-active .bie-mm-hover p,
.bie-mm-item.bie-mm-active .bie-mm-desc {
  color: #fff !important;
}

.bie-mm-hover p {
  margin: 0;
  padding: 0;
}

/* Responsive */
@media(max-width:992px){
  .bie-mm-wrap { grid-template-columns: 1fr; height: auto; }
  #bie-mm-map { height: 400px; }
  .bie-mm-list { max-height: none; overflow: visible; }
}
