/* ═══════════════════════════════════════════════════════════════════
   FOOTER GLOBAL — moka-footer.css
   Chargé sur TOUTES les pages WP (composant permanent).
   Spec : .team/artefacts/2026-08-09-fiche-footer-global.md §7

   Fond : --bg-dark (#493124 Noyer) · Texte : --text-inverse (#FBF8F2)
   Ratio source token : 15.80:1 ✅ AAA

   WCAG AAA sur tous les éléments typographiques :
     Logo Fraunces · Signature Playfair · Tagline Inter · En-têtes
     Liens colonnes · Icônes SVG (non-texte 3:1 → 15.80:1 ✅)
   Liens Bientôt (rgba 0.70) : ~6.57:1 ✅ AA — aria-disabled, exemption WCAG 1.4.3 Note 1.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Structure de base ── */

.moka-footer {
  background: var(--bg-dark);          /* Noyer #493124 */
  color: var(--text-inverse);           /* cascade vers tous les textes */
  padding-block: var(--sp-24);          /* 96px — généreux, moins que sections */
}

.moka-footer__inner {
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
  padding-inline: var(--sp-8);          /* 32px — cohérent avec .moka-container */
}

/* ── Illustration Willow (optionnelle) ── */

.moka-footer__illustration-wrapper {
  margin-bottom: var(--sp-6);           /* 24px */
  border-radius: var(--r-lg);           /* 16px — 2026-08-24, était 4px (angle presque droit) ;
                                            --r-lg = token "cartes principales, images", cohérent
                                            avec .moka-carte-cafe et les autres photos du site. */
  overflow: hidden;
  max-width: 480px;                     /* proportion éditoriale */
}

.moka-footer__illustration {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  /* Pas de hover transform — illustration posée, statique */
}

/* ── Zone identité ── */

.moka-footer__identite {
  margin-bottom: var(--sp-10);          /* 40px */
}

/* Logo — Fraunces, exception charte confirmée (logo uniquement) */
.moka-footer__logo {
  font-family: var(--font-expressive);  /* Fraunces — exception logo */
  font-size: clamp(1.75rem, 4vw, 3rem); /* clamp(28px, 4vw, 48px) */
  font-weight: 700;
  color: var(--text-inverse);           /* 15.80:1 ✅ AAA */
  line-height: 1;
  margin: 0 0 var(--sp-2);              /* 8px */
}

/* Signature — Playfair italic */
.moka-footer__signature {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem); /* clamp(20px, 2.5vw, 28px) */
  font-style: italic;
  font-weight: 400;
  color: var(--text-inverse);
  margin: 0 0 var(--sp-1);
  line-height: 1.3;
}

/* Tagline — Inter 300 16px */
.moka-footer__tagline {
  font-family: var(--font-body);
  font-size: 1rem;                      /* 16px */
  font-weight: 300;
  color: var(--text-inverse);
  margin: 0;
  line-height: 1.5;
}

/* ── Séparateur ── */

.moka-footer__sep {
  border: none;
  border-top: 1px solid rgba(251, 248, 242, 0.20); /* --text-inverse à 20% */
  margin-block: var(--sp-8);            /* 32px */
}

/* ── Grille 4 colonnes — Desktop (≥ 1024px) ── */

.moka-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-8);                     /* 32px */
  margin-bottom: var(--sp-10);          /* 40px */
}

/* En-têtes colonnes — Inter 700 12px UPPERCASE */
.moka-footer__col-titre {
  font-family: var(--font-body);
  font-size: 0.75rem;                   /* 12px */
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-inverse);           /* 15.80:1 ✅ AAA */
  margin: 0 0 var(--sp-4);              /* 16px */
}

/* Listes de liens */
.moka-footer__col-liste {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);                     /* 8px entre chaque item */
}

/* Liens actifs (Tier 1 + Tier 2 renseignés) */
.moka-footer__col-liste a {
  color: var(--text-inverse);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9375rem;                 /* 15px */
  font-weight: 400;
  line-height: 1.4;
  transition: opacity 150ms ease-out;
}

.moka-footer__col-liste a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.moka-footer__col-liste a:focus-visible {
  outline: 2px solid var(--text-inverse);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Liens Bientôt — span aria-disabled
 * rgba(251, 248, 242, 0.70) → ~6.57:1 ✅ AA
 * aria-disabled = contrôle désactivé → exemption WCAG 1.4.3 Note 1 */
.moka-footer__lien--bientot {
  color: rgba(251, 248, 242, 0.70);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.4;
  cursor: default;
  user-select: none;
}

/* ── Colonne Réseaux (4e) ── */

.moka-footer__reseaux {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);                     /* 12px entre chaque réseau */
}

.moka-footer__reseau-lien {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);                     /* 8px icône/label */
  color: var(--text-inverse);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  transition: opacity 150ms ease-out;
}

.moka-footer__reseau-lien:hover {
  opacity: 0.80;
}

.moka-footer__reseau-lien:focus-visible {
  outline: 2px solid var(--text-inverse);
  outline-offset: 2px;
  border-radius: 2px;
}

/* SVG — fill=currentColor, aria-hidden sur la balise (label sur le <a>) */
.moka-footer__reseau-lien svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
}

/* ── Barre légale ── */

.moka-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.8125rem;                 /* 13px */
  color: rgba(251, 248, 242, 0.70);
  text-align: center;
  margin: 0;
  line-height: 1.5;
}

.moka-footer__legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.moka-footer__legal a:hover {
  color: var(--text-inverse);
}

.moka-footer__legal a:focus-visible {
  outline: 2px solid var(--text-inverse);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Lien permanent "Gérer mes préférences cookies" — <button>, même style
 * que les liens de la barre légale (specs bandeau RGPD §8). Guardé par
 * moka_consent_should_render() côté PHP (footer.php) : absent des hôtes
 * d'aperçu, pas seulement caché en CSS. */
.moka-footer__consent-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.moka-footer__consent-link:hover {
  color: var(--text-inverse);
}

.moka-footer__consent-link:focus-visible {
  outline: 2px solid var(--text-inverse);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── prefers-reduced-motion ── */

@media (prefers-reduced-motion: reduce) {
  .moka-footer__col-liste a,
  .moka-footer__reseau-lien {
    transition: none;
  }
}

/* ── Tablette (768px–1023px) — 2 colonnes ── */

@media (min-width: 768px) and (max-width: 1023px) {
  .moka-footer__cols {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-10);                  /* 40px */
  }

  /* Réseaux passe en ligne horizontale */
  .moka-footer__reseaux {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--sp-4);                   /* 16px */
  }
}

/* ── Mobile (< 768px) ── */

@media (max-width: 767px) {
  .moka-footer {
    padding-block: var(--sp-16);        /* 64px */
  }

  .moka-footer__cols {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-8) var(--sp-4);       /* 32px vertical, 16px horizontal */
  }

  /* Informations + Réseaux = pleine largeur en mobile */
  .moka-footer__col--informations,
  .moka-footer__col--reseaux {
    grid-column: 1 / -1;
  }

  /* Réseaux centrés en ligne — passe à la ligne depuis l'ajout de
   * LinkedIn (2026-10-24, retour CEO : 4 liens icône+texte (Instagram,
   * TikTok, Facebook, LinkedIn) ne tiennent plus sur une seule ligne à
   * 390px, scrollWidth mesuré 410 > clientWidth 390, reproduit et capturé
   * avant correctif). Cause : grille 2 colonnes `.moka-footer__cols`,
   * cette rangée en span pleine largeur SANS flex-wrap forçait la piste
   * de grille à s'élargir au contenu (min-content d'une ligne non
   * cassable), débordant tout le pied de page. flex-wrap manquait ici
   * (déjà présent côté tablette, l.272). */
  .moka-footer__col--reseaux .moka-footer__reseaux {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: var(--sp-3);               /* 12px entre les lignes */
    column-gap: var(--sp-6);            /* 24px entre les liens, inchangé */
  }
}
