/**
 * Module 05: Pied de page 4 Colonnes (Footer) & Responsive Mobile
 * Thème Storefront Child - TAMISIER MACHINES AGRICOLES
 */

#colophon.site-footer,
#colophon.site-footer.tma-fullwidth-footer {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  background-color: #f4f4f5 !important;
  border-top: 1px solid #e5e7eb !important;
  padding: 3.5rem 0 2.5rem 0 !important;
  color: #374151 !important;
}

.tma-footer-container {
  width: 100% !important;
  max-width: 1440px !important;
  margin: 0 auto !important;
  padding: 0 2rem !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .tma-footer-container {
    padding: 0 1.25rem !important;
  }
}

.tma-footer-grid {
  display: grid !important;
  /* 4 colonnes : Service Client, Tamisier Info, À Propos, Contact.
     La colonne « Boutique » reste retirée tant que le catalogue est vide
     (voir commentaire dans footer.php). */
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 3rem !important;
}

/* Logo du pied de page */
.tma-footer-brand {
  margin-bottom: 2.5rem !important;
}

.tma-footer-brand-link {
  display: inline-block;
  line-height: 0;
}

.tma-footer-brand img {
  display: block;
  width: 138px;
  height: auto;
}

@media (max-width: 576px) {
  .tma-footer-brand {
    margin-bottom: 2rem !important;
    text-align: center;
  }

  .tma-footer-brand img {
    width: 124px;
    margin: 0 auto;
  }
}

@media (max-width: 1024px) {
  .tma-footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
  }
}

@media (max-width: 576px) {
  .tma-footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}

.tma-footer-col {
  display: flex !important;
  flex-direction: column !important;
}

.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer h5,
.site-footer h6,
.tma-footer-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin: 0 0 1.25rem 0 !important;
  line-height: 1.3 !important;
}

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

.site-footer a,
.tma-footer-links a {
  font-size: 0.9rem !important;
  color: #374151 !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

.site-footer a:hover {
  color: var(--agri-green-primary, #215833) !important;
}

/* Colonne Contact : l'adresse est un texte, pas un lien */
.tma-footer-contact li span {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #374151;
}

.tma-footer-contact li a {
  overflow-wrap: anywhere;
}

.site-footer p,
.tma-footer-about .tma-footer-text {
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  color: #4b5563 !important;
  margin: 0 !important;
}

.tma-footer-bottom {
  border-top: 1px solid #e5e7eb !important;
  margin-top: 3rem !important;
  padding-top: 1.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
}

.tma-footer-copyright {
  font-size: 0.825rem !important;
  color: #6b7280 !important;
  margin: 0 !important;
}

/* Pages légales (barre inférieure) */
.tma-footer-legal {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1.35rem;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.tma-footer-legal li {
  margin: 0 !important;
  padding: 0 !important;
}

.tma-footer-legal a {
  font-size: 0.825rem !important;
  color: #6b7280 !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

.tma-footer-legal a:hover,
.tma-footer-legal a:focus-visible {
  color: var(--agri-green-primary, #215833) !important;
  text-decoration: underline !important;
}
