/* =====================================================================
   MiniBot France — Documentation UI (Style Docs Simpliste / 3 Colonnes)
   ===================================================================== */

:root {
  --docs-bg: #0b0f19;
  --docs-surface: #111625;
  --docs-surface-2: #161d30;
  --docs-border: rgba(148, 163, 184, 0.14);
  --docs-border-strong: rgba(148, 163, 184, 0.26);
  --docs-text: #f1f5f9;
  --docs-text-muted: #94a3b8;
  --docs-text-dim: #64748b;
  --docs-accent: #5865f2;
  --docs-accent-soft: rgba(88, 101, 242, 0.14);
  --docs-accent-light: #a5b4fc;
  --docs-cyan: #38bdf8;
  --docs-green: #34d399;
  --docs-header-h: 62px;
  --docs-left-w: 256px;
  --docs-right-w: 224px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--docs-header-h) + 24px);
}

body.docs-body {
  margin: 0;
  background: var(--docs-bg);
  color: var(--docs-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
  padding: 0.12em 0.42em;
  border-radius: 6px;
}

/* ---------------------------------------------------------------------
   TOPBAR FIXE
   --------------------------------------------------------------------- */
.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--docs-header-h);
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--docs-border);
}

.docs-topbar-inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.docs-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.docs-mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--docs-border);
  background: var(--docs-surface);
  color: var(--docs-text);
  cursor: pointer;
}

.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.docs-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #5865f2, #4338ca);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.docs-brand-pill {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.16rem 0.5rem;
  border-radius: 6px;
  background: var(--docs-accent-soft);
  color: var(--docs-accent-light);
  border: 1px solid rgba(88, 101, 242, 0.35);
}

.docs-topbar-center {
  flex: 1;
  max-width: 440px;
  display: flex;
  justify-content: center;
}

.docs-search-trigger {
  width: 100%;
  height: 38px;
  padding: 0 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--docs-border);
  background: var(--docs-surface);
  color: var(--docs-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-family: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.docs-search-trigger:hover {
  border-color: rgba(88, 101, 242, 0.55);
  background: var(--docs-surface-2);
  color: var(--docs-text);
}

.docs-search-trigger-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.12rem 0.42rem;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--docs-border-strong);
  color: var(--docs-text-muted);
  flex-shrink: 0;
}

.docs-topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.docs-top-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.78rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--docs-text-muted);
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}

.docs-top-link:hover {
  color: var(--docs-text);
  background: rgba(148, 163, 184, 0.1);
}

.docs-top-link.panel-cta {
  background: var(--docs-accent);
  color: #ffffff;
  margin-left: 0.25rem;
}

.docs-top-link.panel-cta:hover {
  background: #4752c4;
}

.docs-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--docs-green);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
}

/* ---------------------------------------------------------------------
   SHELL 3 COLONNES (SIDEBAR GAUCHE | CONTENU | ASIDE DROITE)
   --------------------------------------------------------------------- */
.docs-shell {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 0 1.25rem;
}

/* Sidebar gauche simpliste */
.docs-sidebar-left {
  width: var(--docs-left-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--docs-header-h);
  max-height: calc(100vh - var(--docs-header-h));
  overflow-y: auto;
  padding: 1.75rem 1rem 2rem 0;
  border-right: 1px solid var(--docs-border);
}

.docs-nav-group + .docs-nav-group {
  margin-top: 1.65rem;
}

.docs-nav-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--docs-text-dim);
  padding: 0 0.7rem;
  margin-bottom: 0.45rem;
  display: block;
}

.docs-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.docs-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.46rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.89rem;
  font-weight: 500;
  color: var(--docs-text-muted);
  border-left: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.docs-nav-link:hover {
  color: var(--docs-text);
  background: rgba(148, 163, 184, 0.08);
}

.docs-nav-link.active {
  color: #ffffff;
  background: var(--docs-accent-soft);
  border-left-color: var(--docs-accent);
  font-weight: 600;
}

.docs-nav-link.is-soon {
  color: var(--docs-text-dim);
  cursor: default;
}

.docs-nav-link.is-soon:hover {
  background: transparent;
  color: var(--docs-text-dim);
}

.docs-soon-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--docs-text-dim);
}

.docs-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.7);
  z-index: 45;
}

.docs-overlay.open {
  display: block;
}

/* Contenu central */
.docs-content {
  flex: 1;
  min-width: 0;
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 0 5rem;
}

.docs-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--docs-accent-light);
  margin-bottom: 0.65rem;
}

.docs-page-header {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--docs-border);
  margin-bottom: 2.25rem;
}

.docs-page-header h1 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.7rem;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.docs-page-lead {
  margin: 0;
  font-size: 1.02rem;
  color: var(--docs-text-muted);
  max-width: 68ch;
}

.docs-article-section {
  padding-top: 0.5rem;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid var(--docs-border);
  margin-bottom: 2.5rem;
  transition: background 0.35s ease;
}

.docs-article-section:last-of-type {
  border-bottom: none;
  margin-bottom: 1rem;
}

.docs-article-section.search-flash {
  background: rgba(88, 101, 242, 0.08);
  border-radius: 12px;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.docs-h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.9rem;
  letter-spacing: -0.015em;
}

.docs-h2-anchor {
  color: var(--docs-text-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.15rem;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}

.docs-h2:hover .docs-h2-anchor,
.docs-h2-anchor:focus {
  opacity: 1;
  color: var(--docs-accent-light);
}

.docs-p {
  margin: 0 0 1rem;
  color: #cbd5e1;
  font-size: 0.96rem;
}

.docs-callout {
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.28);
  border-left: 3px solid var(--docs-accent);
  border-radius: 10px;
  padding: 0.95rem 1.15rem;
  margin: 1.15rem 0;
  font-size: 0.92rem;
  color: #e2e8f0;
}

.docs-callout strong {
  color: #ffffff;
}

/* Grille de cartes simples (strictement par 2 sur desktop/tablette, 1 colonne sur mobile) */
.docs-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.15rem;
}

.docs-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 0.9rem;
  margin-top: 1.15rem;
}

.docs-card {
  background: var(--docs-surface);
  border: 1px solid var(--docs-border);
  border-radius: 12px;
  padding: 1.25rem;
}

.docs-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.docs-card-title {
  margin: 0;
  font-size: 1.03rem;
  font-weight: 700;
  color: #ffffff;
}

.docs-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  white-space: nowrap;
}

.docs-badge.node {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.docs-badge.python {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.docs-card p {
  margin: 0 0 0.75rem;
  font-size: 0.89rem;
  color: var(--docs-text-muted);
}

.docs-card p:last-child {
  margin-bottom: 0;
}

.docs-clean-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  font-size: 0.87rem;
  color: #cbd5e1;
}

.docs-clean-list li::before {
  content: "→";
  color: var(--docs-accent-light);
  margin-right: 0.45rem;
  font-weight: 700;
}

/* Tableau comparatif des tarifs */
.docs-table-scroll {
  overflow-x: auto;
  margin-top: 1.15rem;
  border: 1px solid var(--docs-border);
  border-radius: 12px;
  background: var(--docs-surface);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 580px;
}

.docs-table th,
.docs-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--docs-border);
}

.docs-table thead th {
  background: rgba(22, 29, 48, 0.9);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
}

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

.docs-table tbody td:first-child {
  color: var(--docs-text-muted);
  font-weight: 600;
}

.docs-table tbody tr:hover td {
  background: rgba(148, 163, 184, 0.03);
}

.docs-plan-price {
  display: block;
  color: var(--docs-accent-light);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.docs-col-featured {
  background: rgba(88, 101, 242, 0.06);
}

.docs-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.docs-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.56rem 1.05rem;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--docs-border-strong);
  background: var(--docs-surface-2);
  color: #ffffff;
  transition: border-color 0.18s, background 0.18s;
}

.docs-btn:hover {
  border-color: var(--docs-accent-light);
  background: rgba(88, 101, 242, 0.16);
}

.docs-btn.primary {
  background: var(--docs-accent);
  border-color: var(--docs-accent);
}

.docs-btn.primary:hover {
  background: #4752c4;
}

/* Navigation Précédent / Suivant entre onglets de docs */
.docs-pager {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.docs-pager-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--docs-border);
  background: var(--docs-surface);
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s;
}

.docs-pager-card:hover {
  border-color: rgba(88, 101, 242, 0.55);
  background: var(--docs-surface-2);
}

.docs-pager-card.next {
  text-align: right;
  align-items: flex-end;
}

.docs-pager-dir {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--docs-text-dim);
}

.docs-pager-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--docs-accent-light);
}

.docs-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--docs-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--docs-text-dim);
}

.docs-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.docs-footer-links a {
  color: var(--docs-text-muted);
  text-decoration: none;
}

.docs-footer-links a:hover {
  color: #ffffff;
}

/* ---------------------------------------------------------------------
   ASIDE DROIT (TABLE DES MATIERES / PROGRESSION)
   --------------------------------------------------------------------- */
.docs-toc-right {
  width: var(--docs-right-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--docs-header-h);
  max-height: calc(100vh - var(--docs-header-h));
  overflow-y: auto;
  padding: 1.75rem 0 2rem;
}

.docs-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.docs-toc-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--docs-text-dim);
}

.docs-toc-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--docs-accent-light);
}

.docs-progress-track {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  margin-bottom: 0.9rem;
  overflow: hidden;
}

.docs-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--docs-accent), var(--docs-cyan));
  border-radius: 999px;
  transition: width 0.12s ease-out;
}

.docs-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--docs-border);
}

.docs-toc-link {
  display: block;
  padding: 0.38rem 0 0.38rem 0.9rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 0.83rem;
  color: var(--docs-text-muted);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.docs-toc-link:hover {
  color: #ffffff;
}

.docs-toc-link.active {
  color: var(--docs-accent-light);
  border-left-color: var(--docs-accent);
  font-weight: 600;
}

/* ---------------------------------------------------------------------
   MODALE DE RECHERCHE GLOBALE (CTRL + K)
   --------------------------------------------------------------------- */
.docs-search-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(5px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 1rem 1rem;
}

.docs-search-modal.open {
  display: flex;
}

.docs-search-dialog {
  width: 100%;
  max-width: 620px;
  background: #111726;
  border: 1px solid var(--docs-border-strong);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 75vh;
}

.docs-search-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--docs-border);
}

.docs-search-input-row svg {
  color: var(--docs-accent-light);
  flex-shrink: 0;
}

.docs-modal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.98rem;
  font-family: inherit;
  outline: none;
}

.docs-modal-input::placeholder {
  color: var(--docs-text-dim);
}

.docs-search-results {
  overflow-y: auto;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.docs-search-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  background: rgba(22, 29, 48, 0.55);
  transition: background 0.14s, border-color 0.14s;
}

.docs-search-item:hover,
.docs-search-item.selected {
  background: var(--docs-accent-soft);
  border-color: rgba(88, 101, 242, 0.45);
}

.docs-search-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.docs-search-item-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
}

.docs-search-item-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--docs-text-muted);
}

.docs-search-item-snippet {
  font-size: 0.82rem;
  color: var(--docs-text-muted);
  line-height: 1.45;
}

.docs-search-item-snippet mark {
  background: rgba(88, 101, 242, 0.35);
  color: #ffffff;
  padding: 0 0.2em;
  border-radius: 3px;
}

.docs-search-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--docs-text-muted);
  font-size: 0.9rem;
}

.docs-search-footer {
  padding: 0.55rem 1rem;
  border-top: 1px solid var(--docs-border);
  background: rgba(9, 13, 22, 0.65);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--docs-text-dim);
}

/* ---------------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .docs-toc-right {
    display: none;
  }
}

@media (max-width: 900px) {
  .docs-mobile-menu-btn {
    display: inline-flex;
  }

  .docs-topbar-center {
    max-width: 240px;
  }

  .docs-search-trigger span.label-text {
    display: none;
  }

  .docs-sidebar-left {
    position: fixed;
    left: 0;
    top: var(--docs-header-h);
    bottom: 0;
    z-index: 50;
    width: 270px;
    background: var(--docs-bg);
    padding: 1.25rem 1rem 2rem;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    max-height: none;
  }

  .docs-sidebar-left.open {
    transform: translateX(0);
  }
}

@media (max-width: 640px) {
  .docs-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .docs-top-link.hide-xs {
    display: none;
  }

  .docs-topbar-center {
    flex: 0 1 auto;
    max-width: none;
  }

  .docs-search-trigger {
    width: auto;
    padding: 0 0.6rem;
  }

  .docs-kbd {
    display: none;
  }
}

