/* ══════════════════════════════════════════════════════════════════════════
   CGV EXPRESS — Design System v2
   Inspiration: Linear, Notion, Raycast, Vercel
   ══════════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────────
   Variables
   ────────────────────────────────────────────────────────────────────────── */
:root {
  /* Couleurs */
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;
  --gray-700: #3f3f46;
  --gray-800: #27272a;
  --gray-900: #18181b;
  --gray-950: #09090b;

  --violet-50: #f5f3ff;
  --violet-100: #ede9fe;
  --violet-200: #ddd6fe;
  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;

  --emerald-500: #10b981;
  --emerald-50: #ecfdf5;
  --amber-500: #f59e0b;
  --amber-50: #fffbeb;
  --red-500: #ef4444;
  --red-50: #fef2f2;

  /* Tokens sémantiques */
  --bg-primary: var(--white);
  --bg-secondary: var(--gray-50);
  --bg-tertiary: var(--gray-100);
  --bg-inverse: var(--gray-950);
  --bg-inverse-subtle: var(--gray-900);

  --text-primary: var(--gray-950);
  --text-secondary: var(--gray-600);
  --text-tertiary: var(--gray-500);
  --text-quaternary: var(--gray-400);
  --text-inverse: var(--white);

  --border-subtle: var(--gray-100);
  --border-default: var(--gray-200);
  --border-strong: var(--gray-300);

  --accent: var(--violet-600);
  --accent-light: var(--violet-500);
  --accent-subtle: var(--violet-100);
  --accent-muted: var(--violet-50);

  /* Typographie */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;

  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;

  /* Espacement */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Rayons */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  /* Ombres */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 0 1px rgba(139, 92, 246, 0.1), 0 4px 16px rgba(139, 92, 246, 0.15);
  --shadow-glow-lg: 0 0 0 1px rgba(139, 92, 246, 0.15), 0 8px 32px rgba(139, 92, 246, 0.25);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ──────────────────────────────────────────────────────────────────────────
   Typographie
   ────────────────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

h1 {
  font-size: clamp(var(--text-3xl), 6vw, var(--text-5xl));
  font-weight: 700;
}

h2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.text-gradient {
  background: linear-gradient(135deg, var(--violet-500) 0%, var(--violet-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ──────────────────────────────────────────────────────────────────────────
   Layout
   ────────────────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--sm { max-width: var(--container-sm); }
.container--md { max-width: var(--container-md); }
.container--lg { max-width: var(--container-lg); }

.section {
  padding: var(--space-24) 0;
}

.section--sm {
  padding: var(--space-16) 0;
}

.section--dark {
  background: var(--bg-inverse);
  color: var(--text-inverse);
}

.section--subtle {
  background: var(--bg-secondary);
}

/* ──────────────────────────────────────────────────────────────────────────
   Navigation
   ────────────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  transition: opacity var(--duration-fast) var(--ease-out);
}

.nav__logo:hover {
  opacity: 0.7;
}

.nav__logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--violet-500), var(--violet-600));
  border-radius: var(--radius-md);
  color: white;
  font-size: var(--text-sm);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav__link {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.nav__link:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.nav__link--active {
  color: var(--text-primary);
}

.nav__cta {
  margin-left: var(--space-2);
}

/* Mobile menu */
.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}

.nav__toggle:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__links--open {
    display: flex;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: var(--space-4);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-default);
    gap: var(--space-1);
  }

  .nav__links--open .nav__cta {
    margin-left: 0;
    margin-top: var(--space-2);
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Boutons
   ────────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-lg);
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
  user-select: none;
}

.btn--primary {
  background: var(--gray-950);
  color: var(--white);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn--primary:hover {
  background: var(--gray-800);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.1);
}

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

.btn--secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-xs);
}

.btn--secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--border-strong);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn--ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn--accent {
  background: linear-gradient(135deg, var(--violet-500), var(--violet-600));
  color: var(--white);
  box-shadow: var(--shadow-glow);
}

.btn--accent:hover {
  box-shadow: var(--shadow-glow-lg);
  transform: translateY(-1px);
}

.btn--lg {
  height: 48px;
  padding: 0 var(--space-6);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.btn--sm {
  height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
}

.btn--full {
  width: 100%;
}

.btn__icon {
  font-size: var(--text-lg);
  opacity: 0.7;
}

/* ──────────────────────────────────────────────────────────────────────────
   Badges / Pills
   ────────────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 28px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.badge--accent {
  background: var(--accent-muted);
  color: var(--accent);
}

.badge--success {
  background: var(--emerald-50);
  color: var(--emerald-500);
}

.badge--warning {
  background: var(--amber-50);
  color: var(--amber-500);
}

.badge--error {
  background: var(--red-50);
  color: var(--red-500);
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ──────────────────────────────────────────────────────────────────────────
   Cards
   ────────────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--duration-base) var(--ease-out);
}

.card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
}

.card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card--highlight {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.card--dark {
  background: var(--bg-inverse-subtle);
  border-color: transparent;
}

/* ──────────────────────────────────────────────────────────────────────────
   Hero
   ────────────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: calc(var(--nav-height) + var(--space-20)) 0 var(--space-20);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 600px;
  background: radial-gradient(ellipse at center top, var(--violet-100) 0%, transparent 60%);
  opacity: 0.5;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__badge {
  margin-bottom: var(--space-6);
}

.hero__title {
  max-width: 800px;
  margin: 0 auto var(--space-4);
}

.hero__subtitle {
  max-width: 540px;
  margin: 0 auto var(--space-8);
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.hero__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.hero__note svg {
  width: 16px;
  height: 16px;
  color: var(--emerald-500);
}

/* ──────────────────────────────────────────────────────────────────────────
   Section Header
   ────────────────────────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header__label {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--accent);
}

.section-header__title {
  margin-bottom: var(--space-4);
}

.section-header__subtitle {
  max-width: 560px;
  margin: 0 auto;
  font-size: var(--text-lg);
}

.section--dark .section-header__label {
  color: var(--violet-400);
}

.section--dark .section-header__title {
  color: var(--white);
}

.section--dark .section-header__subtitle {
  color: var(--gray-400);
}

/* ──────────────────────────────────────────────────────────────────────────
   Features Grid
   ────────────────────────────────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1024px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .features {
    grid-template-columns: 1fr;
  }
}

.feature {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  transition: background var(--duration-base) var(--ease-out);
}

.feature:hover {
  background: var(--bg-secondary);
}

.feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-4);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  font-size: var(--text-lg);
}

.feature__title {
  margin-bottom: var(--space-2);
  font-size: var(--text-base);
  font-weight: 600;
}

.feature__description {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: var(--leading-relaxed);
}

/* ──────────────────────────────────────────────────────────────────────────
   Stats
   ────────────────────────────────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat {
  text-align: center;
}

.stat__value {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.stat__value--accent {
  color: var(--accent);
}

.stat__value--error {
  color: var(--red-500);
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ──────────────────────────────────────────────────────────────────────────
   Steps / Timeline
   ────────────────────────────────────────────────────────────────────────── */
.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 520px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.step__indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.step__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

.step__line {
  width: 2px;
  flex: 1;
  min-height: 24px;
  background: var(--border-default);
  border-radius: 1px;
}

.step:last-child .step__line {
  display: none;
}

.step__content {
  padding-top: var(--space-1);
  flex: 1;
}

.step__title {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.step__description {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* Dark variant */
.section--dark .step__number {
  background: var(--gray-800);
  color: var(--gray-400);
}

.section--dark .step__line {
  background: var(--gray-800);
}

.section--dark .step__title {
  color: var(--white);
}

.section--dark .step__description {
  color: var(--gray-500);
}

/* ──────────────────────────────────────────────────────────────────────────
   Testimonials
   ────────────────────────────────────────────────────────────────────────── */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1024px) {
  .testimonials {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
  }
}

.testimonial {
  padding: var(--space-6);
}

.testimonial__stars {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-4);
  color: var(--amber-500);
}

.testimonial__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial__avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.testimonial__info {
  display: flex;
  flex-direction: column;
}

.testimonial__name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.testimonial__role {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ──────────────────────────────────────────────────────────────────────────
   Pricing
   ────────────────────────────────────────────────────────────────────────── */
.pricing {
  max-width: 420px;
  margin: 0 auto;
}

.pricing__card {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.pricing__badge {
  position: absolute;
  top: calc(var(--space-4) * -1);
  left: 50%;
  transform: translateX(-50%);
}

.pricing__header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.pricing__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.pricing__amount {
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

.pricing__currency {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-tertiary);
}

.pricing__original {
  font-size: var(--text-lg);
  color: var(--text-quaternary);
  text-decoration: line-through;
}

.pricing__period {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.pricing__features {
  text-align: left;
  margin-bottom: var(--space-6);
}

.pricing__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.pricing__feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--emerald-500);
  flex-shrink: 0;
}

.pricing__feature-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.pricing__cta {
  margin-bottom: var(--space-4);
}

.pricing__trust {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-quaternary);
}

.pricing__trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* ──────────────────────────────────────────────────────────────────────────
   FAQ
   ────────────────────────────────────────────────────────────────────────── */
.faq {
  max-width: 640px;
  margin: 0 auto;
}

.faq__item {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.faq__item:last-child {
  border-bottom: none;
}

.faq__question {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.faq__answer {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: var(--leading-relaxed);
}

/* ──────────────────────────────────────────────────────────────────────────
   Forms
   ────────────────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.form-label--optional::after {
  content: ' (facultatif)';
  font-weight: 400;
  color: var(--text-quaternary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-out);
  box-shadow: var(--shadow-xs);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-quaternary);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: var(--border-strong);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-textarea {
  height: auto;
  min-height: 100px;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-10);
  cursor: pointer;
}

.form-hint {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-quaternary);
}

.form-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.form-checkbox span {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.form-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.form-section__title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-tertiary);
  margin-bottom: var(--space-5);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Form Progress
   ────────────────────────────────────────────────────────────────────────── */
.form-progress {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.form-progress__step {
  width: 48px;
  height: 4px;
  background: var(--border-default);
  border-radius: var(--radius-full);
  transition: all var(--duration-base) var(--ease-out);
}

.form-progress__step--active {
  background: var(--accent);
}

.form-progress__step--done {
  background: var(--emerald-500);
}

.form-step {
  display: none;
  animation: fadeSlideUp var(--duration-slow) var(--ease-out);
}

.form-step--active {
  display: block;
}

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

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

/* ──────────────────────────────────────────────────────────────────────────
   Blog / Articles
   ────────────────────────────────────────────────────────────────────────── */
.blog-header {
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-12);
  background: linear-gradient(180deg, var(--violet-50) 0%, var(--white) 100%);
}

.blog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-12);
  align-items: start;
}

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

/* Table des matières */
.toc {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-6));
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

@media (max-width: 1024px) {
  .toc {
    position: static;
  }
}

.toc__title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
}

.toc__list {
  list-style: none;
}

.toc__item {
  margin-bottom: var(--space-1);
}

.toc__link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.toc__link:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.toc__number {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
}

/* Articles */
.article {
  margin-bottom: var(--space-16);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid var(--border-subtle);
}

.article:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.article__badge {
  margin-bottom: var(--space-4);
}

.article__title {
  margin-bottom: var(--space-6);
  font-size: var(--text-2xl);
}

.article__content p {
  margin-bottom: var(--space-5);
}

.article__content h3 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  font-size: var(--text-lg);
}

.article__content ul,
.article__content ol {
  margin-bottom: var(--space-5);
  padding-left: var(--space-5);
}

.article__content li {
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.article__content strong {
  color: var(--text-primary);
  font-weight: 500;
}

.article__content a {
  color: var(--accent);
}

.article__content a:hover {
  text-decoration: underline;
}

/* Source box */
.article__source {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: var(--space-4) var(--space-5);
  margin: var(--space-8) 0;
}

.article__source-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.article__source ul {
  margin: 0;
  padding-left: var(--space-4);
}

.article__source li {
  margin-bottom: var(--space-1);
}

.article__source a {
  font-size: var(--text-sm);
  color: var(--accent);
}

/* Alert boxes */
.alert {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin: var(--space-5) 0;
}

.alert__icon {
  flex-shrink: 0;
  font-size: var(--text-lg);
}

.alert__content p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.alert--warning {
  background: var(--amber-50);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert--warning .alert__icon {
  color: var(--amber-500);
}

.alert--warning p {
  color: #92400e;
}

.alert--success {
  background: var(--emerald-50);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert--success .alert__icon {
  color: var(--emerald-500);
}

.alert--success p {
  color: #065f46;
}

.alert--error {
  background: var(--red-50);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert--error .alert__icon {
  color: var(--red-500);
}

.alert--error p {
  color: #991b1b;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: var(--space-5) 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.table th {
  background: var(--bg-secondary);
  font-weight: 500;
  color: var(--text-primary);
}

.table tr:last-child td {
  border-bottom: none;
}

.table td {
  color: var(--text-secondary);
}

.table .text-error {
  color: var(--red-500);
  font-weight: 500;
}

/* ──────────────────────────────────────────────────────────────────────────
   CTA Box
   ────────────────────────────────────────────────────────────────────────── */
.cta-box {
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-950) 100%);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  text-align: center;
}

.cta-box--accent {
  background: linear-gradient(135deg, var(--violet-500) 0%, var(--violet-600) 100%);
}

.cta-box__title {
  color: var(--white);
  margin-bottom: var(--space-2);
}

.cta-box__text {
  color: var(--gray-400);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.cta-box--accent .cta-box__text {
  color: rgba(255, 255, 255, 0.8);
}

/* ──────────────────────────────────────────────────────────────────────────
   Success Page
   ────────────────────────────────────────────────────────────────────────── */
.success {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}

.success__content {
  text-align: center;
  max-width: 420px;
}

.success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-6);
  background: var(--emerald-500);
  color: var(--white);
  font-size: var(--text-2xl);
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 8px var(--emerald-50);
}

.success__title {
  margin-bottom: var(--space-3);
}

.success__text {
  margin-bottom: var(--space-8);
}

/* Checklist */
.checklist {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  text-align: left;
  margin-bottom: var(--space-6);
}

.checklist__title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-tertiary);
  margin-bottom: var(--space-4);
}

.checklist__item {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.checklist__item:last-child {
  margin-bottom: 0;
}

.checklist__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.checklist__icon--done {
  background: var(--emerald-500);
  color: var(--white);
}

.checklist__icon--current {
  background: var(--accent);
  color: var(--white);
}

.checklist__icon--pending {
  background: var(--border-default);
  color: var(--text-tertiary);
}

.checklist__text {
  padding-top: 2px;
}

.checklist__text strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.checklist__text span {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ──────────────────────────────────────────────────────────────────────────
   Footer
   ────────────────────────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-inverse);
  padding: var(--space-12) 0;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--white);
}

.footer__logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--violet-500), var(--violet-600));
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--gray-500);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__link:hover {
  color: var(--white);
}

.footer__bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--gray-800);
  text-align: center;
}

.footer__copyright {
  font-size: var(--text-xs);
  color: var(--gray-600);
}

@media (max-width: 640px) {
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Utilities
   ────────────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* ──────────────────────────────────────────────────────────────────────────
   Animations
   ────────────────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.animate-fade-in {
  animation: fadeIn var(--duration-slow) var(--ease-out);
}

.animate-slide-up {
  animation: slideUp var(--duration-slower) var(--ease-out);
}

/* Staggered animations */
.animate-stagger > * {
  opacity: 0;
  animation: slideUp var(--duration-slower) var(--ease-out) forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0ms; }
.animate-stagger > *:nth-child(2) { animation-delay: 50ms; }
.animate-stagger > *:nth-child(3) { animation-delay: 100ms; }
.animate-stagger > *:nth-child(4) { animation-delay: 150ms; }
.animate-stagger > *:nth-child(5) { animation-delay: 200ms; }
.animate-stagger > *:nth-child(6) { animation-delay: 250ms; }
