/* nexarbots.fr : les gris de Discord (le client y passe ses journées) + l'or du logo pour les actions. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --night: #313338;
  --night-2: #2b2d31;
  --slate: #2b2d31;
  --slate-2: #1e1f22;
  --line: #3f4147;
  --line-soft: #393b40;
  --chalk: #f2f3f5;
  --mist: #b5bac1;
  --dim: #949ba4;
  --gold: #f4c24f;
  --gold-deep: #e0ab2f;
  --cyan: #00a8fc;
  --ok: #2dc76d;
  --bad: #f23f43;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --text: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  --measure: 66ch;
  --wrap: 70rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--chalk);
  font: 400 1rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure {
  margin: 0;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #7ad8ff;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

code, kbd {
  font: 500 0.88em/1 var(--mono);
  background: var(--slate-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.14em 0.4em;
  color: var(--chalk);
  white-space: nowrap;
}

strong {
  font-weight: 600;
  color: var(--chalk);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--gold);
  color: #1b1405;
  font-weight: 600;
  border-radius: 8px;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.display {
  font-family: var(--display);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

/* ─── Boutons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0 1.2rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 0.95rem/1 var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-gold {
  background: var(--gold);
  color: #1b1405;
}

.btn-gold:hover {
  background: var(--gold-deep);
  color: #1b1405;
}

.btn-quiet {
  border-color: var(--line);
  color: var(--chalk);
}

.btn-quiet:hover {
  border-color: #3a4558;
  background: var(--slate);
  color: var(--chalk);
}

.btn-small {
  min-height: 2.25rem;
  padding: 0 0.9rem;
  font-size: 0.9rem;
  border-radius: 8px;
}

/* ─── En-tête ─── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #1e1f22;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--chalk);
  text-decoration: none;
  font: 700 1.12rem/1 var(--display);
}

.brand:hover {
  color: var(--chalk);
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.brand-nexar { color: var(--gold); }
.brand-bots { color: var(--cyan); }

.site-nav {
  display: flex;
  gap: 1.6rem;
  margin-right: auto;
}

.site-nav a {
  color: var(--mist);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--chalk);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 0.4rem;
  background: none;
  border: 0;
  color: var(--chalk);
  cursor: pointer;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* ─── Accueil : hero ─── */

.hero {
  padding-block: 5rem 3rem;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 4rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  max-width: 16ch;
}

.hero-lead {
  margin-top: 1.4rem;
  font-size: 1.12rem;
  color: var(--mist);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-note {
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: var(--dim);
}

/* Fenêtre Discord (vraies commandes, vraies descriptions du +help) : l'élément marquant de la page */
.dc {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  background: #313338;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #1e1f22, 0 18px 40px rgba(0, 0, 0, 0.35);
  font: 400 0.95rem/1.4 var(--text);
  color: #dbdee1;
}

.dc-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  background: #1e1f22;
}

.dc-rail img {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: #313338;
  object-fit: cover;
}

.dc-guild {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #313338;
  color: #dbdee1;
  font-size: 0.9rem;
  font-weight: 600;
}

.dc-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dc-bar {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #26282c;
  color: #f2f3f5;
  font-weight: 600;
  font-size: 0.95rem;
}

.dc-hash {
  color: #80848e;
  font-weight: 500;
  margin-right: 0.15rem;
}

.dc-log {
  padding: 0.4rem 0 0.6rem;
}

.dc-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 1rem 1rem;
  padding: 8px;
  background: #383a40;
  border-radius: 8px;
}

.dc-input button {
  padding: 0.3rem 0.6rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #b5bac1;
  font: 500 0.86rem/1.2 var(--mono);
  cursor: pointer;
}

.dc-input button:hover {
  background: #404249;
  color: #f2f3f5;
}

.dc-input button[aria-selected="true"] {
  background: #4e5058;
  color: #fff;
}

.dc-msg {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
}

.dc-msg + .dc-msg {
  padding-top: 0.2rem;
}

.dc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #5865f2;
}

.dc-avatar.user {
  background: #4e5058;
}

.dc-author {
  font-weight: 600;
  color: #f2f3f5;
}

.dc-tag {
  margin-left: 0.3rem;
  background: #5865f2;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  vertical-align: 0.1em;
}

.dc-time {
  margin-left: 0.35rem;
  color: #949ba4;
  font-size: 0.74rem;
}

.dc-embed {
  margin-top: 0.4rem;
  padding: 0.7rem 0.9rem;
  background: #2b2d31;
  border-left: 4px solid var(--gold);
  border-radius: 4px;
}

.dc-embed b {
  display: block;
  color: #f2f3f5;
  margin-bottom: 0.35rem;
}

.dc-embed ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.2rem;
  font-size: 0.86rem;
}

.dc-embed code {
  background: #1e1f22;
  border-color: #1e1f22;
  color: #dbdee1;
}

.demo-caption {
  margin-top: 0.8rem;
  font-size: 0.84rem;
  color: var(--dim);
}

/* ─── Sections ─── */

.section {
  padding-block: 5rem 1rem;
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.35rem);
}

.section-head p {
  margin-top: 0.9rem;
  color: var(--mist);
  font-size: 1.05rem;
  max-width: var(--measure);
}

/* Modules : liste à deux colonnes, séparée par des filets */
.modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 3.5rem;
  border-top: 1px solid var(--line);
}

.modules > div {
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.modules dt {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-weight: 600;
  font-size: 1.04rem;
}

.modules dt a {
  color: var(--chalk);
  text-decoration: none;
}

.modules dt a:hover {
  color: var(--chalk);
  text-decoration: underline;
}

.modules dd {
  margin-top: 0.35rem;
  color: var(--mist);
  font-size: 0.95rem;
}

.modules-foot {
  margin-top: 1.4rem;
  color: var(--dim);
  font-size: 0.92rem;
}

/* Étapes */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: step;
  border-top: 1px solid var(--line);
}

.steps li {
  position: relative;
  padding: 1.5rem 1.5rem 0 0;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: block;
  font: 700 2rem/1 var(--display);
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.steps li::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.steps h3 {
  font: 600 1.04rem/1.3 var(--text);
}

.steps p {
  margin-top: 0.45rem;
  color: var(--mist);
  font-size: 0.95rem;
}

.steps-note {
  margin-top: 2rem;
  color: var(--dim);
  font-size: 0.92rem;
}

/* Tarif : un seul bloc, le prix est le même pour tout le monde */
.price {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3.5rem;
  padding: 2.25rem;
  background: var(--slate);
  border-radius: 8px;
}

.price-amount {
  font: 750 3.6rem/1 var(--display);
  letter-spacing: -0.03em;
}

.price-amount small {
  font: 500 1.05rem/1 var(--text);
  color: var(--mist);
  letter-spacing: 0;
  margin-left: 0.3rem;
}

.price-trial {
  margin-top: 0.9rem;
  color: var(--ok);
  font-weight: 600;
}

.price .hero-actions {
  margin-top: 1.6rem;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.price-table th,
.price-table td {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-weight: 400;
}

.price-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.price-facts {
  margin-top: 1.4rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  color: var(--mist);
  font-size: 0.93rem;
}

/* Panel : texte + liste de ce qu'il fait vraiment */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
}

.plain-list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line);
}

.plain-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--mist);
}

.plain-list li strong {
  display: block;
  margin-bottom: 0.1rem;
}

.aside-note {
  margin-top: 1.3rem;
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
  color: var(--mist);
  font-size: 0.95rem;
}

/* Équipe */
.team p + p {
  margin-top: 1rem;
}

.team p {
  color: var(--mist);
  max-width: var(--measure);
}

.team-names {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 2rem;
}

.team-names div {
  padding-left: 1rem;
  border-left: 2px solid var(--line);
}

.team-names b {
  display: block;
  font: 700 1.2rem/1.2 var(--display);
}

.team-names span {
  color: var(--dim);
  font-size: 0.9rem;
}

/* FAQ */
.faq {
  max-width: 50rem;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line-soft);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--gold);
  font-weight: 700;
  flex: none;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details > div {
  padding-bottom: 1.2rem;
  color: var(--mist);
  max-width: var(--measure);
}

.faq details > div p + p {
  margin-top: 0.7rem;
}

/* Bandeau support */
.support-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 4.5rem;
  padding: 2rem 2.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.support-band h2 {
  font-size: 1.6rem;
}

.support-band p {
  margin-top: 0.5rem;
  color: var(--mist);
}

.online {
  color: var(--ok);
  font-weight: 600;
}

/* ─── Pied de page ─── */

.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--line-soft);
  background: var(--night-2);
  padding: 3rem 0 2.5rem;
  color: var(--mist);
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
}

.site-footer .footer-title {
  font: 600 0.95rem/1.3 var(--text);
  color: var(--chalk);
  margin-bottom: 0.8rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-footer a {
  color: var(--mist);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--chalk);
}

.footer-about p {
  margin-top: 0.9rem;
  max-width: 34ch;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.84rem;
  color: var(--dim);
}

.footer-bottom a {
  color: var(--dim);
  margin-right: 1rem;
}

/* ─── Pages de texte (légal) ─── */

.prose {
  padding-block: 4rem 0;
  max-width: 46rem;
}

.prose h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
}

.prose .updated {
  margin-top: 0.7rem;
  color: var(--dim);
  font-size: 0.9rem;
}

.prose .lead {
  margin-top: 1.6rem;
  font-size: 1.06rem;
  color: var(--mist);
}

.prose h2 {
  margin-top: 2.6rem;
  font: 650 1.3rem/1.3 var(--display);
}

.prose h2 + p,
.prose h2 + ul {
  margin-top: 0.7rem;
}

.prose p,
.prose li {
  color: var(--mist);
}

.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 0.8rem;
}

.prose ul {
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
}

.prose dl {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.5rem 1.5rem;
}

.prose dt {
  color: var(--dim);
}

.prose dd {
  color: var(--chalk);
}

/* ─── Documentation ─── */

.docs {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: 3.5rem;
  padding-top: 2.5rem;
}

.docs-toc {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  font-size: 0.92rem;
}

.docs-toc input {
  width: 100%;
  margin-bottom: 1.4rem;
  padding: 0.6rem 0.75rem;
  background: var(--slate);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--chalk);
  font: inherit;
}

.docs-toc input:focus {
  outline: none;
  border-color: var(--cyan);
}

.docs-toc p {
  margin: 1.4rem 0 0.35rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dim);
}

.docs-toc p:first-of-type {
  margin-top: 0;
}

.docs-toc ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2px;
}

/* Comme la liste des salons Discord : survol gris, sélection plus claire */
.docs-toc a {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  color: var(--dim);
  text-decoration: none;
}

.docs-toc a:hover {
  background: #35373c;
  color: var(--mist);
}

.docs-toc a.is-active {
  background: #404249;
  color: #fff;
}

.docs-main {
  min-width: 0;
}

.docs-main section {
  padding-bottom: 3.5rem;
}

.docs-main h1 {
  font-size: clamp(2rem, 4.5vw, 2.7rem);
}

.docs-main h2 {
  font: 700 1.65rem/1.2 var(--display);
  letter-spacing: -0.02em;
}

.docs-main h3 {
  margin-top: 2rem;
  font: 600 1.08rem/1.3 var(--text);
}

.docs-main p,
.docs-main li {
  color: var(--mist);
  max-width: var(--measure);
}

.docs-main h2 + p,
.docs-main h1 + p,
.docs-main h3 + p,
.docs-main h3 + ol,
.docs-main h3 + ul {
  margin-top: 0.8rem;
}

.docs-main p + p,
.docs-main p + ol,
.docs-main p + ul,
.docs-main ol + p,
.docs-main ul + p {
  margin-top: 0.8rem;
}

.docs-main ol,
.docs-main ul {
  padding-left: 1.3rem;
  display: grid;
  gap: 0.45rem;
}

.note {
  margin-top: 1.4rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--cyan);
  background: var(--night-2);
  color: var(--mist);
  max-width: var(--measure);
}

.note.warn {
  border-left-color: var(--bad);
}

.cmd-count {
  margin-top: 0.4rem;
  color: var(--dim);
  font-size: 0.9rem;
}

.cmd-table {
  width: 100%;
  margin-top: 1.2rem;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.cmd-table th {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dim);
}

.cmd-table td {
  padding: 0.6rem 1.5rem 0.6rem 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  color: var(--mist);
}

.cmd-table td:first-child {
  width: 42%;
}

.cmd-table td:first-child code {
  white-space: normal;
  cursor: copy;
}

.cmd-table td:last-child {
  padding-right: 0;
}

.cmd-table tr.is-copied code {
  border-color: var(--ok);
}

.no-result {
  color: var(--dim);
}

/* ─── Responsive ─── */

@media (max-width: 980px) {
  .hero .wrap,
  .split,
  .price {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 1.5rem;
  }

  .docs {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .docs-toc {
    position: static;
    max-height: none;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line-soft);
  }

  .docs-toc ul {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer .wrap {
    grid-template-columns: 1fr 1fr;
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .site-header .wrap {
    flex-wrap: wrap;
    gap: 0;
  }

  .site-nav,
  .site-actions {
    display: none;
    width: 100%;
  }

  .site-header.is-open .site-nav {
    display: grid;
    gap: 0;
    padding: 0.5rem 0;
    border-top: 1px solid var(--line-soft);
  }

  .site-header.is-open .site-nav a {
    padding: 0.75rem 0;
  }

  .site-header.is-open .site-actions {
    display: flex;
    padding-bottom: 1rem;
  }

  .modules {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .price {
    padding: 1.5rem;
  }

  .prose dl {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .prose dd {
    margin-bottom: 0.6rem;
  }

  .cmd-table,
  .cmd-table tbody,
  .cmd-table tr,
  .cmd-table td {
    display: block;
    width: 100% !important;
  }

  .cmd-table thead {
    display: none;
  }

  .cmd-table tr {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .cmd-table td {
    padding: 0;
    border: 0;
  }

  .cmd-table td + td {
    margin-top: 0.3rem;
  }
}

@media (max-width: 480px) {
  .site-footer .wrap {
    grid-template-columns: 1fr;
  }

  .docs-toc ul {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
