/* ==========================================================================
   Centre d'aide (#aide) : recherche, catégories, articles
   Couleurs et formes : variables de tokens.css (le thème sombre s'applique tout seul).
   ========================================================================== */

.help { background: var(--bg); padding: 40px 0 72px; min-height: 60vh; }
.help[hidden] { display: none; }
.help-inner { max-width: 1040px; }

.help-head { text-align: center; margin: 8px auto 36px; max-width: 720px; }
.help-head--small { text-align: left; margin: 12px 0 24px; max-width: none; }
.help-title { font-size: clamp(1.8rem, 3.2vw, 2.5rem); line-height: 1.15; margin: 14px 0 10px; color: var(--text); letter-spacing: -0.02em; }
.help-lead { color: var(--text-muted); font-size: 1.05rem; line-height: 1.55; margin: 0 0 22px; }
.help-head--small .help-lead { margin-bottom: 0; }

/* Recherche */
.help-search { position: relative; text-align: left; }
.help-search-input { width: 100%; padding: 15px 18px; font-size: 1.02rem; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); }
.help-results { margin-top: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 8px 8px 12px; }
.help-results-count { margin: 8px 12px; font-size: 0.88rem; color: var(--text-soft); font-weight: 600; }

/* Catégories */
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.help-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 22px 18px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.help-card h2 { font-size: 1.1rem; margin: 0 0 6px; }
.help-card h2 a { color: var(--text); text-decoration: none; }
.help-card h2 a:hover { color: var(--navy); }
.help-card > p { margin: 0 0 12px; color: var(--text-muted); font-size: 0.93rem; line-height: 1.5; }
.help-card ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 7px; }
.help-card li a { color: var(--text-body); text-decoration: none; font-size: 0.93rem; line-height: 1.4; }
.help-card li a:hover, .help-card li a:focus-visible { color: var(--navy); text-decoration: underline; }
.help-more { margin-top: auto; font-weight: 700; font-size: 0.9rem; color: var(--navy); text-decoration: none; }
.help-more:hover { text-decoration: underline; }

/* Listes d'articles */
.help-popular, .help-related { margin-top: 40px; }
.help-popular h2, .help-related h2 { font-size: 1.15rem; margin: 0 0 12px; }
.help-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.help-popular .help-list, .help-related .help-list, .help-head + .help-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px; }
.help-row a { display: grid; gap: 3px; padding: 12px 14px; border-radius: var(--radius); text-decoration: none; color: inherit; }
.help-row a:hover, .help-row a:focus-visible { background: var(--tint); }
.help-row-title { font-weight: 700; color: var(--text); }
.help-row-summary { font-size: 0.9rem; color: var(--text-muted); line-height: 1.45; }
.help-row-category { font-size: 0.78rem; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.04em; }

/* Fil d'Ariane */
.help-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.88rem; color: var(--text-soft); margin-bottom: 8px; }
.help-crumbs a { color: var(--navy); text-decoration: none; font-weight: 600; }
.help-crumbs a:hover { text-decoration: underline; }

/* Article */
.help-article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow-soft); max-width: 820px; }
.help-article .help-title { margin-top: 0; }
.help-toc { background: var(--tint); border-radius: var(--radius-md); padding: 14px 18px; margin: 0 0 26px; font-size: 0.93rem; }
.help-toc strong { display: block; margin-bottom: 6px; color: var(--text); }
.help-toc ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.help-toc a { color: var(--navy); text-decoration: none; }
.help-toc a:hover { text-decoration: underline; }
.help-body { color: var(--text-body); line-height: 1.7; font-size: 1rem; }
.help-body h2 { font-size: 1.3rem; margin: 32px 0 10px; color: var(--text); scroll-margin-top: 90px; }
.help-body h3 { font-size: 1.05rem; margin: 22px 0 8px; color: var(--text); }
.help-body p { margin: 0 0 14px; }
.help-body ul, .help-body ol { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 6px; }
.help-body a { color: var(--navy); font-weight: 600; }
.help-body code { background: var(--tint); border-radius: 6px; padding: 1px 6px; font-size: 0.92em; }
.help-body hr { border: 0; border-top: 1px solid var(--border); margin: 26px 0; }
.help-note { margin: 18px 0; padding: 14px 18px; border-left: 4px solid var(--navy); background: var(--tint); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-body); }

/* Contact */
.help-contact { margin-top: 44px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; text-align: center; }
.help-contact h2 { margin: 0 0 6px; font-size: 1.15rem; }
.help-contact p { margin: 0 0 16px; color: var(--text-muted); }
.help-contact .btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; text-decoration: none; }
.help-results .help-contact { margin: 12px; box-shadow: none; }

@media (max-width: 900px) {
  .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .help { padding: 24px 0 56px; }
  .help-grid { grid-template-columns: 1fr; }
  .help-head { text-align: left; }
}
