/*
  L'aide publique (server/helpPages.ts), sortie de home.css le 3 décembre 2026. Chargée après home.css et chrome.css,
  sur l'index (/aide), le glossaire (/aide/glossaire), chaque sujet (/aide/<sujet>).
  - L'index : une recherche, trois portes « par où commencer », les neuf rubriques (repliées au téléphone), le glossaire
    sur sa page. La recherche (help.js) filtre ce que la page montre déjà : sans script, tout reste affiché.
  - Un sujet : le texte sur une colonne lisible, une vraie capture pour les sujets les plus lus, « À lire aussi » à côté,
    la même rubrique sous l'article.
  Casse normale partout, pas de capitales dorées. Les seuls mouvements : la flèche des liens, la bordure des portes.
*/

/* L'en-tête de l'aide et de la vitrine : pas l'écran entier de l'accueil, les sujets se voient tout de suite. */
.hero.help-hero { display: block; min-height: 0; padding-block: clamp(2rem, 5vw, 3.5rem) 0; }
.help-hero .intro { gap: 1rem; }

/* La recherche : un seul champ, large, avec sa loupe. Cachée sans script (elle ne ferait rien). */
.help-search { position: relative; width: min(100%, 36rem); margin-top: .5rem; }
.help-search .ico { position: absolute; left: .95rem; top: 50%; width: 1.15rem; height: 1.15rem; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.help-search input { width: 100%; min-height: 3.1rem; padding: 0 1rem 0 2.8rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t3); box-shadow: var(--shadow-1); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.help-search input::placeholder { color: var(--ink-3); }
.help-search input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.help-search input::-webkit-search-cancel-button { cursor: pointer; }
html.theme-dark .help-search input { background: var(--surface); }
.help-status { min-height: 1.4rem; margin-top: .6rem; color: var(--ink-3); font-size: var(--t2); }
.help-status:empty { display: none; }

/* Par où commencer : trois portes, posées sur la page. */
.help-start-band { padding-block: clamp(1.75rem, 3.5vw, 2.5rem) 0; }
.help-start { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.help-start a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .35rem .85rem; height: 100%; min-height: 4.5rem; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1); transition: border-color .2s var(--ease); }
.help-start a:hover { border-color: var(--line-strong); }
.help-start a > .ico:first-child { width: 1.35rem; height: 1.35rem; color: var(--accent-ink); }
.help-start b { display: block; font-weight: 650; font-size: var(--t3); line-height: 1.3; }
.help-start small { display: block; color: var(--ink-3); font-size: var(--t2); line-height: 1.35; }
.help-start a > .ico:last-child { width: 1em; height: 1em; color: var(--ink-3); transition: transform .25s var(--ease), color .25s; }
.help-start a:hover > .ico:last-child { transform: translateX(3px); color: var(--accent); }

/* Les rubriques : un titre en casse normale, ses sujets en liste. Au téléphone, des volets (help.js les replie). */
.help-index-band { padding-block: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 4.5rem); }
.help-index { columns: 3 19rem; column-gap: clamp(1.5rem, 3vw, 2.5rem); }
.help-section { break-inside: avoid; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); scroll-margin-top: 5.5rem; }
.help-section > summary { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; list-style: none; cursor: default; }
.help-section > summary::-webkit-details-marker { display: none; }
.help-section h2 { font-size: var(--t3); font-weight: 650; line-height: 1.3; letter-spacing: 0; color: var(--ink); }
.help-section summary small { color: var(--ink-3); font-size: var(--t1); font-variant-numeric: tabular-nums; }
.help-section summary .ico { display: none; }
@media (min-width: 40.01rem) { .help-section > summary { pointer-events: none; } }
@media (max-width: 40rem) {
  .help-index { border-top: 1px solid var(--line); }
  .help-section { margin: 0; border-bottom: 1px solid var(--line); }
  .help-section > summary { align-items: center; min-height: 3.25rem; margin: 0; cursor: pointer; }
  .help-section > summary > span { display: flex; align-items: center; gap: .6rem; color: var(--ink-3); }
  .help-section summary .ico { display: block; width: 1rem; height: 1rem; transition: transform .25s var(--ease); }
  .help-section[open] summary .ico { transform: rotate(90deg); }
  .help-section .help-links { margin-bottom: 1rem; }
}

.help-links { display: grid; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.help-links li { border-bottom: 1px solid var(--line); }
.help-links a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 2.75rem; padding-block: .45rem; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.help-links a:hover { color: var(--accent-ink); }
.help-links .ico { flex: none; width: 1em; height: 1em; color: var(--ink-3); transition: transform .25s var(--ease), color .25s; }
.help-links a:hover .ico { transform: translateX(3px); color: var(--accent); }
.help-links a small { margin-left: auto; color: var(--ink-3); font-size: var(--t1); }

/* Les mots du glossaire qui répondent à la recherche, au-dessus des rubriques. */
.help-term-hits { margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.help-term-hits h2 { margin-bottom: .5rem; font-size: var(--t3); font-weight: 650; letter-spacing: 0; }
.help-term-hits .help-links a { display: grid; gap: .1rem; padding-block: .6rem; }
.help-term-hits .help-links span { color: var(--ink-2); font-size: var(--t2); line-height: 1.45; }

/* Pendant une recherche : seuls les sujets et les mots qui répondent, et leurs rubriques. */
.help-searching .help-start-band { display: none; }
[data-q][hidden], .help-section[hidden] { display: none; }

/* Le glossaire, en bas de l'index : une porte vers sa page. */
.help-glossary-door { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.help-glossary-door a { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; color: var(--ink); text-decoration: none; }
.help-glossary-door h2 { font-size: var(--t4); letter-spacing: -.01em; }
.help-glossary-door p { color: var(--ink-2); }
.help-glossary-door small { color: var(--ink-3); font-size: var(--t2); }
.help-glossary-door .ico { align-self: center; width: 1.1em; height: 1.1em; color: var(--ink-3); transition: transform .25s var(--ease), color .25s; }
.help-glossary-door a:hover .ico { transform: translateX(3px); color: var(--accent); }
.help-glossary-door a:hover h2 { color: var(--accent-ink); }

/* La page du glossaire. */
.help-glossary-band { padding-block: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem); }
.help-glossary { columns: 3 20rem; column-gap: clamp(1.5rem, 3vw, 2.5rem); }
.help-terms { margin-bottom: 2.25rem; }
.help-terms h2 { margin-bottom: .6rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line-strong); font-size: var(--t2); font-weight: 650; letter-spacing: 0; color: var(--ink-3); break-after: avoid; }
.help-terms dl { margin: 0; }
.help-terms dl > div { break-inside: avoid; scroll-margin-top: 5.5rem; padding-block: .8rem; border-bottom: 1px solid var(--line); }
.help-terms dl > div:target { border-bottom-color: var(--accent); }
.help-terms dt { font-weight: 700; color: var(--ink); }
.help-terms dt small { color: var(--ink-3); font-weight: 500; }
.help-terms dd { margin: .25rem 0 0; color: var(--ink-2); line-height: 1.55; }
.help-terms dd a { font-weight: 600; white-space: nowrap; }

/* Un sujet : l'article, « À lire aussi » à côté, la même rubrique dessous. */
.help { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 17rem); gap: 1.5rem clamp(2rem, 5vw, 4.5rem); align-items: start; padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem); }
.help-crumbs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: var(--ink-3); font-size: .9rem; }
.help-crumbs a { color: var(--ink-2); }
.help-article { display: grid; gap: 1.25rem; max-width: 44rem; min-width: 0; }
.help-article h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.12; text-wrap: balance; overflow-wrap: anywhere; }
.help-body { display: grid; gap: 1rem; color: var(--ink-2); font-size: 1.06rem; line-height: 1.65; overflow-wrap: anywhere; }
.help-body b { color: var(--ink); }
.help-steps { display: grid; gap: .7rem; margin: 0; padding-left: 1.4rem; list-style: decimal; }
.help-steps li::marker { color: var(--accent-ink); font-weight: 700; }
.help-tip { padding: 1rem 1.15rem; border-left: 3px solid var(--accent); border-radius: 0 var(--r-s) var(--r-s) 0; background: var(--surface); }
.help-tip > b { display: block; margin-bottom: .2rem; font-size: var(--t2); font-weight: 650; color: var(--ink); }

/* La capture d'un sujet : le vrai produit, à sa taille, encadré comme sur l'accueil. */
.help-shot { justify-self: start; max-width: 100%; margin: .25rem 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-2); }
.help-shot img { max-width: 100%; height: auto; vertical-align: top; }
.help-shot.is-wide { justify-self: stretch; }
.help-shot.is-wide img { width: 100%; }

.help-regie { display: grid; gap: .75rem; justify-items: start; margin-top: .5rem; padding: 1.25rem 1.35rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.help-regie h2 { font-size: 1.1rem; letter-spacing: 0; }
.help-regie p, .help-regie ul { margin: 0; color: var(--ink-2); }
.help-regie ul { padding-left: 1.2rem; list-style: disc; }
.help-regie .btn { white-space: normal; text-align: left; }
.help-note { font-size: .9rem; color: var(--ink-3) !important; }

.help-more { display: grid; gap: 1.25rem; min-width: 0; }
.help-more h2, .help-same h2 { margin-bottom: .5rem; font-size: var(--t2); font-weight: 650; letter-spacing: 0; color: var(--ink-3); }
.help-back { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.25rem; font-weight: 650; }
.help-back .ico { width: 1em; height: 1em; }
.help-same { grid-column: 1; max-width: 44rem; min-width: 0; margin-top: clamp(1rem, 3vw, 2rem); padding-top: clamp(1.5rem, 3vw, 2rem); border-top: 1px solid var(--line); }
.help-same .help-links { grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); column-gap: 2rem; border-top: 0; }
@media (max-width: 62rem) {
  .help { grid-template-columns: minmax(0, 1fr); }
  .help-start { grid-template-columns: minmax(0, 1fr); }
}
