/* Nikox-Game : tutoriel illustré « Bot Discord » (vue nikox-guide-bot.blade.php).
   Feuille chargée sur cette page seulement ; couleurs et polices = variables du thème (layouts/colors + nikox.css). */
.nx-gb {
    --gb-discord: #4752C4;
    --gb-discord-soft: hsl(235 86% 95%);
    --gb-line: hsl(var(--color-neutral));
    --gb-card: hsl(var(--color-background-secondary));
    --gb-ink: hsl(var(--color-base));
    --gb-muted: hsl(var(--color-muted));
    max-width: 54rem; color: var(--gb-ink);
}
.dark .nx-gb { --gb-discord: #7983F5; --gb-discord-soft: hsl(235 40% 20%); }
.nx-gb ::selection { background: var(--nx-gold); color: hsl(254 44% 14%); }
.nx-gb a:focus-visible, .nx-gb summary:focus-visible { outline: 2px solid var(--nx-gold); outline-offset: 3px; border-radius: .4rem; }
.nx-gb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nx-gb svg { flex: none; }

/* ---------- en-tête ---------- */
.nx-gb-head h1 { font-size: clamp(2.1rem, 1.5rem + 2vw, 2.9rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
.nx-gb-chapo { margin-top: .9rem; max-width: 64ch; font-size: 1.12rem; line-height: 1.6; color: var(--gb-muted); }
.nx-gb-chapo strong { color: var(--gb-ink); }
.nx-gb-reperes { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.1rem; }
.nx-gb-reperes li { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .92rem; }
.nx-gb-reperes svg { width: 1.15rem; height: 1.15rem; color: var(--nx-violet-ink); }
.nx-gb-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- sections ---------- */
.nx-gb-section { margin-top: 3.75rem; scroll-margin-top: 6rem; }
.nx-gb-section > h2 { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }
.nx-gb-lead { margin-top: .45rem; max-width: 64ch; color: var(--gb-muted); }
.nx-gb-lead strong { color: var(--gb-ink); }

/* ---------- les trois pièces : une bande reliée par des flèches ---------- */
.nx-gb-pieces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 1.4rem 0 0; padding: 0; list-style: none; }
.nx-gb-piece { position: relative; padding: 1.2rem 1.4rem 1.3rem; background: var(--gb-card); border: 1.5px solid var(--gb-line); }
.nx-gb-piece + .nx-gb-piece { border-left: 0; }
.nx-gb-piece:first-child { border-radius: 1.1rem 0 0 1.1rem; }
.nx-gb-piece:last-child { border-radius: 0 1.1rem 1.1rem 0; }
.nx-gb-piece:not(:last-child)::after {
    content: ''; position: absolute; z-index: 1; top: 2.05rem; right: -.62rem; width: 1.15rem; height: 1.15rem;
    background: var(--gb-card); border-top: 1.5px solid var(--gb-line); border-right: 1.5px solid var(--gb-line); transform: rotate(45deg);
}
.nx-gb-piece-ico { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .8rem; margin-bottom: .8rem; }
.nx-gb-piece-ico svg { width: 1.4rem; height: 1.4rem; }
.nx-gb-piece[data-piece="badge"] .nx-gb-piece-ico { background: var(--gb-discord-soft); color: var(--gb-discord); }
.nx-gb-piece[data-piece="bureau"] .nx-gb-piece-ico { background: hsl(var(--color-primary) / .14); color: var(--nx-violet-ink); }
.nx-gb-piece[data-piece="embauche"] .nx-gb-piece-ico { background: var(--nx-gold-soft); color: var(--nx-gold-ink); }
.nx-gb-piece h3 { font-family: var(--font-display, inherit); font-size: 1.3rem; font-weight: 800; letter-spacing: -0.015em; }
.nx-gb-piece-ou { margin-top: .1rem; font-size: .85rem; font-weight: 700; color: var(--nx-violet-ink); }
.nx-gb-piece p:last-child { margin-top: .55rem; font-size: .95rem; line-height: 1.55; color: var(--gb-muted); }
.nx-gb-piece strong { color: var(--gb-ink); }

/* ---------- trajet des messages : bot ⇄ Discord ⇄ serveur ---------- */
.nx-gb-flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(4.5rem, .8fr) minmax(0, 1fr) minmax(4.5rem, .8fr) minmax(0, 1fr); align-items: center; gap: 0; margin: 1.75rem 0 0; }
.nx-gb-node { display: grid; justify-items: center; gap: .15rem; padding: .95rem .6rem; border-radius: 1rem; text-align: center; background: var(--gb-card); border: 1.5px solid var(--gb-line); box-shadow: var(--nx-lift); }
.nx-gb-node svg { width: 1.6rem; height: 1.6rem; color: var(--nx-violet-ink); margin-bottom: .2rem; }
.nx-gb-node b { font-weight: 800; }
.nx-gb-node span { font-size: .8rem; line-height: 1.3; color: var(--gb-muted); }
.nx-gb-node.is-discord { background: var(--gb-discord); border-color: var(--gb-discord); color: #fff; }
.nx-gb-node.is-discord svg, .nx-gb-node.is-discord span { color: rgb(255 255 255 / .88); }
.dark .nx-gb-node.is-discord { background: #4F5BD5; border-color: #4F5BD5; }
.nx-gb-wire { position: relative; display: grid; justify-items: center; gap: .45rem; padding: 0 .35rem; }
.nx-gb-wire i { position: relative; display: block; width: 100%; height: 2px; background: repeating-linear-gradient(90deg, var(--gb-line) 0 6px, transparent 6px 11px); }
/* le seul mouvement de la page : un message qui fait l'aller-retour sur chaque fil */
.nx-gb-wire i::after { content: ''; position: absolute; top: -4px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--nx-gold); box-shadow: 0 1px 3px rgb(27 20 51 / .3); animation: nx-gb-message 3.2s cubic-bezier(.65, 0, .35, 1) infinite alternate; }
.nx-gb-wire.is-retour i::after { animation-delay: -1.6s; }
.nx-gb-wire span { font-size: .75rem; font-weight: 700; line-height: 1.25; text-align: center; color: var(--gb-muted); }
@keyframes nx-gb-message { from { left: 0; } to { left: calc(100% - 10px); } }

/* ---------- encadrés ---------- */
.nx-gb-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; align-items: start; margin-top: 1.5rem; padding: 1rem 1.15rem; border-radius: 1rem; background: var(--nx-sunk); line-height: 1.55; }
.nx-gb-note svg { width: 1.35rem; height: 1.35rem; margin-top: .1rem; color: var(--nx-violet-ink); }
.nx-gb-note.is-gold { background: var(--nx-gold-soft); }
.nx-gb-note.is-gold svg { color: var(--nx-gold-ink); }
.nx-gb-note p { color: var(--gb-ink); }

/* ---------- tableau « quel bot » ---------- */
.nx-gb-table-wrap { margin-top: 1.25rem; overflow-x: auto; border: 1.5px solid var(--gb-line); border-radius: 1.1rem; background: var(--gb-card); }
.nx-gb-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.nx-gb-table thead th { padding: .75rem 1rem; text-align: left; font-size: .78rem; font-weight: 800; color: var(--gb-muted); background: var(--nx-sunk); }
.nx-gb-table tbody th, .nx-gb-table td { padding: .95rem 1rem; text-align: left; vertical-align: middle; border-top: 1px solid var(--gb-line); line-height: 1.45; }
.nx-gb-table td { color: var(--gb-muted); }
.nx-gb-bot { display: flex; align-items: center; gap: .7rem; min-width: 11rem; }
.nx-gb-bot img { width: 2.9rem; height: 2.9rem; border-radius: .7rem; object-fit: cover; }
.nx-gb-bot b { display: block; font-weight: 800; color: var(--gb-ink); }
.nx-gb-bot small { display: block; font-size: .78rem; font-weight: 600; color: var(--gb-muted); }
.nx-gb-offre { display: inline-flex; align-items: center; gap: .3rem; font-weight: 800; white-space: nowrap; color: var(--nx-violet-ink); transition: gap .2s cubic-bezier(.16, 1, .3, 1); }
.nx-gb-offre:hover { gap: .55rem; }
.nx-gb-offre svg { width: 1.05rem; height: 1.05rem; }

/* ---------- pas-à-pas ---------- */
.nx-gb-steps { margin: 1.6rem 0 0; padding: 0; list-style: none; }
.nx-gb-step { position: relative; padding: 0 0 2.6rem 3.75rem; scroll-margin-top: 6rem; }
.nx-gb-step:not(:last-child)::before { content: ''; position: absolute; left: 1.28rem; top: 3rem; bottom: .4rem; width: 2px; background: var(--gb-line); }
.nx-gb-step-head { display: flex; gap: 1.1rem; align-items: flex-start; margin-left: -3.75rem; }
.nx-gb-num { display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; font-family: var(--font-display, inherit); font-weight: 800; font-size: 1.15rem;
    color: #fff; background: hsl(var(--color-primary)); box-shadow: 0 3px 0 var(--nx-violet-deep); }
.nx-gb-lieu { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: .5rem; font-size: .78rem; font-weight: 800; }
.nx-gb-lieu svg { width: .95rem; height: .95rem; }
.nx-gb-lieu[data-lieu="discord"] { background: var(--gb-discord-soft); color: var(--gb-discord); }
.nx-gb-lieu[data-lieu="panel"] { background: hsl(var(--color-primary) / .13); color: var(--nx-violet-ink); }
.nx-gb-lieu[data-lieu="serveur"] { background: var(--nx-ok-soft); color: var(--nx-ok); }
.nx-gb-step h3 { margin-top: .4rem; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.nx-gb-clics { display: grid; gap: .55rem; margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: clic; }
.nx-gb-clics li { position: relative; padding-left: 1.7rem; line-height: 1.6; counter-increment: clic; }
.nx-gb-clics li::before { content: counter(clic, lower-alpha); position: absolute; left: 0; top: .12rem; display: grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%;
    font-size: .7rem; font-weight: 800; color: var(--nx-violet-ink); background: var(--nx-sunk); }
.nx-gb a:not(.nx-btn):not(.nx-gb-offre):not(.nx-gb-shot-frame) { color: var(--nx-violet-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.nx-gb kbd { display: inline-block; padding: .02rem .42rem; border-radius: .38rem; border: 1px solid var(--gb-line); border-bottom-width: 2.5px; background: var(--gb-card);
    font-family: inherit; font-size: .86em; font-weight: 700; line-height: 1.5; white-space: nowrap; color: var(--gb-ink); }
.nx-gb code { white-space: nowrap; font-family: var(--font-mono, ui-monospace, monospace); font-size: .86em; padding: .08em .38em; border-radius: .35rem; background: var(--nx-sunk); color: var(--gb-ink); }
.nx-gb-pourquoi { display: flex; gap: .6rem; align-items: flex-start; margin-top: 1rem; padding: .8rem 1rem; border-radius: .9rem; background: var(--nx-sunk); font-size: .93rem; line-height: 1.55; color: var(--gb-muted); }
.nx-gb-pourquoi svg { width: 1.2rem; height: 1.2rem; margin-top: .12rem; color: var(--nx-gold-deep); }
.dark .nx-gb-pourquoi svg { color: var(--nx-gold); }
.nx-gb-pourquoi b, .nx-gb-pourquoi strong { color: var(--gb-ink); }

/* captures d'écran */
.nx-gb-shots { display: grid; gap: 1.1rem; margin-top: 1.15rem; }
.nx-gb-shot { margin: 0; }
.nx-gb-shot-frame { position: relative; display: block; overflow: hidden; border-radius: .95rem; border: 1.5px solid var(--gb-line); background: var(--nx-console); box-shadow: var(--nx-lift); }
.nx-gb-shot-frame img { display: block; width: 100%; height: auto; transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
.nx-gb-shot-frame:hover img { transform: scale(1.012); }
.nx-gb-repere { position: absolute; border: 3px solid var(--nx-gold); border-radius: .6rem; box-shadow: 0 2px 10px -2px rgb(27 20 51 / .45); pointer-events: none; }
.nx-gb-shot figcaption { margin-top: .5rem; font-size: .85rem; line-height: 1.45; color: var(--gb-muted); }

/* ---------- problèmes fréquents ---------- */
.nx-gb-faq { margin-top: 1.1rem; border-top: 1px solid var(--gb-line); }
.nx-gb-faq details { border-bottom: 1px solid var(--gb-line); }
.nx-gb-faq summary { display: flex; align-items: center; gap: .65rem; padding: .95rem .2rem; cursor: pointer; list-style: none; font-weight: 700; }
.nx-gb-faq summary::-webkit-details-marker { display: none; }
.nx-gb-faq summary svg { width: 1.2rem; height: 1.2rem; color: var(--nx-violet-ink); }
.nx-gb-faq summary::after { content: ''; margin-left: auto; width: .55rem; height: .55rem; border-right: 2px solid var(--gb-muted); border-bottom: 2px solid var(--gb-muted); transform: rotate(45deg) translateY(-2px); transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.nx-gb-faq details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.nx-gb-faq summary:hover { color: var(--nx-violet-ink); }
.nx-gb-faq details p { padding: 0 .2rem 1.05rem 2.05rem; line-height: 1.6; color: var(--gb-muted); }

.nx-gb-liste { display: grid; gap: .6rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.nx-gb-liste li { position: relative; padding-left: 1.6rem; line-height: 1.6; color: var(--gb-muted); }
.nx-gb-liste li::before { content: ''; position: absolute; left: .15rem; top: .48em; width: .85rem; height: .45rem; border-left: 2.5px solid var(--nx-ok); border-bottom: 2.5px solid var(--nx-ok); transform: rotate(-45deg); }
.nx-gb-liste strong { color: var(--gb-ink); }

/* ---------- écrans moyens et petits ---------- */
@media (min-width: 900px) { .nx-gb-shots.is-duo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
    .nx-gb-pieces { grid-template-columns: minmax(0, 1fr); }
    .nx-gb-piece + .nx-gb-piece { border-left: 1.5px solid var(--gb-line); border-top: 0; }
    .nx-gb-piece:first-child { border-radius: 1.1rem 1.1rem 0 0; }
    .nx-gb-piece:last-child { border-radius: 0 0 1.1rem 1.1rem; }
    .nx-gb-piece:not(:last-child)::after { top: auto; bottom: -.62rem; right: auto; left: 1.85rem; transform: rotate(135deg); }
    .nx-gb-flow { grid-template-columns: minmax(0, 1fr); justify-items: stretch; max-width: 22rem; }
    .nx-gb-wire { padding: .5rem 0; grid-template-columns: auto auto; justify-content: center; align-items: center; gap: .75rem; }
    .nx-gb-wire i { width: 2px; height: 2.6rem; background: repeating-linear-gradient(180deg, var(--gb-line) 0 6px, transparent 6px 11px); }
    .nx-gb-wire i::after { left: -4px; animation-name: nx-gb-message-v; }
    .nx-gb-wire span { text-align: left; }
    .nx-gb-table thead { display: none; }
    .nx-gb-table, .nx-gb-table tbody, .nx-gb-table tr, .nx-gb-table th, .nx-gb-table td { display: block; }
    .nx-gb-table tr { padding: .9rem 1rem; border-top: 1px solid var(--gb-line); }
    .nx-gb-table tr:first-child { border-top: 0; }
    .nx-gb-table tbody th, .nx-gb-table td { padding: .2rem 0; border: 0; }
    .nx-gb-table td:last-child { padding-top: .5rem; }
}
@keyframes nx-gb-message-v { from { top: 0; } to { top: calc(100% - 10px); } }
@media (max-width: 560px) {
    .nx-gb-step { padding-left: 0; }
    .nx-gb-step-head { margin-left: 0; }
    .nx-gb-step:not(:last-child)::before { display: none; }
    .nx-gb-actions .nx-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .nx-gb-wire i::after { animation: none; left: calc(50% - 5px); }
    @media (max-width: 820px) { .nx-gb-wire i::after { left: -4px; top: calc(50% - 5px); } }
    .nx-gb-shot-frame img, .nx-gb-offre, .nx-gb-faq summary::after { transition: none; }
}
