/* Identité « Atelier » : crème, vert forêt, accent moutarde. Fraunces pour les titres, Inter pour le texte.
   Les polices (versions variables de Fontsource, sous-ensemble latin) sont servies par le site lui-même :
   aucune requête vers un tiers. */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  --bg: #fbf7ef;
  --bg-soft: #f3ebdc;
  --surface: #fffdf8;
  --text: #1e2b24;
  --muted: #56625a;
  --border: #e2d8c5;
  --brand: #1f4d3a;
  --brand-strong: #163a2b;
  --brand-soft: #e2ebe3;
  --on-brand: #fbf7ef;
  --accent: #e0a526;
  --accent-soft: #f7e6bd;
  --on-accent: #3d2a00;
  --warn-bg: #fbecc4;
  --warn-text: #5c4200;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(40 30 10 / 0.05), 0 10px 28px rgb(40 30 10 / 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111915;
    --bg-soft: #17211c;
    --surface: #1a2520;
    --text: #efe9dd;
    --muted: #a9b4ab;
    --border: #2b3a32;
    --brand: #93cfab;
    --brand-strong: #b5e0c5;
    --brand-soft: #1e3429;
    --on-brand: #111915;
    --accent: #e8b54a;
    --accent-soft: #3a2f14;
    --on-accent: #f7e6bd;
    --warn-bg: #3a2f12;
    --warn-text: #f6dc9b;
    --shadow: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111915;
  --bg-soft: #17211c;
  --surface: #1a2520;
  --text: #efe9dd;
  --muted: #a9b4ab;
  --border: #2b3a32;
  --brand: #93cfab;
  --brand-strong: #b5e0c5;
  --brand-soft: #1e3429;
  --on-brand: #111915;
  --accent: #e8b54a;
  --accent-soft: #3a2f14;
  --on-accent: #f7e6bd;
  --warn-bg: #3a2f12;
  --warn-text: #f6dc9b;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--font-body);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--brand); }
a:hover { color: var(--brand-strong); }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
h1, h2 { color: var(--brand); }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); margin: 0 0 18px; max-width: 20ch; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 0 0 12px; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }

/* En-tête */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--brand); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--brand); }
.site-header nav { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; padding: 8px 0; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); }
.site-header nav a.lang { border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; font-size: 0.85rem; }
@media (max-width: 640px) {
  .site-header { position: static; }
  .site-header nav { width: 100%; justify-content: space-between; }
}

/* Boutons */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 600; text-decoration: none;
  background: var(--brand); color: var(--on-brand); border: 1px solid var(--brand);
}
.btn:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--border); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-strong); }
.site-header nav a.btn-small { padding: 7px 16px; font-size: 0.9rem; color: var(--on-brand); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Sections */
section { padding: 64px 0; }
section.soft { background: var(--bg-soft); }
/* Accueil et Fonctionnalités : fond uni ; les sections « soft » deviennent des panneaux arrondis
   posés sur la page plutôt que des bandes pleine largeur. */
:is([data-page="home"], [data-page="features"]) section.soft { background: none; padding: 16px 0; }
:is([data-page="home"], [data-page="features"]) section.soft > .wrap {
  width: min(1080px, 100% - 32px); padding: clamp(32px, 5vw, 56px) clamp(20px, 5vw, 56px);
  background: var(--bg-soft); border-radius: 28px;
}
:is([data-page="home"], [data-page="features"]) section.soft > .wrap.narrow { width: min(760px, 100% - 32px); }
:is([data-page="home"], [data-page="features"]) section.soft:last-child { padding-bottom: 64px; }
/* Panneau en deux colonnes : titre et boutons à gauche, liste à droite. */
.split { display: grid; grid-template-columns: 2fr 3fr; gap: 24px 56px; align-items: center; }
.split > div > p:not(.fine) { color: var(--muted); margin: 0; }
.split .actions { margin-bottom: 0; }
.split ul.checks li { margin: 0 0 12px; }
.split .fine { margin: 0; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.hero { padding: 80px 0 64px; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 680px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }
.fine { color: var(--muted); font-size: 0.92rem; }
.eyebrow { display: flex; align-items: flex-start; gap: 8px; color: var(--brand); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 14px; }
.eyebrow::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 0.3em; border-radius: 50%; background: var(--accent); }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--muted); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; margin-bottom: 24px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--on-accent); font-family: var(--font-display); font-weight: 600; display: grid; place-items: center;
}
.steps li p { margin: 4px 0 0; color: var(--muted); }

/* Tarifs */
.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 32px; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan.featured { border: 2px solid var(--brand); }
.plan .badge { align-self: flex-start; background: var(--accent-soft); color: var(--on-accent); border-radius: 999px; padding: 2px 10px; font-size: 0.8rem; font-weight: 600; }
.plan .price { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; color: var(--brand); line-height: 1; }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan .volume { font-weight: 600; color: var(--text); }
.plan .btn { margin-top: auto; text-align: center; }
/* Sélecteur annuel / mensuel : deux boutons radio, le prix affiché suit celui qui est coché (sans JavaScript). */
.billing-toggle { display: inline-flex; min-width: 0; gap: 4px; margin: 28px 0 0; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.billing-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.billing-toggle label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; }
.billing-toggle input:checked + label { background: var(--brand); color: var(--on-brand); }
.billing-toggle input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.billing-toggle .save { white-space: nowrap; background: var(--accent-soft); color: var(--on-accent); border-radius: 999px; padding: 1px 8px; font-size: 0.78rem; }
.price-monthly { display: none; }
.pricing:has(#billing-monthly:checked) .price-monthly { display: block; }
.pricing:has(#billing-monthly:checked) .price-yearly { display: none; }
.plan .fine { margin: 6px 0 0; }
@media (max-width: 420px) { .billing-toggle label { padding: 8px 12px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { padding-left: 28px; position: relative; margin: 6px 0; }
ul.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--brand); font-weight: 700; }

/* Page Fonctionnalités : texte et illustration côte à côte, en alternance. */
.feature-row { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: center; }
.feature-row + .feature-row { margin-top: 88px; }
.feature-row.reverse .stage { order: -1; }
.feature-row > div > p { color: var(--muted); }
.feature-row ul.checks { margin-top: 14px; }
.feature-row .more { font-weight: 600; }
@media (max-width: 820px) {
  .feature-row { grid-template-columns: 1fr; gap: 24px; }
  .feature-row.reverse .stage { order: 0; }
  .feature-row + .feature-row { margin-top: 64px; }
}
/* Hero de l'accueil : texte à gauche, illustration d'un workflow à droite. */
.hero-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px 64px; align-items: center; }
.hero-split .lead { font-size: 1.15rem; }
.hero-visual { margin-bottom: 24px; }
.hero-visual .mock { font-size: 0.95rem; }
.hero-visual .flow small { display: block; font-size: 0.75rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.hero-visual .flow li:last-child small { text-transform: none; letter-spacing: 0; }
.hero-visual .flow .chip { float: right; }
.hero-float { position: absolute; left: -40px; bottom: -24px; width: 250px; padding: 14px 16px; }
.hero-float .mock-title { font-size: 0.85rem; }
.hero-float .mock-sender { padding: 4px 0 0; }
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-float { position: relative; left: auto; bottom: auto; width: auto; margin-top: 14px; }
}

/* Forme beige arrondie, décalée derrière chaque illustration (vers l'extérieur de la page). */
.stage { position: relative; padding: 0 28px 28px 0; }
.stage::before { content: ""; position: absolute; inset: 28px 0 0 28px; background: var(--bg-soft); border-radius: 28px; }
.feature-row.reverse .stage { padding: 0 0 28px 28px; }
.feature-row.reverse .stage::before { inset: 28px 28px 0 0; }
.stage .mock { position: relative; }
@media (max-width: 820px) {
  .stage, .feature-row.reverse .stage { padding: 0 16px 16px 0; }
  .stage::before, .feature-row.reverse .stage::before { inset: 16px 0 0 16px; border-radius: 22px; }
}
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; font-size: 0.92rem; }
.mock-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 6px; font-weight: 600; color: var(--text); }
.mock-field { margin: 12px 0 0; }
.mock-field span { display: block; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.mock-field strong { display: block; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; background: var(--bg); font-weight: 500; }
.mock-list { list-style: none; margin: 0; padding: 0; }
.mock-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.mock-list li:last-child { border-bottom: 0; }
.mock-list small { display: block; color: var(--muted); }
.mock-list li.selected { background: var(--brand-soft); margin: 0 -10px; padding: 10px; border-radius: 8px; }
.chip { flex: none; border-radius: 999px; padding: 1px 9px; font-size: 0.78rem; font-weight: 600; background: var(--bg-soft); color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--brand-soft); color: var(--brand); }
.chip.wait { background: var(--accent-soft); color: var(--on-accent); }
.chip.bad { background: var(--warn-bg); color: var(--warn-text); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.flow li { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: var(--bg); position: relative; }
.flow li + li::before { content: "↓"; position: absolute; top: -23px; left: 18px; color: var(--muted); font-size: 0.85rem; }
.flow li.action { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; color: var(--brand); }
.meter { height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.meter i.full { background: var(--accent); }
.mock-sender { padding: 10px 0; border-bottom: 1px solid var(--border); }
.mock-sender:last-child { border-bottom: 0; }
.mock-sender div { display: flex; justify-content: space-between; gap: 12px; }

/* Documents (guide, juridique) */
.doc { padding-top: 48px; padding-bottom: 72px; }
[id] { scroll-margin-top: 80px; }
.doc h2 { margin-top: 40px; padding-top: 8px; }
.doc h3 { margin-top: 24px; }
.doc li { margin: 6px 0; }
.doc .toc { background: var(--bg-soft); border-radius: var(--radius); padding: 16px 22px; }
.doc .toc ol { margin: 6px 0 0; padding-left: 20px; }
.notice { background: var(--warn-bg); color: var(--warn-text); border-radius: 10px; padding: 12px 16px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { background: var(--bg-soft); }
code { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; font-size: 0.9em; }
details { border-bottom: 1px solid var(--border); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 8px 0 0; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 0.9rem; }
.footer-row { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.footer-row p { margin: 0; }
.footer-row a { color: var(--muted); margin-right: 14px; }
.footer-row .made { color: var(--brand); font-weight: 600; }
