/* =========================================================================
   Entretien civique — vitrine statique
   Aucune dépendance externe (perf + confidentialité). Palette alignée sur
   la couleur brand de l'app (#465fff).
   ========================================================================= */

:root {
  --brand-50:  #ecf3ff;
  --brand-100: #dde9ff;
  --brand-200: #c2d6ff;
  --brand-400: #7592ff;
  --brand-500: #465fff;
  --brand-600: #3641f5;
  --brand-700: #2a31d8;

  --ink:       #101828;
  --ink-soft:  #344054;
  --muted:     #667085;
  --line:      #e4e7ec;
  --bg:        #ffffff;
  --bg-alt:    #f7f9fc;
  --bg-tint:   #f2f7ff;
  --white:     #ffffff;

  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 1px 2px rgba(16,24,40,.06), 0 12px 32px rgba(16,24,40,.08);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 4px 12px rgba(16,24,40,.06);
  --container: 1120px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:      #f2f4f7;
    --ink-soft: #d0d5dd;
    --muted:    #98a2b3;
    --line:     #2a2f3a;
    --bg:       #0f1320;
    --bg-alt:   #151a29;
    --bg-tint:  #161b2e;
    --white:    #1a2032;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.45);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.35);
  }
}

/* ----- base ----- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

h1, h2, h3, h4 { line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1rem; color: var(--ink-soft); }
a  { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul  { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand-600); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--brand-400); outline-offset: 2px; border-radius: 6px; }

/* ----- brand mark ----- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.15);
}
.brand-name { font-size: 1.05rem; letter-spacing: -.01em; }

/* ----- buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: .98rem; line-height: 1; cursor: pointer;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  transition: transform .06s ease, background-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-700); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-alt); color: var(--ink); }
.btn-sm  { padding: 9px 15px; font-size: .9rem; }
.btn-lg  { padding: 15px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ----- header ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.nav { display: flex; align-items: center; }
.nav-menu { display: flex; align-items: center; gap: 26px; }
.nav-menu a { color: var(--ink-soft); font-weight: 500; font-size: .95rem; }
.nav-menu a:hover { color: var(--ink); text-decoration: none; }
.nav-menu .nav-login { color: var(--ink); font-weight: 600; }
.nav-toggle { display: none; }

/* ----- hero ----- */
.hero { padding: clamp(48px, 8vw, 96px) 0; background:
        radial-gradient(1200px 480px at 78% -10%, var(--bg-tint), transparent 60%); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--brand-600); background: var(--brand-50);
  padding: 6px 12px; border-radius: 999px; margin: 0 0 18px;
}
.hero h1 { margin-bottom: 18px; }
.accent { color: var(--brand-600); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.hero-note { font-size: .9rem; color: var(--muted); margin: 0; }

/* hero mockup */
.hero-visual { display: flex; justify-content: center; }
.mock-card {
  width: 100%; max-width: 400px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.mock-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mock-badge { font-size: .78rem; font-weight: 700; color: var(--brand-700); background: var(--brand-50);
  padding: 5px 10px; border-radius: 999px; }
.mock-timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
.mock-q { font-weight: 700; color: var(--ink); font-size: 1.05rem; margin-bottom: 14px; }
.mock-options li {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px;
  color: var(--ink-soft); font-size: .95rem;
}
.mock-options li.is-correct {
  border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); font-weight: 600;
}

/* ----- stats ----- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 30px 20px; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 1.5rem; font-weight: 800; color: var(--brand-600); }
.stat-label { display: block; font-size: .9rem; color: var(--muted); }

/* ----- sections ----- */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head p { font-size: 1.1rem; color: var(--muted); margin: 0; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; font-weight: 800; font-size: 1.1rem;
  color: #fff; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); margin-bottom: 16px;
}
.step p { margin: 0; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .12s ease, box-shadow .12s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon { font-size: 1.7rem; width: 52px; height: 52px; display: flex; align-items: center;
  justify-content: center; border-radius: 12px; background: var(--brand-50); margin-bottom: 16px; }
.feature p { margin: 0; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 26px; justify-content: center; }
.plan { position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.plan-featured { border-color: var(--brand-500); box-shadow: 0 12px 40px rgba(70,95,255,.18); }
.plan-ribbon {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--brand-600); color: #fff; font-size: .78rem; font-weight: 700;
  padding: 5px 14px; border-radius: 999px; letter-spacing: .02em;
}
.plan-name { font-size: 1.15rem; margin-bottom: 8px; }
.plan-price { margin: 0 0 4px; }
.plan-price .amount { font-size: 2.4rem; font-weight: 800; color: var(--ink); }
.plan-price .per { color: var(--muted); font-weight: 600; margin-left: 4px; }
.plan-tag { color: var(--muted); font-size: .95rem; margin-bottom: 22px; }
.plan-list { display: grid; gap: 12px; margin-bottom: 26px; }
.plan-list li { position: relative; padding-left: 28px; color: var(--ink-soft); }
.plan-list li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 999px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat,
    var(--brand-500);
}
.plan .btn { margin-top: auto; }
.plans-note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 22px; }

/* faq */
.faq { display: grid; gap: 12px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 20px; }
.faq-item summary {
  cursor: pointer; font-weight: 600; color: var(--ink); padding: 16px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--brand-600); line-height: 1;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 0 18px; margin: 0; }

/* cta final */
.cta-final { padding: clamp(56px, 8vw, 96px) 0; text-align: center;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-800, #252dae)); }
.cta-final h2, .cta-final p { color: #fff; }
.cta-final h2 { margin-bottom: 12px; }
.cta-final p { opacity: .92; margin-bottom: 26px; font-size: 1.1rem; }
.cta-final .btn-primary { background: #fff; color: var(--brand-700); }
.cta-final .btn-primary:hover { background: var(--brand-50); color: var(--brand-700); }

/* footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 56px 0 28px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 40px; }
.footer-brand .brand-mark { display: inline-block; vertical-align: middle; }
.footer-brand .brand-name { font-weight: 700; margin-left: 8px; }
.footer-desc { margin-top: 12px; color: var(--muted); max-width: 30em; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 14px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: var(--ink-soft); font-size: .95rem; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; color: var(--muted); font-size: .9rem; }

/* =========================================================================
   Pages légales (prose)
   ========================================================================= */
.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px);
  background: radial-gradient(900px 360px at 80% -20%, var(--bg-tint), transparent 60%);
  border-bottom: 1px solid var(--line); }
.page-hero .eyebrow { margin-bottom: 12px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 8px; }
.page-hero .updated { color: var(--muted); font-size: .92rem; margin: 0; }

.legal { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.legal .container { max-width: 800px; }
.legal h2 { font-size: 1.35rem; margin: 2.2em 0 .6em; scroll-margin-top: 84px; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 1.08rem; margin: 1.6em 0 .4em; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { list-style: disc; padding-left: 1.3em; margin: 0 0 1rem; }
.legal ul li { margin-bottom: .4em; }
.legal a { text-decoration: underline; }
.legal .placeholder { color: var(--brand-700); background: var(--brand-50);
  padding: 1px 6px; border-radius: 6px; font-weight: 600; font-size: .95em; }
.legal .toc { background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 18px 22px; margin: 0 0 32px; }
.legal .toc h2 { margin: 0 0 10px; font-size: 1rem; }
.legal .toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.legal .toc a { text-decoration: none; }
.legal .toc a:hover { text-decoration: underline; }
.legal .note { background: var(--bg-alt); border-left: 3px solid var(--brand-500);
  border-radius: 0 8px 8px 0; padding: 14px 18px; margin: 24px 0; }
.legal .note p { margin: 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: .95rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); }
.legal th { background: var(--bg-alt); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .steps, .features { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; background: transparent; border: 1px solid var(--line);
    border-radius: 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 0 auto;
    transition: transform .2s ease, opacity .2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-menu {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 4px; background: var(--bg); border-bottom: 1px solid var(--line); padding: 14px 20px 20px;
    box-shadow: var(--shadow); display: none;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; padding: 12px 4px; }
  .nav-menu .btn { width: 100%; margin-top: 6px; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .steps, .features, .plans { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
  .container { padding: 0 16px; }
  .footer-cols { grid-template-columns: 1fr; }
}
