/* ============================================================
   ScaleLab — feuille de style unique
   DA : dark + néon violet, moderne, épuré.
   Auto-contenu (police auto-hébergée) — aucun appel tiers.
   ============================================================ */

/* ---------- Police display auto-hébergée (variable) ---------- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  /* fond violet-noir, jamais noir pur */
  --bg: #0a0711;
  --bg-2: #0d0a17;
  --surface: #14101f;
  --surface-2: #1a1430;
  --border: rgba(170, 130, 255, 0.14);
  --border-strong: rgba(180, 140, 255, 0.30);

  --text: #f4f1fb;
  --text-muted: #b8b1ca;
  --text-dim: #8a829d;

  --violet: #a855f7;
  --violet-soft: #c4a3ff;
  --fuchsia: #d946ef;

  /* dégradé de marque — bornes assez sombres pour tenir le blanc en AA */
  --grad: linear-gradient(120deg, #7c3aed 0%, #a021d6 52%, #db2777 100%);
  --grad-soft: linear-gradient(120deg, #a855f7, #ec4899);
  --glow: rgba(150, 70, 240, 0.45);

  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1160px;
  --gutter: clamp(20px, 5vw, 40px);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;

  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-violet: 0 20px 60px -18px rgba(140, 60, 230, 0.5);
}

/* ---------- Reset léger ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Fond ambiant (glows + grain) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 15% -5%, rgba(124, 58, 237, 0.28), transparent 60%),
    radial-gradient(50% 45% at 92% 8%, rgba(217, 70, 239, 0.20), transparent 60%),
    radial-gradient(60% 60% at 50% 110%, rgba(120, 50, 220, 0.16), transparent 60%);
  pointer-events: none;
}
/* halo violet fixe supplémentaire, discret, peu coûteux */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    40% 30% at 80% 90%,
    rgba(217, 70, 239, 0.10),
    transparent 70%
  );
}

/* ---------- Utilitaires layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: clamp(54px, 7vw, 94px);
  position: relative;
}
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--violet-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--violet);
}
.section-head {
  max-width: 640px;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}
.section-head.center .eyebrow::before {
  display: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
}
h2 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
}
h3 {
  font-size: 1.22rem;
  letter-spacing: -0.01em;
}
.lead {
  color: var(--text-muted);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  margin-top: 18px;
}
.grad-text {
  background: var(--grad-soft);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Boutons ---------- */
.btn {
  --_pad-y: 0.85em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: var(--_pad-y) 1.5em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease,
    border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px -8px var(--glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -8px var(--glow);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(168, 85, 247, 0.10);
  border-color: var(--violet);
  transform: translateY(-2px);
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn-lg {
  font-size: 1.06rem;
  padding: 1.02em 1.9em;
}

/* focus accessible marqué */
:where(a, button, summary, input, [tabindex]):focus-visible {
  outline: 2px solid var(--violet-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Lien d'évitement ---------- */
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 999;
  background: var(--surface-2);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
}
.skip:focus {
  left: 12px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 7, 17, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
  color: #fff;
}
.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px -6px var(--glow);
  flex: none;
}
.brand .mark svg {
  width: 19px;
  height: 19px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  list-style: none;
  padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.nav-cta {
  margin-left: 6px;
}
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .nav-cta {
    margin-left: auto;
  }
}
/* petits écrans : le CTA header rétrécit pour ne jamais déborder (≥320px) */
@media (max-width: 430px) {
  .nav {
    gap: 12px;
  }
  .nav-cta {
    font-size: 0.82rem;
    padding: 0.72em 0.95em;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(42px, 6vw, 78px);
  padding-bottom: clamp(50px, 7vw, 88px);
  text-align: center;
  position: relative;
}
.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.6rem);
  max-width: 15ch;
  margin-inline: auto;
}
.hero .lead {
  max-width: 56ch;
  margin-inline: auto;
  margin-top: 24px;
}
.hero-actions {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-note {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-note .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-bottom: 30px;
}
.badge b {
  color: #fff;
  font-weight: 600;
}
.badge .pill {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
}

/* ---------- Cartes génériques ---------- */
.grid {
  display: grid;
  gap: 20px;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 880px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.card .ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--border-strong);
  color: var(--violet-soft);
}
.card .ico svg {
  width: 22px;
  height: 22px;
}
.card h3 {
  margin-bottom: 10px;
}
.card p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ---------- Offres ---------- */
.plans {
  align-items: stretch;
}
.plan {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.plan.featured {
  border-color: transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad) border-box;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-violet);
  position: relative;
}
.plan .tag {
  position: absolute;
  top: 18px;
  right: 18px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
}
.plan .plan-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--violet-soft);
  text-transform: uppercase;
}
.plan .price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  letter-spacing: -0.02em;
  color: #fff;
  margin-top: 14px;
  line-height: 1;
}
.plan .price small {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0;
}
.plan .price-note {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: 6px;
}
.plan .desc {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-top: 16px;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 22px 0 26px;
  display: grid;
  gap: 12px;
}
.plan li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.plan li svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  color: var(--violet-soft);
}
.plan .btn {
  margin-top: auto;
  width: 100%;
}

/* ---------- Étapes ---------- */
.steps {
  counter-reset: step;
}
.step {
  position: relative;
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  background: var(--grad-soft);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  margin-bottom: 14px;
  opacity: 0.9;
}
.step h3 {
  margin-bottom: 8px;
}
.step p {
  color: var(--text-muted);
  font-size: 0.97rem;
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 780px;
  margin-inline: auto;
}
.faq details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq details[open] {
  border-color: var(--border-strong);
  background: rgba(168, 85, 247, 0.05);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .chev {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--violet-soft);
  transition: transform 0.25s ease;
}
.faq details[open] summary .chev {
  transform: rotate(180deg);
}
.faq details p {
  padding: 0 24px 22px;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ---------- CTA final ---------- */
.cta-band {
  text-align: center;
  border-radius: var(--radius-lg);
  padding: clamp(44px, 7vw, 80px) var(--gutter);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(168, 85, 247, 0.28), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--bg-2));
}
.cta-band h2 {
  max-width: 18ch;
  margin-inline: auto;
}
.cta-band .lead {
  max-width: 48ch;
  margin-inline: auto;
}
.cta-band .btn {
  margin-top: 32px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 60px 34px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 780px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
.footer-brand p {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-top: 16px;
  max-width: 34ch;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 11px;
}
.footer-col a {
  color: var(--text-muted);
  font-size: 0.94rem;
  transition: color 0.2s ease;
}
.footer-col a:hover {
  color: #fff;
}
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 0.86rem;
}

/* ---------- Pages légales ---------- */
.legal {
  padding-block: clamp(48px, 7vw, 90px);
}
.legal .container {
  max-width: 820px;
}
.legal h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 10px;
}
.legal .updated {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 40px;
}
.legal h2 {
  font-size: 1.4rem;
  margin-top: 44px;
  margin-bottom: 14px;
  color: #fff;
}
.legal h3 {
  font-size: 1.1rem;
  margin-top: 26px;
  margin-bottom: 8px;
}
.legal p,
.legal li {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 14px;
}
.legal ul,
.legal ol {
  padding-left: 22px;
  margin-bottom: 14px;
}
.legal li {
  margin-bottom: 8px;
}
.legal a {
  color: var(--violet-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal a:hover {
  color: #fff;
}
.legal .todo {
  background: rgba(217, 70, 239, 0.10);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  padding: 2px 8px;
  color: var(--violet-soft);
  font-size: 0.92em;
  font-family: var(--font-display);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
}
.back-link:hover {
  color: #fff;
}
.back-link svg {
  width: 16px;
  height: 16px;
}

/* ---------- Révélation au scroll ---------- */
/* Le contenu est visible par défaut ; l'effet ne s'applique que si le JS tourne
   (classe .js posée par le script), pour ne jamais dépendre du JS pour l'affichage. */
.reveal {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
