/* comment-bot — feuille de style commune.
 *
 * Registre sombre : fond bleu nuit, cartes légèrement plus claires, accent
 * violet, secondaire turquoise. Navigation en barre latérale — plus de bandeau
 * coloré en haut des pages.
 *
 * Les noms de classes sont ceux que le JS des pages interroge : on restyle,
 * on ne renomme pas.
 */

:root {
  /* Fonds, du plus profond au plus clair */
  --bg: #080915;
  --bg-2: #0b0d1c;
  --surface: #12142a;
  --surface-2: #191c36;
  --surface-3: #21254380;

  /* Traits */
  --line: #262b4a;
  --line-soft: #1b1f38;

  /* Texte */
  --ink: #edeffa;
  --ink-soft: #b3b9d6;
  --muted: #767d9e;

  /* Accent violet, et son dégradé */
  --accent: #7c5cff;
  --accent-2: #a78bfa;
  --accent-deep: #5b3ff0;
  --accent-soft: rgba(124, 92, 255, .15);
  --grad: linear-gradient(135deg, #7c5cff, #5b8def);

  /* Couleurs de sens */
  --teal: #2dd4bf;
  --green: #35d399;
  --amber: #fbbf24;
  --red: #f87171;

  --r: 16px;
  --r-sm: 10px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -18px rgba(0, 0, 0, .7);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 56px -24px rgba(0, 0, 0, .8);
  --glow: 0 8px 26px -10px rgba(124, 92, 255, .55);

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* Une règle `display` sur une classe l'emporterait sur l'attribut `hidden` du
   HTML, laissant des sections masquées bien visibles. On tranche ici. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Deux halos très diffus : ce qui donne la profondeur du fond sans image. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(124, 92, 255, .20), transparent 65%),
    radial-gradient(760px 480px at 96% 4%, rgba(45, 212, 191, .10), transparent 60%);
  pointer-events: none;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #c4b5fd; text-decoration: underline; }

::selection { background: rgba(124, 92, 255, .35); }

/* Barres de défilement discrètes, accordées au fond */
* { scrollbar-width: thin; scrollbar-color: #2b3055 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #2b3055; border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #383e6b; background-clip: content-box; }

/* ══════════════════ COQUE : BARRE LATÉRALE + CONTENU ══════════════════ */

.shell { display: flex; min-height: 100vh; gap: 16px; padding: 16px 0 16px 16px; }

/* Un panneau qui flotte plutôt qu'une colonne collée au bord : il se lit comme
 * un objet posé sur la page, et l'ombre porte la profondeur. */
.side {
  position: sticky; top: 16px;
  flex: 0 0 236px;
  height: calc(100vh - 32px);
  padding: 22px 14px;
  display: flex; flex-direction: column; gap: 22px;
  background: linear-gradient(180deg, rgba(20, 22, 46, .94), rgba(12, 14, 30, .94));
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow: 0 30px 64px -30px rgba(0, 0, 0, .95), 0 2px 8px -4px rgba(0, 0, 0, .6);
  backdrop-filter: blur(14px);
}

.side .brand {
  display: block;
  padding: 6px 12px 2px;
  font-size: 19px; font-weight: 600; letter-spacing: -.03em;
  color: var(--ink);
}
.side .brand:hover { text-decoration: none; }

/* Les onglets deviennent une navigation verticale. Même classe `.tab` et même
   attribut `data-pane` : le JS des pages continue de fonctionner tel quel. */
.tabs { display: flex; flex-direction: column; gap: 3px; }
.tab {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 0; border-radius: 11px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit; font-size: 14px; font-weight: 500;
  text-align: left; cursor: pointer;
  transition: background .14s, color .14s;
}
.tab svg { width: 16px; height: 16px; opacity: .8; flex: 0 0 auto; }
.tab:hover { background: var(--surface-2); color: var(--ink); }
.tab.on {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--glow);
}
.tab.on svg { opacity: 1; }

.side-foot { margin-top: auto; display: grid; gap: 10px; }
.side-note {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.side-note b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.side-note span { font-size: 12px; color: var(--muted); line-height: 1.5; display: block; }

.content { flex: 1 1 auto; min-width: 0; padding: 6px 26px 64px 10px; }

/* Barre du haut : sans fond coloré, juste le titre et les actions. */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.topbar h1 { margin: 0; font-size: 23px; font-weight: 600; letter-spacing: -.02em; }
.topbar .sub { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ══════════════════ CARTES ══════════════════ */

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.card + .card, .stack > * + * { margin-top: 16px; }
.card-head {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.card-body { padding: 19px 20px; }
.card-body.tight { padding: 0; }

/* ══════════════════ STAT TILES ══════════════════ */

/* Cartes séparées plutôt qu'une grille soudée : c'est la lecture de la référence. */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 14px;
}
.tile {
  position: relative; overflow: hidden;
  padding: 18px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
/* Un filet lumineux en haut de chaque tuile — les couleurs tournent. */
.tile::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .7;
}
.tile:nth-child(2)::before { background: linear-gradient(90deg, transparent, var(--teal), transparent); }
.tile:nth-child(3)::before { background: linear-gradient(90deg, transparent, #5b8def, transparent); }
.tile:nth-child(4)::before { background: linear-gradient(90deg, transparent, var(--green), transparent); }

.tile .k {
  order: -1;
  font-size: 12.5px; color: var(--muted);
  margin-bottom: 8px;
}
.tile .n {
  font-size: 30px; font-weight: 600;
  letter-spacing: -.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.tile .hint { margin-top: 7px; font-size: 12px; color: var(--muted); }

/* ══════════════════ PASTILLES & BADGES ══════════════════ */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500;
  white-space: nowrap;
  background: rgba(255, 255, 255, .06);
  color: var(--ink-soft);
  border: 1px solid transparent;
}
.pill.ok { background: rgba(53, 211, 153, .13); color: #6ee7b7; border-color: rgba(53, 211, 153, .22); }
.pill.warn { background: rgba(251, 191, 36, .13); color: #fcd34d; border-color: rgba(251, 191, 36, .22); }
.pill.bad { background: rgba(248, 113, 113, .13); color: #fca5a5; border-color: rgba(248, 113, 113, .22); }
.pill.info { background: var(--accent-soft); color: var(--accent-2); border-color: rgba(124, 92, 255, .26); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge {
  display: inline-block; padding: 2px 9px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 500; color: var(--ink-soft);
  text-transform: capitalize;
}
.badge.ranked { border-color: rgba(124, 92, 255, .35); background: var(--accent-soft); color: var(--accent-2); }

.avatar {
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600; flex: 0 0 auto;
}

/* ══════════════════ TABLES ══════════════════ */

table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  padding: 11px 20px;
  font-size: 11.5px; font-weight: 500; color: var(--muted);
  letter-spacing: .03em; text-transform: uppercase;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
.num { font-variant-numeric: tabular-nums; }
.t-title { font-weight: 500; }
.t-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.scroll-x { overflow-x: auto; }

/* ══════════════════ FORMULAIRES ══════════════════ */

input[type=text], input[type=url], input[type=number], input[type=password],
input[type=email], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  color: var(--ink);
  font: inherit; font-size: 14px;
}
input::placeholder, textarea::placeholder { color: #5c6382; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .18);
}
select { appearance: none; background-image: none; }
textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 180px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  transition: background .14s, border-color .14s, transform .06s;
}
.btn:hover { background: #232743; border-color: #33395e; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: var(--glow);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent-2); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { color: #fca5a5; }
.btn.danger:hover { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer; vertical-align: middle;
}
input[type=checkbox]:disabled { cursor: not-allowed; opacity: .3; }

/* ══════════════════ MENUS DÉROULANTS ══════════════════
 * Un `<select>` natif fait dessiner sa liste par le système : aucune règle CSS
 * ne l'atteint. Le select reste donc dans le DOM (source de vérité) mais
 * masqué, et c'est cet habillage qu'on voit. Voir ui.js.
 */

.sel-native { display: none !important; }

.sel { position: relative; width: 100%; }

.sel-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  color: var(--ink);
  font: inherit; font-size: 14px; text-align: left;
  cursor: pointer;
  transition: border-color .14s, box-shadow .14s;
}
.sel-btn:hover { border-color: #33395e; }
.sel-btn:focus-visible,
.sel.is-open .sel-btn {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .18);
}
.sel-btn:disabled { opacity: .45; cursor: not-allowed; }
.sel-btn .sel-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Une valeur vide est une invite, pas un choix. */
.sel-btn.is-placeholder .sel-val { color: #5c6382; }
.sel-chev { display: grid; place-items: center; flex: 0 0 auto; color: var(--muted); }
.sel-chev svg { width: 15px; height: 15px; transition: transform .16s; }
.sel.is-open .sel-chev svg { transform: rotate(180deg); }

.sel-menu {
  position: absolute; z-index: 55;
  top: calc(100% + 6px); left: 0; right: 0;
  max-height: 264px; overflow-y: auto;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-lift);
  display: none;
}
.sel-menu.drop-up { top: auto; bottom: calc(100% + 6px); }
.sel.is-open .sel-menu { display: block; animation: selIn .13s ease; }
@keyframes selIn { from { opacity: 0; transform: translateY(-4px); } }

.sel-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 0; border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit; font-size: 13.5px; text-align: left;
  cursor: pointer;
}
.sel-opt:hover, .sel-opt:focus-visible {
  outline: none;
  background: var(--surface-2);
  color: var(--ink);
}
.sel-opt.is-on { background: var(--accent-soft); color: var(--accent-2); font-weight: 500; }
.sel-opt.is-disabled { opacity: .4; cursor: not-allowed; }
.sel-tick { flex: 0 0 auto; font-size: 12px; color: var(--accent-2); }

/* ══════════════════ BLOCS DE TEXTE ══════════════════ */

.quote {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-size: 14px; color: var(--ink-soft);
  white-space: pre-wrap; line-height: 1.6;
}
.hint { font-size: 12.5px; color: var(--muted); }
.err { font-size: 13px; color: #fca5a5; margin-top: 7px; }
.ok-msg { font-size: 13px; color: #6ee7b7; margin-top: 7px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }

.section-title {
  margin: 0 0 4px; font-size: 11.5px; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase; color: var(--accent-2);
}
.section-lead { margin: 0 0 20px; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

/* ══════════════════ TIROIR & MODALE ══════════════════ */

.scrim {
  position: fixed; inset: 0; background: rgba(4, 5, 12, .68);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .18s; z-index: 40;
}
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(570px, 100%);
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 70px -30px rgba(0, 0, 0, .9);
  transform: translateX(100%); transition: transform .22s ease; z-index: 41;
  overflow-y: auto;
}
.drawer.on { transform: none; }
.drawer-head {
  position: sticky; top: 0; z-index: 1;
  background: var(--bg-2);
  padding: 20px 22px 14px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.drawer-body { padding: 20px 22px 60px; }

.modal-wrap {
  position: fixed; inset: 0; z-index: 50;
  display: none; align-items: center; justify-content: center; padding: 24px;
  background: rgba(4, 5, 12, .68); backdrop-filter: blur(2px);
}
.modal-wrap.on { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-lift);
  width: min(620px, 100%); max-height: 88vh; overflow-y: auto;
}

/* Timeline des vérifications */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li {
  position: relative; padding: 0 0 16px 20px;
  border-left: 1px solid var(--line); margin-left: 4px;
}
.tl li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl li::before {
  content: ''; position: absolute; left: -4.5px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: #3a4068;
}
.tl li.alive::before { background: var(--green); box-shadow: 0 0 8px rgba(53, 211, 153, .6); }
.tl li.dead::before { background: var(--red); box-shadow: 0 0 8px rgba(248, 113, 113, .5); }
.tl .when { font-size: 12px; color: var(--muted); }

/* Toasts */
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; }
.toast {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  padding: 11px 17px; border-radius: var(--r-pill);
  font-size: 13.5px; box-shadow: var(--shadow-lift); animation: pop .2s;
}
.toast.bad { border-color: rgba(248, 113, 113, .4); color: #fca5a5; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* Barre d'action de masse : reste sous les yeux pendant le défilement. */
.bulkbar {
  position: sticky; bottom: 16px; z-index: 20;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px;
  background: rgba(25, 28, 54, .92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lift);
}
.bulkbar strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.bulkbar select { width: auto; }

/* ══════════════════ PAGES D'ENTRÉE (connexion, lien invalide) ══════════════════ */

.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate .card { width: min(410px, 100%); box-shadow: var(--shadow-lift); }
.gate .brand-row {
  display: block; margin-bottom: 2px;
  font-size: 21px; font-weight: 600; letter-spacing: -.03em; color: var(--ink);
}

/* ══════════════════ LANDING ══════════════════ */

.pagenav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 0 0;
}
.pagenav .brand {
  font-size: 21px; font-weight: 600; letter-spacing: -.03em; color: var(--ink);
}
.pagenav .brand:hover { text-decoration: none; }
.pagenav a.lnk { color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.pagenav a.lnk:hover { color: var(--ink); text-decoration: none; }

.hero { max-width: 740px; padding: 76px 0 56px; }
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 5.4vw, 54px);
  font-weight: 600; line-height: 1.08; letter-spacing: -.035em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #a78bfa, #5b8def 55%, #2dd4bf);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  margin: 0 0 30px;
  font-size: clamp(15px, 2vw, 17.5px); line-height: 1.62;
  color: var(--ink-soft); max-width: 600px;
}
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .cta .btn { padding: 13px 24px; font-size: 15px; }
.hero .cta .note { font-size: 13.5px; color: var(--muted); }

/* Étapes numérotées */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 14px; }
.step {
  padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r); box-shadow: var(--shadow);
}
.step .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent-2);
  border: 1px solid rgba(124, 92, 255, .28);
  font-size: 12.5px; font-weight: 600; margin-bottom: 13px;
}
.step h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.step p { margin: 0; font-size: 13.5px; line-height: 1.58; color: var(--ink-soft); }

/* Barème */
.tiers td { padding: 13px 22px; border-bottom: 1px solid var(--line-soft); }
.tiers tr:last-child td { border-bottom: 0; }
.tiers .amount {
  text-align: right; font-size: 21px; font-weight: 600;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
/* La tranche la plus généreuse ressort */
.tiers tr:last-child .amount {
  background: linear-gradient(100deg, #a78bfa, #2dd4bf);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Encadré des règles : ambre sourd, sérieux sans être alarmant. */
.rules {
  background: linear-gradient(160deg, rgba(251, 191, 36, .07), rgba(18, 20, 42, .6));
  border: 1px solid rgba(251, 191, 36, .22);
  border-radius: var(--r);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}
.rules .section-title { color: var(--amber); }
.rules h2 { margin: 0 0 12px; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.rules .lead { margin: 0 0 18px; font-size: 15px; line-height: 1.62; color: var(--ink-soft); }
.rules strong, .rules b { color: var(--ink); font-weight: 600; }

/* Le calcul, en trois blocs : c'est plus rapide à lire qu'un paragraphe. */

.rulenotes { display: grid; gap: 12px; }
.rulenotes > div {
  padding-left: 14px; border-left: 2px solid rgba(251, 191, 36, .3);
  font-size: 13.5px; line-height: 1.55; color: var(--ink-soft);
}

/* Moyens de paiement */
.pays { display: flex; gap: 12px; flex-wrap: wrap; }
.pay {
  flex: 1 1 175px; padding: 16px 18px;
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  background: var(--bg-2);
}
.pay b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.pay span { font-size: 12.5px; color: var(--muted); }

.foot { text-align: center; padding: 46px 0 14px; color: var(--muted); font-size: 13px; }

/* Ce qu'on annonce à l'inscription : cadence de paiement, validation, limite. */
.signup-facts { display: grid; gap: 12px; }
.signup-facts > div {
  padding-left: 14px;
  border-left: 2px solid rgba(124, 92, 255, .4);
}
.signup-facts b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.signup-facts span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ══════════════════ POOL & RÉSERVATION ══════════════════ */

.countdown {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: var(--r-pill);
  background: rgba(251, 191, 36, .13); color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, .24);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.countdown.urgent {
  background: rgba(248, 113, 113, .14); color: #fca5a5;
  border-color: rgba(248, 113, 113, .3);
}

.poolgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 14px; }
.poolcard {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 19px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r); box-shadow: var(--shadow);
  transition: border-color .14s, transform .1s;
}
.poolcard:hover { border-color: rgba(124, 92, 255, .34); transform: translateY(-2px); }
.poolcard .price {
  font-size: 25px; font-weight: 600; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.poolcard .ttl { font-size: 14px; font-weight: 500; line-height: 1.42; }
.poolcard .meta { font-size: 12.5px; color: var(--muted); }
.poolcard .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }

/* Petites barres de répartition — données réelles, pas de décor */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 54px; align-items: center; gap: 12px; }
.bar-row .lbl { font-size: 12.5px; color: var(--muted); }
.bar-track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--grad); }
.bar-row .val { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }

/* ══════════════════ GRAPHIQUE ══════════════════ */

.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.chartwrap { position: relative; }
.chart { width: 100%; height: 150px; display: block; overflow: visible; }
.chart rect { transition: opacity .12s; }
.chart g:hover rect { opacity: 1; }
.chart-axis {
  display: flex; justify-content: space-between;
  margin-top: 8px; font-size: 11.5px; color: var(--muted);
}

/* Le chiffre d'ensemble, au-dessus de sa courbe */
.bignum { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.bignum b {
  font-size: 34px; font-weight: 600; letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.bignum span { font-size: 13px; color: var(--muted); max-width: 420px; line-height: 1.45; }

/* L'état actuel, en une seule barre empilée */
.standing { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.stackbar {
  display: flex; height: 10px; border-radius: 99px; overflow: hidden;
  background: var(--surface-2);
}
.stackbar span { display: block; min-width: 3px; }

/* Les onglets de période, plus petits que la navigation */
.tab.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 9px; }

/* ══════════════════ FIL REDDIT ══════════════════ */
/* La structure de Reddit, reprise au détail près : avatar rond, pseudo, heure
   relative en ambre, corps, puis la rangée d'actions dessous — et les traits
   courbes qui rattachent une réponse à son parent, avec le bouton de repli
   posé dessus.
   Deux écarts assumés : les flèches de vote affichent, elles ne votent pas
   (nous ne sommes pas connectés à Reddit), et « Reply » ouvre le commentaire
   sur Reddit. Un bouton qui ne fait rien serait pire qu'un bouton absent. */

.rt { max-height: 520px; overflow-y: auto; padding: 2px 4px 2px 0; }

/* Un commentaire = une colonne d'ancrage (avatar + trait) et le contenu. */
.rc { display: flex; gap: 8px; padding-top: 10px; }
.rc-line {
  position: relative; flex: 0 0 26px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.rc-av {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, #55608a, #333b60);
  color: #dfe3f5;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
}
/* Le trait qui descend sous l'avatar, prolongé par le bouton de repli. */
.rc-line::after {
  content: ''; position: absolute; top: 30px; bottom: 0; left: 50%;
  width: 1px; background: var(--line); transform: translateX(-.5px);
}
.rc-collapse {
  position: relative; z-index: 1;
  width: 18px; height: 18px; padding: 0; margin-top: 4px;
  border: 0; border-radius: 50%;
  background: var(--bg-2); color: var(--muted);
  cursor: pointer; display: grid; place-items: center;
}
.rc-collapse:hover { color: var(--ink); }
.rc-collapse svg { width: 15px; height: 15px; }

.rc-main { flex: 1 1 auto; min-width: 0; }

.rc-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rc-user { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.rc-user:hover { color: var(--accent-2); text-decoration: none; }
.rc-sep { color: var(--muted); font-size: 11px; }
/* Reddit date ses commentaires en ambre : c'est un repère visuel fort. */
.rc-when { font-size: 12px; color: #d9a441; }

.rc-body {
  margin: 4px 0 0;
  font-size: 13.5px; line-height: 1.58; color: var(--ink-soft);
  white-space: pre-wrap; word-break: break-word;
}
.rc-body a { color: var(--accent-2); }

/* La rangée d'actions, sous le corps — la signature visuelle de Reddit. */
.rc-actions { display: flex; align-items: center; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.rc-vote {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px 4px; border-radius: var(--r-pill);
}
.rc-arrow { display: grid; place-items: center; color: var(--muted); }
.rc-arrow svg { width: 16px; height: 16px; }
.rc-vote b {
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  min-width: 12px; text-align: center; font-variant-numeric: tabular-nums;
}
.rc-act {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--muted);
  font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.rc-act:hover { background: var(--surface-2); color: var(--ink-soft); text-decoration: none; }
.rc-act svg { width: 15px; height: 15px; }
.rc-count { cursor: default; font-weight: 500; }
.rc-count:hover { background: transparent; color: var(--muted); }

/* Les réponses : décalées, et raccrochées par une courbe. */
.rc-kids { position: relative; margin-top: 2px; }
.rc-kids > .rc::before {
  content: ''; position: absolute; left: -21px; top: 22px;
  width: 14px; height: 12px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-bottom-left-radius: 9px;
}
.rc-kids > .rc { position: relative; }

/* Fil replié : le contenu disparaît, la ligne d'en-tête reste. */
.rc.is-folded > .rc-main > .rc-body,
.rc.is-folded > .rc-main > .rc-actions,
.rc.is-folded > .rc-main > .rc-kids { display: none; }
.rc.is-folded > .rc-line::after { display: none; }

/* L'en-tête : le post lui-même */
.rt-post {
  padding: 14px 16px; margin-bottom: 6px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px;
}
.rt-post h4 { margin: 0 0 6px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.rt-post .rt-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.rt-post .rt-text {
  font-size: 13.5px; line-height: 1.6; color: var(--ink-soft);
  white-space: pre-wrap; word-break: break-word;
  max-height: 240px; overflow-y: auto;
}

/* Le fil est repliable côté contributeur : utile, mais pas au point de manger
   l'écran avant le champ de preuve. */
.thread-box {
  margin: 0 0 18px; padding: 14px 16px;
  background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--r-sm);
}
.thread-box summary {
  cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-soft);
  list-style: none;
}
.thread-box summary::-webkit-details-marker { display: none; }
.thread-box summary::before { content: '▸ '; color: var(--accent-2); }
.thread-box[open] summary::before { content: '▾ '; }
.thread-box[open] summary { margin-bottom: 12px; }

/* Une tâche réservée à quelqu'un par l'admin */
.forme {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--grad); color: #fff;
  font-size: 11.5px; font-weight: 600;
}

/* ══════════════════ RESPONSIVE ══════════════════ */

@media (max-width: 900px) {
  .shell { flex-direction: column; gap: 12px; padding: 12px 12px 0; }
  .side {
    position: static; height: auto; flex: none;
    padding: 16px 14px; border-radius: 16px;
  }
  .tabs { flex-direction: row; overflow-x: auto; gap: 6px; }
  .tab { width: auto; white-space: nowrap; }
  .side-foot { display: none; }
  .content { padding: 6px 12px 56px; }
}

@media (max-width: 640px) {
  .tile .n { font-size: 26px; }
  .hero { padding: 46px 0 40px; }
  .wrap { padding: 0 16px; }
  thead th, tbody td { padding-left: 15px; padding-right: 15px; }
  .rules { padding: 22px 20px; }
}

/* ══════════════════ FICHE CONTRIBUTEUR ══════════════════
 * Dans le tiroir : les chiffres d'argent en grand, le reste en paires
 * clé/valeur. On décide de payer quelqu'un sur quatre nombres, pas sur un
 * tableau. */
.sheet-sec { margin-top: 24px; }
.sheet-sec:first-child { margin-top: 0; }
.sheet-sec > h3 {
  margin: 0 0 10px; font-size: 12px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mcell {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 13px 14px;
}
.mcell.lead { border-color: rgba(124, 92, 255, .38); background: var(--accent-soft); }
.mcell b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.mcell span { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 118px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd.none { color: var(--muted-2, var(--muted)); font-style: italic; }
/* Dans 570 px de tiroir, une table à cinq colonnes s'écrase et chaque titre
 * tombe en colonne d'un mot. On lui donne sa largeur et on la laisse défiler. */
.sheet-sec table { font-size: 12.5px; min-width: 440px; }
.sheet-sec table th { font-size: 10.5px; }
.sheet-sec table th, .sheet-sec table td { white-space: nowrap; }
.sheet-sec table td.wrap { white-space: normal; min-width: 172px; }

/* ══════════════════ SURVOL DES GRAPHIQUES ══════════════════
 * La colonne entière du jour s'allume et l'infobulle porte les chiffres exacts.
 * Ni l'une ni l'autre ne capte la souris, sinon le survol se perdrait. */
.chart-band {
  position: absolute; top: 0; pointer-events: none;
  opacity: 0; transition: opacity .1s;
  background: rgba(124, 92, 255, .07);
  border-left: 1px solid rgba(124, 92, 255, .16);
  border-right: 1px solid rgba(124, 92, 255, .16);
}
.chart-band.on { opacity: 1; }
.charttip {
  position: absolute; z-index: 3; pointer-events: none;
  opacity: 0; transition: opacity .1s;
  min-width: 150px; padding: 9px 11px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .85);
  font-size: 12px; line-height: 1.5;
}
.charttip.on { opacity: 1; }
.charttip b {
  display: block; margin-bottom: 6px;
  font-size: 12.5px; font-weight: 600; letter-spacing: -.01em;
}
.charttip .r { display: flex; align-items: center; gap: 8px; }
.charttip .r i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.charttip .r span { color: var(--muted); margin-right: auto; }
.charttip .r em { font-style: normal; font-weight: 600; }

/* ══════════════════ EXPLICATION AU SURVOL DU TITRE ══════════════════
 * L'explication n'a pas à occuper trois lignes en permanence. Elle vit sous le
 * titre, au survol. Le point d'information la rend trouvable : une infobulle
 * sans marque visible n'est jamais découverte. */
.withhelp { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.helpdot {
  width: 15px; height: 15px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  font-size: 10px; font-weight: 600; font-style: normal;
  color: var(--muted); cursor: help; transition: color .12s, border-color .12s;
}
.withhelp:hover .helpdot { color: var(--accent-2); border-color: rgba(124, 92, 255, .45); }
.helptip {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 6;
  width: max-content; max-width: 380px; padding: 10px 12px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .85);
  font-size: 12.5px; font-weight: 400; line-height: 1.5;
  letter-spacing: normal; color: var(--muted);
  opacity: 0; pointer-events: none; transform: translateY(-3px);
  transition: opacity .13s, transform .13s;
}
.withhelp:hover .helptip { opacity: 1; transform: none; }

/* ══════════════════ CHOIX DE LA PÉRIODE ══════════════════ */
.range { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.range-presets { flex-direction: row; gap: 4px; }
.range-dates { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.range-dates input[type="date"] {
  color-scheme: dark;                    /* sinon le calendrier natif arrive en blanc */
  padding: 6px 9px; font-size: 12px; width: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text);
}
.range-dates input[type="date"]:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.range-dates input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(.7); cursor: pointer;
}

/* Le retour en arrière d'une sous-page. */
.backlink {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted); text-decoration: none;
  transition: color .12s;
}
.backlink:hover { color: var(--accent-2); }

/* ══════════════════ BARRE D'ONGLETS ══════════════════
 * Deux pastilles pleine largeur ne se lisent pas comme des onglets : elles se
 * lisent comme deux boutons. Une barre soulignée, elle, ne laisse aucun doute
 * sur ce qui est sélectionné et sur ce qui reste à cliquer. */
.tabbar {
  display: flex; gap: 2px; flex-wrap: wrap;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--line);
}
.tabbar button {
  appearance: none; background: none; border: 0;
  margin-bottom: -1px; padding: 9px 16px 11px;
  border-bottom: 2px solid transparent;
  font: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--muted); cursor: pointer;
  transition: color .12s, border-color .12s;
}
.tabbar button:hover { color: var(--text); }
.tabbar button.on { color: var(--text); border-bottom-color: var(--accent); }

/* ══════════════════ MESSAGERIE ══════════════════
 * Des bulles, parce que c'est la forme que tout le monde sait déjà lire. Le
 * côté dit qui parle sans avoir à écrire « moi » et « eux ». */
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble {
  max-width: 76%; padding: 10px 13px;
  border-radius: 15px; font-size: 13.5px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.bubble.them {
  align-self: flex-start; border-bottom-left-radius: 5px;
  background: var(--surface); border: 1px solid var(--line-soft);
}
.bubble.us {
  align-self: flex-end; border-bottom-right-radius: 5px;
  background: var(--accent-soft); border: 1px solid rgba(124, 92, 255, .3);
}
.bubble .when { margin-top: 6px; font-size: 11px; color: var(--muted); }
.bubble.unread { box-shadow: 0 0 0 2px rgba(124, 92, 255, .22); }

/* La liste des conversations, côté admin. */
.convo {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 13px 14px; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line-soft);
  color: inherit; font: inherit; cursor: pointer;
  transition: background .12s;
}
.convo:last-child { border-bottom: 0; }
.convo:hover { background: rgba(124, 92, 255, .05); }
.convo.on { background: var(--accent-soft); }
.convo-main { min-width: 0; flex: 1 1 auto; }
.convo-who { font-weight: 500; font-size: 13.5px; }
.convo-last {
  margin-top: 3px; font-size: 12.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.convo-side { flex: 0 0 auto; text-align: right; font-size: 11.5px; color: var(--muted); }

/* La pastille de non-lus sur un onglet. */
.tab-n {
  margin-left: auto; min-width: 19px; padding: 1px 6px;
  border-radius: 10px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600; text-align: center; line-height: 1.5;
}

/* ══════════════════ LES TROIS CONTRÔLES ══════════════════
 * 30 min, 24 h, 72 h. Trois états et non deux : un contrôle qui n'a rien pu
 * constater n'est pas un échec, et le troisième porte un liseré parce que
 * c'est celui qui paie. */
.trail { display: inline-flex; gap: 5px; }
.tp {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 30px; padding: 4px 5px 3px;
  border: 1px solid var(--line-soft); border-radius: 8px;
  background: var(--surface); cursor: help;
}
.tp b { font-size: 12px; font-weight: 700; line-height: 1; }
.tp i { font-size: 9.5px; font-style: normal; color: var(--muted); letter-spacing: .02em; }
.tp.wait b { color: var(--muted); }
.tp.pass { border-color: rgba(53, 211, 153, .3); }
.tp.pass b { color: #6ee7b7; }
.tp.fail { border-color: rgba(248, 113, 113, .35); }
.tp.fail b { color: #fca5a5; }
.tp.unsure { border-color: rgba(251, 191, 36, .32); }
.tp.unsure b { color: #fcd34d; }
.tp.pays { box-shadow: inset 0 -2px 0 rgba(124, 92, 255, .55); }
.tp.skip { opacity: .45; }
.tp.skip b { color: var(--muted); }
