/* =========================================================
   Création Audio — centre d'aide (aide + onglet Aide de l'admin)
   Couleurs = jetons (tokens.css + site.css / admin.css) : l'accent suit Réglages › Apparence.
   ========================================================= */
.ah { --ah-accent: var(--ember); --ah-ink: var(--ember-ink, var(--ember)); }

.ah-search { margin-bottom:18px; }
.ah-q {
  width:100%; max-width:560px; min-width:0; height:46px; padding:0 16px 0 44px;
  border:1px solid var(--line); border-radius:12px; background:var(--paper) no-repeat 15px 50%/18px 18px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A9099' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
  font:inherit; font-size:15px; color:var(--ink); box-sizing:border-box;
}
.ah-q:focus { outline:none; border-color:var(--ah-accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--ah-accent) 22%, transparent); }

.ah-cols { display:grid; grid-template-columns:minmax(220px, 290px) minmax(0, 1fr); gap:24px; align-items:start; }

/* ---- liste des tutos ---- */
.ah-nav {
  position:sticky; top:calc(var(--top-h, 64px) + 16px);
  max-height:calc(100vh - var(--top-h, 64px) - 40px); overflow:auto;
  border:1px solid var(--line); border-radius:var(--radius, 14px); background:var(--paper); padding:10px;
}
.ah-grp + .ah-grp { margin-top:8px; padding-top:8px; border-top:1px solid var(--line); }
.ah-grp-t { margin:4px 10px 6px; font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.ah-link {
  display:block; padding:8px 10px; border-radius:9px; color:var(--ink); text-decoration:none;
  font-size:14.5px; font-weight:500; line-height:1.3;
}
.ah-link:hover { background:var(--wash); }
.ah-link.is-on { background:color-mix(in srgb, var(--ah-accent) 13%, transparent); color:var(--ah-ink); font-weight:700; }
.ah-link:focus-visible { outline:2px solid var(--ah-accent); outline-offset:1px; }
.ah-none, .ah-pick { margin:10px; color:var(--muted); font-size:14px; }

/* ---- tuto ---- */
.ah-doc {
  border:1px solid var(--line); border-radius:var(--radius-lg, 20px); background:var(--paper);
  padding:28px 32px 30px; min-width:0;
}
.ah-back { display:none; }
.ah-head { display:flex; gap:16px; align-items:flex-start; justify-content:space-between; margin-bottom:22px; }
.ah-head > div { min-width:0; }
.ah-eyebrow { margin:0 0 4px; font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--ah-ink); }
.ah-head h2 { margin:0; font-family:var(--display, inherit); font-size:26px; line-height:1.15; color:var(--ink); }
.ah-intro { margin:8px 0 0; color:var(--muted); font-size:15px; }
.ah-go {
  flex:none; display:inline-flex; align-items:center; gap:6px; height:40px; padding:0 16px; border-radius:100px;
  background:var(--ah-accent); color:var(--on-ember, #fff); font-weight:700; font-size:14px; text-decoration:none; white-space:nowrap;
}
.ah-go:hover { filter:brightness(1.06); }
.ah-go:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }

.ah-steps { list-style:none; margin:0; padding:0; counter-reset:ah; }
.ah-steps li {
  position:relative; counter-increment:ah; padding:4px 0 18px 48px; min-height:34px;
  font-size:15.5px; line-height:1.5; color:var(--ink);
}
.ah-steps li::before {
  content:counter(ah); position:absolute; left:0; top:0; width:32px; height:32px; border-radius:50%;
  display:grid; place-items:center; font-weight:800; font-size:14px;
  background:color-mix(in srgb, var(--ah-accent) 14%, var(--paper)); color:var(--ah-ink);
  border:1.5px solid color-mix(in srgb, var(--ah-accent) 45%, transparent);
}
.ah-steps li:not(:last-child)::after {
  content:''; position:absolute; left:15.5px; top:36px; bottom:2px; width:1.5px;
  background:color-mix(in srgb, var(--ah-accent) 25%, var(--line));
}
.ah-steps li:last-child { padding-bottom:0; }
.ah-steps b { font-weight:700; }
.ah-ui {
  display:inline-block; padding:0 8px; border-radius:7px; line-height:1.55; font-size:.92em; font-weight:600;
  background:var(--wash); border:1px solid var(--line); color:var(--ink); white-space:nowrap;
}
.ah-tip {
  margin:22px 0 0; padding:12px 16px; border-radius:12px; font-size:14.5px; line-height:1.5; color:var(--ink);
  background:color-mix(in srgb, var(--ah-accent) 8%, var(--paper));
  border-left:3px solid var(--ah-accent);
}

/* ---- mobile : liste, puis tuto ---- */
@media (max-width:760px) {
  .ah-cols { grid-template-columns:minmax(0, 1fr); }
  .ah-q { max-width:none; }
  .ah-nav { position:static; max-height:none; }
  .ah:not(.has-doc) .ah-doc { display:none; }
  .ah.has-doc .ah-nav { display:none; }
  .ah.has-doc .ah-search { display:none; }
  .ah-doc { padding:18px 18px 22px; border-radius:var(--radius, 14px); }
  .ah-back {
    display:inline-block; margin:0 0 14px; padding:0; border:0; background:none; cursor:pointer;
    font:inherit; font-size:14px; font-weight:600; color:var(--ah-ink);
  }
  .ah-head { flex-direction:column; gap:12px; }
  .ah-head h2 { font-size:22px; }
  .ah-ui { white-space:normal; }
}

/* ---- page publique aide ---- */
.legal-band .aide-inner { max-width:1180px; }
.aide-page { max-width:1180px; margin:0 auto; padding:clamp(24px,4vw,40px) 24px 72px; }
.aide-more { margin:28px 0 0; color:var(--muted); font-size:15px; }
@media (max-width:760px) { .aide-page { padding-left:16px; padding-right:16px; } }
