/* ============================================================
   SAKADE — Landing pré-lancement
   Charte graphique v1.0 : dark mode natif, grille 8px,
   Inter (titres/corps) + JetBrains Mono (données).
   Mobile-first.
   ============================================================ */

/* ---------- Tokens (charte SAKADE) ---------- */
:root {
  --night:    #0E1626;  /* canvas principal */
  --graphite: #1A1F2E;  /* cartes, panneaux */
  --cortex:   #2E1F5E;  /* profondeur, accents */
  --iris:     #F5F5F7;  /* texte sur fond sombre */
  --saccade:  #7C5CFF;  /* identité primaire */
  --fovea:    #00E6C3;  /* CTA, maîtrise */
  --pulse:    #FFB547;  /* alertes, erreurs */
  --verdant:  #34D399;  /* succès */

  --text:        var(--iris);
  --text-muted:  rgba(245, 245, 247, 0.72);
  --text-faint:  rgba(245, 245, 247, 0.55);
  --border:      rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  /* Grille 8px */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s6: 48px; --s8: 64px; --s12: 96px;

  --radius-input: 4px;
  --radius: 8px;
  --radius-lg: 16px;

  /* Motion charte : 200ms états, 400ms contenu, ease-out, jamais de bounce */
  --t-state: 200ms ease-out;
  --t-content: 400ms ease-out;
}

/* ---------- Reset minimal ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* compense le header fixe */
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--night);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--fovea); text-decoration: none; transition: color var(--t-state); }
a:hover { color: var(--iris); }

ul, ol { list-style: none; }

::selection { background: var(--saccade); color: var(--iris); }

/* ---------- Accessibilité ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 24px;
  background: var(--saccade);
  color: var(--iris);
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- Conteneurs ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--s3);
}
.container-narrow { max-width: 720px; }

.section { padding-block: var(--s8); }

/* ---------- Typographie ---------- */
h1, h2, h3, h4 {
  font-weight: 500; /* Inter Display 500 — charte */
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 6.5vw, 3.75rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.5rem); margin-bottom: var(--s3); }
h3 { font-size: 1.125rem; margin-bottom: var(--s1); }

p { max-width: 65ch; }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--saccade);
  margin-bottom: var(--s2);
}
.kicker-teal { color: var(--fovea); }

/* ---------- Boutons (charte : radius 8, padding 12/24) ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
  transition: filter var(--t-state), background var(--t-state),
              color var(--t-state), transform var(--t-state);
}

/* CTA : Fovea + texte Night (contraste 11:1, WCAG AAA) */
.btn-cta {
  background: var(--fovea);
  color: var(--night);
  box-shadow: 0 0 0 1px rgba(0, 230, 195, 0.25), 0 4px 24px rgba(0, 230, 195, 0.18);
}
.btn-cta:hover { filter: brightness(1.1); color: var(--night); }
.btn-cta:active { filter: brightness(0.95); }

.btn-ghost {
  background: transparent;
  color: var(--iris);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--saccade); color: var(--iris); background: rgba(124, 92, 255, 0.08); }

.btn-small { padding: 8px 16px; font-size: 0.875rem; }
.btn-block { width: 100%; }

.btn[disabled] { opacity: 0.6; cursor: wait; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-block: var(--s2);
  background: transparent;
  transition: background var(--t-state), border-color var(--t-state), padding var(--t-state);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(14, 22, 38, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
  padding-block: var(--s1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--iris);
}
.logo-symbol { width: 34px; height: 34px; flex: none; }
.logo-wordmark {
  /* Wordmark officiel : « sakade » minuscules, Inter 500, approche resserrée */
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.013em;
  color: var(--iris);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 128px var(--s8);
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 70% 15%, rgba(46, 31, 94, 0.55), transparent 70%),
    radial-gradient(ellipse 60% 45% at 15% 85%, rgba(124, 92, 255, 0.12), transparent 70%),
    var(--night);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-traj { width: 100%; height: 100%; opacity: 0.5; }
.hero-traj-path {
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  animation: traj-draw 2.4s ease-out 0.3s forwards;
}
@keyframes traj-draw { to { stroke-dashoffset: 0; } }

.hero-content { position: relative; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(26, 31, 46, 0.7);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--s3);
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fovea);
  box-shadow: 0 0 8px var(--fovea);
}

.hero-sub {
  margin-top: var(--s3);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 56ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s2) var(--s4);
  margin-top: var(--s6);
  padding-top: var(--s3);
  border-top: 1px solid var(--border);
  max-width: 720px;
}
.hero-stats li { display: flex; flex-direction: column; gap: 2px; }
.stat-value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--fovea);
}
.stat-label { font-size: 0.85rem; color: var(--text-faint); max-width: 30ch; }
.stat-label sup { font-size: 0.65em; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: var(--s3);
  transform: translateX(-50%);
  width: 28px; height: 44px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  display: flex;
  justify-content: center;
}
.scroll-cue span {
  width: 4px; height: 10px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--fovea);
  animation: cue 2s ease-out infinite;
}
@keyframes cue {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Section constat (problème → solution) ---------- */
.section-constat {
  background: linear-gradient(180deg, var(--night) 0%, #131A30 100%);
  border-top: 1px solid var(--border);
}

.constat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
  margin-top: var(--s2);
}

.constat-col p + p { margin-top: var(--s2); }

.constat-punch {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--iris);
  border-left: 2px solid var(--pulse);
  padding-left: var(--s2);
}

.constat-solution {
  background: var(--graphite);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s3);
  position: relative;
  overflow: hidden;
}
.constat-solution::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, var(--saccade), var(--fovea));
}

/* ---------- Cartes (piliers, avantages) ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s2);
  margin-top: var(--s4);
}

.card {
  background: var(--graphite);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s3);
  transition: border-color var(--t-state), transform var(--t-state);
}
.card:hover { border-color: rgba(124, 92, 255, 0.4); transform: translateY(-2px); }
.card p { font-size: 0.95rem; color: var(--text-muted); }

.card-icon {
  width: 48px; height: 48px;
  margin-bottom: var(--s2);
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}
.card-icon svg { width: 100%; height: 100%; }
.icon-violet { color: var(--saccade); }
.icon-teal   { color: var(--fovea); }
.icon-amber  { color: var(--pulse); }

.advantage-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--fovea);
  margin-bottom: var(--s2);
}

/* ---------- Étapes ---------- */
.section-steps {
  background: linear-gradient(180deg, #131A30 0%, var(--night) 100%);
}

.steps-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s3);
  margin-top: var(--s4);
  counter-reset: steps;
}

.step {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(26, 31, 46, 0.5);
}
.step-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--saccade);
  flex: none;
  padding-top: 4px;
}
.step p { font-size: 0.95rem; color: var(--text-muted); }

/* ---------- Bandeau CTA milieu de page ---------- */
.cta-band {
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(124, 92, 255, 0.18), transparent 70%),
    linear-gradient(180deg, var(--cortex) -40%, var(--night) 90%);
  border-block: 1px solid var(--border);
  padding-block: var(--s8);
}
.cta-band-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  text-align: center;
}
.cta-band h2 { margin-bottom: 0; max-width: 22ch; }

/* ---------- Pourquoi s'inscrire ---------- */
.reassurance {
  margin-top: var(--s4);
  font-size: 0.9rem;
  color: var(--text-faint);
  border-left: 2px solid var(--fovea);
  padding-left: var(--s2);
}

/* ---------- Formulaire ---------- */
.section-form {
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, rgba(0, 230, 195, 0.07), transparent 70%),
    var(--night);
}

.form-card {
  background: var(--graphite);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--s4) var(--s3);
}
.form-intro { color: var(--text-muted); margin-bottom: var(--s4); }

.form-field { margin-bottom: var(--s3); }

.form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--s1);
  color: var(--iris);
}

.form-field input[type="text"],
.form-field input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  background: var(--night);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
  color: var(--iris);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--t-state), box-shadow var(--t-state);
}
.form-field input::placeholder { color: rgba(245, 245, 247, 0.35); }
.form-field input:focus {
  outline: none;
  border-color: var(--saccade);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25);
}
.form-field input.invalid { border-color: var(--pulse); }

.field-error {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--pulse);
}

.form-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s1) 12px;
  align-items: start;
}
.form-consent input[type="checkbox"] {
  width: 20px; height: 20px;
  margin-top: 3px;
  accent-color: var(--fovea);
  cursor: pointer;
}
.form-consent label {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  margin: 0;
  cursor: pointer;
}
.form-consent .field-error { grid-column: 1 / -1; margin-top: 0; }

.form-note {
  margin-top: var(--s2);
  font-size: 0.8rem;
  color: var(--text-faint);
  text-align: center;
}
.form-note a { text-decoration: underline; text-underline-offset: 2px; }

/* Honeypot : hors écran (jamais display:none, certains bots le détectent) */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: var(--s2);
  border-radius: var(--radius-input);
  font-size: 0.95rem;
  text-align: center;
}
.form-status.success {
  padding: 12px 16px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: var(--verdant);
}
.form-status.error {
  padding: 12px 16px;
  background: rgba(255, 181, 71, 0.1);
  border: 1px solid rgba(255, 181, 71, 0.4);
  color: var(--pulse);
}

/* ---------- FAQ ---------- */
.faq-list {
  margin-top: var(--s3);
  border-top: 1px solid var(--border);
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item h3 { margin: 0; }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: var(--s2) 4px;
  background: none;
  border: 0;
  color: var(--iris);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color var(--t-state);
}
.faq-question:hover { color: var(--fovea); }

.faq-icon {
  position: relative;
  flex: none;
  width: 16px; height: 16px;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 0;
  width: 100%; height: 2px;
  background: var(--saccade);
  border-radius: 1px;
  transform: translateY(-50%);
  transition: transform var(--t-state);
}
.faq-icon::after { transform: translateY(-50%) rotate(90deg); }
.faq-question[aria-expanded="true"] .faq-icon::after { transform: translateY(-50%) rotate(0deg); }

.faq-answer { padding: 0 4px var(--s3); }
.faq-answer p { color: var(--text-muted); font-size: 0.95rem; }

.faq-cta {
  margin-top: var(--s6);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
}
.faq-cta p { color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: #0A1120;
  padding-block: var(--s6) var(--s3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
}

.footer-tagline {
  margin-top: var(--s2);
  font-size: 0.9rem;
  color: var(--text-faint);
}

.footer-nav h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  margin-bottom: var(--s2);
}
.footer-nav li + li { margin-top: var(--s1); }
.footer-nav a { color: var(--text-muted); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--fovea); }

.footer-copy {
  margin-top: var(--s6);
  padding-top: var(--s2);
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s3);
  max-width: none;
}
.footer-source { opacity: 0.8; }

/* ---------- Pages annexes (mentions, confidentialité) ---------- */
.legal-page { padding-block: 140px var(--s12); }
.legal-page h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: var(--s4); }
.legal-page h2 { font-size: 1.35rem; margin-top: var(--s6); margin-bottom: var(--s2); color: var(--iris); }
.legal-page p, .legal-page li { color: var(--text-muted); margin-bottom: var(--s2); }
.legal-page ul { list-style: disc; padding-left: var(--s3); }
.legal-page ul li { margin-bottom: var(--s1); }
.legal-meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint); }
.legal-todo {
  background: rgba(255, 181, 71, 0.08);
  border: 1px dashed rgba(255, 181, 71, 0.45);
  border-radius: var(--radius);
  padding: var(--s2);
  color: var(--pulse) !important;
  font-size: 0.9rem;
}
.back-home { display: inline-block; margin-bottom: var(--s4); font-size: 0.9rem; }

/* ---------- Animation d'apparition au scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-content), transform var(--t-content);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-traj-path { stroke-dashoffset: 0; }
}

/* ============================================================
   Responsive — à partir de 640px
   ============================================================ */
@media (min-width: 640px) {
  .section { padding-block: var(--s12); }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .form-card { padding: var(--s6); }
  .constat-solution { padding: var(--s4); }
}

/* ---------- À partir de 900px ---------- */
@media (min-width: 900px) {
  .constat-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .cards-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
  .steps-list { grid-template-columns: repeat(3, 1fr); }
  .step { flex-direction: column; gap: var(--s2); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .cta-band-inner { gap: var(--s4); }
}
