/* ============================================
   REWAPP DOCUMENTATION - DESIGN SYSTEM CSS
   ============================================ */

/* === CSS VARIABLES === */
:root {
  /* === COULEURS PRINCIPALES === */
  --bg-primary: #0A0A0F;
  --bg-secondary: #12121A;
  --bg-tertiary: #1A1A25;
  --bg-code: #0D0D14;
  
  /* === GRADIENT ACCENT (Orange → Violet) === */
  --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #9B59B6 100%);
  --gradient-secondary: linear-gradient(135deg, #FF8C42 0%, #8E44AD 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(255,107,53,0.1) 0%, rgba(155,89,182,0.1) 100%);
  --gradient-border: linear-gradient(135deg, #FF6B35 0%, #9B59B6 100%);
  
  /* === COULEURS D'ACCENT === */
  --accent-orange: #FF6B35;
  --accent-orange-light: #FF8C42;
  --accent-violet: #9B59B6;
  --accent-violet-light: #A66BBF;
  
  /* === TEXTE === */
  --text-primary: #FFFFFF;
  --text-secondary: #B8B8C7;
  --text-tertiary: #6E6E82;
  --text-muted: #4A4A5A;
  
  /* === SÉMANTIQUE === */
  --success: #22C55E;
  --success-bg: rgba(34,197,94,0.1);
  --warning: #F59E0B;
  --warning-bg: rgba(245,158,11,0.1);
  --error: #EF4444;
  --error-bg: rgba(239,68,68,0.1);
  --info: #3B82F6;
  --info-bg: rgba(59,130,246,0.1);
  
  /* === BORDURES === */
  --border-subtle: rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.1);
  --border-strong: rgba(255,255,255,0.15);
  
  /* === OMBRES === */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow-orange: 0 0 20px rgba(255,107,53,0.3);
  --shadow-glow-violet: 0 0 20px rgba(155,89,182,0.3);
  
  /* === FONTS === */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* === TAILLES === */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  
  /* === LINE HEIGHT === */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;
  
  /* === ESPACEMENT === */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
}

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  background: var(--bg-primary);
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === HEADER === */
.doc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo-text {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-badge {
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
}

.doc-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.doc-category {
  color: var(--accent-orange);
  font-weight: 500;
}

.separator {
  color: var(--text-muted);
}

.doc-nav .doc-title {
  color: var(--text-secondary);
}

.doc-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* === MAIN LAYOUT === */
.doc-main {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 64px;
}

.doc-sidebar {
  position: sticky;
  top: 80px;
  width: 280px;
  height: calc(100vh - 80px);
  padding: var(--space-6);
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.toc {
  padding: var(--space-4);
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.toc-title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--space-4) 0;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin: var(--space-2) 0;
}

.toc-list a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
}

.toc-list a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.toc-list a.active {
  color: var(--accent-orange);
  background: rgba(255, 107, 53, 0.1);
}

.toc-list .toc-sub {
  padding-left: var(--space-4);
  font-size: var(--text-xs);
}

.doc-content {
  flex: 1;
  padding: var(--space-8) var(--space-10);
  max-width: 900px;
}

/* === HERO SECTION === */
.doc-hero {
  text-align: center;
  padding: var(--space-16) 0;
  margin-bottom: var(--space-12);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--gradient-primary);
  border-radius: 20px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
  margin-bottom: var(--space-4);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 var(--space-4) 0;
  line-height: var(--leading-tight);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--text-tertiary);
  margin: 0 0 var(--space-6) 0;
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.meta-item i {
  width: 16px;
  height: 16px;
  color: var(--accent-orange);
}

/* === SECTIONS === */
.doc-section {
  margin-bottom: var(--space-12);
}

.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.section-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  color: white;
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.subsection {
  margin: var(--space-8) 0;
}

.subsection-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-4) 0;
}

.subsection-number {
  color: var(--accent-orange);
  margin-right: var(--space-2);
}

.h4-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--space-6) 0 var(--space-3) 0;
}

.h5-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--space-4) 0 var(--space-2) 0;
}

/* === PARAGRAPHES === */
p {
  margin: var(--space-4) 0;
  line-height: var(--leading-relaxed);
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* === TABLEAUX === */
.table-wrapper {
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin: var(--space-6) 0;
}

.table-header {
  padding: var(--space-4) var(--space-5);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.table-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.table-title i {
  width: 18px;
  height: 18px;
  color: var(--accent-orange);
}

.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: rgba(255,107,53,0.03);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table .numeric {
  font-family: var(--font-mono);
  text-align: right;
}

/* === STATUS BADGES === */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
}

.status-badge i {
  width: 12px;
  height: 12px;
}

.status-success {
  background: var(--success-bg);
  color: var(--success);
}

.status-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-error {
  background: var(--error-bg);
  color: var(--error);
}

.status-info {
  background: var(--info-bg);
  color: var(--info);
}

/* === LISTES === */
.doc-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
}

.doc-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.doc-list .list-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-orange);
  flex-shrink: 0;
  margin-top: 4px;
}

.feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.feature-item i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.feature-success i { color: var(--success); }
.feature-error i { color: var(--error); }
.feature-warning i { color: var(--warning); }
.feature-info i { color: var(--info); }

/* Steps list */
.steps-list {
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0;
  position: relative;
}

.steps-list::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 40px;
  width: 2px;
  background: var(--gradient-primary);
  opacity: 0.3;
}

.step-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
}

.step-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 50%;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  z-index: 1;
}

.step-content {
  flex: 1;
  padding-top: var(--space-2);
}

.step-title {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-1) 0;
}

.step-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin: 0;
}

/* === CODE === */
.code-block {
  background: var(--bg-code);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin: var(--space-4) 0;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.code-lang {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-violet);
  text-transform: uppercase;
}

.code-lang i {
  width: 14px;
  height: 14px;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--accent-orange);
}

.code-content {
  padding: var(--space-4);
  margin: 0;
  overflow-x: auto;
}

.code-content code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.inline-code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 2px 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--accent-orange);
}

/* === CALLOUTS === */
.callout {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: 12px;
  border-left: 4px solid;
  margin: var(--space-5) 0;
}

.callout-icon {
  flex-shrink: 0;
}

.callout-icon i {
  width: 24px;
  height: 24px;
}

.callout-content {
  flex: 1;
}

.callout-title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--space-1) 0;
}

.callout-content p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

/* Callout Variantes */
.callout-critical {
  background: linear-gradient(135deg, rgba(239,68,68,0.1) 0%, rgba(155,89,182,0.1) 100%);
  border-color: var(--error);
}
.callout-critical .callout-icon i { color: var(--error); }
.callout-critical .callout-title { color: var(--error); }
.callout-critical p { color: var(--text-primary); }

.callout-warning {
  background: linear-gradient(135deg, rgba(255,107,53,0.1) 0%, rgba(245,158,11,0.1) 100%);
  border-color: var(--accent-orange);
}
.callout-warning .callout-icon i { color: var(--accent-orange); }
.callout-warning .callout-title { color: var(--accent-orange); }
.callout-warning p { color: var(--text-secondary); }

.callout-info {
  background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, rgba(155,89,182,0.1) 100%);
  border-color: var(--info);
}
.callout-info .callout-icon i { color: var(--info); }
.callout-info .callout-title { color: var(--info); }
.callout-info p { color: var(--text-secondary); }

.callout-success {
  background: linear-gradient(135deg, rgba(34,197,94,0.1) 0%, rgba(59,130,246,0.1) 100%);
  border-color: var(--success);
}
.callout-success .callout-icon i { color: var(--success); }
.callout-success .callout-title { color: var(--success); }
.callout-success p { color: var(--text-secondary); }

/* === SCREEN CARDS === */
.screen-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin: var(--space-6) 0;
}

.screen-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--gradient-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.screen-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 10px;
}

.screen-icon i {
  width: 20px;
  height: 20px;
  color: white;
}

.screen-info h4 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.screen-info span {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.screen-body {
  padding: var(--space-5);
}

/* === ERROR MESSAGES === */
.error-list {
  background: var(--error-bg);
  border-radius: 12px;
  padding: var(--space-4);
  margin: var(--space-4) 0;
}

.error-list-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--error);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
}

.error-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.error-list li {
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(239,68,68,0.1);
}

.error-list li:last-child {
  border-bottom: none;
}

.error-list li::before {
  content: '•';
  color: var(--error);
  margin-right: var(--space-2);
}

/* === PROCESS FLOW === */
.process-flow {
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  padding: var(--space-5);
  margin: var(--space-6) 0;
}

.process-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.process-title i {
  width: 20px;
  height: 20px;
  color: var(--accent-violet);
}

/* === QUICK ACTIONS === */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: all 0.2s;
}

.quick-action:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-orange);
  transform: translateY(-2px);
}

.quick-action-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 12px;
}

.quick-action-icon i {
  width: 24px;
  height: 24px;
  color: white;
}

.quick-action span {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* === METRICS === */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.metric-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.metric-icon i {
  width: 22px;
  height: 22px;
  color: white;
}

.metric-icon.success { background: linear-gradient(135deg, #22C55E, #16A34A); }
.metric-icon.warning { background: linear-gradient(135deg, #F59E0B, #D97706); }
.metric-icon.info { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.metric-icon.primary { background: var(--gradient-primary); }

.metric-value {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.metric-label {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* === FOOTER === */
.doc-footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.doc-footer p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin: 0;
}

/* === NAVIGATION INTER-DOCUMENTS === */
.global-nav {
  position: fixed;
  top: 64px;
  left: 0;
  width: 280px;
  height: calc(100vh - 64px);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
  z-index: 900;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.global-nav.open {
  transform: translateX(0);
}

.global-nav-toggle {
  position: fixed;
  top: 80px;
  left: var(--space-4);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  z-index: 950;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
}

.global-nav-toggle:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow-orange);
}

.global-nav-toggle i {
  width: 24px;
  height: 24px;
  color: white;
}

.global-nav-header {
  padding: var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.global-nav-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.global-nav-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: all 0.2s;
}

.global-nav-close:hover {
  background: var(--error-bg);
  color: var(--error);
  border-color: var(--error);
}

.global-nav-close i {
  width: 18px;
  height: 18px;
}

.global-nav-content {
  padding: var(--space-4);
}

.nav-section {
  margin-bottom: var(--space-6);
}

.nav-section-title {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
}

.nav-section-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-section-list li {
  margin: var(--space-1) 0;
}

.nav-section-list a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-section-list a:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-section-list a.active {
  background: rgba(255, 107, 53, 0.1);
  color: var(--accent-orange);
  border-left: 3px solid var(--accent-orange);
}

.nav-section-list a i {
  width: 18px;
  height: 18px;
  color: var(--accent-violet);
  flex-shrink: 0;
}

.nav-section-list a.active i {
  color: var(--accent-orange);
}

.nav-doc-number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  min-width: 32px;
}

/* === DOCUMENT NAVIGATION (Prev/Next) === */
.doc-navigation {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-8) 0;
  margin-top: var(--space-8);
  border-top: 1px solid var(--border-subtle);
}

.doc-nav-link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.doc-nav-link:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-orange);
  transform: translateY(-2px);
}

.doc-nav-link.prev {
  justify-content: flex-start;
}

.doc-nav-link.next {
  justify-content: flex-end;
  text-align: right;
}

.doc-nav-link i {
  width: 24px;
  height: 24px;
  color: var(--accent-orange);
  flex-shrink: 0;
}

.doc-nav-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.doc-nav-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-top: var(--space-1);
}

/* === INDEX PAGE STYLES === */
.index-hero {
  text-align: center;
  padding: var(--space-16) 0;
  background: var(--gradient-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.index-logo {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-4);
}

.index-subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.index-description {
  font-size: var(--text-base);
  color: var(--text-tertiary);
  max-width: 600px;
  margin: 0 auto;
}

.doc-categories {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-10);
}

.doc-category {
  margin-bottom: var(--space-10);
}

.category-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.category-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 12px;
}

.category-icon i {
  width: 24px;
  height: 24px;
  color: white;
}

.category-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.category-count {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
}

.doc-card {
  display: block;
  padding: var(--space-5);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.2s;
}

.doc-card:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-orange);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.doc-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.doc-card-number {
  padding: var(--space-1) var(--space-2);
  background: var(--gradient-primary);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: white;
}

.doc-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  line-height: var(--leading-tight);
}

.doc-card-description {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.doc-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.doc-card-meta i {
  width: 14px;
  height: 14px;
}

.doc-card-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: 500;
}

.doc-card-status.ready {
  background: var(--success-bg);
  color: var(--success);
}

.doc-card-status.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

/* === BACKDROP FOR MOBILE NAV === */
.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 850;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.nav-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* === UTILITAIRES === */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted { color: var(--text-muted); }
.text-tertiary { color: var(--text-tertiary); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--text-primary); }
.font-mono { font-family: var(--font-mono); }
.font-heading { font-family: var(--font-heading); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .doc-sidebar {
    display: none;
  }
  
  .doc-content {
    padding: var(--space-6);
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 var(--space-4);
  }
  
  .doc-nav {
    display: none;
  }
  
  .doc-content {
    padding: var(--space-4);
  }
  
  .section-title {
    font-size: var(--text-2xl);
  }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .quick-actions {
    grid-template-columns: 1fr;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .table-container {
    overflow-x: auto;
  }
}

/* === PRINT === */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .doc-header,
  .doc-sidebar,
  .doc-footer {
    display: none;
  }
  
  .doc-content {
    padding: 0;
    max-width: 100%;
  }
  
  .code-block {
    border: 1px solid #ccc;
    background: #f5f5f5;
  }
  
  .callout {
    border: 1px solid #ccc;
    background: #f9f9f9;
  }
}

