/* ==========================================================================
   APM SCALE
   Direction : noir pur, filets d'un pixel, typographie Geist en graisse
   normale très resserrée. Le bleu de la marque est réservé au logo et à
   quelques signaux — jamais en décoration.
   Tous les réglages sont dans le bloc :root ci-dessous.
   ========================================================================== */

:root {
  /* — Couleurs — */
  --bg:       #000000;
  --surface:  #0a0a0a;
  --surface-2:#111111;
  --line:     #1c1c1c;   /* filet discret */
  --line-2:   #2e2e2e;   /* filet au survol */
  --fg:       #ededed;
  --fg-2:     #a1a1a1;
  --fg-3:     #6e6e6e;
  --accent:   #007fff;   /* bleu du logo APM */
  --invert-bg:#fafafa;   /* blocs inversés */
  --invert-fg:#0a0a0a;

  /* — Typographie — */
  --sans: "Geist", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* — Mesures — */
  --frame: 1180px;
  --pad: clamp(22px, 4vw, 56px);
  --band: clamp(64px, 7.5vw, 104px);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
p { margin: 0; }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-wrap: balance;
}
h1 { font-size: clamp(38px, 5.4vw, 66px); letter-spacing: -0.055em; }
h2 { font-size: clamp(27px, 3.4vw, 42px); }
h3 { font-size: 19px; letter-spacing: -0.025em; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--fg); color: #000; padding: 12px 18px; }
.skip-link:focus { left: 0; }

/* ------------------------------------------------------ ossature ------- */

.frame {
  max-width: var(--frame);
  margin-inline: auto;
  border-inline: 1px solid var(--line);
}
.band {
  padding: var(--band) var(--pad);
  border-bottom: 1px solid var(--line);
}
.band--flush { padding-block: 0; }

/* — étiquette monospace — */
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0;
}
.label--accent { color: var(--accent); }

.lede { color: var(--fg-2); font-size: 16px; max-width: 58ch; margin-top: 18px; }

.head { display: grid; gap: 20px; max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.head .label { margin-bottom: 4px; }
.head h2 { color: var(--accent); }   /* titres de section au bleu de la marque */

/* ------------------------------------------------------- boutons ------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding-inline: 20px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}
.btn--solid { background: var(--fg); color: #000; }
.btn--solid:hover { background: #fff; }
.btn--line { border-color: var(--line-2); color: var(--fg); }
.btn--line:hover { border-color: #4a4a4a; background: var(--surface); }
.btn--dark { background: var(--invert-fg); color: var(--invert-bg); }
.btn--dark:hover { background: #000; }
.btn--wide { width: 100%; justify-content: center; }
.btn svg { transition: transform .22s ease; }
.btn:hover svg { transform: translateX(3px); }

/* ---------------------------------------------------- navigation ------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(0,0,0,.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.nav__in {
  max-width: var(--frame);
  margin-inline: auto;
  border-inline: 1px solid var(--line);
  height: 60px;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--accent); }
.brand svg, .brand img { width: 26px; height: auto; }
.brand b {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
}
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  font-size: 14px;
  color: var(--fg-2);
  padding: 7px 11px;
  border-radius: 6px;
  transition: color .18s ease, background-color .18s ease;
}
.nav__links a:hover { color: var(--fg); background: var(--surface-2); }
.nav__links a.is-active { color: var(--fg); }
.nav .btn { height: 36px; padding-inline: 16px; font-size: 13.5px; }
.nav__burger { display: none; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 7px; margin-left: auto; }
.nav__burger i { display: block; width: 13px; height: 1px; background: var(--fg); margin: 3px auto; transition: transform .22s ease, opacity .15s ease; }
.nav.is-open .nav__burger i:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav.is-open .nav__burger i:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger i:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

/* ---------------------------------------------------------- hero ------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
  padding: clamp(64px, 8vw, 110px) var(--pad);
  border-bottom: 1px solid var(--line);
}
.hero h1 { margin-top: 22px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }

/* — panneau « flux » — */
.flux {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.flux__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.dot--live { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
.flux__bar span:last-child { margin-left: auto; color: var(--fg-3); }

.flux__log { padding: 16px 15px; display: grid; gap: 9px; font-family: var(--mono); font-size: 12px; line-height: 1.5; min-height: 210px; align-content: start; }
.flux__log li { display: flex; gap: 12px; color: var(--fg-2); list-style: none; opacity: 0; }
.flux__log li.on { opacity: 1; transition: opacity .35s ease; }
.flux__log time { color: var(--fg-3); flex: none; }
.flux__log b { font-weight: 400; color: var(--fg); }
.flux__foot {
  border-top: 1px solid var(--line);
  padding: 12px 15px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.flux__foot em { font-style: normal; color: var(--fg); }

/* — panneau « interconnexion » du hero — */
.wire { padding: 20px 14px 22px; }
.wire svg { width: 100%; height: auto; }
.wire .node { fill: #0e0e0e; stroke: var(--line-2); stroke-width: 1; }
.wire .hub { fill: #0e0e0e; stroke: var(--accent); stroke-width: 1; }
.wire .lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; fill: var(--fg-2); }
.wire .lbl--hub { fill: var(--fg); letter-spacing: 0.1em; }
.wire .base { fill: none; stroke: #232323; stroke-width: 1.2; }
.wire .flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 7 93;
  animation: wireFlow 2.8s linear infinite;
  animation-delay: var(--wd, 0s);
}
@keyframes wireFlow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
.wire .halo { fill: none; stroke: var(--accent); stroke-width: 1; opacity: .5; animation: haloPulse 2.8s ease-in-out infinite; }
@keyframes haloPulse { 0%,100% { opacity: .12 } 50% { opacity: .5 } }

/* — bloc démonstration dans la section Solutions — */
.demo {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(26px, 4vw, 52px);
  align-items: center;
  padding-bottom: clamp(40px, 5vw, 60px);
}
.demo h3 { margin-bottom: 14px; }
.demo p { color: var(--fg-2); font-size: 14.5px; }
.demo p + p { margin-top: 12px; }
.demo .label { margin-bottom: 14px; }

/* --------------------------------------------------------- chiffres ---- */

.facts { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts div { padding: clamp(24px, 3vw, 34px) var(--pad); border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts strong { display: block; font-size: clamp(24px, 3vw, 34px); font-weight: 400; letter-spacing: -0.04em; }
.facts .label { margin-top: 10px; }

/* ---------------------------------------------------------- listes ----- */

/* liste éditoriale : index + titre + texte, séparés par un filet */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 56px minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 40px);
  padding: clamp(24px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--line);
  transition: background-color .2s ease;
}
.row:hover { background: var(--surface); }
.row__i { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 4px; }
.row p { color: var(--fg-2); max-width: 62ch; }
.row h3 + p { margin-top: 10px; }

/* grille de cellules bordées */
.cells { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(24px, 2.6vw, 32px);
  display: flex; flex-direction: column; gap: 12px;
  transition: background-color .2s ease;
}
.cell:hover { background: var(--surface); }
.cell__top { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.cell p { color: var(--fg-2); font-size: 14.5px; }
.cell ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.cell li { font-size: 13.5px; color: var(--fg-2); padding-left: 15px; position: relative; }
.cell li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 1px; background: var(--fg-3); }
.cell--cta { justify-content: center; gap: 16px; }
.cell--cta a { color: var(--fg); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; align-self: flex-start; transition: border-color .2s ease; }
.cell--cta a:hover { border-color: var(--accent); }

/* ---------------------------------------------------------- tarifs ----- */

.segmented { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.segmented button {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 0 0 13px;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  transition: color .18s ease, border-color .18s ease;
}
.segmented button:hover { color: var(--fg-2); }
.segmented button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }

.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.plans[hidden] { display: none !important; }

.plan {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(24px, 3vw, 34px);
  display: flex; flex-direction: column;
  transition: border-color .2s ease;
}
.plan:hover { border-color: var(--line-2); }
.plan__top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.plan__price { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.045em; margin-top: clamp(26px, 3.4vw, 40px); }
.plan__for { color: var(--fg-2); font-size: 14.5px; margin-top: 8px; min-height: 42px; }
.plan .btn { margin-top: 22px; }
.plan__list { margin: 26px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 10px; }
.plan__list li { font-size: 14px; color: var(--fg-2); padding-left: 17px; position: relative; }
.plan__list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 1px; background: var(--fg-3); }
.tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 9px; color: var(--fg-2);
}

/* carte inversée (mise en avant) */
.plan--invert { background: var(--invert-bg); color: var(--invert-fg); border-color: var(--invert-bg); }
.plan--invert:hover { border-color: var(--invert-bg); }
.plan--invert .plan__for { color: #4a4a4a; }
.plan--invert .plan__list { border-top-color: rgba(0,0,0,.12); }
.plan--invert .plan__list li { color: #3d3d3d; }
.plan--invert .plan__list li::before { background: #9a9a9a; }
.plan--invert .tag { border-color: rgba(0,0,0,.2); color: #3d3d3d; }
.plan--invert .label { color: #6b6b6b; }

/* ------------------------------------------------------------ avis ----- */

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.quote {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(24px, 2.6vw, 32px);
  display: flex; flex-direction: column; gap: 22px;
  margin: 0;
}
.quote p { color: var(--fg); font-size: 15.5px; letter-spacing: -0.012em; flex: 1; }
.quote figcaption { font-size: 13.5px; color: var(--fg-3); }
.quote figcaption b { display: block; font-weight: 400; color: var(--fg-2); }

/* ------------------------------------------------------------- faq ----- */

.faq { border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 20px 0; display: flex; gap: 20px; align-items: baseline; justify-content: space-between;
  font-size: 16px; letter-spacing: -0.02em;
  transition: color .18s ease;
}
.faq summary:hover { color: #fff; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--fg-3); font-size: 15px; flex: none; }
.faq details[open] summary::after { content: "–"; color: var(--accent); }
.faq .a { padding: 0 0 24px; color: var(--fg-2); max-width: 66ch; }

/* ----------------------------------------------------- bande mobile ---- */

.marquee { border-bottom: 1px solid var(--line); overflow: hidden; padding-block: 15px; }
.marquee__t { display: flex; width: max-content; gap: 44px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); animation: slide 42s linear infinite; }
.marquee:hover .marquee__t { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------- cta ----- */

/* Fond noir, encadré par deux filets bleus : le seul endroit du site où le
   bleu occupe autant de place. Le bouton plein bleu n'existe qu'ici. */
.cta {
  background: var(--bg);
  padding: clamp(72px, 9vw, 124px) var(--pad);
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  text-align: center;
}
.cta h2 { color: var(--accent); max-width: 24ch; margin-inline: auto; font-size: clamp(30px, 4.4vw, 54px); }
.cta p { color: var(--fg-2); max-width: 50ch; margin: 22px auto 0; font-size: 16px; }
.cta .btn { margin-top: 36px; }
.cta__rule { width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent); margin: 0 auto 30px; }

.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: #2b93ff; }

/* ---------------------------------------------------------- footer ----- */

.footer { padding: clamp(48px, 6vw, 72px) var(--pad) 32px; }
.footer__grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 36px; }
.footer__brand svg { width: 74px; color: var(--accent); }
.footer__brand p { color: var(--fg-3); font-size: 14px; margin-top: 20px; max-width: 30ch; }
.footer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--fg-3); font-weight: 400; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--fg-2); font-size: 14px; transition: color .18s ease; }
.footer ul a:hover { color: var(--fg); }
.footer__bottom {
  margin-top: clamp(44px, 6vw, 68px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; color: var(--fg-3);
}

/* --------------------------------------------------- pages légales ----- */

.legal { padding: clamp(56px, 7vw, 90px) var(--pad); }
.legal h1 { font-size: clamp(30px, 4vw, 46px); margin-top: 18px; }
.legal__body { max-width: 70ch; margin-top: 44px; }
.legal__body h2 { font-size: 21px; margin-top: 44px; }
.legal__body p, .legal__body li { color: var(--fg-2); margin-top: 14px; }
.legal__body ul { padding-left: 18px; }
.legal__body a { color: var(--fg); border-bottom: 1px solid var(--line-2); }
.legal__body a:hover { border-color: var(--accent); }
.legal__body strong { font-weight: 500; color: var(--fg); }
.todo { font-family: var(--mono); font-size: 12.5px; color: var(--accent); border-bottom: 1px dashed #24507f; }

/* -------------------------------------------------------- apparition --- */

.js-anim .up { opacity: 0; transform: translateY(12px); }
.js-anim .up.on {
  opacity: 1; transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.22,.7,.3,1);
  transition-delay: var(--d, 0ms);
}

/* -------------------------------------------------------- responsive --- */

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(2) { border-right: 0; }
  .facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cells { grid-template-columns: repeat(2, 1fr); }
  .demo { grid-template-columns: 1fr; }
  .quotes { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: #000; border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 16px;
    display: none;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 12px 0; border-radius: 0; font-size: 15px; }
  .nav__burger { display: block; }
  .nav .btn { display: none; }
  .row { grid-template-columns: 34px 1fr; }
  .row p { grid-column: 2; }
  .cells { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan__for { min-height: 0; }
}

@media (max-width: 460px) {
  .facts { grid-template-columns: 1fr; }
  .facts div { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero__actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js-anim .up { opacity: 1; transform: none; }
  .flux__log li { opacity: 1 !important; }
  .wire .flow { animation: none; stroke-dasharray: none; opacity: .55; }
  .wire .halo { animation: none; opacity: .3; }
}
