/* ================================================================
   FORMATIONS-ENTREPRENEUR.FR — BASE.CSS
   Feuille de style GLOBALE — à charger sur TOUTES les pages du site.
   Contient : variables, reset, header/nav, boutons, section commune,
   FAQ accordion, footer, utilitaires, curseur magique.

   Ne pas mettre ici : hero, about, offres, cartes formations, process,
   témoignages, CTA — ces blocs sont spécifiques à la home et vivent
   dans accueil/style.css (ou le style.css propre à chaque page qui
   les réutilise).

   FONTS (à mettre dans le <head> de CHAQUE page) :
   <link rel="preconnect" href="https://fonts.googleapis.com" />
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
   <link href="https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap" rel="stylesheet" />
================================================================ */

/* ============================================================
   CURSEUR MAGIQUE — Couleurs site #3fb9bd / #1168b8
============================================================ */

#magic-cursor {
  position: fixed;
  top: 0;
  left: 0;

  width: 22px;
  height: 22px;

  background-color: #3fb9bd;
  border-radius: 50%;

  pointer-events: none;
  z-index: 99999;

  mix-blend-mode: multiply;

  /* Centrage exact sur le pointeur */
  transform: translate3d(-50%, -50%, 0);

  /* On anime uniquement les propriétés visuelles */
  transition:
    width 0.2s cubic-bezier(0.23, 1, 0.32, 1),
    height 0.2s cubic-bezier(0.23, 1, 0.32, 1),
    opacity 0.15s ease,
    background-color 0.15s ease;

  will-change: left, top, width, height;

  display: none;

  box-shadow: 0 0 0 0 rgba(63, 185, 189, 0.4);
}

/* Curseur uniquement sur les appareils avec vraie souris */
@media (pointer: fine) {
  #magic-cursor {
    display: block;
  }

  body,
  a,
  button,
  [role="button"] {
    cursor: none;
  }
}

#magic-cursor.active {
  width: 56px;
  height: 56px;

  opacity: 0.6;
  background-color: #1168b8;
}

#magic-cursor.pulse {
  animation: cursorPulse 0.35s ease forwards;
}

@keyframes cursorPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(63, 185, 189, 0.5);
  }

  100% {
    box-shadow: 0 0 0 18px rgba(63, 185, 189, 0);
  }
}


/* ============================================================
   VARIABLES & RESET
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal: #3fb9bd;
  --teal-light: #d6f5f6;
  --teal-dark: #2a9da1;
  --blue: #1168b8;
  --blue-dark: #0d4f8a;
  --ink: #0d1117;
  --ink-soft: #1f2937;
  --muted: #6b7280;
  --bg: #f7fafa;
  --white: #ffffff;
  --card: #ffffff;
  --border: rgba(63,185,189,0.15);
  --radius: 18px;
  --radius-sm: 10px;
  --shadow-card: 0 4px 30px rgba(17,104,184,0.08);
  --shadow-hover: 0 16px 50px rgba(63,185,189,0.22);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink-soft);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ============================================================
   HEADER / NAV — identique sur toutes les pages
============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247,250,250,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(63,185,189,0.12);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 20px; height: 20px; fill: #fff; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.2;
}
.logo-text span { color: var(--teal); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover {
  background: var(--teal-light);
  color: var(--teal-dark);
}
.nav-links a.active {
  background: var(--teal-light);
  color: var(--teal-dark);
  font-weight: 600;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hamburger { display: none; }

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
  }
  .hamburger span {
    display: block;
    width: 26px; height: 2.5px;
    background: var(--ink-soft);
    border-radius: 4px;
    transition: all 0.3s;
  }
}

/* ============================================================
   BOUTONS — communs à tout le site
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  border: none;
  border-radius: 50px;
  padding: 0.55rem 1.35rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: none;
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--teal);
  color: var(--teal-dark);
}
.btn-outline:hover {
  background: var(--teal-light);
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(135deg, var(--teal), #2aa8ac);
  color: #fff;
  box-shadow: 0 4px 16px rgba(63,185,189,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(63,185,189,0.45);
}
.btn-blue {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(17,104,184,0.3);
}
.btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(17,104,184,0.4);
}
.btn-ghost {
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: #fff;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

/* ============================================================
   EN-TÊTE DE SECTION — réutilisé sur presque toutes les pages
   (hub de catégorie, page formation, article...)
============================================================ */
section {
  padding: clamp(60px, 8vw, 100px) clamp(1.5rem, 6vw, 5rem);
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal-dark);
  background: rgba(63,185,189,0.1);
  border-radius: 50px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 3rem;
}

/* ============================================================
   FAQ ACCORDION — réutilisable sur pages formations / articles
============================================================ */
.faq-section {
  background: var(--white);
  border-top: 1px solid var(--border);
}
.faq-wrap {
  max-width: 760px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.3rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: none;
  transition: color 0.2s;
}
.faq-q:hover { color: var(--teal-dark); }
.faq-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  transition: transform 0.3s, background 0.3s;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--teal);
  color: #fff;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.23,1,0.32,1), padding 0.3s;
}
.faq-item.open .faq-answer { max-height: 500px; }
.faq-answer-inner {
  padding-bottom: 1.3rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}
.faq-answer-inner a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   FOOTER — identique sur toutes les pages
============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: 3rem clamp(1.5rem, 6vw, 5rem);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
}
.footer-logo span { color: var(--teal); }
.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--teal); }
.footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  width: 100%;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

/* ============================================================
   UTILITAIRES — animation d'apparition au scroll
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.23,1,0.32,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* TABLES — fallback pour tout <table> nu (guides, comparatifs, avis sans classe) */
table{width:100%;border-collapse:collapse;margin:24px 0;font-size:.92rem;overflow:hidden;border-radius:var(--radius)}
th,td{border:1px solid var(--border);padding:12px 14px;text-align:left;vertical-align:top}
th{background:var(--ink);color:var(--white);font-weight:700}
tr:nth-child(even) td{background:var(--bg)}


/* ── MENU DÉROULANT (dropdown) ── */
.nav-links .has-dropdown { position: relative; }
.nav-links .caret { font-size: 0.7rem; margin-left: 0.25rem; }
.nav-links .dropdown {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(13,17,23,0.14);
  padding: 0.5rem;
  list-style: none;
  z-index: 1001;
}
.nav-links .has-dropdown:hover .dropdown { display: block !important; }
.nav-links .dropdown li a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 0.86rem;
}
.nav-links .dropdown li a:hover { background: var(--teal-light); color: var(--teal-dark); }


/* ── ACCORDÉONS (details/summary) ── */
details { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 1rem; background: var(--white); overflow: hidden; }
summary { cursor: pointer; list-style: none; padding: 1.1rem 3rem 1.1rem 1.4rem; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "▾"; position: absolute; right: 1.4rem; top: 50%; transform: translateY(-50%); font-size: 1rem; color: var(--teal); transition: transform 0.25s ease; }
details[open] summary::after { transform: translateY(-50%) rotate(180deg); }
summary h1, summary h2, summary h3, summary h4 { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--ink); }
summary:hover h1, summary:hover h2, summary:hover h3, summary:hover h4 { color: var(--teal-dark); }
details[open] summary { border-bottom: 1px solid var(--border); }
details[open] > :not(summary) { padding: 0 1.4rem 1.2rem; }
