/* Footer — modern, accessible, responsive */

.footer {
  /* Subtle layered gradient background that works in light/dark */
  background:
    radial-gradient(1200px 600px at 80% 120%, color-mix(in srgb, var(--primary) 6%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 6%, var(--light)) 0%, var(--light) 100%);
  color: var(--dark);
  padding: clamp(var(--spacing-lg), 6vw, var(--spacing-xxl)) 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* Qualiopi card + button block */
.brand-badges {
  display: inline-block; /* shrink to content so button matches image width */
}
.brand-badges img {
  display: block; /* remove inline-gap */
  height: auto;
  max-width: 100%;
}
.brand-badges .qualiopi-btn {
  display: block;
  width: 100%; /* align left/right edges with the image above */
  margin-top: 0.75rem;
  background: var(--white);
  color: var(--black);
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-align: center;
}
@media (hover: hover) and (pointer: fine) {
  .brand-badges .qualiopi-btn:hover {
    background: #ffffff;
    border-color: rgba(0,0,0,0.2);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  }
}
.brand-badges .qualiopi-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 50%, transparent);
  outline-offset: 2px;
}

/* Dark mode: keep button readable and aligned */
body.dark-mode .brand-badges .qualiopi-btn {
  background: #ffffff;
  color: #111;
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

body.dark-mode .footer {
  background:
    radial-gradient(1000px 600px at 80% 120%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 6%, #0b0b0f) 0%, #0b0b0f 100%);
  color: #e6e6e9;
  border-top-color: rgba(255,255,255,0.08);
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}
.footer a:hover,
.footer a:focus-visible {
  text-decoration: underline;
}

/* Screen-reader only utility (used for labels) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Top grid: brand + 4 navs + newsletter + contact/social */
.footer-top {
  display: grid;
  gap: clamp(var(--spacing-md), 3vw, var(--spacing-xl));
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: repeat(6, 1fr);
    align-items: start;
  }
  .footer-brand { grid-column: span 2; }
  /* Ensure the three columns (Formations, Méthode, Contact) stay on the same row */
  .footer-nav { grid-column: span 1; }
  .footer-contact { grid-column: span 1; }
}

.footer-title {
  margin: 0 0 var(--spacing-sm) 0;
  font-size: var(--font-size-2xl);
}

.footer-tagline {
  margin: 0 0 var(--spacing-sm) 0;
  opacity: 0.9;
}

.brand-badges img {
  display: block;
  width: auto;
  max-width: clamp(140px, 24vw, 220px);
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: var(--white);
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
body.dark-mode .brand-badges img {
  background: #111319;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Footer nav columns */
.footer-nav .nav-title,
.footer-contact .nav-title,
.footer-newsletter .nav-title {
  margin: 0 0 0.25rem 0;
  font-weight: 600;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.nav-list a { opacity: 0.95; }

/* Formations levels as subtitle list */
.nav-levels {
  font-size: var(--font-size-sm);
  opacity: 0.9;
}

/* Newsletter card */
.footer-newsletter {
  padding: var(--spacing-md);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
}
body.dark-mode .footer-newsletter {
  background: rgba(17, 19, 25, 0.6);
  border-color: rgba(255,255,255,0.08);
}
.newsletter-copy { margin: 0 0 0.5rem 0; opacity: 0.9; }
.newsletter-form {
  display: flex;
  gap: 0.5rem;
}
.newsletter-form input[type="email"] {
  flex: 1 1 auto;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
}
body.dark-mode .newsletter-form input[type="email"] {
  background: #0f1116;
  color: #e6e6e9;
  border-color: rgba(255,255,255,0.16);
}
.newsletter-consent { display: block; margin-top: 0.5rem; opacity: 0.7; font-size: var(--font-size-sm); }

/* Contact */
.footer .contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.footer .contact-item { display: flex; align-items: center; gap: 0.5rem; }
.footer .contact-item .material-symbols-outlined { font-size: 1.25rem; color: var(--secondary); }

/* Social links */
.social-links {
  list-style: none;
  margin: 1rem 0 0 0; /* add top space from 'Spécialisation' */
  padding: 0;
  display: flex;
  flex-wrap: nowrap; /* keep icons on one row on larger screens */
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap; /* prevent wrapping of inline content */
  overflow-x: auto; /* allow horizontal scroll on very small viewports */
  -webkit-overflow-scrolling: touch;
}

.social-links li {
  list-style: none;
}

/* Neutralize any global list bullets or custom markers injected via ::before */
.social-links li::before {
  content: none !important;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; /* larger card for better visibility */
  height: 56px;
  padding: 0;
  border-radius: 14px; /* keep similar rounding proportion */
  background: var(--white);
  color: var(--black);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.social-link:hover,
.social-link:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
  border-color: rgba(0,0,0,0.15);
}

.social-link .material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-size: 1.75rem; /* scale with 56px card */
  line-height: 1;
  /* Filled Material Symbols */
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  font-feature-settings: 'liga';
  letter-spacing: normal;
  display: inline-block;
}

/* Ensure inline SVG icons adopt the link color and size */
.social-link svg {
  width: 28px; /* larger icon inside bigger card */
  height: 28px;
  display: block; /* avoid baseline gap */
  fill: currentColor; /* use link color (black) */
}

/* PNG icons styling (for provided assets) */
.social-link img {
  width: 28px; /* larger icon inside bigger card */
  height: 28px;
  display: block; /* avoid baseline gap */
  object-fit: contain; /* ensure full icon is visible */
}

/* Dark mode adjustments for icon cards */
body.dark-mode .social-link {
  background: color-mix(in srgb, var(--dark-text) 6%, var(--dark-bg));
  color: var(--dark-text);
  border-color: var(--dark-border);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
body.dark-mode .social-link:hover,
body.dark-mode .social-link:focus {
  box-shadow: 0 10px 24px rgba(0,0,0,0.5);
  border-color: color-mix(in srgb, var(--dark-text) 14%, var(--dark-bg));
}

.social-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 60%, transparent);
  outline-offset: 3px;
}

/* Utility row */
.footer-utility {
  margin-top: clamp(var(--spacing-lg), 4vw, var(--spacing-xxl));
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  opacity: 0.9;
}
body.dark-mode .footer-utility { border-top-color: rgba(255,255,255,0.08); }
.utility-left a { margin-left: 1rem; }
.utility-right { display: flex; align-items: center; gap: 0.75rem; }
.lang-select {
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
}
body.dark-mode .lang-select { background: #0f1116; color: #e6e6e9; border-color: rgba(255,255,255,0.16); }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.6);
}
body.dark-mode .theme-toggle { background: rgba(17,19,25,0.6); border-color: rgba(255,255,255,0.16); }
