/* Centre d'aide (inngame.app/help, /fr/aide) : pages générées par tools/help_center.py. Clair / sombre par les variables de style.css. */
.hc { --hc-band: linear-gradient(180deg, #0f2a1f 0%, #0d1a17 55%, var(--bg) 100%); --hc-glow: rgba(124, 240, 176, .16); --hc-glow-2: rgba(169, 155, 255, .14);
  --hc-card: var(--surface); --hc-shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 10px 30px rgba(0, 0, 0, .25); --hc-ico: rgba(124, 240, 176, .12); --hc-step: #7cf0b0; --hc-step-ink: #062314; }
:root[data-theme="light"] .hc { --hc-band: linear-gradient(180deg, #dff8ea 0%, #eefbf4 55%, #fff 100%); --hc-glow: rgba(64, 190, 128, .2); --hc-glow-2: rgba(91, 72, 214, .1);
  --hc-shadow: 0 1px 2px rgba(18, 21, 28, .05), 0 8px 24px rgba(18, 21, 28, .07); --hc-ico: #e6f8ee; --hc-step: #0b7a47; --hc-step-ink: #fff; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hc { --hc-band: linear-gradient(180deg, #dff8ea 0%, #eefbf4 55%, #fff 100%); --hc-glow: rgba(64, 190, 128, .2); --hc-glow-2: rgba(91, 72, 214, .1);
    --hc-shadow: 0 1px 2px rgba(18, 21, 28, .05), 0 8px 24px rgba(18, 21, 28, .07); --hc-ico: #e6f8ee; --hc-step: #0b7a47; --hc-step-ink: #fff; }
}

/* ---------- hero de l'accueil ---------- */
.hc-hero { position: relative; z-index: 6; background: var(--hc-band); padding: 56px 0 44px; border-bottom: 1px solid var(--border); }
.hc-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px 260px at 15% 0%, var(--hc-glow), transparent 70%), radial-gradient(480px 260px at 90% 10%, var(--hc-glow-2), transparent 70%); }
.hc-hero-in { position: relative; max-width: 820px; text-align: center; }
.hc-eyebrow { display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--accent-text);
  background: var(--hc-ico); border: 1px solid color-mix(in srgb, var(--accent-text) 25%, transparent); }
.hc-hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -.025em; margin: 0 0 12px; }
.hc-lede { color: var(--muted); font-size: 1.08rem; max-width: 620px; margin: 0 auto 26px; }

/* Petite scène pixel : le héros demande (« ? »), le copain répond (« ! »). Décor seulement. */
.hc-scene { position: absolute; inset: 0; pointer-events: none; }
.hc-scene .px { --s: 3; position: absolute; }
.hc-s-hero { --x: 0; --y: 0; left: -170px; top: 110px; animation: hp-idle 1.2s steps(2, end) infinite; }
.hc-s-ask { --x: 72; --y: 36; left: -138px; top: 56px; transform-origin: 0 100%; animation: hc-pop 6s steps(1, end) infinite; }
.hc-s-ok { --x: 126; --y: 36; right: -112px; top: 50px; transform-origin: 100% 100%; animation: hc-pop 6s steps(1, end) 1.4s infinite; opacity: 0; }
.hc-scene .hc-s-buddy { position: absolute; will-change: translate; right: -190px; top: 104px; --s: 4; animation: hp-float 2.6s ease-in-out infinite; }
@keyframes hc-pop { 0% { opacity: 0; transform: scale(.6); } 4% { opacity: 1; transform: scale(1); } 45% { opacity: 1; } 47%, 100% { opacity: 0; } }
@media (max-width: 1240px) { .hc-scene { display: none; } }

/* ---------- recherche ---------- */
.hc-search { position: relative; max-width: 640px; margin: 0 auto; text-align: left; }
.hc-search input { width: 100%; height: 52px; padding: 0 48px 0 48px; border-radius: 14px; border: 1px solid var(--border-2); background: var(--hc-card); color: var(--text);
  font: inherit; font-size: 1rem; box-shadow: var(--hc-shadow); -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s; }
.hc-search-big input { height: 60px; font-size: 1.08rem; border-radius: 16px; }
.hc-search input::placeholder { color: var(--faint); }
.hc-search input:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-text) 18%, transparent), var(--hc-shadow); }
.hc-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.hc-search-ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.hc-search .hc-kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.hc-search input:focus ~ .hc-kbd, .hc-search input:not(:placeholder-shown) ~ .hc-kbd { display: none; }
@media (hover: none) { .hc-search .hc-kbd { display: none; } }
.hc-tries { margin: 14px 0 0; font-size: .9rem; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px 8px; justify-content: center; align-items: center; }
.hc-tries a { color: var(--muted); text-decoration: none; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-2); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.hc-tries a:hover { color: var(--text); border-color: var(--accent-text); }

.hc-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40; background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35); padding: 6px; max-height: min(70vh, 520px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
:root[data-theme="light"] .hc-results { box-shadow: 0 18px 50px rgba(18, 21, 28, .16); }
.hc-results[hidden] { display: none; }
.hc-results .hc-r-count { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 8px 12px 4px; margin: 0; }
.hc-results a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); }
.hc-results a[aria-selected="true"], .hc-results a:hover { background: var(--surface-2); color: var(--text); }
.hc-results b { display: block; font-weight: 600; line-height: 1.35; }
.hc-results .hc-r-col { display: block; font-size: .8rem; color: var(--accent-text); margin-top: 2px; }
.hc-results .hc-r-snip { display: block; font-size: .88rem; color: var(--muted); margin-top: 3px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hc-results mark { background: color-mix(in srgb, var(--accent-text) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.hc-results .hc-r-none { padding: 14px 12px; color: var(--muted); margin: 0; }
.hc-results .hc-r-none button { margin-top: 10px; }

/* Bande de recherche en haut des rubriques et articles */
.hc-band { background: var(--hc-band); border-bottom: 1px solid var(--border); padding: 18px 0; position: relative; z-index: 5; }
.hc-band .hc-search { max-width: 760px; margin: 0; }

/* ---------- accueil ---------- */
.hc-home { padding-top: 40px; padding-bottom: 24px; }
.hc-sec { margin: 0 0 44px; }
.hc-h { font-size: 1.25rem; margin: 0 0 16px; letter-spacing: -.01em; }
.hc-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hc-col { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 14px; background: var(--hc-card); border: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.hc-col:hover { color: var(--text); border-color: var(--border-2); }
@media (hover: hover) { .hc-col:hover { transform: translateY(-3px); box-shadow: var(--hc-shadow), 3px 3px 0 color-mix(in srgb, var(--accent-text) 25%, transparent); } .hc-col:hover .hc-ico { animation: ig-hop .45s ease-out; } }
.hc-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.45rem; background: var(--hc-ico); line-height: 1; }
.hc-ico-lg { width: 64px; height: 64px; border-radius: 16px; font-size: 2rem; }
.hc-col-txt { min-width: 0; }
.hc-col b { display: block; font-size: 1.04rem; margin: 1px 0 4px; }
.hc-col span span, .hc-col-txt > span { display: block; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.hc-col small { display: block; color: var(--faint); font-size: .82rem; margin-top: 8px; }

.hc-list { list-style: none; margin: 0; padding: 0; background: var(--hc-card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.hc-list li { margin: 0; border-top: 1px solid var(--border); }
.hc-list li:first-child { border-top: 0; }
.hc-list a { display: flex; align-items: center; gap: 14px; padding: 15px 18px; text-decoration: none; color: var(--text); transition: background .12s; }
.hc-list a:hover { background: var(--surface-2); color: var(--text); }
.hc-list a:hover .hc-chev { transform: translateX(3px); color: var(--accent-text); }
.hc-li-txt { flex: 1; min-width: 0; }
.hc-list b { display: block; font-weight: 600; line-height: 1.35; }
.hc-li-sub { display: block; color: var(--muted); font-size: .9rem; margin-top: 3px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hc-li-col { display: block; color: var(--faint); font-size: .85rem; margin-top: 3px; }
.hc-chev { flex: none; color: var(--faint); transition: transform .15s, color .15s; }
.hc-list-2 { display: grid; grid-template-columns: 1fr 1fr; }
.hc-list-2 li:nth-child(2) { border-top: 0; }
.hc-list-2 li:nth-child(even) { border-left: 1px solid var(--border); }

/* « Besoin d'aide ? » */
.hc-contact { display: flex; align-items: center; gap: 20px; margin: 8px 0 48px; padding: 22px 24px; border-radius: 16px; border: 1px solid var(--border-2);
  background: radial-gradient(400px 160px at 0% 0%, var(--hc-glow), transparent 70%), var(--hc-card); }
.hc-contact-buddy { flex: none; will-change: translate; animation: hp-float 2.6s ease-in-out infinite; --s: 2; }
.hc-contact-text { flex: 1; min-width: 0; }
.hc-contact h2 { font-size: 1.2rem; margin: 0 0 4px; }
.hc-contact p { margin: 0; color: var(--muted); font-size: .95rem; }
.hc-contact-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hc-art-main .hc-contact h2 { font-size: 1.2rem; margin: 0 0 4px; padding: 0; border: 0; }

/* ---------- rubrique ---------- */
.hc-page { padding-top: 26px; padding-bottom: 8px; max-width: 880px; }
.hc-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 22px; }
.hc-crumbs a { text-decoration: none; }
.hc-crumbs a:hover { text-decoration: underline; }
.hc-crumbs [aria-current] { color: var(--faint); }
.hc-sep { color: var(--faint); }
.hc-colhead { display: flex; gap: 18px; align-items: flex-start; margin: 0 0 26px; }
.hc-colhead h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 4px 0 6px; letter-spacing: -.02em; }
.hc-colhead p { color: var(--muted); font-size: 1.05rem; margin: 0 0 6px; }
.hc-colhead small { color: var(--faint); font-size: .88rem; }
.hc-others { margin-top: 40px; }
.hc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hc-chips a { display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--hc-card); color: var(--text); text-decoration: none; font-size: .92rem; }
.hc-chips a:hover { border-color: var(--accent-text); color: var(--text); }

/* ---------- article ---------- */
.hc-art { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 56px; padding-top: 26px; align-items: start; }
.hc-art-main { max-width: 740px; min-width: 0; }
.hc-art-main h1 { font-size: clamp(1.9rem, 5.4vw, 2.6rem); letter-spacing: -.025em; margin: 0 0 12px; }
.hc-art-main > .sub { font-size: 1.15rem; color: var(--muted); margin: 0 0 14px; }
.hc-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; color: var(--faint); font-size: .88rem; margin: 0 0 26px; }
.hc-meta a { color: var(--muted); text-decoration: none; }
.hc-meta a:hover { color: var(--text); }
.hc-body h2 { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; margin: 2em 0 .7em; padding-top: 1.2em; border-top: 1px solid var(--border); scroll-margin-top: 80px; }
.hc-body h2:first-child { margin-top: .4em; }
.hc-body h3 { scroll-margin-top: 80px; }
.hc-emo { font-size: 1.15em; line-height: 1; }
.hc-body p, .hc-body li { color: var(--prose); }
.hc-body strong { color: var(--text); }
.hc-body hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

/* Étapes numérotées en pastilles */
.hc-body ol.hc-steps { list-style: none; counter-reset: hc; padding: 0; margin: 0 0 1.4em; }
.hc-body ol.hc-steps > li { counter-increment: hc; position: relative; padding: 2px 0 0 44px; margin: 0 0 14px; min-height: 30px; }
.hc-body ol.hc-steps > li::before { content: counter(hc); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 700; font-size: .9rem; color: var(--hc-step-ink); background: var(--hc-step); box-shadow: 2px 2px 0 color-mix(in srgb, var(--hc-step) 35%, transparent); }
.hc-body ol.hc-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: -12px; width: 2px; background: var(--border); }

/* Encadré 💡 */
.hc-tip { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 1.4em; padding: 14px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--border)); }
.hc-tip.hc-note { background: color-mix(in srgb, var(--accent-2) 10%, var(--surface)); border-color: color-mix(in srgb, var(--accent-2) 35%, var(--border)); }
.hc-tip-ico { font-size: 1.2rem; line-height: 1.4; flex: none; }
.hc-tip p { margin: 0; color: var(--prose); font-size: .97rem; }

.hc-body pre { margin: 0 0 1.4em; }
.hc-body pre code { white-space: pre; }
.hc-body pre.has-copy { padding-top: 38px; }
.hc-col-ext { border-style: dashed; background: transparent; }
.hc-col-ext .hc-ico { background: var(--surface-2); }
.hc-art-main .hc-contact { flex-wrap: wrap; }
.hc-art-main .hc-contact-text { min-width: 260px; }

/* Sommaire : <details> sur téléphone, colonne collante sur ordinateur */
.hc-toc-m { display: none; margin: 0 0 24px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--hc-card); }
.hc-toc-m summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.hc-toc-m summary::-webkit-details-marker { display: none; }
.hc-toc-m summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .15s; }
.hc-toc-m[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.hc-toc-m ol { margin: 0; padding: 0 16px 14px 36px; }
.hc-toc-m li { margin: 6px 0; }
.hc-toc-m a, .hc-side a { text-decoration: none; }

.hc-aside { position: sticky; top: 86px; display: grid; gap: 28px; max-height: calc(100vh - 110px); overflow-y: auto; padding-bottom: 20px; }
.hc-side h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 0 0 10px; }
.hc-side ol, .hc-side ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.hc-side li { margin: 0; }
.hc-side li a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.hc-side li a:hover { color: var(--text); }
.hc-side li a[aria-current="page"], .hc-side li a.on { color: var(--accent-text); border-left-color: var(--accent-text); font-weight: 600; }
.hc-all { display: inline-block; margin-top: 12px; font-size: .88rem; color: var(--muted); }

.hc-related { margin: 48px 0 32px; }
.hc-art-main .hc-related h2 { font-size: 1.2rem; margin: 0 0 14px; border: 0; padding: 0; }
.hc-art-main .hc-list b { font-size: 1rem; }
.hc-art-main .hc-list li { margin: 0; color: inherit; }

/* ---------- mobile ---------- */
@media (max-width: 980px) {
  .hc-art { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hc-aside { display: none; }
  .hc-toc-m { display: block; }
  .hc-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .hc-hero { padding: 34px 0 30px; }
  .hc-lede { font-size: 1rem; margin-bottom: 20px; }
  .hc-cols { grid-template-columns: 1fr; gap: 10px; }
  .hc-col { padding: 15px; }
  .hc-list-2 { grid-template-columns: 1fr; }
  .hc-list-2 li:nth-child(2) { border-top: 1px solid var(--border); }
  .hc-list-2 li:nth-child(even) { border-left: 0; }
  .hc-list a { padding: 14px 16px; }
  .hc-contact { flex-direction: column; align-items: flex-start; text-align: left; padding: 20px; gap: 14px; }
  .hc-contact-actions { width: 100%; }
  .hc-contact-actions .btn { flex: 1; }
  .hc-colhead { gap: 14px; }
  .hc-ico-lg { width: 52px; height: 52px; font-size: 1.6rem; }
  .hc-band { padding: 12px 0; }
  .hc-band .hc-search input { height: 46px; }
  .hc-body h2 { font-size: 1.25rem; }
  .hc-tries { justify-content: flex-start; }
  .hc-hero-in { text-align: left; }
  .hc-search-big input { height: 54px; }
}
@media (prefers-reduced-motion: reduce) { .hc-scene *, .hc-contact-buddy { animation: none !important; } .hc-s-ok { opacity: 1; } }
