/* ═══════════════════════════════════════════════════════════════
   Jamodio — Shared styles (header, footer, reset, tokens)
   Chargé sur toutes les pages publiques (landing, pricing, support…)
   ═══════════════════════════════════════════════════════════════ */

/* ─── 1. Tokens ──────────────────────────────────────────────── */
:root {
  --bg: #0a0a0b;  --surface: #111113;  --surface2: #1a1a1e;
  --card: #141418; --border: #2a2a30;
  --text: #f0f0f2; --muted: #6b6b78;
  --accent: #e8ff3a; --accent-text: #0a0a0b;
  --green: #3aff8c; --orange: #ffb347; --red: #ff5f5f;
  --radius-md: 8px; --radius-lg: 14px;
  --maxw: 1120px;
}

/* ─── 2. Reset & base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* scroll-padding-top sur html (= document.scrollingElement) pour que les ancres
   #how / #beta / #pricing… ne passent pas sous le header sticky de ~70 px.
   On reste large (96 px) pour tolérer un léger respawn du header en mobile. */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ─── 3. Reveal on scroll ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .75s ease-out var(--d, 0s),
    transform .85s cubic-bezier(.16, 1, .3, 1) var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ─── 4. Pulse dot ───────────────────────────────────────────── */
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  animation: beat 1.8s ease-out infinite;
}
@keyframes beat {
  0%   { box-shadow: 0 0 0 0   rgba(58,255,140,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(58,255,140,0);   }
  100% { box-shadow: 0 0 0 0   rgba(58,255,140,0);   }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* ─── 5. Header ──────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,11,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
/* Ancres : compense la hauteur du header sticky pour que les sections
   ciblées (#how, #why, #beta, #browser, #features) atterrissent visibles. */
section[id], div[id] { scroll-margin-top: 80px; }

/* ─── Brand tagline (déclinée par page selon la charte) ───────
   Affichée au-dessus du H1 de chaque hero. Bebas Neue, tracking large.
   Le segment .accent est en jaune (#e8ff3a) — toujours UN seul mot accentué. */
.brand-tagline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(14px, 1.6vw, 20px);
  letter-spacing: 5px;
  color: var(--text);
  margin-bottom: 14px;
  text-align: center;
  opacity: .92;
}
.brand-tagline .accent { color: var(--accent); }
.hdr.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10,10,11,0.92);
}
.hdr-inner {
  display: flex; align-items: center;
  padding: 14px clamp(20px, 4vw, 56px);
  gap: 24px;
}

/* ─── Brand / Wordmark ───────────────────────────────────────── */
.brand {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.brand svg { width: 44px; height: 44px; }
.wm-sm {
  font-family: 'Outfit', sans-serif; font-size: 20px; line-height: 1;
}
.wm-sm .w-jam { font-weight: 300; color: var(--muted); }
.wm-sm .w-o   { font-weight: 800; color: var(--accent); }
.wm-sm .w-dio { font-weight: 700; color: var(--text); }

/* ─── Nav links ──────────────────────────────────────────────── */
.nav-links {
  flex: 1; display: flex; justify-content: center;
  gap: 28px; font-size: 14px; font-weight: 500; color: var(--muted);
}
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.current { color: var(--accent); }
.nav-right { flex-shrink: 0; display: flex; align-items: center; gap: 14px; }

/* ─── Lang toggle ────────────────────────────────────────────── */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border); border-radius: 99px; overflow: hidden;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 1px;
}
.lang-toggle a { padding: 5px 10px; color: var(--muted); transition: all .15s; }
.lang-toggle a.on { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.lang-toggle a:not(.on):hover { color: var(--text); }
.ft-bottom .lang-toggle { font-size: 10px; }

/* ─── CTA buttons ────────────────────────────────────────────── */
.cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-md);
  font-weight: 600; font-size: 14px;
  transition: transform .1s, border-color .15s, background .15s, color .15s;
}
.cta-primary  { background: var(--accent); color: var(--accent-text); }
.cta-primary:hover { transform: translateY(-1px); }
.cta-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.cta-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Burger button (mobile/tablette) ────────────────────────
   Visible <900px. 3 barres qui se transforment en croix au toggle.
   Pas d'animation si prefers-reduced-motion. */
.nav-burger {
  display: none; /* affiché en <900px ci-dessous */
  width: 40px; height: 40px;
  padding: 0; border: 0; background: transparent;
  cursor: pointer;
  position: relative; flex-shrink: 0;
  border-radius: var(--radius-md);
  transition: background .15s;
}
.nav-burger:hover { background: rgba(255,255,255,0.06); }
.nav-burger-bar {
  position: absolute; left: 9px; right: 9px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .25s cubic-bezier(.16,1,.3,1), opacity .15s, top .25s;
}
.nav-burger-bar:nth-child(1) { top: 13px; }
.nav-burger-bar:nth-child(2) { top: 19px; }
.nav-burger-bar:nth-child(3) { top: 25px; }
.nav-burger.is-open .nav-burger-bar:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-burger.is-open .nav-burger-bar:nth-child(2) { opacity: 0; }
.nav-burger.is-open .nav-burger-bar:nth-child(3) { top: 19px; transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
  .nav-burger-bar { transition: none; }
}

/* ─── Drawer mobile (visible quand .is-open) ────────────────── */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.55);
  opacity: 0; pointer-events: none;
  visibility: hidden;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.nav-backdrop.is-open {
  opacity: 1; pointer-events: auto; visibility: visible;
  transition: opacity .25s ease, visibility 0s linear 0s;
}

.nav-drawer {
  position: fixed; top: 0; right: 0; z-index: 95;
  width: min(86vw, 360px); max-width: 100vw; height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 88px 28px 32px;
  display: flex; flex-direction: column; gap: 24px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .28s cubic-bezier(.16,1,.3,1), visibility 0s linear .28s;
  overflow-y: auto;
}
.nav-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform .28s cubic-bezier(.16,1,.3,1), visibility 0s linear 0s;
}
@media (prefers-reduced-motion: reduce) {
  .nav-drawer { transition: none; }
}

.nav-drawer-links {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 17px; font-weight: 500;
}
.nav-drawer-links a {
  padding: 12px 4px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color .15s;
}
.nav-drawer-links a:hover { color: var(--accent); }
.nav-drawer-links a.current { color: var(--accent); }

.nav-drawer-cta {
  display: flex; flex-direction: column; gap: 10px; margin-top: 4px;
}
.nav-drawer-cta .cta { justify-content: center; padding: 12px 18px; font-size: 15px; }

.nav-drawer-lang {
  display: flex; justify-content: center; padding-top: 4px;
}
/* Override : le lang-toggle est masqué dans la nav header en mobile, mais doit
   rester visible à l'intérieur du drawer (qui n'apparaît justement qu'en mobile). */
.nav-drawer-lang .lang-toggle { display: inline-flex; }

body.nav-open { overflow: hidden; }

/* Hide drawer entirely on desktop (≥900px) — safety net en cas de redim. */
@media (min-width: 900px) {
  .nav-drawer, .nav-backdrop { display: none !important; }
}

/* ─── Header responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links     { display: none; }
  .hdr-inner     { padding: 12px 20px; gap: 12px; }
  .nav-right     { gap: 8px; }
  .nav-cta-login { display: none; }
  .nav-cta-signup{ display: none; }
  .lang-toggle   { display: none; } /* déplacé dans le drawer */
  .nav-burger    { display: inline-block; }
}

/* ─── 6. Footer — full ───────────────────────────────────────── */
footer.ft {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 56px 28px 28px;
}
.ft-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px;
}
.ft-brand .brand { margin-bottom: 14px; }
.ft-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 2px; color: var(--muted);
  line-height: 1.7; text-transform: uppercase;
}
.ft-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 3px; color: var(--accent);
  text-transform: uppercase; margin-bottom: 14px; font-weight: 500;
}
.ft-col a {
  display: block; color: var(--muted); font-size: 13px;
  padding: 4px 0; transition: color .15s;
}
.ft-col a:hover { color: var(--accent); }
.ft-bottom {
  max-width: var(--maxw); margin: 40px auto 0;
  padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 1.5px; color: var(--muted);
}
@media (max-width: 960px) {
  .ft-inner { grid-template-columns: 1fr 1fr 1fr 1fr; gap: 32px; }
  .ft-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) { .ft-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .ft-inner { grid-template-columns: 1fr; } }

/* ─── 7. Footer — article (support) ─────────────────────────── */
.art-foot {
  border-top: 1px solid var(--border);
  padding: 24px 28px;
  display: flex; justify-content: center; align-items: center;
  gap: 16px; font-size: 13px; flex-wrap: wrap;
}
.art-foot a { color: var(--muted); transition: color .15s; }
.art-foot a:hover { color: var(--accent); }
.art-foot span { color: var(--border); }

/* ─── 8. Utility ─────────────────────────────────────────────── */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 4px; color: var(--accent);
  text-transform: uppercase; margin-bottom: 14px;
}
