@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============ VARIABLES ============ */
:root {
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F8F9FA;
  --color-bg-tertiary: #F1F3F4;
  --color-text-primary: #1F2937;
  --color-text-secondary: #6B7280;
  --color-border: #E5E7EB;

  --color-windows: #0078D4;
  --color-linux: #E95420;
  --color-network: #00B4D8;
  --color-security: #E63946;
  --color-virtualization: #7B2FBE;
}

html.dark {
  --color-bg-primary: #0F172A;
  --color-bg-secondary: #1E293B;
  --color-bg-tertiary: #334155;
  --color-text-primary: #F1F5F9;
  --color-text-secondary: #94A3B8;
  --color-border: #334155;
}

/* ============ RESET ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  min-height: 100vh;
  transition: background-color 0.2s, color 0.2s;
}
h1, h2, h3, h4 { font-family: var(--font-display); }
code, pre { font-family: var(--font-mono); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-secondary); }

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background-color: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-mark {
  width: 32px;
  height: auto;
  display: block;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text-primary);
}
.search-wrap {
  flex: 1;
  max-width: 560px;
  position: relative;
}
.search-input {
  width: 100%;
  padding: 8px 14px 8px 38px;
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: #0078D4; }
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-secondary);
  width: 18px;
  height: 18px;
}
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
  max-height: 360px;
  overflow-y: auto;
  display: none;
  z-index: 60;
}
.search-results.open { display: block; }
.search-result-item {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.15s;
}
.search-result-item:hover { background-color: var(--color-bg-secondary); }
.search-result-item:last-child { border-bottom: none; }
.search-result-title {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}
.search-result-meta {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}
.search-empty { padding: 14px; text-align: center; color: var(--color-text-secondary); font-size: 0.875rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.15s;
}
.nav-link:hover { color: var(--color-text-primary); }
.theme-toggle {
  padding: 8px;
  border-radius: 8px;
  color: var(--color-text-secondary);
  transition: background-color 0.15s;
}
.theme-toggle:hover { background-color: var(--color-bg-secondary); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

/* ============ LAYOUT ============ */
.layout { display: flex; }
.sidebar {
  width: 240px;
  flex-shrink: 0;
  height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
  background-color: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
}
.sidebar-inner { padding: 16px; }
.sidebar-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all 0.15s;
}
.sidebar-cat:hover, .sidebar-cat.active {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}
.sidebar-cat-left { display: flex; align-items: center; gap: 8px; }
.sidebar-cat-left svg { width: 16px; height: 16px; }
.sidebar-cat-right { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; }
.sidebar-cat-right .chev { width: 14px; height: 14px; transition: transform 0.15s; }
.sidebar-cat[aria-expanded="true"] .chev { transform: rotate(90deg); }
.sidebar-sub {
  margin-left: 16px;
  margin-top: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--color-border);
  display: none;
  flex-direction: column;
  gap: 2px;
}
.sidebar-sub.open { display: flex; }
.sidebar-sub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: color 0.15s;
}
.sidebar-sub-item:hover { color: var(--color-text-primary); }
.sidebar-sub-item.active {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  font-weight: 500;
}
.sidebar-sub-item .count { font-size: 0.75rem; color: var(--color-text-secondary); }
.site-version {
  position: fixed;
  bottom: 12px;
  left: 16px;
  z-index: 40;
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  opacity: 0.6;
  pointer-events: none;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.main {
  flex: 1;
  min-height: calc(100vh - 64px);
}
.container {
  padding: 24px;
  max-width: 1280px;
  margin: 0 auto;
}
@media (min-width: 1024px) {
  .container { padding: 40px; }
}

/* ============ HOME / HERO ============ */
.hero {
  text-align: center;
  max-width: 768px;
  margin: 0 auto 48px;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--color-bg-secondary);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}
.dot-pulse {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text-primary);
}
@media (min-width: 1024px) {
  .hero h1 { font-size: 3rem; }
}
.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}
.hero-subtitle strong { color: var(--color-text-primary); font-weight: 500; }

.stats-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.stat-pill strong { font-weight: 600; }
.stat-pill.windows { background-color: rgba(0,120,212,0.1); }
.stat-pill.windows strong { color: #0078D4; }
.stat-pill.linux { background-color: rgba(233,84,32,0.1); }
.stat-pill.linux strong { color: #E95420; }
.stat-pill.virt { background-color: rgba(123,47,190,0.1); }
.stat-pill.virt strong { color: #7B2FBE; }

/* ============ SECTION TITLE ============ */
.section {
  max-width: 1100px;
  margin: 0 auto 64px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title svg { width: 20px; height: 20px; color: #0078D4; }

/* ============ CATEGORY GRID ============ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 768px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } }

.cat-card {
  display: block;
  padding: 20px;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}
.cat-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.875rem;
  transition: transform 0.2s;
}
.cat-card:hover .cat-card-icon { transform: scale(1.1); }
.cat-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 8px;
}
.cat-card-desc {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-card-count {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

/* ============ PROCEDURE CARDS GRID ============ */
.proc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .proc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .proc-grid.recent { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .proc-grid.full { grid-template-columns: repeat(3, 1fr); } }

.proc-card {
  display: block;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.proc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}
.proc-card-cover {
  aspect-ratio: 16/9;
  background-color: var(--color-bg-tertiary);
  overflow: hidden;
}
.proc-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.proc-card:hover .proc-card-cover img { transform: scale(1.05); }
.proc-card-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.proc-card-body { padding: 16px; }
.proc-card-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}
.proc-card-cat .dot { width: 8px; height: 8px; border-radius: 50%; }
.proc-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-primary);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.proc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.proc-card-duration {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}
.proc-card-duration svg { width: 12px; height: 12px; }

/* ============ BADGES (LEVEL) ============ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}
.badge-debutant { background-color: #DCFCE7; color: #16A34A; }
.badge-intermediaire { background-color: #FEF3C7; color: #D97706; }
.badge-avance { background-color: #FEE2E2; color: #DC2626; }

/* ============ SUBCATEGORY LIST ============ */
.subcat-list {
  display: grid;
  gap: 12px;
}
.subcat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.subcat-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}
.subcat-left { display: flex; align-items: center; gap: 16px; }
.subcat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.subcat-icon svg { width: 20px; height: 20px; }
.subcat-name {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}
.subcat-count {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.subcat-arrow {
  width: 20px;
  height: 20px;
  color: var(--color-text-secondary);
  transition: transform 0.2s;
}
.subcat-link:hover .subcat-arrow { transform: translateX(4px); }

/* ============ BREADCRUMB ============ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}
.breadcrumb a:hover { color: var(--color-text-primary); }
.breadcrumb .sep { opacity: 0.6; }
.breadcrumb .current { color: var(--color-text-primary); font-weight: 500; }

/* ============ CATEGORY HEADER ============ */
.page-header { margin-bottom: 32px; }
.page-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-header p { color: var(--color-text-secondary); }
.page-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* ============ CTA ============ */
.cta {
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(0,120,212,0.1), rgba(0,180,216,0.1));
  border: 1px solid rgba(0,120,212,0.2);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-align: center;
}
@media (min-width: 768px) {
  .cta { flex-direction: row; text-align: left; }
}
.cta h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.cta p { color: var(--color-text-secondary); }
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--color-text-primary);
  color: var(--color-bg-primary);
  border-radius: 12px;
  font-weight: 500;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.cta-btn:hover { opacity: 0.9; }
.cta-btn svg { width: 16px; height: 16px; }

/* ============ PROCEDURE PAGE ============ */
.proc-layout {
  display: flex;
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
}
.proc-main {
  flex: 1;
  max-width: 800px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--color-text-primary); }
.back-link svg { width: 16px; height: 16px; }

.proc-header { margin-bottom: 32px; }
.proc-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text-primary);
}
.proc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.meta-duration {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.meta-duration svg { width: 16px; height: 16px; }
.tag {
  padding: 4px 12px;
  font-size: 0.875rem;
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  border-radius: 9999px;
  transition: background-color 0.15s, color 0.15s;
}
a.tag:hover {
  background-color: rgba(0,120,212,0.1);
  color: #0078D4;
}

/* TOC */
.toc-wrap {
  display: none;
  width: 256px;
  flex-shrink: 0;
}
@media (min-width: 1280px) {
  .toc-wrap { display: block; }
}
.toc-sticky { position: sticky; top: 96px; }
.toc-box {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
}
.toc-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-primary);
}
.toc-title svg { width: 16px; height: 16px; color: #0078D4; }
.toc-list { display: flex; flex-direction: column; gap: 4px; }
.toc-link {
  display: block;
  padding: 6px 12px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.toc-link.depth-3 { padding-left: 24px; font-size: 0.75rem; }
.toc-link:hover { color: var(--color-text-primary); }
.toc-link.active {
  color: #0078D4;
  border-left-color: #0078D4;
  font-weight: 500;
}

/* ============ PROSE CONTENT (markdown rendered) ============ */
.prose { font-size: 1rem; line-height: 1.75; }
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.prose h2::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, #0078D4, #00B4D8);
  border-radius: 2px;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--color-text-primary);
}
.prose h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}
.prose p {
  margin-bottom: 20px;
  color: var(--color-text-primary);
}

/* Lists */
.prose ul, .prose ol { margin-bottom: 20px; padding-left: 0; }
.prose ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  list-style: none;
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  background-color: #0078D4;
  border-radius: 50%;
}
.prose ol { counter-reset: ol-counter; }
.prose ol li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 8px;
  counter-increment: ol-counter;
  list-style: none;
}
.prose ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #0078D4, #00B4D8);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Inline code */
.prose code:not(pre code) {
  background-color: var(--color-bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  color: #0078D4;
  font-weight: 500;
}
html.dark .prose code:not(pre code) { color: #60a5fa; }

/* Links */
.prose a {
  color: #0078D4;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s;
}
.prose a:hover { text-decoration-color: #0078D4; }

/* Blockquotes */
.prose blockquote {
  background: linear-gradient(135deg, rgba(0,120,212,0.1), rgba(0,180,216,0.05));
  border-left: 4px solid #0078D4;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 24px 0;
  color: var(--color-text-primary);
}
.prose blockquote p:first-child::before { content: '💡 '; }
.prose blockquote p:last-child { margin-bottom: 0; }

/* HR */
.prose hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: 40px 0;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}
.prose th {
  background-color: var(--color-bg-secondary);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--color-border);
}
.prose td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}
.prose tr:hover td { background-color: var(--color-bg-secondary); }

.prose strong { font-weight: 600; color: var(--color-text-primary); }
.prose em { font-style: italic; color: var(--color-text-secondary); }

/* ============ CODE BLOCKS (Tokyo Night macOS style) ============ */
.code-block {
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1b26;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #24283b;
  border-bottom: 1px solid #414868;
}
.code-dots { display: flex; gap: 6px; }
.code-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27c93f; }
.code-lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #7aa2f7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.code-lang::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #7aa2f7;
  border-radius: 50%;
}
.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid #414868;
  border-radius: 6px;
  color: #787c99;
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.2s;
}
.copy-btn:hover {
  background: #414868;
  color: #c0caf5;
  border-color: #565f89;
}
.copy-btn.copied {
  background: #9ece6a;
  border-color: #9ece6a;
  color: #1a1b26;
}
.copy-btn svg { width: 12px; height: 12px; }

.code-block pre {
  margin: 0;
  padding: 16px;
  background: #1a1b26;
  overflow-x: auto;
}
.code-block code {
  background: transparent;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #a9b1d6;
  font-family: var(--font-mono);
  white-space: pre;
}

/* Reset prose li::before inside code blocks */
.prose .code-block li::before { display: none; }

/* ============ AUTHOR LINE (bottom of procedure) ============ */
.proc-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.proc-author svg {
  width: 14px;
  height: 14px;
  color: #0078D4;
}
.proc-author-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.proc-author-sep { opacity: 0.4; }
.proc-author-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text-primary);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1023px) {
  .sidebar { display: none; }
}
@media (max-width: 767px) {
  .nav-links { display: none; }
  .search-wrap { max-width: none; }
  .header-inner { gap: 8px; padding: 0 12px; }
  .hero h1 { font-size: 2rem; }
  .container { padding: 16px; }
}
