/* CloseFlow Relance : feuille de style commune (site, application, pages légales).
   Monochrome, clair par défaut (bouton « Mode sombre »). Aucune ressource externe. */

:root, :root[data-theme="light"] {
  --bg: #f7f7f6; --bg2: #efefed; --card: #ffffff; --line: #e4e4e1; --line2: #d4d4d0;
  --ink: #0b0b0b; --ink2: #3d3d3b; --muted: #75756f;
  --accent: #0b0b0b; --accent-ink: #ffffff; --accent-soft: #ececea;
  --green: #15803d; --green-soft: #e5f3ea;
  --amber: #8a5300; --amber-soft: #fbf0dc;
  --red: #b42318; --red-soft: #fcebea;
  --bubble: #dcf8c6; --bubble-ink: #111b21; --bubble-in: #ffffff; --chat: #efe7dd;
  --shadow: 0 1px 2px rgba(0,0,0,.04);
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0b0b; --bg2: #171717; --card: #131313; --line: #242424; --line2: #333333;
  --ink: #f5f5f4; --ink2: #d0d0cd; --muted: #8e8e89;
  --accent: #f5f5f4; --accent-ink: #0b0b0b; --accent-soft: #1d1d1d;
  --green: #4ade80; --green-soft: #13251a;
  --amber: #f3b75a; --amber-soft: #2a2010;
  --red: #ff8a80; --red-soft: #2e1615;
  --bubble: #005c4b; --bubble-ink: #e9edef; --bubble-in: #202c33; --chat: #0b141a;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.12; margin: 0; font-weight: 600; }
p { margin: 0 0 12px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.title-xl { font-size: clamp(40px, 6vw, 60px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.02; }
.sm-only { display: none; }

/* ---------- Marque ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; font-size: 16px; white-space: nowrap; line-height: 1.1; }
.brand img { width: 34px; height: 34px; }
.brand small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

/* ---------- Boutons et champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 15px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line2); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { border-color: var(--muted); background: var(--accent-soft); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { opacity: .88; background: var(--accent); }
.btn.ghost { border-color: transparent; }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.lg { padding: 13px 22px; font-size: 16px; border-radius: 14px; }
.btn.sm { padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.caps { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.link { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--ink); }

label.field { display: block; font-size: 14px; font-weight: 500; margin: 16px 0 7px; color: var(--ink2); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=time], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line2); border-radius: 14px;
  background: var(--bg2); color: var(--ink); font: inherit; font-size: 16px;
}
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e8e89' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--muted); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink2); line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--ink); }

/* ---------- Blocs ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.note { border-radius: 12px; padding: 11px 14px; font-size: 14px; margin: 12px 0 0; line-height: 1.45; }
.note.ok { background: var(--green-soft); color: var(--green); }
.note.warn { background: var(--amber-soft); color: var(--amber); }
.note.bad { background: var(--red-soft); color: var(--red); }
.note.info { background: var(--accent-soft); color: var(--ink2); }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, var(--line2)); }
.pill.off { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 35%, var(--line2)); }
.pill.bad { color: var(--red); }
.tag { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--bg2); color: var(--muted); white-space: nowrap; }
.tag.new { background: var(--accent); color: var(--accent-ink); }
.tag.ok { background: var(--green-soft); color: var(--green); }
.tag.bad { background: var(--red-soft); color: var(--red); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 220px; min-width: 0; }

/* ---------- En-tête et pied du site public ---------- */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 12px; height: 68px; }
.nav .links { display: flex; gap: 4px; margin-left: 24px; }
.nav .links a { color: var(--muted); text-decoration: none; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px; border-radius: 8px; }
.nav .links a:hover { color: var(--ink); }
.nav .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
footer.site { border-top: 1px solid var(--line); padding: 30px 0 38px; margin-top: 40px; font-size: 14px; color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
footer.site a { color: var(--ink2); text-decoration: none; }
footer.site a:hover { color: var(--ink); }
@media (max-width: 860px) { .nav .links { display: none; } .nav .end .hide-sm { display: none; } }
@media (max-width: 480px) { .lg-only { display: none; } .sm-only { display: inline; } .brand small { display: none; } }

/* ---------- Landing ---------- */
.hero { padding: 84px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero .kicker { margin-bottom: 20px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--muted); }
.hero .lead { font-size: 18px; color: var(--muted); margin: 22px 0 30px; max-width: 34em; }
.hero .ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .reassure { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 24px; font-size: 14px; color: var(--muted); }
.hero .reassure span::before { content: "✓"; color: var(--ink); font-weight: 700; margin-right: 7px; }

.mock { position: relative; }
.mock .panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px; }
.mock .bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.mock .bar b { font-size: 17px; font-weight: 600; }
.mock .stats4 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.mock .stat { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.mock .stat b { display: block; font-size: 26px; font-weight: 500; line-height: 1.1; letter-spacing: -0.03em; }
.mock .stat span { font-size: 11px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.mock .chat { background: var(--chat); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.mock .msg { max-width: 85%; padding: 8px 11px; border-radius: 10px; font-size: 14px; line-height: 1.4; color: var(--bubble-ink); }
.mock .msg.out { background: var(--bubble); margin-left: auto; border-bottom-right-radius: 3px; }
.mock .msg.in { background: var(--bubble-in); border-bottom-left-radius: 3px; }
.mock .msg small { display: block; text-align: right; font-size: 11px; opacity: .6; margin-top: 2px; }
.mock .float { position: absolute; left: -22px; bottom: -18px; background: var(--card); border: 1px solid var(--line2); border-radius: 14px; padding: 10px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.mock .float i { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 13px; }

section.block { padding: 72px 0; border-top: 1px solid var(--line); }
.head { max-width: 660px; margin-bottom: 38px; }
.head .kicker { margin-bottom: 14px; }
.head h2 { font-size: clamp(28px, 3.8vw, 42px); font-weight: 500; letter-spacing: -0.04em; }
.head p { color: var(--muted); font-size: 17px; margin-top: 14px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: s; }
.steps li { list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps li::before { counter-increment: s; content: "0" counter(s); display: block; font-size: 12px; font-weight: 600; letter-spacing: .2em; color: var(--muted); margin-bottom: 18px; }
.steps h3 { font-size: 17px; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 15px; margin: 0; }
ol.steps { padding: 0; margin: 0; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feature .ico { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line2); color: var(--ink); display: grid; place-items: center; margin-bottom: 18px; }
.feature .ico svg { width: 20px; height: 20px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; font-size: 15px; }
.feature ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 15px; }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.trust div { padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.trust b { display: block; margin-bottom: 6px; font-weight: 600; }
.trust span { color: var(--muted); font-size: 15px; }

.callout { display: flex; gap: 16px; align-items: flex-start; border: 1px solid color-mix(in srgb, var(--amber) 40%, var(--line)); background: var(--amber-soft); border-radius: var(--radius); padding: 20px 22px; margin-top: 28px; }
.callout svg { color: var(--amber); flex: none; margin-top: 2px; }
.callout b { color: var(--amber); }
.callout p { margin: 4px 0 0; color: var(--ink2); font-size: 15px; }

.final { text-align: center; padding: 84px 0; border-top: 1px solid var(--line); }
.final h2 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 500; letter-spacing: -0.045em; }
.final p { color: var(--muted); font-size: 17px; margin: 16px auto 28px; max-width: 34em; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding: 52px 0 44px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .trust { grid-template-columns: 1fr; }
  .mock .float { left: 8px; }
}
@media (max-width: 600px) { .steps, .features { grid-template-columns: 1fr; } section.block { padding: 52px 0; } }

/* ---------- Pages légales ---------- */
.legal { padding: 56px 0 24px; }
.legal .kicker { margin-bottom: 14px; }
.legal h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 500; letter-spacing: -0.045em; }
.legal .meta { color: var(--muted); font-size: 14px; margin: 12px 0 30px; }
.legal h2 { font-size: 21px; margin: 40px 0 12px; }
.legal h3 { font-size: 17px; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--ink2); }
.legal ul { padding-left: 20px; margin: 0 0 12px; }
.legal li { margin-bottom: 6px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 16px; }
.legal th, .legal td { text-align: left; padding: 11px 12px 11px 0; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink2); }
.legal th { color: var(--ink); font-weight: 600; }
.legal .tablewrap { overflow-x: auto; }
.legal .toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 8px; }
.legal .toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.legal .toc a { color: var(--ink2); text-decoration: none; }
.legal .toc a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 600px) { .legal .toc ol { columns: 1; } }
.todo { background: var(--amber-soft); color: var(--amber); font-weight: 600; padding: 0 5px; border-radius: 4px; }
