/* TidyWren, l'aide (/tidywren/questions/) : la recherche, le sommaire et les réponses. S'ajoute à style.css et aide.css
   (mêmes couleurs, mêmes rayons). Source : _outils/aide-recherche.css ; la copie en ligne porte son empreinte dans son
   nom, pour qu'une visiteuse déjà venue ne garde pas une ancienne version (les fichiers de /assets/ sont gardés un an). */

.recherche-aide[hidden] { display: none; }
.recherche-aide { display: block; }
.recherche-aide .champ { position: relative; }
.recherche-aide .champ > .ico { position: absolute; left: 20px; top: 29px; translate: 0 -50%; color: var(--doux); pointer-events: none; }
.recherche-aide input[type="search"]:not(:placeholder-shown) { padding-right: 104px; }
.recherche-aide input[type="search"]::-webkit-search-cancel-button { display: none; }
.recherche-aide .effacer {
  position: absolute; right: 8px; top: 29px; translate: 0 -50%;
  min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px;
  background: transparent; color: var(--lien); font: inherit; font-size: 1rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.recherche-aide .effacer:focus-visible { outline: 2px solid var(--brique); outline-offset: 2px; }
.recherche-aide .aide-clavier { margin-top: 10px; color: var(--doux); font-size: .875rem; text-align: center; }

.resultats { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.resultats[hidden] { display: none; }
.resultats a.res {
  display: block; padding: 14px 18px; border: 1px solid var(--trait); border-radius: 16px;
  background: var(--carte); box-shadow: var(--ombre); color: var(--texte); text-decoration: none;
}
.resultats a.res:hover strong { text-decoration: underline; }
.resultats a.res:focus-visible { outline: 2px solid var(--brique); outline-offset: 2px; }
.resultats .genre { display: block; color: var(--doux); font-size: .8125rem; letter-spacing: .02em; }
.resultats strong { display: block; margin-top: 2px; color: var(--encre); font-size: 1.0625rem; line-height: 1.35; }
.resultats .resume { display: block; margin-top: 4px; font-size: .9375rem; line-height: 1.5; }
.resultats li.rien p {
  padding: 16px 20px; border: 1px dashed var(--trait-fort); border-radius: 16px; background: var(--carte);
  color: var(--doux); text-align: center;
}

.sommaire-aide { max-width: 840px; margin: 0 auto 48px; }
.sommaire-aide h2 { font-size: 1.125rem; margin-bottom: 12px; }
.sommaire-aide ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sommaire-aide a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--trait); border-radius: 999px; background: var(--carte); color: var(--encre);
  text-decoration: none; font-size: 1rem;
}
.sommaire-aide a:hover { border-color: var(--trait-fort); text-decoration: underline; }
.sommaire-aide .ico { color: var(--doux); }

.famille { scroll-margin-top: 96px; }
.questions.aide li:target { outline: 2px solid var(--t-lueur, var(--brique)); outline-offset: 3px; }
.questions.aide h3 { text-wrap: balance; }
.questions.aide p.bref { margin-top: 10px; color: var(--encre); font-weight: 600; }
.questions.aide ol.etapes { margin: 12px 0 0; padding-left: 1.4em; font-size: 1.0625rem; }
.questions.aide ol.etapes li { padding: 3px 0 3px 4px; background: none; border: 0; border-radius: 0; box-shadow: none; }
.questions.aide .liens-qr { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 10px; }
.questions.aide .liens-qr .lien-fleche { margin-top: 0; }
.etiquette-tim {
  display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px;
  background: #FBE7E5; color: #983C4B; font-size: .8125rem; font-weight: 600; vertical-align: middle;
}
.etiquette-tim.voir { background: #FBEBD2; color: #8A5314; }
.etiquette-tim.titre { display: block; width: fit-content; max-width: 100%; margin: 6px 0 0; border-radius: 10px; font-weight: 500; }

/* Au doigt, pas de clavier : l'aide des flèches ne sert qu'au lecteur d'écran (elle reste lue par aria-describedby). */
@media (pointer: coarse) {
  .recherche-aide .aide-clavier { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
}

@media (max-width: 640px) {
  .recherche-aide .champ > .ico { top: 28px; }
  .recherche-aide .effacer { top: 28px; }
  .resultats a.res { padding: 12px 14px; }
  .sommaire-aide { margin-bottom: 36px; }
  .sommaire-aide a { font-size: .9375rem; padding: 6px 14px; }
}
.ouverture .vers-mode { margin-top: 14px; }
