:root {
  --bg: #f1f4f7; --card: #fff; --fg: #14202b; --muted: #6a7885; --line: #e3e8ee; --soft: #f6f8fa;
  --brand: #1d4ed8; --brand2: #0ea5e9; --brand-fg: #fff; --tint: #e6f0ff; --danger: #c2371c; --dangersoft: #fdece8; --ok: #067647; --warn: #b45309; --warnsoft: #fff4e0;
  --rail: #0a1a3f; --in: #fff; --agentbg: #e3eeff; --grad: linear-gradient(135deg, #1d4ed8, #22c7f5);
  --wa: #25d366; --ms: #0a7cff; --ig: #d62976; --web: #475569;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 8px 24px -12px rgba(16, 32, 48, .18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) { --bg: #0e151b; --card: #16212a; --fg: #e8eef3; --muted: #93a2b0; --line: #26343f; --soft: #1b2833; --tint: #12332f; --in: #1d2b36; --agentbg: #123a35; --dangersoft: #3a1b15; --warnsoft: #3a2a10; --rail: #070f14; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; font: 15px/1.45 "PlexAr", system-ui, "Segoe UI", sans-serif; background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.root { display: flex; height: 100vh; height: 100dvh; }
#app { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .spacer { flex: 1; }
.ico { flex: none; }

/* ---------- barre latérale ---------- */
.rail { width: 76px; background: var(--rail); color: #b8c7d3; display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 10px; flex: none; }
.rail-logo { width: 42px; height: 42px; border-radius: 13px; object-fit: cover; display: block; margin-bottom: 8px; box-shadow: 0 8px 18px -8px rgba(14, 165, 233, .8); }
.rail-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; width: 100%; padding: 0 8px; }
.rn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 7px; border: 0; background: none; color: inherit; border-radius: 12px; font-size: 11px; font-weight: 600; }
.rn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.rn.on { background: rgba(14, 165, 233, .18); color: #5eead4; }
.rn .nb { position: absolute; top: 3px; right: 10px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.rail-foot { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.rbtn { width: 44px; min-height: 36px; border: 0; background: rgba(255, 255, 255, .06); color: #cfdbe4; border-radius: 10px; font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 6px 0; }
.rbtn:hover { background: rgba(255, 255, 255, .14); }
@media (max-width: 860px) {
  .root { flex-direction: column-reverse; }
  .rail { width: 100%; flex-direction: row; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); gap: 4px; }
  .rail-logo { display: none; }
  .rail-nav { flex-direction: row; padding: 0; justify-content: space-around; gap: 2px; }
  .rn { flex: 1; padding: 6px 0 4px; }
  .rail-foot { flex-direction: row; gap: 3px; } #tour-btn { display: none; }
  .rbtn { width: 34px; min-height: 34px; padding: 4px 0; }
  .rn { min-width: 0; font-size: 10px; overflow: hidden; } .rn span:not(.nb) { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chead { padding: 8px 10px; gap: 8px; } .chead .who b, .chead .who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .chead .who small { display: block; }
}

/* ---------- formes de base ---------- */
.page { flex: 1; overflow-y: auto; padding: 24px clamp(14px, 3vw, 36px) 40px; }
.page > * { max-width: 1120px; margin-inline: auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
h1 { font-size: 1.55rem; margin: 0 0 4px; letter-spacing: -.02em; } h2 { font-size: 1.05rem; margin: 0 0 10px; }
label { display: block; font-weight: 600; margin: 12px 0 5px; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); outline: none; transition: .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--brand2); box-shadow: 0 0 0 4px rgba(14, 165, 233, .16); }
textarea { min-height: 84px; resize: vertical; }
button.pri, form button:not(.ghost):not(.danger), .row > button:not(.ghost):not(.danger) { background: var(--grad); color: #fff; border: 0; border-radius: 12px; padding: 10px 18px; min-height: 42px; font-weight: 700; box-shadow: 0 8px 16px -10px rgba(15, 118, 110, .9); }
button.ghost { background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 7px 14px; min-height: 38px; font-weight: 600; }
button.ghost:hover { background: var(--soft); }
button.danger, button.ghost.danger { color: var(--danger); border-color: rgba(194, 55, 28, .35); background: transparent; box-shadow: none; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.err { color: var(--danger); margin-top: 8px; } .okmsg { color: var(--ok); margin-top: 8px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; } td, th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: start; }
.pm { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; border-bottom: 1px solid var(--line); padding: 10px 0; }
.badge { font-size: .74rem; padding: 2px 9px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); margin-inline-start: auto; font-weight: 600; }
.badge.done { color: var(--ok); border-color: rgba(6, 118, 71, .35); background: #e9f8f0; }
.demo-banner { background: linear-gradient(90deg, #fff4d6, #ffe9b3); color: #6b4300; padding: 7px 14px; font-weight: 600; font-size: .86rem; text-align: center; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font-size: .88rem; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; } .dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }

/* ---------- connexion ---------- */
.authwrap { flex: 1; display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 70% -10%, #c9f1ea, transparent), var(--bg); overflow: auto; }
.authwrap form.card { width: 100%; max-width: 400px; padding: 26px; }

/* ---------- configurateur ---------- */
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li button { width: 100%; text-align: start; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; font-weight: 600; box-shadow: none; }
.steps li button[aria-current=true] { border-color: var(--brand2); background: var(--tint); }
.choices { display: grid; gap: 10px; }
.choice { border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; background: var(--card); text-align: start; }
.choice.sel { border-color: var(--brand2); background: var(--tint); }
.choice p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .steps { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 6px; } .steps li { flex: 0 0 auto; } .steps li button { margin: 0; white-space: nowrap; } .steps .badge { display: none; }
}

/* ---------- messages : 3 colonnes ---------- */
.view.inbox { flex: 1; min-height: 0; display: grid; grid-template-columns: 360px minmax(0, 1fr) 310px; background: var(--card); }
.col-list { min-width: 0; border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--card); }
.col-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); background-image: radial-gradient(circle at 1px 1px, rgba(100, 120, 140, .09) 1px, transparent 0); background-size: 18px 18px; }
.col-panel { border-inline-start: 1px solid var(--line); background: var(--card); overflow-y: auto; min-height: 0; }
.lhead { padding: 16px 16px 6px; display: flex; align-items: center; gap: 8px; }
.lhead h1 { font-size: 1.35rem; margin: 0; flex: 1; }
.lhead .count { font-size: .76rem; font-weight: 700; color: var(--brand); background: var(--tint); padding: 3px 9px; border-radius: 99px; }
.sbox { display: flex; align-items: center; gap: 8px; margin: 6px 14px; background: var(--soft); border-radius: 14px; padding: 0 12px; color: var(--muted); }
.sbox input { border: 0; background: none; box-shadow: none !important; padding: 10px 0; }
.chips { display: flex; gap: 6px; padding: 6px 14px 10px; overflow-x: auto; }
.chip { flex: none; border: 0; background: var(--soft); border-radius: 99px; padding: 6px 13px; font-weight: 700; font-size: .84rem; color: var(--muted); }
.chip b { margin-inline-start: 5px; font-weight: 800; }
.chip.on { background: var(--brand); color: #fff; }
.rows { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.crow { display: flex; gap: 12px; align-items: center; padding: 10px 10px; border-radius: 14px; cursor: pointer; border: 0; background: none; width: 100%; text-align: start; }
.crow:hover { background: var(--soft); } .crow.on { background: var(--tint); }
.crow .mid { flex: 1; min-width: 0; }
.crow .t { display: flex; gap: 6px; align-items: baseline; }
.crow .t b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.crow .t time { font-size: .74rem; color: var(--muted); flex: none; }
.crow .p { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .88rem; }
.crow .p span.pv { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.crow.unread .t b, .crow.unread .pv { color: var(--fg); font-weight: 800; } .crow.unread time { color: var(--brand); font-weight: 700; }
.ub { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; flex: none; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.tag { font-size: .68rem; font-weight: 700; border-radius: 99px; padding: 1px 8px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.tag.hot { background: var(--dangersoft); color: var(--danger); border-color: transparent; } .tag.vip { background: var(--warnsoft); color: var(--warn); border-color: transparent; }
.tag.new { background: #e8f0ff; color: #1d4ed8; border-color: transparent; } .tag.ia { background: var(--tint); color: var(--brand); border-color: transparent; }
.simbox { border-top: 1px solid var(--line); padding: 8px 12px; background: var(--soft); font-size: .88rem; }
.simbox summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.simbox .simrow { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; } .simbox .simrow .full { grid-column: 1/-1; }
.simbox input, .simbox select { padding: 7px 10px; border-radius: 10px; }
.simbox button { padding: 7px 12px; min-height: 34px; }

/* avatars */
.av { position: relative; flex: none; }
.avimg, .avini { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; color: #fff; font-weight: 800; }
.chb { position: absolute; right: -3px; bottom: -3px; width: 36%; height: 36%; min-width: 15px; min-height: 15px; border-radius: 50%; border: 2px solid var(--card); display: grid; place-items: center; color: #fff; }
.ch-whatsapp { background: var(--wa); } .ch-messenger { background: var(--ms); } .ch-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); } .ch-web { background: var(--web); }

/* discussion */
.chead { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); flex: none; }
.chead .who { flex: 1; min-width: 0; } .chead .who b { display: block; font-size: 1.03rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chead .who small { color: var(--muted); }
.ibtn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--soft); color: var(--fg); display: grid; place-items: center; flex: none; padding: 0; }
.ibtn:hover { background: var(--tint); }
.back { display: none; }
.seg { display: flex; background: var(--soft); border-radius: 99px; padding: 3px; border: 1px solid var(--line); flex: none; }
.seg button { border: 0; background: none; border-radius: 99px; padding: 6px 13px; font-weight: 700; font-size: .84rem; color: var(--muted); display: flex; gap: 6px; align-items: center; min-height: 0; box-shadow: none; }
.seg button.on { background: var(--grad); color: #fff; } .seg button.on.me { background: linear-gradient(135deg, #f97316, #dc2626); }
.hbanner { display: flex; gap: 10px; align-items: center; padding: 9px 16px; background: var(--warnsoft); color: var(--warn); font-weight: 600; font-size: .9rem; flex: none; border-bottom: 1px solid rgba(180, 83, 9, .2); }
.hbanner button { margin-inline-start: auto; border: 1px solid currentColor; background: none; color: inherit; border-radius: 99px; padding: 4px 12px; font-weight: 700; min-height: 0; box-shadow: none; }
.msgs { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; direction: ltr; }
.day { align-self: center; margin: 14px 0 8px; font-size: .74rem; font-weight: 700; color: var(--muted); background: var(--card); border: 1px solid var(--line); padding: 2px 12px; border-radius: 99px; }
.grp { display: flex; flex-direction: column; margin-top: 10px; max-width: min(76%, 560px); }
.grp.in { align-self: flex-start; align-items: flex-start; } .grp.agent, .grp.me { align-self: flex-end; align-items: flex-end; }
.who-l { font-size: .7rem; font-weight: 700; color: var(--muted); display: flex; gap: 4px; align-items: center; margin: 0 8px 2px; }
.grp.agent .who-l { color: var(--brand); }
.bub { padding: 8px 13px; border-radius: 18px; margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; box-shadow: 0 1px 1px rgba(16, 32, 48, .05); }
.grp.in .bub { background: var(--in); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.grp.agent .bub { background: var(--agentbg); border: 1px solid rgba(14, 165, 233, .25); border-bottom-right-radius: 5px; }
.grp.me .bub { background: var(--grad); color: #fff; border-bottom-right-radius: 5px; }
.gt { font-size: .68rem; color: var(--muted); margin: 3px 8px 0; }
.ph { width: 230px; height: 150px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; font-weight: 700; font-size: .8rem; margin: 2px 0; background: linear-gradient(135deg, #64748b, #334155); }
.ph[data-t="cable"] { background: linear-gradient(135deg, #0ea5e9, #1e3a8a); } .ph[data-t="proof"] { background: linear-gradient(135deg, #16a34a, #14532d); } .ph[data-t="broken"] { background: linear-gradient(135deg, #f97316, #7c2d12); } .ph[data-t="shoe"] { background: linear-gradient(135deg, #a855f7, #581c87); }
.bub.mediab { padding: 4px; }
.vc { display: flex; align-items: center; gap: 10px; min-width: 220px; padding: 4px 6px; }
.vc .pl { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.vc .wave { display: flex; align-items: center; gap: 2px; height: 28px; flex: 1; } .vc .wave i { width: 3px; border-radius: 2px; background: var(--brand); opacity: .55; }
.vc time { font-size: .74rem; color: var(--muted); }
.trs { font-size: .78rem; color: var(--muted); margin: 3px 8px 0; font-style: italic; max-width: 100%; unicode-bidi: plaintext; }
.comp { display: flex; gap: 8px; align-items: flex-end; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); flex: none; }
.comp textarea { min-height: 42px; max-height: 120px; border-radius: 22px; padding: 10px 16px; resize: none; background: var(--soft); }
.sendb { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; padding: 0; box-shadow: 0 8px 16px -8px rgba(15, 118, 110, .9); }
.hint { font-size: .72rem; color: var(--muted); padding: 0 18px 8px; background: var(--card); }
.empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 30px; }
.empty .big { width: 78px; height: 78px; border-radius: 24px; background: var(--tint); color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px; }

/* fiche client */
.pn { padding: 22px 18px; text-align: center; border-bottom: 1px solid var(--line); }
.pn .av { margin: 0 auto 10px; } .pn h3 { margin: 0; font-size: 1.1rem; } .pn p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }
.pn .tags { justify-content: center; margin-top: 10px; }
.ps { padding: 14px 18px; border-bottom: 1px solid var(--line); } .ps h4 { margin: 0 0 8px; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ps textarea { min-height: 70px; font-size: .9rem; }
.po { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--soft); margin-bottom: 6px; font-size: .88rem; }
.po small { display: block; color: var(--muted); }
.st { font-size: .7rem; font-weight: 800; border-radius: 99px; padding: 2px 9px; height: fit-content; background: var(--tint); color: var(--brand); white-space: nowrap; }
.st.new { background: var(--warnsoft); color: var(--warn); } .st.delivered { background: #e9f8f0; color: var(--ok); } .st.cancelled { background: var(--dangersoft); color: var(--danger); }
details.of summary { cursor: pointer; font-weight: 700; color: var(--brand); padding: 4px 0; }

@media (max-width: 1180px) {
  .view.inbox { grid-template-columns: 330px minmax(0, 1fr); }
  .col-panel { display: none; position: fixed; inset: 0 0 0 auto; width: min(340px, 92vw); z-index: 30; box-shadow: -20px 0 40px -20px rgba(0, 0, 0, .4); }
  .view.show-panel .col-panel { display: block; }
}
@media (max-width: 860px) {
  .view.inbox { grid-template-columns: minmax(0, 1fr); }
  .view.inbox .col-chat { display: none; } .view.inbox.has-chat .col-list { display: none; } .view.inbox.has-chat .col-chat { display: flex; }
  .back { display: grid; } .grp { max-width: 88%; } .seg button span { display: none; }
}

/* ---------- Agent IA ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.how .hc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.how .hc h3 { margin: 0 0 6px; font-size: .96rem; display: flex; gap: 8px; align-items: center; } .how .hc h3 .ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: var(--brand); }
.how .hc.warn h3 .ic { background: var(--warnsoft); color: var(--warn); } .how .hc.blue h3 .ic { background: #e8f0ff; color: #1d4ed8; }
.how ul { margin: 0; padding-inline-start: 18px; color: var(--muted); font-size: .88rem; } .how li { margin: 3px 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: start; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); min-height: 118px; transition: .15s; }
.kpi:not(:disabled):hover { border-color: var(--brand2); transform: translateY(-1px); } .kpi:disabled { opacity: 1; cursor: default; }
.kpi-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--tint); color: var(--brand); margin-bottom: 4px; }
.kpi.k-warn .kpi-ic { background: var(--warnsoft); color: var(--warn); } .kpi.k-money .kpi-ic { background: #e9f8f0; color: var(--ok); } .kpi.k-blue .kpi-ic { background: #e8f0ff; color: #1d4ed8; }
.kpi-v { font-size: 1.85rem; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; } .kpi-l { color: var(--fg); font-weight: 600; } .kpi-s { font-size: .8rem; color: var(--muted); }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.modes .choice { color: var(--fg); min-height: 0; }
.blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; align-items: start; } .blocks .card { margin: 0; } .blocks .block.off { opacity: .55; }
.block:has(.bals), .block#blk-boss, .block#blk-daily { grid-column: 1 / -1; }
.bals { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.bal { border: 1px solid var(--line); border-radius: 14px; padding: 12px; } .big { font-size: 1.6rem; font-weight: 800; margin: 6px 0; }
.bar { height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--grad); }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; } .chart .col { flex: 1; height: 100%; display: flex; flex-direction: column-reverse; gap: 1px; }
.chart .col i { display: block; width: 100%; border-radius: 3px; } .chart .col .i { background: var(--brand2); } .chart .col .o { background: #94a3b8; opacity: .45; }
.legend { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); margin-top: 8px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; }
ul.plain { list-style: none; margin: 0; padding: 0; } ul.plain li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.msgs.boss { max-height: 300px; padding: 4px 0; }
.bubble { max-width: 82%; padding: 8px 13px; border-radius: 16px; white-space: pre-wrap; margin: 3px 0; }
.bubble.in { align-self: flex-start; background: var(--soft); border: 1px solid var(--line); } .bubble.out { align-self: flex-end; background: var(--grad); color: #fff; }

/* ---------- visite guidée ---------- */
.tour { position: fixed; z-index: 80; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); background: #0a1a3f; color: #e6f2f6; border-radius: 20px; padding: 16px 18px; box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .6); }
.tour h3 { margin: 0 0 4px; font-size: 1.05rem; } .tour p { margin: 0 0 12px; color: #b8c9d4; font-size: .93rem; }
.tour .tr { display: flex; align-items: center; gap: 8px; } .tour .tr .n { color: #7a93a3; font-size: .8rem; margin-inline-end: auto; }
.tour button { border: 0; border-radius: 10px; padding: 7px 14px; font-weight: 700; min-height: 0; }
.tour .nx { background: var(--grad); color: #fff; } .tour .pv, .tour .qt { background: rgba(255, 255, 255, .1); color: #e6f2f6; }
.tour-hl { outline: 3px solid #fbbf24; outline-offset: -3px; border-radius: 14px; animation: hl 1.6s ease-in-out infinite; position: relative; z-index: 2; }
@keyframes hl { 50% { outline-color: rgba(251, 191, 36, .35); } }
@media (max-width: 860px) { .tour { bottom: 74px; } }

/* Police des titres */
h1, h2, h3, .kpi-v, .big, .rail-nav .lbl { font-family: "Bricolage", "PlexAr", system-ui, sans-serif; letter-spacing: -.015em; }
h1, h2, h3, .kpi-v { font-weight: 800; }
html[lang=ar] *, html[lang=ar] *::before { letter-spacing: 0 !important; }

/* Essai public : accueil « Essayer sans compte » et bannière */
.trialgate { flex: 1; overflow: auto; margin: auto; max-width: 620px; padding: 32px 22px 48px; text-align: center; }
.trialgate .tg-logo { border-radius: 16px; } .trialgate h1 { font-size: 2.2rem; margin: 8px 0 4px; }
.trialgate h2 { font-size: 1.25rem; margin: 18px 0 6px; } .trialgate p { margin: 0 0 8px; color: var(--muted); }
.trialgate .big-cta { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; margin: 22px 0 10px; padding: 16px 34px; font-size: 1.2rem; min-height: 64px; border: 0; border-radius: 16px; background: var(--grad); color: #fff; font-weight: 800; box-shadow: 0 18px 30px -16px rgba(29, 78, 216, .9); cursor: pointer; }
.trialgate .big-cta small { font-size: .95rem; font-weight: 600; opacity: .92; } .trialgate .big-cta:disabled { opacity: .6; }
.trialgate .tg-note { font-size: .82rem; }
.demo-banner { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.demo-banner button.sm { padding: 3px 12px; min-height: 28px; font-size: .8rem; border-radius: 9px; }
.tour .tr .rd { margin-inline-end: auto; }
