/* apps/vitrine/assets/style.css */
/* AltCheck — direction C (2026-07-05).
   Langue graphique du terminal, sans mimétisme : sombre chaud bleu-noir,
   multi-accents saturés (réf. Base by Uber / Tamagui), monospace pour la
   donnée, étiquettes crochets, pixels nets.

   COMPAT : cette feuille est partagée avec /integration/index.html.
   Les sélecteurs historiques (.hdr, .logo, .container, .narrow, .lede, .warn,
   .ftr, …) et les variables --border / --fg-muted doivent rester fonctionnels.
   La page d'intégration n'embarque pas le script d'animation : les états
   animés sont gated par body.anim-ready. */

:root {
  --bg:       #0E1116;
  --bg-alt:   #10151C;
  --panel:    #151A21;
  --panel-2:  #1B222C;
  --line:     #2A3340;
  --line-2:   #212933;
  --fg:       #E9EEF5;
  --fg-muted: #9AA6B5;   /* nom historique — utilisé inline par /integration/ */
  --faint:    #66717F;
  --border:   #2A3340;   /* nom historique — utilisé inline par /integration/ */

  --lime:    #8FF07A;
  --cyan:    #28D1FF;
  --magenta: #FF3E9C;
  --amber:   #FFC953;
  --on-lime: #0E1116;

  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r: 8px;
  --r-lg: 14px;
}

/* ===== Base ============================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background:
    radial-gradient(circle at 1px 1px, #1A222D 1px, transparent 0) 0 0 / 28px 28px,
    var(--bg);
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin: 0.9rem 0 1.1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 0.8rem; }
h3 { font-size: 1.06rem; margin: 0 0 0.45rem; }
p  { margin: 0 0 1rem; }

a { color: var(--cyan); }
a:hover { color: #6FE0FF; }

code {
  font-family: var(--mono); font-size: 0.86em;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 5px; padding: 0.1em 0.42em;
  color: var(--lime);
}
pre {
  font-family: var(--mono); font-size: 0.84rem; line-height: 1.55;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1rem 1.15rem;
  overflow-x: auto; color: var(--fg);
}
pre code { background: none; border: none; padding: 0; color: inherit; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 1rem 0; }
th, td { text-align: left; padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--line-2); }
th { color: var(--fg-muted); font-family: var(--mono); font-size: 0.76rem;
     text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }

hr { border: none; border-top: 1px solid var(--line-2); margin: 2rem 0; }
::selection { background: var(--lime); color: var(--on-lime); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.4rem; }
.narrow    { max-width: 780px; }

/* ===== Header ============================================================ */
.hdr {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.6rem;
  background: rgba(14, 17, 22, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: var(--sans); font-weight: 700; font-size: 1.15rem;
  letter-spacing: -0.01em; color: var(--fg); text-decoration: none;
}
.logo span { color: var(--lime); }
.hdr nav { display: flex; align-items: center; gap: 1.4rem; }
.hdr nav a {
  font-size: 0.9rem; color: var(--fg-muted); text-decoration: none;
  transition: color .15s ease;
}
.hdr nav a:hover { color: var(--fg); }

/* ===== Boutons =========================================================== */
.btn, .btn-ghost {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: 0.94rem;
  padding: 0.68rem 1.45rem; border-radius: var(--r);
  transition: transform .1s ease, background .15s ease,
              border-color .15s ease, color .15s ease;
}
.btn { background: var(--lime); color: var(--on-lime); border: 1px solid var(--lime); }
.btn:hover { background: #A4F792; border-color: #A4F792; color: var(--on-lime); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--fg-muted); color: var(--fg); }
.btn:focus-visible, .btn-ghost:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}

/* ===== Hero ============================================================== */
.hero { padding: 5.5rem 0 3.5rem; text-align: center; }
.hero .eyebrow { margin-bottom: 0.4rem; }
.hero h1 { max-width: 21ch; margin-left: auto; margin-right: auto; }
.hero .lede { margin-left: auto; margin-right: auto; }
.cta-row {
  display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap;
  margin-top: 1.7rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono); font-size: 0.76rem; font-weight: 500;
  letter-spacing: 0.05em; color: var(--lime);
}
.lede {
  font-size: 1.08rem; color: var(--fg-muted); line-height: 1.65;
  max-width: 62ch;
}

/* --- Diagramme réseau ----------------------------------------------------- */
.net-wrap { margin: 3.6rem auto 0; max-width: 980px; }
.net-svg { width: 100%; height: auto; display: block; }

.net-svg .wire {
  fill: none; stroke: var(--line); stroke-width: 1.5;
  stroke-dasharray: 5 6;
}
.net-svg .mesh { stroke: var(--line-2); stroke-width: 1; }
.net-svg .outline {
  fill: var(--panel); stroke: var(--line); stroke-width: 1.5;
}
.net-svg .outline.proof { stroke: color-mix(in srgb, var(--lime) 45%, var(--line)); }
.net-svg .outline-thin { stroke: var(--line); stroke-width: 1.5; }
.net-svg .outline-dot { fill: none; stroke: var(--line); stroke-width: 1.5; }
.net-svg .dot-magenta { fill: var(--magenta); }
.net-svg .dot-amber   { fill: var(--amber); }
.net-svg .dot-lime    { fill: var(--lime); }

.net-svg .px-cyan    { fill: var(--cyan); }
.net-svg .px-amber   { fill: var(--amber); }
.net-svg .px-magenta { fill: var(--magenta); }
.net-svg .px-lime    { fill: var(--lime); }
.net-svg .px-core    { fill: var(--bg); }
.net-svg rect[class^="px-"] { shape-rendering: crispEdges; }

.net-svg .net-lbl {
  font-family: var(--mono); font-size: 12px; fill: var(--faint);
}
.net-svg .net-code {
  font-family: var(--mono); font-size: 13.5px; font-weight: 600;
  fill: var(--lime);
}

.net-svg .pulse {
  fill: none; stroke: var(--magenta); stroke-width: 1;
  transform-box: fill-box; transform-origin: center;
  opacity: 0;
}
body.anim-ready .net-svg .pulse { animation: net-pulse 3s ease-out infinite; }
@keyframes net-pulse {
  0%   { transform: scale(0.45); opacity: 0.9; }
  70%  { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1.15); opacity: 0; }
}

.net-svg .pkt { opacity: 0; }
body.anim-ready .net-svg .pkt { animation: pkt-run 7.5s linear infinite; }
body.anim-ready .net-svg .pkt-1 {
  fill: var(--cyan);
  offset-path: path("M 122 160 C 158 148, 176 172, 208 160");
}
body.anim-ready .net-svg .pkt-2 {
  fill: var(--cyan);
  offset-path: path("M 320 160 C 372 142, 392 180, 438 160");
  animation-delay: 1.1s;
}
body.anim-ready .net-svg .pkt-3 {
  fill: var(--lime);
  offset-path: path("M 648 160 C 698 144, 716 176, 758 160");
  animation-delay: 2.6s;
}
@keyframes pkt-run {
  0%   { offset-distance: 0%;   opacity: 0; }
  4%   { opacity: 1; }
  22%  { offset-distance: 100%; opacity: 1; }
  26%  { offset-distance: 100%; opacity: 0; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* ===== Sections ========================================================== */
.block { padding: 4.6rem 0; }
.block.alt { background: var(--bg-alt); border-top: 1px solid var(--line-2);
             border-bottom: 1px solid var(--line-2); }
.section-head { max-width: 640px; margin-bottom: 2.4rem; }
.section-head p { color: var(--fg-muted); }

/* ===== Cartes ============================================================ */
.grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.35rem 1.4rem;
  display: flex; flex-direction: column;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--fg-muted); transform: translateY(-2px); }
.card p { color: var(--fg-muted); font-size: 0.9rem; flex: 1; margin-bottom: 0.9rem; }
.card.alt { background: var(--panel); }

.ico {
  width: 40px; height: 40px; margin-bottom: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; border-radius: var(--r);
  background: var(--panel-2); border: 1px solid var(--line-2);
}
/* Multi-accents cyclés — la couleur circule dans la grille (réf. Tamagui). */
.grid > :nth-child(4n+1) .ico { color: var(--cyan); }
.grid > :nth-child(4n+2) .ico { color: var(--lime); }
.grid > :nth-child(4n+3) .ico { color: var(--magenta); }
.grid > :nth-child(4n+4) .ico { color: var(--amber); }

.tag {
  align-self: flex-start;
  font-family: var(--mono); font-size: 0.74rem; font-weight: 500;
  color: var(--fg-muted);
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 5px; padding: 0.22rem 0.55rem;
}
.card:hover .tag { color: var(--fg); }

.reseau-note {
  margin: 2rem 0 0; font-size: 0.95rem; color: var(--fg-muted);
  border-left: 2px solid var(--magenta); padding-left: 1rem;
  max-width: 60ch;
}

/* ===== Étapes ============================================================ */
.steps { display: flex; flex-direction: column; gap: 1.5rem; max-width: 720px; }
.step { display: flex; gap: 1.2rem; align-items: flex-start; }
.step p { color: var(--fg-muted); font-size: 0.94rem; margin: 0; }
.num {
  flex: none; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 1rem;
  color: var(--lime); background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--lime) 35%, var(--line));
  border-radius: var(--r);
}

/* ===== Garanties ========================================================= */
.guarantees {
  display: grid; gap: 1.1rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.guarantee { display: flex; gap: 0.8rem; align-items: flex-start; }
.guarantee strong { display: block; margin-bottom: 0.15rem; font-size: 0.97rem; }
.guarantee span:not(.check) { color: var(--fg-muted); font-size: 0.88rem; line-height: 1.55; }
.check {
  flex: none; width: 22px; height: 22px; margin-top: 0.1rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 0.8rem;
  color: var(--on-lime); background: var(--lime); border-radius: 5px;
}

/* ===== Bandeau accès ===================================================== */
.cta-banner {
  text-align: center; padding: 4.6rem 1.4rem;
  background: var(--panel);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cta-banner h2 { margin-top: 0.5rem; }
.cta-banner p { color: var(--fg-muted); max-width: 56ch; margin: 0 auto 1.6rem; }
.cta-banner .cta-row { margin-top: 0; }
.cta-banner .btn, .cta-banner .btn-ghost { margin: 0; }

/* ===== Avertissement (page intégration) ================================== */
.warn {
  background: color-mix(in srgb, var(--amber) 7%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--amber) 30%, var(--line));
  border-radius: var(--r-lg); padding: 1.2rem 1.4rem; margin: 2rem 0;
}
.warn h2 { font-size: 1.05rem; color: var(--amber); margin-bottom: 0.5rem; }
.warn p, .warn li { color: var(--fg-muted); font-size: 0.9rem; }

/* ===== Footer ============================================================ */
.ftr {
  padding: 2.8rem 1.4rem 3.4rem; text-align: center;
  color: var(--faint); font-size: 0.88rem;
}
.ftr p { margin: 0.3rem 0; }
.ftr strong { color: var(--fg); }
.ftr-accent { color: var(--lime); }
.ftr a { color: var(--fg-muted); }
.ftr a:hover { color: var(--fg); }

/* ===== Révélation au défilement ==========================================
   Gated par body.anim-ready (ajoutée par le script de index.html) : sans
   script — page intégration, JS coupé — tout reste visible. */
body.anim-ready .rv {
  opacity: 0; transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
body.anim-ready .rv.in { opacity: 1; transform: none; }

/* ===== Responsive ======================================================== */
@media (max-width: 720px) {
  .hdr { flex-wrap: wrap; gap: 0.6rem; padding: 0.75rem 1rem; }
  .hdr nav { gap: 0.9rem; flex-wrap: wrap; }
  .hero { padding: 3.4rem 0 2.6rem; }
  .block { padding: 3.2rem 0; }
  .net-wrap { margin-top: 2.4rem; }
}

@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;
  }
}
