:root {
  --footer-height: 64px;
}

/* Footer principal : fond/texte en accord avec le thème */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: hsl(var(--card)); /* fond cohérent avec les cartes */
  color: hsl(var(--card-foreground));
  border-top: 1px solid hsla(var(--muted), 0.12);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.06);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* container centré et responsive */
.footer-row {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-sizing: border-box;
}

/* logo / identification */
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: hsl(var(--primary));
  font-weight: 600;
}
.footer-logo img {
  height: 28px;
  width: auto;
  display: block;
}

/* liens du footer */
.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.footer-links a {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 120ms ease, transform 120ms ease;
  font-size: 0.92rem;
}
.footer-links a:hover,
.footer-links a:focus {
  color: hsl(var(--primary));
  transform: translateY(-1px);
}

/* zone actions / sociaux */
.footer-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* bouton primaire cohérent */
.footer-actions .button.is-success,
.site-footer .button.is-success {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: 1px solid hsl(var(--primary));
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transition: transform 120ms ease, box-shadow 140ms ease;
}
.footer-actions .button.is-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.08);
}

/* icônes sociales / contact */
.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  transition: background 120ms ease, color 120ms ease;
}
.footer-icon:hover {
  background: hsla(var(--primary), 0.08);
  color: hsl(var(--primary));
}

/* copyright / meta */
.footer-copy {
  color: hsla(var(--muted), 0.48);
  font-size: 0.82rem;
}

/* ensure footer background is opaque and children don't inherit unwanted transparency */
.site-footer { background-clip: padding-box; opacity: 1 !important; }

/* spacing: guarantee page content isn't hidden behind footer */
main.container,
.container {
  padding-bottom: calc(var(--footer-height) + 1rem);
  box-sizing: border-box;
}

/* responsive stacking */
@media (max-width: 760px) {
  .footer-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.4rem 0;
  }
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
  .footer-actions {
    justify-content: center;
  }
  .footer-copy {
    text-align: center;
    width: 100%;
  }
}

/* small tweak for very small screens */
@media (max-width: 420px) {
  .footer-logo { font-size: 0.95rem; }
  .footer-links a { font-size: 0.85rem; }
  .footer-actions .button.is-success { padding: 0.35rem 0.7rem; border-radius: 6px; }
}
