/* EffaBank — feuille de styles unique, sans dépendance externe (compatible CSP stricte) */
:root {
  --navy: #0f2440; --navy-2: #17345c; --ink: #13213a; --muted: #6b7791; --line: #e5e9f0;
  --bg: #f4f6fa; --card: #fff; --accent: #0e8f7e; --accent-2: #0b7466; --accent-soft: #e3f4f1;
  --danger: #c2392b; --danger-soft: #fbeae8; --warn: #b7791f; --warn-soft: #fdf3e1; --ok: #1f8a4c; --ok-soft: #e6f5ec;
  --in: #1f8a4c; --out: #9aa6bd; --radius: 14px; --shadow: 0 1px 2px rgba(15,36,64,.05), 0 4px 16px rgba(15,36,64,.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.35rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.05rem; }
small { font-size: .82rem; }
code.wrap { word-break: break-all; font-size: .78rem; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: .02em; }
.muted { color: var(--muted); } .small { font-size: .82rem; } .center { text-align: center; } .cap { text-transform: capitalize; }
.block { display: block; } .nowrap { white-space: nowrap; } .right { display: flex; gap: .5rem; align-items: center; }
.text-danger { color: var(--danger); } .strike { text-decoration: line-through; color: var(--muted); }
.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex-shrink: 0; background: var(--navy); color: #cfd8e6; display: flex; flex-direction: column; padding: 1.25rem 1rem; position: sticky; top: 0; height: 100vh; }
.brand { color: #fff; font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.brand:hover { text-decoration: none; }
.brand-mark { color: #3fd1b9; }
.brand-lg { font-size: 1.6rem; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; margin-top: 1rem; }
.sidebar nav a { color: #cfd8e6; padding: .6rem .8rem; border-radius: 9px; font-weight: 500; }
.sidebar nav a:hover { background: var(--navy-2); text-decoration: none; color: #fff; }
.sidebar nav a.active { background: #fff; color: var(--navy); }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; }
.who { color: #fff; font-weight: 600; margin-bottom: .5rem; }
.who small { display: block; color: #93a2ba; font-weight: 400; word-break: break-all; }
.sidebar .btn-ghost { color: #cfd8e6; border-color: rgba(255,255,255,.2); background: transparent; }
.main { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 2rem; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; flex: 1; }
.menu-toggle { display: none; background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--ink); }
.content { padding: 1.75rem 2rem 3rem; max-width: 1240px; }

/* ---------- Cartes / grilles ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.card-row { display: flex; gap: 1.75rem; align-items: flex-start; }
.card-body { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .grid-2, .grid-2 + .card, .card + .grid-2 { margin-top: 1.25rem; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.stack > .card { margin-bottom: 0; }

/* ---------- Hero ---------- */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; background: linear-gradient(135deg, var(--navy) 0%, #1d4673 100%); color: #fff; border-radius: var(--radius); padding: 1.6rem 1.8rem; margin-bottom: 1.25rem; }
.hero .muted { color: #a9b8cf; }
.hero-amount { font-size: 2.3rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-start; }
.hero .btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.iban-box { margin-top: .4rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* ---------- Comptes ---------- */
.accounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.account-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .2rem; color: var(--ink); box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.account-tile.savings { border-top-color: #6d5bd0; }
.account-tile:hover { text-decoration: none; border-color: #c9d2e0; }
.account-type { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.account-balance { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: .2rem 0; }
.account-tile small { color: var(--muted); }
.account-tile.add { border-top-color: var(--line); border-style: dashed; justify-content: center; }
.account-tile.add summary { cursor: pointer; color: var(--accent-2); font-weight: 600; list-style: none; }
.account-tile.add form { margin-top: .7rem; }

/* ---------- Listes / transactions ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li small { display: block; color: var(--muted); }
.list.compact li { padding: .45rem 0; }
.tx-list { list-style: none; margin: 0; padding: 0; }
.tx-list li { display: flex; align-items: center; gap: .9rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.tx-list li:last-child { border-bottom: 0; }
.tx-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; background: #eef1f6; color: var(--muted); }
.tx-icon.in { background: var(--ok-soft); color: var(--ok); }
.tx-main { flex: 1; min-width: 0; }
.tx-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-main small { color: var(--muted); }
.amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount.pos { color: var(--ok); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
.table td { padding: .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:hover { background: #fafbfd; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }

/* ---------- Formulaires ---------- */
.form { display: flex; flex-direction: column; gap: .85rem; }
.form.inline, form.inline { display: inline-flex; flex-direction: row; align-items: center; gap: .5rem; flex-wrap: wrap; }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; color: #3a4761; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
input, select { font: inherit; font-weight: 400; color: var(--ink); padding: .62rem .75rem; border: 1px solid #cfd6e2; border-radius: 9px; background: #fff; width: 100%; min-width: 0; }
input[type=checkbox] { width: auto; }
input:focus, select:focus { outline: 2px solid rgba(14,143,126,.35); border-color: var(--accent); }
.form.inline input, .form.inline select, form.inline input { width: auto; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .85rem; }
.hint { font-size: .8rem; color: var(--muted); margin: 0; }
.otp { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-family: var(--mono); }
fieldset.sca { border: 1px dashed #cfd6e2; border-radius: 10px; padding: .8rem 1rem 1rem; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
fieldset.sca legend { font-size: .78rem; color: var(--muted); padding: 0 .3rem; }
fieldset.sca[hidden] { display: none; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters input, .filters select { width: auto; flex: 1 1 160px; }
.budget-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.danger-zone { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600; font-size: .92rem; padding: .62rem 1.1rem; border-radius: 9px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; white-space: nowrap; transition: background .15s; }
.btn:hover { background: var(--accent-2); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: #fff; color: var(--ink); border-color: #cfd6e2; }
.btn-ghost:hover { background: #f1f4f8; }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #a32f23; }
.btn-sm { padding: .38rem .75rem; font-size: .84rem; }
.btn-block { width: 100%; }
details > summary { cursor: pointer; }
details > summary.btn { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details:not(.account-tile):not(.dropdown):not(.inline-details):not(.add-benef) > summary { color: var(--accent-2); font-weight: 600; font-size: .9rem; padding: .5rem 0; }
details[open] > form { margin-top: .6rem; }
.dropdown { position: relative; }
.dropdown > form { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; color: var(--ink); padding: 1rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 5; width: 240px; }
.inline-details { display: inline-block; vertical-align: top; }
.inline-details[open] > form { min-width: 260px; }

/* ---------- Badges / alertes ---------- */
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; text-transform: none; white-space: nowrap; background: #eef1f6; color: var(--muted); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-dark { background: #3fd1b9; color: var(--navy); }
.alert { padding: .85rem 1.1rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid transparent; font-size: .93rem; }
.alert-success { background: var(--ok-soft); color: #145c33; border-color: #bfe5cf; }
.alert-error { background: var(--danger-soft); color: #8e2a20; border-color: #f2c8c3; }
.alert-warning { background: var(--warn-soft); color: #7d5314; border-color: #f2dcb2; }

/* ---------- Carte bancaire ---------- */
.bank-card { width: 300px; flex-shrink: 0; aspect-ratio: 1.586; border-radius: 16px; padding: 1.1rem 1.25rem; color: #fff; background: linear-gradient(135deg, #0f2440 0%, #0e8f7e 140%); display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 10px 24px rgba(15,36,64,.25); }
.bank-card.is-blocked { background: linear-gradient(135deg, #59606e, #8b93a3); }
.bank-card-top, .bank-card-bottom { display: flex; justify-content: space-between; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; opacity: .9; }
.bank-card-number { font-size: 1.15rem; letter-spacing: .12em; }
.limits { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: .4rem 0 .6rem; }

/* ---------- Budget / progression / graphiques ---------- */
.budget-line { margin-bottom: .85rem; }
.budget-top { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: .3rem; gap: 1rem; }
.progress { width: 100%; height: 8px; display: block; }
.progress .track { fill: #edf0f5; }
.progress-ok .fill { fill: var(--accent); }
.progress-warn .fill { fill: #e0a43a; }
.progress-over .fill { fill: var(--danger); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.kpis div { display: flex; flex-direction: column; }
.kpis strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #edf0f5; stroke-width: 1; }
.chart .axis { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.chart .bar-in { fill: var(--accent); }
.chart .bar-out { fill: #b9c3d3; }
.chart figcaption { font-size: .8rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; margin-top: .4rem; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: .6rem; }
.dot:first-child { margin-left: 0; }
.dot-in { background: var(--accent); } .dot-out { background: #b9c3d3; }

/* ---------- KPI admin ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; display: flex; flex-direction: column; color: var(--ink); box-shadow: var(--shadow); }
.kpi:hover { text-decoration: none; }
.kpi span { font-size: .8rem; color: var(--muted); }
.kpi strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); }
.kpi-alert { border-color: #f2dcb2; background: var(--warn-soft); }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: .45rem 1rem; margin: 0 0 1rem; font-size: .92rem; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; }

/* ---------- KYC / sécurité ---------- */
.steps { padding-left: 1.2rem; margin: .5rem 0; }
.steps li { margin-bottom: .55rem; }
.steps li.done { color: var(--ok); }
.steps li.done::marker { content: "✓  "; }
.secret { font-size: 1.15rem; background: #f1f4f8; padding: .6rem .9rem; border-radius: 8px; margin: .5rem 0; word-break: break-all; }

/* ---------- Pages invité ---------- */
.guest { min-height: 100vh; background: var(--navy); }
.guest-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr minmax(380px, 520px); }
.guest-side { color: #cfd8e6; padding: 4rem; display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at 20% 20%, #1d4673 0%, var(--navy) 60%); }
.tagline { font-size: 1.5rem; color: #fff; max-width: 420px; line-height: 1.35; margin: 1rem 0 1.5rem; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding: .35rem 0 .35rem 1.6rem; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: #3fd1b9; font-weight: 700; }
.guest-card { background: #fff; padding: 3rem 2.75rem; display: flex; flex-direction: column; justify-content: center; }
.guest-card h2 { margin-bottom: .2rem; }
.guest-card .form { margin: 1.4rem 0; }
.empty { text-align: center; padding: 3rem 1rem; }
.empty-code { font-size: 4rem; font-weight: 800; color: #c9d2e0; }
.empty-inline { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-2, .kpi-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .card-row { flex-direction: column; }
  .bank-card { width: 100%; max-width: 340px; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: -260px; z-index: 20; transition: left .2s; }
  .sidebar.open { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .menu-toggle { display: block; }
  .topbar, .content { padding-left: 1rem; padding-right: 1rem; }
  .kpi-grid, .limits, .kpis, .budget-grid { grid-template-columns: 1fr; }
  .guest-wrap { grid-template-columns: 1fr; }
  .guest-side { padding: 2rem 1.5rem; }
  .guest-side .ticks, .guest-side .tagline { display: none; }
  .guest-card { padding: 2rem 1.5rem; }
  .hero-amount { font-size: 1.9rem; }
  .dropdown > form { left: 0; right: auto; }
}
.grid-2 > *, .card-body, .tx-main { min-width: 0; }
.qr { width: 220px; max-width: 100%; margin: .75rem 0; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qr svg { display: block; width: 100%; height: auto; }
.reset-key { margin-top: 1rem; }

/* ---------- v2 : navigation, notifications, messagerie, crédits, RDV ---------- */
.sidebar nav a { display: flex; justify-content: space-between; align-items: center; }
.nav-badge { background: #3fd1b9; color: var(--navy); font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .05rem .5rem; }
.sidebar nav a.active .nav-badge { background: var(--accent); color: #fff; }
.bell { position: relative; font-size: 1.25rem; text-decoration: none; line-height: 1; padding: .3rem; }
.bell:hover { text-decoration: none; }
.bell-count { position: absolute; top: -4px; right: -8px; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 800; border-radius: 999px; padding: .1rem .38rem; }
.quick-actions { display: grid; grid-template-columns: repeat(6, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
.qa { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .9rem .6rem; text-align: center; color: var(--ink); font-weight: 600; font-size: .85rem; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.qa:hover { text-decoration: none; border-color: var(--accent); }
.qa-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; font-size: 1.1rem; }
.qa.danger .qa-icon { background: var(--danger-soft); color: var(--danger); }
.advisor { display: flex; align-items: center; gap: .9rem; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.notif { display: flex; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif.unread strong::before { content: "● "; color: var(--accent); }
.notif small { display: block; color: var(--muted); }
.thread { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1.25rem; }
.bubble { max-width: 78%; padding: .75rem 1rem; border-radius: 14px; background: #eef1f6; white-space: pre-wrap; word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.system { align-self: center; background: var(--warn-soft); color: #7d5314; font-size: .9rem; max-width: 90%; }
.bubble .meta { display: block; font-size: .72rem; opacity: .75; margin-top: .35rem; white-space: normal; }
textarea { font: inherit; color: var(--ink); padding: .62rem .75rem; border: 1px solid #cfd6e2; border-radius: 9px; width: 100%; min-height: 110px; resize: vertical; font-weight: 400; }
textarea:focus { outline: 2px solid rgba(14,143,126,.35); border-color: var(--accent); }
.conv { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.conv:hover { text-decoration: none; background: #fafbfd; }
.conv.unread strong { color: var(--accent-2); }
.conv small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 560px; }
.days { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: 1rem; }
.day { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .75rem; text-align: center; color: var(--ink); min-width: 70px; font-size: .82rem; }
.day strong { display: block; font-size: 1.1rem; }
.day.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.day:hover { text-decoration: none; border-color: var(--accent); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: .5rem; margin: .5rem 0 1rem; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span { display: block; text-align: center; padding: .5rem; border: 1px solid #cfd6e2; border-radius: 9px; cursor: pointer; font-weight: 600; }
.slot input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot input:focus-visible + span { outline: 2px solid var(--accent); }
.sim-result { background: var(--accent-soft); border-radius: 12px; padding: 1rem 1.2rem; margin-top: 1rem; }
.sim-result .big { font-size: 1.8rem; font-weight: 700; color: var(--accent-2); }
.opposition { border: 1px solid #f2c8c3; background: var(--danger-soft); border-radius: 12px; padding: 1rem; margin-top: .5rem; }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1rem; }
@media (max-width: 980px) { .quick-actions { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .toggles { grid-template-columns: 1fr; } .bubble { max-width: 92%; } }
.conv > div:first-child { min-width: 0; flex: 1; }
.conv small { max-width: 100%; }
@media (max-width: 760px) { .conv { flex-direction: column; gap: .3rem; } }

/* ---------- v3 : bourse ---------- */
.subnav { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: .6rem; border-bottom: 1px solid var(--line); }
.subnav a { padding: .55rem .85rem; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--ink); text-decoration: none; }
.subnav a.active { color: var(--accent-2); border-bottom-color: var(--accent); }
.risk-banner { font-size: .78rem; color: var(--muted); margin: 0 0 1rem; }
.pos { color: var(--ok); } .neg { color: var(--danger); } .text-warn { color: var(--warn); font-weight: 600; }
.hero-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: .4rem; font-size: .88rem; color: #a9b8cf; }
.hero-stats strong { color: #fff; margin-left: .3rem; }
.hero-stats strong.pos { color: #6ee7b7; } .hero-stats strong.neg { color: #fca5a5; }
.big-num { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.cta { text-align: left; }
.option-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.option-card h4 { margin: 0; }
.compact-table td, .compact-table th { padding: .45rem .6rem; }
.compact-table tr.total td { border-top: 2px solid var(--line); font-size: 1rem; }
.advice-list { padding-left: 1.1rem; margin: .4rem 0 1rem; }
.advice-list li { margin-bottom: .55rem; }
.alert-info { background: #eaf2fd; color: #1e4d86; border-color: #c9dcf6; }
.alloc { margin-bottom: 1rem; }
.alloc-bar { width: 100%; height: 14px; display: block; border-radius: 7px; overflow: hidden; }
.alloc-legend { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .35rem .8rem; font-size: .85rem; }
.alloc-legend li { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.alloc-legend small { color: var(--muted); width: 100%; padding-left: 1.05rem; margin-top: -.2rem; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.c1 { fill: #0e8f7e; background: #0e8f7e; } .c2 { fill: #1d4673; background: #1d4673; } .c3 { fill: #e0a43a; background: #e0a43a; }
.c4 { fill: #6d5bd0; background: #6d5bd0; } .c5 { fill: #c2392b; background: #c2392b; } .c6 { fill: #8b93a3; background: #8b93a3; }
.price-chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.price-chart.up .line { stroke: var(--accent); } .price-chart.down .line { stroke: var(--danger); }
.price-chart.up .area { fill: rgba(14,143,126,.08); } .price-chart.down .area { fill: rgba(194,57,43,.07); }
.quote-line { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-top: .2rem; }
.quote-price { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.periods { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; font-size: .85rem; }
.periods a { padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); }
.periods a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.periods a:hover { text-decoration: none; }
.periods .muted { margin-left: .5rem; }
.sri { display: inline-block; padding: .1rem .45rem; border-radius: 6px; font-size: .78rem; font-weight: 700; background: #eef1f6; }
.sri-1, .sri-2 { background: var(--ok-soft); color: var(--ok); } .sri-3, .sri-4 { background: var(--warn-soft); color: var(--warn); }
.sri-5, .sri-6, .sri-7 { background: var(--danger-soft); color: var(--danger); }
.sri-scale { display: inline-flex; gap: 3px; }
.sri-scale span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 5px; background: #eef1f6; color: var(--muted); font-size: .78rem; font-weight: 700; }
.sri-scale span.on { background: var(--navy); color: #fff; }
.seg { display: inline-flex; border: 1px solid #cfd6e2; border-radius: 10px; overflow: hidden; align-self: flex-start; }
.seg label { flex-direction: row; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { padding: .5rem 1.4rem; cursor: pointer; font-weight: 700; }
.seg input:checked + span { background: var(--accent); color: #fff; }
.seg input[value=sell]:checked + span { background: var(--danger); }
.seg input:disabled + span { opacity: .4; cursor: not-allowed; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
[data-show][hidden] { display: none; }
.help ul { padding-left: 1.1rem; font-size: .88rem; }
.narrow { max-width: 720px; }
.questionnaire fieldset { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem 1rem; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.questionnaire legend { font-weight: 700; padding: 0 .3rem; }
.qnum { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .78rem; margin-right: .3rem; }
.profile-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-top: .8rem; }
.profile-scale span { border: 1px solid var(--line); border-radius: 10px; padding: .6rem; text-align: center; font-weight: 600; font-size: .88rem; }
.profile-scale span small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; margin-top: .2rem; }
.profile-scale span.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.profile-scale span.on small { color: #a9b8cf; }
@media (max-width: 760px) { .profile-scale { grid-template-columns: 1fr 1fr; } .quote-price { font-size: 1.6rem; } }
.seg label { position: relative; }
.seg input, .slot input { left: 0; top: 0; width: 1px; height: 1px; }
.slot { position: relative; }
.bell { margin-right: .4rem; }
.topbar h1 { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) { .topbar { gap: .6rem; } .topbar h1 { font-size: 1.1rem; } .topbar .badge-warn { font-size: .65rem; padding: .15rem .4rem; } }
