/* SyllabScan — feuille de style commune (aucune ressource externe). */

:root {
  --bg: #f2f7f6;
  --surface: #ffffff;
  --heading: #0b2b2b;
  --text: #1f3332;
  --muted: #4b5b5a;
  --line: #dbe7e5;
  --brand: #0f766e;
  --brand-strong: #0b5f58;
  --on-brand: #ffffff;
  --accent: #e8722d;
  --tint: #e3f1ef;
  --hero-a: #0b2b2b;
  --hero-b: #0f3f3b;
  --word-a: #0f766e;
  --word-b: #e8722d;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(11, 43, 43, 0.08);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #081817;
    --surface: #0f2423;
    --heading: #e8f4f2;
    --text: #d3e3e1;
    --muted: #9db4b1;
    --line: #1f3d3b;
    --brand: #2dd4bf;
    --brand-strong: #5eead4;
    --on-brand: #042f2c;
    --accent: #fb923c;
    --tint: #123432;
    --word-a: #2dd4bf;
    --word-b: #fb923c;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--brand); color: var(--on-brand);
  padding: 8px 14px; border-radius: 10px; z-index: 10;
}
.skip-link:focus { left: 12px; }

/* ── En-tête ─────────────────────────────────────────────────────────── */

.site-header { padding: 18px 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; display: block; }

.wordmark { font-weight: 800; font-size: 1.45rem; letter-spacing: -0.5px; line-height: 1; }
.wordmark .a { color: var(--word-a); }
.wordmark .b { color: var(--word-b); }

.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--brand); }

/* ── Héros ───────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(135deg, var(--hero-a), var(--hero-b));
  color: #ffffff;
  border-radius: 0 0 40px 40px;
  overflow: hidden;
  position: relative;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.hero::before { width: 520px; height: 520px; right: -140px; top: -200px; background: rgba(15, 118, 110, 0.38); }
.hero::after { width: 360px; height: 360px; left: -120px; bottom: -190px; background: rgba(255, 255, 255, 0.05); }

.hero .site-header { position: relative; z-index: 1; }
.hero .site-header .nav a { color: #d7ebe8; }
.hero .site-header .nav a:hover { color: #ffffff; }
.hero .wordmark .a { color: #5eead4; }
.hero .wordmark .b { color: #fb923c; }

.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center;
  padding-top: 40px; padding-bottom: 72px;
}

.eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); color: #bff3ea;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.08; letter-spacing: -1px; margin: 18px 0 16px; font-weight: 800; }
h1 .hl { color: #fb923c; }

.lead { font-size: 1.15rem; color: #d7ebe8; max-width: 34em; margin: 0 0 28px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.3); color: #ffffff;
  font-weight: 700; font-size: 0.95rem; line-height: 1.2;
}
.store-badge small { display: block; font-weight: 500; opacity: 0.8; font-size: 0.75rem; }
/* Badge devenu lien (app publiée sur ce store). */
a.store-badge { text-decoration: none; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.55); }
a.store-badge:hover { background: rgba(255, 255, 255, 0.2); border-color: #ffffff; }
a.store-badge:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; }

/* Illustration : document balayé par la ligne de scan (écho de l'app). */

.hero-art { display: flex; justify-content: center; }
.doc {
  position: relative; width: min(100%, 270px); aspect-ratio: 5 / 6;
  background: #ffffff; border-radius: 22px; padding: 30px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.doc::before, .doc::after, .doc .c1, .doc .c2 {
  content: ""; position: absolute; width: 26px; height: 26px; border: 4px solid #e8722d;
}
.doc::before { top: -10px; left: -10px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.doc::after { top: -10px; right: -10px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.doc .c1 { bottom: -10px; left: -10px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.doc .c2 { bottom: -10px; right: -10px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }

.doc-lines, .doc-lit { display: flex; flex-direction: column; gap: 13px; }
.doc-lines span, .doc-lit span { display: block; height: 7px; border-radius: 4px; background: #dce3e2; }
.doc-lines span:nth-child(4n+1), .doc-lit span:nth-child(4n+1) { height: 10px; width: 52%; }
.doc-lines span:nth-child(4n+2), .doc-lit span:nth-child(4n+2) { width: 92%; }
.doc-lines span:nth-child(4n+3), .doc-lit span:nth-child(4n+3) { width: 78%; }
.doc-lines span:nth-child(4n), .doc-lit span:nth-child(4n) { width: 86%; }

.doc-lit { position: absolute; inset: 30px 26px; animation: reveal 2.6s ease-in-out infinite alternate; }
.doc-lit span { background: #0f766e; }
.doc-lit span:nth-child(4n+1) { background: #0b5f58; }

.scan-line {
  position: absolute; left: 10px; right: 10px; top: 12%; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, #0f766e, #e8722d);
  box-shadow: 0 0 18px 6px rgba(232, 114, 45, 0.45);
  animation: sweep 2.6s ease-in-out infinite alternate;
}

@keyframes reveal { from { clip-path: inset(0 0 88% 0); } to { clip-path: inset(0 0 4% 0); } }
@keyframes sweep { from { top: 12%; } to { top: 94%; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .doc-lit, .scan-line { animation: none; }
  .doc-lit { clip-path: inset(0 0 45% 0); }
  .scan-line { top: 56%; }
}

/* ── Sections ────────────────────────────────────────────────────────── */

section.block { padding: 72px 0 0; }
.block-title { text-align: center; margin-bottom: 36px; }
.block-title h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.15; letter-spacing: -0.5px; margin: 0 0 10px; color: var(--heading); font-weight: 800; }
.block-title p { margin: 0 auto; color: var(--muted); max-width: 38em; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin: 16px 0 8px; font-size: 1.15rem; color: var(--heading); }
.card p { margin: 0; color: var(--muted); }

.icon-badge {
  width: 52px; height: 52px; border-radius: 16px; background: var(--brand); color: var(--on-brand);
  display: grid; place-items: center;
}
.icon-badge svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.step-num {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #ffffff; font-weight: 800; font-size: 1.15rem;
}

.plan { display: flex; flex-direction: column; }
.plan h3 { margin-top: 0; font-size: 1.35rem; }
.plan ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.plan li { position: relative; padding-left: 28px; color: var(--text); }
.plan li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 14px; height: 8px;
  border-left: 3px solid var(--brand); border-bottom: 3px solid var(--brand); transform: rotate(-45deg);
}
.plan.premium { border: 2px solid var(--accent); position: relative; }
.tag {
  position: absolute; top: -14px; right: 22px; background: var(--accent); color: #ffffff;
  font-size: 0.8rem; font-weight: 800; padding: 4px 12px; border-radius: 999px;
}
.note { text-align: center; color: var(--muted); font-size: 0.92rem; margin: 20px auto 0; max-width: 40em; }

.trust { background: var(--tint); border-radius: 28px; padding: 36px 30px; }
.trust ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
.trust li { padding-left: 28px; position: relative; }
.trust li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 14px; height: 8px;
  border-left: 3px solid var(--brand); border-bottom: 3px solid var(--brand); transform: rotate(-45deg);
}
.trust h2 { margin: 0; color: var(--heading); font-size: 1.6rem; letter-spacing: -0.4px; }
.trust p { margin: 8px 0 0; color: var(--muted); }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 22px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 700; padding: 16px 0; color: var(--heading); list-style-position: outside; }
details p { margin: 0 0 16px; color: var(--muted); }

.contact { text-align: center; }
.btn {
  display: inline-block; background: var(--brand); color: var(--on-brand); text-decoration: none;
  font-weight: 700; padding: 14px 28px; border-radius: 14px;
}
.btn:hover { background: var(--brand-strong); color: var(--on-brand); }

/* ── Pied de page ────────────────────────────────────────────────────── */

.site-footer { margin-top: 72px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.92rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand); }

/* ── Pages de texte (politique de confidentialité) ───────────────────── */

.doc-page { padding: 24px 0 0; }
.doc-page .container { max-width: 800px; }
.doc-page h1 { color: var(--heading); font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 8px 0 6px; }
.doc-page h1 .hl { color: var(--heading); }
.updated { color: var(--muted); margin: 0 0 28px; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 26px; margin-bottom: 8px; }
.toc strong { color: var(--heading); }
.toc ol { margin: 8px 0 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.toc li { margin-bottom: 4px; break-inside: avoid; }

.prose h2 { margin: 44px 0 12px; font-size: 1.45rem; letter-spacing: -0.3px; color: var(--heading); scroll-margin-top: 16px; }
.prose h3 { margin: 26px 0 8px; font-size: 1.1rem; color: var(--heading); }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }

.table-wrap { overflow-x: auto; margin: 14px 0 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 520px; }
th, td { text-align: left; padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--tint); color: var(--heading); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: 0; }

.callout { background: var(--tint); border-left: 5px solid var(--accent); border-radius: 12px; padding: 14px 18px; margin: 16px 0; }
.callout p:last-child { margin-bottom: 0; }

.rights { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 16px 0; }
.rights .card { padding: 18px 20px; box-shadow: none; }
.rights .card h3 { margin: 0 0 4px; font-size: 1rem; }

.contact-card { display: inline-block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 26px; }
.contact-card strong { display: block; color: var(--heading); }

/* ── Mobile ──────────────────────────────────────────────────────────── */

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 24px; padding-bottom: 56px; }
  .hero-art { order: -1; }
  .doc { width: 220px; }
  .grid-2, .grid-3, .trust ul, .rights { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .nav { gap: 14px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .site-header .container { flex-direction: column; align-items: flex-start; }
  .hero { border-radius: 0 0 28px 28px; }
}

/* ── Tableaux sur petit écran ────────────────────────────────────────── */

td a { overflow-wrap: anywhere; }

@media (max-width: 640px) {
  table { min-width: 0; font-size: 0.9rem; }
  th, td { padding: 10px 12px; }

  .stack thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  }
  .stack tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .stack tr:last-child { border-bottom: 0; }
  .stack td { display: block; border: 0; padding: 4px 16px; }
  .stack td::before {
    content: attr(data-label); display: block; margin-bottom: 1px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
  }
  .stack td:first-child { font-weight: 700; color: var(--heading); }
  .stack td:first-child::before { display: none; }
}
