/* NexaChat — site public (accueil et pages d'information).
   Fichier servi avec « Cache-Control: immutable » (nginx-web.conf) : toute modification
   doit être publiée sous un nouveau nom (site-v3.css…) et les pages mises à jour. */

@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/landing/fonts/PlusJakartaSans_400Regular.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/landing/fonts/PlusJakartaSans_600SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/landing/fonts/PlusJakartaSans_800ExtraBold.woff2") format("woff2"); }

/* ── Jetons ───────────────────────────────────────────── */
:root {
  --lime: #C8FA4B;
  --ink: #0F1410;
  --bg: #FFFFFF;
  --bg-alt: #F2F5EE;
  --surface: #FFFFFF;
  --text: #0F1410;
  --muted: #4B554C;
  --line: #DCE2D6;
  --line-strong: #C3CBBC;
  --accent: #3D5E00;          /* vert lisible sur fond clair (7,5:1) */
  --header-bg: rgba(255, 255, 255, .86);
  --shot-shadow: 0 1px 2px rgba(15, 20, 16, .08), 0 18px 40px -12px rgba(15, 20, 16, .28);
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 28px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1180px;
  --gutter: 24px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1410;
    --bg-alt: #141A15;
    --surface: #182019;
    --text: #EDF1E9;
    --muted: #A6AFA3;
    --line: #263026;
    --line-strong: #364236;
    --accent: #C8FA4B;
    --header-bg: rgba(15, 20, 16, .84);
    --shot-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1410;
  --bg-alt: #141A15;
  --surface: #182019;
  --text: #EDF1E9;
  --muted: #A6AFA3;
  --line: #263026;
  --line-strong: #364236;
  --accent: #C8FA4B;
  --header-bg: rgba(15, 20, 16, .84);
  --shot-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
@media (max-width: 600px) { :root { --gutter: 16px; } }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--lime); color: var(--ink); padding: 10px 16px; border-radius: var(--radius-s);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ── Boutons et liens ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 20px; border-radius: 999px;
  border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--lime); color: var(--ink); }
.btn--primary:hover { background: #B8EE34; }
.btn--solid { background: var(--text); color: var(--bg); }
.btn--solid:hover { background: var(--muted); }
.btn--secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--text); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 15px; }

.link {
  color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: text-decoration-color .2s var(--ease);
}
.link:hover { text-decoration-color: currentColor; }

/* ── En-tête ──────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600; transition: color .2s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav + .header-actions { margin-left: 8px; }

.theme-toggle {
  width: 40px; height: 40px; display: inline-grid; place-items: center; flex: none;
  border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  cursor: pointer; transition: border-color .2s var(--ease);
}
.theme-toggle:hover { border-color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .nav + .header-actions { margin-left: auto; }
}
@media (max-width: 420px) {
  .header-web { display: none; }
}

/* ── Héros ────────────────────────────────────────────── */
.hero { padding-block: clamp(48px, 8vw, 104px) clamp(56px, 8vw, 112px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.6rem); line-height: 1.06; letter-spacing: -0.032em; max-width: 15em; }
.hero-lead { margin-top: 24px; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-status { margin-top: 18px; font-size: 14px; color: var(--muted); min-height: 1.6em; }

.hero-visual { position: relative; aspect-ratio: 5 / 6.5; max-width: 500px; width: 100%; justify-self: end; }
.hero-plate { position: absolute; inset: 7% 0 5% 14%; background: var(--lime); border-radius: var(--radius-l); }
.shot { margin: 0; position: absolute; border-radius: 9% / 4.2%; box-shadow: var(--shot-shadow); background: #F5F5F0; }
.shot img { width: 100%; height: auto; border-radius: inherit; }
.shot--back { width: 52%; left: 0; top: 0; }
.shot--front { width: 52%; right: 5%; top: 12.5%; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { justify-self: center; max-width: 380px; }
}

/* Une seule entrée au chargement : les captures se posent sur le panneau. */
.anim .shot { transition: transform .9s var(--ease), opacity .9s var(--ease); }
.anim:not(.is-ready) .shot--back { transform: translateY(18px); opacity: 0; }
.anim:not(.is-ready) .shot--front { transform: translateY(30px); opacity: 0; transition-delay: .08s; }

/* ── Sections ─────────────────────────────────────────── */
.section { padding-block: clamp(64px, 9vw, 120px); border-top: 1px solid var(--line); }
.section--alt { background: var(--bg-alt); border-top: 0; }
.section-head { max-width: 40rem; }
.section-head h2 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); line-height: 1.1; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.075rem; }

/* Fonctions : colonne de titre + liste sur deux colonnes */
.features-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.features-grid .section-head { position: sticky; top: 104px; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.feature { padding: 28px 0 32px; border-top: 1px solid var(--line); }
.feature-icon { width: 28px; height: 28px; color: var(--accent); margin-bottom: 16px; }
.feature h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; font-weight: 800; }
.feature p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.feature .link { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 15.5px; }
@media (max-width: 960px) {
  .features-grid { grid-template-columns: 1fr; }
  .features-grid .section-head { position: static; }
}
@media (max-width: 640px) {
  .feature-list { grid-template-columns: 1fr; }
}

/* Sécurité */
.security-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.security-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.security-list li { padding: 22px 0 24px; border-top: 1px solid var(--line-strong); }
.security-list h3 { font-size: 1.05rem; line-height: 1.35; font-weight: 800; letter-spacing: -0.01em; }
.security-list p { margin-top: 6px; color: var(--muted); font-size: 15.5px; }
.note {
  margin-top: 32px; padding: 20px 22px; border-radius: var(--radius-m);
  background: var(--surface); border: 1px solid var(--line); font-size: 15.5px; color: var(--muted);
}
.note strong { color: var(--text); font-weight: 600; }
@media (max-width: 960px) { .security-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .security-list { grid-template-columns: 1fr; } }

/* Téléchargement */
.download-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.platform {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line);
}
.platform h3 { font-size: 1.25rem; letter-spacing: -0.015em; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.platform h3 .version { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.platform p { color: var(--muted); font-size: 15.5px; }
.platform p strong { color: var(--text); font-weight: 600; }
.platform-body { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.platform .btn { align-self: flex-start; margin-top: auto; }
.platform [data-show] { display: none; }
.platform[data-state="loading"] [data-show="loading"],
.platform[data-state="ready"] [data-show="ready"],
.platform[data-state="off"] [data-show="off"] { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.platform[data-state="loading"] [data-show="loading"] { display: block; }
.steps { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: 15px; }
.steps li { margin: 4px 0; padding-left: 4px; }
.apk-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.platform-note { font-size: 13.5px; color: var(--muted); }
@media (max-width: 960px) { .download-grid { grid-template-columns: 1fr; } }

/* ── Pied de page ─────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-grid p { color: var(--muted); margin-top: 14px; max-width: 26em; }
.footer-col h2 { font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--muted); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { text-decoration: none; transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }

/* ── Apparition au défilement (uniquement si le mouvement est permis) ── */
.anim [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.anim [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Pages d'information (confidentialité, conditions…) ── */
.doc { padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 104px); }
.doc-inner { max-width: 46rem; }
.doc h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.9rem); line-height: 1.08; letter-spacing: -0.03em; }
.doc .updated { margin-top: 14px; color: var(--muted); font-size: 15px; }
.doc .lead { margin-top: 20px; font-size: 1.1rem; color: var(--muted); }
.doc h2 { font-size: 1.4rem; line-height: 1.25; margin-top: 48px; letter-spacing: -0.015em; }
.doc h3 { font-size: 1.1rem; margin-top: 28px; letter-spacing: -0.01em; }
.doc p, .doc ul, .doc ol { margin-top: 14px; }
.doc ul, .doc ol { padding-left: 1.25em; }
.doc li { margin: 8px 0; }
.doc a:not(.btn) { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.doc a:not(.btn):hover { text-decoration-color: currentColor; }
.doc strong { font-weight: 600; }
.doc small { color: var(--muted); }
.todo {
  display: inline; padding: 1px 6px; border-radius: 6px;
  background: rgba(200, 250, 75, .35); border: 1px dashed var(--accent); color: var(--text); font-weight: 600;
}
.doc .table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: 600; color: var(--muted); background: var(--bg-alt); }
.doc tr:last-child td { border-bottom: 0; }
.doc .callout { margin-top: 24px; padding: 18px 20px; border-radius: var(--radius-m); background: var(--bg-alt); border: 1px solid var(--line); }
.doc .callout p:first-child { margin-top: 0; }

/* ── v2 : réseaux sociaux du pied de page, champs vides des mentions légales ── */
.footer-social { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.footer-social[hidden] { display: none; }
.footer-social a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 14px; text-decoration: none; transition: color .2s var(--ease), border-color .2s var(--ease); }
.footer-social a:hover, .footer-social a:focus-visible { color: var(--accent); border-color: currentColor; }
.todo.is-empty { padding: 0; border: 0; background: none; color: var(--muted); font-weight: 400; font-style: italic; }
[data-site-whatsapp][hidden] { display: none; }
