/* ==========================================================================
   FEUILLE DE STYLE DÉDIÉE : FOOTER PLATEFORME & NAVIGATION FINALE (ÉTAPE 13)
   Design sombre haut de gamme, 4 colonnes, responsive mobile, bouton scroll top
   ========================================================================== */

:root {
  --footer-bg: #0F172A;
  --footer-bg-surface: #1E293B;
  --footer-border: #1E293B;
  --footer-border-hover: rgba(59, 130, 246, 0.5);
  --footer-text-heading: #FFFFFF;
  --footer-text-body: #CBD5E1;
  --footer-text-muted: #94A3B8;
  --footer-primary: #2563EB;
  --footer-accent: #38BDF8;
}

/* 1. VISIBILITÉ GARANTIE */
.platform-footer,
.platform-footer [data-reveal] {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* 2. FOOTER CONTAINER */
.platform-footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  color: var(--footer-text-body);
  padding: 70px 0 36px;
  position: relative;
  font-family: inherit;
}

.platform-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 3. GRILLE DES 4 COLONNES */
.platform-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px 30px;
  margin-bottom: 50px;
}

/* COLONNE 1 : MARQUE */
.platform-footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.platform-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.platform-footer-brand-icon {
  font-size: 1.6rem;
}

.platform-footer-brand-title {
  font-family: var(--font-family-heading, 'Inter', sans-serif);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--footer-text-heading);
  text-transform: uppercase;
}

.platform-footer-brand-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--footer-text-body);
  margin: 0;
  max-width: 340px;
}

.platform-footer-brand-sub {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--footer-text-muted);
  margin: 0;
  max-width: 340px;
}

/* TITRES DE COLONNES */
.platform-footer-col-title {
  font-family: var(--font-family-heading, 'Inter', sans-serif);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--footer-text-heading);
  margin: 0 0 18px;
  position: relative;
}

/* LISTES DE LIENS */
.platform-footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.platform-footer-link {
  color: var(--footer-text-body);
  text-decoration: none;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.platform-footer-link:hover {
  color: var(--footer-accent);
  transform: translateX(3px);
}

.platform-footer-link:focus-visible {
  outline: 2px solid var(--footer-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* BADGE STATUS FORMATION */
.platform-footer-badge-active {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34D399;
  border-radius: 9999px;
  margin-left: 6px;
}

/* 4. ENCADRÉ CTA BOUTIQUE DANS LE FOOTER */
.platform-footer-cta-card {
  margin-top: 14px;
  background: var(--footer-bg-surface);
  border: 1px solid var(--footer-border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.platform-footer-cta-lead {
  font-size: 0.82rem;
  color: var(--footer-text-body);
  margin: 0;
  font-weight: 600;
}

.btn-platform-footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--footer-primary);
  color: #FFFFFF !important;
  font-family: var(--font-family-heading, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-platform-footer-cta:hover {
  background: #3B82F6;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

/* 5. SÉPARATEUR HORIZONTAL */
.platform-footer-divider {
  height: 1px;
  background: var(--footer-border);
  border: none;
  margin: 0 0 30px;
}

/* 6. PARTIE BASSE (COPYRIGHT & LÉGAL) */
.platform-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.86rem;
  color: var(--footer-text-muted);
}

.platform-footer-copy {
  margin: 0;
}

.platform-footer-legal-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.platform-footer-legal-link {
  color: var(--footer-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.platform-footer-legal-link:hover {
  color: var(--footer-text-heading);
}

.platform-footer-legal-sep {
  color: rgba(255, 255, 255, 0.15);
}

/* DISCLAIMER MARQUES DÉPOSÉES */
.platform-footer-disclaimer {
  width: 100%;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  line-height: 1.5;
  color: #475569;
}

/* 7. BOUTON FLOTTANT "RETOUR EN HAUT" */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: var(--footer-bg-surface);
  border: 1px solid var(--footer-border);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--footer-primary);
  border-color: var(--footer-primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.scroll-top-btn:focus-visible {
  outline: 2px solid var(--footer-accent);
  outline-offset: 2px;
}

.scroll-top-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 8. RESPONSIVE & MOBILE */
@media (max-width: 1024px) {
  .platform-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
  }
}

@media (max-width: 768px) {
  .platform-footer {
    padding: 50px 0 80px; /* Espace pour la barre sticky mobile */
  }

  .platform-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Ordre mobile strict demandé :
     1. FORMATIONENLIGNE.SITE
     2. EXPLORER
     3. FORMATIONS
     4. INFORMATIONS
     5. CTA
     6. COPYRIGHT */
  .platform-footer-brand-col {
    order: 1;
  }

  .platform-footer-col-explorer {
    order: 2;
  }

  .platform-footer-col-formations {
    order: 3;
  }

  .platform-footer-col-info {
    order: 4;
  }

  .platform-footer-col-cta {
    order: 5;
  }

  .platform-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .platform-footer-legal-nav {
    gap: 12px;
  }

  /* Décaler le bouton retour en haut au-dessus de la barre mobile */
  .scroll-top-btn {
    bottom: 78px;
    right: 18px;
    width: 40px;
    height: 40px;
  }
}

/* 9. PREFERS REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  .platform-footer-link,
  .btn-platform-footer-cta,
  .scroll-top-btn {
    transition: none !important;
    transform: none !important;
  }
}
