/* ============== BOUTON AIDE (navbar) ============== */
.app-btn-aide-navbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--bs-navbar-color, #e2e8f0);
  font-weight: 500;
  font-size: 0.88rem;
  border-radius: 8px;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.app-btn-aide-navbar:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--bs-navbar-active-color, #ffffff);
}

.app-btn-aide-navbar:active,
.app-btn-aide-navbar:focus-visible {
  outline: 0;
  background: rgba(255, 255, 255, 0.12);
}

.app-btn-aide-navbar.actif {
  background: rgba(255, 255, 255, 0.96);
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.app-btn-aide-navbar .app-btn-aide-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
}

.app-btn-aide-navbar .app-btn-aide-label {
  display: inline-block;
}

@media (max-width: 768px) {
  .app-btn-aide-navbar {
    padding: 6px 8px;
  }
  .app-btn-aide-navbar .app-btn-aide-label {
    display: none;
  }
}

/* ========================================
   AIDE / CENTRE DE DOCUMENTATION
   Design inspiré des docs (Docusaurus/MkDocs)
   ======================================== */

.aide-wrapper {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 4px 2px 80px 2px;
  color: #1f2937;
  font-size: 15px;
  line-height: 1.65;
}

.aide-wrapper h1,
.aide-wrapper h2,
.aide-wrapper h3,
.aide-wrapper h4 {
  color: #0f172a;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.aide-wrapper p {
  color: #374151;
  margin-bottom: 14px;
}

/* ============== HEADER PRINCIPAL "CENTRE D'AIDE" ============== */
.aide-wrapper .aide-header-principal {
  background: linear-gradient(135deg, #eef4ff 0%, #e9f7ff 50%, #f3eaff 100%);
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 36px 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.aide-wrapper .aide-header-principal::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.14), transparent 70%);
  pointer-events: none;
}

.aide-wrapper .aide-header-principal h1 {
  font-size: 2rem;
  margin: 0 0 6px 0;
  color: #1e293b;
}

.aide-wrapper .aide-header-principal .aide-sous-titre {
  font-size: 1.02rem;
  color: #475569;
  margin: 0;
}

.aide-wrapper .aide-header-principal .aide-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.aide-wrapper .aide-badge-version {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #4338ca;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ============== FIL D'ARIANE ============== */
.aide-wrapper .aide-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  color: #64748b;
  margin-bottom: 16px;
}

.aide-wrapper .aide-breadcrumb a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
}

.aide-wrapper .aide-breadcrumb a:hover {
  color: #4338ca;
  text-decoration: underline;
}

.aide-wrapper .aide-breadcrumb .aide-sep {
  color: #94a3b8;
}

.aide-wrapper .aide-breadcrumb .aide-courant {
  color: #0f172a;
  font-weight: 600;
}

/* ============== SOMMAIRE ============== */
.aide-wrapper .aide-sommaire-section {
  margin-top: 24px;
}

.aide-wrapper .aide-sommaire-intro {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.aide-wrapper .aide-sommaire-titre {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.aide-wrapper .aide-sommaire-soustitre {
  color: #64748b;
  margin: 0;
  font-size: 0.95rem;
}

.aide-wrapper .aide-cartes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1100px) {
  .aide-wrapper .aide-cartes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .aide-wrapper .aide-cartes-grid { grid-template-columns: 1fr; }
  .aide-wrapper .aide-header-principal { padding: 26px 20px; }
  .aide-wrapper .aide-header-principal h1 { font-size: 1.5rem; }
}

.aide-wrapper .aide-carte-module {
  display: block;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #6366f1;
  border-radius: 12px;
  padding: 20px 20px 18px 18px;
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
  position: relative;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.aide-wrapper .aide-carte-module:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  border-left-color: #4f46e5;
  box-shadow: 0 8px 20px -10px rgba(79, 70, 229, 0.35);
  background: #fdfdff;
  text-decoration: none;
}

.aide-wrapper .aide-carte-module:hover .aide-carte-icone {
  background: #eef2ff;
  color: #4338ca;
}

.aide-wrapper .aide-carte-icone {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #4f46e5;
  border-radius: 10px;
  font-size: 1.3rem;
  margin-bottom: 12px;
  transition: all 0.18s ease;
}

.aide-wrapper .aide-carte-titre {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.aide-wrapper .aide-carte-fleche {
  color: #94a3b8;
  font-size: 0.95rem;
  transition: transform 0.15s ease, color 0.15s ease;
}

.aide-wrapper .aide-carte-module:hover .aide-carte-fleche {
  transform: translateX(3px);
  color: #4f46e5;
}

.aide-wrapper .aide-carte-description {
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
  min-height: 40px;
}

/* ============== PAGE MODULE (layout sidebar + main) ============== */
.aide-wrapper .aide-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: flex-start;
}

@media (max-width: 960px) {
  .aide-wrapper .aide-layout { grid-template-columns: 1fr; }
}

/* --- Sidebar --- */
.aide-wrapper .aide-sidebar {
  position: sticky;
  top: 80px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

@media (max-width: 960px) {
  .aide-wrapper .aide-sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }
}

.aide-wrapper .aide-sidebar-titre {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 2px 10px 10px 10px;
  margin: 0 0 8px 0;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.aide-wrapper .aide-sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aide-wrapper .aide-sidebar-nav .aide-nav-item {
  padding: 0;
  margin: 0;
}

.aide-wrapper .aide-sidebar-nav .aide-nav-lien {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.12s ease;
  border: 1px solid transparent;
}

.aide-wrapper .aide-sidebar-nav .aide-nav-lien:hover {
  background: #f8fafc;
  color: #1e293b;
  text-decoration: none;
}

.aide-wrapper .aide-sidebar-nav .aide-nav-lien.actif {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #c7d2fe;
  color: #3730a3;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #6366f1;
}

.aide-wrapper .aide-nav-icone {
  color: #6366f1;
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* --- Contenu principal --- */
.aide-wrapper .aide-contenu {
  min-width: 0;
}

.aide-wrapper .aide-article {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 34px 36px 36px 36px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

@media (max-width: 720px) {
  .aide-wrapper .aide-article { padding: 22px 18px; }
}

/* ============== EN-TETE ARTICLE MODULE ============== */
.aide-wrapper .aide-article-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid #f1f5f9;
}

.aide-wrapper .aide-article-icone {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  border: 1px solid #c7d2fe;
}

.aide-wrapper .aide-article-titre {
  font-size: 1.8rem;
  margin: 2px 0 4px 0;
  color: #0f172a;
  line-height: 1.2;
}

.aide-wrapper .aide-article-soustitre {
  color: #64748b;
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.aide-wrapper .aide-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.aide-wrapper .aide-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.aide-wrapper .aide-tag.tag-oui {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.aide-wrapper .aide-tag.tag-workflow {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

/* ============== TITRES DE SECTION ============== */
.aide-wrapper .aide-h2 {
  font-size: 1.3rem;
  margin: 32px 0 12px 0;
  padding-left: 14px;
  border-left: 4px solid #6366f1;
  color: #0f172a;
}

.aide-wrapper .aide-h2:first-child {
  margin-top: 4px;
}

.aide-wrapper .aide-h3 {
  font-size: 1.05rem;
  margin: 20px 0 8px 0;
  color: #1e293b;
}

.aide-wrapper .aide-paragraphe {
  color: #374151;
  margin: 0 0 12px 0;
  line-height: 1.7;
}

/* ============== ADMONITIONS / CALLOUTS ============== */
.aide-wrapper .aide-callout {
  border-radius: 10px;
  padding: 14px 16px 14px 16px;
  margin: 16px 0;
  border-left: 5px solid;
  background: #f8fafc;
  font-size: 0.94rem;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.aide-wrapper .aide-callout .aide-callout-icone {
  font-size: 1.1rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.aide-wrapper .aide-callout .aide-callout-corps {
  flex: 1 1 auto;
  min-width: 0;
}

.aide-wrapper .aide-callout .aide-callout-titre {
  font-weight: 700;
  margin: 0 0 4px 0;
  font-size: 0.9rem;
}

.aide-wrapper .aide-callout .aide-callout-texte {
  margin: 0;
  line-height: 1.6;
}

.aide-wrapper .aide-callout.info {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1e3a8a;
}
.aide-wrapper .aide-callout.info .aide-callout-icone { color: #2563eb; }

.aide-wrapper .aide-callout.tip {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #14532d;
}
.aide-wrapper .aide-callout.tip .aide-callout-icone { color: #16a34a; }

.aide-wrapper .aide-callout.warning {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #78350f;
}
.aide-wrapper .aide-callout.warning .aide-callout-icone { color: #d97706; }

.aide-wrapper .aide-callout.danger {
  background: #fef2f2;
  border-color: #ef4444;
  color: #7f1d1d;
}
.aide-wrapper .aide-callout.danger .aide-callout-icone { color: #dc2626; }

/* ============== LISTES NUMEROTEES (étapes workflow) ============== */
.aide-wrapper .aide-liste-etapes {
  list-style: none !important;
  padding: 0 !important;
  margin: 14px 0 18px 0 !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: etape-counter;
}

.aide-wrapper .aide-liste-etapes > li {
  position: relative;
  padding: 14px 16px 14px 56px;
  background: #fafbff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.aide-wrapper .aide-liste-etapes > li:hover {
  border-color: #c7d2fe;
  background: #fdfdff;
}

.aide-wrapper .aide-liste-etapes > li::before {
  counter-increment: etape-counter;
  content: counter(etape-counter);
  position: absolute;
  top: 14px;
  left: 14px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

.aide-wrapper .aide-liste-etapes .aide-etape-titre {
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
  font-size: 0.96rem;
}

.aide-wrapper .aide-liste-etapes .aide-etape-texte {
  margin: 0;
  color: #374151;
  font-size: 0.92rem;
  line-height: 1.6;
}

.aide-wrapper .aide-liste-etapes .aide-etape-texte strong,
.aide-wrapper .aide-etape-texte code {
  color: #0f172a;
  font-weight: 600;
}

/* ============== LISTE POINTS CLASSIQUE ============== */
.aide-wrapper .aide-liste-points {
  list-style: none !important;
  padding: 0 !important;
  margin: 12px 0 16px 0 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aide-wrapper .aide-liste-points > li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0;
  color: #374151;
  font-size: 0.94rem;
  line-height: 1.6;
}

.aide-wrapper .aide-liste-points .aide-puce {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #10b981;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 1px;
  flex-shrink: 0;
  border: 1px solid #a7f3d0;
}

/* ============== BOUTON RETOUR SOMMAIRE ============== */
.aide-wrapper .aide-bouton-retour-sommaire {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.aide-wrapper .aide-bouton-retour-sommaire:hover {
  background: #f8fafc;
  border-color: #9ca3af;
  color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px -4px rgba(15, 23, 42, 0.18);
}

/* ============== ONGLETS DE NAVIGATION MODULES (haut article) ============== */
.aide-wrapper .aide-module-onglets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
}

.aide-wrapper .aide-module-onglets .aide-module-onglet {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #d1d5db;
  color: #475569;
  background: #ffffff;
  transition: all 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.aide-wrapper .aide-module-onglets .aide-module-onglet:hover {
  background: #f8fafc;
  border-color: #9ca3af;
  color: #111827;
  text-decoration: none;
}

.aide-wrapper .aide-module-onglets .aide-module-onglet.actif {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 3px 8px -3px rgba(99, 102, 241, 0.55);
}

.aide-wrapper .aide-module-onglets .aide-module-onglet.aide-onglet-sommaire {
  background: #f8fafc;
  color: #111827;
  border-color: #cbd5e1;
}

.aide-wrapper .aide-module-onglets .aide-module-onglet.aide-onglet-sommaire:hover {
  background: #ffffff;
  color: #0f172a;
}
