/* arpanet.css — IUT Informatique — Design rétro terminal amber */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;600;700;900&family=VT323&display=swap');

:root {
  --bg:        #070a05;
  --bg2:       #0c1008;
  --surface:   #0e1409;
  --border:    #1f3010;
  --amber:     #d4860a;
  --amber-l:   #f0a830;
  --amber-dim: #7a4d06;
  --green:     #39ff14;
  --green-dim: #1a7a08;
  --red:       #ff3b1a;
  --text:      #c8a264;
  --muted:     #5a4520;
  --font-head: 'Orbitron', monospace;
  --font-body: 'Share Tech Mono', monospace;
  --font-crt:  'VT323', monospace;
  --glow-a:    0 0 8px rgba(212,134,10,.6), 0 0 24px rgba(212,134,10,.2);
  --glow-g:    0 0 8px rgba(57,255,20,.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* CRT scanline overlay */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.18) 2px, rgba(0,0,0,.18) 4px);
  pointer-events: none; z-index: 9999;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 60%, rgba(0,0,0,.7) 100%);
  pointer-events: none; z-index: 9998;
}

/* ─── HEADER ─────────────────────────────────────────────── */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 48px 40px 36px;
  position: relative;
  background: linear-gradient(180deg, #0c1308 0%, var(--bg) 100%);
}
.hero-inner { max-width: 1100px; margin: 0 auto; }

.hero-pre {
  font-family: var(--font-crt); font-size: 18px;
  color: var(--green); letter-spacing: .05em;
  margin-bottom: 10px;
  text-shadow: var(--glow-g);
  animation: blink-cursor 1.2s steps(1) infinite;
}
@keyframes blink-cursor { 0%,49%{opacity:1} 50%,100%{opacity:.4} }

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 900; letter-spacing: .06em;
  color: var(--amber-l);
  text-shadow: var(--glow-a);
  line-height: 1.1; margin-bottom: 14px;
  text-transform: uppercase;
}
.hero-sub {
  font-family: var(--font-body); font-size: 13px;
  color: var(--amber-dim); max-width: 680px;
  margin-bottom: 24px; line-height: 1.6;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-body); font-size: 11px;
  padding: 3px 10px; border-radius: 2px;
  border: 1px solid var(--amber-dim);
  color: var(--amber); background: rgba(212,134,10,.06);
  letter-spacing: .06em; text-transform: uppercase;
}
.tag.green { border-color: var(--green-dim); color: var(--green); background: rgba(57,255,20,.04); }

/* ASCII art decoration */
.hero-ascii {
  position: absolute; top: 24px; right: 40px;
  font-family: var(--font-crt); font-size: 13px;
  color: var(--border); line-height: 1.2;
  user-select: none;
}

/* ─── LAYOUT ─────────────────────────────────────────────── */
.layout { display: flex; max-width: 1260px; margin: 0 auto; padding: 0 16px; }

nav.sidebar {
  width: 210px; flex-shrink: 0;
  position: sticky; top: 20px; align-self: flex-start;
  padding: 28px 0; margin-right: 28px;
  border-right: 1px solid var(--border);
}
.nav-label {
  font-family: var(--font-head); font-size: 9px;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--amber-dim); padding: 0 14px 10px;
}
.nav-list { display: flex; flex-direction: column; }
nav.sidebar a {
  font-family: var(--font-body); font-size: 12px;
  color: var(--muted); text-decoration: none;
  padding: 5px 14px; border-left: 2px solid transparent;
  transition: all .15s; letter-spacing: .02em;
}
nav.sidebar a::before { content: '> '; opacity: 0; transition: opacity .15s; }
nav.sidebar a:hover { color: var(--amber); border-left-color: var(--amber-dim); }
nav.sidebar a:hover::before { opacity: 1; }
nav.sidebar a.active { color: var(--amber-l); border-left-color: var(--amber); text-shadow: var(--glow-a); }
nav.sidebar a.active::before { opacity: 1; }

/* ─── MAIN ──────────────────────────────────────────────── */
main { flex: 1; padding: 32px 0 80px; min-width: 0; }

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 26px 30px;
  margin-bottom: 18px;
  scroll-margin-top: 28px;
  position: relative;
  transition: border-color .25s;
}
section::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: transparent;
  transition: background .25s;
}
section:hover { border-color: var(--amber-dim); }
section:hover::before { background: var(--amber-dim); }
section:target { border-color: var(--amber); }
section:target::before { background: var(--amber); box-shadow: var(--glow-a); }

h2 {
  font-family: var(--font-head); font-size: 13px; font-weight: 700;
  color: var(--amber-l); text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
h2 .num {
  font-family: var(--font-crt); font-size: 20px;
  color: var(--green); opacity: .7;
}
h3 {
  font-family: var(--font-head); font-size: 11px; font-weight: 600;
  color: var(--amber); text-transform: uppercase; letter-spacing: .1em;
  margin: 18px 0 8px;
}
p { color: var(--text); margin-bottom: 10px; font-size: 13.5px; }

/* ─── TIMELINE ─────────────────────────────────────────── */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: '';
  position: absolute; left: 7px; top: 0; bottom: 0;
  width: 1px; background: var(--border);
}
.tl-item { position: relative; margin-bottom: 22px; }
.tl-item::before {
  content: '◆';
  position: absolute; left: -27px; top: 2px;
  color: var(--amber); font-size: 10px;
  text-shadow: var(--glow-a);
}
.tl-year {
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  color: var(--amber-l); letter-spacing: .1em;
  margin-bottom: 4px;
}
.tl-desc { font-size: 13px; color: var(--text); line-height: 1.55; }
.tl-node {
  display: inline-block; font-family: var(--font-crt); font-size: 12px;
  color: var(--green); margin-right: 6px;
}

/* ─── GRID ──────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0; }
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 3px; padding: 16px;
  transition: border-color .2s;
}
.card:hover { border-color: var(--amber-dim); }
.card h3 { margin-top: 0; font-size: 10px; color: var(--amber-l); }
.card p { font-size: 12.5px; color: #997755; margin: 0; }

/* ─── CODE / PRE ────────────────────────────────────────── */
pre {
  font-family: var(--font-body); font-size: 12.5px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 3px; padding: 16px 18px;
  overflow-x: auto; line-height: 1.6;
  color: var(--amber); margin: 12px 0;
  position: relative;
}
pre::before {
  content: 'ARPANET TERMINAL';
  position: absolute; top: -1px; right: 12px;
  font-family: var(--font-head); font-size: 8px;
  color: var(--border); letter-spacing: .1em;
}
code {
  font-family: var(--font-body);
  background: rgba(212,134,10,.08);
  color: var(--amber-l); border-radius: 2px;
  border: 1px solid rgba(212,134,10,.2);
  padding: 1px 5px; font-size: 12.5px;
}

/* ─── TABLE ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 3px; margin: 14px 0; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th {
  background: var(--bg2); color: var(--amber);
  font-family: var(--font-head); font-size: 9px;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--amber-dim);
}
td { padding: 9px 14px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: top; }
td:first-child { color: var(--amber); font-family: var(--font-body); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(212,134,10,.03); }

/* ─── CALLOUTS ─────────────────────────────────────────── */
.note, .ok, .warn, .info {
  border-radius: 3px; padding: 12px 16px; margin: 12px 0;
  font-size: 13px; display: flex; gap: 10px; align-items: flex-start;
  font-family: var(--font-body);
}
.note { background: rgba(212,134,10,.06); border: 1px solid rgba(212,134,10,.25); color: #c8950a; }
.ok   { background: rgba(57,255,20,.04);  border: 1px solid rgba(57,255,20,.2);   color: var(--green-dim); }
.warn { background: rgba(255,59,26,.05);  border: 1px solid rgba(255,59,26,.2);   color: #cc4422; }
.info { background: rgba(212,134,10,.04); border: 1px solid var(--border); color: var(--amber-dim); }
.ci { flex-shrink: 0; }

/* ─── NODE MAP ──────────────────────────────────────────── */
.node-map {
  font-family: var(--font-crt); font-size: 15px;
  color: var(--amber); line-height: 1.5;
  background: var(--bg2); border: 1px solid var(--border);
  padding: 20px; border-radius: 3px; margin: 14px 0;
  white-space: pre; overflow-x: auto;
}

/* ─── CHIP LIST ─────────────────────────────────────────── */
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip {
  font-family: var(--font-body); font-size: 11px;
  border: 1px solid var(--amber-dim); color: var(--amber);
  background: rgba(212,134,10,.06); border-radius: 2px;
  padding: 3px 9px; letter-spacing: .04em;
}

/* ─── SCROLL PROGRESS ───────────────────────────────────── */
#progress {
  position: fixed; top: 0; left: 0; height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--amber-l));
  box-shadow: var(--glow-a); z-index: 10000; width: 0%;
}

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 20px 40px; text-align: center;
  font-family: var(--font-head); font-size: 9px;
  color: var(--muted); letter-spacing: .12em; text-transform: uppercase;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 860px) {
  nav.sidebar { display: none; }
  .layout { padding: 0 12px; }
  .hero { padding: 36px 16px 28px; }
  .hero-ascii { display: none; }
}
@media (max-width: 560px) {
  section { padding: 16px; }
  .grid { grid-template-columns: 1fr; }
}
