/* ============================================================
   factureelectronique.info — Design System
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---- Design Tokens ---- */
:root {
  --bg-primary:      #0f172a;
  --bg-surface:      #1e293b;
  --bg-surface-2:    #263349;
  --accent:          #3b82f6;
  --accent-cyan:     #06b6d4;
  --gradient-accent: linear-gradient(135deg, #3b82f6, #06b6d4);
  --gradient-dark:   linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  --text-primary:    #f8fafc;
  --text-muted:      #94a3b8;
  --text-subtle:     #64748b;
  --light-bg:        #f8fafc;
  --light-surface:   #ffffff;
  --light-text:      #1e293b;
  --light-muted:     #64748b;
  --border:          rgba(255,255,255,0.08);
  --border-light:    rgba(0,0,0,0.08);
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:       0 4px 20px rgba(0,0,0,0.35);
  --shadow-lg:       0 12px 40px rgba(0,0,0,0.45);
  --shadow-glow:     0 0 30px rgba(59,130,246,0.25);
  --radius-sm:       6px;
  --radius-md:       12px;
  --radius-lg:       20px;
  --radius-xl:       28px;
  --transition:      all 0.25s cubic-bezier(0.4,0,0.2,1);
  --nav-height:      72px;
  --max-width:       1280px;
  --content-width:   780px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- Typography Scale ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 800; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); font-weight: 700; }
h4 { font-size: 1.2rem; font-weight: 600; }
p  { color: var(--text-muted); font-size: 1.0625rem; }

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Layout Helpers ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px)  { .container { padding: 0 2rem; } }
@media (min-width: 1280px) { .container { padding: 0 2.5rem; } }

.section { padding: 5rem 0; }
.section--lg { padding: 7rem 0; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav.scrolled {
  background: rgba(15, 23, 42, 0.97);
  box-shadow: var(--shadow-md);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 2rem;
}

.nav__logo {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  flex-shrink: 0;
}

.nav__logo span { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__links a {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.07);
}

.nav__cta {
  flex-shrink: 0;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav__hamburger:hover { background: rgba(255,255,255,0.07); }

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: rgba(15,23,42,0.98);
  backdrop-filter: blur(20px);
  padding: 1.5rem 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  gap: 0.5rem;
  z-index: 999;
}

.nav__mobile.open { display: flex; }

.nav__mobile a {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav__mobile a:hover { color: var(--text-primary); background: rgba(255,255,255,0.07); }
.nav__mobile .btn { margin-top: 0.75rem; width: 100%; }

@media (max-width: 767px) {
  .nav__links, .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  text-align: center;
  justify-content: center;
  letter-spacing: -0.01em;
}

.btn--primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(59,130,246,0.4);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59,130,246,0.5);
  filter: brightness(1.08);
}

.btn--primary:active { transform: translateY(0); }

.btn--outline {
  border: 1.5px solid rgba(255,255,255,0.25);
  color: var(--text-primary);
  background: transparent;
}

.btn--outline:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--accent);
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
}

.btn--ghost:hover {
  background: rgba(59,130,246,0.18);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 0.95rem 2.1rem;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
  background: var(--bg-primary);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 85% 50%, rgba(6,182,212,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 0 3rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.3);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.825rem;
  font-weight: 600;
  color: #60a5fa;
  margin-bottom: 1.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero__badge::before {
  content: '';
  width: 7px; height: 7px;
  background: #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.3);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(59,130,246,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(59,130,246,0.1); }
}

.hero__title {
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-subtle);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: bounce-scroll 2.5s ease-in-out infinite;
}

.hero__scroll::after {
  content: '';
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

@keyframes bounce-scroll {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   STATS / SOCIAL PROOF
   ============================================================ */
.stats {
  padding: 4rem 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat__number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  display: block;
}

.stat__label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-weight: 500;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding: 0.3rem 0.9rem;
  background: rgba(59,130,246,0.1);
  border-radius: 50px;
  border: 1px solid rgba(59,130,246,0.2);
}

.section-header h2 { margin-bottom: 1rem; }

.section-header p {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.0625rem;
  color: var(--text-muted);
}

/* Light section header variant */
.section-header--light h2,
.section-header--light .section-header__eyebrow { color: var(--light-text); }
.section-header--light .section-header__eyebrow { background: rgba(59,130,246,0.1); color: var(--accent); }
.section-header--light p { color: var(--light-muted); }

/* ============================================================
   FEATURE CARDS
   ============================================================ */
.features { background: var(--bg-primary); }

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59,130,246,0.3);
  box-shadow: var(--shadow-glow);
}

.feature-card:hover::before { opacity: 1; }

.feature-card__icon {
  width: 52px; height: 52px;
  background: rgba(59,130,246,0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  transition: var(--transition);
  border: 1px solid rgba(59,130,246,0.15);
}

.feature-card:hover .feature-card__icon {
  background: rgba(59,130,246,0.2);
  transform: scale(1.1);
}

.feature-card h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.925rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ============================================================
   HOW IT WORKS / STEPS
   ============================================================ */
.steps { background: var(--bg-surface); }

.steps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  position: relative;
}

.steps__grid::before {
  content: '';
  position: absolute;
  top: 2.5rem;
  left: calc(16.67% + 1.5rem);
  right: calc(16.67% + 1.5rem);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
  opacity: 0.3;
}

@media (max-width: 767px) { .steps__grid::before { display: none; } }

.step-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59,130,246,0.25);
}

.step-card__number {
  width: 56px; height: 56px;
  background: var(--gradient-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 20px rgba(59,130,246,0.4);
}

.step-card h3 { color: var(--text-primary); margin-bottom: 0.75rem; font-size: 1.15rem; }
.step-card p  { font-size: 0.925rem; color: var(--text-muted); }

/* ============================================================
   TIMELINE SECTION
   ============================================================ */
.timeline { background: var(--bg-primary); overflow: hidden; }

.timeline__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 767px) { .timeline__inner { grid-template-columns: 1fr; gap: 2.5rem; } }

.timeline__content h2 { margin-bottom: 1rem; }
.timeline__content p  { margin-bottom: 2rem; font-size: 1.0625rem; }

.timeline__list { display: flex; flex-direction: column; gap: 0; }

.timeline__item {
  display: flex;
  gap: 1.25rem;
  position: relative;
  padding-bottom: 2rem;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, rgba(59,130,246,0.5), rgba(6,182,212,0.1));
}

.timeline__item:last-child::before { display: none; }

.timeline__dot {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 0 6px rgba(59,130,246,0.1);
  position: relative;
  z-index: 1;
}

.timeline__text strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.timeline__text span {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.timeline__text p { font-size: 0.875rem; color: var(--text-muted); }

.timeline__visual {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
}

.timeline__visual h4 {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.8rem;
}

.timeline__phases { display: flex; flex-direction: column; gap: 1.25rem; }

.phase {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
}

.phase:hover { border-color: rgba(59,130,246,0.3); }

.phase__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.phase__title { font-size: 0.9375rem; font-weight: 700; color: var(--text-primary); }

.phase__badge {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.phase__badge--soon    { background: rgba(239,68,68,0.15);  color: #f87171; }
.phase__badge--prep    { background: rgba(245,158,11,0.15); color: #fbbf24; }
.phase__badge--active  { background: rgba(34,197,94,0.15);  color: #4ade80; }

.phase__bar-track {
  height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 50px;
  overflow: hidden;
}

.phase__bar {
  height: 100%;
  border-radius: 50px;
  background: var(--gradient-accent);
  transition: width 1s ease;
}

.phase__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding: 6rem 0;
  background: var(--gradient-dark);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section__content { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.cta-section h2 { color: var(--text-primary); margin-bottom: 1rem; }
.cta-section p  { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 2.5rem; }

.cta-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #080e1a;
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 1023px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 639px) {
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer__brand .nav__logo {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer__brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.footer__socials { display: flex; gap: 0.75rem; }

.footer__social-link {
  width: 38px; height: 38px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer__social-link:hover {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.3);
  color: var(--accent);
}

.footer__col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1.25rem;
}

.footer__col ul { display: flex; flex-direction: column; gap: 0.6rem; }

.footer__col ul a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer__col ul a:hover { color: var(--text-primary); }
.footer__col ul a:hover::before { content: '→'; font-size: 0.75rem; }

.footer__bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copyright { font-size: 0.85rem; color: var(--text-subtle); }

.footer__bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer__bottom-links a {
  font-size: 0.85rem;
  color: var(--text-subtle);
  transition: var(--transition);
}

.footer__bottom-links a:hover { color: var(--text-muted); }

/* ============================================================
   FAQ PAGE
   ============================================================ */
.page-hero {
  padding: calc(var(--nav-height) + 3.5rem) 0 3.5rem;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,0.15) 0%, transparent 65%);
  pointer-events: none;
}

.page-hero__content { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: 1rem; }
.page-hero p  { font-size: 1.125rem; color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-bottom: 1.5rem;
  justify-content: center;
}

.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--text-subtle); }

/* FAQ Section */
.faq-section { background: var(--bg-primary); }

.faq-container {
  max-width: 860px;
  margin: 0 auto;
}

.faq-category {
  margin-bottom: 3rem;
}

.faq-category__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.faq-category__title span {
  width: 32px; height: 32px;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover { border-color: rgba(59,130,246,0.25); }

.faq-item.open { border-color: rgba(59,130,246,0.35); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  text-align: left;
  gap: 1rem;
  transition: var(--transition);
}

.faq-question:hover { background: var(--bg-surface-2); }
.faq-item.open .faq-question { background: var(--bg-surface-2); }

.faq-question span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
}

.faq-icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  background: rgba(59,130,246,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  transition: var(--transition);
}

.faq-item.open .faq-icon { background: rgba(59,130,246,0.2); transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), padding 0.3s ease;
  background: var(--bg-primary);
}

.faq-item.open .faq-answer { max-height: 800px; }

.faq-answer__inner {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

.faq-answer__inner p {
  font-size: 0.9625rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.faq-answer__inner p + p { margin-top: 1rem; }

.faq-answer__inner strong { color: var(--text-primary); }

.faq-answer__inner ul {
  margin-top: 0.75rem;
  list-style: disc;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.faq-answer__inner ul li { font-size: 0.9375rem; color: var(--text-muted); }

/* ============================================================
   BLOG
   ============================================================ */
.blog-layout {
  padding: 4rem 0 6rem;
  background: var(--light-bg);
}

.blog-grid-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 1023px) { .blog-grid-container { grid-template-columns: 1fr; } }

.blog-cards { display: flex; flex-direction: column; gap: 2rem; }

.blog-card {
  background: var(--light-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: grid;
  grid-template-columns: 280px 1fr;
}

@media (max-width: 767px) { .blog-card { grid-template-columns: 1fr; } }

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(59,130,246,0.25);
}

.blog-card__image {
  aspect-ratio: 4/3;
  background: var(--gradient-dark);
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

.blog-card__image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.4;
}

.blog-card__body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}

.blog-card__category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
}

.blog-card__date { font-size: 0.82rem; color: var(--light-muted); }
.blog-card__reading { font-size: 0.82rem; color: var(--light-muted); }

.blog-card h2 {
  font-size: 1.25rem;
  color: var(--light-text);
  margin-bottom: 0.75rem;
  line-height: 1.3;
  font-weight: 700;
}

.blog-card p {
  font-size: 0.925rem;
  color: var(--light-muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1.5rem;
}

.blog-card .btn--ghost { align-self: flex-start; }

/* Sidebar */
.blog-sidebar { display: flex; flex-direction: column; gap: 2rem; }

.sidebar-widget {
  background: var(--light-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--light-text);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(59,130,246,0.2);
}

.sidebar-categories { display: flex; flex-direction: column; gap: 0.5rem; }

.sidebar-categories a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--light-muted);
  transition: var(--transition);
  font-weight: 500;
}

.sidebar-categories a:hover {
  background: rgba(59,130,246,0.07);
  color: var(--accent);
}

.sidebar-categories span {
  font-size: 0.75rem;
  background: var(--light-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  color: var(--light-muted);
}

.recent-posts { display: flex; flex-direction: column; gap: 1rem; }

.recent-post {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.recent-post:last-child { border-bottom: none; padding-bottom: 0; }

.recent-post__thumb {
  width: 64px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--gradient-dark);
  flex-shrink: 0;
}

.recent-post__info a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--light-text);
  line-height: 1.4;
  display: block;
  margin-bottom: 0.3rem;
  transition: var(--transition);
}

.recent-post__info a:hover { color: var(--accent); }
.recent-post__info span   { font-size: 0.78rem; color: var(--light-muted); }

.newsletter-widget {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.newsletter-widget h3 { color: var(--text-primary); border-color: rgba(59,130,246,0.25); }
.newsletter-widget p  { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.25rem; }

.newsletter-form { display: flex; flex-direction: column; gap: 0.75rem; }

.newsletter-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.newsletter-form input::placeholder { color: var(--text-subtle); }
.newsletter-form input:focus { border-color: var(--accent); }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-layout {
  background: var(--light-bg);
  padding: 3rem 0 6rem;
}

.article-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

@media (max-width: 1023px) { .article-container { grid-template-columns: 1fr; } }

/* Article Header (dark) */
.article-hero {
  padding: calc(var(--nav-height) + 3rem) 0 3rem;
  background: var(--gradient-dark);
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 40% -10%, rgba(59,130,246,0.2) 0%, transparent 65%);
}

.article-hero__content { position: relative; z-index: 1; max-width: var(--content-width); }

.article-hero__category {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.2);
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
}

.article-hero h1 { color: var(--text-primary); margin-bottom: 1rem; }

.article-hero__meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.article-hero__meta span {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.article-hero__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.article-hero__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* Article Content */
.article {
  background: var(--light-surface);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

@media (max-width: 639px) { .article { padding: 1.75rem; } }

.article-toc {
  background: var(--light-bg);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.article-toc h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--light-muted);
  margin-bottom: 1rem;
}

.article-toc ol {
  list-style: decimal;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.article-toc ol li a {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  transition: var(--transition);
}

.article-toc ol li a:hover { text-decoration: underline; }

.article h2 {
  font-size: 1.6rem;
  color: var(--light-text);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(59,130,246,0.15);
}

.article h3 {
  font-size: 1.2rem;
  color: var(--light-text);
  margin: 1.75rem 0 0.75rem;
}

.article h4 {
  font-size: 1.05rem;
  color: var(--light-text);
  margin: 1.5rem 0 0.5rem;
}

.article p {
  font-size: 1rem;
  color: #374151;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.article p:last-child { margin-bottom: 0; }

.article a { color: var(--accent); text-decoration: underline; }
.article a:hover { color: #2563eb; }

.article ul, .article ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.article ul { list-style: disc; }
.article ol { list-style: decimal; }

.article li { font-size: 1rem; color: #374151; line-height: 1.75; }

.article strong { color: var(--light-text); font-weight: 700; }

.article em { font-style: italic; color: var(--light-muted); }

.article blockquote {
  border-left: 4px solid var(--accent);
  background: rgba(59,130,246,0.05);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.75rem 0;
}

.article blockquote p {
  color: var(--light-text);
  font-size: 1.05rem;
  font-style: italic;
  margin: 0;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.9375rem;
  overflow-x: auto;
  display: block;
}

.article table th {
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
}

.article table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: #374151;
}

.article table tr:hover td { background: rgba(59,130,246,0.03); }

.article-callout {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

.article-callout p { color: var(--light-text); margin: 0; }

.article-callout--warning {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.25);
}

.article-callout--success {
  background: rgba(34,197,94,0.07);
  border-color: rgba(34,197,94,0.2);
}

.article-faq { margin-top: 2.5rem; }
.article-faq .faq-item { background: var(--light-surface); }
.article-faq .faq-question { background: var(--light-bg); }
.article-faq .faq-question:hover { background: #f1f5f9; }
.article-faq .faq-question span { color: var(--light-text); }
.article-faq .faq-answer { background: var(--light-surface); }
.article-faq .faq-answer__inner { border-color: var(--border-light); }
.article-faq .faq-item.open { border-color: rgba(59,130,246,0.3); }
.article-faq .faq-item.open .faq-question { background: #eff6ff; }

/* Article Sidebar */
.article-sidebar { display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: calc(var(--nav-height) + 2rem); }

.article-nav-widget {
  background: var(--light-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.article-nav-widget h4 {
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--light-muted);
  margin-bottom: 1rem;
}

.article-nav-widget ol {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.article-nav-widget ol li a {
  font-size: 0.875rem;
  color: var(--light-muted);
  transition: var(--transition);
  display: block;
  padding: 0.3rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  line-height: 1.45;
}

.article-nav-widget ol li a:hover { color: var(--accent); border-color: var(--accent); }

.related-articles { background: var(--light-surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 1.5rem; }
.related-articles h4 { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--light-muted); margin-bottom: 1rem; }
.related-articles ul { display: flex; flex-direction: column; gap: 0.875rem; }
.related-articles ul li a {
  font-size: 0.875rem;
  color: var(--light-text);
  font-weight: 600;
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  line-height: 1.4;
}
.related-articles ul li:last-child a { border-bottom: none; }
.related-articles ul li a:hover { color: var(--accent); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1), transform 0.65s cubic-bezier(0.4,0,0.2,1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in--delay-1 { transition-delay: 0.1s; }
.fade-in--delay-2 { transition-delay: 0.2s; }
.fade-in--delay-3 { transition-delay: 0.3s; }
.fade-in--delay-4 { transition-delay: 0.4s; }
.fade-in--delay-5 { transition-delay: 0.5s; }

/* ============================================================
   UTILITIES
   ============================================================ */
.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;
}

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Light page body override */
.light-page { background: var(--light-bg); }
.light-page .page-hero { background: var(--bg-primary); }

/* Pill tag */
.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--accent);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-surface-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* ============================================================
   SELECTION
   ============================================================ */
::selection { background: rgba(59,130,246,0.3); color: var(--text-primary); }
