/* Couleurs par défaut ; marque.js les remplace au démarrage (un seul endroit à changer). */
:root {
  --bg: #08090b;
  --carte: #111315;
  --carte-2: #16191b;
  --carte-3: #1d2124;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.13);
  --line-3: rgba(255, 255, 255, 0.22);
  --text: #eef1ef;
  --text-2: #9aa29f;
  --text-3: #67706c;
  --accent: #8fe3bf;
  --vert: #34d27b;
  --rouge: #ff8a7a;
  --ambre: #f5c46b;
  --bronze: #d39a6a;
  --argent: #c8d0d6;
  --or: #f2cc6b;
  --accent-film: rgba(143, 227, 191, 0.08);
  --accent-bord: rgba(143, 227, 191, 0.3);
  --r: 20px;
  --r-s: 13px;
  --mono: "Spline Sans Mono", ui-monospace, monospace;
  --titre: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 "Instrument Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55% 38% at 50% -8%, rgba(52, 210, 123, 0.12), transparent 70%),
    radial-gradient(35% 28% at 100% 100%, rgba(143, 227, 191, 0.05), transparent 70%),
    repeating-radial-gradient(circle at 50% -12%, transparent 0 150px, rgba(255, 255, 255, 0.022) 150px 151px);
}
html.capture body { position: relative; }
html.capture body::before { position: absolute; }
::selection { background: var(--accent); color: #08090b; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* ---------- En-tête ---------- */
.tete { position: sticky; top: 0; z-index: 20; background: rgba(8, 9, 11, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.tete .wrap { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.marque { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-family: var(--titre); font-weight: 800; font-size: 19px; letter-spacing: -0.03em; white-space: nowrap; }
.marque svg { width: 26px; height: 26px; color: var(--accent); flex: none; filter: drop-shadow(0 4px 14px rgba(143, 227, 191, 0.35)); }
.tete-droite { display: flex; align-items: center; gap: 8px; min-width: 0; }
.qui { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 5px 9px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); font-size: 13.5px; color: var(--text-2); transition: border-color 0.2s, background 0.2s; }
.qui b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.qui > svg { width: 16px; height: 16px; flex: none; color: var(--text-3); transition: transform 0.2s; }
.qui:hover, .qui[aria-expanded="true"] { border-color: var(--line-3); background: rgba(255, 255, 255, 0.05); }
.qui[aria-expanded="true"] > svg { transform: rotate(180deg); }
.sortir { background: none; border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 12px; color: var(--text-2); font-size: 13.5px; white-space: nowrap; }
.sortir:hover { color: var(--text); border-color: var(--line-3); }
.bandeau-demo { background: rgba(245, 196, 107, 0.1); border-bottom: 1px solid rgba(245, 196, 107, 0.25); color: var(--ambre); font-size: 12.5px; text-align: center; padding: 6px 12px; }
@media (max-width: 480px) { .qui { padding: 4px 7px 4px 4px; gap: 5px; } .qui b { display: none; } }

/* ---------- Menu du compte (clic sur son avatar) ---------- */
.compte { position: relative; min-width: 0; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 290px; max-width: calc(100vw - 32px); max-height: calc(100vh - 90px); overflow-y: auto; padding: 6px; border-radius: 18px; border: 1px solid var(--line-2); background: #101214; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.9); }
.menu-tete { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.menu-tete > div { min-width: 0; }
.menu-tete > div b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-tete > div span { display: block; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-ligne { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 9px 10px; border: 0; border-radius: 12px; background: none; color: var(--text); font-size: 14.5px; font-weight: 500; text-align: left; }
.menu-ligne:hover { background: rgba(255, 255, 255, 0.05); }
.menu-ligne.actif { background: var(--accent-film); }
.menu-ligne > svg { width: 18px; height: 18px; flex: none; color: var(--text-2); }
.menu-ligne > svg:last-child:not(:first-child) { width: 14px; height: 14px; color: var(--text-3); }
.menu-ligne span { flex: 1; min-width: 0; }
.menu-ligne small { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; line-height: 1.35; color: var(--text-3); }
.menu-titre { margin: 10px 10px 2px; font: 500 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.menu-titre ~ .menu-ligne small { display: inline; margin-left: 6px; }
.menu-ligne[data-sortir] { margin-top: 4px; color: var(--text-2); box-shadow: 0 -1px 0 var(--line); border-radius: 0 0 12px 12px; }
.bandeau-espace { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 16px 0 0; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--accent-bord); background: var(--accent-film); font-size: 14px; color: var(--text-2); }
.bandeau-espace svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.bandeau-espace span { flex: 1; min-width: 0; }
.bandeau-espace a { font-weight: 600; white-space: nowrap; }

/* ---------- Titres ---------- */
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 500 11.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pouls 2s infinite; flex: none; }
.kicker.calme i { animation: none; }
.kicker.alerte i { background: var(--ambre); box-shadow: 0 0 10px var(--ambre); }
@keyframes pouls { 50% { opacity: 0.35; } }
h1, .titre { margin: 0 0 8px; font-family: var(--titre); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(1.85rem, 5vw, 2.6rem); line-height: 1.06; text-wrap: balance; }
h1 em, .titre em { font-style: normal; color: var(--accent); }
.sous { margin: 0 0 22px; color: var(--text-2); font-size: 15px; max-width: 560px; }
h2 { margin: 0 0 12px; font: 500 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.entete-ecran { margin: 26px 0 20px; }

/* ---------- Onglets ---------- */
.onglets { display: flex; gap: 4px; padding: 4px; margin: 18px 0 0; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.onglet { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; border-radius: 12px; padding: 10px 10px; color: var(--text-2); font-size: 14.5px; font-weight: 500; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.onglet svg { width: 18px; height: 18px; flex: none; }
.onglet:hover { color: var(--text); }
.onglet.actif { background: #fff; color: #08090b; font-weight: 600; }
.pastille { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #08090b; font: 700 11px/18px "Instrument Sans", sans-serif; text-align: center; }
.onglet.actif .pastille { background: #08090b; color: #fff; }
.pastille.rouge { background: var(--rouge); color: #1a0703; }
@media (max-width: 600px) {
  .onglets { gap: 2px; padding: 3px; }
  .onglet { flex-direction: column; gap: 3px; padding: 8px 2px 7px; font-size: 11.5px; border-radius: 11px; }
  .onglet svg { width: 19px; height: 19px; }
  .onglet .pastille { position: absolute; top: 3px; right: calc(50% - 22px); min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }
}

.sous-onglets { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 18px; padding: 2px 16px; }
.sous-onglets::-webkit-scrollbar { display: none; }
.puce { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 13.5px; white-space: nowrap; transition: all 0.15s; }
.puce:hover { border-color: var(--line-3); color: var(--text); }
.puce.on { background: var(--accent-film); border-color: var(--accent-bord); color: var(--text); font-weight: 600; }
.puce svg { width: 15px; height: 15px; }
.puce .pastille { height: 17px; line-height: 17px; min-width: 17px; font-size: 10.5px; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.puces .sep { width: 1px; align-self: stretch; background: var(--line-2); margin: 2px 4px; }
@media (max-width: 600px) {
  .puces.defile { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 2px 16px; }
  .puces.defile::-webkit-scrollbar { display: none; }
  .puces.defile .puce { padding: 6px 10px; font-size: 12.5px; gap: 6px; }
  .puce .nom-plat { display: none; }
  .puce.on .nom-plat { display: inline; }
}

/* ---------- Cartes ---------- */
.carte { border-radius: var(--r); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)); padding: 18px; min-width: 0; }
.carte + .carte, .bloc + .bloc { margin-top: 14px; }
.bloc { margin-top: 26px; }
.bloc-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.bloc-tete h2 { margin: 0; }
.vide { text-align: center; color: var(--text-3); font-size: 14px; padding: 30px 12px; }
.vide svg { display: block; margin: 0 auto 12px; width: 92px; height: 70px; }
.note { font-size: 12.5px; color: var(--text-3); margin: 8px 0 0; }
.note.ambre { color: var(--ambre); }

/* ---------- Chiffres clés ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.kpi { border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)); padding: 15px 15px 14px; min-width: 0; }
.kpi-label { font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-val { font-family: var(--titre); font-weight: 700; font-size: clamp(1.35rem, 2.6vw, 1.75rem); letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-val.vert { color: var(--accent); }
.kpi-note { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.periodes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; }
.periodes button { padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-3); font-size: 11px; }
.periodes button.on { background: var(--accent-film); border-color: var(--accent-bord); color: var(--text); }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } .kpis .kpi:first-child { grid-column: span 2; } }

/* niveau */
.niveau { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.medaille { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35), transparent 55%), var(--couleur, var(--carte-3)); color: #111; box-shadow: 0 8px 24px -10px var(--couleur, transparent); }
.medaille svg { width: 22px; height: 22px; }
.niveau-texte { flex: 1; min-width: 0; }
.niveau-texte b { display: block; font-family: var(--titre); font-size: 17px; letter-spacing: -0.02em; }
.niveau-texte span { font-size: 13px; color: var(--text-2); }
.jauge { height: 7px; border-radius: 7px; background: var(--line-2); overflow: hidden; margin-top: 8px; }
.jauge i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--vert), var(--accent)); }
.n-bronze { --couleur: var(--bronze); }
.n-argent { --couleur: var(--argent); }
.n-or { --couleur: var(--or); }
.n-debutant { --couleur: #3b4246; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.badge.n-bronze, .badge.n-argent, .badge.n-or { color: var(--couleur); border-color: color-mix(in srgb, var(--couleur) 45%, transparent); background: color-mix(in srgb, var(--couleur) 10%, transparent); }
.badge.vert { color: var(--accent); border-color: var(--accent-bord); background: var(--accent-film); }
.badge.ambre { color: var(--ambre); border-color: rgba(245, 196, 107, 0.35); background: rgba(245, 196, 107, 0.08); }
.badge.rouge { color: var(--rouge); border-color: rgba(255, 138, 122, 0.35); background: rgba(255, 138, 122, 0.08); }
.badge.gris { color: var(--text-3); }

/* ---------- Graphique ---------- */
.graph { padding: 14px 12px 8px; }
.graph svg { display: block; width: 100%; height: auto; overflow: visible; }
.graph .vide { padding: 60px 10px; }
.filtres { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 16px 0 10px; }

/* ---------- Plateformes ---------- */
.plat { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; flex: none; background: var(--carte-3); color: var(--text); }
.plat svg { width: 17px; height: 17px; }
.plat.tiktok { background: #15181a; box-shadow: inset 0 0 0 1px var(--line-2); }
.plat.instagram { background: linear-gradient(135deg, #f9b04a, #e1306c 55%, #8a3ab9); color: #fff; }
.plat.youtube { background: #e53935; color: #fff; }
.plat.snapchat { background: #fffc00; color: #111; }
.plat.petit { width: 22px; height: 22px; border-radius: 7px; }
.plat.petit svg { width: 13px; height: 13px; }

/* ---------- Comptes ---------- */
.ajout { display: grid; gap: 10px; }
.choix-plat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.choix-plat button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 6px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); color: var(--text-2); font-size: 13.5px; min-width: 0; }
.choix-plat button.on { border-color: var(--accent-bord); background: var(--accent-film); color: var(--text); font-weight: 600; }
.choix-plat .plat { width: 22px; height: 22px; border-radius: 7px; }
.choix-plat .plat svg { width: 13px; height: 13px; }
@media (max-width: 420px) { .choix-plat button span.nom { display: none; } }
.ligne-champ { display: flex; gap: 8px; }
.ligne-champ input { flex: 1; min-width: 0; }
.liste { display: grid; gap: 8px; }
.ligne { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.ligne.cliquable { cursor: pointer; transition: border-color 0.2s; color: var(--text); }
.ligne.cliquable:hover { border-color: var(--accent-bord); }
.ligne-corps { flex: 1; min-width: 0; }
.ligne-titre { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-titre a { color: var(--text); }
.ligne-detail { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-detail.libre { white-space: normal; }
.ligne-actions { display: flex; gap: 6px; flex: none; align-items: center; }
.ligne.off { opacity: 0.55; }
.ligne.moi { border-color: var(--accent-bord); background: var(--accent-film); }
@media (max-width: 560px) {
  .ligne.compte { flex-wrap: wrap; }
  .ligne.compte .ligne-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .ligne.compte .ligne-detail { white-space: normal; }
}
.en-cours { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--accent); }
.en-cours::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pouls 1.1s infinite; }

/* ---------- Vidéos ---------- */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 8px; }
.video { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); color: var(--text); transition: border-color 0.2s; }
.video:hover { border-color: var(--accent-bord); }
.video-haut { display: flex; align-items: center; gap: 8px; }
.video-vues { font-family: var(--titre); font-weight: 700; font-size: 16px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.video-titre { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video.avant { opacity: 0.45; filter: grayscale(1); }
.video .tag-avant { font-size: 10.5px; color: var(--text-2); font-family: var(--mono); letter-spacing: 0.04em; }
@media (max-width: 420px) { .videos { grid-template-columns: 1fr 1fr; } }

/* ---------- Journal ---------- */
.journal { font-size: 13px; }
.journal div { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); align-items: baseline; min-width: 0; }
.journal time { color: var(--text-3); white-space: nowrap; flex: none; font-family: var(--mono); font-size: 11.5px; }
.journal span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.journal .err { color: var(--rouge); }

/* ---------- Classement ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 10px; max-width: 560px; margin: 26px auto 26px; }
.marche { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.avatar { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-family: var(--titre); font-weight: 800; font-size: 15px; color: #08090b; background: var(--fond-av, var(--accent)); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--couleur, transparent); }
.marche .avatar { width: 52px; height: 52px; font-size: 21px; margin-bottom: 10px; }
.marche.p1 .avatar { width: 64px; height: 64px; font-size: 26px; }
.marche-nom { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marche-vues { font-family: var(--titre); font-weight: 700; font-size: 15px; color: var(--text-2); margin-bottom: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.socle { width: 100%; border-radius: 16px 16px 6px 6px; display: grid; place-items: start center; padding-top: 12px; font-family: var(--titre); font-weight: 800; font-size: 28px; color: rgba(8, 9, 11, 0.8); border: 1px solid rgba(255, 255, 255, 0.14); }
.p1 .socle { height: 132px; background: linear-gradient(180deg, var(--or), color-mix(in srgb, var(--or) 18%, transparent)); box-shadow: 0 20px 60px -20px color-mix(in srgb, var(--or) 60%, transparent); }
.p2 .socle { height: 96px; background: linear-gradient(180deg, var(--argent), color-mix(in srgb, var(--argent) 14%, transparent)); }
.p3 .socle { height: 72px; background: linear-gradient(180deg, var(--bronze), color-mix(in srgb, var(--bronze) 14%, transparent)); }
.rang { width: 26px; text-align: center; font-family: var(--titre); font-weight: 800; color: var(--text-3); flex: none; font-variant-numeric: tabular-nums; }
.rang-vues { font-family: var(--titre); font-weight: 700; font-size: 16px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.ma-place { display: flex; align-items: center; gap: 12px; }

/* ---------- Formulaires ---------- */
.champ { width: 100%; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--text); font-size: 15px; outline: none; transition: border-color 0.2s; }
.champ:focus { border-color: var(--accent-bord); }
.champ::placeholder { color: var(--text-3); }
select.champ { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
label.etiquette { display: block; font-size: 13px; color: var(--text-2); margin: 0 0 6px; }
.form { display: grid; gap: 12px; align-content: start; }
.form-ligne { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.interrupteur { display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
.interrupteur input { appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line-2); position: relative; flex: none; transition: background 0.2s; cursor: pointer; }
.interrupteur input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.interrupteur input:checked { background: var(--vert); }
.interrupteur input:checked::after { transform: translateX(16px); }
.message { font-size: 14px; margin: 4px 0 0; }
.message.erreur { color: var(--rouge); }
.message.ok { color: var(--accent); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 13px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--text); font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: transform 0.15s, background 0.2s, border-color 0.2s, opacity 0.2s; text-decoration: none; }
.btn:hover { border-color: var(--line-3); background: rgba(255, 255, 255, 0.06); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-accent { background: var(--accent); border-color: transparent; color: #08090b; box-shadow: 0 10px 30px -12px rgba(143, 227, 191, 0.6); }
.btn-accent:hover { background: #a6ecce; border-color: transparent; }
.btn-blanc { background: #fff; border-color: transparent; color: #08090b; box-shadow: 0 10px 30px -14px rgba(255, 255, 255, 0.45); }
.btn-blanc:hover { background: #e9eeec; border-color: transparent; }
.btn-plein { width: 100%; padding: 14px 18px; font-size: 15.5px; }
.btn-petit { padding: 6px 11px; border-radius: 10px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.btn-petit:hover { color: var(--text); }
.btn-danger:hover { border-color: rgba(255, 138, 122, 0.6); color: var(--rouge); }
.btn-lien { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; font-size: inherit; }
.btn svg { width: 17px; height: 17px; flex: none; }

/* ---------- Écrans d'accès ---------- */
.acces { max-width: 400px; margin: 0 auto; padding: 44px 0 60px; }
.acces .carte { padding: 24px 20px; }
.acces h1 { font-size: clamp(1.8rem, 6.5vw, 2.3rem); }
.acces .form { margin-top: 18px; }
.acces-bas { margin-top: 18px; font-size: 14px; color: var(--text-2); text-align: center; }
.illus { display: grid; place-items: center; margin: 0 0 18px; }
.illus svg { width: 120px; height: 96px; }
.bandeau-invitation { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--accent-bord); background: var(--accent-film); font-size: 14px; margin-top: 14px; }
.bandeau-invitation svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.demo-comptes { margin-top: 18px; padding: 14px; border-radius: 16px; border: 1px dashed rgba(245, 196, 107, 0.35); }
.demo-comptes p { margin: 0 0 10px; font-size: 12.5px; color: var(--ambre); }
.demo-comptes .puces button { font-size: 12.5px; padding: 6px 11px; }

/* ---------- Gains ---------- */
.solde { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
@media (max-width: 760px) { .solde { grid-template-columns: 1fr; } }
.grand-montant { font-family: var(--titre); font-weight: 800; font-size: clamp(2.6rem, 9vw, 3.6rem); letter-spacing: -0.04em; line-height: 1; margin: 6px 0 14px; font-variant-numeric: tabular-nums; }
.grand-montant small { font-size: 0.42em; color: var(--text-3); font-weight: 600; letter-spacing: -0.01em; }
.calcul { display: grid; gap: 9px; font-size: 14px; }
.calcul div { display: flex; justify-content: space-between; gap: 12px; }
.calcul span { color: var(--text-2); }
.calcul b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.calcul .total { border-top: 1px solid var(--line); padding-top: 9px; }
.copier { display: flex; gap: 8px; align-items: center; }
.copier code { flex: 1; min-width: 0; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.25); font: 13px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.etapes-parrain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.etapes-parrain div { padding: 12px 10px; border-radius: 14px; border: 1px solid var(--line); text-align: center; font-size: 12.5px; color: var(--text-2); }
.etapes-parrain svg { display: block; width: 28px; height: 28px; margin: 0 auto 6px; color: var(--accent); }

/* ---------- Discord ---------- */
.discord { display: flex; align-items: center; gap: 14px; }
.discord .icone { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #5865f2; color: #fff; }
.discord .icone svg { width: 24px; height: 24px; }
@media (max-width: 520px) { .discord { flex-wrap: wrap; } .discord .btn { width: 100%; } }

/* ---------- Admin ---------- */
.fiche-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 22px 0 18px; }
.fiche-tete .avatar { width: 52px; height: 52px; font-size: 21px; }
.fiche-tete h1 { margin: 0; font-size: clamp(1.6rem, 5vw, 2.2rem); }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grille-2 > .carte, .solde > .carte { margin-top: 0; }
@media (max-width: 760px) { .grille-2 { grid-template-columns: 1fr; } }
.chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.chiffres div { padding: 13px 14px; min-width: 0; }
.chiffres div + div { border-left: 1px solid var(--line); }
.chiffres b { display: block; font-family: var(--titre); font-size: 19px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chiffres span { font-size: 12px; color: var(--text-3); }
@media (max-width: 560px) { .chiffres { grid-template-columns: 1fr 1fr; } .chiffres div:nth-child(3) { border-left: 0; } .chiffres div:nth-child(n + 3) { border-top: 1px solid var(--line); } }
.argent { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; color: var(--text-3); }
.argent span { white-space: nowrap; }
.argent b { color: var(--text); font-weight: 600; }
.argent b.vert { color: var(--accent); }
.comptes-mini { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 14px; font-size: 13.5px; color: var(--text-2); }
.capture-apercu { max-width: 100%; max-height: 420px; border-radius: 12px; border: 1px solid var(--line-2); display: block; margin-top: 10px; }
.reglage { display: grid; gap: 4px; }
.reglage .note { margin-top: 0; }
.etat-ligne { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.etat-ligne .point { width: 8px; height: 8px; border-radius: 50%; background: var(--rouge); flex: none; }
.etat-ligne .point.ok { background: var(--vert); }

/* ---------- Fenêtre ---------- */
.fond-fenetre { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.fenetre { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; border-radius: 22px; border: 1px solid var(--line-2); background: #101214; padding: 22px 20px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9); }
.fenetre h3 { margin: 0 0 6px; font-family: var(--titre); font-size: 22px; letter-spacing: -0.02em; }
.fenetre .boutons { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 14px; background: #fff; color: #08090b; font-weight: 600; font-size: 14px; box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.8); }
.toast.erreur { background: var(--rouge); }

/* Chargement : le logo qui saute et une ligne. Il n'apparaît qu'après 0,2 s (pas de clignotement quand ça va vite). */
.chargement { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 76px 16px; text-align: center; font-size: 15px; color: var(--text-2); animation: apparait 0.3s ease 0.2s both; }
.chargement svg { width: 46px; height: 46px; color: var(--accent); filter: drop-shadow(0 8px 20px rgba(143, 227, 191, 0.35)); animation: saute 1.3s ease-in-out infinite; }
@keyframes saute { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-8px) scale(1.04); } }
@keyframes apparait { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chargement svg { animation: none; } }
.pied { padding: 40px 0 34px; text-align: center; font-size: 12px; color: var(--text-3); }
