/**
 * Styles pour le widget HB Footer
 * 
 * @package Hugo_Blocks_For_Elementor
 * @since 1.0.0
 */

/* ===========================
   Base & Reset
   =========================== */

.hb-footer {
  width: 100%;
  box-sizing: border-box;
  background-color: #1a1a1a;
  color: #ffffff;
}

.hb-footer *,
.hb-footer *::before,
.hb-footer *::after {
  box-sizing: inherit;
}

.hb-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hb-footer a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.hb-footer a:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ===========================
   Inner Container (Boxed Layout)
   =========================== */

.hb-footer__inner {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   Top & Bottom Rows
   =========================== */

.hb-footer__top {
  display: block;
  width: 100%;
}

.hb-footer__bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.hb-footer__bottom.is-left {
  justify-content: flex-start;
}

.hb-footer__bottom.is-center {
  justify-content: center;
  text-align: center;
}

.hb-footer__bottom.is-between {
  justify-content: space-between;
}

/* ===========================
   Grid Layout
   =========================== */

.hb-footer__grid {
  display: grid;
  gap: var(--hb-gap, 30px);
  width: 100%;
}

/* Colonnes responsives */
@media (max-width: 767px) {
  .hb-footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .hb-footer--columns-1 .hb-footer__grid {
    grid-template-columns: 1fr;
  }

  .hb-footer--columns-2 .hb-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hb-footer--columns-3 .hb-footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hb-footer--columns-4 .hb-footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hb-footer__column {
  display: flex;
  flex-direction: column;
}

/* ===========================
   Brand (Logo + Subtitle)
   =========================== */

.hb-footer__brand {
  text-align: var(--hb-brand-align, left);
}

.hb-footer__logo {
  margin-bottom: 1rem;
}

.hb-footer__logo img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hb-footer__brand-subtitle {
  margin-top: 0.5rem;
  margin-bottom: 0;
  line-height: 1.5;
}

/* ===========================
   Menus
   =========================== */

.hb-footer__menu-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: inherit;
}

.hb-footer__menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hb-footer__menu li {
  margin: 0;
}

.hb-footer__menu a {
  display: inline-block;
  padding: 0.25rem 0;
}

.hb-footer__menu a:hover,
.hb-footer__menu a:focus {
  opacity: 0.8;
}

/* Accordéon mobile */
.hb-footer__menu-toggle {
  display: none;
  width: 100%;
  background: none;
  border: none;
  padding: 1rem 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  position: relative;
  transition: opacity 0.3s ease;
}

.hb-footer__menu-toggle:hover,
.hb-footer__menu-toggle:focus {
  opacity: 0.8;
}

.hb-footer__menu-toggle:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.hb-footer__menu-icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.hb-footer__menu-toggle[aria-expanded="true"] .hb-footer__menu-icon {
  transform: translateY(-50%) rotate(45deg);
}

.hb-footer__menu-wrapper {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

@media (max-width: 767px) {
  .hb-footer--accordion-mobile .hb-footer__menu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .hb-footer--accordion-mobile .hb-footer__menu-title {
    margin: 0;
  }

  .hb-footer--accordion-mobile .hb-footer__menu-wrapper {
    max-height: 0;
  }

  .hb-footer--accordion-mobile .hb-footer__menu-wrapper.is-open {
    max-height: 1000px;
  }

  .hb-footer--accordion-mobile
    .hb-footer__column--menu
    > .hb-footer__menu-title {
    display: none;
  }
}

/* ===========================
   Réseaux sociaux (Optimisé)
   =========================== */

.hb-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hb-social-gap, 12px);
}

.hb-social__item {
  margin: 0;
}

.hb-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--hb-icon-color, currentColor);
  transition: color 0.3s ease;
}

.hb-social__link:hover,
.hb-social__link:focus {
  color: var(--hb-icon-color-hover, currentColor);
}

.hb-social__link:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.hb-social__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--hb-icon-size, 24px);
  height: var(--hb-icon-size, 24px);
  line-height: 1;
}

.hb-social__icon svg,
.hb-social__icon i {
  width: 100%;
  height: 100%;
  line-height: 1;
  display: block;
}

.hb-social__icon svg {
  fill: currentColor;
}

/* Screen reader text pour l'accessibilité */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===========================
   Newsletter
   =========================== */

.hb-footer__newsletter {
  width: 100%;
}

.hb-footer__newsletter form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ===========================
   Bottom Section (Copyright & Legal)
   =========================== */

.hb-footer__copyright {
  flex: 1 1 auto;
}

.hb-footer__legal {
  flex-shrink: 0;
}

.hb-footer__legal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hb-footer__legal-item a {
  opacity: 0.8;
}

.hb-footer__legal-item a:hover,
.hb-footer__legal-item a:focus {
  opacity: 1;
}

/* ===========================
   Mode sombre
   =========================== */

.hb-footer.is-dark {
  background-color: #000000;
  color: #ffffff;
}

.hb-footer.is-dark a {
  color: #ffffff;
}

.hb-footer.is-dark .hb-footer__bottom {
  border-top-color: rgba(255, 255, 255, 0.2);
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 767px) {
  .hb-footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .hb-footer__bottom.is-left,
  .hb-footer__bottom.is-center,
  .hb-footer__bottom.is-between {
    justify-content: center;
    align-items: center;
  }

  .hb-footer__legal-list {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hb-footer__legal-list {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }
}

/* ===========================
   Focus States (Accessibilité)
   =========================== */

.hb-footer *:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.hb-footer button:focus-visible,
.hb-footer a:focus-visible {
  outline-color: #fff;
}
