/* L'AIDE (10/10) — la fenêtre dessinée d'après l'image d'Adam, de la
   même famille que « Nous écrire » : la pastille de tête, les cartes
   des pièces communes, une rubrique par carte. Au téléphone elle prend
   tout l'écran ; au bureau, une colonne de 680 px. Depuis la porte, elle
   passe au-dessus d'elle (#users, 40). Aucune couleur hors des jetons. */
#aide { z-index: 42; }
#aide .panel {
  display: flex; flex-direction: column; gap: var(--e-4);
  background: var(--bg); padding: 20px 18px calc(20px + var(--safe-b));
}
/* Plein écran au téléphone : l'app installée sur iPhone passe sous la
   barre d'état (viewport-fit=cover), d'où --safe-t, comme les autres
   écrans plein écran (mesure du 13/10). */
/* Le téléphone étroit (04/11) : la tuile s'efface, le titre prend la rangée. */
@media (max-width: 359.98px) { .aid-tete > .pc-pastille.grande { display: none; } }
@media (max-width: 719px) {
  #aide .panel { height: 100dvh; max-height: 100dvh; border-radius: 0;
    padding-top: calc(20px + var(--safe-t)); }
}
@media (min-width: 720px) {
  #aide .panel { max-width: 680px; }
}
#aide [hidden] { display: none; }

.aid-tete { display: flex; align-items: center; gap: var(--e-4); }
.aid-tete-txt { flex: 1; min-width: 0; }
/* 24 px au bureau comme au téléphone : le titre d'un module (C2, 22/10). */
#aide .aid-tete h2 { flex: 1; margin: 0 0 2px; font-size: var(--t-question); line-height: 1.25; }
.aid-tete p { margin: 0; color: var(--muted); font-size: var(--t-corps); }
.aid-fermer { align-self: flex-start; }   /* l'allure : `.pc-croix` (pieces.css, 20/10) */
.aid-haut { display: flex; align-items: center; justify-content: space-between; gap: var(--e-3); }
#aide .aid-haut .pc-bouton.lien { padding-left: 0; }

.aid-recherche {
  display: flex; align-items: center; gap: var(--e-3); min-height: 48px; padding: 0 var(--e-3);
  border: 1px solid var(--line2); border-radius: var(--r-objet); background: var(--panel);
}
.aid-recherche > svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
#aide .aid-recherche input {
  flex: 1; min-width: 0; padding: 10px 0; border: 0; background: none;
  color: var(--text); font: inherit; font-size: 16px;
}
#aide .aid-recherche input:focus-visible { outline: none; }
#aide .aid-recherche input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.aid-effacer {
  flex: none; width: var(--cible); height: var(--cible); display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line2); border-radius: var(--r-plein); background: var(--panel);
  color: var(--text); cursor: pointer;
}
.aid-effacer[hidden] { display: none; }
.aid-effacer:hover { border-color: var(--accent); }
.aid-effacer > svg { width: 16px; height: 16px; }
.aid-recherche:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }

.aid-grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e-3); }
@media (min-width: 720px) {
  .aid-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.aid-liste { display: flex; flex-direction: column; }
.aid-rang {
  display: flex; align-items: center; justify-content: space-between; gap: var(--e-3);
  min-height: var(--cible); margin: 0; padding: 0; border: 0; background: none;
  color: var(--text); font: inherit; font-size: var(--t-corps); text-align: left;
  text-decoration: none; cursor: pointer;
}
@media (min-width: 720px) { .aid-rang { min-height: 34px; } }
.aid-rang > svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.aid-rang:hover { color: var(--accent); }
.aid-rang:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.aid-version { cursor: default; }
.aid-version:hover { color: var(--text); }
.aid-version > span { color: var(--muted); }
.aid-resultats { display: flex; flex-direction: column; }
.aid-vide { margin: 0; color: var(--muted); }

.aid-questions { display: flex; flex-direction: column; gap: var(--e-3); }
.aid-questions > .aid-liste { padding: var(--e-2) var(--e-4); }
#aide .aid-question { padding: 0; }
.aid-question > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--e-3);
  min-height: var(--cible); padding: var(--e-3) var(--e-4); list-style: none; cursor: pointer;
  font-size: var(--t-lu); font-weight: var(--p-appuye);
}
.aid-question > summary::-webkit-details-marker { display: none; }
.aid-question > summary > svg { width: 22px; height: 22px; flex: none; }
.aid-question[open] > summary > svg { transform: rotate(180deg); }
.aid-question > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.aid-reponse {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--e-2);
  margin: 0 var(--e-4); padding: var(--e-3) 0 var(--e-4); border-top: 1px solid var(--line);
}
.aid-reponse p { margin: 0; line-height: 1.5; }
.aid-reponse .pc-bouton { margin-top: var(--e-2); text-decoration: none; }

/* Le pied reste en bas de la fenêtre, comme sur l'image : la sortie
   « Nous écrire » ne se cherche pas au bout du défilement. */
.aid-pied {
  position: sticky; bottom: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: var(--e-3);
  flex-wrap: wrap; margin-top: auto;
}
.aid-pied p { margin: 0; font-size: var(--t-lu); }
#aide .aid-pied .pc-bouton { min-height: 48px; padding: 0 var(--e-4); }
.aid-adresse { color: var(--accent); font-weight: var(--p-appuye); }
