/*
 * Refonte — pied de page (toutes les pages V2).
 * Collé en bas de la fenêtre quand la page est courte (ex. Rapport d'activité), mentions à gauche, liens à droite ;
 * centré et sur plusieurs lignes sur mobile, avec une marge pour le bouton « retour en haut ».
 */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

/* Le contenu occupe l'espace libre et sa dernière section s'étire jusqu'au pied de page (pas de bande vide) */
body > #main { flex: 1 0 auto; display: flex; flex-direction: column; }
body > #main > :last-child { flex: 1 0 auto; }
/* Pages éditoriales (Rapport d'activité, Témoignages…) : la dernière section s'étire aussi.
   Pas sur les autres .charte : les chevauchements à marge négative (bannière / forfaits) y seraient décalés. */
body > #main > .charte.page-editoriale:last-child { display: flex; flex-direction: column; }
body > #main > .charte.page-editoriale:last-child > section:last-child { flex: 1 0 auto; }

#footer.aj-pied {
  flex-shrink: 0;
  padding: var(--space-6, 24px) 0;
  border-top: 1px solid var(--bordure-douce, #e6e6e6);
  box-shadow: none;
  background: var(--blanc, #fff);
  font-family: var(--font-interface);
  font-size: var(--texte-sm);
  color: var(--texte-fort, #333);
}

.aj-pied__ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4, 16px) var(--space-8, 32px);
}

#footer.aj-pied .credits { margin-top: 2px; font-size: var(--texte-xs); color: var(--texte-discret); }

#footer.aj-pied .credits a { color: var(--vert-action); }

.aj-pied__liens {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 8px) var(--space-6, 24px);
}

#footer.aj-pied .aj-pied__liens a {
  padding: 0;
  color: var(--texte-fort, #333);
  text-decoration: none;
  transition: color var(--transition);
}

#footer.aj-pied .aj-pied__liens a:hover,
#footer.aj-pied .aj-pied__liens a:focus-visible { color: var(--vert-action); }

@media (max-width: 991px) {
  .aj-pied__ligne { flex-direction: column-reverse; text-align: center; }
  .aj-pied__liens { justify-content: center; gap: var(--space-2, 8px) var(--space-5, 20px); }
  /* place pour le bouton « retour en haut » fixé en bas à droite */
  #footer.aj-pied { padding-bottom: calc(var(--space-6, 24px) + 64px); }
}
