/* ==========================================================================
   AKŌ — Footer unifié partagé · V2.1 (19/05/2026)
   ───────────────────────────────────────────────────────────────────
   V2 : grid 3 colonnes équilibré, tagline rewritée capitalisant sur
        Hubsy/2015, picto Instagram en colonne brand, bloc légal en
        footer-bottom. Hauteur ~260-280px.
   V2.1 : ajout d'un pré-footer vert sombre (.ako-pre-footer) AVANT le
          footer cream, pour créer un sas visuel sur les pages qui
          finissent sur fond crème (Nos grains, fiches produit, etc.).
          Reprend les 4 engagements du bandeau hero, en version inversée
          (texte cream, icônes cuivrées sur fond ink #163328).

   Préfixe `.ako-footer-*` / `.ako-pre-footer-*` cohérent avec tous les
   autres CSS de page.
   ========================================================================== */

/* ── Pré-footer : bandeau d'engagements sur fond vert PLUS SOMBRE que la
   primary #163328 (cf. sections Origin, hero Comprendre, newsletter Explorer
   qui sont tous en #163328). Le palier de profondeur par teinte crée la
   rupture visuelle quel que soit le fond de la section précédente :
   - sur cream précédent : cream → vert très sombre = contraste premium
   - sur vert primary précédent : palier de profondeur perceptible
   - sur vert plus clair (rare) : pré-footer ressort par contraste
   Hairline cream 10% en redondance pour les contextes où la teinte ne
   suffirait pas (CSS scopés qui pourraient interférer). */
.ako-pre-footer {
  /* Inversion de stratégie : aller PLUS CLAIR que la primary #163328 au lieu
     de descendre vers le noir. #1c402f garde un vert ink premium et bien
     identifiable, tout en créant un palier de teinte vs la primary (le
     pré-footer "remonte" subtilement au lieu de "creuser"). */
  background: #1c402f;
  color: #faf8f2;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border-top: 1px solid rgba(243, 241, 233, 0.1);
}

.ako-pre-footer-inner {
  max-width: 1200px;
  /* !important : neutralise les resets scopés type `#wrapper * { padding:0; margin:0 }`
     présents sur cafes.html, explorer.html, fiches produit, etc. qui sinon
     écrasent le padding interne et tassent le bandeau verticalement. */
  margin: 0 auto !important;
  padding: 1.1rem 2rem !important;
  display: grid;
  /* 4e colonne plus large (1.5fr vs 1fr) car son sub "Visa · Mastercard ·
     Amex · Apple Pay · Google Pay" est ~2× plus dense que les autres
     (Offerte dès 50 € / Sachets non ouverts). Garde la cohérence
     typographique et tient sur 1 seule ligne. */
  grid-template-columns: 1fr 1fr 1fr 1.5fr;
  gap: 1.5rem;
}

/* Sub de la 4e colonne (Paiement sécurisé) : nowrap pour garantir 1 ligne
   même si le sous-titre devient plus long (cas où on ajoute des moyens
   de paiement type Bancontact, iDEAL, etc.). */
.ako-pre-footer-item:last-child .ako-pre-footer-sub {
  white-space: nowrap;
}

.ako-pre-footer-item {
  display: flex;
  align-items: center;
  gap: 0.7rem !important;
}

.ako-pre-footer-item .material-symbols-outlined {
  font-size: 22px;
  color: #B8763A;
  flex-shrink: 0;
  font-variation-settings: 'wght' 300;
}

.ako-pre-footer-text { line-height: 1.25; }

.ako-pre-footer-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: #faf8f2;
  letter-spacing: 0.01em;
}

.ako-pre-footer-sub {
  font-size: 0.72rem;
  color: rgba(243, 241, 233, 0.6);
  margin-top: 1px;
}

/* Historique pré-footer paiement :
   - Avant 22/05 : badges CSS texte imitant les logos (Xavier KO)
   - 22/05 matin : SVG officiels dans assets/payment-logos/ (Xavier KO,
     trop petits/illisibles)
   - 22/05 final : les moyens de paiement reviennent en texte simple
     dans .ako-pre-footer-sub (cohérence avec les autres items) et
     l'item Paiement sécurisé passe en position 4 (à la place de C&C).
   Plus aucune classe dédiée n'est nécessaire — le sub hérite des
   styles de .ako-pre-footer-sub. */

@media (max-width: 768px) {
  .ako-pre-footer-inner { grid-template-columns: repeat(2, 1fr); gap: 1rem 1.5rem; }
}

@media (max-width: 480px) {
  .ako-pre-footer-inner { grid-template-columns: 1fr; gap: 0.7rem; padding: 1rem 1.5rem; }
}

.ako-footer {
  background: #faf8f2;
  color: #163328;
  padding: 1.8rem 2rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border-top: 3px solid #163328;
}

.ako-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 768px) {
  .ako-footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .ako-footer-brand-col { grid-column: 1 / -1; }
}

@media (max-width: 500px) {
  .ako-footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

.ako-footer-brand {
  font-family: 'Noto Serif', serif;
  font-style: italic;
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
  color: #163328;
}

.ako-footer-tagline {
  font-size: 0.78rem;
  line-height: 1.55;
  color: #5a6b63;
  max-width: 280px;
  margin: 0 0 0.9rem;
}

.ako-footer-tagline strong { color: #163328; font-weight: 600; }

.ako-footer h4 {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #163328;
}

.ako-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ako-footer li {
  margin-bottom: 0.28rem;
}

.ako-footer a {
  color: #5a6b63;
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s;
}

.ako-footer a:hover {
  color: #B8763A;
}

/* ── Picto social (Instagram en colonne brand) ── */
.ako-footer-social {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.ako-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #d4ccba;
  border-radius: 50%;
  color: #5a6b63;
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
}

.ako-footer-social a:hover {
  color: #B8763A;
  border-color: #B8763A;
  transform: translateY(-1px);
}

.ako-footer-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ── Footer-bottom : 2 lignes (mentions légales puis copyright) ── */
.ako-footer-bottom {
  max-width: 1100px;
  margin: 1.2rem auto 0;
  padding-top: 0.9rem;
  border-top: 1px solid #e3ddce;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.72rem;
  color: #5a6b63;
}

.ako-footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  justify-content: center;
}

.ako-footer-legal a {
  color: #5a6b63;
  text-decoration: none;
  font-size: 0.72rem;
  transition: color 0.15s;
}

.ako-footer-legal a:hover {
  color: #163328;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ako-footer-copyright {
  color: #8a958f;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Auxiliaires globaux (inchangés depuis V1, nécessaires à la nav du site)
   ────────────────────────────────────────────────────────────────────────── */

/* Icône Recherche masquée — pas encore câblée à un moteur de recherche */
a[aria-label="Recherche"],
a[aria-label="Rechercher"] {
  display: none !important;
}

/* Badge compteur sur l'icône Panier — réactif via cart.js::bindNavBadge() */
a[data-ako-cart-icon] { position: relative; }

/* Hit area généreuse pour les icônes Compte & Panier de la nav */
a[data-ako-account-status],
a[data-ako-cart-icon] {
  padding: 0.5rem !important;
  margin: -0.5rem 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.ako-cart-badge {
  position: absolute;
  top: 1px;
  right: -1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9999px;
  background: #B8763A;
  color: #faf8f2;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--ah-primary, #163328);
  pointer-events: none;
}

.ako-cart-badge:empty { display: none; }

/* Indicateur de connexion sur l'icône Compte */
a[data-ako-account-status] { position: relative; }

a[data-ako-account-status="connected"]::after {
  content: '';
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #B8763A;
  box-shadow: 0 0 0 2px var(--ah-primary, #163328);
  pointer-events: none;
}


/* ── Cibles tactiles mobiles (audit 06/07/2026) : zone 44px sans changer le visuel ── */
@media (max-width: 768px) {
  a[aria-label="Panier"], a[aria-label="Compte"], a[aria-label="Recherche"],
  button[aria-label="Menu"], [data-ako-cart-icon] {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
