:root {
  --ink: #07090d; --surface: #0e1219; --raised: #141a24;
  --line: rgba(148,163,184,.14); --line-strong: rgba(148,163,184,.24);
  --accent: #22d3ee; --accent-deep: #0891b2;
  --text: #e2e8f0; --muted: #94a3b8; --faint: #64748b;
  --emerald: #34d399; --rose: #fb7185;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--ink); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-image:
    radial-gradient(40rem 18rem at 50% -8rem, rgba(34,211,238,.10), transparent 70%);
  background-attachment: fixed; min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.wrap { max-width: 520px; margin: 0 auto; padding: 16px; }
header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; position: sticky; top: 0; z-index: 5;
  background: rgba(7,9,13,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.brand b { background: linear-gradient(90deg, var(--accent), #a5f3fc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.acct { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.icon-btn { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); border-radius: 9px; padding: 7px 10px; font-size: 13px; cursor: pointer; }
.icon-btn:active { transform: scale(.96); }
.icon-btn.on { color: var(--accent); border-color: rgba(34,211,238,.4); background: rgba(34,211,238,.08); }
h1 { font-size: 20px; margin: 4px 0 2px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.card { background: color-mix(in srgb, var(--surface) 95%, transparent); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input {
  width: 100%; border: 1px solid var(--line-strong); background: rgba(7,9,13,.6);
  color: var(--text); border-radius: 10px; padding: 12px 14px; font-size: 16px; outline: none;
}
input:focus { border-color: rgba(34,211,238,.7); box-shadow: 0 0 0 3px rgba(34,211,238,.12); }
.btn {
  width: 100%; border: 0; border-radius: 10px; padding: 13px 16px; font-size: 15px; font-weight: 600;
  color: #06232b; background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  cursor: pointer; margin-top: 16px;
}
.btn:disabled { opacity: .6; cursor: default; }
.btn:active { transform: scale(.99); }
.link { color: var(--accent); text-decoration: none; }
.msg { font-size: 13px; margin-top: 12px; padding: 10px 12px; border-radius: 9px; display: none; }
.msg.err { display: block; background: rgba(244,63,94,.12); color: var(--rose); border: 1px solid rgba(244,63,94,.3); }
.msg.info { display: block; background: rgba(34,211,238,.1); color: var(--accent); border: 1px solid rgba(34,211,238,.28); }
.banner { display: none; margin-bottom: 14px; padding: 11px 13px; border-radius: 10px; font-size: 13px; background: rgba(245,158,11,.12); color: #fbbf24; border: 1px solid rgba(245,158,11,.3); }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.updated { font-size: 12px; color: var(--faint); }
.deals { display: flex; flex-direction: column; gap: 10px; }
.deal { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; transition: border-color .15s; }
.deal:active { border-color: rgba(34,211,238,.4); }
.deal .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.deal .title { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.badge { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); background: rgba(34,211,238,.14); border-radius: 999px; padding: 3px 9px; }
.figs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.figs b { color: var(--text); font-weight: 600; }
.chip { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; }
.chip.pos { color: var(--emerald); background: rgba(52,211,153,.14); }
.chip.neg { color: var(--rose); background: rgba(251,113,133,.14); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 10px; }
.foot { text-align: center; margin: 22px 0 8px; font-size: 12px; color: var(--faint); }
.hidden { display: none !important; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(148,163,184,.3); border-top-color: var(--accent); border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -3px; }
@keyframes sp { to { transform: rotate(360deg); } }

/* Migré depuis des style="..." inline et des mutations JS de .style
   (durcissement CSP style-src, audit externe 2026-07-28) */
.toolbar h1 { margin: 0; }
.toolbar-actions { display: flex; gap: 8px; }
/* .banner est déjà display:none par défaut ; cette classe le montre —
   remplace banner.style.display = 'block'/'none' en JS (bloqué par
   style-src sans 'unsafe-inline', y compris pour les mutations CSSOM). */
.banner.show { display: block; }
