/* ============================================================
   Junction — jonction.tavportal.com
   Thème sombre, palette de l'app : fond #0E0E10, surfaces #1B1B1D,
   accent #3FB950. Aucune dépendance externe.
   ============================================================ */

:root {
  --bg: #0E0E10;
  --surface: #1B1B1D;
  --surface-2: #232326;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #EDEDEF;
  --text-dim: #9C9CA3;
  --text-faint: #6B6B73;
  --accent: #3FB950;
  --accent-soft: rgba(63, 185, 80, 0.12);
  --accent-border: rgba(63, 185, 80, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 60px;
  --max-w: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* grille subtile */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 56px 56px;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.38em;
  color: var(--accent);
  white-space: nowrap;
}

strong { font-weight: 600; }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.nav.scrolled {
  background: rgba(14, 14, 16, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.nav-mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.95rem;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: var(--surface);
}

/* ============ HERO ============ */
.hero {
  padding: calc(var(--nav-h) + 72px) 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  width: 720px; height: 480px;
  background: radial-gradient(ellipse at center, rgba(63, 185, 80, 0.09), transparent 65%);
  pointer-events: none;
}
.hero-kicker {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(3.2rem, 9vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 14px;
}
.hero-baseline {
  font-size: clamp(1.2rem, 3.4vw, 1.65rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}
.hero-sub {
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--text-dim);
  font-size: 1.02rem;
}
.hero-sub em { color: var(--text); font-style: normal; font-weight: 600; }
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #08130B;
  box-shadow: 0 0 0 1px rgba(63, 185, 80, 0.4), 0 10px 28px -10px rgba(63, 185, 80, 0.45);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(63, 185, 80, 0.6), 0 14px 34px -10px rgba(63, 185, 80, 0.55); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent-border); background: var(--surface-2); }

/* ============ CAPTURES / PLACEHOLDERS ============ */
.shot {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
/* état "capture absente" : dégradé + label (classe posée par main.js) */
.shot--missing {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(63, 185, 80, 0.10), transparent 60%),
    linear-gradient(160deg, #1B1B1D 0%, #141416 100%);
}
.shot--missing::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 9px;
}
.shot--missing::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 24px;
  text-align: center;
}
.shot-hero {
  max-width: 860px;
  margin: 0 auto;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* ============ SECTIONS ============ */
.section { padding: 88px 0; }
.section-alt {
  background: linear-gradient(180deg, transparent, rgba(27, 27, 29, 0.5) 12%, rgba(27, 27, 29, 0.5) 88%, transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  font-weight: 750;
  letter-spacing: -0.028em;
  line-height: 1.12;
  margin-bottom: 14px;
}
.section-lead {
  color: var(--text-dim);
  font-size: 1.02rem;
  max-width: 620px;
  margin-bottom: 48px;
}

/* ============ FLUX 3 CARTES ============ */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 14px;
}
.flow-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.flow-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}
.flow-card p:last-child {
  color: var(--text-dim);
  font-size: 0.92rem;
}
.flow-card--core {
  border-color: var(--accent-border);
  background: linear-gradient(170deg, var(--accent-soft), var(--surface) 55%);
}
.flow-card--core h3 { color: var(--accent); }
.flow-tag {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.flow-arrow {
  display: flex;
  align-items: center;
  color: var(--accent);
  width: 42px;
}
.flow-arrow svg { width: 100%; height: auto; }
.flow-note {
  margin-top: 34px;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.93rem;
}
.flow-note strong { color: var(--text); }

/* ============ CARTES FONCTIONNALITÉS ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--border-strong); }
.card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.card h3 code { font-size: 0.88em; }
.card > p { color: var(--text-dim); font-size: 0.93rem; }
.card .shot { margin-bottom: 20px; }
.card ul {
  list-style: none;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card ul li {
  position: relative;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.card ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.75;
}
.card ul li strong,
.card ul li em { color: var(--text); }
.card ul li em { font-style: normal; }

.cards--compact { grid-template-columns: repeat(3, 1fr); }
.cards--compact .card { padding: 22px 20px; }

/* ============ ÉTAPES ============ */
.steps-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}
.steps { list-style: none; display: flex; flex-direction: column; gap: 22px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.05rem;
}
.step h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.step p { color: var(--text-dim); font-size: 0.93rem; }
.shot-settings { position: sticky; top: calc(var(--nav-h) + 24px); aspect-ratio: 4 / 5; }

/* ============ ROADMAP ============ */
.roadmap {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 680px;
}
.roadmap li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.roadmap-badge {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 6px;
  color: var(--text-faint);
  border: 1px solid var(--border-strong);
  min-width: 72px;
  text-align: center;
}
.roadmap-badge--wip {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

/* ============ FAQ ============ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 17px 20px;
  font-weight: 600;
  font-size: 0.97rem;
  letter-spacing: -0.01em;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color 0.15s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-item p {
  padding: 0 20px 18px;
  color: var(--text-dim);
  font-size: 0.93rem;
}
.faq-item p em { color: var(--text); font-style: normal; font-weight: 600; }

/* ============ FOOTER ============ */
.footer {
  padding: 48px 0 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-line {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 18px;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}
.footer-links a {
  color: var(--text-faint);
  text-decoration: none;
  font-size: 0.83rem;
  padding: 5px 10px;
  border-radius: 7px;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--text); }

/* ============ APPARITION AU SCROLL ============ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .flow {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .flow-arrow {
    width: 100%;
    height: 34px;
    justify-content: center;
    padding: 4px 0;
  }
  .flow-arrow svg {
    width: 26px;
    transform: rotate(90deg);
  }
  .cards,
  .cards--compact { grid-template-columns: 1fr; }
  .steps-layout { grid-template-columns: 1fr; }
  .shot-settings { position: static; aspect-ratio: 16 / 12; }
}

@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .hero { padding: calc(var(--nav-h) + 48px) 0 64px; }
  .nav-brand span:last-child { display: none; }
  .btn { width: 100%; text-align: center; }
  .hero-actions { flex-direction: column; align-items: stretch; max-width: 320px; margin-left: auto; margin-right: auto; margin-bottom: 44px; }
}
