/* Aide (16/10/2026, v15) : guide en ligne, grille d'utilisation, vidéos, écrans (js/59-aide.js) et partie clients
   (aide/clients.html). Jetons de app.css uniquement : bleu en thème clair, or en thème sombre ; impression bleu sur blanc. */
:root { --aide-survol: var(--hl); --aide-fond: var(--chip); --aide-voile: rgba(0, 0, 0, .7); --aide-ecran: #000; }
/* Thème sombre : survols et fonds teintés d'or (jamais de bleu ni de turquoise). */
:root[data-theme="dark"] { --aide-survol: rgba(212, 175, 55, .12); --aide-fond: rgba(212, 175, 55, .08); }
.aide { min-width: 0; }
.aide-outils { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 0 0 14px; }
.aide-recherche { flex: 1 1 320px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink); font: inherit; }
.aide-recherche:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.aide-bilan { margin: 0; flex: 1 1 100%; }
.aide-bilan:empty { display: none; }
.aide mark, .aide-clients mark { background: var(--warn-bg); color: var(--ink); border-bottom: 2px solid var(--acc); padding: 0 1px; }

/* Guide : sommaire collant à gauche, sections à droite */
.aide-guide { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 18px; align-items: start; }
.aide-sommaire { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow: auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 0; }
.aide-sommaire button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--ink);
  font: inherit; cursor: pointer; padding: 4px 14px; line-height: 1.3; }
.aide-sommaire button:hover, .aide-sommaire button:focus-visible { background: var(--aide-survol); color: var(--acc); outline: none; }
.aide-sommaire .aide-som-n1 { font-weight: 700; font-size: 13px; margin-top: 6px; }
.aide-sommaire .aide-som-n2 { font-size: 12.5px; padding-left: 26px; color: var(--mut); }
.aide-corps { min-width: 0; display: grid; gap: 16px; }
.aide-section { scroll-margin-top: 70px; }
.aide-section > h2 { color: var(--marque); margin-top: 0; }
.aide-sous { scroll-margin-top: 70px; padding-top: 4px; }
.aide-sous > h3 { color: var(--acc); margin: 18px 0 8px; font-size: 16px; }
.aide-section:focus, .aide-sous:focus { outline: none; }
.aide-h4 { margin: 14px 0 6px; font-size: 14px; }
.aide-corps p, .aide-corps li { line-height: 1.55; }
.aide-liste, .aide-etapes { padding-left: 22px; margin: 6px 0 10px; }
.aide-etapes li::marker { color: var(--acc); font-weight: 700; }
.aide-question { font-weight: 700; color: var(--acc); margin: 14px 0 2px; }
.aide-encadre { border-left: 4px solid var(--acc); background: var(--info-bg); padding: 10px 14px; border-radius: 6px; margin: 10px 0; line-height: 1.55; }
.aide-encadre.attention { border-left-color: var(--warn); background: var(--warn-bg); }
.aide-defile { position: relative; max-width: 100%; overflow-x: auto; margin: 8px 0 12px; -webkit-overflow-scrolling: touch; }
.aide-table th[scope="row"] { background: none; color: var(--ink); text-transform: none; font-size: 13px; letter-spacing: 0; text-align: left; }
.aide-table td, .aide-table th { vertical-align: top; }
.aide-passage { margin: 8px 0 0; font-size: 13px; }
.aide-passage a { color: var(--acc); font-weight: 700; }

/* Écrans et vidéos */
.aide-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 12px 0 4px; }
.aide-figure { margin: 0; min-width: 0; }
.aide-vignette { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: var(--panel); cursor: zoom-in; }
.aide-vignette:hover, .aide-vignette:focus-visible { border-color: var(--acc); outline: none; box-shadow: 0 0 0 2px var(--acc); }
.aide-vignette img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.aide-figure figcaption, .aide-boucle figcaption { font-size: 12.5px; color: var(--mut); margin-top: 5px; line-height: 1.4; }
.aide-boucles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 12px 0 4px; }
.aide-boucles.larges { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.aide-boucle { margin: 0; }
.aide-boucle video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--aide-fond); border-radius: 8px; border: 1px solid var(--line); }
.aide-boucle figcaption strong { color: var(--ink); }
.aide-visionneuse { width: min(1280px, 96vw); max-height: 94vh; padding: 0; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--ink); }
.aide-visionneuse::backdrop { background: var(--aide-voile); }
.aide-visionneuse img { display: block; width: 100%; height: auto; }
.aide-visionneuse-barre { display: flex; gap: 10px; align-items: center; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); }
.aide-visionneuse-leg { margin: 0; flex: 1; font-weight: 700; font-size: 13px; min-width: 0; }

/* Film */
.aide-film-grille { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.aide-film-ecran video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--aide-ecran); border-radius: 10px; }
.aide-film-chap { border: 1px solid var(--line); border-radius: 10px; max-height: 440px; overflow: auto; }
.aide-chap-tete { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 700; color: var(--mut); padding: 10px 14px 4px; }
.aide-chapitres { list-style: none; margin: 0; padding: 0 0 6px; }
.aide-chapitres button { display: grid; grid-template-columns: 40px 1fr; gap: 0 8px; width: 100%; text-align: left; border: 0;
  background: none; color: var(--ink); font: inherit; font-size: 13px; padding: 6px 14px; cursor: pointer; }
.aide-chapitres button:hover, .aide-chapitres button:focus-visible { background: var(--aide-survol); outline: none; }
.aide-chapitres b { display: block; font-size: 12px; letter-spacing: .4px; }
.aide-chapitres small { color: var(--mut); }
.aide-chap-t { color: var(--acc); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Grille d'utilisation */
.aide-intro { line-height: 1.55; max-width: 900px; }
.aide-label { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }
.aide-label select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font: inherit; }
.aide-bascule { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.aide-defile-matrice { position: relative; border: 1px solid var(--line); border-radius: 8px; max-height: 72vh; overflow: auto; }
.aide-matrice { font-size: 12px; border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.aide-matrice th, .aide-matrice td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.aide-matrice thead th { position: sticky; top: 0; z-index: 2; }
.aide-matrice thead tr:nth-child(2) th { top: 30px; }
.aide-mat-famille { height: 30px; text-align: center; }
.aide-matrice th.aide-mat-v { height: 150px; vertical-align: bottom; padding: 6px 2px; width: 30px; min-width: 30px; text-transform: none; letter-spacing: 0; }
.aide-matrice th.aide-mat-v span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 11.5px; font-weight: 700; }
.aide-matrice .aide-mat-profil { position: sticky; left: 0; z-index: 1; background: var(--panel); color: var(--ink); text-align: left;
  min-width: 190px; max-width: 230px; text-transform: none; letter-spacing: 0; font-size: 12.5px; padding: 5px 10px; }
.aide-matrice thead .aide-mat-profil { z-index: 3; background: var(--th); color: var(--th-ink); }
.aide-matrice .aide-mat-profil small { display: block; color: var(--mut); font-weight: 400; font-size: 11px; }
.aide-matrice td { text-align: center; padding: 4px 0; }
.aide-matrice td.oui { color: var(--acc); font-size: 13px; }
.aide-matrice tbody tr:hover td, .aide-matrice tbody tr:hover th { background: var(--aide-survol); }
.aide-mat-moi th, .aide-mat-moi td { background: var(--info-bg) !important; font-weight: 700; }
.aide-note { font-size: 12.5px; margin: 8px 0 0; }
.aide-famille { color: var(--marque); margin: 18px 0 8px; }
.aide-ecrans-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.aide-ecran-carte { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; min-width: 0; }
.aide-ecran-carte.ouvert { border-left: 4px solid var(--acc); }
.aide-ecran-carte h4 { margin: 0 0 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.aide-ecran-carte p { margin: 0 0 8px; color: var(--mut); font-size: 13px; line-height: 1.45; }
.aide-puces { display: flex; flex-wrap: wrap; gap: 4px; }
.aide-puces .puce { font-size: 11.5px; }

/* Partie clients (page publique aide/clients.html) */
.aide-clients { max-width: 980px; margin: 0 auto; padding: 24px 16px 40px; }
.aide-clients .surtitre { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--mut); font-weight: 700; }
.aide-clients h1 { color: var(--marque); margin: 4px 0 6px; }
.aide-clients h2 { color: var(--marque); margin-top: 0; }
.aide-clients section { margin-bottom: 16px; }
.aide-clients p, .aide-clients li { line-height: 1.55; }
.aide-clients .aide-menu-portail { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; list-style: none; padding: 0; }
.aide-clients .aide-menu-portail li { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--panel); }
.aide-clients .aide-menu-portail b { display: block; color: var(--acc); }

@media (max-width: 900px) {
  .aide-guide { grid-template-columns: 1fr; }
  .aide-sommaire { position: static; max-height: 260px; }
  .aide-film-grille { grid-template-columns: 1fr; }
  .aide-film-chap { max-height: 260px; }
}
@media (max-width: 480px) {
  .aide-galerie, .aide-boucles, .aide-boucles.larges, .aide-ecrans-liste { grid-template-columns: 1fr; }
  .aide-matrice .aide-mat-profil { min-width: 130px; max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { .aide-sommaire { scroll-behavior: auto; } }
@media print {
  .aide-sommaire, .aide-outils, .aide-boucles, .aide-passage, .aide-visionneuse, .onglets, .aide-film { display: none !important; }
  .aide-guide { display: block; }
  .aide-section, .aide-ecran-carte { break-inside: avoid-page; border-color: #9fb3c8 !important; background: #fff !important; }
  .aide-section > h2, .aide-sous > h3, .aide-question, .aide-famille, .aide-clients h1, .aide-clients h2 { color: #14467c !important; }
  .aide-corps, .aide-corps p, .aide-corps li, .aide-clients { color: #000 !important; }
  .aide-encadre { background: #fff !important; border-left-color: #14467c !important; }
  .aide-matrice td.oui { color: #14467c !important; }
  .aide-defile-matrice { max-height: none; overflow: visible; }
}
