/* ═══════════════════════════════════════════════════════════
   NCF — styles partagés (navbar, bandeau Novances, sections,
   boutons, footer, reveal). Spécificités page = inline <style>.
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   TOKENS SÉMANTIQUES — Palette Institutionnel clair v2
   Fond ivoire bleuté, texte navy, accent bleu marine profond.
   Cible : sérieux, posé, légèrement chaleureux.
   ═══════════════════════════════════════════════════════════ */
:root {
  /* ── 1. Fondations (page surfaces) — 4 niveaux de hiérarchie ── */
  --bg-base:       #EAF0F8;      /* fond principal — bleu pâle assumé */
  --bg-deep:       #D6DFEC;      /* niveau bas (footer) */
  --bg-elevated:   #F4F7FC;      /* sections "elevated" */
  --bg-mid:        #FFFFFF;      /* cartes blanches */
  --bg-high:       #FFFFFF;
  --bg-higher:     #E0E8F3;      /* highlight surface */

  /* Cartes — gradient top blanc / bottom légèrement bleuté */
  --card-bg:       linear-gradient(160deg, #FFFFFF 0%, #ECF1F9 100%);
  --card-bg-strong:linear-gradient(160deg, #FFFFFF 0%, #E2EAF5 100%);
  --card-bg-soft:  linear-gradient(160deg, #FBFCFE 0%, #ECF1F9 100%);

  /* Surfaces (overlays sombres sur clair) */
  --surface-low:   rgba(15, 23, 42, 0.035);
  --surface-mid:   rgba(15, 23, 42, 0.06);
  --surface-high:  rgba(15, 23, 42, 0.09);
  --surface-strong:rgba(15, 23, 42, 0.14);

  /* Scrims — voiles sur images / overlays */
  --scrim-1: rgba(10, 31, 61, 0.10);
  --scrim-2: rgba(10, 31, 61, 0.18);
  --scrim-3: rgba(10, 31, 61, 0.06);

  /* ── 2. Bordures / séparateurs ── */
  --line-1: rgba(15, 23, 42, 0.07);
  --line-2: rgba(15, 23, 42, 0.13);
  --line-3: rgba(15, 23, 42, 0.20);
  --line-4: rgba(15, 23, 42, 0.28);
  --line-5: rgba(15, 23, 42, 0.38);

  /* ── 3. Texte — hiérarchie 4 niveaux, tous ≥ AA ── */
  --text-strong:  #061838;       /* titres */
  --text-1:       #182747;       /* paragraphes */
  --text-2:       #3A4A6B;       /* secondaires */
  --text-3:       #586A8A;       /* tertiaires / muted */
  --text-on-accent: #FFFFFF;     /* texte sur surface accent (CTA) */

  /* ── 4. Accent principal — Cyan azur ── */
  --accent:        #0EA5E9;       /* CTA base */
  --accent-bright: #38BDF8;       /* hover + eyebrows */
  --accent-soft:   #BAE6FD;
  --accent-deep:   #0284C7;
  --accent-deeper: #0369A1;       /* texte/CTA accessibles : ≥4.5:1 sur blanc (WCAG AA) */
  --accent-ink:    #075985;       /* état hover des CTA accessibles */

  /* Alphas d'accent (glows / tints) */
  --accent-a-04: rgba(14, 165, 233, 0.06);
  --accent-a-06: rgba(14, 165, 233, 0.09);
  --accent-a-08: rgba(14, 165, 233, 0.11);
  --accent-a-10: rgba(14, 165, 233, 0.13);
  --accent-a-12: rgba(14, 165, 233, 0.16);
  --accent-a-15: rgba(14, 165, 233, 0.19);
  --accent-a-18: rgba(14, 165, 233, 0.22);
  --accent-a-22: rgba(14, 165, 233, 0.26);
  --accent-a-25: rgba(14, 165, 233, 0.30);
  --accent-a-30: rgba(14, 165, 233, 0.35);
  --accent-a-35: rgba(14, 165, 233, 0.40);
  --accent-a-40: rgba(14, 165, 233, 0.46);

  /* ── 5. Brand secondaire (violet) ── */
  --violet:       #532EFB;
  --violet-soft:  rgba(83, 46, 251, 0.16);
  --violet-tint:  rgba(83, 46, 251, 0.06);
  --magenta: #EC4899;
  --green:   #22C55E;

  /* ── 6. Cas d'usage (hues distincts par offre, utilisés dans /ressources) ── */
  --c-succession: #F59E0B;
  --c-litiges:    #532EFB;
  --c-croissance: #10B981;

  /* ── 6b. Personas — famille de bleus froids (cohérence cartes + pages) ── */
  --p-entrepreneur: #2563EB; --p-entrepreneur-soft: rgba(37, 99, 235, 0.14);  --p-entrepreneur-tint: rgba(37, 99, 235, 0.06);
  --p-ec:           #0EA5E9; --p-ec-soft:           rgba(14, 165, 233, 0.14); --p-ec-tint:           rgba(14, 165, 233, 0.06);
  --p-avocat:       #4F46E5; --p-avocat-soft:       rgba(79, 70, 229, 0.14);  --p-avocat-tint:       rgba(79, 70, 229, 0.06);
  --p-notaire:      #1E40AF; --p-notaire-soft:      rgba(30, 64, 175, 0.14);  --p-notaire-tint:      rgba(30, 64, 175, 0.06);

  /* ── 7. Chrome (navbar, band, mob-menu, logo) ── */
  --navbar-bg:        rgba(234, 240, 248, 0.85);
  --navbar-bg-scroll: rgba(234, 240, 248, 0.96);
  --band-bg:          rgba(6, 24, 56, 0.97);
  --band-text:        rgba(255, 255, 255, 0.94);
  --band-text-strong: #FFFFFF;
  --band-text-dim:    rgba(255, 255, 255, 0.74);
  --mob-menu-bg:      rgba(234, 240, 248, 0.98);
  --logo-filter:      none;

  /* ── 8. ALIAS LEGACY (rétrocompat — pointent sur les tokens) ── */
  --navy-deep: var(--bg-base);
  --navy:      var(--bg-mid);
  --navy-mid:  var(--bg-high);
  --navy-2:    var(--bg-higher);
  --cyan:        var(--accent);
  --cyan-bright: var(--accent-bright);
  --cyan-soft:   var(--accent-soft);
  --blue:        var(--accent);
  --blue-d:      var(--accent-deep);
  --ink:     var(--text-1);
  --ink-dim: var(--text-2);
  --muted:   var(--text-3);
  --surface-1: var(--card-bg);
  --surface-2: var(--card-bg-strong);
  --border:        var(--line-2);
  --border-strong: var(--line-3);
  --glow:          var(--accent-a-30);
  --gl: var(--navy);
  --gm: var(--ink-dim);
  --gd: var(--ink);

  /* Fonts */
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg-base); }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-1);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 900px 700px at 15% 15%, var(--accent-a-06) 0%, transparent 55%),
    radial-gradient(ellipse 700px 500px at 85% 85%, var(--violet-tint) 0%, transparent 55%);
  z-index: 0; pointer-events: none;
}
body > * { position: relative; z-index: 1; }

::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--surface-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-a-35); }

/* ─────────── NAVBAR (glass) ─────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: var(--navbar-bg, rgba(5, 13, 29, 0.7));
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
#navbar.scrolled {
  background: var(--navbar-bg-scroll, rgba(5, 13, 29, 0.88));
  box-shadow: 0 8px 32px -12px rgba(0, 0, 0, 0.6);
}

.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.nav-logo {
  flex-shrink: 0;
  display: inline-flex; flex-direction: column; align-items: flex-start;
  gap: 3px; text-decoration: none; line-height: 1;
}
.nav-logo-mark { height: 32px; width: auto; display: block; filter: var(--logo-filter, none); }

.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
  position: relative;
  padding: 6px 0;
}
.nav-link:hover, .nav-link.active { color: var(--text-strong); }
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--accent);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}
.nav-link:hover::after { opacity: 1; }
/* Au survol, le soulignement prend la couleur de la page de destination (= sa couleur une fois active). */
.nav-link[href="/entrepreneurs/"]:hover::after      { background: var(--p-entrepreneur); }
.nav-link[href="/experts-comptables/"]:hover::after { background: var(--p-ec); }
.nav-link[href="/avocats/"]:hover::after            { background: var(--p-avocat); }
.nav-link[href="/notaires/"]:hover::after           { background: var(--p-notaire); }
.nav-link.active::after {
  opacity: 1;
  box-shadow: 0 0 8px var(--accent-a-30);
}

.nav-cta {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px; background: var(--accent-deeper); color: var(--text-on-accent);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  text-decoration: none; border-radius: 8px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
  box-shadow: 0 0 0 1px var(--accent-bright), 0 6px 24px -6px var(--accent-a-30);
}
.nav-cta:hover {
  background: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--accent-bright), 0 10px 32px -6px var(--accent-a-30);
}

/* Hamburger */
#hbg { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
#hbg span { display: block; width: 22px; height: 1.5px; background: var(--text-1); transition: transform 0.3s, opacity 0.3s; }

#mob-menu {
  display: none; position: fixed; inset: 0; top: 68px;
  background: var(--mob-menu-bg, rgba(5, 13, 29, 0.97));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 199;
  flex-direction: column; align-items: center; justify-content: flex-start; gap: 1.2rem;
  padding: 1.5rem 1rem 2rem;
  border-top: 1px solid var(--border);
}
#mob-menu.open { display: flex; }
#mob-menu a { font-size: 1.05rem; font-weight: 500; color: var(--text-1); text-decoration: none; }
#mob-menu a:hover { color: var(--accent-bright); }

@media (max-width: 980px) {
  #hbg { display: flex; }
  .nav-links, .nav-cta-wrap { display: none !important; }
}

/* Compense la hauteur navbar pour les ancres */
:target { scroll-margin-top: 80px; }

/* Focus clavier visible (a11y) */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible,
.nav-cta:focus-visible, .btn-primary:focus-visible, .btn-outline:focus-visible, .btn-ghost:focus-visible, .nav-link:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ─────────── SECTION DE BASE ─────────── */
.section { padding: 5rem 0; position: relative; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.section-eyebrow {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 8px;
}
.section-eyebrow::before {
  content: ''; width: 22px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  display: inline-block;
}
.section-title {
  font-size: clamp(1.55rem, 2.6vw, 2.3rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.025em;
  color: var(--text-strong);
}
.section-sub {
  font-size: 0.95rem; color: var(--text-2); line-height: 1.75; margin-top: 0.875rem; max-width: 560px;
}

/* ─────────── BOUTONS ─────────── */
.btn-primary, .btn-outline, .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.03em;
  text-decoration: none; border-radius: 8px;
  transition: background 0.2s, transform 0.15s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  cursor: pointer; border: none; font-family: inherit; white-space: nowrap;
}
.btn-primary {
  background: var(--accent-deeper); color: var(--text-on-accent);
  box-shadow: 0 0 0 1px var(--accent-bright), 0 8px 28px -8px var(--accent-a-30);
}
.btn-primary:hover {
  background: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--accent-bright), 0 12px 36px -8px var(--accent-a-30);
}

/* Effet magnétique sur les CTAs (markup .btn-magnetic > .btn-content, animé par site.js) */
.btn-magnetic {
  will-change: transform;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), background 0.2s;
}
.btn-magnetic .btn-content {
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}

.btn-outline {
  background: var(--surface-low);
  color: var(--text-1);
  border: 1px solid var(--line-2);
}
.btn-outline:hover {
  background: var(--surface-mid);
  border-color: var(--line-3);
  color: var(--text-strong);
}

.btn-ghost { background: transparent; color: var(--text-1); padding: 10px 0; }
.btn-ghost:hover { color: var(--accent-bright); }
.btn-ghost svg { transition: transform 0.2s; }
.btn-ghost:hover svg { transform: translateX(3px); }

/* ─────────── REVEAL ON SCROLL ─────────── */
.rv { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: 0.08s; }
.rv.d2 { transition-delay: 0.16s; }
.rv.d3 { transition-delay: 0.24s; }
.rv.d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
}

/* ─────────── FOOTER (glass) ─────────── */
.footer {
  background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-deep) 100%);
  color: var(--text-2);
  padding: 4rem 0 1.5rem;
  margin-top: 0;
  border-top: 1px solid var(--line-2);
  position: relative;
}
.footer::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(1200px 400px at 50% 0%, var(--accent-a-04) 0%, transparent 60%);
  pointer-events: none;
}
.footer > * { position: relative; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 3rem;
  padding-bottom: 3rem; border-bottom: 1px solid var(--line-3);
}
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
@media (max-width: 540px) { .footer-top { grid-template-columns: 1fr; gap: 2rem; } }

.footer-brand img { height: 28px; filter: var(--logo-filter, brightness(0) invert(1)); margin-bottom: 1rem; }
.footer-brand-tag {
  font-size: 0.85rem; line-height: 1.7; color: var(--text-2);
  max-width: 320px;
}
/* Affiliation Moore Global (sous le séparateur porté par le bas de .footer-brand-tag). */
.footer-brand-tag { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line-2); }
.footer-novances {
  margin-top: 1.25rem;
  display: inline-flex; flex-direction: column; align-items: flex-start;
  width: 100%; gap: 8px;
  font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-3);
}
.footer-novances strong { color: var(--text-strong); font-weight: 600; }
.footer-novances img {
  height: 22px; width: auto; display: block;
  filter: var(--logo-filter, brightness(0) invert(1));
  opacity: 0.9; margin-bottom: 0;
}

.footer-col-title {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-strong); margin-bottom: 1rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.625rem; }
.footer-link {
  font-size: 0.85rem; color: var(--text-2); text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent-bright); }

.footer-bottom {
  margin-top: 2rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-size: 0.78rem; color: var(--text-3); }
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal a { font-size: 0.78rem; color: var(--text-3); text-decoration: none; }
.footer-legal a:hover { color: var(--accent-bright); }

/* Mobile baseline shared across the static pages */
@media (max-width: 640px) {
  body { font-size: 15px; }

  .nav-inner {
    height: 62px;
    padding: 0 1rem;
  }

  .nav-logo-mark {
    height: 28px;
  }

  #mob-menu {
    top: 62px;
    gap: 1.1rem;
    padding: 1.5rem 1rem 2rem;
    overflow-y: auto;
  }

  #mob-menu a {
    width: min(320px, 100%);
    max-width: 100%;
    text-align: center;
    font-size: 1rem;
  }

  #mob-menu .nav-cta {
    justify-content: center;
  }

  :target {
    scroll-margin-top: 72px;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-inner,
  .footer-inner,
  .article-wrap,
  .article-layout,
  .legal-wrap {
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
  }

  .section-title {
    font-size: clamp(1.35rem, 7vw, 1.9rem);
  }

  .section-sub {
    max-width: 100%;
    font-size: 0.92rem;
  }

  .section-eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
  }

  .btn-primary,
  .btn-outline,
  .btn-ghost,
  .nav-cta {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    padding: 12px 18px;
  }

  .btn-ghost {
    width: auto;
  }

  .footer {
    padding-top: 3rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal {
    flex-wrap: wrap;
    gap: 0.85rem;
  }

  .legal-hero {
    padding: 116px 0 3rem !important;
  }

  .legal-content {
    padding-bottom: 4rem !important;
  }

  .legal-section {
    padding: 1.6rem 0 !important;
  }
}

@media (max-width: 380px) {
  .section-inner,
  .footer-inner,
  .article-wrap,
  .article-layout,
  .legal-wrap {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .btn-primary,
  .btn-outline {
    font-size: 0.78rem;
    padding: 11px 14px;
  }
}
