/* Emis — paper, ink, whitespace */
:root {
  --paper: #f6f1e8;
  --paper-2: #ebe4d6;
  --paper-3: #e0d7c6;
  --sheet: #fffdf8;
  --ink: #1b1714;
  --ink-2: #3d3832;
  --ink-3: #6b645b;
  --ink-4: #8f877c;
  --rule: #d4cbb8;
  --rule-2: #c4b9a4;
  --accent: #8f3d24;
  --accent-2: #732f1b;
  --accent-soft: #f3e4dc;
  --sage: #3f5348;
  --sage-soft: #e4ebe6;
  --white: #fffdf8;
  --shadow: 0 1px 2px rgba(27, 23, 20, 0.06), 0 12px 40px rgba(27, 23, 20, 0.08);
  --shadow-lg: 0 2px 8px rgba(27, 23, 20, 0.06), 0 28px 64px rgba(27, 23, 20, 0.12);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --max: 1120px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" on, "kern" on;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, .brand { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.muted { color: var(--ink-3); }
.small { font-size: 0.875rem; }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7em 1.25em;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { background: #000; color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-2);
}
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn-accent {
  background: var(--accent);
  color: #fff8f4;
}
.btn-accent:hover { background: var(--accent-2); color: #fff8f4; }
.btn-sm { padding: 0.48em 0.9em; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.logo-mark {
  width: 28px;
  height: 28px;
}
.logo-word {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 560;
  letter-spacing: -0.03em;
}
.nav { display: flex; align-items: center; gap: 0.35rem 1.4rem; }
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover { color: var(--ink); }
.nav-cta { display: flex; gap: 0.5rem; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
}

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0.35em 0 0.5em;
  font-weight: 500;
  font-variation-settings: "SOFT" 40, "WONK" 0.7;
}
.hero .lede {
  font-size: 1.15rem;
  color: var(--ink-2);
  max-width: 38ch;
  margin-bottom: 1.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hero-note {
  margin-top: 1.1rem;
  font-size: 0.88rem;
  color: var(--ink-3);
}

/* Sample invoice card */
.invoice-card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
  padding: 1.6rem 1.7rem 1.4rem;
  transform: rotate(-0.6deg);
  position: relative;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink-2);
}
.invoice-card::before {
  content: "";
  position: absolute;
  inset: 6px -8px -10px 10px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  z-index: -1;
  transform: rotate(1.4deg);
  border-radius: 3px;
}
.inv-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.85rem;
  margin-bottom: 0.9rem;
}
.inv-brand { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.inv-meta { text-align: right; }
.inv-kind {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.9rem; }
.inv-label { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 0.2rem; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--ink);
  padding: 0.25rem 0.3rem 0.4rem;
}
.inv-table td { padding: 0.38rem 0.3rem; border-bottom: 1px solid var(--rule); }
.inv-table td:nth-child(n+2), .inv-table th:nth-child(n+2) { text-align: right; }
.inv-foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.9rem; }
.inv-mentions { font-size: 0.68rem; color: var(--ink-3); max-width: 28ch; }
.inv-totals { min-width: 12rem; }
.inv-totals div { display: flex; justify-content: space-between; gap: 1.2rem; padding: 0.15rem 0; }
.inv-totals .ttc {
  border-top: 1px solid var(--ink);
  margin-top: 0.3rem;
  padding-top: 0.35rem;
  font-weight: 700;
  color: var(--ink);
}

/* Sections */
.section { padding: 4.2rem 0; }
.section-alt { background: color-mix(in srgb, var(--paper-2) 55%, var(--paper)); }
.section h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  margin: 0.25em 0 0.3em;
}
.section-intro { max-width: 48ch; color: var(--ink-2); margin-bottom: 2.2rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.step {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.5rem;
}
.step-n {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.7rem;
}
.step h3 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.step p { color: var(--ink-2); font-size: 0.98rem; }

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: 1fr 1.08fr 1fr;
  gap: 1.1rem;
  align-items: stretch;
}

.pricing.pricing-2 {
  grid-template-columns: 1fr 1fr;
  max-width: 780px;
}
.price-card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--ink);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}
.price-card h3 { margin: 0 0 0.2rem; font-size: 1.35rem; }
.price-amt {
  font-family: var(--serif);
  font-size: 2rem;
  margin: 0.5rem 0 0.15rem;
}
.price-amt span { font-size: 1rem; color: var(--ink-3); }
.price-card ul {
  margin: 1rem 0 1.3rem;
  padding: 0;
  list-style: none;
  flex: 1;
}
.price-card li {
  padding: 0.35rem 0 0.35rem 1.15rem;
  position: relative;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.price-card li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.25em 0.6em;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

/* FAQ */
.faq { display: grid; gap: 0.6rem; max-width: 720px; }
.faq details {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.15rem 1rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.85rem 0;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  font-weight: 400;
  color: var(--ink-4);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 0.95rem; color: var(--ink-2); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.2rem 0 2.6rem;
  color: var(--ink-3);
  font-size: 0.9rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-footer strong { color: var(--ink-2); font-weight: 600; }

/* ========== App shell ========== */
body.app { background: #efe8db; }
.app-header .wrap { width: min(1440px, calc(100% - 32px)); }
.app-nav a.is-active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.pro-pill {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--rule-2);
  padding: 0.28em 0.55em;
  border-radius: 999px;
  color: var(--ink-3);
}
.pro-pill.on { background: var(--sage); color: #f3f7f4; border-color: var(--sage); }

.app-body {
  width: min(1440px, calc(100% - 32px));
  margin: 1.1rem auto 2.5rem;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1rem;
  min-height: calc(100vh - var(--header-h) - 3rem);
  align-items: start;
}

.panel {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.side {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  max-height: calc(100vh - var(--header-h) - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.side-head {
  padding: 0.9rem 0.95rem 0.7rem;
  border-bottom: 1px solid var(--rule);
}
.side-actions { display: flex; gap: 0.4rem; margin-bottom: 0.7rem; }
.side-actions .btn { flex: 1; }
.search {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  outline: none;
}
.search:focus { border-color: var(--ink-3); }
.doc-list { overflow: auto; padding: 0.4rem; flex: 1; }
.doc-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.65rem 0.7rem;
}
.doc-item:hover { background: var(--paper); }
.doc-item.is-active { background: var(--paper); border-color: var(--rule); }
.doc-item .n { font-weight: 650; font-size: 0.92rem; }
.doc-item .m { font-size: 0.8rem; color: var(--ink-3); display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.15rem; }
.tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
}
.tag.facture { color: var(--accent); }
.empty-side { padding: 1.2rem; color: var(--ink-3); font-size: 0.9rem; }

.main { min-width: 0; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--rule);
}
.toolbar .spacer { flex: 1; }
.view-pages { display: none; }
.view-pages.is-on { display: block; }

/* Paper sheet */
.canvas { padding: 1.4rem 1rem 2rem; background: #e8e0d0; }
.sheet {
  width: min(210mm, 100%);
  margin: 0 auto;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  padding: 14mm 16mm 16mm;
  position: relative;
  min-height: 280mm;
  overflow: hidden;
}
.sheet.watermarked::after {
  content: "Emis — version gratuite";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--ink);
  opacity: 0.07;
  transform: rotate(-28deg);
  pointer-events: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.doc-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 1rem;
  margin-bottom: 1.15rem;
}
.seller-name {
  font-family: var(--serif);
  font-size: 1.55rem;
  margin: 0 0 0.25rem;
  line-height: 1.15;
}
.seller-block, .client-block { font-size: 0.92rem; color: var(--ink-2); white-space: pre-line; }
.doc-title {
  font-family: var(--serif);
  font-size: 1.7rem;
  margin: 0 0 0.45rem;
  text-align: right;
  letter-spacing: 0.02em;
}
.doc-meta { text-align: right; font-size: 0.9rem; }
.doc-meta div { display: flex; justify-content: flex-end; gap: 0.8rem; }
.doc-meta span { color: var(--ink-3); min-width: 8.5rem; text-align: right; }

.parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.3rem; }
.kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 0.25rem;
}

.lines { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 1rem; }
.lines th {
  text-align: left;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 650;
  border-bottom: 1.5px solid var(--ink);
  padding: 0.35rem 0.35rem 0.5rem;
}
.lines td {
  padding: 0.28rem 0.25rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
.lines th.num, .lines td.num { text-align: right; }
.lines input, .lines select {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 0.28rem 0.2rem;
  border-radius: 4px;
}
.lines input:hover, .lines select:hover,
.lines input:focus, .lines select:focus {
  background: var(--paper);
  border-color: var(--rule);
  outline: none;
}
.lines .w-des { width: auto; }
.lines .w-qty { width: 4.2rem; }
.lines .w-unit { width: 5.2rem; }
.lines .w-pu { width: 6.2rem; }
.lines .w-tva { width: 5.4rem; }
.lines .w-tot { width: 6.4rem; }
.lines .w-del { width: 2rem; }
.icon-btn {
  background: none;
  border: none;
  color: var(--ink-4);
  padding: 0.2rem;
  font-size: 1.1rem;
  line-height: 1;
}
.icon-btn:hover { color: var(--accent); }
.add-line {
  background: none;
  border: 1px dashed var(--rule-2);
  width: 100%;
  padding: 0.45rem;
  border-radius: 6px;
  color: var(--ink-3);
  margin-bottom: 1.2rem;
}
.add-line:hover { background: var(--paper); color: var(--ink); }

.bottom { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1.5rem; }
.mentions { font-size: 0.78rem; color: var(--ink-2); }
.mentions h4 {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
  color: var(--ink-3);
}
.totals { font-size: 0.92rem; }
.totals .row { display: flex; justify-content: space-between; padding: 0.22rem 0; gap: 1rem; }
.totals .row.ttc {
  border-top: 1.5px solid var(--ink);
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.franchise-note {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-2);
  margin-top: 0.35rem;
}
.bon {
  margin-top: 1.6rem;
  border: 1px solid var(--ink);
  padding: 0.85rem 1rem;
  min-height: 6.2rem;
}
.bon strong { font-family: var(--serif); font-size: 1.05rem; }
.bon p { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--ink-2); }

.field {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 0.1rem 0.15rem;
  border-radius: 4px;
}
.field:hover, .field:focus { background: var(--paper); border-color: var(--rule); outline: none; }
textarea.field { resize: vertical; min-height: 3.2rem; }

/* Settings / clients pages */
.page {
  padding: 1.4rem 1.5rem 2rem;
}
.page h1 { font-size: 1.7rem; margin: 0 0 0.3rem; }
.page-intro { color: var(--ink-3); margin-bottom: 1.4rem; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
  max-width: 760px;
}
.form-grid .full { grid-column: 1 / -1; }
label.lbl { display: flex; flex-direction: column; gap: 0.28rem; font-size: 0.82rem; font-weight: 650; color: var(--ink-2); }
.inp, .sel, .txa {
  font-weight: 400;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  outline: none;
}
.inp:focus, .sel:focus, .txa:focus { border-color: var(--ink-3); background: var(--sheet); }
.help { font-weight: 400; color: var(--ink-4); font-size: 0.8rem; }
.client-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.client-table th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--ink);
  padding: 0.4rem;
}
.client-table td { padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--rule); }

/* Modal */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(27, 23, 20, 0.38);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 1.2rem;
}
.modal-back.is-on { display: flex; }
.modal {
  background: var(--sheet);
  border-radius: 14px;
  max-width: 440px;
  width: 100%;
  padding: 1.5rem 1.45rem 1.4rem;
  box-shadow: var(--shadow-lg);
}
.modal h2 { margin: 0 0 0.4rem; font-size: 1.45rem; }
.modal p { color: var(--ink-2); }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.1rem; }

.toast {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 90;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.2s;
}
.toast.is-on { opacity: 1; transform: none; }

/* Landing extras */
.rule-ornament {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin: 0 0 1.1rem;
}
.legal-box {
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.hero-aside { position: relative; }

@media (max-width: 960px) {
  .hero-grid, .steps, .pricing, .app-body, .parties, .bottom, .form-grid {
    grid-template-columns: 1fr;
  }
  .price-card.featured { transform: none; }
  .side { position: static; max-height: none; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav.is-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.8rem 1.2rem 1rem;
  }
  .hero { padding-top: 2.6rem; }
  .sheet { padding: 10mm; min-height: 0; }
  .doc-head { grid-template-columns: 1fr; }
  .doc-title, .doc-meta { text-align: left; }
  .doc-meta div { justify-content: flex-start; }
  .doc-meta span { text-align: left; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .nav-cta .btn-ghost { display: none; }
  .hero h1 { font-size: 2.15rem; }
  .lines .w-unit, .lines .w-tva { display: none; }
}

/* Print */
@media print {
  :root { --sheet: #fff; --ink: #000; --ink-2: #222; }
  body { background: #fff !important; }
  .site-header, .toolbar, .side, .toast, .modal-back, .no-print,
  .add-line, .icon-btn, .nav-toggle { display: none !important; }
  .app-body { display: block; width: 100%; margin: 0; }
  .main, .panel { border: none; box-shadow: none; background: #fff; }
  .canvas { background: #fff; padding: 0; }
  .sheet {
    width: 100%;
    box-shadow: none;
    padding: 0;
    min-height: 0;
    overflow: visible;
  }
  .sheet.watermarked::after {
    opacity: 0.12;
    font-size: 2rem;
  }
  .field, .lines input, .lines select {
    border: none !important;
    background: transparent !important;
    appearance: none;
    -webkit-appearance: none;
  }
  a { color: inherit; text-decoration: none; }
  @page { size: A4; margin: 14mm 14mm 16mm; }
}

/* Frozen / avoir / watermark CTA */
.frozen-banner, .scope-note, .wm-bar {
  font-size: 0.85rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-2);
}
.frozen-banner strong { color: var(--accent); }
.wm-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-soft);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, var(--rule));
}
.wm-bar p { margin: 0; }
.scope-note {
  background: var(--sage-soft);
  max-width: none;
}
.tag.avoir { color: var(--ink); }
.tag.brouillon { color: var(--ink-4); }
.tag.converti { color: var(--ink-3); }
.sheet .wm {
  position: absolute;
  inset: 18%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  color: var(--ink);
  opacity: 0.08;
  transform: rotate(-28deg);
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.sheet.is-frozen .field,
.sheet.is-frozen .lines input,
.sheet.is-frozen .lines select {
  pointer-events: none;
}
.livraison { margin: 0 0 1.1rem; font-size: 0.92rem; color: var(--ink-2); }
.chk {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.chk input { margin-top: 0.2rem; }
.doc-extra {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}
.ref-avoir {
  font-size: 0.92rem;
  margin: 0 0 0.8rem;
  color: var(--accent);
}
.client-pick { margin-bottom: 0.45rem; }
.help-warn { color: var(--accent); font-weight: 500; }
.landing-scope {
  border: 1px solid var(--rule);
  background: var(--sheet);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.landing-scope strong { color: var(--ink); }
.toolbar .btn-cta-pro {
  background: var(--accent);
  color: #fff8f4;
}

@media (max-width: 960px) {
  .doc-extra { grid-template-columns: 1fr; }
}

@media print {
  .frozen-banner, .wm-bar, .scope-note, .client-pick, .toolbar, .add-line { display: none !important; }
  .sheet .wm { opacity: 0.12; }
  .sheet { overflow: visible; }
}

.parties > div:empty { min-height: 0; }
@media (max-width: 960px) {
  .parties > div:empty { display: none; }
}
@media print {
  .parties { grid-template-columns: 1fr 1fr; }
  .doc-extra { grid-template-columns: 1fr 1fr 1fr; }
  .wm-bar, .frozen-banner, .scope-note { display: none !important; }
}

/* Footer links (landing, app, articles) */
.footer-meta { margin-top: 0.35rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.2rem;
  align-items: center;
}
.footer-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
}
.footer-links a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

body.app .site-footer {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto 1.6rem;
  padding: 0 0 0.4rem;
  border-top: none;
}
body.app .site-footer .wrap {
  width: 100%;
  padding: 1rem 1.2rem;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 12px;
}

@media print {
  body.app .site-footer { display: none !important; }
}

/* Article pages */
.article-wrap { width: min(760px, calc(100% - 48px)); margin-inline: auto; }
.article { padding: 2.5rem 0 4.2rem; }
.crumbs {
  font-size: 0.88rem;
  color: var(--ink-4);
  margin-bottom: 1.15rem;
}
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.article h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.65rem);
  line-height: 1.12;
  margin: 0.15em 0 0.45em;
}
.lede-article {
  font-size: 1.12rem;
  color: var(--ink-2);
  margin-bottom: 1.5rem;
}
.updated {
  font-size: 0.82rem;
  color: var(--ink-4);
  margin-bottom: 1.4rem;
}
.prose h2 {
  font-size: 1.42rem;
  margin: 2.15rem 0 0.55rem;
}
.prose h3 {
  font-size: 1.08rem;
  margin: 1.35rem 0 0.4rem;
}
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin: 0.32rem 0; }

.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
}
.checklist > li {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.65rem;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin: 0.5rem 0;
}
.checklist .mark {
  color: var(--accent);
  font-weight: 700;
  line-height: 1.45;
}
.checklist strong { color: var(--ink); }

.callout {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 1.3rem 0;
  color: var(--ink-2);
}
.callout.honest {
  border-left-color: var(--sage);
  background: var(--sage-soft);
}
.callout h3 { margin: 0 0 0.35rem; font-size: 1.05rem; color: var(--ink); }

.cta-panel {
  background: var(--sheet);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.5rem;
  margin: 2.2rem 0 1.2rem;
}
.cta-panel h2 { margin: 0 0 0.4rem; font-size: 1.35rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

.mentions-table, .compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  margin: 1rem 0 1.4rem;
}
.mentions-table th, .mentions-table td,
.compare th, .compare td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.mentions-table th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--ink);
}
.compare th { font-family: var(--serif); font-weight: 500; }
.compare .yes { color: var(--sage); font-weight: 650; }
.compare .no { color: var(--ink-3); }

.source { font-size: 0.9rem; color: var(--ink-3); }
.related { display: grid; gap: 0.55rem; margin-top: 0.8rem; }
.related a {
  display: block;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.related a:hover { border-color: var(--ink); }
.related a span {
  display: block;
  color: var(--ink-3);
  font-size: 0.88rem;
  font-weight: 400;
  margin-top: 0.2rem;
}

@media (max-width: 640px) {
  .article-wrap { width: calc(100% - 28px); }
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.license-box {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  background: var(--sheet);
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin: 1rem 0;
  text-align: center;
}
