/* Prospects · Sofian Cétogène — même langage visuel que le business-dashboard (accueil coach ketosync) */
:root {
  --bg: #0A0A0C; --bg-soft: #121217; --card: #16161D; --card-hover: #1C1C25;
  --border: #25252F; --border-soft: #1D1D26;
  --text: #F4F4F5; --text-soft: #A1A1AA; --text-dim: #71717A;
  --accent: #C0FA5B; --accent-2: #7C5CFF; --good: #22C55E; --bad: #EF4444; --amber: #F59E0B; --cyan: #13E0FF;
  --glass: rgba(255, 255, 255, 0.025); --glass-border: rgba(255, 255, 255, 0.08); --tile: rgba(255, 255, 255, 0.035);
  --pA: #C97F0A; --pB: #E0455A; --pC: #3B8BDB; --pD: #18A877;
  --font: ui-sans-serif, system-ui, -apple-system, "SF Pro Display", "SF Pro Text", "Inter", sans-serif;
  --r: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body {
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 92, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(192, 250, 91, 0.07), transparent 60%),
    var(--bg);
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--text); }
[hidden] { display: none !important; }
.ic { width: 16px; height: 16px; flex-shrink: 0; }
.muted { color: var(--text-dim); } .soft { color: var(--text-soft); } .small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@keyframes coach-shine { to { background-position: 200% center; } }
.shine { background: linear-gradient(90deg, #00FF94, #13E0FF, #7c5cff, #00FF94); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: coach-shine 6s linear infinite; }
@keyframes coach-aura { 0% { transform: translate(-10%, -10%) rotate(0deg) scale(1); } 50% { transform: translate(8%, 6%) rotate(180deg) scale(1.15); } 100% { transform: translate(-10%, -10%) rotate(360deg) scale(1); } }
.aura { position: absolute; inset: -40%; pointer-events: none; filter: blur(20px);
  background: radial-gradient(35% 35% at 30% 30%, rgba(0, 255, 148, 0.16), transparent 70%), radial-gradient(30% 30% at 70% 60%, rgba(19, 224, 255, 0.14), transparent 70%), radial-gradient(25% 25% at 50% 80%, rgba(124, 92, 255, 0.12), transparent 70%);
  animation: coach-aura 18s ease-in-out infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.rise { animation: rise 520ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes spin { to { transform: rotate(360deg); } }
.spin .ic { animation: spin 900ms linear infinite; }
@media (prefers-reduced-motion: reduce) { .aura, .shine, .rise, .spin .ic { animation: none !important; } }

/* ---------- Connexion ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; padding: 28px; }
.login h1 { font-size: 30px; letter-spacing: -.03em; margin: 4px 0 6px; }
.eyebrow { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.err { color: #F87171; min-height: 20px; font-size: 13px; margin: 10px 0 0; }

/* ---------- Coquille ---------- */
#app { max-width: 560px; margin: 0 auto; padding: max(env(safe-area-inset-top), 16px) 16px calc(96px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 8px; margin-bottom: 16px; }
.top .date { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.top h1 { margin: 2px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.top-r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; color: var(--text-soft); border: 1px solid var(--glass-border); background: var(--glass); }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 500; white-space: nowrap; border: 1px solid var(--glass-border); color: var(--text-soft); }
.pill .d { width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.pill.ok { color: var(--accent); border-color: rgba(192, 250, 91, .25); }
.pill.warn { color: var(--amber); border-color: rgba(245, 158, 11, .3); }
.pill.err { color: var(--bad); border-color: rgba(239, 68, 68, .3); }

.side { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: rgba(10, 10, 12, .86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--border-soft); }
.side .brand { display: none; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 8px; border-radius: 12px; color: var(--text-dim); font-size: 10.5px; font-weight: 600; min-width: 58px; position: relative; }
.nav-item .ic { width: 21px; height: 21px; }
.nav-item.on { color: var(--accent); }
.nav-item .badge { position: absolute; top: 0; right: 10px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #0A0A0C; font-size: 10px; font-weight: 800; display: grid; place-items: center; }

#view { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Cartes ---------- */
.glass { position: relative; border-radius: var(--r); border: 1px solid var(--glass-border); background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); padding: 16px; overflow: hidden; min-width: 0; }
.glass .in { position: relative; }
.tint-accent { background: radial-gradient(120% 80% at 100% 0%, rgba(192, 250, 91, .10), rgba(255, 255, 255, .02)); }
.tint-violet { background: radial-gradient(120% 80% at 100% 0%, rgba(124, 92, 255, .12), rgba(255, 255, 255, .02)); }
.tint-amber { background: radial-gradient(120% 90% at 0% 0%, rgba(245, 158, 11, .12), rgba(255, 255, 255, .02)); border-color: rgba(245, 158, 11, .26); }
.lbl { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.lbl-t { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.lbl-r { font-size: 12px; color: var(--text-dim); }
.hero-num { font-size: 56px; font-weight: 700; letter-spacing: -.04em; line-height: 1; margin: 4px 0 6px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.kpi { background: var(--tile); border: 1px solid var(--border-soft); border-radius: 12px; padding: 10px 12px; }
.kpi b { display: block; font-size: 22px; letter-spacing: -.02em; }
.kpi span { font-size: 11px; color: var(--text-dim); }
.empty { color: var(--text-dim); font-size: 14px; padding: 6px 0; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--tile); font-weight: 600; font-size: 14px; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover { background: var(--card-hover); }
.btn.primary { background: var(--accent); color: #0A0A0C; border-color: transparent; }
.btn.violet { background: var(--accent-2); color: #fff; border-color: transparent; }
.btn.danger { color: #F87171; border-color: rgba(239, 68, 68, .3); }
.btn.sm { padding: 7px 10px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }

/* ---------- Leads ---------- */
.lead { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--tile); border: 1px solid var(--border-soft); }
.lead + .lead { margin-top: 8px; }
.lead .who { flex: 1; min-width: 0; cursor: pointer; }
.lead .name { font-weight: 650; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.lead .meta { font-size: 12px; color: var(--text-dim); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead .acts { display: flex; gap: 6px; flex-shrink: 0; }
.round { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text); text-decoration: none; }
.round.call { background: var(--accent); color: #0A0A0C; border-color: transparent; }
.round.wa { color: #4ADE80; }
.round .ic { width: 18px; height: 18px; }
.fresh { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 11px; font-weight: 700; }
.pdot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; flex-shrink: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--glass-border); color: var(--text-soft); background: var(--glass); white-space: nowrap; }
.chip.s-nouveau { color: var(--accent); }
.chip.s-rdv { color: #A78BFA; }
.chip.s-client { color: var(--good); }
.chip.s-lapin { color: var(--amber); }
.chip.s-perdu { color: var(--text-dim); }

/* ---------- Pipeline ---------- */
.board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.colm { flex: 0 0 82%; max-width: 300px; scroll-snap-align: start; }
.colm h3 { margin: 0 0 8px; font-size: 13px; display: flex; justify-content: space-between; color: var(--text-soft); }
.colm .lead { flex-direction: column; align-items: stretch; gap: 4px; padding: 10px; }

/* ---------- Filtres ---------- */
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.fchip { padding: 7px 11px; border-radius: 99px; border: 1px solid var(--glass-border); background: var(--glass); font-size: 12.5px; color: var(--text-soft); white-space: nowrap; }
.fchip.on { background: rgba(192, 250, 91, .12); color: var(--accent); border-color: rgba(192, 250, 91, .35); }
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass); }
.search input { flex: 1; background: none; border: 0; padding: 11px 0; outline: none; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; font-size: 13px; color: var(--text-soft); }
.field input, .field textarea, .field select { width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-soft); outline: none; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(192, 250, 91, .5); }
.field textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
.hint { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--tile); padding: 1px 5px; border-radius: 6px; }

/* ---------- Fiche (sheet) ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto; background: var(--bg-soft); border-top-left-radius: 22px; border-top-right-radius: 22px; border: 1px solid var(--border); padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); animation: up 260ms cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sheet-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.sec { margin-top: 16px; }
.sec h4 { margin: 0 0 8px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--text-dim); }
.kv dd { margin: 0; word-break: break-word; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { padding: 8px 11px; border-radius: 10px; border: 1px solid var(--glass-border); background: var(--glass); font-size: 13px; color: var(--text-soft); }
.seg button.on { background: rgba(192, 250, 91, .14); color: var(--accent); border-color: rgba(192, 250, 91, .35); }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border-soft); }
.timeline time { color: var(--text-dim); font-size: 12px; }
.note { background: var(--tile); border-radius: 10px; padding: 9px 11px; font-size: 14px; margin-top: 6px; white-space: pre-wrap; }
.note small { display: block; color: var(--text-dim); margin-top: 4px; }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #1F1F27; border: 1px solid var(--border); color: var(--text); padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); max-width: 90vw; }

/* ---------- Graphiques ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis { fill: var(--text-dim); font-size: 10px; }
.chart .grid { stroke: var(--border-soft); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: default; }
.chart .bar { transition: opacity .15s; }
.chart .hit:hover + .bar, .chart .bar.hl { opacity: .75; }
.cchart { position: relative; }
.cplot { position: relative; height: 128px; padding-right: 22px; }
.gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border-soft); }
.gl span { position: absolute; right: 0; top: -8px; font-size: 10.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.ccols { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.ccol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline: none; min-width: 0; }
.ccol i { display: block; width: 100%; max-width: 14px; border-radius: 4px 4px 0 0; background: rgba(192, 250, 91, .5); min-height: 0; transition: opacity .15s; }
.ccol.today i { background: var(--accent); }
.ccol:hover i, .ccol:focus-visible i { opacity: .7; }
.cval { font-size: 11px; font-weight: 600; color: var(--text); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.caxis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); margin-top: 6px; padding-right: 22px; }
.tip { position: absolute; pointer-events: none; background: #1F1F27; border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); z-index: 3; }
.tip b { display: block; font-size: 15px; color: var(--text); }
.tip span { color: var(--text-soft); }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 10px; font-size: 13px; }
.hbar .lab { color: var(--text-soft); display: flex; align-items: center; gap: 7px; min-width: 0; }
.hbar .lab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hbar .fill { height: 14px; border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar .val { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar .val small { color: var(--text-dim); font-weight: 500; margin-left: 4px; }
details.table summary { cursor: pointer; font-size: 12px; color: var(--text-dim); margin-top: 10px; }
details.table table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
details.table td, details.table th { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--border-soft); font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 99px; background: rgba(192, 250, 91, .14); overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter.warn { background: rgba(245, 158, 11, .16); } .meter.warn > i { background: var(--amber); }
.meter.bad { background: rgba(239, 68, 68, .16); } .meter.bad > i { background: var(--bad); }
.svc { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.svc:last-child { border-bottom: 0; }
.svc p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 14px; cursor: pointer; }
.steps li .d { flex: 0 0 52px; color: var(--text-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.steps li .s { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview { width: 100%; height: 70dvh; border: 0; border-radius: 12px; background: #fff; }
.script { font-size: 14px; line-height: 1.55; color: var(--text-soft); }
.script p { margin: 0 0 6px; }
.script b { color: var(--text); }
.script h4 { margin: 4px 0 8px; font-size: 13px; color: var(--text); }

/* ---------- Ordinateur ---------- */
@media (min-width: 980px) {
  .side { top: 0; bottom: 0; right: auto; width: 220px; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 22px 14px; border-top: 0; border-right: 1px solid var(--border-soft); }
  .side .brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; padding: 0 10px 18px; }
  .side .brand .dot { width: 10px; height: 10px; border-radius: 99px; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
  .nav-item { flex-direction: row; gap: 11px; font-size: 14px; padding: 10px 12px; justify-content: flex-start; }
  .nav-item.on { background: rgba(192, 250, 91, .08); }
  .nav-item .badge { position: static; margin-left: auto; }
  #app { max-width: 1180px; margin-left: 220px; padding: 26px 32px 40px; }
  .cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; align-items: start; }
  .cols > .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .board { margin: 0; padding: 0 0 8px; }
  .colm { flex: 1 0 220px; max-width: none; }
  .sheet-panel { left: auto; top: 0; bottom: 0; width: 520px; max-height: none; border-radius: 22px 0 0 22px; animation: side 240ms cubic-bezier(.2, .8, .2, 1); }
  @keyframes side { from { transform: translateX(40px); opacity: .6; } to { transform: none; opacity: 1; } }
  .toast { bottom: 28px; }
}
@media (max-width: 979px) { .cols, .col { display: contents; } }

.legal-ok { margin: 0 0 10px; font-size: 12.5px; color: var(--good); }
.legal-no { margin: 0 0 10px; font-size: 12.5px; color: var(--amber); }
.linkbtn { color: var(--text-soft); text-decoration: underline; font-size: inherit; padding: 0; }
