/* ── Fond sombre (slate) ───────────────────────────────────────────────────── */

[data-md-color-scheme="slate"] {
  --md-default-bg-color:             #0d1117;
  --md-default-bg-color--light:      #161b22;
  --md-default-bg-color--lighter:    #1c2128;
  --md-default-bg-color--lightest:   #21262d;
  --md-code-bg-color:                #161b22;
  --md-accent-fg-color:              #58A6FF;
  --md-accent-fg-color--transparent: rgba(88, 166, 255, 0.1);
}

/* ── Header & onglets ─────────────────────────────────────────────────────── */

.md-header {
  background-color: #0D1117 !important;
  border-bottom: 1px solid #30363D;
  box-shadow: none !important;
}

.md-tabs {
  background-color: #0D1117 !important;
  border-bottom: 1px solid #21262D;
}

.md-tabs__link {
  color: rgba(255, 255, 255, 0.6);
  opacity: 1 !important;
}

.md-tabs__link--active,
.md-tabs__link:hover {
  color: #ffffff !important;
}

/* ── Barre de recherche ───────────────────────────────────────────────────── */

.md-search__form {
  background-color: #161B22 !important;
  border: 1px solid #30363D !important;
  border-radius: 0.3rem;
}

.md-search__input { color: #F0F6FC; }
.md-search__input::placeholder { color: #8B949E; }

/* ── Liens ────────────────────────────────────────────────────────────────── */

[data-md-color-scheme="slate"] .md-content a:not([class]) { color: #58A6FF; }
[data-md-color-scheme="slate"] .md-nav__link:is(:focus, :hover) { color: #58A6FF; }
[data-md-color-scheme="slate"] .md-nav__link--active { color: #ffffff; font-weight: 600; }

/* ── Tokens cards par scheme ──────────────────────────────────────────────── */

[data-md-color-scheme="slate"] {
  --kb-card-bg:    #161B22;
  --kb-card-title: #F0F6FC;
  --kb-card-desc:  #8B949E;
}

[data-md-color-scheme="default"] {
  --kb-card-bg:    #f6f8fa;
  --kb-card-title: #1f2328;
  --kb-card-desc:  #656d76;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.kb-hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
}

.kb-hero__title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #F0F6FC;
  margin: 0 0 0.75rem;
}

.kb-hero__subtitle {
  font-size: 1rem;
  color: #8B949E;
  max-width: 56ch;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── Grille ───────────────────────────────────────────────────────────────── */

.kb-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.5rem 0 3rem;
}

@media (max-width: 960px) { .kb-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .kb-cards { grid-template-columns: 1fr; } }

/* ── Card base ────────────────────────────────────────────────────────────── */

.kb-card {
  display: flex;
  flex-direction: column;
  background: var(--kb-card-bg);
  border: 1px solid var(--_accent, #30363D);
  border-radius: 12px;
  padding: 28px;
  min-height: 160px;
  text-decoration: none;
  color: var(--kb-card-title);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.kb-card:hover {
  transform: translateY(-3px);
  text-decoration: none;
  color: var(--kb-card-title);
}

.kb-disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}

/* ── Card header : icône + titre sur la même ligne ────────────────────────── */

.kb-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.kb-card-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--_icon-bg, rgba(88, 166, 255, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
}

.kb-card-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #F0F6FC;
  margin: 0;
  line-height: 1.2;
}

.kb-card > p {
  font-size: 14px;
  color: #8B949E;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

/* ── Compteur "X pages ›" en couleur de bordure ───────────────────────────── */

.kb-card-count {
  display: block;
  margin-top: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--_accent, #58A6FF);
}

.kb-disabled .kb-card-count {
  color: #8B949E;
}

/* ── Hover glow par section ───────────────────────────────────────────────── */

.kb-intune:hover   { box-shadow: 0 0 0 1px #3B82F6, 0 8px 32px rgba(59,  130, 246, 0.25); }
.kb-datto:hover    { box-shadow: 0 0 0 1px #F97316, 0 8px 32px rgba(249, 115,  22, 0.25); }
.kb-m365:hover     { box-shadow: 0 0 0 1px #22C55E, 0 8px 32px rgba(34,  197,  94, 0.25); }
.kb-entra:hover    { box-shadow: 0 0 0 1px #A855F7, 0 8px 32px rgba(168,  85, 247, 0.25); }
.kb-graph:hover    { box-shadow: 0 0 0 1px #06B6D4, 0 8px 32px rgba(6,   182, 212, 0.25); }
.kb-poweracademy:hover { box-shadow: 0 0 0 1px #EAB308, 0 8px 32px rgba(234, 179,   8, 0.25); }

/* ── Couleurs par section (border + icône) ────────────────────────────────── */

.kb-intune   { --_accent: #3B82F6; --_icon-bg: rgba(59,  130, 246, 0.15); }
.kb-datto    { --_accent: #F97316; --_icon-bg: rgba(249, 115,  22, 0.15); }
.kb-m365     { --_accent: #22C55E; --_icon-bg: rgba(34,  197,  94, 0.15); }
.kb-entra    { --_accent: #A855F7; --_icon-bg: rgba(168,  85, 247, 0.15); }
.kb-graph    { --_accent: #06B6D4; --_icon-bg: rgba(6,   182, 212, 0.15); }
.kb-poweracademy { --_accent: #EAB308; --_icon-bg: rgba(234, 179,   8, 0.15); }
