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

/* Palette « lisière de forêt » de l'app (src/theme/index.ts) : clair le jour, variante de nuit
   en mode sombre. Fredoka pour les titres, Nunito pour le texte, comme dans l'app. */
:root {
  --bg:            #f4eddd;
  --bg-map:        #dde3c4;
  --surface:       #fbf7ee;
  --border:        #e2d7bd;
  --border-strong: #cfc1a0;
  --text:          #2e2a24;
  --text-muted:    #6d6453;
  --text-dim:      #8a7f6a;
  --primary:       #3f7a55;
  --primary-shade: #2c5a3d;
  --accent:        #d08a3a;
  --accent-shade:  #a86b25;
  --accent-soft:   rgba(208,138,58,.14);
  --danger:        #c85a3e;
  --star:          #f2b544;
  --radius:        16px;
  --font-title:    'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body:     'Nunito', -apple-system, 'Segoe UI', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #1e211d;
    --bg-map:        #1a2218;
    --surface:       #2a2e28;
    --border:        #3b4137;
    --border-strong: #4c5347;
    --text:          #efe8d8;
    --text-muted:    #b8ae99;
    --text-dim:      #918873;
    --primary:       #4f9468;
    --primary-shade: #2f5c40;
    --accent:        #e09a48;
    --accent-shade:  #a86b25;
    --accent-soft:   rgba(224,154,72,.16);
    --danger:        #e0735a;
  }
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--primary); }
strong { color: var(--text); font-weight: 800; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.2; }

/* ── Header ────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 10px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.logo-mark { width: 38px; height: 38px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.logo-mark img { width: 100%; height: 100%; display: block; }
.logo-name { font-family: var(--font-title); font-weight: 600; font-size: 19px; color: var(--text); white-space: nowrap; }
.logo-name em { color: var(--primary); font-style: normal; }

.header-nav { display: flex; align-items: center; gap: 20px; flex: 1; justify-content: flex-end; }
.header-nav a {
  font-size: 14px; font-weight: 700; color: var(--text-muted);
  text-decoration: none; white-space: nowrap; transition: color .15s;
}
.header-nav a:hover { color: var(--primary); }

.lang-toggle {
  display: flex; flex-shrink: 0;
  background: var(--bg); border: 2px solid var(--border); border-radius: 12px; padding: 3px; gap: 3px;
}
.lang-toggle button {
  background: none; border: none; border-radius: 9px;
  color: var(--text-muted); font: 800 12px var(--font-body); letter-spacing: .6px;
  padding: 5px 12px; cursor: pointer;
}
.lang-toggle button.active { background: var(--primary); color: #fff; }

@media (max-width: 600px) {
  header { padding: 10px 16px; gap: 10px; }
  .logo-name { display: none; }
  .header-nav { gap: 14px; }
}

/* ── Layout ────────────────────────────────────── */
.container      { max-width: 820px;  margin: 0 auto; padding: 40px 16px 80px; }
.container-wide { max-width: 1040px; margin: 0 auto; padding: 0 16px 72px; }

/* ── Hero (pages légales) ──────────────────────── */
.hero { text-align: center; padding: 32px 0 44px; border-bottom: 2px solid var(--border); margin-bottom: 44px; }
.hero-tag, .eyebrow {
  display: inline-block;
  background: var(--accent-soft); color: var(--accent-shade);
  border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 14px; margin-bottom: 18px;
}
@media (prefers-color-scheme: dark) { .hero-tag, .eyebrow { color: var(--accent); } }
.hero h1 { font-size: 32px; margin-bottom: 12px; }
.hero p { color: var(--text-muted); max-width: 520px; margin: 0 auto 16px; }
.hero-meta { font-size: 13px; color: var(--text-dim); }

/* ── Sommaire ──────────────────────────────────── */
.toc {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 24px;
}
.toc-title { font-family: var(--font-title); font-weight: 600; font-size: 17px; color: var(--primary); margin-bottom: 10px; }
.toc-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 32px; }
@media (max-width: 560px) { .toc-list { grid-template-columns: 1fr; } }
.toc-list a { color: var(--text-muted); text-decoration: none; font-size: 14px; }
.toc-list a:hover { color: var(--primary); }

/* ── Sections et articles ──────────────────────── */
.doc-section { margin-top: 56px; }
.section-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px; padding-bottom: 14px; border-bottom: 2px solid var(--border);
}
.section-badge {
  background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 8px; white-space: nowrap;
}
.section-header h2 { font-size: 24px; }

.article { margin-bottom: 34px; scroll-margin-top: 80px; }
.article-title {
  font-family: var(--font-title); font-weight: 600; font-size: 18px;
  margin-bottom: 10px; display: flex; align-items: center; gap: 10px;
}
.article-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0;
  background: var(--primary); color: #fff; border-radius: 50%;
  font-size: 13px; font-weight: 600;
}
.article p { color: var(--text-muted); margin-bottom: 10px; font-size: 15px; }
.article p:last-child { margin-bottom: 0; }
.article ul { padding-left: 22px; color: var(--text-muted); font-size: 15px; margin-bottom: 10px; }
.article li { margin-bottom: 6px; }

/* ── Encadrés ──────────────────────────────────── */
.info-box {
  background: var(--surface); border: 2px solid var(--border); border-left: 5px solid var(--accent);
  border-radius: 12px; padding: 14px 18px; margin: 14px 0;
  font-size: 15px; color: var(--text-muted);
}
.info-box .info-label {
  display: block; margin-bottom: 4px;
  color: var(--accent-shade); font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
}
@media (prefers-color-scheme: dark) { .info-box .info-label { color: var(--accent); } }

/* ── Tableaux ──────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 14px 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  background: var(--surface); color: var(--text-muted);
  font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  padding: 10px 12px; text-align: left; border-bottom: 2px solid var(--border-strong);
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-muted); vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table td:first-child { color: var(--text); font-weight: 700; }

.contact-block {
  background: var(--surface); border: 2px solid var(--border); border-radius: 12px;
  padding: 16px 20px; margin: 14px 0;
}
.contact-block .contact-name { font-weight: 800; margin-bottom: 4px; }
.contact-block .contact-detail { font-size: 14px; color: var(--text-muted); line-height: 1.9; }

/* ── Boutons « en relief » de l'app ────────────── */
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-play, .btn-ghost, .form-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  border-radius: 16px; text-decoration: none; cursor: pointer;
  font-family: var(--font-body); transition: transform .08s, box-shadow .08s;
}
.btn-play {
  background: var(--primary); color: #fff; padding: 10px 24px;
  box-shadow: 0 5px 0 var(--primary-shade);
}
.btn-play svg { width: 28px; height: 28px; flex-shrink: 0; }
.btn-play small { display: block; font-size: 11px; font-weight: 700; opacity: .85; line-height: 1.4; }
.btn-play strong { display: block; color: #fff; font-family: var(--font-title); font-size: 20px; font-weight: 600; line-height: 1.2; }
.btn-ghost {
  background: var(--surface); color: var(--text); padding: 16px 24px;
  font-weight: 800; font-size: 15px;
  box-shadow: 0 5px 0 var(--border-strong);
}
.btn-play:active, .btn-ghost:active, .form-submit:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--primary-shade); }
.btn-ghost:active { box-shadow: 0 2px 0 var(--border-strong); }

/* ── Landing : hero ────────────────────────────── */
.lp-hero-band {
  background: linear-gradient(180deg, var(--bg-map), var(--bg));
  border-bottom: 2px solid var(--border);
}
.lp-hero {
  max-width: 1040px; margin: 0 auto; padding: 56px 16px 52px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
}
.lp-hero-text { text-align: left; }
.lp-hero h1 { font-size: clamp(32px, 5.5vw, 52px); margin-bottom: 18px; }
.lp-hero h1 em { color: var(--primary); font-style: normal; }
.lp-lead { color: var(--text-muted); font-size: 17px; max-width: 560px; margin-bottom: 30px; }
.lp-hero .cta-row { justify-content: flex-start; }
.lp-note { font-size: 13px; font-weight: 700; color: var(--text-dim); margin-top: 22px; }
.lp-hero-shot { display: flex; justify-content: center; }
.lp-hero-shot img {
  width: 100%; max-width: 300px; height: auto; display: block;
  border-radius: 28px; border: 8px solid var(--surface);
  box-shadow: 0 6px 0 var(--border-strong), 0 24px 48px rgba(40,30,15,.18);
}

@media (max-width: 760px) {
  .lp-hero { grid-template-columns: 1fr; padding-top: 40px; text-align: center; }
  .lp-hero-text { text-align: center; }
  .lp-lead { margin-left: auto; margin-right: auto; }
  .lp-hero .cta-row { justify-content: center; }
  .lp-hero-shot img { max-width: 240px; }
}

/* ── Chiffres ──────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 520px; margin: 48px auto 8px; }
.stat {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 18px 12px; text-align: center;
}
.stat-num { font-family: var(--font-title); font-size: 30px; font-weight: 600; color: var(--primary); line-height: 1.2; }
.stat-label { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-top: 4px; }

/* ── Sections ──────────────────────────────────── */
.lp-section { padding: 52px 0; }
.lp-section-head { text-align: center; margin-bottom: 32px; }
.lp-section-head h2 { font-size: 30px; margin-bottom: 8px; }
.lp-section-head p { color: var(--text-muted); max-width: 580px; margin: 0 auto; }

/* ── Règles ────────────────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 22px;
}
.feature-icon {
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-map); border-radius: 14px; font-size: 24px; margin-bottom: 12px;
}
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { font-size: 15px; color: var(--text-muted); }

/* ── Étapes ────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 22px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; font-family: var(--font-title); font-weight: 600; font-size: 17px;
  box-shadow: 0 3px 0 var(--accent-shade); margin-bottom: 12px;
}
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { font-size: 15px; color: var(--text-muted); }

/* ── Captures ──────────────────────────────────── */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 720px) { .shots { grid-template-columns: 1fr; max-width: 300px; margin: 0 auto; } }
.shot {
  background: var(--surface); border: 2px solid var(--border); border-radius: 24px; padding: 10px;
}
.shot img { width: 100%; height: auto; display: block; border-radius: 16px; }
.shot figcaption { font-weight: 800; font-size: 14px; color: var(--text-muted); text-align: center; padding: 10px 4px 2px; }

/* ── FAQ ───────────────────────────────────────── */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 2px solid var(--border); border-radius: 14px; padding: 14px 18px; }
.faq summary {
  cursor: pointer; list-style: none; font-weight: 800; font-size: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--primary); font-family: var(--font-title); font-size: 24px; line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--text-muted); font-size: 15px; margin-top: 8px; }

/* ── Appel final ───────────────────────────────── */
.final-cta {
  background: var(--bg-map); border: 2px solid var(--border); border-radius: 24px;
  padding: 44px 24px; text-align: center; margin-top: 20px;
}
.final-cta h2 { font-size: 28px; margin-bottom: 10px; }
.final-cta p { color: var(--text-muted); max-width: 520px; margin: 0 auto 26px; }

/* ── Formulaire de contact ─────────────────────── */
.form-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 28px; }
@media (max-width: 560px) { .form-card { padding: 20px 16px; } }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-label { font-size: 14px; font-weight: 800; color: var(--text); }
.form-required { color: var(--accent); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  background: var(--bg); color: var(--text);
  border: 2px solid var(--border); border-radius: 12px;
  font: 15px var(--font-body); padding: 11px 14px; width: 100%;
  outline: none; appearance: none; -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-select {
  cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a7f6a' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.form-textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.form-hint { font-size: 13px; color: var(--text-dim); }
.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.form-submit {
  background: var(--primary); color: #fff; border: none;
  font-weight: 800; font-size: 16px; padding: 13px 30px;
  box-shadow: 0 5px 0 var(--primary-shade);
}
.form-note { font-size: 13px; color: var(--text-dim); line-height: 1.5; flex: 1; min-width: 200px; }
.form-error { font-size: 13px; font-weight: 700; color: var(--danger); display: none; }
.form-error.visible { display: block; }

/* ── Pied de page ──────────────────────────────── */
footer {
  border-top: 2px solid var(--border); background: var(--surface);
  padding: 26px 16px; text-align: center; color: var(--text-dim); font-size: 14px;
}
footer a { color: var(--text-muted); text-decoration: none; font-weight: 700; }
footer a:hover { color: var(--primary); }

/* ── Langue ────────────────────────────────────── */
/* Chaque bloc porte lang="fr" ou lang="en" ; lang.js pose la langue choisie sur <html>. */
html[lang="fr"] body [lang="en"],
html[lang="en"] body [lang="fr"] { display: none !important; }
