:root {
  /* Palette inspirée des plateformes d'échange : noir profond, jaune, vert/rouge pour les marchés. */
  --bg: #0b0e11;
  --surface: #181a20;
  --surface-2: #1e2329;
  --border: #2b3139;
  --text: #eaecef;
  --muted: #848e9c;
  --accent: #fcd535;
  --accent-ink: #202630;
  --link: #f0b90b;
  --up: #0ecb81;
  --danger: #f6465d;
  --warning: #f0b90b;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; flex: 1; }

/* Barre du haut */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.06em; color: var(--accent); font-size: 18px; }
.brand:hover { text-decoration: none; }
.logo {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800;
}
nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
nav a { color: var(--muted); padding: 8px 10px; border-radius: 8px; font-size: 15px; }
nav a:hover, nav a.active { color: var(--accent); text-decoration: none; }

/* Boutons et formulaires */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 8px; border: 1px solid var(--surface-2);
  background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--border); border-color: var(--border); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: #f0b90b; border-color: #f0b90b; }
.btn-small { padding: 7px 12px; font-size: 14px; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: inherit;
}
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin: 2px 0 0; }
label.check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.narrow.wide { max-width: 520px; }
.code-input { text-align: center; font-size: 30px; letter-spacing: 12px; font-weight: 800; padding: 14px; }
.link-btn { background: none; border: 0; color: var(--link); font: inherit; cursor: pointer; padding: 0; }
.link-btn[disabled] { color: var(--muted); cursor: default; }
input:hover { border-color: var(--accent); }
input:focus { outline: none; border-color: var(--accent); }

/* Cartes */
.card { background: var(--surface); border: 1px solid var(--surface); border-radius: var(--radius); padding: 24px; }
.narrow { max-width: 440px; margin: 24px auto; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stack { display: grid; gap: 16px; }
.stack > *, .grid > * { min-width: 0; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(30px, 6vw, 52px); letter-spacing: -0.02em; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.alert { padding: 12px 14px; border-radius: 10px; font-size: 15px; border: 1px solid; }
.alert-error { color: var(--danger); border-color: rgba(246, 70, 93, 0.4); background: rgba(246, 70, 93, 0.08); }
.alert-ok { color: var(--up); border-color: rgba(14, 203, 129, 0.4); background: rgba(14, 203, 129, 0.08); }
.alert-warn { color: var(--warning); border-color: rgba(240, 185, 11, 0.4); background: rgba(240, 185, 11, 0.08); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.badge-premium { background: rgba(252, 213, 53, 0.15); color: var(--accent); }

/* Accueil */
.hero { padding: 48px 0 32px; text-align: center; }
.hero p { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.hero .accent { color: var(--accent); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.feature .icon { font-size: 26px; margin-bottom: 8px; }
.section { margin-top: 48px; }
.section > h2 { text-align: center; margin-bottom: 20px; }

/* Offres */
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan.featured { border-color: var(--accent); }
.plan > .badge { align-self: flex-start; }
.price { font-size: 34px; font-weight: 800; }
.price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan ul { margin: 0; padding-left: 18px; color: var(--muted); flex: 1; }

/* Signaux */
.up { color: var(--up); }
.down { color: var(--danger); }
.badge-buy { background: rgba(14, 203, 129, 0.15); color: var(--up); }
.badge-sell { background: rgba(246, 70, 93, 0.15); color: var(--danger); }
.signal { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.signal:last-child { border-bottom: 0; }

/* Dashboard */
.total { font-size: clamp(32px, 7vw, 46px); font-weight: 800; letter-spacing: -0.02em; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: right; padding: 14px 10px; white-space: nowrap; }
tbody tr:hover { background: var(--surface-2); }
td { font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 400; font-size: 13px; border-bottom: 1px solid var(--border); }
.coin-cell { display: flex; align-items: center; gap: 10px; }
.coin { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--accent); font-weight: 800; font-size: 13px; flex: none; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
ol.steps { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }
code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: var(--text); }

.spinner {
  width: 34px; height: 34px; border-radius: 50%; margin: 24px auto;
  border: 3px solid var(--border); border-top-color: var(--accent); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 18px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.footer p { max-width: 720px; margin: 0 auto; }

@media (max-width: 560px) {
  .two-cols { grid-template-columns: 1fr; }
  .brand { font-size: 16px; }
  nav a { padding: 6px 8px; font-size: 14px; }
  .card { padding: 18px; }
  table { font-size: 14px; }
  th, td { padding: 12px 5px; }
  .coin { display: none; }
}
