/* IAGOV Lex — v2 design system
   ----------------------------- */

:root {
  /* Palette claire — sobre, légale, moderne */
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;

  --primary: #0b1f3a;        /* navy "robe d'avocat" */
  --primary-hover: #142e54;
  --primary-contrast: #ffffff;

  --accent: #c9a961;          /* doré sobre — signal premium */
  --accent-soft: #f5edd6;

  --success: #059669;
  --danger: #dc2626;
  --info: #2563eb;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 14px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);

  --container: 1180px;
  --gap: 24px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1424;
    --surface: #0f1d33;
    --surface-2: #16263f;
    --border: #1f3658;
    --text: #f1f5f9;
    --text-muted: #cbd5e1;
    --text-subtle: #94a3b8;

    --primary: #ffffff;
    --primary-hover: #e2e8f0;
    --primary-contrast: #0b1f3a;

    --accent: #d9bb74;
    --accent-soft: #2a2310;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navigation ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav__brand {
  font-weight: 800; font-size: 1.15rem;
  color: var(--text); text-decoration: none;
  letter-spacing: -0.02em;
}
.nav__brand small { font-weight: 500; color: var(--text-subtle); margin-left: 4px; }
.nav__links { display: flex; gap: 24px; align-items: center; }
.nav__links a {
  color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500;
}
.nav__links a:hover { color: var(--text); }
.nav__cta { display: flex; gap: 8px; align-items: center; }
.nav__burger {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer;
  color: var(--text); font-size: 1.1rem;
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta .btn--ghost { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__links.is-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 16px 24px; gap: 14px;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--primary); color: var(--primary-contrast);
}
.btn--primary:hover { background: var(--primary-hover); }

.btn--ghost {
  background: transparent; color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--surface); }

.btn--accent {
  background: var(--accent); color: #1c1404; border-color: var(--accent);
}
.btn--accent:hover { filter: brightness(0.95); }

.btn--lg { padding: 16px 26px; font-size: 1rem; }

/* ===== Sections / Layout helpers ===== */
section { padding: 80px 0; }
section.tight { padding: 56px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head .eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.section-head p { font-size: 1.1rem; }

.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ===== Hero ===== */
.hero {
  padding: 80px 0 64px;
  background:
    radial-gradient(ellipse at top left, color-mix(in srgb, var(--accent) 12%, transparent) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, color-mix(in srgb, var(--primary) 8%, transparent) 0%, transparent 60%),
    var(--bg);
}
.hero__grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center;
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; gap: 40px; } }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--border);
  border-radius: 999px; font-size: 0.85rem; color: var(--text-muted);
  background: var(--surface); margin-bottom: 24px;
}
.hero__eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 25%, transparent);
}
.hero h1 { margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.hero__signals {
  display: flex; flex-wrap: wrap; gap: 18px;
  font-size: 0.9rem; color: var(--text-subtle);
}
.hero__signals span { display: inline-flex; align-items: center; gap: 6px; }

.hero__visual {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
}
.hero__visual .placeholder {
  width: 100%; height: 100%; border-radius: 8px;
  background:
    repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 12px, var(--surface) 12px, var(--surface) 24px);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-subtle); font-size: 0.9rem; text-align: center; padding: 16px;
}

/* ===== Cards ===== */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 20%, var(--border)); }
.card__icon {
  font-size: 1.75rem; margin-bottom: 12px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* ===== Steps ===== */
.steps { counter-reset: step; }
.step__num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: var(--primary-contrast);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 12px;
}

/* ===== Pricing ===== */
.pricing { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1100px) { .pricing { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pricing { grid-template-columns: 1fr; } }

.plan {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column;
  position: relative;
}
.plan.is-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan__badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #1c1404; font-weight: 700; font-size: 0.75rem;
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.05em;
}
.plan__name { font-weight: 700; font-size: 1.05rem; }
.plan__tag { color: var(--text-subtle); font-size: 0.85rem; margin-bottom: 16px; }
.plan__price { font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.plan__price small { font-size: 0.9rem; font-weight: 500; color: var(--text-subtle); margin-left: 4px; }
.plan__unit { font-size: 0.85rem; color: var(--text-subtle); margin-top: 6px; margin-bottom: 20px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; }
.plan li {
  font-size: 0.9rem; color: var(--text-muted);
  padding: 6px 0 6px 22px; position: relative;
}
.plan li::before {
  content: "✓"; position: absolute; left: 0; top: 6px;
  color: var(--success); font-weight: 700;
}
.plan .btn { width: 100%; margin-top: auto; }

.pricing-footnote {
  text-align: center; color: var(--text-subtle); font-size: 0.9rem; margin-top: 24px;
}

/* ===== Testimonials ===== */
.quote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.quote blockquote {
  margin: 0 0 16px; font-size: 1.05rem; line-height: 1.6; color: var(--text);
}
.quote blockquote::before { content: "« "; color: var(--accent); font-weight: 700; }
.quote blockquote::after { content: " »"; color: var(--accent); font-weight: 700; }
.quote__author { font-size: 0.9rem; color: var(--text-subtle); }
.quote__author strong { color: var(--text); font-weight: 600; }

/* ===== Comparison ===== */
.compare {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.compare__row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
@media (max-width: 900px) { .compare__row { grid-template-columns: 1fr; } }
.compare__col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.compare__col.is-us { border-color: var(--accent); }
.compare__col h3 { display: flex; align-items: center; gap: 8px; }
.compare__col .verdict {
  font-size: 0.8rem; padding: 3px 8px; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.02em;
}
.compare__col .verdict.bad { background: #fee2e2; color: #991b1b; }
.compare__col .verdict.meh { background: #fef3c7; color: #92400e; }
.compare__col .verdict.good { background: #d1fae5; color: #065f46; }
@media (prefers-color-scheme: dark) {
  .compare__col .verdict.bad { background: #4a1717; color: #fecaca; }
  .compare__col .verdict.meh { background: #4a3617; color: #fde68a; }
  .compare__col .verdict.good { background: #15402e; color: #a7f3d0; }
}

/* ===== FAQ accordéon ===== */
.faq { max-width: 820px; margin: 0 auto; }
.faq__item {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.faq__item:last-child { border-bottom: 1px solid var(--border); }
.faq__q {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; background: none; border: 0; padding: 0;
  font-size: 1.05rem; font-weight: 600; text-align: left; cursor: pointer;
  color: var(--text); font-family: inherit;
}
.faq__q::after {
  content: "+"; font-size: 1.5rem; color: var(--accent); font-weight: 700;
  transition: transform .2s;
}
.faq__item.is-open .faq__q::after { content: "−"; }
.faq__a {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease;
}
.faq__item.is-open .faq__a { max-height: 600px; padding-top: 12px; }
.faq__a p { color: var(--text-muted); margin: 0 0 8px; }
.faq__a p:last-child { margin-bottom: 0; }

/* ===== CTA banner ===== */
.cta-banner {
  background: var(--primary); color: var(--primary-contrast);
  border-radius: var(--radius-lg); padding: 56px 40px;
  text-align: center;
}
.cta-banner h2 { color: var(--primary-contrast); }
.cta-banner p { color: color-mix(in srgb, var(--primary-contrast) 80%, transparent); margin-bottom: 24px; }
.cta-banner .btn--primary {
  background: var(--accent); color: #1c1404; border-color: var(--accent);
}
.cta-banner .btn--primary:hover { filter: brightness(.95); }
.cta-banner .btn--ghost {
  border-color: color-mix(in srgb, var(--primary-contrast) 40%, transparent);
  color: var(--primary-contrast);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 56px 0 24px;
  font-size: 0.9rem;
}
.site-footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 800px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
.site-footer__col h4 { font-size: 0.85rem; color: var(--text); margin-bottom: 12px; }
.site-footer__col ul { list-style: none; padding: 0; margin: 0; }
.site-footer__col li { margin-bottom: 8px; }
.site-footer__col a { color: var(--text-muted); text-decoration: none; }
.site-footer__col a:hover { color: var(--text); }
.site-footer__brand p { color: var(--text-subtle); }
.site-footer__legal {
  border-top: 1px solid var(--border); padding-top: 20px;
  color: var(--text-subtle); display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
}

/* ===== Pages content (legal-ish) ===== */
.page-content {
  max-width: 800px; margin: 0 auto; padding: 56px 24px 80px;
}
.page-content h1 { margin-bottom: 8px; }
.page-content .updated { color: var(--text-subtle); font-size: 0.9rem; margin-bottom: 32px; }
.page-content h2 { margin-top: 40px; }
.page-content h3 { margin-top: 24px; }
.page-content ul, .page-content ol { padding-left: 22px; }
.page-content li { margin: 6px 0; color: var(--text-muted); }
.page-content table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
}
.page-content th, .page-content td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--border); font-size: 0.95rem;
}
.page-content th { background: var(--surface); font-weight: 600; }
.page-content .callout {
  background: var(--surface); border-left: 3px solid var(--accent);
  padding: 16px 20px; border-radius: var(--radius-sm); margin: 20px 0;
}

/* utilitaires */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--text-muted); }
