/* TonDialer — application client */
:root {
  --bg: #f6f5fa;
  --surface: #ffffff;
  --surface-2: #f0eef6;
  --surface-3: #e7e4f0;
  --ink: #13101f;
  --ink-2: #5d5772;
  --ink-3: #9893aa;
  --line: #e9e6f1;
  --accent: #6c3bff;
  --accent-2: #5428e6;
  --accent-soft: #efe9ff;
  --accent-ink: #5428e6;
  --green: #12b76a;
  --green-soft: #e3f8ee;
  --red: #f04438;
  --red-soft: #fdecea;
  --amber: #f5a524;
  --tg: #2aabee;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(19, 16, 31, .05);
  --shadow: 0 1px 2px rgba(19, 16, 31, .04), 0 8px 24px rgba(19, 16, 31, .06);
  --shadow-lg: 0 24px 60px rgba(19, 16, 31, .18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0b13;
    --surface: #15131f;
    --surface-2: #1d1a2a;
    --surface-3: #282438;
    --ink: #f4f2fa;
    --ink-2: #aaa4bd;
    --ink-3: #6f6a83;
    --line: #242133;
    --accent: #8a66ff;
    --accent-2: #7a52ff;
    --accent-soft: #221a40;
    --accent-ink: #b9a3ff;
    --green-soft: #0f2a1f;
    --red-soft: #2c1416;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent-ink); }
svg { display: block; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
#root { min-height: 100%; }

/* ---------- boutons & champs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 14px; font-weight: 600; font-size: 15px;
  background: var(--accent); color: #fff; transition: background .15s, transform .08s, opacity .15s;
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn.soft:hover { background: var(--surface-3); }
.btn.plain { background: var(--surface-2); color: var(--ink); }
.btn.plain:hover { background: var(--surface-3); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn.lg { height: 54px; font-size: 16px; border-radius: 16px; }
.btn svg { width: 18px; height: 18px; }
.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.input { height: auto; padding: 12px 14px; resize: none; line-height: 1.55; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px 2px; }
.error { color: var(--red); font-size: 13.5px; min-height: 0; }
.error:empty { display: none; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- connexion */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr; align-content: start; }
.auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 28px 24px 34px;
  background: #110d22;
}
.auth-brand::before {
  content: ""; position: absolute; inset: -30%;
  background: radial-gradient(40% 40% at 25% 30%, rgba(124, 77, 255, .55), transparent 70%),
              radial-gradient(35% 35% at 80% 75%, rgba(214, 61, 196, .35), transparent 70%);
  filter: blur(10px);
}
.auth-brand > * { position: relative; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.logo-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; color: #fff; }
.logo-mark svg { width: 17px; height: 17px; }
.auth-brand h1 { font-size: 30px; line-height: 1.12; letter-spacing: -.03em; margin: 34px 0 12px; font-weight: 700; }
.auth-brand p { color: rgba(255, 255, 255, .72); margin: 0; max-width: 420px; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; display: none; }
.auth-points li { display: flex; gap: 12px; align-items: center; color: rgba(255, 255, 255, .85); padding: 8px 0; }
.auth-points i { width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; flex-shrink: 0; }
.auth-points svg { width: 17px; height: 17px; }
.demo-card { display: none; }
.auth-form { display: flex; align-items: flex-start; justify-content: center; padding: 28px 20px 40px; }
.auth-form .box { width: 100%; max-width: 400px; }
.auth-form h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 6px; }
.auth-form .lead { color: var(--ink-2); margin: 0 0 24px; }
.note { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.note svg { width: 20px; height: 20px; color: var(--accent-ink); flex-shrink: 0; margin-top: 1px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (min-width: 960px) {
  .auth { grid-template-columns: 1.05fr 1fr; align-content: stretch; }
  .auth-brand { padding: 44px 56px; display: flex; flex-direction: column; }
  .auth-brand h1 { font-size: 46px; margin-top: auto; }
  .auth-points { display: block; }
  .demo-card { display: block; margin-top: auto; }
  .auth-form { align-items: center; }
}

/* ---------- phrase secrète */
.phrase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.phrase div { display: flex; gap: 8px; align-items: baseline; padding: 11px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14.5px; }
.phrase i { font-style: normal; font-size: 11.5px; color: var(--ink-3); min-width: 15px; font-variant-numeric: tabular-nums; }
.warn { padding: 13px 14px; border-radius: var(--r-md); background: rgba(245, 165, 36, .12); font-size: 13.5px; color: var(--ink); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14.5px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex-shrink: 0; }

/* ---------- coque de l'application */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.side { display: none; }
.dialpanel { display: none; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); padding: 14px 18px 10px; display: flex; align-items: center; gap: 12px; }
.topbar h1 { font-size: 26px; letter-spacing: -.025em; margin: 0; font-weight: 700; flex: 1; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.status.ok .dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.status.err .dot { background: var(--red); }
.view { flex: 1; padding: 6px 16px 110px; width: 100%; max-width: 760px; margin: 0 auto; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; font-size: 11px; font-weight: 600; color: var(--ink-3); position: relative; }
.tabbar button svg { width: 23px; height: 23px; }
.tabbar button.on { color: var(--accent-ink); }
.badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }

@media (min-width: 1000px) {
  .app { flex-direction: row; height: 100dvh; overflow: hidden; }
  .tabbar { display: none; }
  .side { display: flex; flex-direction: column; width: 264px; flex-shrink: 0; padding: 20px 14px; border-right: 1px solid var(--line); background: var(--surface); }
  .side .logo { padding: 2px 8px 22px; }
  .nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; font-weight: 600; color: var(--ink-2); position: relative; }
  .nav button:hover { background: var(--surface-2); color: var(--ink); }
  .nav button.on { background: var(--accent-soft); color: var(--accent-ink); }
  .nav svg { width: 20px; height: 20px; }
  .nav .badge { position: static; margin-left: auto; }
  .side h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 26px 12px 8px; font-weight: 700; }
  .side-line { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 12px; text-align: left; }
  .side-line:hover { background: var(--surface-2); }
  .side-line.on { background: var(--surface-2); }
  .side-line .plus { width: 22px; height: 22px; margin: 0 -6px 0 -6px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex-shrink: 0; }
  .side-line .plus svg { width: 13px; height: 13px; }
  .side-line b { font-size: 13.5px; font-weight: 600; }
  .side-line small { display: block; color: var(--ink-3); font-size: 12px; }
  .side-foot { margin-top: auto; padding: 12px; border-radius: 14px; background: var(--surface-2); display: flex; align-items: center; gap: 10px; }
  .main { overflow-y: auto; }
  .topbar { padding: 26px 32px 14px; }
  .view { padding: 4px 32px 40px; }
  .dialpanel { display: flex; flex-direction: column; width: 380px; flex-shrink: 0; border-left: 1px solid var(--line); background: var(--surface); padding: 24px 24px 28px; overflow-y: auto; }
}

/* ---------- éléments communs */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; position: relative; }
.item + .item { border-top: 1px solid var(--line); }
button.item:hover, .item.hover:hover { background: var(--surface-2); }
.item .t { font-weight: 600; }
.item .s { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.item .s svg { width: 14px; height: 14px; flex-shrink: 0; }
.item .r { font-size: 12.5px; color: var(--ink-3); text-align: right; white-space: nowrap; }
.av { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.av svg { width: 20px; height: 20px; }
.ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); color: var(--ink-2); transition: background .15s; }
.ic:hover { background: var(--surface-3); }
.ic svg { width: 17px; height: 17px; }
.ic.go { background: var(--green-soft); color: var(--green); }
.ic.tg { background: rgba(42, 171, 238, .13); color: var(--tg); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sec { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; margin: 26px 4px 10px; }
.sec:first-child { margin-top: 6px; }
.empty { text-align: center; padding: 56px 24px; color: var(--ink-2); }
.empty .em { width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; margin: 0 auto 16px; }
.empty .em svg { width: 28px; height: 28px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.missed { color: var(--red) !important; }
.switch { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--surface-3); position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(18px); }
label.item { cursor: pointer; }

/* ---------- clavier */
.dialer { display: flex; flex-direction: column; align-items: center; padding-top: 8px; }
.from {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; border-radius: 999px;
  background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--ink-2); max-width: 100%;
}
.from:hover { background: var(--surface-3); }
.from b { color: var(--ink); font-weight: 600; }
.from svg { width: 15px; height: 15px; }
.screen { width: 100%; text-align: center; margin: 22px 0 4px; min-height: 52px; }
.screen input { width: 100%; border: 0; background: transparent; outline: none; text-align: center; font-size: 34px; font-weight: 500; letter-spacing: .02em; font-variant-numeric: tabular-nums; padding: 0; }
.screen input::placeholder { color: var(--ink-3); font-weight: 400; font-size: 20px; letter-spacing: 0; }
.hint { min-height: 20px; font-size: 13.5px; color: var(--accent-ink); font-weight: 600; text-align: center; }
.pad { display: grid; grid-template-columns: repeat(3, 74px); gap: 14px 26px; margin: 20px 0 22px; }
.key { width: 74px; height: 74px; border-radius: 50%; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; user-select: none; transition: background .12s, transform .06s; }
.key:hover { background: var(--surface-3); }
.key:active { transform: scale(.94); background: var(--surface-3); }
.key b { font-size: 29px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.key small { font-size: 9.5px; letter-spacing: .16em; color: var(--ink-3); font-weight: 600; margin-top: 3px; min-height: 11px; }
.pad-actions { display: grid; grid-template-columns: repeat(3, 74px); gap: 26px; align-items: center; justify-items: center; }
.call { width: 74px; height: 74px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; transition: transform .08s, filter .15s; box-shadow: 0 10px 24px rgba(18, 183, 106, .3); }
.call:hover { filter: brightness(1.06); }
.call:active { transform: scale(.95); }
.call svg { width: 30px; height: 30px; }
.erase { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); }
.erase:hover { color: var(--ink); background: var(--surface-2); }
.erase svg { width: 24px; height: 24px; }
@media (max-height: 720px) and (max-width: 999px) {
  .pad { grid-template-columns: repeat(3, 66px); gap: 10px 24px; margin: 12px 0 14px; }
  .key, .call { width: 66px; height: 66px; }
  .pad-actions { grid-template-columns: repeat(3, 66px); }
}

/* ---------- boutique de numéros */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; }
.chip:hover { border-color: var(--surface-3); background: var(--surface-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip small { font-weight: 600; opacity: .55; font-size: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.seg button { height: 34px; padding: 0 16px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.search { position: relative; flex: 1; min-width: 180px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.search .input { padding-left: 42px; height: 40px; border-radius: 12px; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 18px; }
.offers { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .offers { grid-template-columns: 1fr 1fr; } }
.offer { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, transform .15s, box-shadow .15s; text-align: left; width: 100%; }
.offer:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.offer .flag { font-size: 28px; line-height: 1; }
.offer .n { font-size: 18px; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.offer .m { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.offer .go { color: var(--accent-ink); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.pill.ac { background: var(--accent-soft); color: var(--accent-ink); }
.welcome { padding: 18px 0 4px; }
.welcome h2 { font-size: 28px; letter-spacing: -.025em; margin: 0 0 6px; }

/* ---------- cartes de numéros */
.lines { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .lines { grid-template-columns: 1fr 1fr; } }
.line { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.line-face {
  position: relative; padding: 18px 18px 20px; color: #fff; min-height: 150px; display: flex; flex-direction: column;
  background: var(--c);
  background-image: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .22), transparent 55%),
                    radial-gradient(90% 80% at 0% 100%, rgba(0, 0, 0, .22), transparent 60%);
}
.line-face .top { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.line-face .top .pill { background: rgba(255, 255, 255, .2); color: #fff; margin-left: auto; }
.line-face .big { margin-top: auto; font-size: 23px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.line-face .meta { font-size: 13px; opacity: .8; margin-top: 2px; }
.line-acts { display: flex; border-top: 1px solid var(--line); }
.line-acts button { flex: 1; padding: 12px 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.line-acts button + button { border-left: 1px solid var(--line); }
.line-acts button:hover { background: var(--surface-2); color: var(--ink); }
.add-line { border: 1.5px dashed var(--surface-3); border-radius: var(--r-lg); min-height: 196px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--accent-ink); font-weight: 600; }
.add-line:hover { background: var(--surface); border-color: var(--accent); }
.add-line i { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; }
.add-line svg { width: 22px; height: 22px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); transition: transform .1s; }
.swatch.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }

/* ---------- feuilles / dialogues */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(12, 10, 20, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s; }
.dialog { background: var(--bg); width: 100%; max-height: 92dvh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); animation: up .22s cubic-bezier(.2, .8, .2, 1); }
.dialog .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 16px; }
.dialog h3 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 6px; }
.dialog .sub { color: var(--ink-2); margin: 0 0 18px; font-size: 14.5px; }
@media (min-width: 700px) {
  .overlay { align-items: center; padding: 24px; }
  .dialog { max-width: 440px; border-radius: 24px; padding: 26px; box-shadow: var(--shadow-lg); }
  .dialog .grab { display: none; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: up .2s; max-width: calc(100% - 32px); text-align: center; }
@media (min-width: 1000px) { .toast { bottom: 32px; } }

/* ---------- écran d'appel */
.callscreen {
  position: fixed; inset: 0; z-index: 60; color: #fff; display: flex; align-items: center; justify-content: center;
  background: #0d0b16; animation: fade .2s;
}
.callscreen::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 45% at 50% 22%, color-mix(in srgb, var(--c) 55%, transparent), transparent 70%);
}
.callbox { position: relative; width: 100%; max-width: 400px; height: 100%; max-height: 780px; display: flex; flex-direction: column; align-items: center; padding: 48px 28px calc(36px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) {
  .callscreen { background: rgba(8, 6, 14, .7); backdrop-filter: blur(10px); }
  .callscreen::before { display: none; }
  .callbox { height: auto; min-height: 640px; border-radius: 32px; background: #0d0b16; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
  .callbox::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 45% at 50% 18%, color-mix(in srgb, var(--c) 55%, transparent), transparent 72%); }
  .callbox > * { position: relative; }
}
.via { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 12.5px; font-weight: 600; }
.who-av { width: 104px; height: 104px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; font-size: 38px; font-weight: 600; margin: 44px 0 20px; position: relative; }
.who-av svg { width: 44px; height: 44px; opacity: .85; }
.who-av.ring::before, .who-av.ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .45); animation: ripple 2s infinite; }
.who-av.ring::after { animation-delay: 1s; }
@keyframes ripple { to { transform: scale(1.75); opacity: 0; } }
.who { font-size: 30px; font-weight: 600; letter-spacing: -.01em; text-align: center; font-variant-numeric: tabular-nums; }
.who-sub { color: rgba(255, 255, 255, .6); margin-top: 4px; font-variant-numeric: tabular-nums; }
.cstate { color: rgba(255, 255, 255, .75); margin-top: 8px; font-size: 15px; font-variant-numeric: tabular-nums; }
.cgrid { display: grid; grid-template-columns: repeat(3, 72px); gap: 22px 30px; margin: auto 0 34px; }
.cb { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: rgba(255, 255, 255, .8); }
.cb i { width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; transition: background .15s; }
.cb:hover i { background: rgba(255, 255, 255, .2); }
.cb.on i { background: #fff; color: #0d0b16; }
.cb svg { width: 25px; height: 25px; }
.hang { width: 72px; height: 72px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px rgba(240, 68, 56, .35); }
.hang svg { width: 30px; height: 30px; transform: rotate(135deg); }
.answer { display: flex; gap: 90px; margin-top: auto; }
.answer > div { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .8); }
.answer .call, .answer .hang { width: 72px; height: 72px; }
.answer .call { animation: nudge 1.4s infinite; box-shadow: 0 12px 28px rgba(18, 183, 106, .4); }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.cpad { display: grid; grid-template-columns: repeat(3, 64px); gap: 12px 26px; margin: 26px 0 auto; }
.cpad button { width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 25px; font-weight: 500; }
.cpad button:hover { background: rgba(255, 255, 255, .18); }

/* ---------- boutique en 3 étapes */
.step { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 26px 2px 12px; text-transform: uppercase; letter-spacing: .06em; }
.step span { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 12px; letter-spacing: 0; }
.welcome + .step { margin-top: 22px; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line); text-align: left; transition: border-color .15s, background .15s; }
.type i { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; margin-bottom: 10px; }
.type i svg { width: 22px; height: 22px; }
.type b { font-size: 16px; }
.type small { font-size: 13px; color: var(--ink-2); }
.type:hover { border-color: var(--surface-3); }
.type.on { border-color: var(--accent); background: var(--accent-soft); }
.type.on i { background: var(--accent); color: #fff; }
.type:disabled { opacity: .45; cursor: not-allowed; }
.prefixes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .prefixes { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .prefixes { grid-template-columns: repeat(5, 1fr); } }
.prefix { display: flex; flex-direction: column; align-items: flex-start; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-align: left; transition: border-color .15s, transform .15s, box-shadow .15s; }
.prefix b { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.prefix small { font-size: 13px; color: var(--ink-2); margin-top: 2px; min-height: 18px; }
.prefix em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--green); margin-top: 10px; }
.prefix:hover:not(:disabled) { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.prefix:disabled { opacity: .5; cursor: not-allowed; }
.prefix:disabled em { color: var(--ink-3); }

/* ---------- fiches clients */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); margin-bottom: 16px; }
.seg button { flex: 1; min-width: 0; white-space: nowrap; height: 38px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.seg small { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.ftools { display: flex; gap: 8px; align-items: center; }
.fsearch { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); }
.fsearch:focus-within { border-color: var(--accent); }
.fsearch svg { width: 18px; height: 18px; flex-shrink: 0; }
.fsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); }
.ftools .btn { height: 44px; padding: 0 14px; border-radius: 14px; }
.ftools .btn.sq { width: 44px; padding: 0; }
@media (max-width: 420px) { .ftools .btn span { display: none; } .ftools .btn.soft { width: 44px; padding: 0; } }
.fcount { font-size: 12.5px; color: var(--ink-3); margin: 10px 4px 0; }
.fcount + .sec { margin-top: 14px; }
.drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 22px; border: 2px dashed var(--surface-3); border-radius: var(--r-lg); color: var(--ink-2); font-size: 14px; transition: border-color .15s, background .15s; }
.drop .em { width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; margin-bottom: 8px; }
.drop .em svg { width: 30px; height: 30px; }
.drop b { color: var(--ink); font-size: 17px; }
.drop span { max-width: 380px; }
.drop .btn { margin-top: 14px; }
body.dragging .drop, body.dragging .main { border-color: var(--accent); background: var(--accent-soft); }
.drop-ex { text-align: left; font: 12.5px/1.6 ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface-2); color: var(--ink-2); padding: 12px 16px; border-radius: 12px; margin: 18px 0 0; white-space: pre; }
.fiche-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.fiche-head .av { width: 54px; height: 54px; font-size: 19px; background: var(--accent-soft); color: var(--accent-ink); }
.fiche-head h3 { margin: 0; overflow-wrap: anywhere; }
.fiche-head .sub { margin: 2px 0 0; }
.ffields { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 4px 16px; }
.ffields dl, .cfiche dl { display: grid; grid-template-columns: minmax(90px, 36%) 1fr; margin: 0; }
.ffields dt, .ffields dd { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ffields dl > :nth-child(-n+2) { border-top: 0; }
.ffields dt { color: var(--ink-3); padding-right: 12px; }
.ffields dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-weight: 500; }
.ffields dl:empty::after { content: "Aucune autre information"; grid-column: 1 / -1; color: var(--ink-3); font-size: 14px; padding: 10px 0; }
.btn.block svg { flex-shrink: 0; }

/* fiche sur l'écran d'appel */
.cfiche { width: 100%; margin: 18px 0 22px; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); text-align: left; overflow: hidden; display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto; }
.cfiche-h { display: flex; align-items: center; gap: 8px; padding: 11px 14px 9px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .65); }
.cfiche-h svg { width: 16px; height: 16px; }
.cfiche dl { overflow-y: auto; max-height: 30vh; padding: 0 14px 10px; font-size: 13.5px; }
.cfiche dt { color: rgba(255, 255, 255, .55); padding: 5px 10px 5px 0; }
.cfiche dd { margin: 0; padding: 5px 0; color: #fff; white-space: pre-line; overflow-wrap: anywhere; }
.callbox.has-fiche .who-av { width: 64px; height: 64px; font-size: 23px; margin: 22px 0 12px; }
.callbox.has-fiche .who-av svg { width: 30px; height: 30px; }
.callbox.has-fiche .who { font-size: 24px; }
.callbox.has-fiche .answer { margin-top: auto; }
@media (min-width: 700px) { .callbox.has-fiche { max-width: 460px; } .cfiche dl { max-height: 260px; } }
.mic-steps { margin: 4px 0 20px; padding-left: 22px; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.mic-steps li + li { margin-top: 8px; }
.mic-steps b { color: var(--ink); }

/* ligne « numéro aléatoire » (rotation du caller ID) */
.side-line small:not(.num) { display: block; font-size: 11.5px; color: var(--ink-3); }
.line.rnd { width: 100%; text-align: left; padding: 0; border: 0; background: none; }
.line.rnd .line-face { border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); }
.line.rnd.on .line-face { border-style: solid; }
