/* opcache.css — IUT Informatique — Design académique technique */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Syne:wght@400;600;700;800&family=Noto+Sans:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --bg:         #0b0f1a;
  --surface:    #111827;
  --surface2:   #1a2236;
  --border:     #1e2d47;
  --accent:     #4f8ef7;
  --accent2:    #7c3aed;
  --green:      #10b981;
  --yellow:     #f59e0b;
  --red:        #ef4444;
  --text:       #e2e8f0;
  --muted:      #64748b;
  --code-bg:    #060c1a;
  --font-head:  'Syne', sans-serif;
  --font-body:  'Noto Sans', sans-serif;
  --font-mono:  'JetBrains Mono', monospace;
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,0,0,.5);
}

*, *::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, #0d1b3e 0%, #0f0c29 50%, #1a0f3a 100%);
  border-bottom: 1px solid var(--border);
  padding: 60px 40px 50px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 80% 50%, rgba(79,142,247,.12) 0%, transparent 60%),
              radial-gradient(ellipse 40% 40% at 20% 80%, rgba(124,58,237,.1) 0%, transparent 50%);
}
.hero-inner { position: relative; max-width: 1100px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(79,142,247,.12); border: 1px solid rgba(79,142,247,.3);
  color: var(--accent); border-radius: 999px;
  padding: 6px 14px; font-family: var(--font-mono); font-size: 12px;
  margin-bottom: 20px;
}
.hero-badge svg { width:14px; height:14px; }
.hero h1 {
  font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800; letter-spacing: -1px;
  background: linear-gradient(90deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 14px;
}
.hero-sub { color: #94a3b8; font-size: 16px; max-width: 640px; margin-bottom: 28px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: #cbd5e1; border-radius: 6px;
  padding: 4px 12px; font-family: var(--font-mono); font-size: 12px;
}
.tag.green { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); color: var(--green); }
.tag.blue  { background: rgba(79,142,247,.1);  border-color: rgba(79,142,247,.3);  color: var(--accent); }
.tag.purple{ background: rgba(124,58,237,.1); border-color: rgba(124,58,237,.3); color: #a78bfa; }

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

nav.sidebar {
  width: 230px; flex-shrink: 0;
  position: sticky; top: 24px; align-self: flex-start;
  padding: 24px 0; margin-right: 32px;
  display: flex; flex-direction: column; gap: 4px;
}
nav.sidebar a {
  color: var(--muted); text-decoration: none; font-size: 13px;
  padding: 6px 10px; border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all .2s;
  font-family: var(--font-mono);
}
nav.sidebar a:hover { color: var(--text); background: var(--surface2); }
nav.sidebar a.active { color: var(--accent); border-left-color: var(--accent); background: rgba(79,142,247,.06); }
.nav-label {
  color: var(--muted); font-size: 10px; font-family: var(--font-mono);
  letter-spacing: .1em; text-transform: uppercase;
  padding: 14px 10px 4px; margin-top: 8px;
}

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

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
  scroll-margin-top: 30px;
  transition: border-color .3s;
}
section:hover { border-color: rgba(79,142,247,.25); }
section:target { border-color: var(--accent); }

h2 {
  font-family: var(--font-head); font-size: 20px; font-weight: 700;
  color: #fff; margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
h2 .num {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  background: rgba(79,142,247,.1); border: 1px solid rgba(79,142,247,.25);
  border-radius: 4px; padding: 2px 7px;
}
h3 { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: #c7d4f0; margin: 18px 0 8px; }

p { margin-bottom: 12px; color: #b0bec5; }

/* ─── CODE ─────────────────────────────────────────────── */
pre, code {
  font-family: var(--font-mono);
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: #a5c8f0;
  position: relative;
  margin: 12px 0 16px;
}
pre .c  { color: #536280; font-style: italic; }   /* comment */
pre .k  { color: #7c9cf8; }                        /* keyword */
pre .s  { color: #7fd88a; }                        /* string */
pre .n  { color: #fbbf58; }                        /* number */
pre .d  { color: #94a3b8; }                        /* directive */
pre .v  { color: #c084fc; }                        /* value */
code {
  background: rgba(79,142,247,.08); color: #93c5fd;
  border: 1px solid rgba(79,142,247,.2); border-radius: 4px;
  padding: 1px 6px; font-size: 13px;
}

/* ─── TABLE ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--surface2); color: #7dd3fc; font-family: var(--font-mono); font-size: 12px; letter-spacing:.04em; border-bottom: 1px solid var(--accent); }
td { color: #94a3b8; }
tr:last-child td { border-bottom: none; }
td:first-child { color: #a5c8f0; font-family: var(--font-mono); font-size: 12.5px; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ─── 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: var(--radius); padding: 18px 18px;
}
.card h3 { margin-top: 0; color: #fff; font-size: 14px; }
.card p { font-size: 13.5px; margin: 0; }

/* ─── CALLOUTS ──────────────────────────────────────────── */
.note, .ok, .warn, .info {
  border-radius: 10px; padding: 14px 18px; margin: 14px 0; font-size: 14px;
  display: flex; gap: 12px; align-items: flex-start;
}
.note { background: rgba(245,158,11,.07); border: 1px solid rgba(245,158,11,.25); color: #fde68a; }
.ok   { background: rgba(16,185,129,.07); border: 1px solid rgba(16,185,129,.25); color: #6ee7b7; }
.warn { background: rgba(239,68,68,.07);  border: 1px solid rgba(239,68,68,.25);  color: #fca5a5; }
.info { background: rgba(79,142,247,.07); border: 1px solid rgba(79,142,247,.25); color: #93c5fd; }
.callout-icon { flex-shrink: 0; font-size: 16px; margin-top: 1px; }

/* ─── COMPARISON TABLE (dev vs prod) ───────────────────── */
.compare { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin: 14px 0; }
.compare .card pre { margin-top: 8px; padding: 12px; font-size: 12px; }

/* ─── CHIP LIST ─────────────────────────────────────────── */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip {
  background: rgba(79,142,247,.1); border: 1px solid rgba(79,142,247,.2);
  color: #7dd3fc; border-radius: 6px;
  font-family: var(--font-mono); font-size: 12px;
  padding: 4px 10px;
}

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 24px 40px; text-align: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}

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

/* ─── SCROLL PROGRESS ────────────────────────────────────── */
#progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--accent); z-index: 999; width: 0%; transition: width .1s; }
