/*
 * LES PAGES D'AIDE (lot 588, 16 novembre 2026 ; maquette « Pages d'aide »).
 * Le centre d'aide (/aide) et une page (/aide/<page>), dessinés par public/js/aide-ui.mjs.
 * Couleurs : les variables de style.css ; les teintes des cartes reprennent celles des
 * rubriques (cyan, rose, jaune, bleu, orange).
 */
.ai-page, .ai-centre { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }

/* Les teintes : --c (le trait) et --f (le fond pâle). */
.ai-c-cyan { --c: var(--cyan, #12e0e0); --f: rgba(18,224,224,.14); }
.ai-c-rose { --c: #ff6fb3; --f: rgba(255,111,179,.16); }
.ai-c-jaune { --c: var(--yellow, #ffe14d); --f: rgba(255,225,77,.14); }
.ai-c-bleu { --c: #7fb2ff; --f: rgba(127,178,255,.16); }
.ai-c-orange { --c: #ff9b4a; --f: rgba(255,155,74,.14); }

/* Le haut : fil, titre, date et « Copier le lien ». */
.ai-fil { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.ai-fil a { color: var(--cyan); text-decoration: none; }
.ai-fil a:hover { text-decoration: underline; }
.ai-fil b { color: var(--text); }
.ai-page > .ai-fil { margin-bottom: -18px; }
.ai-tete { display: flex; flex-direction: column; gap: 12px; }
.ai-tete h1 { margin: 0; font-size: clamp(28px, 5vw, 38px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.ai-sous { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
.ai-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.ai-copier { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--panel-border);
  background: var(--panel); color: var(--text); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; max-width: 100%; }
.ai-copier span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-copier:hover { border-color: var(--cyan); }
.ai-copier svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* « En bref » : la réponse en deux phrases, ce que l'aperçu Discord montre aussi. */
.ai-bref { display: flex; gap: 14px; padding: 18px 20px; border-radius: 16px; background: rgba(18,224,224,.08); border: 1px solid rgba(18,224,224,.3); }
.ai-bref > svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; }
.ai-bref > div > b { display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.ai-bref p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text); }

/* Un bloc : son titre, puis son contenu. */
.ai-bloc { display: flex; flex-direction: column; gap: 14px; }
.ai-bloc h2 { margin: 0; font-size: 22px; font-weight: 800; }
.ai-bloc p { margin: 0; }
.ai-page b, .ai-page strong { color: var(--text); }
.ai-page a:not(.ai-bouton) { color: var(--cyan); }

.ai-etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ai-etapes li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
.ai-num { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.ai-etapes li > div { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.ai-etapes li > div > b { font-size: 16.5px; }
.ai-etapes p { font-size: 15px; line-height: 1.6; color: var(--body); }

.ai-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ai-carte { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-border); }
.ai-carte-ico { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--f); }
.ai-carte-ico svg { width: 20px; height: 20px; fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ai-carte > b { font-size: 16px; }
.ai-carte p { font-size: 14.5px; line-height: 1.55; color: var(--body); }
.ai-carte small { font-size: 13px; line-height: 1.5; color: var(--muted); }
.ai-apres { font-size: 15px; line-height: 1.6; color: var(--body); }

/* Les points : neutres, ou en encadré coloré (Ligue en rose, prérequis en jaune, badges en orange). */
.ai-points ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ai-points li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.6; color: var(--body); }
.ai-points li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 999px; background: var(--p, var(--muted)); }
.ai-t-rose, .ai-t-jaune, .ai-t-orange { padding: 18px 20px; border-radius: 16px; }
.ai-t-rose h2, .ai-t-jaune h2, .ai-t-orange h2 { font-size: 18px; }
.ai-t-rose { --p: var(--accent); background: rgba(255,47,146,.07); border: 1px solid rgba(255,47,146,.32); }
.ai-t-jaune { --p: var(--yellow); background: rgba(255,225,77,.06); border: 1px solid rgba(255,225,77,.3); }
.ai-t-orange { --p: #ff9b4a; background: rgba(255,155,74,.07); border: 1px solid rgba(255,155,74,.32); }

.ai-faq { display: flex; flex-direction: column; gap: 10px; }
.ai-faq details { border-radius: 12px; background: var(--panel); border: 1px solid var(--panel-border); padding: 0 16px; }
.ai-faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 15.5px; color: var(--text); }
.ai-faq details p { padding-bottom: 14px; font-size: 15px; line-height: 1.6; color: var(--body); }

.ai-liees { display: flex; flex-direction: column; gap: 10px; }
.ai-liees > b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) !important; }
.ai-liees > div { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-liees a { padding: 10px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--panel-border); text-decoration: none; font-weight: 700; font-size: 14px; }
.ai-liees a:hover { border-color: var(--cyan); }

/* Le pied « Pas trouvé ta réponse ? ». */
.ai-pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--panel-border); }
.ai-pied > div { display: flex; flex-direction: column; gap: 4px; flex: 1 1 320px; }
.ai-pied > div > b { font-size: 16px; color: var(--text); }
.ai-pied span { font-size: 14.5px; line-height: 1.55; color: var(--body); }
.ai-bouton { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #5865f2; color: #fff; text-decoration: none; font-weight: 800; }
.ai-bouton:hover { filter: brightness(1.1); }

/* Le centre d'aide : la recherche, puis les familles. */
.ai-centre { max-width: 1040px; }
.ai-centre .ai-tete { max-width: 720px; }
.ai-recherche { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--panel-border); }
.ai-recherche:focus-within { border-color: var(--cyan); }
.ai-recherche svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.ai-recherche input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15.5px; outline: none; }
.ai-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Lot 593 : align-items start : une famille courte (Power) ne s'étire plus à la hauteur de sa voisine. */
.ai-familles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.ai-famille { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--panel-border); scroll-margin-top: 80px; }
.ai-famille-tete { display: flex; align-items: center; gap: 12px; }
.ai-famille-tete b { font-size: 17px; color: var(--text); }
.ai-famille-l { display: flex; flex-direction: column; }
.ai-lien-page { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); text-decoration: none; color: var(--body); font-weight: 600; font-size: 15px; }
.ai-lien-page:hover { color: var(--text); }
.ai-lien-page span:last-child { color: var(--muted); }
.ai-resultats { padding: 6px 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--panel-border); }
.ai-vide { margin: 12px 0; color: var(--muted); }

@media (max-width: 560px) {
  .ai-page, .ai-centre { gap: 26px; }
  .ai-bref { padding: 16px; }
  .ai-t-rose, .ai-t-jaune, .ai-t-orange { padding: 16px; }
  .ai-familles { grid-template-columns: minmax(0, 1fr); }
}
