/*
 * Centre d'aide Cluby : surcouche du lecteur de documentation (wajadto-docs.css) aux couleurs Cluby
 * (bleu #1f5bd6, comme le back-office et les emails) + accueil par profil, sommaire d'un guide, tableaux.
 */
.wjd.cl-help { --wjd-green: #1f5bd6; --wjd-green-soft: #e8efff; --wjd-accent: #e8336d; --wjd-ink: #0f1b2d; }
.cl-help .wjd-tag { background: #e8efff; color: #1f5bd6; }
.cl-help-kicker { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wjd-green); }
.cl-help-kicker i { margin-inline-end: 4px; }

/* Accueil : cartes de profil */
.cl-help-profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 18px; }
.cl-help-profile { display: flex; flex-direction: column; border: 1px solid var(--wjd-line); border-radius: 14px; padding: 18px; background: #fff; }
.cl-help-profile.is-mine { border-color: var(--wjd-green); box-shadow: 0 0 0 3px var(--wjd-green-soft); }
.cl-help-profile header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.cl-help-profile-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--wjd-green-soft); color: var(--wjd-green); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.cl-help-profile h2 { margin: 2px 0 0; font-size: 17px; font-weight: 700; }
.cl-help-profile h2 a { color: var(--wjd-ink); text-decoration: none; }
.cl-help-profile h2 a:hover { color: var(--wjd-green); }
.cl-help-profile p { margin: 0 0 8px; font-size: 14px; color: #475569; }
.cl-help-profile ul { margin: 0 0 12px; padding-inline-start: 18px; font-size: 14px; }
.cl-help-profile li { padding: 2px 0; }
.cl-help-profile ul a { color: var(--wjd-ink); }
.cl-help-profile ul a:hover { color: var(--wjd-green); }
.cl-help-open { margin-top: auto; font-weight: 600; font-size: 14px; color: var(--wjd-green); text-decoration: none; }
.cl-help-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--wjd-green); color: #fff; font-size: 11px; font-weight: 700; }

/* Sommaire d'un guide */
.cl-help-chapters { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.cl-help-chapters a { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--wjd-line); border-radius: 12px; text-decoration: none; color: var(--wjd-ink); }
.cl-help-chapters a:hover { border-color: var(--wjd-green); }
.cl-help-chapters strong { display: block; font-size: 15px; color: var(--wjd-ink); }
.cl-help-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--wjd-green); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* Chapitre */
.cl-help-steps-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 16px; padding: 10px 14px; background: var(--wjd-soft); border-radius: 10px; font-size: 13px; }
.cl-help-steps-toc span { color: var(--wjd-muted); font-weight: 600; }
.cl-help-steps-toc a { color: var(--wjd-green); text-decoration: none; }
.cl-help-section { margin-top: 18px; }
.cl-help-section h2 { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--wjd-ink); }
.cl-help-back { display: flex; flex-wrap: wrap; gap: 18px; margin: 16px 0 0; font-size: 14px; }
.cl-help-back a { color: var(--wjd-green); text-decoration: none; font-weight: 600; }
.cl-help .wjd-step, .cl-help .cl-help-section { scroll-margin-top: 80px; }
.cl-help .wjd-prose table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 14px; display: block; overflow-x: auto; }
.cl-help .wjd-prose th, .cl-help .wjd-prose td { border: 1px solid var(--wjd-line); padding: 6px 10px; text-align: start; vertical-align: top; }
.cl-help .wjd-prose th { background: var(--wjd-soft); font-weight: 700; }
.cl-help .wjd-prose pre { background: #0f1b2d; color: #e2e8f0; padding: 12px 14px; border-radius: 10px; overflow-x: auto; font-size: 13px; }
.cl-help .wjd-prose pre code { background: none; color: inherit; padding: 0; }
.cl-help .wjd-prose blockquote { margin: 0 0 10px; padding: 8px 14px; border-inline-start: 4px solid var(--wjd-green); background: var(--wjd-green-soft); border-radius: 0 10px 10px 0; }
.cl-help .wjd-prose blockquote p:last-child { margin: 0; }
@media (max-width: 600px) {
    .cl-help-profiles { grid-template-columns: minmax(0, 1fr); }
}

/*
 * Sommaire mobile : chevron dessiné en CSS (au lieu de faire pivoter le glyphe Font Awesome, dont le centre visuel ne
 * coïncide pas avec celui de sa boîte : pendant la rotation il se décalait et apparaissait tronqué, « ⌐ »). Même
 * comportement que le lecteur Wajadto : bouton, aria-expanded, ouverture / fermeture par wajadto-docs.js.
 */
@media (max-width: 991px) {
    .cl-help .wjd-toc-toggle .wjd-chevron {
        flex: none; display: block; width: 9px; height: 9px; margin-inline-start: auto; margin-inline-end: 4px;
        font-size: 0; line-height: 0; border: solid currentColor; border-width: 0 2px 2px 0;
        transform: translateY(-2px) rotate(45deg); transform-origin: 50% 50%; transition: transform .2s ease;
    }
    .cl-help .wjd-toc-toggle .wjd-chevron::before { content: none; }
    .cl-help .wjd-toc-toggle[aria-expanded="true"] .wjd-chevron { transform: translateY(2px) rotate(-135deg); }
    .cl-help .wjd-toc-toggle:focus:not(:focus-visible) { outline: none; }
    .cl-help .wjd-toc-toggle:focus-visible { outline: 3px solid #9cc0ff; outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) {
    .cl-help .wjd-toc-toggle .wjd-chevron { transition: none; }
}
