/* ── Wiki Hub — page d'accueil & hubs de catégorie ── */

/* Hero */
.hub-hero {
  background:
    radial-gradient(ellipse 55% 90% at 75% 50%, #6366f112 0%, transparent 65%),
    linear-gradient(135deg, #0f1117 0%, #13151f 100%);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.hub-hero-inner { max-width: 640px; margin: 0 auto; padding: 0 1.5rem; }
.hub-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  margin: .5rem 0 .75rem;
}
.hub-hero p { font-size: .92rem; color: #64748b; margin: 0; }

/* Breadcrumb */
.wiki-breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--text-muted);
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  flex-wrap: wrap;
}
.wiki-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.wiki-breadcrumb a:hover { color: var(--accent-l); }
.wiki-breadcrumb .sep { color: #374151; }
.wiki-breadcrumb .current { color: var(--text); }

/* ── Mode cards (wiki.html — 2 grandes cartes) ── */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 920px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2.25rem 2rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.mode-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .25s;
  border-radius: inherit;
}
.mode-card.client::before { background: radial-gradient(ellipse 80% 80% at 20% 20%, #6366f10c, transparent); }
.mode-card.admin::before  { background: radial-gradient(ellipse 80% 80% at 80% 20%, #a78bfa0c, transparent); }
.mode-card:hover { border-color: #6366f155; transform: translateY(-2px); box-shadow: 0 8px 32px #0004; text-decoration: none; color: inherit; }
.mode-card:hover::before { opacity: 1; }

.mode-icon {
  font-size: 2rem;
  line-height: 1;
}
.mode-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
.mode-desc {
  font-size: .85rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}
.mode-topics {
  list-style: none;
  padding: 0;
  margin: .25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.mode-topics li {
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.mode-topics li::before { content: '›'; color: var(--accent); font-weight: 700; }
.mode-cta {
  margin-top: auto;
  padding-top: 1rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent-l);
  display: flex;
  align-items: center;
  gap: .3rem;
}

/* ── Category cards (hubs client / admin) ── */
.cat-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.4rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: border-color .2s, transform .15s, box-shadow .15s;
}
.cat-card:hover {
  border-color: #6366f155;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px #0003;
  text-decoration: none;
  color: inherit;
}
.cat-icon { font-size: 1.5rem; line-height: 1; }
.cat-title { font-size: .95rem; font-weight: 700; color: var(--text); margin: 0; }
.cat-desc  { font-size: .8rem; color: var(--text-muted); line-height: 1.55; margin: 0; }
.cat-arrow { margin-top: auto; font-size: .78rem; color: var(--accent-l); font-weight: 600; padding-top: .5rem; }

/* ── Article page ── */
.article-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}
.article-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  margin: 0 0 .4rem;
}
.article-lead {
  font-size: .92rem;
  color: #64748b;
  margin: 0 0 2.5rem;
  line-height: 1.7;
}
.article-divider { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* Prev / Next */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.article-nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .65rem;
  padding: .9rem 1.1rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  transition: border-color .2s;
}
.article-nav-btn:hover { border-color: #6366f155; text-decoration: none; color: inherit; }
.article-nav-btn.next { text-align: right; }
.article-nav-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.article-nav-title { font-size: .88rem; font-weight: 700; color: var(--accent-l); }
.article-nav-btn.empty { pointer-events: none; opacity: 0; }

/* Back to hub link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.75rem;
}
.back-link:hover { color: var(--accent-l); text-decoration: none; }

/* Reuse wiki.css components */
.article-wrap .wiki-section { margin-bottom: 3rem; }
.article-wrap .wiki-section-header {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1.25rem; padding-bottom: .65rem;
  border-bottom: 1px solid var(--border);
}
.article-wrap .wiki-section-num {
  background: linear-gradient(135deg, var(--accent), var(--accent-l));
  color: #fff; font-size: .7rem; font-weight: 800;
  width: 24px; height: 24px; border-radius: .3rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.article-wrap .wiki-section-title { font-size: 1.2rem; font-weight: 700; margin: 0; color: var(--text); }

/* ── Article prose & code ── */
.article-wrap p { font-size: .9rem; color: #94a3b8; line-height: 1.75; margin-bottom: 1rem; }
.article-wrap p strong { color: var(--text); }
.article-wrap code {
  background: #111827;
  color: var(--accent-l);
  padding: .15rem .45rem;
  border-radius: .3rem;
  font-size: .8rem;
  font-family: 'Consolas', 'Courier New', monospace;
  border: 1px solid #2d3048;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .mode-grid { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav-btn.next { text-align: left; }
}
