/* Styles front pour Bewed Footer Links */

/* Conteneur principal */
.bewed-footer-links {
  display: flex;
  flex-direction: row;
  gap: 2rem; /* espacement entre blocs */
  align-items: flex-start;
  width: 100%;
  padding: 16px; /* padding autour du plugin */
}

/* Un bloc (titre + liste) */
.bewed-footer-links .bfl-block {
  position: relative; /* pour le bouton toggle sur mobile */
}

.bewed-footer-links .bfl-title {
  margin: 0 0 0.5rem;
  color: var(--body-color, #464646);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

/* Liste de liens verticale à l'intérieur du bloc */
.bewed-footer-links .bfl-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bewed-footer-links .bfl-item {
  margin: 0.25rem 0;
}

.bewed-footer-links .bfl-item a {
  text-decoration: none;
  overflow-wrap: anywhere; /* éviter le débordement des longs mots/urls */
}

.bewed-footer-links .bfl-item a:hover,
.bewed-footer-links .bfl-item a:focus {
  text-decoration: underline;
}

/* ------------------
   Responsive & toggle
   ------------------ */

/* Bouton toggle (affiché en mobile) */
.bewed-footer-links .bfl-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0;
  margin-left: 0.5rem;
  cursor: pointer;
  line-height: 1;
  width: 16px;
  height: 16px;
}

/* Titre + bouton alignés sur une ligne */
.bewed-footer-links .bfl-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Etat replié: cache la liste */
.bewed-footer-links .bfl-block.is-collapsed .bfl-list {
  display: none;
}

/* ≥768 px: une seule ligne, étirée sur 100% sans scroll */
@media (min-width: 768px) {
  .bewed-footer-links {
    flex-wrap: nowrap;           /* une seule ligne */
    overflow-x: hidden;          /* pas de scroll horizontal */
  }
  .bewed-footer-links .bfl-block {
    flex: 1 1 0;                 /* chaque bloc prend une part égale */
    min-width: 0;                /* autoriser le contenu à rétrécir */
  }
  .bewed-footer-links .bfl-block .bfl-list { display: block; }
  .bewed-footer-links .bfl-toggle { display: none; }
}

/* A 767px et en dessous: une seule colonne, liens cachés par défaut
   et bouton à droite du titre pour déplier */
@media (max-width: 767px) {
  .bewed-footer-links {
    gap: 1rem;
    flex-wrap: wrap; /* en mobile: passer en colonne */
  }

  .bewed-footer-links .bfl-block {
    flex: 0 0 100%; /* une colonne */
    min-width: 0; /* autoriser la réduction en largeur */
  }

  /* Par défaut, on replie les listes en mobile */
  .bewed-footer-links .bfl-block .bfl-list {
    display: none;
  }

  /* Afficher le bouton toggle en mobile */
  .bewed-footer-links .bfl-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 16px; /* pour un glyphe texte si utilisé */
  }

  /* Quand le bloc est ouvert, afficher la liste */
  .bewed-footer-links .bfl-block.is-open .bfl-list {
    display: block;
  }
}

/* Sécurité: >=1024 (desktop) listes visibles et bouton masqué */
@media (min-width: 1024px) {
  .bewed-footer-links .bfl-block .bfl-list { display: block; }
  .bewed-footer-links .bfl-toggle { display: none; }
}
