:root {
  --bg: #0a0d14; --bg2: #111622; --card: #151b29; --line: #232b3d;
  --text: #e8ecf4; --muted: #8a94a8; --accent: #5b8cff; --accent2: #9b6bff;
  --up: #16c784; --down: #ea3943; --gold: #f5b83d;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Inter, system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h2 { font-size: 22px; }
code { font-family: var(--mono); font-size: 13px; background: var(--bg2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.mono { font-family: var(--mono); font-size: 13.5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.up { color: var(--up); font-weight: 600; }
.down { color: var(--down); font-weight: 600; }

/* en-tête */
.top { border-bottom: 1px solid var(--line); background: rgba(10, 13, 20, .85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 18px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.logo:hover { text-decoration: none; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 rgba(22, 199, 132, .6); animation: pulse 2s infinite; }
.live { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--down); margin-right: 10px; vertical-align: middle; animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(22, 199, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 199, 132, 0); } }
nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--muted); font-weight: 500; }
nav a:hover { color: var(--text); text-decoration: none; }

/* boutons */
.btn { display: inline-block; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff !important; font-weight: 600; border: 0; border-radius: 10px; padding: 11px 20px; cursor: pointer; font-size: 15px; font-family: inherit; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.ghost { background: var(--card); border: 1px solid var(--line); color: var(--text) !important; }
.btn.wide { display: block; width: 100%; text-align: center; margin: 18px 0 10px; }
.badge { display: inline-block; background: rgba(245, 184, 61, .12); color: var(--gold); border: 1px solid rgba(245, 184, 61, .35); padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.flash { background: rgba(91, 140, 255, .12); border: 1px solid rgba(91, 140, 255, .35); padding: 12px 16px; border-radius: 10px; margin: 18px 0; }

/* accueil */
.hero { padding: 56px 0 30px; }
.kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: 12.5px; font-weight: 700; margin: 0 0 10px; }
.hero h1 { font-size: clamp(32px, 5.5vw, 56px); font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent2), var(--up)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 17px; max-width: 700px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 28px 0; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stats b { display: block; font-size: 28px; font-weight: 800; font-family: var(--mono); }
.stats span { color: var(--muted); font-size: 13.5px; }
section { margin: 36px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.page-head { padding: 34px 0 10px; }
.page-head h1 { font-size: clamp(26px, 4vw, 38px); }
.page-head.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pager { display: flex; gap: 20px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.back { margin: 24px 0 0; }

/* tableau des tokens */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table.tokens { width: 100%; border-collapse: collapse; min-width: 980px; }
.tokens th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tokens td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tokens tbody tr:hover { background: rgba(255, 255, 255, .025); }
.tokens tr:last-child td { border-bottom: 0; }
.r { text-align: right !important; }
.tk { display: flex; align-items: center; gap: 10px; color: var(--text); }
.tk:hover { text-decoration: none; }
.tk:hover b { color: var(--accent); }
.tk img, .av { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.av { display: inline-grid; place-items: center; background: var(--line); font-style: normal; font-weight: 700; color: var(--muted); }
.av.big { width: 56px; height: 56px; font-size: 22px; }
.tk span { display: flex; flex-direction: column; line-height: 1.25; }
.tk small { color: var(--muted); font-size: 12.5px; }
.chain { font-size: 13px; color: var(--muted); }
tr.locked td { filter: blur(5px); user-select: none; color: var(--muted); }
.paywall { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; padding: 18px 20px; border-radius: 14px; border: 1px solid rgba(155, 107, 255, .4); background: linear-gradient(135deg, rgba(91, 140, 255, .12), rgba(155, 107, 255, .12)); }
.paywall span { display: block; color: var(--muted); font-size: 14px; }
.sorts { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.sorts a { padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.sorts a.on, .sorts a:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }

/* fiche token */
.token-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 0; }
.token-head img { width: 56px; height: 56px; border-radius: 50%; }
.token-head h1 { margin: 0; font-size: 30px; }
.token-head h1 small { color: var(--muted); font-size: 18px; font-weight: 600; }
.token-head p { margin: 2px 0 0; }
.token-price { margin-left: auto; text-align: right; }
.token-price b { display: block; font-size: 26px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.cell { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.cell span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.cell b { font-size: 17px; }
.contract { margin: 18px 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.contract span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.links { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span { font-size: 12.5px; padding: 3px 10px; border-radius: 99px; background: var(--bg2); color: var(--muted); border: 1px solid var(--line); }
.desc { margin: 26px 0; max-width: 800px; color: #c9d0dd; }

/* actus */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--text); display: flex; flex-direction: column; }
.post-card:hover { border-color: var(--accent); text-decoration: none; }
.post-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card > div { padding: 16px 18px; }
.post-card small { color: var(--muted); }
.post-card h3 { margin: 6px 0; font-size: 18px; }
.post-card p { color: var(--muted); margin: 0; font-size: 14.5px; }
.article { max-width: 760px; margin: 20px 0 40px; }
.article h1 { font-size: clamp(26px, 4vw, 38px); margin-top: 8px; }
.article .cover { width: 100%; border-radius: 14px; margin: 10px 0 20px; }
.article .body { white-space: pre-wrap; font-size: 16.5px; line-height: 1.7; }

/* boîtes, formulaires */
.narrow { max-width: 620px; margin: 0 auto 40px; }
.lockbox { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 40px 24px; margin: 24px 0; }
.steps { padding-left: 20px; margin: 10px 0 24px; }
.steps li { margin: 8px 0; }
.plan { background: var(--card); border: 1px solid rgba(155, 107, 255, .45); border-radius: 18px; padding: 26px; }
.plan-price b { font-size: 46px; font-weight: 800; font-family: var(--mono); color: var(--gold); }
.plan-price span { color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 18px 0; }
.plan li { margin: 9px 0; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.form input:not([type=checkbox]), .form textarea { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 11px 13px; font: inherit; font-weight: 400; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.form .btn { align-self: flex-start; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin: 16px 0; }
.admin-grid .panel { margin: 0; }
.panel h3 { margin-top: 22px; font-size: 16px; }
.checks { list-style: none; padding: 0; }
.checks li { margin: 4px 0; }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); color: var(--text); flex-wrap: wrap; }
a.list-row:hover { text-decoration: none; color: var(--accent); }
.list-row form { margin: 0; }
.link-danger { background: none; border: 0; color: var(--down); cursor: pointer; font: inherit; padding: 0; }
/* application installable */
.app-hero { text-align: center; padding: 30px 0 10px; }
.app-hero .lead { margin: 0 auto; }
.app-icon { border-radius: 22px; box-shadow: 0 10px 40px rgba(91, 140, 255, .35); margin-bottom: 14px; }
.only-installed { display: none; color: var(--up); font-weight: 600; }
.installed .only-installed, .is-app .only-installed { display: block; }
.installed .only-install, .is-app .only-install, .is-app .app-link { display: none; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.is-app .hero-actions .app-cta { display: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 4px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#notifs .btn { margin: 6px 8px 6px 0; }
.health { display: flex; flex-direction: column; }
.health-row { display: grid; grid-template-columns: 14px 210px 1fr; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.health-row .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--up); }
.health-row.warn .dot { background: var(--gold); }
.health-row.ko .dot { background: var(--down); }
.health-row.ko span:last-child { color: var(--down); }
.events { margin: 16px 0 10px; }
.events summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.event { display: grid; grid-template-columns: 90px 22px 130px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.event .when, .event .src { color: var(--muted); }
.event.error .what, .event.critical .what { color: var(--down); }
.event.warning .what { color: var(--gold); }
@media (max-width: 640px) {
  .health-row { grid-template-columns: 14px 1fr; }
  .health-row span:last-child { grid-column: 2; color: var(--muted); }
  .event { grid-template-columns: 80px 22px 1fr; }
  .event .src { display: none; }
}
.video { position: relative; aspect-ratio: 16 / 9; margin: 10px 0 20px; border-radius: 14px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article .body a { word-break: break-all; }
.yt-thumb { position: relative; display: block; }
.yt-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.yt-thumb i { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 60px; height: 42px; border-radius: 12px; background: rgba(255, 0, 0, .9); color: #fff; font-style: normal; font-size: 20px; display: grid; place-items: center; }
.photo-preview { max-width: 100%; max-height: 260px; border-radius: 12px; border: 1px solid var(--line); align-self: flex-start; }
.form input[type=file] { background: var(--bg2); border: 1px dashed var(--line); color: var(--muted); border-radius: 10px; padding: 14px; font: inherit; }
.url-input { margin-top: 8px; width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 11px 13px; font: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form select { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 11px 13px; font: inherit; font-weight: 400; }
.msg { border-bottom: 1px solid var(--line); padding: 14px 0; }
.msg.done { opacity: .5; }
.msg p { white-space: pre-wrap; margin: 8px 0; }
.msg form { display: inline; margin-right: 14px; }
.msg .link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 12px; }
.admin-link { margin: 14px 0 0; font-size: 12px; }
.admin-link a { color: var(--muted); opacity: .6; }
.pay-title { margin-top: 30px; }
.pay-options { display: grid; gap: 14px; }
.plan.pay .badge { float: right; }
.plan.pay .plan-price b { font-size: 36px; }
.copy-row { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.copy-row span { color: var(--muted); font-size: 13.5px; }
.copy-row code { font-size: 14px; }
#amount { font-size: 22px; color: var(--gold); }
.warn { list-style: none; padding: 0; margin: 18px 0 6px; font-size: 14px; }
.warn li { margin: 8px 0; }
.waiting { display: flex; align-items: center; color: var(--muted); margin: 16px 0 0; }
@media (max-width: 640px) {
  .copy-row { grid-template-columns: 1fr auto; }
  .copy-row span { grid-column: 1 / -1; }
}
.foot { color: var(--muted); font-size: 13px; padding-top: 30px; padding-bottom: 40px; border-top: 1px solid var(--line); margin-top: 50px; }

@media (max-width: 640px) {
  .admin-grid { grid-template-columns: 1fr; }
  .token-price { margin-left: 0; text-align: left; width: 100%; }
  nav { gap: 12px; font-size: 14px; }
}
