/* Footer principal AH 2026 — v3 : desktop inchangé, mobile = maquette
   (expertises 1 col, réalisations 2 col, contact ocre empilé, bas sombre). */

html body.ah-pied footer.et-l--footer,
html body.ah-pied #main-footer,
html body.ah-pied #et-footer-nav,
html body.ah-pied #footer-bottom {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

html body.ah-pied .ah-foot {
  --ah-foot: #4c250a;
  --ah-foot-encre: #ffffff;
  --ah-foot-contact: #a15c1d;
  --ah-foot-filet: #f7f0ea;
  --ah-perle-v: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42.72 64.23' preserveAspectRatio='none'%3E%3Ccircle cx='21.36' cy='32.115' r='21.36' fill='%23000'/%3E%3Ccircle cx='21.36' cy='0' r='10.56' fill='%23000'/%3E%3Ccircle cx='21.36' cy='64.23' r='10.56' fill='%23000'/%3E%3C/svg%3E");
  box-sizing: border-box;
  display: block;
  position: relative;
  /* Au-dessus du rond / disque flottant (z-index 1 000 000) : sinon
     leurs hits mangent les liens du pied sur ordinateur. */
  z-index: 1000002;
  width: 100%;
  margin: clamp(24px, 3vh, 36px) 0 0;
  border-top: 0;
  padding: 0 0 clamp(36px, 4vw, 56px);
  background: var(--ah-foot);
  color: var(--ah-foot-encre);
  text-align: left;
}

/* Frise beige clair +20 %, tuiles verrouillées ; marge = hauteur. */
html body.ah-pied:is(
  .ah-accueil,
  .ah-page-agence,
  .ah-page-gabarit,
  .ah-page-lieu,
  .ah-page-exp2,
  .ah-page-france,
  .ah-page-contact,
  .ah-page-insp,
  .ah-page-projet,
  .ah-fiche
) .ah-foot {
  --ah-fr-jonction: 31.2px;
  position: relative;
  margin-top: var(--ah-fr-jonction) !important;
}

html body.ah-pied:is(
  .ah-accueil,
  .ah-page-agence,
  .ah-page-gabarit,
  .ah-page-lieu,
  .ah-page-exp2,
  .ah-page-france,
  .ah-page-contact,
  .ah-page-insp,
  .ah-page-projet,
  .ah-fiche
) .ah-foot::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: var(--ah-fr-jonction);
  background-color: #ffffff;
  background-image: url("../img/separateur-logo-beige.svg?v=2120");
  background-repeat: repeat-x;
  background-position: left center;
  background-size: 51.74px 31.2px;
  -webkit-mask-image: none;
          mask-image: none;
  -webkit-mask: none;
          mask: none;
  -webkit-clip-path: none;
          clip-path: none;
  transform: none;
  pointer-events: none;
}

@media (max-width: 980px) {
  html body.ah-pied:is(
    .ah-accueil,
    .ah-page-agence,
    .ah-page-gabarit,
    .ah-page-lieu,
    .ah-page-exp2,
    .ah-page-france,
    .ah-page-contact,
    .ah-page-insp,
    .ah-page-projet,
    .ah-fiche
  ) .ah-foot {
    --ah-fr-jonction: 24px;
  }

  html body.ah-pied:is(
    .ah-accueil,
    .ah-page-agence,
    .ah-page-gabarit,
    .ah-page-lieu,
    .ah-page-exp2,
    .ah-page-france,
    .ah-page-contact,
    .ah-page-insp,
    .ah-page-projet,
    .ah-fiche
  ) .ah-foot::before {
    height: var(--ah-fr-jonction);
    background-size: 39.8px 24px;
  }
}

html body.ah-pied.ah-page-projet .ah-foot {
  border-top: 0;
}

html body.ah-pied .ah-foot *,
html body.ah-pied .ah-foot *::before,
html body.ah-pied .ah-foot *::after {
  box-sizing: border-box;
}

html body.ah-pied .ah-foot a {
  color: var(--ah-foot-encre);
  text-decoration: none;
}

html body.ah-pied .ah-foot a:hover,
html body.ah-pied .ah-foot a:focus-visible {
  text-decoration: underline;
}

html body.ah-pied .ah-foot__haut {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr) minmax(0, 1.2fr) minmax(240px, 0.9fr);
  align-items: stretch;
}

html body.ah-pied .ah-foot__logo {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  display: block;
  width: clamp(118px, 11vw, 148px);
  height: auto;
  margin: 0;
  padding: clamp(48px, 5.5vw, 80px) clamp(24px, 2.5vw, 40px) clamp(24px, 2.5vw, 36px);
}

html body.ah-pied .ah-foot__texte {
  grid-column: 1;
  grid-row: 2;
  padding: 0 clamp(28px, 3vw, 48px) clamp(40px, 4.5vw, 64px) clamp(28px, 4vw, 72px);
}

html body.ah-pied .ah-foot__col {
  position: relative;
  grid-row: 2;
  padding: 0 clamp(22px, 2.2vw, 36px) clamp(40px, 4.5vw, 64px);
  overflow: hidden;
}

html body.ah-pied .ah-foot__col:nth-child(3) { grid-column: 2; }
html body.ah-pied .ah-foot__col:nth-child(4) { grid-column: 3; }

/* Filet vertical : le séparateur du menu, couché sur 4 px comme le filet. */
html body.ah-pied .ah-foot__col::before,
html body.ah-pied .ah-foot__panneau::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1600px;
  height: 4px;
  transform-origin: top left;
  transform: translateX(4px) rotate(90deg);
  background-color: transparent;
  background-image: url("../img/separateur-logo-blanc.svg");
  background-repeat: repeat-x;
  background-position: left center;
  background-size: auto 4px;
}

html body.ah-pied .ah-foot__intro {
  margin: 0 0 16px;
  color: var(--ah-foot-encre);
  font-size: clamp(15px, 1.05vw, 16px);
  font-weight: 400;
  line-height: 1.55;
}

html body.ah-pied .ah-foot__intro:last-child {
  margin-bottom: 0;
}

html body.ah-pied .ah-foot__titre {
  margin: 0 0 18px;
  color: var(--ah-foot-encre);
  font-size: clamp(18px, 1.35vw, 22px);
  font-weight: 700;
  line-height: 1.25;
}

html body.ah-pied .ah-foot__liste {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

html body.ah-pied .ah-foot__liste li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

html body.ah-pied .ah-foot__liste li::before,
html body.ah-pied .ah-foot__liste li::after {
  content: none !important;
  display: none !important;
}

html body.ah-pied .ah-foot__liste a,
html body.ah-pied .ah-foot__coord,
html body.ah-pied .ah-foot__mots {
  color: var(--ah-foot-encre);
  font-size: clamp(15px, 1.05vw, 16px);
  font-weight: 400;
  line-height: 1.4;
}

html body.ah-pied .ah-foot__lieux .ah-foot__liste {
  display: block;
  column-count: 2;
  column-gap: clamp(16px, 2vw, 32px);
}

html body.ah-pied .ah-foot__lieux .ah-foot__liste li {
  margin: 0 0 12px !important;
  break-inside: avoid;
}

html body.ah-pied .ah-foot__panneau {
  position: relative;
  grid-column: 4;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 3vw, 48px) clamp(18px, 2vw, 32px);
  background: var(--ah-foot-contact);
  overflow: hidden;
}

html body.ah-pied .ah-foot__carte {
  width: 100%;
  max-width: 280px;
  padding: clamp(28px, 3vw, 44px) clamp(18px, 2vw, 28px);
  background: transparent;
  text-align: center;
}

html body.ah-pied .ah-foot__carte .ah-foot__titre,
html body.ah-pied .ah-foot__carte .ah-foot__coord {
  text-align: center;
}

html body.ah-pied .ah-foot__coord {
  margin: 0 0 12px;
}

html body.ah-pied .ah-foot__coord:last-child {
  margin-bottom: 0;
}

html body.ah-pied .ah-foot__filet {
  height: 4px;
  margin: 0;
  background-color: transparent;
  background-image: url("../img/separateur-logo-blanc.svg");
  background-repeat: repeat-x;
  background-position: left center;
  background-size: auto 4px;
}

html body.ah-pied .ah-foot__bas {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px 48px;
  padding: clamp(28px, 3vw, 40px) clamp(28px, 5vw, 80px) 0;
}

html body.ah-pied .ah-foot__ligne {
  display: flex;
  align-items: baseline;
  gap: 22px;
  margin: 0;
}

html body.ah-pied .ah-foot__mots {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}

html body.ah-pied .ah-foot__mots > * + *::before {
  content: "·";
  margin: 0 0.55em;
}

/* ---------- Mobile : gabarit maquette (logo → listes → contact ocre → bas sombre) ---------- */
@media (max-width: 980px) {
  html body.ah-pied .ah-foot {
    --ah-foot-bas: #2a1608;
    padding-bottom: 0;
  }

  html body.ah-pied .ah-foot__haut {
    grid-template-columns: 1fr;
  }

  html body.ah-pied .ah-foot__logo,
  html body.ah-pied .ah-foot__texte,
  html body.ah-pied .ah-foot__col,
  html body.ah-pied .ah-foot__col:nth-child(3),
  html body.ah-pied .ah-foot__col:nth-child(4),
  html body.ah-pied .ah-foot__panneau {
    grid-column: 1;
    grid-row: auto;
  }

  html body.ah-pied .ah-foot__logo {
    justify-self: center;
    width: clamp(128px, 34vw, 152px);
    padding: 44px 28px 12px;
  }

  /* Intro pleine largeur, sans filet vertical. */
  html body.ah-pied .ah-foot__texte {
    position: relative;
    padding: 12px 28px 22px;
    overflow: visible;
  }

  html body.ah-pied .ah-foot__texte::before {
    content: none;
    display: none;
  }

  html body.ah-pied .ah-foot__intro {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.55;
  }

  html body.ah-pied .ah-foot__col {
    margin-top: 0;
    padding: 22px 28px 8px;
    overflow: visible;
  }

  /* Filets horizontaux blancs entre intro / expertises / réalisations. */
  html body.ah-pied .ah-foot__col::before {
    top: 0;
    right: 28px;
    bottom: auto;
    left: 28px;
    width: auto;
    height: 4px;
    transform: none;
    background-color: transparent;
    background-image: url("../img/separateur-logo-blanc.svg");
    background-repeat: repeat-x;
    background-position: left center;
    background-size: auto 4px;
    -webkit-mask-image: none;
            mask-image: none;
  }

  html body.ah-pied .ah-foot__panneau::before {
    content: none;
    display: none;
  }

  html body.ah-pied .ah-foot__titre {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-family: MuseoModerno, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
  }

  html body.ah-pied .ah-foot__titre::before {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b07030;
  }

  /* Expertises : une seule colonne. */
  html body.ah-pied:not(.ah-pied-projet) .ah-foot__col:not(.ah-foot__col--lieux) .ah-foot__liste {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  /* Réalisations : deux colonnes (Maisons | Appartements, …). */
  html body.ah-pied .ah-foot__lieux .ah-foot__liste {
    column-count: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
    row-gap: 14px;
  }

  html body.ah-pied .ah-foot__lieux .ah-foot__liste li {
    margin: 0 !important;
  }

  html body.ah-pied .ah-foot__liste a,
  html body.ah-pied .ah-foot__coord,
  html body.ah-pied .ah-foot__mots {
    font-size: 15px;
    line-height: 1.4;
  }

  /* Contact : bande ocre pleine largeur, empilé à gauche. */
  html body.ah-pied .ah-foot__panneau {
    align-items: stretch;
    justify-content: flex-start;
    margin-top: 18px;
    padding: 28px 28px 32px;
    overflow: visible;
  }

  html body.ah-pied .ah-foot__carte {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: none;
    padding: 0;
    text-align: left;
    overflow: visible;
  }

  html body.ah-pied .ah-foot__carte::after {
    content: none;
    display: none;
  }

  html body.ah-pied .ah-foot__carte .ah-foot__titre,
  html body.ah-pied .ah-foot__carte .ah-foot__coord {
    text-align: left;
  }

  html body.ah-pied .ah-foot__carte .ah-foot__titre {
    margin: 0 0 8px;
  }

  /* Point blanc sur le fond ocre. */
  html body.ah-pied .ah-foot__carte .ah-foot__titre::before {
    background: #ffffff;
  }

  html body.ah-pied .ah-foot__carte .ah-foot__coord {
    min-width: 0;
    margin: 0;
    font-size: 15px;
  }

  html body.ah-pied .ah-foot__tel,
  html body.ah-pied .ah-foot__tel a {
    font-family: MuseoModerno, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-decoration: none;
  }

  html body.ah-pied .ah-foot__saut {
    display: none;
  }

  /* Filet perlé entre haut et bas : masqué — le bas sombre prend le relais. */
  html body.ah-pied .ah-foot__filet {
    display: none;
  }

  html body.ah-pied .ah-foot__bas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 14px 24px;
    margin: 0;
    padding: 28px 28px 36px;
    background: var(--ah-foot-bas);
  }

  html body.ah-pied .ah-foot__ligne {
    display: block;
  }

  html body.ah-pied .ah-foot__mots {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
  }

  html body.ah-pied .ah-foot__mots > * + *::before {
    content: none;
    margin: 0;
  }
}
