/* Page « Aide » du panel Jeux : présentation des jeux, règles, commandes et récompenses.
   Utilise les variables du thème du panel (clair / sombre) ; chargée à la demande par la page. */

.help { display: flex; flex-direction: column; gap: 22px; }
.help h2, .help h3, .help h4 { margin: 0; }

/* ---------------------------------------------------------------- bandeau d'accueil */
.help-hero {
  position: relative; overflow: hidden; padding: 30px 30px 26px;
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow);
  background:
    radial-gradient(28rem 12rem at 100% 0%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 17%, var(--surface)), var(--surface) 70%);
}
.help-hero .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.help-hero h2 { margin-top: 6px; font-size: 26px; letter-spacing: -0.03em; }
.help-hero p { margin-top: 8px; max-width: 62ch; color: var(--muted); line-height: 1.55; font-size: 14.5px; }
.help-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.help-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 82%, transparent);
}
.help-chip b { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- sommaire */
.help-toc { display: flex; flex-wrap: wrap; gap: 8px; }
.help-toc button {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 500;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: border-color .15s, background .15s, transform .15s;
}
.help-toc button:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); background: var(--accent-soft); transform: translateY(-1px); }

.help-label {
  display: flex; align-items: center; gap: 10px; margin: 6px 0 -8px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.help-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------------------------------------------------------------- fiche d'un jeu */
.game {
  --game: var(--accent);
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 16px;
}
.game-head {
  display: flex; gap: 18px; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, color-mix(in srgb, var(--game) 14%, transparent), transparent 75%);
}
.game-emoji {
  flex: none; width: 60px; height: 60px; display: grid; place-items: center; font-size: 30px; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, var(--game), color-mix(in srgb, var(--game) 60%, #000)); box-shadow: 0 8px 22px color-mix(in srgb, var(--game) 38%, transparent);
}
.game-head h3 { font-size: 20px; letter-spacing: -0.02em; }
.game-head p { margin-top: 3px; color: var(--muted); line-height: 1.45; }
.game-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.game-badges span {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  border: 1px solid color-mix(in srgb, var(--game) 35%, var(--border)); background: color-mix(in srgb, var(--game) 10%, transparent);
}
.game-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 26px; padding: 24px; }
.game-body > div { min-width: 0; }
.game-body h4 { margin-bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.game-foot { padding: 16px 24px 22px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface-2) 55%, transparent); }

.steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; }
.steps li { counter-increment: step; display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.steps li::before {
  content: counter(step); flex: none; width: 24px; height: 24px; margin-top: 1px; display: grid; place-items: center; border-radius: 50%;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--game);
}

/* ---------------------------------------------------------------- démonstration Quintil */
.demo { display: inline-flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface-2); }
.demo-row { display: flex; gap: 6px; }
.demo-tile {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; color: #fff; font-size: 18px; font-weight: 800; text-transform: uppercase;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18);
}
.demo-tile.ok { background: #16a34a; }
.demo-tile.mal { background: #d97706; }
.demo-tile.non { background: #6b7280; }
.demo-tile.empty { background: transparent; border: 2px dashed var(--border); box-shadow: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.legend .ok { background: #16a34a; } .legend .mal { background: #d97706; } .legend .non { background: #6b7280; }

.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.mode { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); line-height: 1.5; }
.mode b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 14px; }
.mode .pill { margin-left: auto; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.mode p { margin: 0; color: var(--muted); font-size: 13px; }

.tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tips li { display: flex; gap: 10px; line-height: 1.5; }
.tips li::before { content: '›'; color: var(--game); font-weight: 800; }

/* ---------------------------------------------------------------- raretés des cartes */
.rarities { display: grid; gap: 8px; }
.rarity {
  --c: #9aa0a6; display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--c) 42%, var(--border)); background: color-mix(in srgb, var(--c) 11%, transparent);
}
.rarity .stars { color: var(--c); letter-spacing: 2px; font-size: 13px; white-space: nowrap; }
.rarity b { font-weight: 600; }
.rarity .pct { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); }
.live { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- commandes */
.cmd-group + .cmd-group { margin-top: 18px; }
.cmd-group h4 { margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cmd { display: grid; grid-template-columns: minmax(210px, 310px) 1fr; gap: 6px 16px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--border); }
.cmd:first-of-type { border-top: 0; }
.cmd code { width: fit-content; max-width: 100%; padding: 3px 9px; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.cmd span { color: var(--muted); line-height: 1.5; }
@media (max-width: 680px) { .cmd { grid-template-columns: 1fr; } .game-head { flex-direction: column; align-items: flex-start; } }

/* ---------------------------------------------------------------- à venir */
.soon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.soon { padding: 15px 17px; border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 65%, transparent); }
.soon b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.soon .tag { margin-left: auto; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); }
.soon p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ---------------------------------------------------------------- page « Infos » : bots, pages, dépannage */
.bots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.bot {
  --bot: var(--accent); display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: calc(var(--radius) + 2px); border: 1px solid var(--border);
  background: linear-gradient(160deg, color-mix(in srgb, var(--bot) 11%, var(--surface)), var(--surface) 55%); box-shadow: var(--shadow); border-top: 3px solid var(--bot);
}
.bot p { margin: 0; line-height: 1.5; font-size: 13.5px; }
.bot-top { display: flex; align-items: center; gap: 12px; }
.bot-ico { flex: none; width: 42px; height: 42px; display: grid; place-items: center; font-size: 21px; border-radius: 12px; background: color-mix(in srgb, var(--bot) 18%, transparent); }
.bot-top b { font-size: 15.5px; }
.bot code.prefix { flex: none; min-width: 38px; text-align: center; padding: 5px 10px; font-size: 18px; font-weight: 800; color: #fff; background: var(--bot); border-color: transparent; }
.bot-ex { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; background: var(--surface-2); border: 1px dashed var(--border); }
.bot-ex code { background: transparent; border: 0; padding: 0; font-weight: 600; color: var(--bot); }

.pg { display: flex; align-items: flex-start; gap: 14px; padding: 13px 0; border-top: 1px solid var(--border); }
.pg:first-child { border-top: 0; padding-top: 0; }
.pg:last-child { padding-bottom: 0; }
.pg-ico { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-size: 19px; border-radius: 10px; background: var(--accent-soft); }
.pg b { font-size: 14px; }
.pg p { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.pg .btn { flex: none; }
@media (max-width: 560px) { .pg { flex-wrap: wrap; } .pg .grow { flex-basis: calc(100% - 60px); } }

.faq details { border-top: 1px solid var(--border); padding: 12px 2px; }
.faq details:first-child { border-top: 0; padding-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 10px; }
.faq summary::before { content: '＋'; flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; font-size: 14px; color: var(--accent); background: var(--accent-soft); transition: transform .15s; }
.faq details[open] summary::before { content: '－'; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 8px 0 0 32px; color: var(--muted); line-height: 1.55; }

/* ---------------------------------------------------------------- bandeau d'accueil commun à toutes les pages */
.phero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 26px; padding: 22px 26px;
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow);
  background:
    radial-gradient(26rem 10rem at 100% 0%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 70%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface) 72%);
}
.phero-main { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1 1 380px; }
.phero-ico {
  flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 38%, transparent);
}
.phero-ico svg { width: 25px; height: 25px; stroke: #fff; }
.phero-eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.phero h1 { margin: 2px 0 0; font-size: 25px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.15; }
.phero h1::after { content: none; }
.phero p { margin: 6px 0 0; max-width: 70ch; color: var(--muted); font-size: 14px; line-height: 1.5; }
.phero .page-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .phero { padding: 18px 18px; margin-bottom: 20px; }
  .phero-ico { width: 44px; height: 44px; border-radius: 13px; }
  .phero h1 { font-size: 21px; }
}
