@font-face { font-family: 'Anybody'; src: url('/fonts/anybody.woff2') format('woff2-variations'); font-weight: 100 900; font-stretch: 50% 150%; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/instrument-sans.woff2') format('woff2-variations'); font-weight: 400 700; font-display: swap; }
:root {
  --bg: #05060b;
  --bg2: #0a0d19;
  --card: #0f1324;
  --card2: #171c33;
  --line: #232a4a;
  --text: #f4f1ea;
  --muted: #9b97a8;
  --dim: #6d6979;
  --accent: #6ef3ff;
  --accent-soft: rgba(110, 243, 255, .12);
  --lime: #b56bff;
  --lime-soft: rgba(181, 107, 255, .18);
  --red: #ff4d6a;
  --radius: 18px;
  --display: 'Anybody', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-stretch: 112%; letter-spacing: -.01em; margin: 0; line-height: 1.1; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.boot { display: grid; place-items: center; height: 100vh; font-family: var(--display); font-size: 28px; font-weight: 800; color: var(--accent); }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 22px 16px; border-right: 1px solid var(--line); background: var(--bg2); display: flex; flex-direction: column; gap: 4px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 21px; padding: 4px 10px 22px; text-decoration: none; }
.logo i { width: 30px; height: 30px; border-radius: 8px; background: url('/favicon.svg') center/cover; font-size: 0; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 500; transition: .15s; }
.nav a:hover { color: var(--text); background: var(--card); }
.nav a.on { color: var(--text); background: var(--card2); }
.nav a svg { width: 18px; height: 18px; flex: none; }
.side .grow { flex: 1; }
.wallet { margin: 8px 4px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.wallet b { font-family: var(--display); font-size: 26px; display: block; }
.main { padding: 32px clamp(18px, 4vw, 48px) 80px; max-width: 1240px; width: 100%; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.head p { margin-top: 6px; }
.mobilebar { display: none; }
.banner { padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: #c9f8ff; font-size: 13px; margin-bottom: 20px; border: 1px solid rgba(110,243,255,.3); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 40; transform: translateX(-100%); transition: transform .25s; height: 100%; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.6); }
  .mobilebar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(12,11,16,.92); backdrop-filter: blur(10px); z-index: 30; }
  .main { padding-top: 22px; }
}

/* ---------- Composants ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card2); padding: 10px 16px; border-radius: 12px; cursor: pointer; font-weight: 600; text-decoration: none; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: #3c3948; background: #24222e; }
.btn.primary { background: linear-gradient(100deg, #6ef3ff, #4d6bff 55%, #b56bff); border-color: transparent; color: #04050c; box-shadow: 0 8px 30px -10px rgba(77,107,255,.9); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.lime { background: var(--lime); border-color: var(--lime); color: #0d0f1c; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.iconbtn { width: 38px; height: 38px; padding: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.sep { height: 1px; background: var(--line); margin: 18px 0; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; outline: none; transition: .15s;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--bg2); padding: 8px 13px; border-radius: 999px; cursor: pointer; font-size: 14px; transition: .15s; user-select: none; }
.chip:hover { border-color: #444150; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: #c9f8ff; }
.chip small { color: var(--dim); }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { display: none; }
.switch i { width: 42px; height: 24px; border-radius: 99px; background: var(--line); position: relative; transition: .2s; flex: none; }
.switch i::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--text); top: 3px; left: 3px; transition: .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { left: 21px; background: #0d0f1c; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--card2); color: var(--muted); border: 1px solid var(--line); }
.badge.done { background: var(--lime-soft); color: var(--lime); border-color: transparent; }
.badge.run { background: var(--accent-soft); color: #a9f4ff; border-color: transparent; }
.badge.fail { background: rgba(255,77,106,.14); color: #ff8fa2; border-color: transparent; }
.badge.win { background: var(--accent); color: #0d0f1c; border-color: transparent; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.run .dot { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.empty { text-align: center; padding: 50px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; }

.stat { padding: 18px 20px; }
.stat b { font-family: var(--display); font-size: 32px; font-weight: 800; display: block; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tablewrap { overflow-x: auto; }

/* ---------- Hero / auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(90% 70% at 20% 10%, rgba(77,107,255,.55), transparent 70%), radial-gradient(70% 60% at 90% 90%, rgba(181,107,255,.35), transparent 70%), #05060b; border-right: 1px solid var(--line); }
.auth-art h1 { font-size: clamp(30px, 3.6vw, 52px); max-width: 15ch; text-transform: uppercase; font-stretch: 122%; }
.auth-art h1 em { font-style: normal; color: var(--accent); display: block; }
.auth-art .muted, .auth-art .hint { color: #cfd6ff; }
.auth-art .back { color: #fff; font-size: 14px; }
.phones { display: flex; gap: 14px; align-items: flex-end; margin: 30px 0; }
.phone-mini { width: 120px; aspect-ratio: 9/16; border-radius: 20px; border: 1px solid rgba(190,205,255,.35); background: linear-gradient(170deg, #1a2350, #0a0d19); position: relative; overflow: hidden; }
.phone-mini:nth-child(2) { width: 150px; background: linear-gradient(170deg, #6ef3ff, #4d6bff 60%, #b56bff); }
.phone-mini span { position: absolute; left: 10px; right: 10px; bottom: 14px; font-family: var(--display); font-weight: 800; font-size: 12px; text-transform: uppercase; text-align: center; text-shadow: 0 2px 0 #000; }
.phone-mini::before { content: ''; position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.08); left: 27%; top: 22%; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-form .card { width: 100%; max-width: 400px; padding: 30px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { padding: 28px; } .phones { display: none; } }

/* ---------- Assistant ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.steps div { flex: 1; min-width: 120px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); color: var(--dim); font-size: 13px; font-weight: 600; }
.steps div b { display: block; font-family: var(--display); font-size: 12px; color: var(--dim); }
.steps div.on { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.steps div.ok { color: var(--muted); }
.pick { cursor: pointer; transition: .15s; position: relative; }
.pick:hover { border-color: #444150; }
.pick.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pick.on::after { content: '✓'; position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #0d0f1c; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--bg2); }
.thumb.tall { aspect-ratio: 9/14; }
.product-line { display: flex; gap: 12px; align-items: center; }
.product-line img, .product-line .ph { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: var(--bg2); }
.footer-bar { position: sticky; bottom: 0; margin-top: 24px; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.script-card textarea { min-height: 130px; font-size: 15px; }
.script-card .meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.label-letter { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; background: var(--card2); border: 1px solid var(--line); flex: none; }

/* ---------- Vidéos ---------- */
.ads { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.ad { background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.ad.win { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.screen { position: relative; aspect-ratio: 9/16; background: #08070b; }
.screen video, .screen img { width: 100%; height: 100%; object-fit: cover; }
.screen .over { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; padding: 20px; text-align: center; background: rgba(8,7,11,.55); backdrop-filter: blur(3px); }
.screen .tag { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.progress { width: 80%; height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .6s; }
.ad .body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ad .hook { font-weight: 600; font-size: 14px; line-height: 1.35; }
.ad .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.kpis { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.kpis b { color: var(--text); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.camp { text-decoration: none; display: flex; flex-direction: column; gap: 10px; transition: .15s; }
.camp:hover { border-color: #444150; transform: translateY(-2px); }
.camp .cover { aspect-ratio: 4/5; border-radius: 12px; background: var(--bg2) center/cover; position: relative; overflow: hidden; }
.camp .cover .badge { position: absolute; bottom: 10px; left: 10px; }

.persona { display: flex; flex-direction: column; gap: 10px; }
.persona .face { aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; background: var(--bg2); display: grid; place-items: center; position: relative; }
.persona .face img { width: 100%; height: 100%; object-fit: cover; }
.candidates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.candidates img { aspect-ratio: 9/16; object-fit: cover; border-radius: 12px; cursor: pointer; border: 2px solid transparent; transition: .15s; }
.candidates img:hover { border-color: var(--accent); transform: scale(1.02); }
@media (max-width: 600px) { .candidates { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Modale / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5,4,8,.72); backdrop-filter: blur(4px); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.modal.wide { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
@keyframes fade { from { opacity: 0; } }
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 11px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: fade .2s; max-width: 90vw; }
.toast.err { background: var(--red); color: #fff; }
.drop { border: 1.5px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; }
.drop:hover { border-color: var(--accent); color: var(--text); }
.drop img { max-height: 160px; margin: 0 auto 8px; border-radius: 10px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg2); border-radius: 12px; border: 1px solid var(--line); width: fit-content; }
.tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 600; }
.tabs button.on { background: var(--card2); color: var(--text); }
.hint { font-size: 12.5px; color: var(--dim); }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }

.kc-install { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90; max-width: 400px; margin-inline: auto; background: #0f1324; border: 1px solid #232a4a; color: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.55); font-size: 15px; display: grid; gap: 12px; }
.kc-install ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: #c6cdea; }
.kc-install .row { justify-content: flex-end; }
.kc-install button { border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 600; cursor: pointer; background: #6ef3ff; color: #04050c; }
.kc-install button.quiet { background: transparent; color: #c6cdea; }
