/* Arc Hub — admin interne AXIONYX. Charte dark stricte. */

:root {
  --bg: #050505;
  --surface: #0d0d0d;
  --surface-2: #111;
  --text: #e8e4de;
  --title: #ffffff;
  --muted: #888;
  --accent: #CC785C;
  --accent-hover: #e28b6e;
  --line: rgba(255, 255, 255, 0.08);
  --line-hover: rgba(204, 120, 92, 0.5);
}

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

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--accent-hover);
}

.serif {
  font-family: 'Source Serif 4', Georgia, serif;
  letter-spacing: -0.01em;
}

/* ── Layout ─────────────────────────────────────────────── */

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

header.top {
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Source Serif 4', serif;
  color: var(--title);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #050505;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--title);
}

.brand-sub {
  color: var(--muted);
  font-size: 0.78rem;
  margin-left: 0.6rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

.top-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.88rem;
}

.top-links a {
  color: var(--muted);
}

.top-links a:hover {
  color: var(--title);
}

.top-cta {
  padding: 0.45rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.85rem;
}

.top-cta:hover {
  background: rgba(204, 120, 92, 0.1);
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-family: 'Source Serif 4', serif;
  font-size: 2.6rem;
  line-height: 1.1;
  color: var(--title);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero p {
  color: var(--muted);
  max-width: 640px;
  font-size: 1rem;
}

.hero .badge-internal {
  display: inline-block;
  padding: 0.25rem 0.85rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

/* ── Grid des cartes ───────────────────────────────────── */

.flows-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding: 2.5rem 0 4rem;
}

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

@media (max-width: 640px) {
  .flows-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 1.9rem;
  }
  .top-inner {
    padding: 0.85rem 1rem;
  }
  .shell {
    padding: 0 1rem;
  }
}

.flow-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.flow-card:hover {
  border-color: var(--line-hover);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.flow-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(204, 120, 92, 0.06);
  font-size: 1.3rem;
}

.flow-card h3 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.25rem;
  color: var(--title);
  font-weight: 600;
  margin-top: 0.25rem;
}

.flow-card .tagline {
  color: var(--muted);
  font-size: 0.92rem;
  flex-grow: 1;
}

.flow-card .stats {
  display: flex;
  gap: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
}

.flow-card .stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.flow-card .stat-value {
  color: var(--title);
  font-weight: 600;
  font-size: 0.95rem;
}

.flow-card .stat-label {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.flow-card .read-more {
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

/* ── Loader ─────────────────────────────────────────────── */

.loader {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}

/* ── Flow detail ────────────────────────────────────────── */

.breadcrumb {
  padding: 1.5rem 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.flow-header {
  padding: 0.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

.flow-header h1 {
  font-family: 'Source Serif 4', serif;
  font-size: 2.2rem;
  color: var(--title);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.flow-header .tagline {
  color: var(--muted);
  font-size: 1rem;
}

.diagram-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem;
  margin: 2rem 0;
  overflow-x: auto;
  min-height: 200px;
}

.diagram-wrap .mermaid {
  text-align: center;
  background: transparent;
}

.section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.section h2 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.5rem;
  color: var(--title);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section p,
.section li {
  color: var(--text);
  font-size: 0.96rem;
}

.section ol,
.section ul {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.section li {
  margin-bottom: 0.4rem;
}

table.flow-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.93rem;
}

table.flow-table th,
table.flow-table td {
  padding: 0.6rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

table.flow-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

table.flow-table tbody tr:hover {
  background: rgba(204, 120, 92, 0.04);
}

code,
.code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  background: rgba(204, 120, 92, 0.08);
  color: var(--accent);
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.86em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tag {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(204, 120, 92, 0.1);
  color: var(--accent);
  font-size: 0.8rem;
  font-family: 'SF Mono', Menlo, monospace;
}

/* ── Footer ─────────────────────────────────────────────── */

footer.bottom {
  border-top: 1px solid var(--line);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 3rem;
}

footer.bottom .lock {
  color: var(--accent);
  margin-right: 0.4rem;
}

/* ── Auth gate overlay ─────────────────────────────────── */

.auth-gate {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 2rem;
  text-align: center;
  flex-direction: column;
  gap: 1rem;
}

.auth-gate p {
  color: var(--muted);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
