/* ============================================================
   ULTRACORP Official Memorial Interface
   Design system inspired by the institutional public-interface
   aesthetic (serial microcopy, mono data, bordered grids).
   ============================================================ */

:root {
  /* dark theme inverted palette */
  --ink: #f2f0e9;        /* primary text (near-white) */
  --charcoal: #d6d3ca;   /* secondary text */
  --graphite: #a7abb4;   /* body text */
  --steel: #828893;      /* labels, meta */
  --silver: #7d828c;     /* fine print */
  --mist: #262c34;       /* borders */
  --bone: #0e1116;       /* main background (near-black) */
  --paper: #151a21;      /* alternate background */
  --accent: #e0564e;     /* signal red, brightened for dark bg */
  --accent-deep: #c14039;
  --signal: #3ddc84;
  --signal-dim: #1f7a49;
  --terminal-bg: #0a0c0b;
  --maxw: 72rem; /* max-w-6xl */
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* l'en-tête reste collé en haut : les ancres internes (#01, #02…) doivent
     se positionner sous lui et non être masquées */
  scroll-padding-top: 118px;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img { max-width: 100%; }

a { color: inherit; text-decoration: none; }

.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline; } }

/* ---------- typography helpers ---------- */

.serial {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}

.label-strong {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.font-mono {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

.text-ink { color: var(--ink); }
.text-charcoal { color: var(--charcoal); }
.text-graphite { color: var(--graphite); }
.text-steel { color: var(--steel); }
.text-silver { color: var(--silver); }
.text-bone { color: var(--bone); }
.text-accent { color: var(--accent); }

/* ---------- surfaces & layout ---------- */

.bg-bone { background: var(--bone); }
.bg-paper { background: var(--paper); }
.bg-ink { background: var(--ink); }
.bg-mist { background: var(--mist); }

.container {
  margin: 0 auto;
  max-width: var(--maxw);
  padding: 0 1.5rem;
}

.border-b { border-bottom: 1px solid var(--mist); }
.border-t { border-top: 1px solid var(--mist); }
.border-l { border-left: 1px solid var(--mist); }
.border-ink { border: 1px solid var(--ink); }
.border-mist { border: 1px solid var(--mist); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--mist);
  background: var(--bone);
}

.top-serial {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--mist);
  padding: 0.375rem 1.5rem;
  color: var(--steel);
}

.top-serial .left { display: flex; align-items: center; gap: 0.6rem; }
.top-right { display: inline-flex; align-items: center; gap: 1rem; }

/* language switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lang-switch a { color: var(--steel); transition: color 0.15s ease; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch .lang-active { color: var(--ink); font-weight: 700; }
.lang-sep { color: var(--silver); }
.top-serial .signal-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--silver);
}
.top-serial.signal-on .signal-dot {
  background: var(--signal);
  box-shadow: 0 0 6px var(--signal);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
}

.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-text { line-height: 1.2; }
.brand-text .name { font-weight: 700; letter-spacing: 0.08em; }
.brand-text .sub { color: var(--steel); }

.logo-mark { display: block; width: 40px; height: 40px; flex: none; }

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.75rem;
}
.main-nav a {
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  color: var(--steel);
  transition: color 0.15s ease;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--mist);
}
.nav-mobile ul {
  list-style: none;
  margin: 0 auto;
  max-width: var(--maxw);
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.75rem 1.5rem;
}
.nav-mobile li { flex: none; }
.nav-mobile a {
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  color: var(--steel);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-mobile { display: block; }
  /* en-tête plus haut sur mobile (rangée de nav ajoutée) */
  html { scroll-padding-top: 162px; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--ink); color: var(--bone); border: 1px solid var(--ink); }
.btn-primary:hover { background: var(--charcoal); }
.btn-accent { background: var(--accent); color: var(--bone); border: 1px solid var(--accent); }
.btn-accent:hover { background: var(--accent-deep); }
.btn-outline { background: var(--bone); color: var(--ink); border: 1px solid var(--mist); }
.btn-outline:hover { border-color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--mist);
  background: var(--bone);
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--ink) 1px, transparent 1px),
    linear-gradient(to bottom, var(--ink) 1px, transparent 1px);
  background-size: 80px 80px;
}
.hero-inner {
  position: relative;
  display: grid;
  gap: 3rem;
  padding: 5rem 0;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 8fr 4fr; padding: 7rem 0; }
}
.hero h1 {
  margin: 1.5rem 0 0;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero .tagline {
  margin: 1.5rem 0 0;
  font-size: clamp(1.25rem, 2.4vw, 1.875rem);
  font-weight: 300;
  line-height: 1.3;
  color: var(--charcoal);
}
.hero .lede {
  margin: 2rem 0 0;
  max-width: 42rem;
  font-size: 1rem;
  color: var(--graphite);
}
@media (min-width: 900px) { .hero .lede { font-size: 1.125rem; } }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }

.indicators { padding: 1.5rem 0 0; }
@media (min-width: 900px) {
  .indicators { border-left: 1px solid var(--mist); padding: 0 0 0 2rem; }
}
.indicator-list { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.indicator-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--mist);
  padding: 0 0 0.75rem;
  margin-bottom: 0.75rem;
}
.indicator-list li:last-child { border-bottom: none; }
.indicator-list dt { color: var(--steel); }
.indicator-list dd { margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ---------- generic sections ---------- */

.section { border-bottom: 1px solid var(--mist); }
.section-pad { padding: 4rem 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.section-head h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.section-link { font-size: 0.875rem; font-weight: 500; color: var(--accent); }
.section-link:hover { color: var(--ink); }

/* ---------- banner strip ---------- */

.banner {
  background: var(--paper);
  border-bottom: 1px solid var(--mist);
  padding: 2rem 0;
  text-align: center;
}
.banner .btn { margin-top: 1.25rem; }

/* ---------- dark band ---------- */

.dark-band {
  position: relative;
  height: 42vh;
  min-height: 320px;
  overflow: hidden;
  border-bottom: 1px solid var(--mist);
  background:
    radial-gradient(120% 90% at 50% 110%, rgba(166,35,28,0.16), transparent 55%),
    linear-gradient(160deg, #0d1013 0%, #15181c 55%, #0a0c0f 100%);
}
.dark-band .band-grid {
  position: absolute; inset: 0; opacity: 0.06;
  background-image:
    linear-gradient(to right, var(--bone) 1px, transparent 1px),
    linear-gradient(to bottom, var(--bone) 1px, transparent 1px);
  background-size: 56px 56px;
}
.dark-band .band-vignette {
  position: absolute; inset: 0;
  left: 50%; top: 20%;
  color: rgba(246,244,238,0.8);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 1.2875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  /*background: linear-gradient(rgba(11,13,16,0.85), rgba(11,13,16,0.15) 60%, transparent);*/
}
.dark-band .band-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: rgba(246,244,238,0.75);
}
.dark-band .ghost-line {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(246,244,238,0.46);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
}
@media (max-width: 640px) { .dark-band .ghost-line { display: none; } }

/* ---------- cards / grids ---------- */

.grid-cards {
  display: grid;
  gap: 1px;
  background: var(--mist);
  margin-top: 2.5rem;
}
.grid-cards > * { background: var(--bone); }

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  display: block;
  height: 100%;
  padding: 1.5rem;
  transition: background-color 0.15s ease;
}
a.card:hover { background: var(--paper); }

.card .card-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.card h3 {
  margin: 1rem 0 0;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}
a.card:hover h3 { color: var(--accent); }
.card p { margin: 0.75rem 0 0; font-size: 0.875rem; color: var(--graphite); }
.card .card-foot { margin-top: 1.5rem; color: var(--steel); }

.numeral { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.8125rem; color: var(--steel); }
.card h3 + .italic-note { margin-top: 0.75rem; font-style: italic; color: var(--graphite); font-size: 0.875rem; }

/* ---------- statement (quote) section ---------- */

.statement { display: grid; gap: 3rem; padding: 4rem 0; }
@media (min-width: 900px) { .statement { grid-template-columns: 5fr 7fr; } }
.statement blockquote {
  margin: 0.5rem 0 0;
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}
@media (min-width: 900px) { .statement .quote-side { border-left: 1px solid var(--mist); padding-left: 2rem; } }
.prose-doc { margin: 1rem 0 0; font-size: 1rem; color: var(--graphite); }
@media (min-width: 900px) { .prose-doc { font-size: 1.0625rem; } }
.signature { margin-top: 2rem; }

/* ---------- portraits ---------- */

.portrait-card { display: flex; flex-direction: column; height: 100%; background: var(--bone); }
a.portrait-card { transition: background-color 0.15s ease; }
a.portrait-card:hover { background: var(--paper); }

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 0%, #1b1f24, #0d1013 70%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.portrait-frame .monogram {
  font-size: 6rem;
  font-weight: 300;
  color: rgba(246,244,238,0.28);
  letter-spacing: -0.05em;
}
.portrait-frame .stamp {
  position: absolute;
  border: 1px solid rgba(166,35,28,0.65);
  color: rgba(166,35,28,0.75);
  padding: 0.4rem 1.1rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transform: rotate(-9deg);
}
.portrait-frame .frame-caption {
  position: absolute;
  left: 1rem; right: 1rem; bottom: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: rgba(246,244,238,0.65);
}
.portrait-body { flex: 1; display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; }
.portrait-body .role { font-size: 0.875rem; color: var(--graphite); }
.portrait-body .quote { margin-top: auto; font-size: 0.875rem; font-style: italic; color: var(--charcoal); }

/* ---------- archive list ---------- */

.archive-list { list-style: none; margin: 2.5rem 0 0; padding: 0; }
.archive-list li { border-bottom: 1px solid var(--mist); }
.archive-list a.entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1.5rem 0;
  transition: padding-left 0.15s ease;
}
.archive-list a.entry:hover { padding-left: 0.75rem; }
.archive-list a.entry:hover h3 { color: var(--accent); }
@media (min-width: 900px) {
  .archive-list a.entry { grid-template-columns: 8rem 1fr auto; align-items: baseline; }
}
.entry h3 { margin: 0; font-size: 1rem; font-weight: 500; color: var(--ink); }
.entry .entry-meta { color: var(--steel); font-size: 0.8125rem; }
.entry .entry-date { color: var(--steel); }

.classified-tag {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.1rem 0.5rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-left: 0.5rem;
}

/* ---------- document / prose page ---------- */

.doc-page { padding: 4rem 0; }
.doc-head { border-bottom: 1px solid var(--mist); padding-bottom: 2rem; margin-bottom: 2.5rem; }
.doc-head h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.doc-head .doc-sub { margin-top: 1rem; max-width: 44rem; color: var(--graphite); }
.doc-body { max-width: 52rem; }
.doc-body h2 {
  margin: 3rem 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.doc-body h3 { margin: 2rem 0 0.5rem; font-size: 1rem; font-weight: 600; }
.doc-body p { margin: 1rem 0; color: var(--graphite); }
.doc-body ul, .doc-body ol { color: var(--graphite); }
.doc-body li { margin: 0.5rem 0; }
.doc-body strong { color: var(--ink); }

.timeline { list-style: none; margin: 2.5rem 0 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--mist);
}
.timeline .year { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--accent); font-size: 0.875rem; padding-top: 0.15rem; }
.timeline h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.timeline p { margin: 0.5rem 0 0; font-size: 0.9375rem; color: var(--graphite); }

.tech-table { width: 100%; border-collapse: collapse; margin-top: 2.5rem; font-size: 0.9375rem; }
.tech-table th {
  text-align: left;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
  padding: 0 1rem 0.75rem 0;
}
.tech-table td { border-bottom: 1px solid var(--mist); padding: 1rem 1rem 1rem 0; vertical-align: top; color: var(--graphite); }
.tech-table td:first-child { color: var(--ink); font-weight: 500; }

.notice {
  border-left: 3px solid var(--accent);
  background: var(--paper);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.9375rem;
  color: var(--charcoal);
}

/* ---------- hidden layer ---------- */

.ghost {
  color: rgba(246, 244, 238, 0.16);
  user-select: all;
}
.ghost::selection { background: var(--accent); color: #0e1116; }

.dark-band .ghost { color: rgba(246,244,238,0.16); }

.hint-block {
  margin-top: 2rem;
  border: 1px dashed var(--mist);
  padding: 1rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--steel);
}

/* ---------- terminal page ---------- */

.terminal-page {
  background: var(--terminal-bg);
  color: var(--signal);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
.terminal-bar {
  border-bottom: 1px solid rgba(61,220,132,0.25);
  padding: 0.6rem 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--signal-dim);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.terminal-body {
  flex: 1;
  max-width: 60rem;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}
.term-line { white-space: pre-wrap; word-break: break-word; min-height: 1.2em; }
.term-line.dim { color: rgba(61,220,132,0.55); }
.term-line.alert { color: #ffb4a8; }
.term-line.signal { color: var(--signal); }
.term-input-row { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
.term-prompt { color: var(--signal); flex: none; }
.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--signal);
  font: inherit;
  caret-color: var(--signal);
  padding: 0;
}
.term-input::placeholder { color: rgba(61,220,132,0.3); }
.cursor-blink::after {
  content: "▍";
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.terminal-foot {
  border-top: 1px solid rgba(61,220,132,0.25);
  padding: 0.75rem 1.5rem;
  color: var(--signal-dim);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.unlocked-banner {
  display: none;
  background: rgba(61,220,132,0.08);
  border: 1px solid rgba(61,220,132,0.35);
  color: var(--signal);
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
}

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--mist); background: var(--paper); }
.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding: 3rem 0;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand p { max-width: 22rem; margin-top: 1.25rem; font-size: 0.875rem; color: var(--graphite); }
.footer-col h4 {
  margin: 0 0 0.75rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0.4rem 0; font-size: 0.875rem; color: var(--charcoal); }
.footer-col a:hover { color: var(--ink); }

.footer-legal {
  border-top: 1px solid var(--mist);
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-legal .row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  color: var(--steel);
}
.footer-legal .disclaimer {
  margin-top: 0.75rem;
  max-width: 48rem;
  font-size: 0.6875rem;
  line-height: 1.6;
  color: var(--silver);
}
.footer-legal .disclaimer a { color: var(--steel); text-decoration: underline; text-underline-offset: 2px; }
.footer-legal .disclaimer a:hover { color: var(--ink); }

.channel-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.channel-list span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--mist);
  background: var(--bone);
  padding: 0.4rem 0.6rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ---------- 404 ---------- */

.err-page { text-align: center; padding: 8rem 1.5rem; }
.err-page h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 500; letter-spacing: -0.02em; margin: 1.5rem 0 0; }
.err-page p { color: var(--graphite); max-width: 30rem; margin: 1.5rem auto; }

/* ---------- global glitch overlay (glitch.js) ---------- */

/* html gets the site's page background so the micro-jolt during a burst
   never flashes the browser's default (white) background at the edges. */
html { background: var(--bone); }

/* full-screen transparent canvas drawn by assets/js/glitch.js; inert
   (no pointer events) and invisible between bursts. */
.uc-glitch-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
}

/* micro-jolt of the whole page during a burst makes the tear read on
   the real content instead of only on the overlay */
html.uc-glitch-burst { animation: uc-glitch-jolt 0.35s linear 1; }

@keyframes uc-glitch-jolt {
  0%, 100% { transform: none; }
  10% { transform: translate(1.5px, -1px); }
  20% { transform: translate(-1px, 1px); }
  35% { transform: translate(0.5px, 0.5px) skewY(0.15deg); }
  50% { transform: translate(-1.5px, -0.5px); }
  65% { transform: translate(1px, 0.5px) skewY(-0.12deg); }
  80% { transform: translate(-0.5px, -1px); }
  90% { transform: translate(0.5px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .uc-glitch-canvas { display: none !important; }
  html.uc-glitch-burst { animation: none; }
}

/* ---------- Vanta NET background (dark band, homepages) ---------- */

/* Vanta injects its canvas with inline z-index:0 keep it behind the
   section's grid, vignette and text. */
.dark-band .band-grid,
.dark-band .band-vignette { z-index: 1; }
.dark-band .ghost-line,
.dark-band .band-caption { z-index: 2; }

/* ---------- musique de fond (audio.js) ---------- */

/* ancres pour le centrage absolu de l'equalizer */
.top-serial, .terminal-bar { position: relative; }

.eq-zone {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.eq-bar {
  width: 2px;
  background: var(--silver);
  opacity: 0.55;
  transform-origin: bottom;
}
.eq-bar:nth-child(1) { height: 6px; }
.eq-bar:nth-child(2) { height: 10px; }
.eq-bar:nth-child(3) { height: 7px; }
.eq-bar:nth-child(4) { height: 11px; }
.eq-bar:nth-child(5) { height: 8px; }

.eq-zone.playing .eq-bar {
  background: var(--signal);
  opacity: 0.95;
  animation: eq-bounce 0.9s ease-in-out infinite;
}
@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1.6); }
}

.eq-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--mist);
  border-radius: 3px;
  background: transparent;
  color: var(--steel);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.eq-toggle:hover { color: var(--signal); border-color: var(--signal-dim); }
.eq-toggle svg { display: block; fill: currentColor; }
.eq-toggle svg rect { fill: currentColor; }
.eq-zone.playing .eq-toggle { color: var(--signal); }

@media (max-width: 640px) {
  .eq-zone { transform: translate(-50%, -50%) scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .eq-zone.playing .eq-bar { animation: none; opacity: 0.9; }
}

/* ---------- vitrine Neuro-Simulations (boutiques Steam / Itch) ---------- */

.neuro-entry {
  border: 1px solid var(--mist);
  background: var(--paper);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.neuro-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.neuro-head h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.neuro-tags { display: flex; gap: 0.4rem; margin: 0; }
.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--mist);
  background: var(--bone);
  padding: 0.15rem 0.55rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}
.neuro-desc {
  margin: 0;
  max-width: 34rem;
  color: var(--graphite);
  font-size: 0.9375rem;
}
.neuro-embeds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.embed iframe {
  width: 100%;
  border: 1px solid var(--mist);
  background: var(--bone);
  display: block;
}
.embed-steam iframe { height: 190px; }
.embed-itch iframe { height: 167px; }
.embed-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  border-bottom: 1px solid var(--mist);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.embed-link:hover { color: var(--signal); border-color: var(--signal-dim); }

@media (max-width: 720px) {
  .neuro-embeds { grid-template-columns: 1fr; }
}
