/* ============================================================
   FOOTER PREMIUM – Studies Learning
   Concept : "Nuage ancré" — glassmorphism, aéré, poétique
   ============================================================ */

:root {
  --footer-bg-top: rgba(240, 245, 255, 0.65);
  --footer-bg-mid: rgba(255, 255, 255, 0.82);
  --footer-border: rgba(255, 255, 255, 0.5);
  --footer-bottom-bg: rgba(15, 23, 42, 0.86);
  --footer-text: #475569;
  --footer-heading: #1e293b;
  --footer-accent: #0047ff;
  --footer-muted: #94a3b8;
  --footer-link-hover: #0047ff;
  --footer-radius: 28px;
  --footer-blur: 14px;
  --footer-transition: 0.35s cubic-bezier(0.22, 0.9, 0.36, 1);
}

/* ── Wrapper ───────────────────────────────────────────────── */
.site-footer {
  position: relative;
  margin-top: 5rem;
  overflow: hidden;
  background: transparent;
}

/* Diffuse gradient blob behind the glass */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 60% at 15% 90%,
      rgba(70, 130, 230, 0.13) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 50% at 85% 10%,
      rgba(140, 170, 240, 0.13) 0%,
      transparent 70%
    ),
    linear-gradient(
      160deg,
      rgba(218, 228, 248, 0.75) 0%,
      rgba(235, 241, 255, 0.9) 100%
    );
  pointer-events: none;
  z-index: 0;
}

/* ── Upper glass panel ─────────────────────────────────────── */
.footer-glass {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
  border-top: 1px solid rgba(180, 200, 240, 0.5);
  background: rgba(210, 222, 245, 0.25);
  backdrop-filter: blur(var(--footer-blur));
  -webkit-backdrop-filter: blur(var(--footer-blur));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.4fr 2fr 1.5fr;
  gap: 3.5rem;
  align-items: start;
}

/* ── Column A – Brand ──────────────────────────────────────── */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.footer-logo-wrap a,
.footer-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

/* Logo image (mirrors header .logo-img sizing) */
.footer-logo-img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

/* Custom logo from WP Customizer */
.footer-logo-wrap .custom-logo {
  max-height: 48px;
  width: auto;
}

.footer-site-name {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--footer-heading);
  font-family: "Outfit", sans-serif;
}

.footer-site-name span {
  color: var(--footer-accent);
}

.footer-tagline {
  font-size: 1rem;
  font-weight: 300;
  color: var(--footer-text);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  line-height: 1.5;
}

.footer-description {
  font-size: 0.9rem;
  color: var(--footer-muted);
  line-height: 1.75;
  max-width: 26ch;
}

/* ── Column B – Navigation ─────────────────────────────────── */
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 2rem;
  align-items: start;
}

.footer-nav-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--footer-muted);
  margin-bottom: 1rem;
  grid-column: 1 / -1;
}

/* Override WP ul */
.footer-nav ul,
.footer-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: contents;
}

.footer-nav ul li,
.footer-nav-list li {
  grid-column: auto;
}

.footer-nav ul li a,
.footer-nav-list li a {
  position: relative;
  display: inline-block;
  font-size: 0.93rem;
  font-weight: 400;
  color: var(--footer-text);
  text-decoration: none;
  padding: 0.35rem 0;
  transition: color var(--footer-transition);
  outline-offset: 4px;
}

/* Underline grow animation */
.footer-nav ul li a::after,
.footer-nav-list li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--footer-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--footer-transition);
}

.footer-nav ul li a:hover,
.footer-nav-list li a:hover {
  color: var(--footer-accent);
}

.footer-nav ul li a:hover::after,
.footer-nav-list li a:hover::after {
  transform: scaleX(1);
}

/* ── Column C – Right (Newsletter + Social) ────────────────── */
.footer-right {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

/* Newsletter */
.footer-newsletter-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--footer-muted);
  margin-bottom: 0.75rem;
  display: block;
}

.footer-newsletter-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50px;
  padding: 0.35rem 0.35rem 0.35rem 1.25rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition:
    box-shadow var(--footer-transition),
    border-color var(--footer-transition);
}

.footer-newsletter-form:focus-within {
  box-shadow: 0 4px 24px rgba(0, 71, 255, 0.1);
  border-color: rgba(0, 71, 255, 0.2);
}

.footer-newsletter-form.shake {
  animation: nl-shake 0.4s ease;
}

@keyframes nl-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.footer-newsletter-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.88rem;
  color: var(--footer-heading);
  font-family: inherit;
  outline: none;
}

.footer-newsletter-input::placeholder {
  color: var(--footer-muted);
}

.footer-newsletter-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--footer-accent);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform var(--footer-transition),
    background var(--footer-transition);
}

.footer-newsletter-btn:hover {
  background: #003ccc;
  transform: scale(1.08);
}

.footer-newsletter-success {
  font-size: 0.85rem;
  color: var(--footer-accent);
  margin-top: 0.5rem;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition:
    opacity 0.4s ease,
    height 0.4s ease;
}

.footer-newsletter-success.visible {
  opacity: 1;
  height: 1.4rem;
}

/* Social icons */
.footer-social-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--footer-muted);
  margin-bottom: 0.8rem;
  display: block;
}

.footer-social-icons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-social-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--footer-text);
  text-decoration: none;
  font-size: 1.05rem;
  transition:
    transform var(--footer-transition),
    background var(--footer-transition),
    color var(--footer-transition),
    box-shadow var(--footer-transition);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.footer-social-link:hover {
  transform: scale(1.12) translateY(-2px);
  background: var(--footer-accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 71, 255, 0.2);
}

/* ── Bottom bar ────────────────────────────────────────────── */
.footer-bottom {
  position: relative;
  z-index: 1;
  background: var(--footer-bottom-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-bottom-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.35rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer-legal-links a {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-legal-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.footer-legal-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  user-select: none;
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.38);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .footer-glass {
    padding: 3.5rem 0 2.5rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 0 1.5rem;
  }

  .footer-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-right {
    grid-template-columns: 1fr;
  }

  .footer-description {
    max-width: none;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1.25rem 1.5rem;
  }
}

@media (max-width: 400px) {
  .footer-nav {
    grid-template-columns: 1fr;
  }
}
