/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --paper: #FAFAF7;
  --paper-deep: #F4F2EC;
  --line: #E5E2D9;
  --ink-night: #1B2942;
  --ink-soft: #2C3A52;
  --graphite: #5C6470;
  --graphite-dim: #98A0AC;
  --ibm-blue: #0066FF;
  --ibm-blue-soft: #E8F0FF;
  --green-ok: #00875A;
  --rust: #C73E1D;
  --noise-alpha: 0.025;

  --font-display: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 9rem;

  --max-width: 1280px;
  --gutter: clamp(1rem, 4vw, 3rem);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─── Typography defaults ───────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink-night);
}

h2 { font-size: clamp(2.5rem, 5vw, 4rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ibm-blue); }

::selection { background: var(--ibm-blue); color: #fff; }

/* ─── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Container utility ─────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── Nav ────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-4);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-night);
}

.nav__logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--ink-night);
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink-night);
}

.nav__links {
  display: flex;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--graphite);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav__links a:hover {
  color: var(--ink-night);
}

.nav__cta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--graphite-dim);
  color: var(--ink-night);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav__cta:hover {
  border-color: var(--ibm-blue);
  color: var(--ibm-blue);
}

@media (max-width: 768px) {
  .nav__links { display: none; }
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding: 9rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: var(--space-6);
  align-items: center;
}

@media (max-width: 968px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-5); }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--graphite-dim);
  margin-bottom: var(--space-4);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.5vw, 6rem);
  font-weight: 600;
  color: var(--ink-night);
  letter-spacing: -0.02em;
}

.hero__title em {
  font-style: normal;
  color: var(--ibm-blue);
  font-weight: 700;
}

.hero__sub {
  margin-top: var(--space-4);
  max-width: 56ch;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--graphite);
}

.hero__ctas {
  margin-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--ibm-blue);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background: var(--ibm-blue);
  color: #fff;
  border-color: var(--ibm-blue);
}

.btn--primary:hover {
  background: var(--ink-night);
  border-color: var(--ink-night);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--ink-night);
  border: 1px solid var(--graphite-dim);
}

.btn--ghost:hover {
  border-color: var(--ibm-blue);
  color: var(--ibm-blue);
}

/* Terminal (réutilisé en §00 placeholder, §03 démo et §04 hex) */
.terminal {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--ink-night);
}

.terminal__bar {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--graphite-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.terminal__body {
  padding: 1.5rem 1rem;
  white-space: pre-wrap;
  line-height: 1.6;
}

/* ─── Token stream (hero §00) ────────────────────────────── */
.stream {
  padding: 1.5rem 1rem;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}

.phrase-block {
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: phrase-enter 0.4s ease-out forwards;
}

.phrase-block--exit {
  animation: phrase-exit 0.8s ease-in forwards;
}

.phrase-block__tag {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--graphite-dim);
  margin-bottom: 0.4rem;
}

.phrase {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.55;
}

.phrase--raw { color: var(--rust); }
.phrase--pseudo { color: var(--green-ok); }

.phrase--fading {
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.tok {
  display: inline-block;
  animation: tok-in 0.25s ease-out backwards;
}

@keyframes phrase-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes phrase-exit {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-12px); }
}

@keyframes tok-in {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── §01 Le problème ────────────────────────────────────── */
.probleme {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--line);
}

.probleme__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin: var(--space-5) 0 var(--space-7);
}

@media (max-width: 968px) {
  .probleme__stats { grid-template-columns: 1fr; }
}

.stat {
  position: relative;
  padding: 0 var(--space-4);
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

@media (max-width: 968px) {
  .stat + .stat {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: var(--space-4);
  }
}

.stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 9vw, 7.5rem);
  line-height: 0.95;
  color: var(--ibm-blue);
  letter-spacing: -0.04em;
}

.stat__unit {
  font-size: 0.5em;
  color: var(--graphite);
  margin-left: 0.1em;
}

.stat__label {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-night);
}

.stat__label em {
  font-style: normal;
  color: var(--rust);
}

.stat__src {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--graphite-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.probleme__editorial {
  max-width: 70ch;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-night);
  text-align: center;
}

.probleme__editorial em {
  color: var(--ibm-blue);
  font-style: normal;
}

.dropcap {
  float: left;
  font-size: 4em;
  line-height: 0.85;
  padding-right: 0.1em;
  font-weight: 700;
  color: var(--ibm-blue);
}


/* ─── §03 Démo live ──────────────────────────────────────── */
.demo {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--line);
}

.demo__title {
  margin: var(--space-4) 0 var(--space-6);
  max-width: 28ch;
}

.demo__input-box, .demo__output-box {
  max-width: 920px;
  margin: 0 auto var(--space-4);
}

.demo__field { padding: var(--space-4); }

.demo__prompt {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--graphite);
  margin-bottom: var(--space-2);
}

.demo__textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-night);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: var(--space-3);
  resize: vertical;
  outline: none;
  line-height: 1.55;
}

.demo__textarea:focus { border-color: var(--ibm-blue); }

.demo__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-3);
}

.demo__counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--graphite-dim);
}

.demo__counter--warn { color: var(--rust); }

.demo__output {
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.demo__pseudo {
  color: var(--green-ok);
  white-space: pre-wrap;
  line-height: 1.55;
  min-height: 2em;
}

.demo__sep {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: var(--space-3) 0;
}

.demo__mapping-title {
  font-size: 0.7rem;
  color: var(--graphite-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.demo__mapping {
  list-style: none;
  font-size: 0.85rem;
  display: grid;
  gap: var(--space-1);
  transition: opacity 0.6s ease;
}

.demo__mapping li {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-2);
  align-items: center;
}

.demo__orig { color: var(--rust); }
.demo__arrow { color: var(--ibm-blue); }
.demo__ph { color: var(--green-ok); }

.demo__mapping--destroyed {
  opacity: 0;
  pointer-events: none;
}

.demo__stats {
  margin-top: var(--space-3);
  font-size: 0.75rem;
  color: var(--graphite-dim);
}

.demo__note {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--graphite-dim);
}

/* ─── §04 Souveraineté ───────────────────────────────────── */
.souverainete {
  padding: var(--space-7) 0;
  background: var(--paper-deep);
}

.souverainete__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-5);
}

@media (max-width: 968px) {
  .souverainete__grid { grid-template-columns: 1fr; }
}

.souverainete__hex { text-align: center; }

.souverainete__hex object {
  width: 100%;
  max-width: 720px;
  height: auto;
}

.souverainete__caption {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink-night);
}

.souverainete__list {
  list-style: none;
  display: grid;
  gap: var(--space-4);
}

.souverainete__list li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-3);
  border-left: 2px solid color-mix(in srgb, var(--ibm-blue) 50%, transparent);
  padding-left: var(--space-3);
}

.souverainete__list span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ibm-blue);
  grid-row: 1 / span 2;
  align-self: start;
}

.souverainete__list h3 {
  font-size: 1.25rem;
  color: var(--ink-night);
  font-weight: 600;
}

.souverainete__list p {
  margin-top: var(--space-1);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--graphite);
}

.souverainete__list code {
  background: var(--ibm-blue-soft);
  padding: 0 0.3em;
  color: var(--ibm-blue);
}

/* ─── §05 Intégration ────────────────────────────────────── */
.integration {
  padding: var(--space-7) 0;
}

.integration__title {
  margin: var(--space-4) 0 var(--space-5);
  max-width: 24ch;
}

.integration__title code {
  font-family: var(--font-mono);
  font-size: 0.7em;
  background: var(--ibm-blue-soft);
  padding: 0.05em 0.25em;
  color: var(--ibm-blue);
}

.tabs {
  display: flex;
  gap: var(--space-3);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.tab {
  background: transparent;
  border: 0;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--graphite);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  letter-spacing: 0.04em;
}

.tab:hover { color: var(--ink-night); }

.tab.is-active {
  color: var(--ibm-blue);
  border-bottom-color: var(--ibm-blue);
}

.codeblock {
  display: none;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-top: 0;
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  color: var(--ink-night);
}

.codeblock.is-active { display: block; }

.kw { color: var(--rust); }
.st { color: var(--green-ok); }
.cm { color: var(--graphite-dim); }

.integration__compat {
  margin-top: var(--space-5);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--graphite);
  letter-spacing: 0.06em;
}

/* ─── §06 Cas d'usage ────────────────────────────────────── */
.clients {
  padding: var(--space-7) 0;
  background: var(--paper-deep);
}

.clients__title {
  margin: var(--space-4) 0 var(--space-6);
  max-width: 28ch;
}

.clients__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-5);
  align-items: stretch;
}

@media (max-width: 968px) {
  .clients__grid { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid var(--line);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.card--large { padding-block: var(--space-6); }

.card__sector {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--graphite-dim);
  margin-bottom: var(--space-3);
}

.card__stat {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--ibm-blue);
  font-weight: 700;
  line-height: 1;
}

.card__stat span {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ink-night);
  font-weight: 400;
  letter-spacing: 0;
}

.card__pct {
  display: inline !important;
  font-family: inherit !important;
  font-size: 0.5em !important;
  color: var(--graphite) !important;
  margin-left: 0.1em;
  letter-spacing: 0 !important;
}

.card__stat em {
  color: var(--green-ok);
  font-style: normal;
}

.card__desc {
  margin: var(--space-4) 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--graphite);
  line-height: 1.6;
  flex-grow: 1;
}

.card__cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ibm-blue);
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
}

.card__cta:hover { color: var(--ink-night); }

/* ─── §07 Formules ───────────────────────────────────────── */
.formules {
  padding: var(--space-7) 0;
}

.formules__title {
  margin: var(--space-4) 0 var(--space-6);
  max-width: 28ch;
}

.formules__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  align-items: stretch;
}

@media (max-width: 968px) {
  .formules__grid { grid-template-columns: 1fr; }
}

.plan {
  border: 1px solid var(--line);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  position: relative;
}

.plan--featured {
  border-width: 3px;
  border-color: var(--ibm-blue);
  transform: translateY(-24px);
}

@media (max-width: 968px) {
  .plan--featured { transform: none; }
}

.plan__badge {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  padding: 0 var(--space-3);
  color: var(--ibm-blue);
  font-size: 1.2rem;
}

.plan__name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink-night);
}

.plan__url {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ibm-blue);
  letter-spacing: 0.04em;
}

.plan__features {
  list-style: none;
  margin: var(--space-4) 0;
  flex-grow: 1;
  display: grid;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--graphite);
}

.plan__features li::before {
  content: "→ ";
  color: var(--ibm-blue);
  margin-right: 0.3em;
}

/* ─── §08 FAQ ────────────────────────────────────────────── */
.faq {
  padding: var(--space-7) 0;
  background: var(--paper-deep);
}

.faq__title {
  margin: var(--space-4) 0 var(--space-5);
  max-width: 28ch;
}

.faq__list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.qa {
  border-bottom: 1px solid var(--line);
}

.qa summary {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 500;
  color: var(--ink-night);
  padding: var(--space-4) 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  transition: color 0.2s ease;
}

.qa summary::-webkit-details-marker { display: none; }

.qa summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--ibm-blue);
  transition: transform 0.25s ease;
}

.qa[open] summary::after { transform: rotate(45deg); }

.qa summary:hover { color: var(--ibm-blue); }

.qa p {
  padding-bottom: var(--space-4);
  padding-right: var(--space-5);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--graphite);
  line-height: 1.65;
}

.qa code {
  background: var(--ibm-blue-soft);
  padding: 0 0.3em;
  color: var(--ibm-blue);
}

.qa em {
  color: var(--ibm-blue);
  font-style: normal;
}

.plan__cta { align-self: flex-start; }

/* ─── §09 CTA final ──────────────────────────────────────── */
.cta-final {
  min-height: 80vh;
  padding: var(--space-7) 0;
  display: flex;
  align-items: center;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 28px, color-mix(in srgb, var(--ibm-blue) 4%, transparent) 28px 29px),
    var(--paper);
}

.cta-final__title {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 1.15;
  font-weight: 600;
  color: var(--ink-night);
}

.cta-final__sub {
  margin: var(--space-5) 0 var(--space-5);
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--graphite);
}

.cta-final__btns {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  padding: var(--space-6) 0 var(--space-4);
  border-top: 1px solid var(--line);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr; }
}

.footer__head {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ibm-blue);
  margin-bottom: var(--space-3);
}

.footer__col ul {
  list-style: none;
  display: grid;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--graphite-dim);
}

.footer__col a:hover { color: var(--ink-night); }

.footer__bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--graphite-dim);
}

.footer__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green-ok);
  border-radius: 50%;
  margin: 0 0.5em;
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green-ok) 60%, transparent); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* ─── Scroll reveal ──────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Page load orchestration ────────────────────────────── */
.hero__copy > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

body.loaded .hero__copy > * { opacity: 1; transform: translateY(0); }
body.loaded .hero__copy > *:nth-child(1) { transition-delay: 0.0s; }
body.loaded .hero__copy > *:nth-child(2) { transition-delay: 0.08s; }
body.loaded .hero__copy > *:nth-child(3) { transition-delay: 0.16s; }
body.loaded .hero__copy > *:nth-child(4) { transition-delay: 0.24s; }

.hero__stream {
  opacity: 0;
  transition: opacity 1.2s ease-out 0.4s;
}
body.loaded .hero__stream { opacity: 1; }

/* ─── Texture grain global ───────────────────────────────── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("assets/noise.svg");
  background-size: 200px 200px;
  opacity: var(--noise-alpha);
  pointer-events: none;
  z-index: 200;
  mix-blend-mode: overlay;
}

/* Blueprint diagonal léger sur le hero */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent 0 80px, color-mix(in srgb, var(--ibm-blue) 5%, transparent) 80px 81px);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

/* ─── Compliance strip (hero) ─────────────────────────────── */
.compliance-strip {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
}

.compliance-strip li {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-night);
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--graphite-dim);
  background: var(--paper-deep);
  white-space: nowrap;
}

.compliance-strip li::before {
  content: "✓";
  color: var(--green-ok);
  margin-right: 0.4rem;
  font-weight: 600;
}

/* ─── Trust bar (entre hero et §01) ───────────────────────── */
.trust-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-deep);
  padding: var(--space-4) 0;
}

.trust-bar__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

@media (max-width: 768px) {
  .trust-bar__inner { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
}

.trust-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 var(--space-3);
  position: relative;
}

.trust-stat + .trust-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: var(--line);
}

@media (max-width: 768px) {
  .trust-stat + .trust-stat::before { display: none; }
}

.trust-stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--ibm-blue);
  letter-spacing: -0.03em;
}

.trust-stat__num small {
  font-size: 0.45em;
  color: var(--graphite);
  margin-left: 0.1em;
  font-weight: 600;
}

.trust-stat__label {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--graphite);
}

/* ─── Flux 3 étapes ───────────────────────────────────────── */
.flux {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--line);
}

.flux__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-6);
  max-width: 32ch;
}

/* Schéma horizontal */
.flux__diagram {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: var(--space-3);
  list-style: none;
  margin-bottom: var(--space-6);
}

@media (max-width: 968px) {
  .flux__diagram {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}

.flux__node {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.flux__node--zonym {
  border-color: var(--ibm-blue);
  background: var(--ibm-blue-soft);
  box-shadow: 0 0 0 1px var(--ibm-blue) inset;
}

.flux__tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--graphite-dim);
  text-transform: uppercase;
}

.flux__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ink-night);
  letter-spacing: -0.01em;
}

.flux__desc {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--graphite);
}

/* Flèches */
.flux__arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 110px;
  padding: 0 var(--space-2);
}

.flux__arrow-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ibm-blue);
}

.flux__arrow-line {
  width: 100%;
  height: 1px;
  background: var(--ibm-blue);
  position: relative;
}

.flux__arrow-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--ibm-blue);
  border-right: 1px solid var(--ibm-blue);
  transform: translateY(-50%) rotate(45deg);
}

@media (max-width: 968px) {
  .flux__arrow {
    min-width: 0;
    flex-direction: row;
    padding: var(--space-2) 0;
  }
  .flux__arrow-line {
    width: 1px;
    height: 24px;
  }
  .flux__arrow-line::after {
    right: 50%;
    top: auto;
    bottom: -1px;
    transform: translateX(50%) rotate(135deg);
  }
}

/* Pas-à-pas (3 cartes textuelles) */
.flux__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  list-style: none;
  counter-reset: flux-step;
}

@media (max-width: 968px) {
  .flux__steps { grid-template-columns: 1fr; }
}

.flux__step {
  position: relative;
  padding-top: var(--space-4);
  border-top: 2px solid var(--ibm-blue);
}

.flux__step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ibm-blue);
}

.flux__step-title {
  margin-top: var(--space-2);
  font-size: 1.5rem;
  color: var(--ink-night);
}

.flux__step-text {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--graphite);
}

.flux__step-text code {
  font-size: 0.85em;
  padding: 0.1rem 0.35rem;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  color: var(--ink-night);
}

/* ─── Comparatif 3 approches ──────────────────────────────── */
.vs {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--line);
}

.vs__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-6);
  max-width: 36ch;
}

.vs__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  align-items: stretch;
}

@media (max-width: 968px) {
  .vs__grid { grid-template-columns: 1fr; }
}

.vs__card {
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-4);
  background: var(--paper);
  border: 1px solid var(--line);
}

.vs__card--featured {
  background: var(--ibm-blue-soft);
  border: 1px solid var(--ibm-blue);
  box-shadow: 0 0 0 1px var(--ibm-blue) inset;
  position: relative;
}

.vs__card--featured::before {
  content: "Recommandé";
  position: absolute;
  top: -10px;
  left: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--ibm-blue);
  padding: 0.25rem 0.55rem;
}

.vs__cat {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--graphite-dim);
}

.vs__card--featured .vs__cat { color: var(--ibm-blue); }

.vs__name {
  margin-top: var(--space-2);
  font-size: 1.5rem;
  color: var(--ink-night);
}

.vs__badge-tech {
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--graphite-dim);
}

.vs__card--featured .vs__badge-tech { color: var(--ibm-blue); }

.vs__tagline {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--graphite);
  font-style: italic;
}

.vs__props {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.vs__card--featured .vs__props { border-top-color: var(--ibm-blue); }

.vs__prop dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--graphite-dim);
  margin-bottom: 0.3rem;
}

.vs__prop dd {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-night);
  position: relative;
  padding-left: 1.4rem;
}

.vs__prop dd::before {
  position: absolute;
  left: 0;
  top: 0.05em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

.vs__yes::before { content: "✓"; color: var(--green-ok); }
.vs__warn::before { content: "~"; color: #B5811C; }
.vs__no::before { content: "✕"; color: var(--rust); }

/* ─── Incidents documentés ────────────────────────────────── */
.incidents {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}

.incidents__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-3);
  max-width: 36ch;
}

.incidents__intro {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--graphite);
  max-width: 70ch;
  margin-bottom: var(--space-6);
}

.incidents__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  list-style: none;
  margin-bottom: var(--space-5);
}

@media (max-width: 968px) {
  .incidents__list { grid-template-columns: 1fr; }
}

.incident {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rust);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
}

.incident__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-3);
}

.incident__date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--graphite-dim);
}

.incident__amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--rust);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.incident__org {
  font-size: 1.4rem;
  margin-bottom: var(--space-3);
  color: var(--ink-night);
}

.incident__desc {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--graphite);
  flex-grow: 1;
  margin-bottom: var(--space-3);
}

.incident__desc em {
  font-style: italic;
  color: var(--ink-soft);
}

.incident__src {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--graphite);
  border-top: 1px dashed var(--line);
  padding-top: var(--space-3);
  transition: color 0.2s ease;
}

.incident__src:hover {
  color: var(--ibm-blue);
}

.incidents__caveat {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--graphite);
  font-style: italic;
  border-left: 2px solid var(--graphite-dim);
  padding-left: var(--space-3);
  max-width: 70ch;
}

/* ─── Verticales (Pour qui) ───────────────────────────────── */
.verticales {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--line);
}

.verticales__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-3);
  max-width: 36ch;
}

.verticales__intro {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--graphite);
  max-width: 70ch;
  margin-bottom: var(--space-6);
}

.verticales__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
  list-style: none;
  margin-bottom: var(--space-5);
}

@media (max-width: 1180px) {
  .verticales__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .verticales__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .verticales__grid { grid-template-columns: 1fr; }
}

.vertical {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color 0.2s ease;
}

.vertical:hover {
  border-color: var(--ibm-blue);
}

.vertical__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ibm-blue);
}

.vertical__name {
  font-size: 1.25rem;
  color: var(--ink-night);
  letter-spacing: -0.01em;
}

.vertical__entities {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--graphite);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px dashed var(--line);
}

.verticales__caveat {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--graphite);
  font-style: italic;
  border-left: 2px solid var(--ibm-blue);
  padding-left: var(--space-3);
  max-width: 70ch;
}

/* ─── OCR souverain ───────────────────────────────────────── */
.ocr {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--line);
}

.ocr__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-3);
  max-width: 36ch;
}

.ocr__intro {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--graphite);
  max-width: 70ch;
  margin-bottom: var(--space-6);
}

.ocr__cascade {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  list-style: none;
  margin-bottom: var(--space-6);
  position: relative;
}

@media (max-width: 768px) {
  .ocr__cascade { grid-template-columns: 1fr; }
}

.ocr__step {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: relative;
}

.ocr__step--fallback {
  border-left: 3px solid var(--ibm-blue);
  background: var(--ibm-blue-soft);
}

.ocr__step-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ibm-blue);
}

.ocr__step-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-night);
  letter-spacing: -0.01em;
}

.ocr__step-title small {
  font-size: 0.75em;
  font-weight: 400;
  color: var(--graphite);
}

.ocr__step-desc {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--graphite);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px dashed var(--line);
}

.ocr__step-desc code {
  font-size: 0.9em;
  padding: 0.05rem 0.3rem;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  color: var(--ink-night);
}

.ocr__proof {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-4);
}

@media (max-width: 768px) {
  .ocr__proof { grid-template-columns: 1fr; gap: var(--space-4); }
}

.ocr__proof-stat {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
}

.ocr__proof-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  color: var(--ibm-blue);
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.ocr__proof-num small {
  font-size: 0.5em;
  color: var(--graphite);
  margin-left: 0.05em;
  font-weight: 600;
}

.ocr__proof-label {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-night);
}

.ocr__note {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--graphite);
  font-style: italic;
  max-width: 70ch;
}
