/* Footer and header hover corrections loaded after the main stylesheet. */
body .footer {
  position: relative !important;
}

body .footer__top-link,
body .footer__scroll-top.footer__top-link {
  position: absolute !important;
  top: clamp(0.9rem, 1.6vw, 1.25rem) !important;
  right: clamp(1rem, 2.2vw, 1.8rem) !important;
  z-index: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
  line-height: 1 !important;
}

body .footer__top-link:hover,
body .footer__scroll-top.footer__top-link:hover,
body .footer__top-link:focus-visible,
body .footer__scroll-top.footer__top-link:focus-visible {
  color: #355087 !important;
  background: #ffffff !important;
  border-color: #ffffff !important;
}

body .footer__social-link svg,
body .header__social-link svg,
body .site-topics__don svg {
  color: currentColor !important;
  stroke: currentColor !important;
  fill: none !important;
}

body .footer__social-link svg.social-icon--solid,
body .header__social-link svg.social-icon--solid {
  fill: currentColor !important;
  stroke: none !important;
}

body .footer__social-link:hover,
body .footer__social-link:focus-visible {
  color: #355087 !important;
  background: #ffffff !important;
  border-color: #ffffff !important;
}

body .header__social-link:hover,
body .header__social-link:focus-visible,
body .site-topics__don:hover,
body .site-topics__don:focus-visible {
  color: #355087 !important;
}

body.home-page .s4a-hero__btn:hover,
body.home-page .s4a-hero__btn:focus-visible,
body .s4a-hero__btn:hover,
body .s4a-hero__btn:focus-visible {
  color: #ffffff !important;
  background: #2a8758 !important;
  border-color: #2a8758 !important;
  text-shadow: none !important;
}

body.home-page .s4a-hero__btn:hover span,
body.home-page .s4a-hero__btn:focus-visible span,
body .s4a-hero__btn:hover span,
body .s4a-hero__btn:focus-visible span {
  color: currentColor !important;
}

@media (max-width: 700px) {
  body .footer__top-link,
  body .footer__scroll-top.footer__top-link {
    top: 0.85rem !important;
    right: 0.85rem !important;
  }
}

@media (max-width: 700px) {
  html body .footer .container.footer__inner .footer__legal,
  html body.home-page .footer .container.footer__inner .footer__legal,
  html body:not(.home-page) .footer .container.footer__inner .footer__legal {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
  }

  html body .footer .container.footer__inner .footer__links-row,
  html body .footer .container.footer__inner .footer__social,
  html body .footer .container.footer__inner .footer__support[aria-label="Partenaire historique"] {
    grid-column: 1 / -1 !important;
  }

  html body .footer .container.footer__inner .footer__links-row {
    grid-row: 1 !important;
  }

  html body .footer .container.footer__inner .footer__social {
    grid-row: 2 !important;
  }

  body .footer,
  body.home-page .footer,
  body:not(.home-page) .footer {
    overflow: hidden !important;
    padding: 1.55rem 0 1.45rem !important;
  }

  body .footer .container.footer__inner {
    width: min(calc(100% - 1.35rem), 480px) !important;
    max-width: 480px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "legal"
      "support" !important;
    align-items: start !important;
    justify-items: center !important;
    gap: 1.05rem !important;
    min-height: 0 !important;
    margin-inline: auto !important;
    padding: 0 !important;
  }

  body .footer__legal {
    grid-area: legal !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: center !important;
    justify-items: center !important;
    gap: 0.85rem !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    text-align: center !important;
  }

  body .footer__links-row {
    display: grid !important;
    grid-template-columns: repeat(2, max-content) !important;
    align-items: center !important;
    justify-content: center !important;
    justify-items: center !important;
    gap: 0.35rem 0.9rem !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 2.15rem !important;
    text-align: center !important;
  }

  body .footer__link,
  body .footer__copyright {
    font-size: 0.88rem !important;
    line-height: 1.28 !important;
    text-align: center !important;
    white-space: normal !important;
  }

  body .footer__copyright {
    grid-column: 1 / -1 !important;
    width: min(100%, 18rem) !important;
    max-width: 18rem !important;
    margin: 0.1rem auto 0 !important;
    overflow-wrap: normal !important;
  }

  body .footer__social {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.52rem !important;
    width: min(100%, 17rem) !important;
    max-width: 17rem !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  body .footer__social-label {
    flex: 0 0 100% !important;
    width: 100% !important;
    margin: 0 0 0.04rem !important;
    font-size: 0.9rem !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  body .footer__social-link {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    flex: 0 0 36px !important;
  }

  body .footer__support[aria-label="Partenaire historique"] {
    grid-area: support !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: center !important;
    justify-self: center !important;
    gap: 0.72rem !important;
    width: 100% !important;
    max-width: 26rem !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
  }

  body .footer__support[aria-label="Partenaire historique"] .footer__support-text {
    width: 100% !important;
    max-width: 22rem !important;
    margin: 0 auto !important;
    font-size: 0.95rem !important;
    line-height: 1.28 !important;
    text-align: center !important;
    text-wrap: balance;
  }

  body .footer__partners-grid--single {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }

  body .footer__partner-logo--base {
    width: auto !important;
    height: 58px !important;
    max-width: 128px !important;
    object-fit: contain !important;
  }

  html body .footer .container.footer__inner {
    grid-template-areas:
      "support"
      "social"
      "links" !important;
  }

  html body .footer .container.footer__inner .footer__legal {
    display: contents !important;
  }

  html body .footer .container.footer__inner .footer__support[aria-label="Partenaire historique"] {
    grid-area: support !important;
  }

  html body .footer .container.footer__inner .footer__social {
    grid-area: social !important;
    grid-row: auto !important;
  }

  html body .footer .container.footer__inner .footer__links-row {
    grid-area: links !important;
    grid-row: auto !important;
  }
}

@media (max-width: 380px) {
  html body .footer .container.footer__inner .footer__legal {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body .footer .container.footer__inner {
    width: min(calc(100% - 1rem), 340px) !important;
    gap: 0.95rem !important;
  }

  body .footer__links-row {
    padding-inline: 1.75rem !important;
  }

  body .footer__link,
  body .footer__copyright {
    font-size: 0.82rem !important;
  }

  body .footer__support[aria-label="Partenaire historique"] .footer__support-text {
    max-width: 19rem !important;
    font-size: 0.88rem !important;
  }

  body .footer__social-link {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    flex-basis: 34px !important;
  }
}
