/* ==================================================
   PIED DE PAGE
   Même dégradé graphite → laiton que le hero, dans les deux thèmes,
   et en haut la même vague animée, retournée, de la couleur de la page.
   ================================================= */

.footer {
  --footer-fg: rgba(244, 241, 234, 0.76);
  --footer-strong: #f4f1ea;
  --footer-heading: #e2c896;
  --footer-link-hover: #e2c896;
  --footer-line: rgba(255, 255, 255, 0.14);
  --footer-wave-h: clamp(56px, 8vw, 120px);

  background:
    radial-gradient(55% 70% at 85% 70%, rgba(243, 217, 162, 0.18), transparent 70%),
    linear-gradient(118deg, #17181b 0%, #1f1e1d 28%, #3a3022 52%, #6b5124 76%, #9a7634 100%);
  color: var(--footer-fg);
  text-align: left;
  padding: calc(var(--footer-wave-h) + 2.75rem) 2rem 1.5rem;
  margin-top: auto;
  width: 100%;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

/* La vague du hero, retournée : la couleur de la page descend en ondulant sur le dégradé. */
.footer__waves {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: var(--footer-wave-h);
  overflow: hidden;
  transform: scaleY(-1);
  pointer-events: none;
}

.footer__wave {
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  width: 4800px;
  max-width: none; /* _reset.css borne les svg à 100 % */
  height: 100%;
  fill: var(--color-bg);
  animation: footerWave 10s linear infinite;
  will-change: transform;
}

@keyframes footerWave {
  from { transform: translateX(-1600px); }
  to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .footer__wave {
    animation: none;
  }
}

.footer__inner,
.footer__bottom {
  position: relative;
  z-index: 1;
}

.footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.25rem;
}

.footer__brand {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: var(--footer-strong);
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}

.footer__tagline {
  max-width: 22rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.footer__col h3 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--footer-heading);
  margin-bottom: 1rem;
}

.footer__col ul {
  list-style: none;
}

.footer__col li {
  margin-bottom: 0.55rem;
}

.footer a {
  color: var(--footer-strong);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--footer-link-hover);
  text-decoration: none;
}

/* « Gérer les cookies » : un bouton (il rouvre le bandeau), habillé comme les liens. */
.footer__cookies {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--footer-strong);
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer__cookies:hover {
  color: var(--footer-link-hover);
}

.footer__cookies:focus-visible {
  outline: 2px solid var(--color-accent-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Liens du pied de page : zone de clic d'au moins 24 px de haut (WCAG 2.5.8). */
.footer__col li > a,
.footer__cookies {
  display: inline-block;
  min-height: 24px;
  line-height: 24px;
}

.footer__bottom {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-top: 1.35rem;
  border-top: 1px solid var(--footer-line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.footer p {
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 1024px) and (min-width: 769px) {
  .footer__inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer__inner > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: calc(var(--footer-wave-h) + 2rem) var(--page-gutter) 1.25rem;
    text-align: center;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding-bottom: 1.75rem;
  }

  .footer__tagline {
    max-width: none;
    margin: 0 auto;
  }

  .footer__bottom {
    justify-content: center;
    text-align: center;
  }
}
