/* =========================================================
   VARIABLES ET STRUCTURE GÉNÉRALE
   Les couleurs (--ades-footer-bg, --ades-footer-green,
   --ades-footer-line) sont maintenant déclarées une seule fois
   dans style.css :root. On les consomme ici sans les redéclarer.
========================================================= */

.ades-footer {
  width: 100%;
  background: var(--ades-footer-bg);
  color: var(--ades-footer-green);
}

.ades-footer *,
.ades-footer *::before,
.ades-footer *::after {
  box-sizing: border-box;
}

.ades-footer__container {
  width: min(100% - 48px, 1380px);
  margin-inline: auto;
  padding: 100px 0 24px;
}

/* =========================================================
   STRUCTURE PRINCIPALE
========================================================= */

.ades-footer__top {
  display: grid;

  /* Le logo prend plus de place */
  grid-template-columns: 1.35fr 1fr 1fr 1fr;

  gap: clamp(32px, 4vw, 60px);
  align-items: start;
}

.ades-footer__content {
  min-width: 0;
  display: contents;
}
/* =========================================================
   LOGO ET IDENTITÉ
========================================================= */

.ades-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.ades-footer__logo {
  display: inline-flex;
  width: min(100%, 210px);
  margin-bottom: 18px;
}

.ades-footer__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.ades-footer__site-name {
  color: var(--ades-footer-green);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
}

.ades-footer__baseline {
  max-width: 320px;
  margin: 0 0 22px;

  font-size: 0.95rem;
  line-height: 1.55;
}
.ades-footer__socials--contact {
  margin-top: 20px;
}
/* =========================================================
   BOUTONS
========================================================= */

.ades-footer__buttons {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.ades-footer__button {
  width: fit-content;

  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;

  padding-block: 0.625rem;
  padding-inline: 1.25rem 0.4rem;

  border: 1px solid var(--ades-footer-green);
  border-radius: 999px;

  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;

  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease;
}

.ades-footer__button--primary {
  background: var(--ades-footer-green);
  color: var(--color-blanc);
}

.ades-footer__button--secondary {
  background: transparent;
  color: var(--ades-footer-green);
}

.ades-footer__button-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;

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

  border-radius: 50%;

  /* Défaut = variante "plein" (bouton primary) : icône blanc/vert, fixe. */
  background: var(--color-blanc);
  color: var(--ades-footer-green);

  font-size: 0.9rem;
  line-height: 1;

  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

/* Variante "contour" (bouton secondary) : icône pré-remplie vert/blanc,
   comme .ades-btn--contour--primaire. */
.ades-footer__button--secondary .ades-footer__button-icon {
  background: var(--ades-footer-green);
  color: var(--color-blanc);
}

.ades-footer__button:hover,
.ades-footer__button:focus-visible {
  transform: translateY(-3px);
}

.ades-footer__button--primary:hover,
.ades-footer__button--primary:focus-visible {
  background: var(--color-primaire-clair);
  border-color: var(--color-primaire-clair);
}

.ades-footer__button--secondary:hover,
.ades-footer__button--secondary:focus-visible {
  background: var(--ades-footer-green);
  color: var(--color-blanc);
}

/* Au survol du secondary, le bouton se remplit de vert plein : l'icône
   s'inverse pour rester visible, exactement comme CTA-Cards. */
.ades-footer__button--secondary:hover .ades-footer__button-icon,
.ades-footer__button--secondary:focus-visible .ades-footer__button-icon {
  background: var(--color-blanc);
  color: var(--ades-footer-green);
}

/* =========================================================
   RÉSEAUX SOCIAUX
========================================================= */

.ades-footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
  margin: 0;
  padding: 0;

  list-style: none;
}

.ades-footer__socials a {
  width: 38px;
  height: 38px;

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

  border: 1px solid rgba(var(--color-primaire-rgb), 0.3);
  border-radius: 50%;

  color: var(--ades-footer-green);
  text-decoration: none;

  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease;
}

.ades-footer__socials a:hover,
.ades-footer__socials a:focus-visible {
  transform: translateY(-3px) scale(1.04);
  background: var(--ades-footer-green);
  color: var(--color-blanc);
}

/* =========================================================
   LES QUATRE COLONNES DU FOOTER
========================================================= */

.ades-footer__menus {
  display: contents;
}

.ades-footer__nav {
  min-width: 0;
}

.ades-footer__heading {
  margin: 0 0 14px;

  color: var(--ades-footer-green);

  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.2;
}

/* =========================================================
   MENUS
========================================================= */

.ades-footer__menu,
.ades-footer__legal-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ades-footer__legal-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 22px;

  margin: 0;
  padding: 0;

  list-style: none;
}
.ades-footer__menu {
  display: grid;
  gap: 8px;
}

.ades-footer__menu a {
  display: inline-block;

  color: var(--ades-footer-green);

  font-size: 0.92rem;
  line-height: 1.4;
  text-decoration: none;

  transition:
    transform 0.22s ease,
    opacity 0.22s ease;
}

.ades-footer__menu a:hover,
.ades-footer__menu a:focus-visible {
  transform: translateX(4px);
  opacity: 0.72;
}

/* =========================================================
   COLONNE CONTACT
========================================================= */

.ades-footer__nav--contact {
  min-width: 0;
}

.ades-footer__contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.ades-footer__contact-item {
  min-width: 0;

  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;

  color: var(--ades-footer-green);

  font-size: 0.87rem;
  line-height: 1.45;
}

.ades-footer__contact-item i {
  margin-top: 2px;
  color: var(--ades-footer-green);
}

.ades-footer__contact-item a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.ades-footer__contact-item a:hover,
.ades-footer__contact-item a:focus-visible {
  text-decoration: underline;
}

.ades-footer__emails {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* =========================================================
   BAS DU FOOTER
========================================================= */

.ades-footer__bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;

  margin-top: 36px;
  padding-top: 22px;

  border-top: 1px solid var(--ades-footer-line);
}

.ades-footer__copyright {
  margin: 0;

  font-size: 0.8rem;
  line-height: 1.4;
}

.ades-footer__legal-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 20px;
}

.ades-footer__legal-menu a {
  color: var(--ades-footer-green);

  font-size: 0.8rem;
  line-height: 1.4;
  text-decoration: none;
}

.ades-footer__legal-menu a:hover,
.ades-footer__legal-menu a:focus-visible {
  text-decoration: underline;
}

/* =========================================================
   TABLETTES
========================================================= */

@media (max-width: 1050px) {
  .ades-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .ades-footer__container {
    width: min(100% - 32px, 680px);
    padding-top: 44px;
  }

  .ades-footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ades-footer__bottom {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .ades-footer__legal-menu {
    justify-content: flex-start;
  }
  .ades-footer__logo img {
    max-width: 120px;
  }
}

/* =========================================================
   ACCESSIBILITÉ
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .ades-footer a {
    transition: none !important;
  }
}
