/* UniReader — one stylesheet for the three sites.
   <html data-platform="apple|win"> picks the family look: Apple's purple gradient and system font,
   Windows' blue-teal and Segoe. <html data-theme="light|dark"> forces a theme chosen on the site;
   without it, the system's preference applies. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --bg: #faf9f6;
  --bg-tint: #f2f1ee;
  --card: #ffffff;
  --fg: #1d1d1f;
  --muted: #5f5f66;
  --line: rgba(0, 0, 0, .09);
  --accent: #0071e3;
  --accent-ink: #ffffff;
  --hero-a: #667eea;
  --hero-b: #764ba2;
  --hero-fg: #ffffff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 12px 32px rgba(0, 0, 0, .08);
  --max: 1120px;
  --narrow: 760px;
  color-scheme: light;
}
:root[data-platform="win"] {
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --bg: #f7f8fb;
  --bg-tint: #eef2f8;
  --fg: #14171f;
  --muted: #566070;
  --accent: #1466d6;
  --hero-a: #1466d6;
  --hero-b: #159a86;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161618; --bg-tint: #1d1d20; --card: #232326; --fg: #f2f2f4; --muted: #a3a3ad;
    --line: rgba(255, 255, 255, .1); --accent: #2997ff; --hero-a: #3f4380; --hero-b: #4f2f72;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35); color-scheme: dark;
  }
  :root[data-platform="win"]:not([data-theme="light"]) {
    --bg: #12151b; --bg-tint: #181c24; --card: #1e232c; --accent: #4c9bff; --hero-a: #134a96; --hero-b: #0f6b5e;
  }
}
:root[data-theme="dark"] {
  --bg: #161618; --bg-tint: #1d1d20; --card: #232326; --fg: #f2f2f4; --muted: #a3a3ad;
  --line: rgba(255, 255, 255, .1); --accent: #2997ff; --hero-a: #3f4380; --hero-b: #4f2f72;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35); color-scheme: dark;
}
:root[data-platform="win"][data-theme="dark"] {
  --bg: #12151b; --bg-tint: #181c24; --card: #1e232c; --accent: #4c9bff; --hero-a: #134a96; --hero-b: #0f6b5e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6;
  background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .5em; }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 19px; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); }
.center { text-align: center; }
.lead { font-size: 19px; color: var(--muted); max-width: 720px; }
.center .lead { margin-left: auto; margin-right: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }

/* ── En-tête ── */
.top {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
}
.bar { max-width: var(--max); margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; flex-shrink: 0; align-items: center; gap: 9px; color: var(--fg); font-weight: 650; font-size: 18px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.brand em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 15px; }
.anchors { display: flex; gap: 18px; margin-left: auto; min-width: 0; }
.anchors a { color: var(--fg); font-size: 15px; opacity: .82; white-space: nowrap; }
.anchors a:hover { opacity: 1; text-decoration: none; color: var(--accent); }
.tools { display: flex; flex-shrink: 0; align-items: center; gap: 10px; }
.lang select {
  font: inherit; font-size: 14px; color: var(--fg); background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 28px 6px 12px; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.theme { border: 1px solid var(--line); background: var(--card); color: var(--fg); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px; }
.get {
  background: var(--accent); color: var(--accent-ink); padding: 8px 16px; border-radius: 999px; font-size: 14px;
  font-weight: 600; white-space: nowrap;
}
.get:hover { text-decoration: none; filter: brightness(1.08); }
.burger { display: none; width: 38px; height: 34px; border: 0; background: none; cursor: pointer; position: relative; }
.burger span, .burger span::before, .burger span::after {
  position: absolute; left: 9px; width: 20px; height: 2px; background: var(--fg); border-radius: 2px; content: "";
}
.burger span { top: 16px; } .burger span::before { top: -6px; left: 0; } .burger span::after { top: 6px; left: 0; }

@media (max-width: 1320px) {
  .get { display: none; }
}
@media (max-width: 900px) {
  .anchors {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 16px;
  }
  .anchors a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .top.open .anchors { display: flex; }
  .burger { display: block; }
  .tools { margin-left: auto; }
  .brand em { display: none; }
}
/* Same menu when the links of a long language don't fit beside the tools (set by site.js). */
.top.compact .anchors {
  display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
  background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 16px;
}
.top.compact .anchors a { padding: 10px 0; border-bottom: 1px solid var(--line); }
.top.compact.open .anchors { display: flex; }
.top.compact .burger { display: block; }
.top.compact .tools { margin-left: auto; }
@media (max-width: 520px) {
  .bar { gap: 10px; padding: 10px 16px; }
  .tools { gap: 6px; }
  .lang select { max-width: 116px; padding-right: 24px; }
  .wrap { padding: 0 18px; }
}

/* ── Accueil : le pourquoi ── */
.hero {
  background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); color: var(--hero-fg);
  padding: 72px 0 0; overflow: hidden;
}
.hero-in { text-align: center; max-width: 860px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 650; opacity: .85; margin-bottom: 14px; }
.hero h1 { font-size: clamp(38px, 6.4vw, 66px); font-weight: 750; letter-spacing: -.03em; margin-bottom: 26px; }
.why p { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.55; opacity: .94; max-width: 720px; margin: 0 auto 14px; }
.cta { margin: 30px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cta .trial { font-size: 16px; opacity: .92; margin: 0; }
.cta .trial strong { font-weight: 650; }
.store img { display: block; height: 52px; width: auto; }
.store.big img { height: 58px; }
.also { margin: 22px 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: 15px; }
.also > span { opacity: .8; }
.chip {
  color: var(--hero-fg); border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; padding: 4px 12px;
  background: rgba(255, 255, 255, .1);
}
.chip:hover { background: rgba(255, 255, 255, .22); text-decoration: none; }
.hero-shot { margin-top: 48px; max-width: 1040px; }
.hero-shot img {
  display: block; margin: 0 auto -6px; max-height: 640px; width: auto; border-radius: 14px 14px 0 0; box-shadow: 0 -10px 60px rgba(0, 0, 0, .28);
}

/* ── Blocs ── */
.block { padding: 88px 0; }
.tint { background: var(--bg-tint); }
.block h2 { margin-bottom: 14px; }
.block .lead { margin-bottom: 36px; }

.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.steps li { background: var(--card); border-radius: var(--radius); padding: 28px 26px 24px; box-shadow: var(--shadow); }
.steps .n {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); color: #fff; font-weight: 700; margin-bottom: 14px;
}
.steps p { color: var(--muted); margin: 0; }

.pills { list-style: none; padding: 0; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 820px; }
.pills li {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px;
  font-weight: 650; font-size: 15px; letter-spacing: .02em;
}

.spot { padding: 88px 0; }
.spot + .spot { padding-top: 0; }
.spot-in { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.spot.flip .spot-in { grid-template-columns: 7fr 5fr; }
.spot.flip .spot-text { order: 2; }
.kicker { color: var(--accent); font-weight: 650; font-size: 15px; margin-bottom: 8px; }
.spot-text p:not(.kicker) { color: var(--muted); font-size: 18px; }
.spot figure { margin: 0; display: flex; justify-content: center; }
/* A phone screenshot is tall: keep it beside its text instead of running far below it. */
.spot figure .shot { max-width: 100%; max-height: min(600px, 78vh); width: auto; height: auto; }
.shot { border-radius: 12px; box-shadow: var(--shadow); display: block; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.cards li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; }
.cards .ic { font-size: 26px; display: block; margin-bottom: 8px; }
.cards h3 { margin-bottom: 6px; }
.cards p { color: var(--muted); font-size: 15.5px; margin: 0; }

.gallery {
  list-style: none; margin: 8px 0 0; padding: 8px max(24px, calc((100vw - var(--max)) / 2 + 24px)) 18px;
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.gallery li { flex: 0 0 auto; scroll-snap-align: center; }
.gallery img { height: 380px; width: auto; border-radius: 12px; box-shadow: var(--shadow); display: block; cursor: zoom-in; }
.gallery img.phone { height: 520px; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 860px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.plan h3 { font-size: 24px; margin-bottom: 2px; }
.plan .sub { color: var(--muted); margin-bottom: 16px; }
.plan ul { margin: 0; padding-left: 1.1em; }
.plan li { margin: 6px 0; }
.plan.premium { border: 2px solid transparent; background:
  linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, var(--hero-a), var(--hero-b)) border-box; }
.note { color: var(--muted); font-size: 15px; margin-top: 22px; max-width: 860px; }

.platforms { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 860px; }
.platforms a {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--fg);
}
.platforms a:hover { text-decoration: none; border-color: var(--accent); }
.platforms strong { display: block; font-size: 18px; margin-bottom: 6px; }
.platforms strong::after { content: " →"; color: var(--accent); }
.platforms span { color: var(--muted); font-size: 15.5px; }

.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; padding: 14px 28px 14px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 24px; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); }

.final { padding: 96px 0; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); color: var(--hero-fg); }
.final p { font-size: 19px; opacity: .92; }
.final .store { display: inline-block; margin-top: 10px; }

/* ── Pages de texte ── */
.page-head { padding: 64px 0 24px; }
.page-head h1 { font-size: clamp(36px, 5vw, 52px); }
.page-head .eyebrow { color: var(--accent); opacity: 1; }
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; }
.button { background: var(--accent); color: var(--accent-ink); padding: 11px 20px; border-radius: 999px; font-weight: 600; }
.button:hover { text-decoration: none; filter: brightness(1.08); }
.contact span { color: var(--muted); }
.prose { padding-bottom: 80px; }
.prose section { border-top: 1px solid var(--line); padding: 28px 0 8px; }
.prose h2 { font-size: 24px; }
.prose li { margin: 6px 0; }
.changelog h2 time { font-size: 15px; color: var(--muted); font-weight: 500; margin-left: 8px; }
.log { list-style: none; padding: 0; }
.log li { margin: 10px 0; }
.kind { display: inline-block; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; border-radius: 6px;
  padding: 2px 7px; margin-right: 8px; background: var(--bg-tint); color: var(--muted); }
.kind.feature { color: #fff; background: var(--accent); }
.kind.fix { color: #fff; background: #2e8b57; }

/* ── Pied de page ── */
.foot { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 15px; color: var(--muted); }
.foot .wrap { display: grid; grid-template-columns: 1fr auto; gap: 14px 32px; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 9px; color: var(--fg); font-weight: 650; }
.foot-brand img { border-radius: 7px; }
.foot-brand span { color: var(--muted); font-weight: 400; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-others span { color: var(--muted); }
.foot .copy { margin: 0; }

/* ── Visionneuse ── */
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .86); display: grid; place-items: center; z-index: 100; cursor: zoom-out; padding: 24px; }
.lightbox img { max-height: 92vh; max-width: 96vw; width: auto; border-radius: 10px; }

@media (max-width: 860px) {
  .steps, .plans, .platforms { grid-template-columns: 1fr; }
  .spot-in, .spot.flip .spot-in { grid-template-columns: 1fr; gap: 28px; }
  .spot.flip .spot-text { order: 0; }
  .block, .spot { padding: 64px 0; }
  .hero { padding-top: 52px; }
  .gallery img { height: 240px; } .gallery img.phone { height: 400px; }
  .foot .wrap { grid-template-columns: 1fr; }
}
[dir="rtl"] .faq summary { padding: 14px 0 14px 28px; }
[dir="rtl"] .faq summary::after { right: auto; left: 4px; }
[dir="rtl"] .platforms strong::after { content: " ←"; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ── Mode d'emploi ── */
.guide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.guide-toc { position: sticky; top: 84px; font-size: 15px; max-height: calc(100vh - 100px); overflow: auto; }
.guide-toc summary { list-style: none; pointer-events: none; margin: 0 0 12px; }
.guide-toc summary::-webkit-details-marker { display: none; }
.toc-label { font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.toc-current { display: none; }
.guide-toc a[aria-current] { background: var(--bg-tint); color: var(--accent); }
.guide-toc ol { list-style: none; padding: 0; margin: 0; }
.guide-toc li { margin: 2px 0; }
.guide-toc a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--fg); }
.guide-toc a:hover { background: var(--bg-tint); text-decoration: none; }
.guide-body { max-width: var(--narrow); }
.guide-body section { padding-top: 32px; scroll-margin-top: 64px; }
.guide-body h3 { margin-top: 26px; }
.guide-body figure { margin: 22px 0; }
.goals { background: var(--bg-tint); border-radius: 12px; padding: 14px 20px; margin: 0 0 18px; }
.goals p { margin: 0 0 4px; font-weight: 650; font-size: 14px; color: var(--muted); }
.goals ul { margin: 0; padding-left: 1.1em; }
.tip { border-inline-start: 4px solid var(--accent); background: var(--card); border-radius: 0 10px 10px 0; padding: 12px 16px; margin: 18px 0; }
.steps-list li { margin: 8px 0; }
@media (max-width: 860px) {
  .guide { grid-template-columns: 1fr; gap: 8px; }
  /* Narrow window: a bar that stays under the header, showing the chapter being read, and opens as a list. */
  .guide-toc {
    top: var(--top-h, 57px); z-index: 30; max-height: none; overflow: visible;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .guide-toc summary { pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 0; }
  .guide-toc summary::after {
    content: ""; margin-inline-start: auto; width: 8px; height: 8px; flex-shrink: 0;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg);
  }
  .guide-toc details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
  .toc-current { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .guide-toc details[open] ol { max-height: 60vh; overflow: auto; padding-bottom: 12px; }
  .guide-body section { scroll-margin-top: 120px; }
}
