/* ============================================================
   inMyEdge — système de design partagé (landing, login, espace)

   Parti pris : thème sombre UNIQUE et assumé. Le produit phare est un
   terminal d'order flow ; la page vit dans ce monde-là, et les captures
   du chart (sombres) s'y posent sans cadre lourd. Toutes les couleurs
   sont donc peintes explicitement — jamais héritées du navigateur.

   Accent violet #7C3AED : repris de l'identité existante du journal,
   pas réinventé. La polarité teal/rouge est celle du vrai chart et
   reste réservée aux DONNÉES (jamais décorative).
   ============================================================ */

:root {
  /* Encre biaisée violet — un gris pur lirait comme non choisi */
  --ink:        #0A0912;
  --ink-raised: #12101C;
  --ink-high:   #191527;
  --line:       #221E33;
  --line-soft:  #1A1728;

  --violet:      #7C3AED;
  --violet-lift: #A78BFA;
  --violet-deep: #4C1D95;

  /* Polarité du flux d'ordres — valeurs exactes du chart en production */
  --bid: #26A69A;
  --ask: #EF5350;

  --fg:      #ECEAF4;
  --fg-mid:  #B4AECB;
  --fg-dim:  #837C9E;

  --step--2: 0.6875rem;
  --step--1: 0.8125rem;
  --step-0:  1rem;
  --step-1:  1.125rem;
  --step-2:  clamp(1.35rem, 1.1rem + 1.1vw, 1.75rem);
  --step-3:  clamp(1.75rem, 1.3rem + 2.1vw, 2.6rem);
  --step-4:  clamp(2.4rem, 1.5rem + 4vw, 4.2rem);

  --gutter: 148px;
  --measure: 62ch;
  --radius: 14px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* `clip` et NON `hidden` : `overflow-x: hidden` transforme l'élément en
     conteneur de défilement, ce qui casse `position: sticky` de la nav
     (constaté au premier rendu — la barre se décrochait en plein milieu
     de la page). `clip` rogne sans créer de scrollport. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: Archivo, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Archivo, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-stretch: 112%;              /* axe wdth — l'autorité "panneau d'instrument" */
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; }

/* Mono = la voix native du produit (le chart est intégralement en mono) */
.mono {
  font-family: 'Martian Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-family: 'Martian Mono', ui-monospace, monospace;
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ── Trame de page : gouttière d'instrument + colonne de contenu ── */
.wrap {
  width: min(1180px, 100% - 3rem);
  margin-inline: auto;
}

.band { border-top: 1px solid var(--line-soft); }

.band-grid {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  gap: 0 2.5rem;
  padding-block: clamp(4rem, 9vw, 7.5rem);
}
.band-rail { position: sticky; top: 6rem; align-self: start; }
.band-rail .eyebrow { display: block; }
.band-rail .rail-tick {
  display: block; width: 26px; height: 2px;
  background: var(--violet); margin-top: .9rem; border-radius: 2px;
}

@media (max-width: 860px) {
  .band-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .band-rail { position: static; }
}

/* ── Boutons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .82rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: Archivo, sans-serif;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}
.btn-primary {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 6px 24px -8px rgba(124, 58, 237, .9);
}
.btn-primary:hover { background: #8b5cf6; transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--fg);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--violet); color: var(--violet-lift); }
.btn-lg { padding: 1.05rem 2rem; font-size: var(--step-0); }

:where(a, button, input, select):focus-visible {
  outline: 2px solid var(--violet-lift);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Barre de navigation ───────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-in {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: .1rem;
  font-stretch: 112%; font-weight: 800; font-size: 1.12rem;
  letter-spacing: -.03em; text-decoration: none; color: var(--fg);
}
.brand .in { color: var(--violet-lift); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a.navlink {
  font-size: var(--step--1); color: var(--fg-mid); text-decoration: none;
  transition: color .16s var(--ease);
}
.nav-links a.navlink:hover { color: var(--fg); }
@media (max-width: 720px) { .nav-links a.navlink { display: none; } }

/* ── Canvas d'order flow (fond animé, partagé aux 3 pages) ──── */
.tape-host { position: absolute; inset: 0; overflow: hidden; }
.tape-host canvas { display: block; width: 100%; height: 100%; }
/* Le voile protège la lisibilité du texte à gauche tout en laissant la
   texture du footprint respirer à droite — c'est elle qui porte le propos. */
.tape-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, var(--ink) 4%, color-mix(in srgb, var(--ink) 82%, transparent) 42%, transparent 72%),
    linear-gradient(to bottom, color-mix(in srgb, var(--ink) 40%, transparent), transparent 22%, transparent 74%, var(--ink) 99%);
}

/* ── Cartes ────────────────────────────────────────────────── */
.card {
  background: var(--ink-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

/* ── Cadre de capture produit ──────────────────────────────── */
.shot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-raised);
  box-shadow: 0 30px 70px -40px rgba(0,0,0,.95);
}
.shot-bar {
  display: flex; align-items: center; gap: .45rem;
  padding: .6rem .85rem;
  border-bottom: 1px solid var(--line);
  background: var(--ink-high);
}
.shot-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.shot-name {
  margin-left: .5rem; font-size: var(--step--2); color: var(--fg-dim);
  font-family: 'Martian Mono', monospace; letter-spacing: .06em;
}
.shot img { display: block; width: 100%; height: auto; }
.shot-cap {
  padding: .9rem 1.1rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--fg-mid);
}
.shot-cap b { color: var(--fg); font-weight: 600; }

/* ── Révélation au scroll ──────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
