/* ===========================================================
   MB SYNAPTIK IA — système de design
   Ink navy (identité existante) + amber signal + trace de fibre
   =========================================================== */

@font-face { font-display: swap; }

:root {
  /* Couleurs — alignées sur l'identité déjà utilisée (PDF, docs) */
  --ink: #1a2b4a;
  --ink-deep: #0e1930;
  --ink-soft: #23385c;
  --paper: #f1f2ee;
  --paper-2: #e6e8e0;
  --amber: #c8862b;
  --amber-light: #e3a94d;
  --text: #1b2430;
  --text-muted: #566072;
  --text-on-ink: #e9ecf3;
  --text-on-ink-muted: #a6b1c9;
  --line: rgba(26, 43, 74, 0.14);
  --line-on-ink: rgba(233, 236, 243, 0.14);

  /* Typo */
  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Rythme */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { margin: 0 0 1em; color: var(--text-muted); max-width: 62ch; }
a { color: inherit; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--amber);
}

.mono { font-family: var(--font-mono); }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--ink { background: var(--ink); color: var(--text-on-ink); }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: var(--text-on-ink-muted); }
.section--paper2 { background: var(--paper-2); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(241, 242, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter);
  max-width: 1180px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 0.7rem;
  text-decoration: none; color: var(--ink);
}
.brand-mark {
  width: 34px; height: 34px; flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  letter-spacing: -0.01em; line-height: 1.1;
}
.brand-tag {
  display: block; font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-muted);
}
.nav-links {
  display: flex; align-items: center; gap: 2rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  text-decoration: none; font-size: 0.92rem; color: var(--text);
  position: relative; padding: 0.2rem 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px;
  background: var(--amber); transition: right 0.25s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--ink); color: #fff !important; text-decoration: none;
  font-size: 0.85rem; font-weight: 600; padding: 0.65rem 1.15rem;
  border-radius: var(--radius); white-space: nowrap;
}
.nav-cta:hover { background: var(--ink-deep); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--line); background: none;
    border-radius: var(--radius); cursor: pointer;
  }
  .nav-links.is-open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); padding: 1.5rem var(--gutter) 2rem;
    border-bottom: 1px solid var(--line);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.94rem;
  padding: 0.85rem 1.5rem; border-radius: var(--radius);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: #fff; }
.btn-primary:hover { background: #b5761f; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ghost-light { border-color: rgba(255,255,255,0.35); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,0.1); }
.btn-arrow { transition: transform 0.15s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

.btn-row { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { max-width: 15ch; }
.hero-sub { font-size: 1.08rem; max-width: 48ch; }

/* ---------- Trace signal (élément signature) ---------- */
.trace {
  position: relative;
  background: var(--ink);
  border-radius: 4px;
  padding: 2.2rem 1.6rem 1.8rem;
  overflow: hidden;
}
.trace::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 12%, rgba(200,134,43,0.18), transparent 55%);
  pointer-events: none;
}
.trace svg { width: 100%; height: auto; position: relative; }
.trace-path {
  fill: none; stroke: var(--amber-light); stroke-width: 1.6;
  stroke-dasharray: 620; stroke-dashoffset: 620;
  transition: stroke-dashoffset 1.6s cubic-bezier(.4,0,.2,1);
}
.trace.is-live .trace-path { stroke-dashoffset: 0; }
.trace-node circle { fill: var(--ink); stroke: var(--amber-light); stroke-width: 1.6; }
.trace-node.is-end circle { fill: var(--amber); stroke: var(--amber); }
.trace-label {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.02em;
  fill: var(--text-on-ink-muted);
}
.trace-label.is-strong { fill: #fff; font-weight: 600; }
.trace-caption {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-on-ink-muted);
  margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line-on-ink);
}

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat {
  padding: 1.6rem var(--gutter); border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; }
.stat-num { font-family: var(--font-mono); font-size: 1.7rem; color: var(--ink); font-weight: 600; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; }
@media (max-width: 700px) {
  .stat-strip { grid-template-columns: 1fr; }
  .stat { border-left: none; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: none; }
}

/* ---------- Card grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem;
}
.card-num {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--amber);
  margin-bottom: 0.9rem; display: block;
}
.card h3 { margin-bottom: 0.6rem; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

.card--ink {
  background: var(--ink); border-color: var(--ink);
}
.card--ink h3 { color: #fff; }
.card--ink p { color: var(--text-on-ink-muted); }

/* ---------- Section head ---------- */
.section-head { max-width: 46ch; margin-bottom: 2.6rem; }
.section-head.center { max-width: 60ch; margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Divider trace glyph ---------- */
.trace-divider { display: flex; align-items: center; justify-content: center; padding: 0; }
.trace-divider svg { width: 260px; height: 20px; }
.trace-divider .trace-path { stroke: var(--ink-soft); stroke-dashoffset: 0; }
.trace-divider circle { fill: var(--paper); stroke: var(--ink-soft); stroke-width: 1.4; }

/* ---------- Steps (méthode) ---------- */
.steps { display: flex; flex-direction: column; }
.step {
  display: grid; grid-template-columns: 90px 1fr; gap: 1.6rem;
  padding: 2.2rem 0; border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-index { font-family: var(--font-mono); font-size: 0.85rem; color: var(--amber); padding-top: 0.2rem; }
.step-body h3 { margin-bottom: 0.5rem; }
@media (max-width: 640px) { .step { grid-template-columns: 1fr; gap: 0.5rem; } }

/* ---------- Pricing table ---------- */
.price-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.price-row {
  display: grid; grid-template-columns: 1.4fr 0.7fr 1.5fr;
  gap: 1.2rem; padding: 1.4rem 1.7rem; border-top: 1px solid var(--line);
  align-items: start;
}
.price-row:first-child { border-top: none; background: var(--paper-2); }
.price-row:first-child .price-name, .price-row:first-child .price-amount, .price-row:first-child .price-desc {
  font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted);
}
.price-name { font-weight: 600; color: var(--ink); }
.price-amount { font-family: var(--font-mono); color: var(--ink); }
.price-desc { font-size: 0.9rem; color: var(--text-muted); }
@media (max-width: 700px) {
  .price-row { grid-template-columns: 1fr; gap: 0.3rem; }
  .price-row:first-child { display: none; }
  .price-row:not(:first-child) .price-name { font-size: 1rem; }
}

/* ---------- Sector tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.tag {
  font-family: var(--font-mono); font-size: 0.78rem; padding: 0.5rem 0.9rem;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--ink); border-radius: 4px; padding: clamp(2.2rem, 5vw, 3.5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-banner::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% -10%, rgba(200,134,43,0.25), transparent 60%);
  pointer-events: none;
}
.cta-banner h2, .cta-banner p { color: #fff; position: relative; }
.cta-banner p { color: var(--text-on-ink-muted); margin-bottom: 0; max-width: 40ch; }
.cta-banner-actions { position: relative; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-deep); color: var(--text-on-ink-muted); padding: 3.2rem 0 2rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem;
  padding-bottom: 2.4rem; border-bottom: 1px solid var(--line-on-ink);
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; } }
.footer-col h4 {
  color: #fff; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 1rem; font-weight: 600;
}
.footer-col p { color: var(--text-on-ink-muted); font-size: 0.9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { text-decoration: none; color: var(--text-on-ink-muted); font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  padding-top: 1.6rem; font-size: 0.78rem; font-family: var(--font-mono);
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Page hero (pages internes) ---------- */
.page-hero { padding: clamp(2.6rem, 6vw, 4rem) 0 clamp(1.8rem, 4vw, 2.6rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 20ch; }
.page-hero .hero-sub { font-size: 1.02rem; }

/* ---------- Legal content ---------- */
.legal { max-width: 72ch; }
.legal h2 { margin-top: 2.2rem; font-size: 1.25rem; }
.legal p, .legal li { font-size: 0.96rem; }
.legal .flag {
  background: #fdf3e4; border: 1px solid #e9c98a; border-radius: var(--radius);
  padding: 1rem 1.2rem; font-size: 0.88rem; color: #6a4a12; margin: 1.4rem 0;
}
.legal .flag strong { color: #4d3608; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.3rem; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.95rem; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--amber); outline-offset: 1px; border-color: var(--amber);
}
.field textarea { resize: vertical; min-height: 120px; }
.contact-info-item { display: flex; gap: 1rem; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.contact-info-item:first-child { border-top: none; }
.contact-info-item .k { font-family: var(--font-mono); font-size: 0.72rem; color: var(--amber); text-transform: uppercase; letter-spacing: 0.08em; min-width: 100px; padding-top: 0.15rem; }
.contact-info-item .v { color: var(--text); font-size: 0.96rem; }
.contact-info-item .v a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
