/**
 * Footer 1 - Layout 3 colonnes
 * Colonne 1: Logo + Coordonnées + Réseaux sociaux
 * Colonnes 2-3: Zones de widgets
 *
 * @package Dioqa_UI_Kit
 */

/* === FOOTER 1 STRUCTURE === */
.footer-1 {
  position: relative;
}

/* Ajouter du padding-top au footer si une banner chevauche */
body:has(.contact-bloc-1-overlap) .footer-1 {
  padding-top: 15rem !important;
}

/* === LOGO === */
.footer-1-logo {
  transition: opacity 0.3s ease;
}

.footer-1-logo:hover {
  opacity: 0.85;
}

/* === CONTACT INFO === */
.footer-1-contact,
.footer-1-contact li {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.footer-1-contact svg {
  flex-shrink: 0;
}

.footer-1 .social-links {
  gap: 1rem !important;
  margin-top: 1.5rem;
}

.footer-1-link {
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  transition: color 0.3s ease;
  color: inherit;
}

.footer-1-link:hover {
  color: var(--bs-secondary);
}

/* === FOOTER TEXT (WYSIWYG) === */
.footer-1-text {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: var(--text-md, 1rem);
  line-height: 1.6;
}

.footer-1-text p {
  margin-bottom: 1rem;
}

.footer-1-text p:last-child {
  margin-bottom: 0;
}

.footer-1-text a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.footer-1-text a:hover {
  color: var(--bs-secondary);
}

/* === FOOTER MENUS === */
.footer-1-menus-row {
  gap: 8rem;
}

.footer-1-menu-title {
  color: var(--bs-white, #fff);
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: var(--text-lg, 1.125rem);
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  margin-bottom: 1.25rem;
}

.footer-1-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-1-menu li {
  margin-bottom: 0.75rem;
}

.footer-1-menu li:last-child {
  margin-bottom: 0;
}

.footer-1-menu a {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: var(--text-md, 1rem);
  font-weight: 400;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.3s ease;
  color: inherit;
  min-height: unset;
  display: block;
}

.footer-1-menu li {
  margin-bottom: 0.5rem;
}

.footer-1-menu a:hover {
  color: var(--bs-secondary);
}

/* === FOOTER WIDGETS (legacy) === */
.footer-1 .widget {
  margin-bottom: 1.5rem;
}

.footer-1 .widget-title,
.footer-1 .widgettitle {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: var(--text-lg, 1.125rem);
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  margin-bottom: 1rem;
  color: inherit;
}

.footer-1 .widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-1 .widget ul li {
  margin-bottom: 0.5rem;
}

.footer-1 .widget ul li a {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: var(--text-md, 1rem);
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-decoration: none;
  transition: color 0.3s ease;
  color: inherit;
}

.footer-1 .widget ul li a:hover {
  color: var(--bs-secondary);
}

/* === COPYRIGHT === */
.footer-1-copyright {
  position: relative;
  margin-top: 2rem;
}

.footer-legal-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
  gap: 0;
}

.footer-legal-menu li + li::before {
  content: "|";
  display: inline;
  padding: 0 0.25rem;
  color: currentColor;
  opacity: 0.6;
}

.footer-legal-menu a {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.footer-legal-menu a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-1-copyright > nav {
  display: contents;
}


/* === RESPONSIVE === */

/* 992px-1200px : col-lg-4 trop étroit, forcer proportions correctes */
@media (min-width: 992px) and (max-width: 1200px) {
  .footer-1 > .container > .row > .col-12.col-lg-4 {
    flex: 0 0 40%;
    max-width: 40%;
  }

  .footer-1 > .container > .row > .col-12.col-lg-auto {
    flex: 0 0 60%;
    max-width: 60%;
  }

  .footer-1-menus-row {
    gap: 3rem;
    justify-content: flex-start;
  }
}

/* Tablette large (912px-991px) : maintenir layout horizontal */
@media (min-width: 912px) and (max-width: 991.98px) {
  .footer-1 > .container > .row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .footer-1 > .container > .row > .col-12.col-lg-4 {
    flex: 0 0 45%;
    max-width: 45%;
  }

  .footer-1 > .container > .row > .col-12.col-lg-auto {
    flex: 0 0 55%;
    max-width: 55%;
  }

  /* Copyright : pleine largeur sur sa propre ligne */
  .footer-1 > .container > .row > .col-12:not(.col-lg-4):not(.col-lg-auto) {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .footer-1-menus-row {
    gap: 0;
    row-gap: 2rem;
    justify-content: flex-start;
  }

  /* Tous les menus en 2 colonnes égales dans la colonne droite */
  .footer-1-menus-row > [class*="col-"] {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }

  .footer-1-menu {
    text-align: left !important;
  }

  .footer-1-menu-title {
    text-align: left !important;
  }

  /* Colonne gauche : aligner texte à gauche */
  .footer-1 > .container > .row > .col-12.col-lg-4 {
    text-align: left !important;
  }

  .footer-1 .social-links {
    justify-content: flex-start;
  }

  /* Copyright bar : layout row avec space-between (fb-7604631) */
  .footer-1 .footer-1-copyright {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: start !important;
  }

  .footer-1 .footer-1-copyright .nav {
    justify-content: flex-end !important;
    flex-shrink: 0;
    margin-left: auto;
  }

  /* Social links visibles et alignés (fb-7604545) */
  .footer-1 > .container > .row > .col-12.col-lg-4 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .footer-1 .social-links {
    justify-content: flex-start;
    gap: 0.5rem;
    margin-top: 0;
  }
}

/* Tablette */
@media (max-width: 991.98px) {
  .footer-1-menus-row {
    gap: 3rem;
    justify-content: center;
  }

  .footer-1-menu {
    text-align: center;
  }

  .footer-1-menu-title {
    text-align: center;
  }

  /* Copyright nav alignement */
  .footer-1-copyright .nav {
    justify-content: center;
  }

  .footer-1 .social-links {
    justify-content: center;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  /* Réduire le padding du footer avec banner overlap en mobile */
  body:has(.contact-bloc-1-overlap) .footer-1 {
    padding-top: 13rem !important;
  }

  .footer-1-menus-row {
    gap: 2rem;
    row-gap: 2rem;
  }

  /* Centrer les réseaux sociaux en mobile */
  .social-links {
    justify-content: center;
  }

  /* Copyright nav centré en mobile */
  .footer-1-copyright {
    text-align: center;
  }

  .footer-1-copyright .nav {
    justify-content: center;
    width: 100%;
  }
}

/* Petit mobile */
@media (max-width: 575.98px) {
  .footer-1-menus-row {
    gap: 1.5rem;
    row-gap: 1.5rem;
    flex-direction: column;
    align-items: center;
  }

  .footer-1-menus-row > div {
    width: 100%;
    max-width: none;
  }
}
