/*
 * Account pages (pages/account/*) in the 2026-09-20 look. Loaded on top of css/fmx.css.
 *
 * SAME PRINCIPLE AS THE PREVIOUS MIGRATION, AND FOR THE SAME REASON: the class names here are the
 * ones js/account.js already writes (acc-pack, acc-table, acc-key-item, acc-msg, acc-num...) and the
 * ones the markup already carries (cx-btn, cx-label, cx-path, cx-wrap). They are restyled, never
 * renamed, so the money code is not touched to change the paint. js/account.js is untouched by this
 * file, and so is every endpoint it calls.
 *
 * rooms.html and room.html stay on the old sheets: Rooms is off the public offer.
 */

/* The shared shell classes (cx-wrap, cx-btn, lx-btn, cx-label, cx-path) moved to css/fmx.css
   when the content pages needed them too. */

/* ── sign in, sign up, sign out, callback, password reset: one centred card ───────────────── */
.acc-shell {
  min-height: calc(100vh - 54px - 220px); display: flex; align-items: center; justify-content: center;
  padding: clamp(32px, 5vw, 64px) var(--gutter); background: var(--surface);
}
.acc-card {
  width: 100%; max-width: 410px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(22px, 3vw, 30px); box-shadow: 0 1px 2px rgba(11,27,43,.05), 0 18px 46px rgba(11,27,43,.09);
}
.acc-card--center { text-align: center; }
.acc-kick { display: block; margin-bottom: 10px; }
.acc-title { font-family: Manrope, sans-serif; font-size: clamp(19px, 2.2vw, 23px); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.15; margin: 0 0 7px; color: var(--ink); }
.acc-sub { color: var(--body); margin: 0 0 18px; line-height: 1.6; font-size: 13.5px; }
.acc-sub b { color: var(--ink); font-weight: 600; }
.acc-form { display: grid; gap: 14px; }
.acc-form .form-group { display: grid; gap: 6px; }
.acc-form label { font-size: 12.5px; font-weight: 600; color: var(--body); }
.acc-form input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 14px;
}
.acc-form input:focus { outline: 2px solid rgba(27,77,166,.35); outline-offset: 1px; border-color: var(--blue); }
.acc-hint { color: var(--mute); font-family: "IBM Plex Mono", monospace; font-size: 11px; line-height: 1.5; }
.acc-oauth {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; height: 42px;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.acc-oauth:hover { border-color: var(--blue); }
.acc-oauth:disabled { opacity: .5; cursor: default; }
.acc-or {
  display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #9AA9B8;
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
}
.acc-or::before, .acc-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acc-alt { margin: 16px 0 0; color: var(--mute); font-size: 12.5px; }
.acc-alt a { color: var(--blue); }

/* ── messages: the state is in the shape as well as the colour ────────────────────────────── */
.acc-msg {
  margin: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--body); font-size: 12.5px; line-height: 1.5;
}
.acc-msg.is-error { border-color: #EBC9C0; background: #FDF3F0; color: #8C3A22; }
.acc-msg.is-error::before { content: "Error. "; font-weight: 600; }
.acc-msg.is-ok { border-color: #C6E5DC; background: #F1FAF7; color: #146A56; }
.acc-msg.is-ok::before { content: "Done. "; font-weight: 600; }

/* ── dashboard and keys: rail plus content ────────────────────────────────────────────────── */
.acc-layout {
  display: grid; grid-template-columns: 186px minmax(0, 1fr); gap: clamp(18px, 3vw, 38px);
  padding-block: 28px 64px;
}
.acc-rail {
  position: sticky; top: calc(54px + env(safe-area-inset-top, 0px) + 14px); align-self: start;
  display: grid; gap: 1px; font-size: 12.5px;
}
.acc-rail .root { display: none; }
.acc-rail a {
  display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 7px;
  color: var(--body); text-decoration: none; transition: background .25s ease, color .25s ease;
}
.acc-rail a:hover { background: var(--surface); color: var(--ink); }
.acc-rail a.is-on { background: var(--blue-lite); color: var(--blue); font-weight: 600; }
.acc-rail .sep { height: 1px; background: var(--line); margin: 12px 4px; }
.acc-rail .ext { font-size: 12px; color: var(--mute); }
.acc-rail .admin { color: var(--amber); }
.acc-rail .admin:hover { background: #FFF6EC; color: var(--amber); }

.acc-main { min-width: 0; display: grid; gap: 30px; align-content: start; }
.acc-stack { display: grid; gap: 30px; }
.acc-main section[id] { scroll-margin-top: 78px; }
.acc-dash-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; flex-wrap: wrap; }
.acc-dash-head .acc-title { font-size: clamp(21px, 2.5vw, 27px); margin: 5px 0 3px; }
.acc-dash-head .acc-sub { margin: 0; font-size: 13px; color: var(--mute); }
.acc-dash-head .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.acc-h2 { font-family: Manrope, sans-serif; font-size: 15px; font-weight: 700; letter-spacing: -.02em; margin: 0; color: var(--ink); }
.acc-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.acc-note, .acc-tile-note { margin: 9px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--mute); }

/* ── the figures, which are the point of the page ─────────────────────────────────────────── */
.acc-stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin-top: 16px; }
.acc-stat {
  background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 15px 16px 14px;
  display: grid; gap: 7px; align-content: start; min-width: 0;
}
.acc-stat .v {
  font-family: Manrope, sans-serif; font-size: 24px; font-weight: 800; letter-spacing: -.035em;
  color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1;
}
.acc-stat .v small { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; font-weight: 500; color: var(--mute); letter-spacing: 0; margin-left: 5px; }
.acc-stat .v--sm { font-size: 15.5px; }
.acc-stat .d { font-size: 11.5px; line-height: 1.5; color: var(--mute); }
.acc-stat--main { border-color: #C9DAEF; background: linear-gradient(180deg, #F5F9FE, #fff); }
.acc-stat--main .v { font-size: 30px; color: var(--blue); }
.acc-stat .held { color: var(--amber); }

/* ── credits: the packs come from the server, drawn by account.js ─────────────────────────── */
.acc-buy { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; align-items: start; }
.acc-buy-side {
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface); padding: 14px 16px;
  display: grid; gap: 8px; font-size: 12px; line-height: 1.5; color: var(--body);
}
.acc-buy-side div { display: flex; gap: 8px; }
.acc-buy-side div::before { content: ""; flex: none; width: 5px; height: 5px; margin-top: 6px; border-radius: 50%; background: var(--teal); }
.acc-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; }
.acc-packs > .acc-tile-note { grid-column: 1 / -1; margin: 0; }
.acc-pack {
  background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 15px 14px;
  display: grid; gap: 6px; text-align: left; cursor: pointer; color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, border-color .3s ease;
}
.acc-pack:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(11,27,43,.09); border-color: #C9DAEF; }
.acc-pack:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.acc-pack-price { font-family: Manrope, sans-serif; font-size: 23px; font-weight: 800; letter-spacing: -.035em; }
.acc-pack-credits { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--blue); }
.acc-pack-blurb { font-size: 11.5px; line-height: 1.4; color: var(--mute); }
.acc-pack-blurb:empty { display: none; }
.acc-pack::after {
  content: "Buy"; font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--mute);
}
.acc-pack:hover::after { color: var(--blue); }
#buyMsg { margin-top: 12px; }

/* ── the tables account.js writes ─────────────────────────────────────────────────────────── */
.acc-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.acc-scroll > .acc-tile-note { margin: 0; padding: 15px 16px; }
.acc-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.acc-table th {
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mute); text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: var(--surface); font-weight: 500;
}
.acc-table td { padding: 10px 14px; border-bottom: 1px solid #F1F5F9; font-size: 12.5px; color: var(--body); }
.acc-table tr:last-child td { border-bottom: 0; }
.acc-table .acc-num { text-align: right; color: var(--ink); font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; }
.acc-table th.acc-num { text-align: right; }

/* ── keys ─────────────────────────────────────────────────────────────────────────────────── */
.acc-reveal { border: 1px solid #EDD9B6; background: #FFFBF3; border-radius: 11px; padding: 16px 18px; }
.acc-reveal .acc-h2 { color: #7A5C1E; }
.acc-reveal .acc-tile-note { margin: 5px 0 12px; color: var(--body); }
.acc-key-row { display: flex; gap: 10px; flex-wrap: wrap; }
.acc-key {
  flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: "IBM Plex Mono", monospace; font-size: 13px;
  line-height: 1.4; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
#keyList { border: 1px solid var(--line); border-radius: 11px; background: #fff; overflow: hidden; }
.acc-key-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid #F1F5F9; }
.acc-key-item:last-child { border-bottom: 0; }
.acc-key-item > div { display: grid; grid-template-columns: minmax(120px, auto) auto 1fr; gap: 5px 16px; align-items: baseline; min-width: 0; }
.acc-key-item strong { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.acc-key-prefix { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--blue); }
.acc-key-meta { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--mute); }
.acc-key-item.is-revoked strong, .acc-key-item.is-revoked .acc-key-prefix { color: #9AA9B8; text-decoration: line-through; }
.acc-key-revoke { height: 32px; padding: 0 12px; font-size: 12px; border-color: #EBC9C0; color: #9A3412; }
.acc-key-revoke:hover { border-color: #C2410C; background: #FDF3F0; }

@media (max-width: 1000px) {
  .acc-layout { grid-template-columns: 1fr; }
  .acc-rail { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .acc-rail .sep, .acc-rail .ext { display: none; }
  .acc-stats { grid-template-columns: 1fr 1fr; }
  .acc-stat--main { grid-column: 1 / -1; }
  .acc-buy { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .acc-stats { grid-template-columns: 1fr; }
  .acc-key-item { flex-wrap: wrap; }
  .acc-key-item > div { grid-template-columns: 1fr; }
}

/* The "Invite a trader" card: one link to copy, one line saying where it stands. */
.acc-ref-lede { margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: var(--body); max-width: 70ch; }
.acc-ref-link { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.acc-ref-link input { flex: 1 1 260px; min-width: 0; font-family: "IBM Plex Mono", monospace; font-size: 12.5px;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.acc-ref-link[hidden] { display: none; }
.acc-ref-state { margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--mute); }
.acc-ref-state b { color: var(--ink); font-weight: 600; }

/* The subscription card (2026-10-06, js/account.js initSubscription). */
/* .acc-card.acc-sub : la carte seulement ; .acc-sub seul est aussi le sous-titre des pages du compte (15/11, la page join coupait son <b>) */
.acc-card.acc-sub { display: flex; flex-direction: column; gap: 10px; }
.acc-sub-head { display: flex; align-items: center; gap: 10px; }
.acc-sub-body p { margin: 0 0 6px; font-size: 14px; line-height: 1.55; }
.acc-sub-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.acc-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line); color: var(--body); }
.acc-pill.is-ok { border-color: rgba(95,212,196,.5); color: var(--teal-glow); background: rgba(95,212,196,.08); }

/* Postes (2026-11-13) : la page « Autoriser ce poste » et le compteur de « Mes postes ». Les lignes
   de poste reutilisent .acc-key-item, ecrites par js/account.js (deviceRow). */
.acc-conn { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 18px 20px; border: 1px solid #C6E5DC; background: #F1FAF7; border-radius: 11px; }
.acc-conn-code { font-family: "IBM Plex Mono", monospace; font-size: clamp(26px, 6vw, 34px); font-weight: 500; letter-spacing: .14em; color: #146A56; }
.acc-conn-exp { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--mute); }
.acc-conn-form { max-width: 420px; }
.acc-conn-full { display: grid; gap: 10px; }
.acc-dev-count { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--mute); }

/* ── retours beta (js/fmx-feedback.js, 2026-11-16) : bouton flottant + fenetre ─────────────── */
.fb-fab {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  height: 38px; padding: 0 16px; border-radius: 19px; border: 1px solid var(--blue);
  background: var(--surface); color: var(--blue); font: 600 13px/1 Manrope, sans-serif; cursor: pointer;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .28); transition: background .2s ease, color .2s ease;
}
.fb-fab:hover, .fb-fab:focus-visible { background: var(--blue); color: var(--bg, #071320); }
body.fb-open .fb-fab { display: none; }
.fb-scrim {
  position: fixed; inset: 0; z-index: 70; background: rgba(2, 6, 12, .62);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.fb-scrim[hidden] { display: none; }
.fb-box {
  width: min(520px, 100%); box-sizing: border-box; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px 16px;
  display: grid; gap: 12px; color: var(--body); box-shadow: 0 18px 60px rgba(0, 0, 0, .45);
}
.fb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fb-title { margin: 0; font: 700 17px/1.2 Manrope, sans-serif; color: var(--ink); letter-spacing: -.02em; }
.fb-x { border: 0; background: none; color: var(--mute); font-size: 24px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.fb-x:hover { color: var(--ink); }
.fb-sub { margin: -4px 0 0; font-size: 12.5px; color: var(--mute); }
.fb-kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-kind {
  height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: transparent;
  color: var(--body); font: 600 12.5px/1 Manrope, sans-serif; cursor: pointer;
}
.fb-kind.is-on { border-color: var(--blue); background: var(--blue-lite); color: var(--blue); }
.fb-text {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 120px; padding: 10px 12px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--bg, transparent); color: var(--ink);
  font: 13.5px/1.55 inherit; font-family: inherit;
}
.fb-text:focus { outline: none; border-color: var(--blue); }
.fb-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-file-btn {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px dashed var(--line); color: var(--body); font-size: 12.5px; cursor: pointer;
}
.fb-file-btn:hover { border-color: var(--blue); color: var(--blue); }
.fb-file-btn input { display: none; }
.fb-thumb { max-height: 54px; max-width: 120px; border-radius: 6px; border: 1px solid var(--line); }
.fb-file-x { border: 0; background: none; color: var(--mute); font-size: 12px; cursor: pointer; text-decoration: underline; }
.fb-hint { margin: -4px 0 0; font-size: 11.5px; color: var(--mute); }
.fb-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fb-msg { margin: 0; font-size: 12.5px; color: var(--mute); flex: 1; }
.fb-msg.is-error { color: #E5806A; }
.fb-msg.is-ok { color: var(--blue); }
.fb-send { min-width: 110px; margin-left: auto; }
.fb-send[disabled] { opacity: .6; cursor: progress; }

/* ── page « Mes retours » (js/fmx-feedback-page.js, 2026-11-16) : un ticket par carte, le fil dedans ── */
.fbp-card { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); margin-bottom: 10px; overflow: hidden; }
.fbp-card.is-reply { border-color: var(--blue); }
.fbp-head {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; background: transparent;
  color: var(--ink); text-align: left; cursor: pointer; font: inherit; font-size: 13.5px;
}
.fbp-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbp-kind, .fbp-status, .fbp-new { flex: none; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.fbp-k-bug { background: rgba(229, 72, 77, .14); color: #E5806A; }
.fbp-k-idea { background: rgba(139, 108, 255, .16); color: #A893FF; }
.fbp-k-opinion { background: var(--blue-lite); color: var(--blue); }
.fbp-status { border: 1px solid var(--line); color: var(--mute); }
.fbp-s-fixed { border-color: var(--blue); color: var(--blue); }
.fbp-new { background: var(--blue); color: var(--bg, #071320); }
.fbp-thread { padding: 4px 14px 14px; display: grid; gap: 10px; }
.fbp-thread[hidden] { display: none; }
.fbp-msg { border-radius: 9px; padding: 10px 12px; max-width: 88%; }
.fbp-tester { justify-self: end; background: var(--well, rgba(255, 255, 255, .04)); border: 1px solid var(--line); }
.fbp-team { justify-self: start; background: var(--blue-lite); border: 1px solid var(--blue); }
.fbp-who { font-size: 11px; color: var(--mute); margin-bottom: 4px; }
.fbp-team .fbp-who { color: var(--blue); }
.fbp-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.fbp-reply { display: grid; gap: 8px; margin-top: 4px; }
.fbp-reply .lx-btn { justify-self: end; }
@media (max-width: 560px) { .fbp-msg { max-width: 100%; } .fbp-head { flex-wrap: wrap; } .fbp-title { flex-basis: 100%; order: 3; } }
.fbp-reply-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fbp-reply-foot .lx-btn { margin-left: auto; }
.fb-shot { display: block; margin-top: 8px; max-width: 220px; max-height: 160px; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; }
.fb-shot.is-big { max-width: 100%; max-height: none; cursor: zoom-out; }
.fb-shot-missing { font-size: 11.5px; color: var(--mute); }

/* LE PSEUDO DU TRADER (2026-11-20, js/fmx-pseudo.js) : la vue d'ensemble du compte et « Mes Skills
   partagees ». Choisi une fois, definitif : le bloc passe de formulaire a simple ligne. */
.acc-pseudo { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 8px; }
.acc-pseudo.is-required { border-color: var(--accent-line, var(--blue)); }
.acc-pseudo-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.acc-pseudo-name { font-family: Manrope, sans-serif; font-size: 18px; color: var(--ink); }
.acc-pseudo-note, .acc-pseudo-hint { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--mute); }
.acc-pseudo-hint.is-ok { color: var(--blue); }
.acc-pseudo-hint.is-ko { color: var(--amber); }
.acc-pseudo-form { display: grid; gap: 10px; }
.acc-pseudo-form label { display: grid; gap: 6px; }
.acc-pseudo-form input { font: 15px "IBM Plex Sans", sans-serif; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  padding: 10px 12px; min-height: 44px; max-width: 320px; box-sizing: border-box; }
.acc-pseudo-form input:focus { outline: 2px solid var(--accent-line, var(--blue)); outline-offset: 1px; border-color: var(--blue); }
.acc-pseudo-act { display: flex; gap: 10px; }

/* Les telechargements (2026-12-02) : une ligne par plateforme, le bouton ou la date a droite. */
.acc-dl { display: flex; flex-direction: column; gap: 12px; }
.acc-dl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acc-dl-row b { color: var(--ink); font-weight: 600; }
.acc-dl-row .acc-note { margin: 0; }
