/* La fenêtre d'aide. Ouverte par `showModal()`, donc la barrière est celle du
   navigateur — `::backdrop` — et non un calque posé sous la boîte. */
.help {
  /* Sur un écran court, la fenêtre s'arrête avant les bords : le voile qui
     reste visible tout autour dit qu'il y a une page derrière. */
  width: min(32rem, calc(100% - var(--space-xl)));
  max-height: min(38rem, calc(100% - var(--space-xl)));
  /* Le navigateur centre une fenêtre modale par ses marges automatiques ; le
     `* { margin: 0 }` de la remise à zéro les lui retire. Rendues ici. */
  margin: auto;
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-lg);
  color: var(--color-text);
}

/* `display` seulement à l'ouverture : un `display: flex` posé sur la fenêtre
   fermée écraserait le `display: none` qui la tient hors de la page. */
.help[open] {
  display: flex;
  flex-direction: column;
}

.help::backdrop {
  background-color: rgb(16 24 40 / 0.45);
}

.help__header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.help__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
}

.help__close {
  display: inline-flex;
  flex: none;
  padding: var(--space-3xs);
  border: none;
  border-radius: var(--radius-full);
  background: none;
  color: var(--color-text-faint);
  cursor: pointer;
}

.help__close:hover {
  background-color: var(--color-surface-sunken);
  color: var(--color-text);
}

.help__close svg {
  width: 1rem;
  height: 1rem;
}

/* C'est le corps qui défile, pas la fenêtre : l'en-tête et son bouton de
   fermeture restent en vue jusqu'au bas de la dernière réponse. */
.help__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-lg);
  overflow-y: auto;
}

.help__intro {
  margin-bottom: var(--space-2xs);
  color: var(--color-text-soft);
  font-size: var(--text-sm);
}

.help__mail {
  color: var(--color-text);
  font-weight: var(--weight-medium);
}

.help__item {
  border-radius: var(--radius-md);
  background-color: var(--color-surface-sunken);
}

.help__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-2xs) var(--space-sm);
  list-style: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.help__summary::-webkit-details-marker {
  display: none;
}

.help__caret {
  width: 0.875rem;
  height: 0.875rem;
  flex: none;
  color: var(--color-text-faint);
  transition: rotate 0.15s ease;
}

.help__item[open] .help__caret {
  rotate: 180deg;
}

.help__answer {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: 0 var(--space-sm) var(--space-sm);
  color: var(--color-text-soft);
  font-size: var(--text-sm);
}

.help__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-inline-start: var(--space-md);
  list-style: disc;
}
