/* =========================================================================
   Module Aide & manuel : contenu des articles, tiroir contextuel, visites guidées,
   centre d'aide, impression. Variables du thème uniquement (clair / sombre).
   ========================================================================= */

/* ------------------------------------------------------------ Contenu d'un article */
.help-content { line-height: 1.68; font-size: .98rem; color: var(--text); overflow-wrap: anywhere; }
.help-content > :first-child { margin-top: 0; }
.help-content > :last-child { margin-bottom: 0; }
.help-content h2 { font-size: 1.24rem; font-weight: 780; font-stretch: 108%; margin: 1.9em 0 .55em; scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.help-content h3 { font-size: 1.05rem; font-weight: 750; margin: 1.5em 0 .45em; scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.help-content h4 { font-size: .98rem; font-weight: 750; margin: 1.2em 0 .4em; }
.help-content p, .help-content ul, .help-content ol, .help-content pre, .help-content .help-table-wrap { margin: 0 0 1em; }
.help-content ul { padding-left: 1.25em; }
.help-content li { margin-bottom: .35em; }
.help-content li > ul { margin: .35em 0 0; }
.help-content a { color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.help-content a.help-route-link { display: inline-flex; align-items: center; gap: .25rem; }
.help-content strong, .help-content b { font-weight: 720; }
.help-content mark { background: var(--warning-soft); color: inherit; padding: 0 .15em; border-radius: 3px; }
.help-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--bg-sunken); border: 1px solid var(--line); border-radius: 5px; padding: .05em .35em; }
.help-content pre { background: var(--bg-sunken); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .8rem 1rem; overflow-x: auto; }
.help-content pre code { border: 0; padding: 0; background: none; }
.help-content kbd { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .4em; font: 650 .8em/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); background: var(--bg-elev); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; vertical-align: .05em; }
.help-content hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.help-content blockquote { margin: 1.2em 0; padding: .2em 0 .2em 1em; border-left: 3px solid var(--brand); color: var(--text-2); }

/* Étapes numérotées */
.help-content ol { list-style: none; padding: 0; counter-reset: help-step; }
.help-content ol > li { counter-increment: help-step; position: relative; padding: .1rem 0 .1rem 2.6rem; min-height: 1.9rem; margin-bottom: .75em; }
.help-content ol > li::before {
  content: counter(help-step); position: absolute; left: 0; top: .02rem;
  display: grid; place-items: center; width: 1.85rem; height: 1.85rem; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-ink); border: 1px solid var(--brand-line);
  font-weight: 800; font-size: .86rem; line-height: 1; font-variant-numeric: tabular-nums;
}
.help-content ol > li > ul { margin-top: .4em; }

/* Encadrés : astuce, attention, à savoir, important */
.help-callout { --c-fg: var(--info); --c-bg: var(--info-soft); margin: 1.15em 0; padding: .85rem 1rem .9rem; border-radius: var(--r); background: var(--c-bg); border: 1px solid color-mix(in srgb, var(--c-fg) 22%, transparent); }
.help-callout.is-tip { --c-fg: var(--brand-ink); --c-bg: var(--brand-soft); }
.help-callout.is-warning { --c-fg: var(--warning); --c-bg: var(--warning-soft); }
.help-callout.is-danger { --c-fg: var(--danger); --c-bg: var(--danger-soft); }
.help-callout-head { display: flex; align-items: center; gap: .5rem; font-weight: 780; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-fg); margin-bottom: .35rem; }
.help-callout-icon { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: color-mix(in srgb, var(--c-fg) 16%, transparent); font-size: 1rem; line-height: 1; }
.help-callout-icon > .ph, .help-callout-icon > .ph-fill { font-size: 1em; vertical-align: 0; }
.help-callout-body > :last-child { margin-bottom: 0; }
.help-callout-body p { margin-bottom: .5em; }
/* sans en-tête (éditeur) */
.help-callout:not(:has(.help-callout-head))::before { display: block; font-weight: 780; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-fg); margin-bottom: .3rem; content: "À savoir"; }
.help-callout.is-tip:not(:has(.help-callout-head))::before { content: "Astuce"; }
.help-callout.is-warning:not(:has(.help-callout-head))::before { content: "Attention"; }
.help-callout.is-danger:not(:has(.help-callout-head))::before { content: "Important"; }
html[lang="en"] .help-callout:not(:has(.help-callout-head))::before { content: "Good to know"; }
html[lang="en"] .help-callout.is-tip:not(:has(.help-callout-head))::before { content: "Tip"; }
html[lang="en"] .help-callout.is-warning:not(:has(.help-callout-head))::before { content: "Warning"; }
html[lang="en"] .help-callout.is-danger:not(:has(.help-callout-head))::before { content: "Important"; }

/* Captures d'écran */
.help-shot { margin: 1.25em auto 1.4em; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: .5rem; cursor: zoom-in; outline: none; }
.help-shot img { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow-2); background: var(--bg-sunken); }
.help-shot.is-mobile { max-width: 300px; }
.help-shot.is-mobile img { border-radius: 22px; border: 6px solid var(--bg-inverse); box-shadow: var(--shadow-2); }
.help-shot figcaption { font-size: .8rem; color: var(--text-3); text-align: center; line-height: 1.4; max-width: 60ch; }
.help-shot:focus-visible img { box-shadow: var(--ring); }
.help-content.is-compact .help-shot.is-mobile { max-width: 240px; }

/* Tableaux */
.help-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.help-content table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.help-content th, .help-content td { padding: .55rem .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.help-content th { background: var(--bg-sunken); font-weight: 700; color: var(--text-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.help-content tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------------------ Bouton « ? » et tiroir contextuel */
.help-trigger .ph { font-size: 1.3rem; }
.help-drawer-head { gap: .7rem; align-items: center; }
.help-drawer-head .icon-box { flex-shrink: 0; }
.help-drawer-titles { flex: 1; min-width: 0; }
.help-drawer-kicker { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); line-height: 1.2; }
.help-drawer-head .modal-title { font-size: 1.05rem; line-height: 1.25; margin: .1rem 0 0; overflow-wrap: anywhere; }
.help-drawer-body { display: flex; flex-direction: column; gap: 1rem; }
.help-drawer-summary { margin: 0; color: var(--text-2); font-size: .95rem; line-height: 1.55; }
.help-drawer-note { padding: .6rem .8rem; }
.help-drawer-note > .ph { font-size: 1.1rem; margin-top: .1rem; }
.help-drawer-foot { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.help-drawer-foot .btn:first-child { margin-right: auto; }

.help-tour-cta { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .7rem .85rem; border-radius: var(--r); border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--text); font: inherit; text-align: left; cursor: pointer; min-height: var(--tap); }
.help-tour-cta:hover { border-color: var(--brand); }
.help-tour-cta .grow { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.help-tour-cta > .ph { font-size: 1.5rem; color: var(--brand-ink); }

.help-feedback { padding: .9rem 1rem; border-radius: var(--r); background: var(--bg-sunken); border: 1px solid var(--line); }
.help-feedback-q { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .92rem; }
.help-feedback-q > .ph, .help-feedback-q > .ph-fill { font-size: 1.2rem; color: var(--text-3); }
.help-feedback-q.is-done > .ph-fill { color: var(--brand-ink); }

.help-related { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.help-related-title { padding: .6rem 1rem; font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); background: var(--bg-sunken); border-bottom: 1px solid var(--line); }
.help-related-row { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); font: inherit; font-size: .92rem; font-weight: 600; text-align: left; cursor: pointer; min-height: var(--tap); }
.help-related-row > .ph:first-child { color: var(--text-3); font-size: 1.1rem; }

/* ------------------------------------------------------------ Visite guidée */
.help-tour { position: fixed; inset: 0; z-index: 420; pointer-events: none; }
.help-tour-veil { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); pointer-events: auto; }
.help-tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .55), 0 0 0 3px var(--brand); transition: top .28s var(--ease), left .28s var(--ease), width .28s var(--ease), height .28s var(--ease); pointer-events: none; }
.help-tour-pop {
  position: fixed; pointer-events: auto; width: min(380px, calc(100vw - 24px)); padding: 1rem 1.1rem .9rem;
  background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  transition: top .28s var(--ease), left .28s var(--ease); outline: none;
}
.help-tour-pop.is-sheet, .help-tour-pop.is-sheet-top { left: 12px !important; right: 12px; width: auto; }
.help-tour-pop.is-sheet { bottom: calc(12px + var(--safe-bottom)); top: auto !important; }
.help-tour-pop.is-sheet-top { top: calc(12px + var(--safe-top)) !important; bottom: auto; }
.help-tour-head { display: flex; align-items: center; gap: .55rem; margin: -.25rem -.4rem .35rem 0; }
.help-tour-count { display: inline-grid; place-items: center; height: 1.5rem; padding: 0 .55rem; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-ink); font-size: .74rem; font-weight: 800; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.help-tour-name { flex: 1; min-width: 0; font-size: .74rem; font-weight: 650; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.help-tour-title { font-size: 1.06rem; font-weight: 780; margin: 0 0 .3rem; line-height: 1.25; }
.help-tour-text { margin: 0; color: var(--text-2); font-size: .93rem; line-height: 1.55; }
.help-tour-dots { display: flex; gap: .3rem; margin: .8rem 0 .7rem; }
.help-tour-dots span { width: .45rem; height: .45rem; border-radius: 50%; background: var(--line-strong); transition: width .2s, background .2s; }
.help-tour-dots span.is-done { background: var(--brand-line); }
.help-tour-dots span.is-on { width: 1.2rem; border-radius: var(--r-pill); background: var(--brand); }
.help-tour-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.help-tour-actions .grow { flex: 1; }
html.help-touring .tabbar, html.help-touring .fab { z-index: auto; }
@media (prefers-reduced-motion: reduce) { .help-tour-spot, .help-tour-pop { transition: none; } }

/* ------------------------------------------------------------ Centre d'aide */
.help-center { display: flex; flex-direction: column; gap: 1.25rem; }
.help-hero {
  position: relative; border-radius: var(--r-xl, 20px); padding: clamp(1.25rem, 1rem + 2vw, 2.4rem); overflow: visible;
  background: var(--surface-inverse); color: var(--on-surface-inverse); box-shadow: var(--shadow-2);
  background-image: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand) 30%, transparent) 0%, transparent 55%);
}
.help-hero-kicker { display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-bright, var(--brand)); }
.help-hero h1 { font-size: clamp(1.45rem, 1.15rem + 1.4vw, 2.2rem); font-weight: 820; font-stretch: 112%; letter-spacing: -0.02em; margin: .35rem 0 .3rem; color: inherit; }
.help-hero p { margin: 0 0 1.1rem; opacity: .82; max-width: 60ch; }
.help-search { position: relative; max-width: 760px; }
.help-search-box { display: flex; align-items: center; gap: .6rem; background: var(--bg-elev); color: var(--text); border-radius: var(--r-lg); padding: 0 .55rem 0 1rem; min-height: 3.3rem; box-shadow: var(--shadow-2); border: 1px solid var(--line); }
.help-search-box:focus-within { box-shadow: var(--ring), var(--shadow-2); }
.help-search-box > .ph { font-size: 1.3rem; color: var(--text-3); }
.help-search-box input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; padding: .7rem 0; outline: none; }
.help-search-box input:focus, .help-search-box input:focus-visible { outline: none; box-shadow: none; }
.help-search-box input::-webkit-search-cancel-button { display: none; }
.help-search-box kbd { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; font: 650 .78rem/1 ui-monospace, monospace; color: var(--text-3); border: 1px solid var(--line-strong); border-radius: 5px; }
.help-hero-chips { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.help-hero-chips .chip { background: color-mix(in srgb, var(--on-surface-inverse) 10%, transparent); color: inherit; border-color: color-mix(in srgb, var(--on-surface-inverse) 18%, transparent); min-height: 2.2rem; text-decoration: none; }
.help-hero-chips .chip .ph { color: inherit; opacity: .8; }
.help-hero-chips .chip:hover { background: color-mix(in srgb, var(--on-surface-inverse) 18%, transparent); }

.help-results { margin-top: .6rem; max-height: min(60vh, 520px); overflow-y: auto; background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.help-results-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem 1rem; font-size: .76rem; font-weight: 700; color: var(--text-3); border-bottom: 1px solid var(--line); background: var(--bg-sunken); position: sticky; top: 0; z-index: 1; }
.help-result { display: flex; align-items: flex-start; gap: .8rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none !important; }
.help-result:last-child { border-bottom: 0; }
.help-result:hover, .help-result.is-active { background: var(--bg-hover); }
.help-result .icon-box { margin-top: .1rem; }
.help-result-title, .help-result-meta, .help-result-text { display: block; }
.help-result-title { font-weight: 700; line-height: 1.3; }
.help-result-meta { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: .1rem; }
.help-result-text { font-size: .85rem; color: var(--text-2); line-height: 1.45; margin-top: .15rem; }
.help-result mark { background: var(--warning-soft); color: inherit; border-radius: 3px; padding: 0 .1em; }
.help-results-empty { padding: 1.5rem 1rem; text-align: center; color: var(--text-2); }

.help-profiles { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.help-profile-chip { display: inline-flex; align-items: center; gap: .45rem; min-height: var(--tap); padding: 0 .95rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--bg-elev); color: var(--text-2); font-weight: 650; font-size: .88rem; text-decoration: none !important; }
.help-profile-chip .ph { font-size: 1.1rem; color: var(--text-3); }
.help-profile-chip.is-active { background: var(--bg-inverse); color: var(--text-inverse); border-color: var(--bg-inverse); }
.help-profile-chip.is-active .ph { color: inherit; }
.help-profile-chip .badge { font-size: .66rem; padding: .05rem .4rem; }

.help-intro { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.help-intro .grow { min-width: 220px; }
.help-intro-title { font-weight: 780; font-size: 1.05rem; }
.help-intro-text { color: var(--text-2); font-size: .9rem; }

.help-chapters { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); align-items: start; }
.help-chapter .panel-header { padding: .85rem 1.1rem; }
.help-chapter .panel-title { font-size: .98rem; }
.help-chapter-num { font-size: .72rem; font-weight: 800; color: var(--text-3); font-variant-numeric: tabular-nums; }
.help-row { display: flex; align-items: center; gap: .8rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none !important; min-height: var(--tap); }
.help-row:last-child { border-bottom: 0; }
.help-row:hover { background: var(--bg-hover); }
.help-row-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--r-sm); background: var(--bg-sunken); color: var(--text-2); font-size: 1.05rem; line-height: 1; flex-shrink: 0; }
.help-row-text { flex: 1; min-width: 0; }
.help-row-title { font-weight: 680; line-height: 1.3; }
.help-row-sub { font-size: .8rem; color: var(--text-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.help-row > .chev { color: var(--text-3); font-size: 1rem; flex-shrink: 0; }

.help-modules { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.help-module-card { display: flex; flex-direction: column; }
.help-module-card .panel-header { gap: .75rem; justify-content: flex-start; flex-wrap: nowrap; padding: 1rem 1.1rem; }
.help-module-card .panel-header .grow { min-width: 0; }
.help-module-desc { font-size: .8rem; color: var(--text-2); line-height: 1.4; margin-top: .1rem; }

.help-faq { display: flex; flex-direction: column; gap: .6rem; }
.help-faq details { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.help-faq details[open] { box-shadow: var(--shadow-1); }
.help-faq summary { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; cursor: pointer; font-weight: 700; list-style: none; min-height: var(--tap); }
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq summary .icon-box { width: 2rem; height: 2rem; font-size: 1rem; }
.help-faq summary .grow { flex: 1; min-width: 0; line-height: 1.35; }
.help-faq summary > .ph:last-child { color: var(--text-3); transition: transform .2s var(--ease); }
.help-faq details[open] summary > .ph:last-child { transform: rotate(180deg); }
.help-faq-body { padding: 0 1rem 1rem 3.75rem; }
.help-faq-tools { display: flex; justify-content: flex-end; gap: .3rem; margin-top: .4rem; }

.help-filter { display: flex; align-items: center; gap: .5rem; max-width: 420px; }
.help-letters { display: flex; flex-wrap: wrap; gap: .3rem; }
.help-letters a { display: inline-grid; place-items: center; min-width: 2.2rem; height: 2.2rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-elev); font-weight: 750; color: var(--text-2); text-decoration: none !important; }
.help-letters a:hover { border-color: var(--brand); color: var(--text); }
.help-glossary { display: flex; flex-direction: column; gap: 1.2rem; }
.help-glossary-letter { font-size: 1.4rem; font-weight: 820; color: var(--brand-ink); margin: 0 0 .5rem; scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.help-glossary-list { display: grid; gap: .6rem; }
.help-term { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-elev); scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.help-term-name { font-weight: 780; display: flex; align-items: center; gap: .5rem; }
.help-term-name a { color: var(--text-3); margin-left: auto; text-decoration: none; }
.help-term .help-content { font-size: .93rem; margin-top: .25rem; }
.help-term:target { border-color: var(--brand); box-shadow: var(--ring); }

.help-tours { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.help-tour-card { display: flex; flex-direction: column; gap: .6rem; padding: 1.1rem; }
.help-tour-card .row { gap: .75rem; align-items: center; }
.help-tour-card-title { font-weight: 750; line-height: 1.3; }
.help-tour-card-text { color: var(--text-2); font-size: .88rem; flex: 1; }

.help-contact { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.2rem; }
.help-contact .grow { min-width: 220px; }

/* ------------------------------------------------------------ Page article */
.help-article-layout { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1180px) { .help-article-layout { grid-template-columns: minmax(0, 1fr) 290px; } }
.help-article { padding: clamp(1.1rem, .8rem + 1.6vw, 2.2rem); }
.help-article-head { margin-bottom: 1.4rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.help-article-kicker { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: .6rem; }
.help-article-title { font-size: clamp(1.45rem, 1.2rem + 1.1vw, 2.05rem); font-weight: 820; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.help-article-summary { color: var(--text-2); font-size: 1.04rem; margin: .55rem 0 0; line-height: 1.55; max-width: 70ch; }
.help-article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .9rem; font-size: .8rem; color: var(--text-3); }
.help-article-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.help-article .help-content { max-width: 78ch; }
.help-article-foot { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.help-pager { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.help-pager a { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--r); color: inherit; text-decoration: none !important; min-height: var(--tap); }
.help-pager a:hover { border-color: var(--brand); background: var(--bg-hover); }
.help-pager a.is-next { justify-content: flex-end; text-align: right; }
.help-pager small { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.help-pager b { display: block; line-height: 1.3; }
.help-pager .ph { font-size: 1.2rem; color: var(--text-3); }
.help-aside { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 1180px) { .help-aside { position: sticky; top: calc(var(--sticky-top, 0px) + 1rem); max-height: calc(var(--app-h, 100dvh) - 2rem); overflow-y: auto; } }
.help-toc { padding: .9rem 1rem; }
.help-toc-title { font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: .45rem; display: flex; align-items: center; gap: .4rem; }
.help-toc a { display: block; padding: .32rem .55rem; border-radius: var(--r-xs); color: var(--text-2); font-size: .88rem; line-height: 1.35; text-decoration: none !important; border-left: 2px solid transparent; }
.help-toc a:hover { background: var(--bg-hover); color: var(--text); }
.help-toc a.is-h3 { padding-left: 1.2rem; font-size: .83rem; }
.help-toc details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: var(--tap); }
.help-toc details > summary::-webkit-details-marker { display: none; }

.help-hidden-flag { border: 1px dashed var(--warning); }

/* ------------------------------------------------------------ Mobile */
@media (max-width: 640px) {
  .help-content { font-size: 1rem; }
  .help-content ol > li { padding-left: 2.4rem; }
  .help-faq-body { padding: 0 1rem 1rem; }
  .help-hero { border-radius: var(--r-lg); }
  .help-search-box { min-height: 3.1rem; }
  .help-search-box kbd { display: none; }
  .help-chapters { grid-template-columns: minmax(0, 1fr); }
  .help-drawer-foot .btn { flex: 1 1 auto; justify-content: center; }
  .help-drawer-foot .btn:first-child { margin-right: 0; }
}

/* ------------------------------------------------------------ Impression (manuel complet) */
.help-print-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .7rem 1rem; background: var(--glass, var(--bg)); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.help-print-bar .grow { flex: 1; min-width: 160px; font-weight: 700; }
.help-print { max-width: 860px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; background: var(--bg); }
.help-print-cover { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; gap: .8rem; padding: 2rem 0; border-bottom: 3px solid var(--brand); margin-bottom: 2rem; }
.help-print-cover h1 { font-size: 2.4rem; font-weight: 820; font-stretch: 112%; margin: 0; letter-spacing: -0.02em; }
.help-print-cover .subtle { font-size: 1.05rem; }
.help-print-toc ol { list-style: none; padding: 0; margin: 0; columns: 2 260px; column-gap: 2rem; }
.help-print-toc li { break-inside: avoid; margin-bottom: .2rem; font-size: .92rem; }
.help-print-toc li.is-chapter { font-weight: 800; margin-top: .7rem; }
.help-print-toc a { color: inherit; text-decoration: none; }
.help-print-chapter { margin-top: 2.5rem; }
.help-print-chapter > h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.6rem; font-weight: 820; padding-bottom: .5rem; border-bottom: 2px solid var(--line); }
.help-print-article { margin-top: 1.8rem; }
.help-print-article > h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: .3rem; }
.help-print-article .help-content h2 { font-size: 1.12rem; }
.help-print-article .help-content h3 { font-size: 1rem; }
.help-print-glossary dt { font-weight: 780; margin-top: .7rem; }
.help-print-glossary dd { margin: .15rem 0 0; }

@media print {
  .help-print-bar, .help-trigger, [data-help-menu], .help-feedback, .help-aside, .help-pager, .help-tour, .help-drawer-backdrop { display: none !important; }
  .help-print { max-width: none; padding: 0; }
  .help-print-cover { min-height: 90vh; break-after: page; border-bottom: 0; }
  .help-print-toc { break-after: page; }
  .help-print-chapter { break-before: page; margin-top: 0; }
  .help-print-article { break-inside: auto; }
  .help-print-article > h3, .help-content h2, .help-content h3 { break-after: avoid; }
  .help-shot, .help-callout, .help-content ol > li { break-inside: avoid; }
  .help-shot { cursor: default; }
  .help-shot img { box-shadow: none; max-height: 120mm; width: auto; max-width: 100%; }
  .help-shot.is-mobile { max-width: 62mm; }
  .help-shot.is-mobile img { border-width: 3px; }
  .help-content a { color: inherit; text-decoration: none; }
  .help-article { border: 0; box-shadow: none; padding: 0; }
}

/* ------------------------------------------------------------ Administration de l'aide */
.help-subnav { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; margin: -.25rem 0 1.1rem; padding-bottom: 2px; }
.help-subnav::-webkit-scrollbar { display: none; }
.help-subnav a { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--bg-elev); color: var(--text-2); font-size: .86rem; font-weight: 650; white-space: nowrap; text-decoration: none; min-height: 40px; }
.help-subnav a .ph { font-size: 1.05rem; }
.help-subnav a:hover { border-color: var(--line-strong); color: var(--text); }
.help-subnav a.is-active { background: var(--bg-inverse); color: var(--text-inverse); border-color: var(--bg-inverse); }
.help-admin-title { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.help-admin-title .cell-strong { overflow: hidden; text-overflow: ellipsis; }
.help-flags { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.help-order-list { list-style: none; margin: 0; padding: 0; }
.help-order-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .9rem; border-bottom: 1px solid var(--line); background: var(--bg-elev); min-height: var(--tap); }
.help-order-item:last-child { border-bottom: 0; }
.help-order-handle { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--r-sm); color: var(--text-3); cursor: grab; flex-shrink: 0; border: 0; background: transparent; }
.help-order-handle:hover { background: var(--bg-hover); color: var(--text); }
.help-order-item.sortable-ghost { opacity: .45; }
.help-order-item.is-hidden .help-order-name { color: var(--text-3); text-decoration: line-through; }
.help-order-name { flex: 1; min-width: 0; font-weight: 620; }
.help-editor .rte-area { min-height: 380px; max-height: 70vh; }
.help-editor .rte-area.help-content { font-size: .95rem; }
.help-editor .help-shot img { max-height: 260px; width: auto; }
.help-editor .help-shot { cursor: default; }
.help-editor .rte-bar .btn.is-text { width: auto; padding: 0 .45rem; font-size: .76rem; font-weight: 700; gap: .25rem; }
.help-editor textarea.help-source { width: 100%; min-height: 380px; font: .85rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border: 0; padding: .85rem 1rem; background: var(--bg-elev); color: var(--text); resize: vertical; }
.help-media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.help-media-card { display: flex; flex-direction: column; overflow: hidden; }
.help-media-thumb { display: grid; place-items: center; height: 170px; background: var(--bg-sunken); border-bottom: 1px solid var(--line); overflow: hidden; cursor: zoom-in; }
.help-media-thumb img { max-width: 100%; max-height: 170px; object-fit: contain; }
.help-media-body { padding: .8rem 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.help-media-key { font: 650 .82rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.help-picker { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-height: 60vh; overflow-y: auto; }
.help-picker button { display: flex; flex-direction: column; gap: .3rem; padding: .4rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-elev); cursor: pointer; text-align: left; font: inherit; font-size: .74rem; color: var(--text-2); }
.help-picker button:hover, .help-picker button:focus-visible { border-color: var(--brand); }
.help-picker img { width: 100%; height: 92px; object-fit: cover; object-position: top; border-radius: 6px; background: var(--bg-sunken); }
.help-bar { display: flex; align-items: center; gap: .5rem; }
.help-bar-track { flex: 1; height: .5rem; border-radius: var(--r-pill); background: var(--danger-soft); overflow: hidden; min-width: 60px; }
.help-bar-fill { height: 100%; background: var(--brand); border-radius: var(--r-pill); }
.help-comment { padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.help-comment:last-child { border-bottom: 0; }
.help-check-grid { display: grid; gap: .4rem .9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.help-revision { display: flex; gap: .8rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); align-items: flex-start; flex-wrap: wrap; }
.help-revision:last-child { border-bottom: 0; }
.help-revision .grow { min-width: 220px; }

/* Invitation à la visite guidée (agent 10C) : carte discrète, non modale, jamais bloquante */
.help-invite { position: fixed; left: 1.25rem; right: auto; bottom: 1.25rem; /* QA v2 : à gauche, jamais sur les boutons d'action (en bas à droite) */ z-index: 380; display: flex; align-items: center; gap: .75rem; max-width: min(440px, calc(100vw - 2rem)); padding: .7rem .7rem .7rem .85rem; background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-panel, 14px); box-shadow: var(--shadow-3, 0 12px 32px rgba(0, 0, 0, .18)); }
.help-invite-ico { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex-shrink: 0; border-radius: 50%; background: var(--brand-soft, var(--bg-sunken)); color: var(--brand); font-size: 1.15rem; line-height: 1; }
.help-invite-txt { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.help-invite-txt b { font-size: .9rem; }
.help-invite-txt .xsmall { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.help-invite-actions { display: flex; align-items: center; gap: .35rem; flex-shrink: 0; }
.help-invite-close { display: none; }
@media (max-width: 767.98px) {
  .help-invite { left: .75rem; right: .75rem; max-width: none; bottom: calc(.75rem + var(--safe-bottom, 0px)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .35rem .7rem; }
  body:has(.has-tabbar) .help-invite { bottom: calc(var(--tabbar-h, 60px) + var(--safe-bottom, 0px) + .6rem); }
  /* Téléphone : sous la barre du haut plutôt qu'au-dessus des barres d'actions collantes des formulaires */
  .help-invite, body:has(.has-tabbar) .help-invite { top: calc(var(--topbar-h, 56px) + env(safe-area-inset-top, 0px) + .5rem); bottom: auto; }
  .help-invite-close { display: grid; place-items: center; align-self: start; grid-column: 3; grid-row: 1; }
  .help-invite-ico { grid-row: 1; } .help-invite-txt { grid-row: 1; }
  .help-invite-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .help-invite-actions .btn-ghost { display: none; }
}
@media print { .help-invite { display: none !important; } }
