/* ============================================
   NordikServer — KB Article Styles
   À coller dans : templates/nordikserver/css/custom.css
   ============================================ */

/* ── Reset & Variables ── */
#nordik-support {
  --bg-deep:     #07090f;
  --bg-card:     #0e1220;
  --bg-card2:    #131829;
  --border:      rgba(99,120,255,0.15);
  --accent:      #4f6fff;
  --accent-glow: #3a56ff;
  --accent2:     #00d4ff;
  --text:        #e8ecff;
  --muted:       #7a85aa;
  --green:       #22c55e;
  --orange:      #f97316;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}


#nordik-support .ns-wrap {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

/* Layout pages KB — pleine largeur, sans shell WHMCS */
section#main-body {
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
}

.ns-page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 24px 100px;
}

.ns-page-inner {
  width: 100%;
}

/* Branding WHMCS natif (injecté avant le footer) */
#main-body > .container > p[style*="text-align:center"],
.primary-content > p[style*="text-align:center"] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden;
}

@media (max-width: 768px) {
  .ns-page-wrapper {
    padding: 16px 16px 72px;
  }
}

  /* ── Arrière-plan (étoiles + aurora) sur #main-body ── */
#main-body {
    background-color: #07090f;
    background-image:
      /* Étoiles — motif SVG en tuile */
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Ccircle cx='25' cy='40' r='1' fill='white' opacity='.45'/%3E%3Ccircle cx='85' cy='12' r='.7' fill='white' opacity='.3'/%3E%3Ccircle cx='150' cy='75' r='1.2' fill='white' opacity='.5'/%3E%3Ccircle cx='210' cy='30' r='.8' fill='white' opacity='.35'/%3E%3Ccircle cx='320' cy='60' r='1' fill='white' opacity='.4'/%3E%3Ccircle cx='55' cy='155' r='.9' fill='white' opacity='.3'/%3E%3Ccircle cx='130' cy='190' r='1.1' fill='white' opacity='.45'/%3E%3Ccircle cx='195' cy='130' r='.7' fill='white' opacity='.35'/%3E%3Ccircle cx='275' cy='210' r='1.3' fill='white' opacity='.5'/%3E%3Ccircle cx='370' cy='100' r='.8' fill='white' opacity='.3'/%3E%3Ccircle cx='350' cy='250' r='1' fill='white' opacity='.4'/%3E%3Ccircle cx='15' cy='270' r='.8' fill='white' opacity='.3'/%3E%3Ccircle cx='100' cy='290' r='1' fill='white' opacity='.4'/%3E%3Ccircle cx='180' cy='260' r='.6' fill='white' opacity='.25'/%3E%3Ccircle cx='300' cy='330' r='1.1' fill='white' opacity='.45'/%3E%3Ccircle cx='390' cy='370' r='.9' fill='white' opacity='.35'/%3E%3Ccircle cx='145' cy='345' r='.8' fill='white' opacity='.3'/%3E%3Ccircle cx='60' cy='390' r='1' fill='white' opacity='.4'/%3E%3Ccircle cx='240' cy='380' r='1.2' fill='white' opacity='.5'/%3E%3Ccircle cx='380' cy='15' r='1' fill='white' opacity='.4'/%3E%3Ccircle cx='265' cy='145' r='.7' fill='white' opacity='.3'/%3E%3C/svg%3E"),
      /* Aurora — bleue (haut gauche) */
      radial-gradient(ellipse 140% 55% at 15% -8%,  rgba(79,111,255,0.30) 0%, transparent 55%),
      /* Aurora — cyan (haut droite) */
      radial-gradient(ellipse 110% 50% at 88%  2%,   rgba(0,212,255,0.22) 0%, transparent 52%),
      /* Aurora — violette (bas centre) */
      radial-gradient(ellipse 90%  50% at 50%  108%, rgba(168,85,247,0.20) 0%, transparent 55%),
      /* Aurora — verte (gauche milieu) */
      radial-gradient(ellipse 65%  38% at -5%  62%,  rgba(34,197,94,0.12)  0%, transparent 52%),
      /* Aurora — cyan douce (droite bas) */
      radial-gradient(ellipse 55%  32% at 95%  80%,  rgba(0,212,255,0.09)  0%, transparent 50%);
    background-size: 400px 400px, auto, auto, auto, auto, auto;
    background-attachment: local;
    animation: nsStarsDrift 90s linear infinite;
  }
  
  @keyframes nsStarsDrift {
    from { background-position: 0 0,     0 0, 0 0, 0 0, 0 0, 0 0; }
    to   { background-position: 400px 400px, 0 0, 0 0, 0 0, 0 0, 0 0; }
  }

/* --- Layout 2 colonnes --- */
.ns-kb-article { font-family: inherit; }

.ns-kb-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: #475569;
  text-decoration: none; margin-bottom: 1.25rem;
  transition: color 0.15s;
}
.ns-kb-back:hover { color: #c084fc; }

.ns-kb-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 1.5rem;
  align-items: start;
}

.ns-kb-main { min-width: 0; }

/* --- Sidebar --- */
.ns-kb-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --- Widgets sidebar --- */
.ns-kb-widget {
  background: #0f1623;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  overflow: hidden;
}
.ns-kb-widget-purple {
  background: linear-gradient(135deg, #1a0a3a 0%, #0f1a3a 100%);
  border-color: rgba(124,58,237,0.2);
}
.ns-kb-widget-header {
  display: flex; align-items: center; gap: 7px;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 12px; font-weight: 600;
  color: #64748b;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.ns-kb-widget-icon { font-size: 13px; }
.ns-kb-widget-body { padding: 1rem; }

.ns-kb-widget-emoji { font-size: 28px; margin-bottom: 0.5rem; display: block; }
.ns-kb-widget-title {
  font-size: 14px; font-weight: 600;
  color: #f1f5f9; margin: 0 0 6px;
}
.ns-kb-widget-desc {
  font-size: 12px; color: #94a3b8;
  line-height: 1.55; margin-bottom: 0;
}
.ns-kb-widget-btn-primary {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 8px 12px; margin-top: 0.75rem;
  background: #7c3aed; color: white; border-radius: 8px;
  font-size: 13px; font-weight: 500; text-decoration: none;
  transition: background 0.15s;
}
.ns-kb-widget-btn-primary:hover { background: #6d28d9; color: white; }
.ns-kb-widget-btn-secondary {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 7px 12px; margin-top: 7px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #94a3b8; border-radius: 8px;
  font-size: 13px; text-decoration: none;
  transition: all 0.15s;
}
.ns-kb-widget-btn-secondary:hover { color: #f1f5f9; background: rgba(255,255,255,0.08); }

/* --- Widget promo forfaits --- */
.ns-kb-widget-promo {
  background: linear-gradient(135deg, #0f1a2e 0%, #0a1220 100%);
  border-color: rgba(79, 111, 255, 0.18);
}
.ns-kb-widget-promo .ns-kb-widget-body {
  text-align: center;
  padding: 1.125rem 1rem 1.25rem;
}
.ns-kb-widget-promo .ns-kb-widget-title {
  margin-bottom: 0.75rem;
}
.ns-kb-promo-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0 0 0.5rem;
  line-height: 1;
}
.ns-kb-promo-amount {
  font-size: 32px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.03em;
}
.ns-kb-promo-currency {
  font-size: 16px;
  font-weight: 600;
  color: #818cf8;
}
.ns-kb-promo-period {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}
.ns-kb-promo-tagline {
  font-size: 12px;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0 0 0.875rem;
}
.ns-kb-widget-promo .ns-kb-widget-btn-primary {
  margin-top: 0;
}

/* --- TOC --- */
.ns-kb-toc-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 13px; color: #475569;
  text-decoration: none; transition: color 0.15s;
}
.ns-kb-toc-item:hover { color: #c084fc; }
.ns-kb-toc-item.active { color: #c084fc; }
.ns-kb-toc-sub { padding-left: 14px; font-size: 12px; }
.ns-kb-toc-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.ns-kb-toc-empty { font-size: 12px; color: #334155; margin: 0; }

/* --- Statut --- */
.ns-kb-status-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ns-kb-status-row:last-of-type { border-bottom: none; }
.ns-kb-status-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.ns-kb-status-ok { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.5); }
.ns-kb-status-warn { background: #f59e0b; }
.ns-kb-status-down { background: #ef4444; }
.ns-kb-status-label { flex: 1; color: #94a3b8; }
.ns-kb-status-val { font-size: 11px; color: #10b981; }
.ns-kb-status-link {
  display: block; margin-top: 0.625rem;
  font-size: 12px; color: #475569; text-decoration: none;
  transition: color 0.15s;
}
.ns-kb-status-link:hover { color: #c084fc; }

/* --- Liens rapides --- */
.ns-kb-quicklink {
  display: flex; align-items: center; gap: 10px;
  padding: 0.7rem 1rem; font-size: 13px; color: #94a3b8;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s, color 0.15s;
}
.ns-kb-quicklink:hover { background: rgba(255,255,255,0.03); color: #f1f5f9; }
.ns-kb-quicklink span:nth-child(2) { flex: 1; }
.ns-kb-ql-arrow { color: #334155; font-size: 12px; transition: transform 0.15s, color 0.15s; }
.ns-kb-quicklink:hover .ns-kb-ql-arrow { transform: translateX(3px); color: #c084fc; }

/* --- Article header card --- */
.ns-kb-header {
  background: #0f1623;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.ns-kb-header::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(to bottom, #7c3aed, #06b6d4);
}
.ns-kb-header-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 0.875rem; flex-wrap: wrap;
}
.ns-kb-badges { display: flex; gap: 7px; flex-wrap: wrap; }
.ns-kb-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px; letter-spacing: 0.03em;
}
.ns-kb-badge-game { background: rgba(16,185,129,0.12); color: #34d399; border: 1px solid rgba(16,185,129,0.22); }
.ns-kb-badge-new { background: rgba(124,58,237,0.15); color: #c084fc; border: 1px solid rgba(124,58,237,0.25); }
.ns-kb-badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ns-kb-print-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px; padding: 4px 12px; font-size: 12px;
  color: #64748b; cursor: pointer; transition: all 0.15s;
  white-space: nowrap; font-family: inherit;
}
.ns-kb-print-btn:hover { border-color: rgba(255,255,255,0.18); color: #94a3b8; }
.ns-kb-title {
  font-size: 1.5rem; font-weight: 700; color: #f1f5f9;
  line-height: 1.25; margin: 0 0 0.875rem 0; letter-spacing: -0.01em;
}
.ns-kb-lead {
  margin: -0.35rem 0 1rem;
  font-size: 1rem;
  line-height: 1.7;
  color: #94a3b8;
  max-width: 72ch;
}
.ns-kb-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ns-kb-meta-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #475569; }
.ns-kb-meta-sep { width: 3px; height: 3px; border-radius: 50%; background: #334155; }

/* --- Article body --- */
.ns-kb-body {
  background: #0f1623; border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 1.75rem; margin-bottom: 1.25rem;
  color: #94a3b8; font-size: 14px; line-height: 1.75;
}
.ns-kb-body h2, .ns-kb-body h3 {
  color: #f1f5f9; font-weight: 600;
  margin: 1.5rem 0 0.75rem; padding-bottom: 0.625rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ns-kb-body h2 { font-size: 1rem; }
.ns-kb-body h3 { font-size: 0.9rem; border-bottom: none; padding-bottom: 0; }
.ns-kb-body p { margin-bottom: 0.875rem; }
.ns-kb-body p:last-child { margin-bottom: 0; }
.ns-kb-body a { color: #c084fc; text-decoration: none; }
.ns-kb-body a:hover { text-decoration: underline; }
.ns-kb-body strong { color: #f1f5f9; font-weight: 500; }
.ns-kb-body ul, .ns-kb-body ol { padding-left: 1.25rem; margin-bottom: 0.875rem; }
.ns-kb-body li { margin-bottom: 0.4rem; }
.ns-kb-body code {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px; padding: 1px 6px; font-size: 12px;
  color: #c084fc; font-family: 'Courier New', monospace;
}
.ns-kb-body pre {
  background: #0d1117; border: 1px solid #30363d;
  border-radius: 10px; padding: 1rem 1.25rem;
  overflow-x: auto; margin: 1rem 0; font-size: 13px;
  line-height: 1.7; color: #e6edf3; font-family: 'Courier New', monospace;
}
.ns-kb-body pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }

/* --- Vote --- */
.ns-kb-vote {
  background: #0f1623; border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 1.125rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.ns-kb-vote-label { font-size: 14px; color: #94a3b8; }
.ns-kb-vote-useful { font-size: 12px; color: #475569; margin-top: 2px; }
.ns-kb-vote-btns { display: flex; gap: 8px; }
.ns-kb-vote-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 18px; border-radius: 8px; font-size: 13px;
  font-family: inherit; border: 1px solid rgba(255,255,255,0.1);
  background: transparent; color: #94a3b8; cursor: pointer; transition: all 0.15s;
}
.ns-kb-vote-btn:hover { border-color: rgba(255,255,255,0.18); color: #f1f5f9; }

/* --- Articles reliés --- */
.ns-kb-related {
  background: #0f1623; border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; overflow: hidden; margin-bottom: 1.25rem;
}
.ns-kb-related-header {
  padding: 0.75rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 11px; font-weight: 600; color: #475569;
  text-transform: uppercase; letter-spacing: 0.07em;
}
.ns-kb-related-item {
  display: flex; align-items: center; gap: 12px;
  padding: 0.875rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.05);
  text-decoration: none; transition: background 0.15s;
}
.ns-kb-related-item:last-child { border-bottom: none; }
.ns-kb-related-item:hover { background: rgba(255,255,255,0.03); }
.ns-kb-related-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(124,58,237,0.12); border: 1px solid rgba(124,58,237,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.ns-kb-related-title {
  flex: 1; min-width: 0; font-size: 13px; color: #cbd5e1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ns-kb-related-arrow { color: #334155; font-size: 13px; transition: transform 0.15s, color 0.15s; }
.ns-kb-related-item:hover .ns-kb-related-arrow { transform: translateX(3px); color: #c084fc; }

/* --- Support CTA --- */
.ns-kb-support {
  background: linear-gradient(135deg, #1a0a3a 0%, #0f1a3a 100%);
  border: 1px solid rgba(124,58,237,0.2); border-radius: 14px;
  padding: 1.25rem 1.5rem; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.ns-kb-support-text h4 { font-size: 14px; font-weight: 600; color: #f1f5f9; margin: 0 0 4px; }
.ns-kb-support-text p { font-size: 12px; color: #94a3b8; margin: 0; }
.ns-kb-support-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ns-kb-support-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px; font-size: 13px;
  font-weight: 500; font-family: inherit; text-decoration: none;
  transition: all 0.15s; cursor: pointer; border: none; white-space: nowrap;
}
.ns-kb-support-btn-primary { background: #7c3aed; color: white !important; }
.ns-kb-support-btn-primary:hover { background: #6d28d9; }
.ns-kb-support-btn-secondary {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #94a3b8;
}
.ns-kb-support-btn-secondary:hover { color: #f1f5f9; background: rgba(255,255,255,0.08); }

/* --- Responsive --- */
@media (max-width: 860px) {
  .ns-kb-layout { grid-template-columns: 1fr; }
  .ns-kb-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
}
@media (max-width: 560px) {
  .ns-kb-sidebar { grid-template-columns: 1fr; }
  .ns-kb-header, .ns-kb-body { padding: 1.25rem; }
}


/* ========================
   COMPOSANTS RÉUTILISABLES
   ======================== */

/* Blocs alerte */
.ns-kb-alert {
  display: flex; gap: 12px;
  border-radius: 10px; padding: 1rem 1.25rem;
  margin: 1rem 0; border: 1px solid;
  font-size: 13px; line-height: 1.6;
}
.ns-kb-alert span { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.ns-kb-alert strong { display: block; margin-bottom: 3px; }

.ns-kb-alert-info {
  background: rgba(6,182,212,0.07);
  border-color: rgba(6,182,212,0.2);
  color: #7dd3e8;
}
.ns-kb-alert-info strong { color: #06b6d4; }

.ns-kb-alert-warning {
  background: rgba(245,158,11,0.07);
  border-color: rgba(245,158,11,0.2);
  color: #d4a84b;
}
.ns-kb-alert-warning strong { color: #f59e0b; }

.ns-kb-alert-success {
  background: rgba(16,185,129,0.07);
  border-color: rgba(16,185,129,0.2);
  color: #6ee7b7;
}
.ns-kb-alert-success strong { color: #10b981; }

/* Étapes numérotées */
.ns-kb-steps {
  display: flex; flex-direction: column;
  gap: 10px; margin: 1rem 0;
}
.ns-kb-step {
  display: flex; gap: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; padding: 1rem 1.25rem;
  transition: border-color 0.15s;
}
.ns-kb-step:hover { border-color: rgba(255,255,255,0.12); }
.ns-kb-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  color: #c084fc; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.ns-kb-step-body { flex: 1; min-width: 0; }
.ns-kb-step-title {
  font-size: 14px; font-weight: 500;
  color: #f1f5f9; margin-bottom: 4px;
}
.ns-kb-step-desc { font-size: 13px; color: #94a3b8; line-height: 1.6; }
.ns-kb-step-desc code {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px; padding: 1px 5px;
  font-size: 12px; color: #c084fc;
  font-family: 'Courier New', monospace;
}

/* Bloc de code avec bouton copier */
.ns-kb-code {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  overflow: hidden;
  margin: 1rem 0;
}
.ns-kb-code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 1rem;
  background: #161b22;
  border-bottom: 1px solid #30363d;
  font-size: 12px; color: #8b949e;
  font-family: 'Courier New', monospace;
}
.ns-kb-code pre {
  padding: 1rem 1.25rem;
  margin: 0; font-size: 13px;
  line-height: 1.7; color: #e6edf3;
  font-family: 'Courier New', monospace;
  overflow-x: auto;
  background: none; border: none; border-radius: 0;
}
/* ========================
   BACKGROUND AURORE + NEIGE
   ======================== */
   body {
    position: relative;
  }
  
  #ns-snow-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
  }
  
  body > * { position: relative; z-index: 1; }