/* =========================================================
   FOOTER — CLEAN CONSOLIDATED
========================================================= */


/* =========================================================
   TYPOGRAPHY
========================================================= */

.footer_nav,
.footer_nav * {
  font-family: var(--_typographie-principale---font-family) !important;
  font-weight: 300 !important;
}


/* =========================================================
   BASE
========================================================= */

.footer {
  position: relative;
  width: 100%;
}

.footer_nav {
  position: relative;
  width: 100%;
  min-height: 22rem;
}


/* =========================================================
   MAIN TABS
   Maison / Services / Commandes / Légal / Social
========================================================= */

.footer_tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));

  width: 100%;
  min-height: 3rem;
}

.footer_tab {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 0;

  cursor: pointer;

  opacity: 0.45;

  transition:
    opacity 260ms ease;
}

.footer_tab:hover,
.footer_tab.is-active {
  opacity: 1;
}

.footer_tab-text {
  position: relative;

  display: inline-block;

  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1;

  white-space: nowrap;
}


/* ---------------------------------------------------------
   MAIN TAB UNDERLINE
--------------------------------------------------------- */

.footer_tab-text::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -0.4rem;

  width: 100%;
  height: 1px;

  background: currentColor;

  transform: scaleX(0);
  transform-origin: right center;

  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.footer_tab:hover .footer_tab-text::after,
.footer_tab.is-active .footer_tab-text::after {
  transform: scaleX(1);
  transform-origin: left center;
}


/* =========================================================
   PANELS
========================================================= */

.footer_panels {
  position: relative;

  width: 100%;
  min-height: 14rem;
}

.footer_panel {
  position: absolute;

  inset: 0;

  width: 100%;

  opacity: 0;
  visibility: hidden;

  pointer-events: none;

  transition:
    opacity 280ms ease,
    visibility 0s linear 280ms;
}

.footer_panel.is-active {
  opacity: 1;
  visibility: visible;

  pointer-events: auto;

  z-index: 2;

  transition:
    opacity 280ms ease,
    visibility 0s linear 0s;
}


/* =========================================================
   PANEL INNER
========================================================= */

.footer_panel-inner {
  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: flex-start;

  width: 100%;

  padding: 2.25rem 4vw 3rem;
  gap: 1.25rem;
  box-sizing: border-box;
}


/* =========================================================
   SUBNAV
   FAQ / Livraison / Entretien...
========================================================= */

.footer_subnav {
  width: 100%;

  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;

  align-items: center;
  justify-content: center;

  width: 100%;

  gap: clamp(2.5rem, 5vw, 6rem);
}


/* =========================================================
   SUBNAV LINKS
========================================================= */

.footer_link {
  position: relative;

  display: inline-flex;
  align-items: center;

  color: inherit;
  text-decoration: none;

  opacity: 0.42;

  transition:
    opacity 260ms ease;
}

.footer_link:hover,
.footer_link:focus-visible {
  opacity: 1;
}

.footer_link:focus-visible {
  outline: none;
}


/* ---------------------------------------------------------
   ACTIVE SUBNAV LINK
--------------------------------------------------------- */

.footer_link:has(.footer_link-text.is-active) {
  opacity: 1;
}

.footer_link-text {
  position: relative;

  display: inline-block;

  line-height: 1;
}


/* ---------------------------------------------------------
   SUBNAV UNDERLINE
--------------------------------------------------------- */

.footer_link-text::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -0.25rem;

  width: 100%;
  height: 1px;

  background: currentColor;

  transform: scaleX(0);
  transform-origin: right center;

  transition:
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.footer_link:hover .footer_link-text::after,
.footer_link:focus-visible .footer_link-text::after,
.footer_link-text.is-active::after {
  transform: scaleX(1);
  transform-origin: left center;
}


/* =========================================================
   SUBNAV GROUP HOVER
========================================================= */

.footer-links:hover .footer_link {
  opacity: 0.42;
}

.footer-links:hover .footer_link:hover,
.footer-links:hover .footer_link:has(.footer_link-text.is-active) {
  opacity: 1;
}


/* =========================================================
   EDITORIAL CONTENT
========================================================= */

.footer_contents {
  position: relative;
  width: 70%;
}

.footer_content {
  display: none;
  width: 100%;
}

.footer_content.is-active {
  display: block;
}

.footer_panel-content {
  width: min(100%, 58rem);

  margin: 0 auto;

  padding:
    1.5rem
    2rem
    2rem;

  box-sizing: border-box;
}

.footer_panel-description {
  width: 100%;
  max-width: 48rem;

  margin: 0;

  font-size: 1rem;
  line-height: 1.6;
  font-weight: 300;
}


/* =========================================================
   TABLET
========================================================= */

@media screen and (max-width: 991px) {

  .footer_nav {
    min-height: 20rem;
  }

  .footer_panel-inner {
    padding:
      2rem
      3vw
      2.5rem;
  }

  .footer-links {
    gap:
      1.75rem
      3rem;
  }

  .footer_panel-content {
    max-width: 60rem;
  }
}


/* =========================================================
   FOOTER — MOBILE UX
========================================================= */

@media screen and (max-width: 767px) {

  /* =======================================================
     BASE
  ======================================================= */

  .footer_nav {
    min-height: 22rem;
    overflow: hidden;
  }

  .footer_panels {
    min-height: 17rem;
  }


  /* =======================================================
     MAIN TABS
     Maison / Services / Commandes / Légal / Social
  ======================================================= */

  .footer_tabs {
    display: flex;

    width: 100%;
    min-height: 4.5rem;

    align-items: center;

    gap: 2.5rem;

    padding: 0;
    scroll-padding-inline: var(--mobile-gutter);

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;

    box-sizing: border-box;
  }

  .footer_tabs::-webkit-scrollbar {
    display: none;
  }

   .footer_tabs::before,
.footer_tabs::after {
  content: "";
  flex: 0 0 var(--mobile-gutter);
}

  .footer_tab {
    flex: 0 0 auto;

    width: auto;
    min-width: max-content;

    justify-content: flex-start;

    scroll-snap-align: start;
  }

  .footer_tab-text {
    font-size: 1.35rem;
    line-height: 1;

    white-space: nowrap;
  }

  .footer_tab-text::after {
    bottom: -0.4rem;
  }


  /* =======================================================
     PANEL
  ======================================================= */

  .footer_panel-inner {
    align-items: stretch;

    width: 100%;

    gap: 1.5rem;

    padding:
      1.75rem
      0
      2.5rem;

    box-sizing: border-box;
  }


  /* =======================================================
     SECONDARY NAV
     Une seule ligne scrollable
  ======================================================= */

  .footer_subnav {
    width: 100%;
    margin: 0;

    overflow: hidden;
  }

  .footer-links {
    display: flex;
    flex-wrap: nowrap;

    align-items: center;
    justify-content: flex-start;

    width: 100%;

    gap: 2.25rem;

    padding: 0 0 0.4rem;

    scroll-padding-inline: var(--mobile-gutter);

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;

    box-sizing: border-box;
  }

   .footer-links::before,
.footer-links::after {
  content: "";
  flex: 0 0 var(--mobile-gutter);
}

  .footer-links::-webkit-scrollbar {
    display: none;
  }

  .footer_link {
    flex: 0 0 auto;

    width: auto;
    max-width: none;

    scroll-snap-align: start;
  }

  .footer_link-text {
    font-size: 1rem;
    line-height: 1;

    white-space: nowrap;
  }

  .footer_link-text::after {
    bottom: -0.35rem;
  }


 /* =======================================================
   EDITORIAL CONTENT
======================================================= */

.footer_contents {
  width: 100%;

  margin: 0;

  padding:
    0
    var(--mobile-gutter);

  box-sizing: border-box;
}

.footer_content {
  width: 100%;
}

.footer_content.is-active {
  display: block;
}

.footer_panel-content {
  width: 100%;
  max-width: none;

  margin: 0;
  padding: 0;

  box-sizing: border-box;
}

.footer_panel-description {
  width: 100%;
  max-width: 28rem;

  margin: 0;

  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 300;

  text-align: left;
}


@media screen and (max-width: 991px) {
  .footer_contents {
    width: 100%;
  }
}
