/**
 * Wiki Règlement — documentation type GitBook
 */

.docs-body {
  min-height: 100vh;
  background: #070b14;
}

.docs-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - var(--nav-h, 68px));
  max-width: 1400px;
  margin: 0 auto;
}

.docs-sidebar-toggle {
  display: none;
  position: sticky;
  top: calc(var(--nav-h, 68px) + 8px);
  z-index: 5;
  margin: 12px 16px 0;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.86rem;
}

.docs-sidebar {
  border-right: 1px solid rgba(255,255,255,0.07);
  background: rgba(10, 14, 22, 0.92);
  padding: 20px 14px 40px;
  position: sticky;
  top: var(--nav-h, 68px);
  height: calc(100vh - var(--nav-h, 68px));
  overflow: auto;
}

.docs-sidebar-head {
  padding: 0 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 14px;
}

.docs-brand {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 14px;
}
.docs-brand-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}
.docs-brand strong {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
}

.docs-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.28);
  color: #f1f5f9;
  font: inherit;
  font-size: 0.86rem;
}
.docs-search input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.docs-nav-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 8px 8px;
}

.docs-nav {
  display: grid;
  gap: 2px;
}

.docs-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  border-left: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.docs-nav-emoji {
  flex: 0 0 auto;
  font-size: 1.05rem;
  line-height: 1;
  width: 1.4em;
  text-align: center;
}
.docs-nav-text {
  flex: 1;
  min-width: 0;
}
.docs-title-emoji {
  margin-right: 0.35em;
}
.docs-page-emoji {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 4px;
}

/* Encadrés wiki */
.docs-prose .wiki-callout,
.wiki-editor .wiki-callout {
  margin: 1.25em 0;
  padding: 14px 16px;
  border-radius: 12px;
  border-left: 4px solid #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  color: #cbd5e1;
}
.docs-prose .wiki-callout--tip,
.wiki-editor .wiki-callout--tip {
  border-left-color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
}
.docs-prose .wiki-callout--warn,
.wiki-editor .wiki-callout--warn {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}
.docs-prose .wiki-callout--danger,
.wiki-editor .wiki-callout--danger {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}
.docs-prose .wiki-callout--success,
.wiki-editor .wiki-callout--success {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}
.docs-prose .wiki-callout p:last-child,
.wiki-editor .wiki-callout p:last-child { margin-bottom: 0; }
.docs-prose hr {
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 1.6em 0;
}
.docs-prose img.wiki-emoji-img,
.wiki-editor .ql-editor img.wiki-emoji-img,
.rich-content img.wiki-emoji-img {
  display: inline-block;
  width: 1.35em;
  height: 1.35em;
  vertical-align: -0.25em;
  margin: 0 0.1em;
  border: 0;
  border-radius: 0;
  cursor: default;
}
.docs-prose img.wiki-sticker-img,
.wiki-editor .ql-editor img.wiki-sticker-img,
.rich-content img.wiki-sticker-img {
  display: block;
  max-width: min(280px, 100%);
  height: auto;
  margin: 0.8em 0;
  border-radius: 10px;
}
.docs-prose code,
.wiki-editor .ql-editor code {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
}
.docs-prose pre,
.wiki-editor .ql-editor pre {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
  overflow-x: auto;
  margin: 1em 0;
}
a.docs-nav-link:hover {
  color: #f1f5f9;
  background: rgba(255,255,255,0.04);
}
.docs-nav-link.is-active {
  color: #fff;
  background: rgba(56, 189, 248, 0.12);
  border-left-color: #38bdf8;
}
.docs-nav-link.is-disabled {
  opacity: 0.45;
  cursor: default;
}
.docs-nav-link em {
  font-style: normal;
  font-size: 0.68rem;
  color: #f87171;
  font-weight: 700;
  margin-left: auto;
}

.docs-main {
  min-width: 0;
  padding: 28px 28px 80px;
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(56, 189, 248, 0.06), transparent 55%),
    #070b14;
}

.docs-article-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 32px;
  align-items: start;
  max-width: 980px;
}

.docs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 18px;
}
.docs-breadcrumb a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}
.docs-breadcrumb a:hover { text-decoration: underline; }

.docs-article-head h1 {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 12px;
  color: #f8fafc;
}
.docs-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #94a3b8;
  margin: 0 0 12px;
  max-width: 58ch;
}
.docs-meta {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.docs-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #38bdf8;
  margin: 0 0 8px;
}

/* Prose lisible */
.docs-prose {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #cbd5e1;
  max-width: 68ch;
}
.docs-prose h1,
.docs-prose h2,
.docs-prose h3 {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #f8fafc;
  scroll-margin-top: calc(var(--nav-h, 68px) + 24px);
  line-height: 1.25;
}
.docs-prose h1 { font-size: 1.55rem; margin: 1.8em 0 0.6em; }
.docs-prose h2 {
  font-size: 1.28rem;
  margin: 2em 0 0.65em;
  padding-top: 0.4em;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.docs-prose h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.docs-prose h3 { font-size: 1.08rem; margin: 1.5em 0 0.5em; color: #e2e8f0; }
.docs-prose p { margin: 0 0 1.05em; }
.docs-prose ul,
.docs-prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}
.docs-prose li { margin: 0.4em 0; }
.docs-prose li::marker { color: #38bdf8; }
.docs-prose a { color: #38bdf8; text-decoration: underline; text-underline-offset: 3px; }
.docs-prose strong { color: #f1f5f9; font-weight: 700; }
.docs-prose blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 3px solid #38bdf8;
  border-radius: 0 10px 10px 0;
  background: rgba(56, 189, 248, 0.08);
  color: #94a3b8;
}
.docs-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1em 0;
  border: 1px solid rgba(255,255,255,0.08);
}
.docs-prose .ql-align-center { text-align: center; }
.docs-prose .ql-align-right { text-align: right; }
.docs-prose .ql-align-justify { text-align: justify; }

/* Outline droite */
.docs-outline {
  position: sticky;
  top: calc(var(--nav-h, 68px) + 24px);
  padding-left: 8px;
}
.docs-outline-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 10px;
}
.docs-outline-nav {
  display: grid;
  gap: 2px;
  border-left: 1px solid rgba(255,255,255,0.1);
}
.docs-outline-link {
  display: block;
  padding: 5px 0 5px 12px;
  font-size: 0.78rem;
  color: #64748b;
  text-decoration: none;
  line-height: 1.35;
  border-left: 2px solid transparent;
  margin-left: -1px;
}
.docs-outline-link:hover {
  color: #e2e8f0;
}
.docs-outline-link.level-3 {
  padding-left: 22px;
  font-size: 0.74rem;
}

/* Pager */
.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.docs-pager-link {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(15, 23, 42, 0.65);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.docs-pager-link:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.9);
}
.docs-pager-link span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.docs-pager-link strong {
  font-size: 0.95rem;
  color: #f1f5f9;
  line-height: 1.35;
}
.docs-pager-next { text-align: right; }

/* Hub */
.docs-hub {
  max-width: 860px;
}
.docs-hub-head {
  margin-bottom: 28px;
}
.docs-hub-head h1 {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.docs-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.docs-page-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(15, 23, 42, 0.72);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
a.docs-page-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.95);
}
.docs-page-card strong {
  font-size: 1rem;
  color: #f8fafc;
  line-height: 1.35;
}
.docs-page-card span {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.45;
}
.docs-page-card.is-disabled {
  opacity: 0.55;
}
.docs-soon {
  color: #f87171 !important;
  font-weight: 700;
  font-size: 0.8rem !important;
}

.docs-empty,
.docs-empty-inline {
  padding: 40px 20px;
  text-align: center;
  color: #94a3b8;
}
.docs-empty h1 {
  color: #f8fafc;
  margin-bottom: 10px;
}
.docs-empty-inline {
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 12px;
  grid-column: 1 / -1;
}

.docs-backdrop {
  display: none;
}

@media (max-width: 1100px) {
  .docs-article-wrap {
    grid-template-columns: 1fr;
  }
  .docs-outline { display: none; }
}

@media (max-width: 900px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }
  .docs-sidebar-toggle { display: inline-flex; align-items: center; }
  .docs-sidebar {
    position: fixed;
    left: 0;
    top: var(--nav-h, 68px);
    bottom: 0;
    width: min(300px, 88vw);
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 20px 0 40px rgba(0,0,0,0.45);
  }
  body.docs-nav-open .docs-sidebar {
    transform: translateX(0);
  }
  body.docs-nav-open .docs-backdrop {
    display: block;
    position: fixed;
    inset: var(--nav-h, 68px) 0 0;
    background: rgba(0,0,0,0.55);
    z-index: 35;
  }
  .docs-main { padding: 16px 16px 64px; }
  .docs-pager { grid-template-columns: 1fr; }
  .docs-pager-next { text-align: left; }
}
