/*
  FakeStore API – Thème Documentation
  Palette: Indigo/Purple (accent), Slate (texte), White (fonds)
  Portée: seulement les pages docs via classes .docs-*
*/

:root {
  --docs-accent: #6366f1;
  --docs-accent-2: #8b5cf6;
  --docs-bg: #ffffff;
  --docs-surface: #ffffff;
  --docs-surface-2: #f8fafc;
  --docs-border: #e2e8f0;
  --docs-border-2: #f1f5f9;
  --docs-text: #0f172a;
  --docs-text-muted: #64748b;
  --docs-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Hero */
.docs-hero {
  background: linear-gradient(135deg, var(--docs-accent) 0%, var(--docs-accent-2) 100%);
  color: #fff;
  padding: 80px 0;
  border-radius: 16px;
  margin-bottom: 60px;
  text-align: center;
}
.docs-header {
  padding: 0 16px;
}
.docs-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}
.docs-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
}
.docs-subtitle {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 800px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}
.docs-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.doc-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  padding: 12px 16px;
  border-radius: 25px;
  backdrop-filter: blur(10px);
}
.stat-icon {
  font-size: 1.1rem;
}
.stat-text {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Layout */
.docs-content {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}
.docs-sidebar {
  position: sticky;
  top: 100px;
  background: var(--docs-surface);
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: var(--docs-shadow);
  border: 1px solid var(--docs-border-2);
}
.docs-sidebar.aside,
aside.docs-sidebar {
  /* Override des styles globaux de master.min.css */
  position: sticky !important;
  left: auto !important;
  top: 100px !important;
  background-color: var(--docs-surface) !important;
  height: auto !important;
  overflow: visible !important;
}
.docs-main {
  min-height: 100vh;
  min-width: 0;
}

.docs-introduction,
.docs-sections > * {
  background: var(--docs-surface);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--docs-shadow);
  border: 1px solid var(--docs-border-2);
}
.docs-introduction {
  margin-bottom: 32px;
}

.intro-text {
  font-size: 1.05rem;
  color: var(--docs-text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}
.quick-start-card {
  background: var(--docs-surface-2);
  border-radius: 12px;
  border: 1px solid var(--docs-border);
}
.card-header {
  background: #1e293b;
  color: #fff;
  padding: 16px 20px;
  border-bottom: 1px solid #334155;
  border-radius: 12px 12px 0 0;
}
.card-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.card-content {
  padding: 20px;
}
.quick-example {
  background: #0f172a;
  border-radius: 8px;
  border: 1px solid #0b1220;
  overflow: hidden;
}
.example-header {
  background: #0b1220;
  color: #cbd5e1;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #0f172a;
}
.method-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.method-badge.get {
  background: #dcfce7;
  color: #166534;
}
.endpoint {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: #94a3b8;
  font-size: 13px;
}
.quick-example pre {
  margin: 0;
  background: transparent;
  color: #e2e8f0;
  padding: 16px;
}
.quick-example code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0;
}

/* Sidebar (table des matières) */
.sidebar-nav {
  position: relative;
}
.nav-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--docs-border);
}
.nav-header h3 {
  color: #1e293b;
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-section {
  margin-bottom: 18px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--docs-border-2);
}
.section-icon {
  font-size: 1.1rem;
}
.section-link {
  font-weight: 700;
  color: #374151;
  text-decoration: none;
  font-size: 1rem;
}
.section-link:hover {
  color: var(--docs-accent);
}
.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links li {
  margin-bottom: 6px;
}
.nav-item {
  display: block;
  color: var(--docs-text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
}
.nav-item:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--docs-accent);
  border-left-color: var(--docs-accent);
  transform: translateX(1px);
}
.nav-item.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--docs-accent);
  border-left-color: var(--docs-accent);
  font-weight: 600;
}
.nav-item.current {
  background: var(--docs-accent);
  color: #fff;
  border-left-color: #4f46e5;
  font-weight: 700;
}

/* Headings et ancres */
.docs-main h2[id],
.docs-main h3[id] {
  scroll-margin-top: 120px;
}
.docs-main .heading {
  color: var(--docs-accent);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.docs-main h3 {
  color: #0f172a;
  font-weight: 700;
}

/* Code blocks dans la doc (override du global) */
.docs-main pre {
  border-radius: 10px;
  border: 1px solid var(--docs-border);
  overflow: hidden;
  background: #0f172a;
}
.docs-main code {
  background: transparent !important;
  color: #e2e8f0;
  display: block;
  padding: 16px;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0;
  font-weight: 400;
}
.docs-main .c-comment {
  color: #94a3b8;
}
.docs-main .c-api {
  color: #60a5fa;
}

/* Boutons et interactions */
.btn.show-output {
  border: 1px solid var(--docs-border);
  color: #334155;
  background: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
}
.btn.show-output:hover {
  border-color: var(--docs-accent);
  color: var(--docs-accent);
  background: rgba(99, 102, 241, 0.06);
}
.output-result {
  background: #0f172a;
  border: 1px solid #0b1220;
  border-radius: 10px;
}

/* Cartes de section */
.docs-sections > * + * {
  margin-top: 32px;
}

/* Responsive */
@media (max-width: 1024px) {
  .docs-content {
    grid-template-columns: 240px 1fr;
    gap: 24px;
  }
}
@media (max-width: 768px) {
  .docs-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .docs-sidebar {
    position: static;
    padding: 20px;
  }
  .docs-introduction,
  .docs-sections > * {
    padding: 20px;
  }
}
