/* github.css — IUT Informatique — Design blueprint technique */
@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@300;400;600;700;800&family=Mulish:wght@300;400;600&family=Fira+Code:wght@400;500&display=swap');

:root {
  --bg:        #0a0f1e;
  --bg2:       #0d1426;
  --surface:   #101828;
  --surface2:  #141f33;
  --border:    #1c2d4a;
  --accent:    #2188ff;
  --accent2:   #58a6ff;
  --cyan:      #39d0d8;
  --green:     #3fb950;
  --orange:    #f79000;
  --red:       #f85149;
  --purple:    #d2a8ff;
  --text:      #c9d1d9;
  --muted:     #485669;
  --font-head: 'Oxanium', sans-serif;
  --font-body: 'Mulish', sans-serif;
  --font-mono: 'Fira Code', monospace;
  --radius:    8px;
  --glow-b:    0 0 12px rgba(33,136,255,.3);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ─── HERO ──────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0b1526 0%, #091228 50%, #0d1a38 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 48px 44px;
  position: relative;
  overflow: hidden;
}
/* Blueprint grid lines */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(33,136,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33,136,255,.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(33,136,255,.07) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 1100px; margin: 0 auto; }

.hero-eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent2); letter-spacing: .08em;
  margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.hero-eyebrow::before { content: ''; display: block; width: 20px; height: 1px; background: var(--accent2); }

.hero h1 {
  font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800; letter-spacing: .04em;
  color: #fff; margin-bottom: 16px; line-height: 1.1;
}
.hero h1 span { color: var(--accent2); }

.hero-sub { color: #8b949e; font-size: 15px; max-width: 640px; margin-bottom: 28px; font-weight: 300; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-mono); font-size: 11px;
  padding: 4px 12px; border-radius: 4px;
  border: 1px solid rgba(33,136,255,.3);
  background: rgba(33,136,255,.06);
  color: var(--accent2); letter-spacing: .03em;
}
.tag.green  { border-color: rgba(63,185,80,.3); background: rgba(63,185,80,.06); color: var(--green); }
.tag.orange { border-color: rgba(247,144,0,.3);  background: rgba(247,144,0,.06);  color: var(--orange); }
.tag.cyan   { border-color: rgba(57,208,216,.3); background: rgba(57,208,216,.06); color: var(--cyan); }

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

nav.sidebar {
  width: 220px; flex-shrink: 0;
  position: sticky; top: 20px; align-self: flex-start;
  padding: 28px 0; margin-right: 36px;
}
.nav-label {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--muted); letter-spacing: .15em; text-transform: uppercase;
  padding: 0 12px 10px; margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.nav-list { display: flex; flex-direction: column; margin-top: 8px; }
nav.sidebar a {
  font-family: var(--font-body); font-size: 12.5px; font-weight: 400;
  color: var(--muted); text-decoration: none;
  padding: 6px 12px; border-left: 2px solid transparent;
  transition: all .18s;
}
nav.sidebar a:hover { color: var(--text); background: var(--surface2); border-left-color: var(--border); }
nav.sidebar a.active { color: var(--accent2); border-left-color: var(--accent); background: rgba(33,136,255,.06); }

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

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 18px;
  scroll-margin-top: 28px;
  transition: border-color .25s;
  position: relative;
}
section:hover { border-color: rgba(33,136,255,.3); }
section:target { border-color: var(--accent); box-shadow: var(--glow-b); }

/* corner decoration */
section::before, section::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0;
  transition: opacity .25s;
}
section::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
section::after  { top: -1px; right: -1px; border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
section:hover::before, section:hover::after { opacity: 1; }

h2 {
  font-family: var(--font-head); font-size: 17px; font-weight: 700;
  color: #fff; margin-bottom: 16px; letter-spacing: .03em;
  display: flex; align-items: center; gap: 10px;
}
h2 .num {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--accent); background: rgba(33,136,255,.1);
  border: 1px solid rgba(33,136,255,.2); border-radius: 4px;
  padding: 2px 8px;
}
h3 { font-family: var(--font-head); font-size: 13px; font-weight: 600; color: var(--accent2); margin: 18px 0 8px; letter-spacing: .04em; }
p { color: #8b949e; margin-bottom: 10px; }

/* ─── CODE ──────────────────────────────────────────────── */
pre {
  font-family: var(--font-mono); font-size: 12.5px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 6px; padding: 16px 20px;
  overflow-x: auto; line-height: 1.65;
  color: #e6edf3; margin: 12px 0; position: relative;
}
pre .c { color: #6e7681; font-style: italic; }
pre .k { color: var(--accent2); }
pre .s { color: var(--green); }
pre .y { color: var(--orange); }
pre .p { color: var(--purple); }
code {
  font-family: var(--font-mono); font-size: 12.5px;
  background: rgba(33,136,255,.08); color: var(--accent2);
  border: 1px solid rgba(33,136,255,.2); border-radius: 4px;
  padding: 1px 6px;
}

/* ─── GRID ──────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 14px 0; }
.card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: 18px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(33,136,255,.3); transform: translateY(-2px); }
.card h3 { margin-top: 0; font-size: 12px; }
.card p { font-size: 13px; margin: 0; color: var(--muted); }

/* ─── TABLE ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin: 14px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  background: var(--surface2); color: var(--cyan);
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--accent);
}
td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: #8b949e; vertical-align: top; }
td:first-child { color: var(--accent2); font-family: var(--font-mono); font-size: 12.5px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ─── CALLOUTS ─────────────────────────────────────────── */
.note, .ok, .warn, .info, .tip {
  border-radius: 6px; padding: 12px 16px; margin: 12px 0;
  font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start;
}
.note { background: rgba(247,144,0,.07);  border: 1px solid rgba(247,144,0,.25); color: #c47d10; }
.ok   { background: rgba(63,185,80,.07);  border: 1px solid rgba(63,185,80,.25); color: var(--green); }
.warn { background: rgba(248,81,73,.07);  border: 1px solid rgba(248,81,73,.25); color: var(--red); }
.info { background: rgba(33,136,255,.07); border: 1px solid rgba(33,136,255,.25); color: var(--accent2); }
.tip  { background: rgba(210,168,255,.07);border: 1px solid rgba(210,168,255,.25);color: var(--purple); }
.ci   { flex-shrink: 0; }

/* ─── CHIP LIST ─────────────────────────────────────────── */
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.chip {
  font-family: var(--font-mono); font-size: 11px;
  border: 1px solid var(--border); color: var(--text);
  background: var(--surface2); border-radius: 4px;
  padding: 3px 10px;
}

/* ─── PROGRESS ──────────────────────────────────────────── */
#progress { position: fixed; top: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--cyan)); z-index: 9999; width: 0%; }

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 22px 48px; text-align: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  letter-spacing: .04em;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  nav.sidebar { display: none; }
  .layout { padding: 0 14px; }
  .hero { padding: 36px 20px 28px; }
}
@media (max-width: 580px) {
  section { padding: 18px; }
  .grid { grid-template-columns: 1fr; }
}
