/* ==========================================================================
   Footer de site Sostenutoo — feuille unique, partagée par TOUTES les pages
   publiques (FR, EN, ES) et par les pages générées du répertoire.
   --------------------------------------------------------------------------
   Ce fichier existe pour une raison précise : le footer était auparavant
   recopié dans un <style> inline page par page, il a donc dérivé. Chaque page
   avait sa version, certaines n'en avaient aucune. Le HTML est désormais
   produit par scripts/appliquer-footer.py et le style vit ici, une seule fois.

   NE PAS remettre de règles de footer dans le <style> d'une page. Si le footer
   doit changer, il change ici et dans le script.

   Toutes les règles sont scopées sous `footer.sto-footer` (spécificité 0,1,1)
   pour passer devant les anciennes règles `footer { }` restées inline dans
   certaines pages, sans avoir à les supprimer une par une.
   ========================================================================== */

/* Page ouverte depuis app.html (`?source=app`) : c'est un plan de travail, pas
   une page où l'on navigue. Le markup reste servi, seul l'affichage tombe. La
   bascule `data-sto-app` est posée par un <script> du <head> pour qu'aucun
   footer ne clignote à l'ouverture d'un outil. */
html[data-sto-app] footer.sto-footer {
  display: none;
}

footer.sto-footer {
  background: #2d3748;
  color: #fff;
  padding: 4rem 2rem 2rem;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  margin-top: 0;
}

footer.sto-footer * {
  box-sizing: border-box;
}

footer.sto-footer .sto-footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

footer.sto-footer .sto-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

footer.sto-footer .sto-footer-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

footer.sto-footer .sto-footer-logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

footer.sto-footer .sto-footer-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

footer.sto-footer .sto-footer-column-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

footer.sto-footer .sto-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

footer.sto-footer .sto-footer-links li {
  margin: 0;
  padding: 0;
}

footer.sto-footer .sto-footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

footer.sto-footer .sto-footer-links a:hover,
footer.sto-footer .sto-footer-links a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

/* Réseaux sociaux */
footer.sto-footer .sto-footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 0.25rem;
}

footer.sto-footer .sto-footer-social a {
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  transition: color 0.2s ease;
}

footer.sto-footer .sto-footer-social a:hover,
footer.sto-footer .sto-footer-social a:focus-visible {
  color: #fff;
}

/* Bas de footer */
footer.sto-footer .sto-footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

footer.sto-footer .sto-footer-copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  margin: 0;
}

footer.sto-footer .sto-footer-note {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  margin: 0.5rem 0 0 0;
}

/* Focus visible au clavier, sur fond sombre */
footer.sto-footer a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (max-width: 968px) {
  footer.sto-footer .sto-footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }
  footer.sto-footer .sto-footer-column:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  footer.sto-footer {
    padding: 3rem 1.25rem 1.5rem;
  }
  footer.sto-footer .sto-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    margin-bottom: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  footer.sto-footer .sto-footer-links a,
  footer.sto-footer .sto-footer-social a {
    transition: none;
  }
}
