/* ============================================================
   Plytra — landing pure & Apple-like.
   Zéro framework, zéro dépendance externe (font system stack).
   Performance : Lighthouse 100, FCP < 1s sur connexion 3G.
   ============================================================ */

:root {
  /* Light palette (par défaut) */
  --bg: #f7f3ec;
  --bg-elev: #ffffff;
  --bg-soft: #f0ece4;
  --ink: #0d0d0d;
  --ink-2: #2b2b2b;
  --ink-3: #5a5a5a;
  --ink-faint: #8a8a8a;
  --line: #e3ddd1;
  --line-soft: #efeae0;
  --accent: #e8915a;
  --accent-2: #d97e44;
  --accent-soft: rgba(232, 145, 90, 0.08);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 48px rgba(0, 0, 0, 0.06);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --max: 1200px;
  --space: clamp(20px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0d;
    --bg-elev: #161616;
    --bg-soft: #1c1c1c;
    --ink: #f5f1ea;
    --ink-2: #cfcbc4;
    --ink-3: #9a948a;
    --ink-faint: #6a655e;
    --line: #2a2a2a;
    --line-soft: #1f1f1f;
    --accent: #e8915a;
    --accent-2: #f0a46d;
    --accent-soft: rgba(232, 145, 90, 0.12);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 48px rgba(0, 0, 0, 0.5);
  }
}

/* ----- Reset minimal ----- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: 0; color: inherit; }
ul { list-style: none; }
em { font-style: italic; color: var(--accent); font-weight: 500; }
strong { font-weight: 600; color: var(--ink); }

/* Skip link a11y */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px;
}
.skip:focus { left: 16px; top: 16px; z-index: 1000; }

/* ===========================================================
   NAV
   =========================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--space);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
}
.nav__brand img { border-radius: 7px; }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: 14px; color: var(--ink-2);
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  display: inline-flex; align-items: center;
  background: var(--ink); color: var(--bg);
  padding: 8px 16px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  transition: opacity 0.2s ease;
}
.nav__cta:hover { opacity: 0.85; }
@media (max-width: 760px) {
  .nav__links { display: none; }
}

/* ===========================================================
   BUTTONS
   =========================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  background: var(--ink); color: var(--bg);
}
.btn--primary:hover { background: var(--ink-2); }
.btn--ghost {
  color: var(--ink); border: 1px solid var(--line);
  background: transparent;
}
.btn--ghost:hover { background: var(--bg-soft); }
.btn--large { padding: 18px 36px; font-size: 17px; }

/* ===========================================================
   HERO
   =========================================================== */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(60px, 12vh, 140px) var(--space) clamp(80px, 14vh, 160px);
}
.hero__wrap {
  max-width: 880px; margin: 0 auto;
  text-align: center; position: relative; z-index: 1;
}
.hero__icon {
  width: clamp(96px, 14vw, 128px);
  height: clamp(96px, 14vw, 128px);
  border-radius: 26px;
  margin: 0 auto 28px;
  box-shadow: var(--shadow-card);
}
.hero__title {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin-bottom: 24px;
}
.ink-soft { color: var(--ink-3); font-weight: 400; }
.accent { color: var(--accent); }

.hero__sub {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--ink-2); line-height: 1.5;
  max-width: 640px; margin: 0 auto 36px;
}
.hero__cta {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  font-size: 13px; color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.hero__meta .dot { color: var(--ink-faint); }
.hero__glow {
  position: absolute; inset: 0;
  background: radial-gradient(
    ellipse at center top,
    var(--accent-soft) 0%,
    transparent 60%
  );
  pointer-events: none; z-index: 0;
}

/* ===========================================================
   SECTIONS COMMUNES
   =========================================================== */
section {
  padding: clamp(64px, 10vh, 120px) var(--space);
}
.section-head {
  max-width: var(--max); margin: 0 auto clamp(40px, 6vh, 64px);
  text-align: center;
}
.kicker {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 16px;
}
.section-title {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1; letter-spacing: -0.03em; font-weight: 700;
}
.lead {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-2); line-height: 1.55;
  max-width: 640px;
}

/* ===========================================================
   FEATURES GRID
   =========================================================== */
.features { background: var(--bg); }
.grid { max-width: var(--max); margin: 0 auto; display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid--3 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--line);
}
.card__icon {
  color: var(--accent);
  margin-bottom: 18px;
}
.card h3 {
  font-size: 19px; font-weight: 600; letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.card p {
  font-size: 14.5px; color: var(--ink-3); line-height: 1.55;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ===========================================================
   PRIVACY (section TOUJOURS sombre, indépendamment du mode)
   On hardcode les couleurs ici sinon en dark mode les vars flip
   et on se retrouve avec cream sur cream → invisible.
   =========================================================== */
.privacy {
  background: #0d0d0d;
  color: #f5f1ea;
}
.privacy__wrap {
  max-width: 820px; margin: 0 auto;
}
.privacy .kicker { color: rgba(245, 241, 234, 0.5); }
.privacy .section-title { color: #f5f1ea; margin-bottom: 28px; }
.privacy .lead { color: rgba(245, 241, 234, 0.75); margin-bottom: 36px; }
.privacy .lead strong { color: #f5f1ea; }
.privacy .accent { color: var(--accent); }

.checks {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 600px) { .checks { grid-template-columns: 1fr; } }
.checks li {
  display: flex; align-items: center; gap: 12px;
  font-size: 15px; color: rgba(245, 241, 234, 0.85);
}
.checks li svg { color: var(--accent); flex-shrink: 0; }

/* ===========================================================
   TOOLS (3 colonnes)
   =========================================================== */
.tools__grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; gap: 40px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .tools__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tools__grid { grid-template-columns: 1fr; } }
.tools__group {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.tools__list { display: grid; gap: 12px; }
.tools__list li {
  font-size: 15px; color: var(--ink-3); line-height: 1.5;
}
.tools__list strong {
  color: var(--ink); display: block;
}

/* ===========================================================
   LANGS
   =========================================================== */
.langs {
  text-align: center;
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.langs__list {
  max-width: 820px; margin: 24px auto 0;
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--ink-3); line-height: 2;
  letter-spacing: 0.01em;
}

/* ===========================================================
   FAQ
   =========================================================== */
.faq__item {
  max-width: 820px; margin: 0 auto;
  border-bottom: 1px solid var(--line-soft);
}
.faq__item summary {
  padding: 24px 0;
  font-size: 17px; font-weight: 500;
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  transition: color 0.2s ease;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-size: 24px; font-weight: 300;
  color: var(--ink-faint);
  transition: transform 0.3s ease, color 0.2s ease;
}
.faq__item[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}
.faq__item summary:hover { color: var(--accent); }
.faq__item p {
  padding: 0 0 24px;
  color: var(--ink-3); font-size: 15px; line-height: 1.6;
}

/* ===========================================================
   DOWNLOAD
   =========================================================== */
.download {
  text-align: center;
  background: var(--bg-soft);
}
.download .lead {
  margin: 16px auto 32px;
}

/* ===========================================================
   FOOTER
   =========================================================== */
.footer {
  /* Hardcodé sombre — sinon en dark mode les vars flip et on a
     cream sur cream → invisible. Même logique que .privacy. */
  background: #0d0d0d;
  color: #f5f1ea;
  padding: 56px var(--space) 40px;
}
.footer__inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; gap: 32px;
  grid-template-columns: 1fr auto;
  align-items: start;
}
@media (max-width: 760px) {
  .footer__inner { grid-template-columns: 1fr; }
}
.footer__brand {
  display: flex; align-items: center; gap: 14px;
}
.footer__brand img { border-radius: 8px; }
.footer__name {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
}
.footer__tag {
  font-size: 13px; color: rgba(245, 241, 234, 0.55);
  margin-top: 2px;
}
.footer__nav {
  display: flex; flex-wrap: wrap; gap: 24px;
}
.footer__nav a {
  font-size: 13px; color: rgba(245, 241, 234, 0.7);
  transition: color 0.2s ease;
}
.footer__nav a:hover { color: #f5f1ea; }
.footer__copy {
  grid-column: 1 / -1;
  padding-top: 28px; border-top: 1px solid rgba(245, 241, 234, 0.08);
  font-size: 12px; color: rgba(245, 241, 234, 0.5);
  letter-spacing: 0.02em;
}

/* ===========================================================
   PAGES LEGALES (privacy / terms / support / licenses)
   =========================================================== */
.legal {
  padding: clamp(60px, 10vh, 100px) var(--space) clamp(80px, 12vh, 120px);
}
.legal__wrap {
  max-width: 760px; margin: 0 auto;
}
.legal__title {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1; letter-spacing: -0.03em; font-weight: 700;
  margin: 16px 0 8px;
}
.legal__meta {
  font-size: 13px; color: var(--ink-faint);
  letter-spacing: 0.02em; margin-bottom: 48px;
}
.legal section {
  padding: 0; margin-bottom: 36px;
}
.legal h2 {
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.25; letter-spacing: -0.02em; font-weight: 600;
  margin: 0 0 14px;
}
.legal h3 {
  font-size: 17px; font-weight: 600;
  margin: 24px 0 8px; color: var(--ink);
}
.legal p {
  font-size: 15.5px; color: var(--ink-2); line-height: 1.7;
  margin-bottom: 14px;
}
.legal ul, .legal ol {
  padding-left: 1.4em; margin-bottom: 14px;
}
.legal ul li, .legal ol li {
  font-size: 15.5px; color: var(--ink-2); line-height: 1.7;
  margin-bottom: 6px;
  list-style: disc;
}
.legal ol li { list-style: decimal; }
.legal a {
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 2px; text-decoration-thickness: 1px;
}
.legal a:hover { text-decoration-thickness: 2px; }

/* ===========================================================
   FOCUS visible (a11y)
   =========================================================== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===========================================================
   PRINT (peu probable, mais clean)
   =========================================================== */
@media print {
  .nav, .footer, .hero__cta, .download { display: none; }
  body { background: white; color: black; }
}
