/* =============================================================
   MASTER MATRIX — Conseiller IA · charte « banque privée » (NOVA)
   Fond crème, vert forêt, or, navy · Georgia serif + Inter
   ============================================================= */
:root {
  --ink: #172820; --muted: #64736b; --faint: #8a988f;
  --line: #dfe6e1; --line-2: #cdd8d0;
  --paper: #f5f7f4; --paper-2: #eef2ee; --white: #ffffff;
  --green: #0a6f54; --green-2: #0d8b67; --mint: #cce8dc; --lime: #d8ef8d;
  --navy: #10261e; --gold: #c5a458; --gold-ink: #8a6f2b;
  --gain: #0d8b67; --loss: #b33d35; --slate: #3f6a86;
  --gain-bg: #e3f2ea; --loss-bg: #f8e5e3; --gold-bg: #f5efdd; --slate-bg: #e8eff3;
  --shadow: 0 18px 50px rgba(23,40,32,.09);
  --shadow-lg: 0 30px 80px rgba(16,38,30,.16);
  --f-serif: Georgia, 'Times New Roman', serif;
  --f-sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: ui-monospace, SFMono-Regular, 'JetBrains Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 17.5px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--f-sans); line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.light { color: var(--lime); }

/* ---------- Marque ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 1rem; font-weight: 800; letter-spacing: .18em; text-decoration: none; }
.brand-light { color: var(--white); }
.brand-mark { position: relative; display: inline-block; width: 26px; height: 26px; border: 2px solid currentColor; border-radius: 50%; flex: none; }
.brand-mark::before, .brand-mark::after, .brand-mark span::before { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 30px; background: currentColor; transform-origin: center; }
.brand-mark::before { transform: translate(-50%,-50%) rotate(0deg); }
.brand-mark::after { transform: translate(-50%,-50%) rotate(60deg); }
.brand-mark span::before { transform: translate(-50%,-50%) rotate(120deg); }

/* ---------- Coquille ---------- */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--navy); padding: 28px 20px 22px; color: #fff; display: flex; flex-direction: column; }
.sidebar .brand { margin: 4px 10px 40px; }
.main-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 13px; border: 0; border-radius: 8px; padding: 0 13px; background: transparent; color: #9eb0a8; text-align: left; font-size: .84rem; font-weight: 700; transition: background .18s, color .18s; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.08); }
.nav-glyph { display: grid; place-items: center; width: 24px; color: var(--lime); font-size: 1.05rem; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 10px; }
.live-card { display: flex; align-items: center; gap: 11px; margin: 0 4px 6px; padding: 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; }
.live-card div { display: grid; gap: 2px; }
.live-card small { color: #789086; font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; }
.live-card strong { font-size: .76rem; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(197,164,88,.12); flex: none; transition: background .3s, box-shadow .3s; }
.live-dot.on { background: #5ee09d; box-shadow: 0 0 0 5px rgba(94,224,157,.14); animation: pulse 1.8s ease-in-out infinite; }
.live-dot.poll { background: var(--gold); box-shadow: 0 0 0 5px rgba(197,164,88,.14); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.workspace { min-width: 0; padding: 0 clamp(22px,4vw,54px) 60px; }
.topbar { min-height: 100px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.topbar h1 { margin: 0; font-family: var(--f-serif); font-weight: 500; font-size: 1.7rem; letter-spacing: -.01em; }
.topbar .eyebrow { margin-bottom: 5px; font-size: .58rem; }
.topbar-actions { display: flex; align-items: center; gap: 11px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--line-2); border-radius: 100px; background: var(--white); color: var(--green); font-size: .72rem; font-weight: 700; }
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.status-pill.off { color: var(--loss); } .status-pill.off .dot { background: var(--loss); }
#clock { font-family: var(--f-mono); font-variant-numeric: tabular-nums; color: var(--green); font-weight: 600; font-size: 1.05rem; }
.square-button { width: 42px; min-height: 42px; padding: 0; background: var(--white); border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink); font-size: 1.15rem; transition: border-color .2s, transform .2s; }
.square-button:hover { border-color: var(--green); transform: translateY(-1px); }

.view { animation: reveal .3s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ---------- Boutons ---------- */
.primary-button, .secondary-button, .light-button { border: 0; border-radius: 8px; min-height: 46px; padding: 0 20px; display: inline-flex; justify-content: center; align-items: center; gap: 12px; font-weight: 800; font-size: .86rem; transition: transform .18s, opacity .18s, box-shadow .2s; }
.primary-button { background: var(--green); color: #fff; }
.primary-button:hover, .light-button:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.primary-button:disabled, .light-button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.secondary-button { background: var(--paper-2); color: var(--ink); border: 1px solid var(--line-2); }
.secondary-button:hover { border-color: var(--green); }
.light-button { background: var(--lime); color: var(--navy); }
.full { width: 100%; }

/* ---------- En-têtes de section ---------- */
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.view-head h2 { margin: 0 0 6px; font-family: var(--f-serif); font-size: clamp(1.5rem,2.4vw,2.1rem); font-weight: 500; }
.view-head p { margin: 0; color: var(--muted); font-size: .85rem; }

/* ---------- Stat cards ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 12px; padding: 20px 22px; }
.stat-card.gold { border-top-color: var(--gold); } .stat-card.slate { border-top-color: var(--slate); } .stat-card.navy { border-top-color: var(--navy); }
.stat-card p { margin: 0 0 11px; color: var(--muted); font-size: .7rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.stat-card strong { display: block; font-family: var(--f-serif); font-size: 1.9rem; font-weight: 500; letter-spacing: -.02em; }
.stat-card strong.num { font-family: var(--f-mono); font-size: 1.55rem; }
.stat-card small { display: block; margin-top: 6px; color: var(--faint); font-size: .66rem; }
.stat-card.positive strong { color: var(--gain); } .stat-card.negative strong { color: var(--loss); }

/* ---------- Panneaux ---------- */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-family: var(--f-serif); font-size: 1.2rem; font-weight: 500; }
.panel-head .eyebrow { margin: 0 0 4px; font-size: .56rem; }
.mini-badge { padding: 6px 10px; background: var(--gain-bg); color: var(--green); border-radius: 6px; font-size: .64rem; font-weight: 800; letter-spacing: .04em; }

/* ---------- Onglets zones ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tab-btn { min-height: 38px; padding: 0 15px; border: 1px solid var(--line-2); border-radius: 100px; background: var(--white); color: var(--muted); font-size: .78rem; font-weight: 750; display: inline-flex; align-items: center; gap: 7px; transition: all .2s; }
.tab-btn:hover { border-color: var(--green); color: var(--ink); }
.tab-btn.active { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(10,111,84,.22); }

/* ---------- Table Marché ---------- */
.tbl-scroll { overflow-x: auto; }
table.market { width: 100%; border-collapse: collapse; min-width: 780px; }
table.market thead th { text-align: left; padding: 13px 16px; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 750; border-bottom: 1px solid var(--line); background: var(--paper-2); white-space: nowrap; }
table.market thead th:first-child { padding-left: 24px; } table.market thead th:last-child { padding-right: 24px; text-align: right; }
table.market tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: .82rem; vertical-align: middle; }
table.market tbody td:first-child { padding-left: 24px; } table.market tbody td:last-child { padding-right: 24px; text-align: right; }
table.market tbody tr { cursor: pointer; transition: background .16s; }
table.market tbody tr:hover { background: var(--paper); }
table.market tbody tr:last-child td { border-bottom: none; }
.rank { font-family: var(--f-mono); font-size: .8rem; color: var(--faint); }
.rank.top { color: var(--gold-ink); font-weight: 700; }
.tk-chip { font-family: var(--f-mono); font-weight: 600; font-size: .74rem; color: var(--green); background: var(--gain-bg); border: 1px solid #cbe4d6; padding: 4px 9px; border-radius: 6px; letter-spacing: .02em; white-space: nowrap; }
.co { font-weight: 650; font-size: .82rem; color: var(--ink); }
.px { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: .82rem; color: var(--ink); border-radius: 4px; padding: 1px 3px; }
.cur { font-size: .58rem; color: var(--faint); }
@keyframes flup { 0% { background: rgba(13,139,103,.22); } 100% { background: transparent; } }
@keyframes fldn { 0% { background: rgba(179,61,53,.20); } 100% { background: transparent; } }
.fl-up { animation: flup 1.1s ease; } .fl-dn { animation: fldn 1.1s ease; }
.delta { font-family: var(--f-mono); font-size: .68rem; margin-top: 3px; display: inline-block; }
.bar-wrap { display: flex; align-items: center; gap: 9px; }
.bar { width: 58px; height: 5px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--mint), var(--green)); }
.sc { font-family: var(--f-mono); font-weight: 600; color: var(--green); font-size: .8rem; }
.mono-s { font-family: var(--f-mono); font-size: .7rem; }
.up { color: var(--gain); font-size: .68rem; }
.pill { display: inline-block; padding: 5px 10px; border-radius: 100px; font-size: .58rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.p-strong { color: #fff; background: var(--green); }
.p-buy { color: var(--green); background: var(--gain-bg); border: 1px solid #bcded0; }
.p-hold { color: var(--gold-ink); background: var(--gold-bg); border: 1px solid #e6dcc0; }
.p-caution { color: var(--loss); background: var(--loss-bg); border: 1px solid #edccc8; }
.p-progress { color: var(--slate); background: var(--slate-bg); border: 1px solid #d3e0e8; }

/* ---------- Analyse du jour (briefing) ---------- */
.brief { border: 1px solid #cfe0d8; }
.brief .panel-head { background: linear-gradient(120deg, #f1f7f3, var(--white)); }
.brief-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 24px 0; font-size: .66rem; color: var(--faint); }
.ana-badge { font-size: .58rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-radius: 100px; padding: 3px 10px; background: var(--gain-bg); color: var(--green); }
.analysis-text { padding: 12px 24px 6px; white-space: pre-wrap; font-size: .88rem; line-height: 1.75; color: var(--ink); max-width: 82ch; }
.analysis-text strong, .analysis-text b { font-weight: 750; }
.ana-items { padding: 4px 24px 20px; display: grid; }
.ana-item { padding: 11px 0; border-top: 1px solid var(--line); font-size: .8rem; }
.ana-item b { color: var(--green); } .ana-item .f { font-size: .7rem; color: var(--muted); margin-top: 3px; }

/* ---------- Colonnes Top10 + dividendes ---------- */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols .panel { margin-bottom: 0; }
.row-item { display: grid; align-items: center; gap: 12px; padding: 13px 24px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .16s; }
.row-item:last-child { border-bottom: none; }
.row-item:hover { background: var(--paper); }
.t10 { grid-template-columns: 28px 66px 1fr auto; }
.t10-rank { font-family: var(--f-mono); font-size: .78rem; color: var(--faint); } .t10-rank.pod { color: var(--gold-ink); font-weight: 700; }
.t10-meta { font-size: .66rem; color: var(--muted); }
.t10-sc { font-family: var(--f-mono); font-size: .76rem; color: var(--green); text-align: right; }
.dv { grid-template-columns: 66px 1fr auto; }
.dv-y { color: var(--gain); font-family: var(--f-mono); font-weight: 600; }
.dv-next { font-family: var(--f-mono); font-size: .66rem; color: var(--gold-ink); text-align: right; }
.empty { padding: 24px; color: var(--faint); font-size: .78rem; text-align: center; }

/* ---------- Disclaimer ---------- */
.disclaimer { background: var(--paper-2); border-left: 3px solid var(--green); border-radius: 8px; padding: 15px 18px; font-size: .72rem; color: var(--muted); line-height: 1.7; }
.disclaimer b { color: var(--gold-ink); }

/* ---------- Modal fiche actif ---------- */
dialog { color: var(--ink); background: var(--white); border: 0; border-radius: 16px; padding: 0; box-shadow: var(--shadow-lg); max-width: calc(100vw - 28px); }
dialog::backdrop { background: rgba(16,38,30,.55); backdrop-filter: blur(4px); }
.asset-dialog { width: min(640px, calc(100vw - 28px)); max-height: calc(100vh - 40px); overflow-y: auto; }
.m-body { padding: 26px; position: relative; }
.m-close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: 1rem; display: grid; place-items: center; transition: all .2s; }
.m-close:hover { border-color: var(--loss); color: var(--loss); background: var(--loss-bg); }
.m-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 6px 40px 18px 0; }
.m-px { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 1.85rem; line-height: 1; }
.m-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px; text-align: center; }
.kpi-l { font-size: .55rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.kpi-v { font-family: var(--f-mono); font-size: .9rem; }
.m-block { border-radius: 12px; padding: 15px 16px; margin-top: 14px; }
.m-block.gold { background: var(--gold-bg); border: 1px solid #e6dcc0; }
.m-block.slate { background: var(--slate-bg); border: 1px solid #d3e0e8; }
.m-block-t { font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 9px; font-weight: 800; }
.m-link { display: inline-flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 15px; text-decoration: none; color: var(--ink); font-size: .8rem; font-weight: 650; margin: 8px 8px 0 0; transition: all .2s; }
.m-link:hover { border-color: var(--green); background: var(--gain-bg); transform: translateY(-2px); }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 200; right: 22px; top: 22px; max-width: 380px; transform: translateY(-14px); opacity: 0; pointer-events: none; padding: 14px 18px; background: var(--navy); color: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: .8rem; transition: .25s; }
.toast.show { transform: none; opacity: 1; }
.toast.error { background: var(--loss); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; }

/* =============================================================
   Volet « Mon portefeuille » (advisory eToro)
   ============================================================= */
.connect-layout { max-width: 960px; margin: 10px auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px,5vw,64px); align-items: center; }
.connect-copy h2 { margin: 0 0 14px; font-family: var(--f-serif); font-size: clamp(1.9rem,3.4vw,2.9rem); font-weight: 500; line-height: 1.05; }
.connect-copy h2 span { color: var(--green); font-style: italic; }
.connect-copy > p { color: var(--muted); line-height: 1.7; font-size: .95rem; margin: 0 0 24px; }
.promise-list { display: grid; gap: 16px; border-top: 1px solid var(--line); padding-top: 22px; }
.promise-list > div { display: flex; gap: 12px; }
.promise-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #cfe0d8; border-radius: 50%; color: var(--green); font-size: .62rem; font-weight: 800; }
.promise-list strong { display: block; font-size: .85rem; }
.promise-list small { color: var(--muted); font-size: .74rem; line-height: 1.4; }
.access-panel { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: clamp(26px,4vw,40px); box-shadow: var(--shadow); }
.access-panel .step-label { color: var(--green); font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.access-panel h3 { margin: 8px 0 8px; font-family: var(--f-serif); font-size: 1.5rem; font-weight: 500; }
.access-panel > p { margin: 0 0 22px; color: var(--muted); font-size: .84rem; line-height: 1.5; }
label { display: block; margin-bottom: 8px; font-size: .78rem; font-weight: 700; }
input[type=text], input[type=password], input[type=search], input[type=number] { width: 100%; min-height: 48px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 14px; color: var(--ink); background: var(--white); outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(13,139,103,.1); }
.secret-field { position: relative; }
.secret-field input { padding-right: 66px; }
.icon-button { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 11px; border: 0; background: transparent; color: var(--green); font-size: .74rem; font-weight: 800; }
.field-help { margin: 9px 0 20px; color: var(--muted); font-size: .74rem; line-height: 1.5; }
.field-help a { color: var(--green); font-weight: 700; }
.separator { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--faint); font-size: .68rem; }
.separator::before, .separator::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.security-note { margin: 20px 0 0; color: var(--muted); text-align: center; font-size: .68rem; }
.security-note span { color: var(--green-2); }

.dashboard-grid { display: grid; grid-template-columns: 1.5fr .9fr; gap: 18px; }
.content-panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 26px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.section-heading h3 { margin: 0; font-family: var(--f-serif); font-size: 1.3rem; font-weight: 500; }
.allocation-content { display: grid; grid-template-columns: minmax(180px,.8fr) 1.2fr; align-items: center; gap: 26px; min-height: 240px; }
.donut-chart { display: grid; place-items: center; }
.donut-chart svg { width: 210px; height: 210px; overflow: visible; }
.donut-center-main { font: 500 24px var(--f-serif); fill: var(--ink); }
.donut-center-sub { font: 700 8px var(--f-sans); letter-spacing: .1em; fill: var(--muted); }
.allocation-list { display: grid; }
.allocation-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.allocation-item:last-child { border: 0; }
.allocation-swatch { width: 9px; height: 9px; border-radius: 50%; }
.allocation-name strong { font-size: .8rem; } .allocation-name small { display: block; color: var(--muted); font-size: .64rem; }
.allocation-item > strong { font-family: var(--f-serif); font-size: 1.05rem; font-weight: 500; }
.assistant-panel { background: var(--green); color: #fff; border-color: var(--green); display: flex; flex-direction: column; }
.assistant-panel h3 { font-family: var(--f-serif); font-size: 1.6rem; font-weight: 500; margin: 0 0 8px; line-height: 1.1; }
.assistant-panel p { color: #c9ddd4; font-size: .82rem; line-height: 1.6; margin: 0 0 auto; }
.assistant-panel .profile-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 20px; }
.profile-chips span { padding: 6px 11px; border: 1px solid rgba(255,255,255,.26); border-radius: 100px; color: var(--lime); font-size: .62rem; font-weight: 800; }

/* Advisor IA */
.advisor-panel { padding: 26px 30px; display: flex; justify-content: space-between; align-items: center; gap: 26px; background: linear-gradient(120deg, #14342a, var(--navy)); color: #fff; border-radius: 12px; margin-bottom: 18px; }
.advisor-intro { max-width: 720px; }
.advisor-intro h3 { margin: 0 0 10px; font-family: var(--f-serif); font-size: 1.6rem; font-weight: 500; }
.advisor-intro p { margin: 0; color: #c9dad2; font-size: .84rem; line-height: 1.6; }
.advisor-note { margin-top: 10px !important; color: #9db3a9 !important; font-size: .7rem !important; }
.advisor-actions { flex: none; display: grid; gap: 13px; min-width: 260px; max-width: 320px; }
.advisor-option { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 600; }
.advisor-option input { width: auto; min-height: 0; margin-top: 3px; accent-color: var(--lime); }
.advisor-option strong { display: block; color: #fff; font-size: .78rem; } .advisor-option small { color: #9db3a9; font-size: .66rem; line-height: 1.4; }

.advisor-result { padding: 26px 30px; border: 1px solid #cfe0d8; border-radius: 12px; background: var(--white); margin-bottom: 18px; }
.advisor-result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.advisor-result-head h3 { margin: 6px 0 0; font-family: var(--f-serif); font-size: 1.3rem; font-weight: 500; line-height: 1.35; }
.advisor-stance { flex: none; align-self: center; padding: 7px 12px; border-radius: 100px; font-size: .64rem; font-weight: 800; letter-spacing: .04em; background: var(--gain-bg); color: var(--green); white-space: nowrap; text-transform: uppercase; }
.advisor-stance.stance-neutre { background: var(--gold-bg); color: var(--gold-ink); }
.advisor-stance.stance-offensif { background: var(--loss-bg); color: var(--loss); }
.advisor-positions { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; padding: 18px 0; }
.advisor-card { border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 10px; padding: 14px 16px; background: var(--white); }
.advisor-card.action-acheter, .advisor-card.action-renforcer { border-left-color: var(--green-2); }
.advisor-card.action-conserver { border-left-color: var(--gold); }
.advisor-card.action-reduire { border-left-color: #d98a2b; }
.advisor-card.action-eviter { border-left-color: var(--loss); }
.advisor-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.advisor-card-id strong { font-size: .9rem; } .advisor-card-id small { display: block; color: var(--muted); font-size: .64rem; }
.advisor-action { flex: none; padding: 4px 9px; border-radius: 5px; font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--paper-2); color: var(--ink); }
.action-acheter .advisor-action, .action-renforcer .advisor-action { background: var(--green); color: #fff; }
.action-conserver .advisor-action { background: var(--gold-bg); color: var(--gold-ink); }
.action-reduire .advisor-action { background: #f7e6cf; color: #a05a13; }
.action-eviter .advisor-action { background: var(--loss-bg); color: var(--loss); }
.advisor-rationale { margin: 10px 0 6px; font-size: .78rem; line-height: 1.5; }
.advisor-risk { margin: 0; font-size: .72rem; line-height: 1.45; color: var(--muted); } .advisor-risk b { color: var(--ink); }
.advisor-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.advisor-weight { font-family: var(--f-serif); font-size: 1.05rem; color: var(--green); }
.advisor-sentiment { font-size: .58rem; font-weight: 800; padding: 3px 8px; border-radius: 100px; background: var(--paper-2); color: var(--muted); font-family: var(--f-mono); }
.advisor-sentiment.s-pos { background: var(--gain-bg); color: var(--green); }
.advisor-sentiment.s-neg { background: var(--loss-bg); color: var(--loss); }
.advisor-sentiment.s-neu { background: var(--gold-bg); color: var(--gold-ink); }
.advisor-confidence { font-size: .62rem; font-weight: 700; color: var(--muted); }
.advisor-confidence.conf-elevee { color: var(--green); } .advisor-confidence.conf-faible { color: var(--loss); }
.advisor-warnings { margin: 4px 0 0; padding: 12px 16px 12px 30px; background: var(--gold-bg); color: #6f5a24; font-size: .68rem; line-height: 1.6; border-radius: 8px; }
.advisor-warnings:empty { display: none; }
.advisor-reasoning { margin: 14px 0 0; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.advisor-reasoning summary { padding: 12px 16px; cursor: pointer; font-size: .74rem; font-weight: 750; color: var(--green); }
.advisor-reasoning p { margin: 0; padding: 0 16px 16px; font-size: .74rem; line-height: 1.6; color: var(--muted); white-space: pre-wrap; }
.advisor-sources { margin: 0; padding: 0 16px 16px 32px; font-size: .7rem; line-height: 1.7; } .advisor-sources a { color: var(--green); font-weight: 700; word-break: break-all; }
.advisor-foot { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.advisor-foot strong { font-family: var(--f-serif); color: var(--green); font-size: 1.5rem; font-weight: 500; } .advisor-foot span { color: var(--muted); font-size: .7rem; }
.advisor-disclaimer { margin: 14px 0 0; padding: 12px 15px; background: var(--paper-2); border-left: 3px solid var(--gold); color: #5c6b62; font-size: .68rem; line-height: 1.55; border-radius: 8px; }
.advisor-meta { margin: 10px 0 0; color: var(--faint); font-size: .64rem; }
.loading-inline { display: inline-flex; align-items: center; gap: 8px; }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.dark { border-color: rgba(10,111,84,.25); border-top-color: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Recommandation quantitative */
.reco-panel { padding: 24px 28px; display: flex; justify-content: space-between; align-items: center; gap: 26px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; }
.reco-panel h3 { margin: 0 0 6px; font-family: var(--f-serif); font-size: 1.35rem; font-weight: 500; }
.reco-panel p { margin: 8px 0 0; color: var(--muted); font-size: .78rem; max-width: 640px; }
.reco-result { padding: 24px 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); margin-bottom: 18px; }
.reco-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.reco-head h3 { margin: 0; font-family: var(--f-serif); font-size: 1.25rem; font-weight: 500; }
.reco-list { display: grid; grid-template-columns: repeat(2,1fr); column-gap: 24px; }
.reco-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 11px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.reco-score { width: 38px; height: 38px; display: grid; place-content: center; border-radius: 50%; background: var(--gain-bg); color: var(--green); font-size: .6rem; font-weight: 900; }
.reco-id strong { font-size: .76rem; } .reco-id small { display: block; color: var(--muted); font-size: .6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reco-item > strong { font-family: var(--f-serif); font-size: 1rem; font-weight: 500; }
.reco-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 16px; }
.reco-foot strong { font-family: var(--f-serif); color: var(--green); font-size: 1.4rem; font-weight: 500; } .reco-foot span { color: var(--muted); font-size: .72rem; }

/* =============================================================
   Authentification & comptes
   ============================================================= */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; background: var(--paper); }
.auth-card { width: min(420px, 100%); background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: clamp(28px,4vw,40px); box-shadow: var(--shadow); }
.auth-card .brand { color: var(--ink); margin-bottom: 26px; }
.auth-card h2 { margin: 6px 0 18px; font-family: var(--f-serif); font-size: 1.6rem; font-weight: 500; }
.auth-card > p { margin: -8px 0 22px; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.form-error { margin: -8px 0 18px; padding: 11px 14px; background: var(--loss-bg); color: var(--loss); border-radius: 8px; font-size: .78rem; line-height: 1.4; }

select { width: 100%; min-height: 48px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 14px; color: var(--ink); background: var(--white); outline: none; transition: border-color .2s, box-shadow .2s; }
select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(13,139,103,.1); }
textarea { width: 100%; min-height: 84px; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 14px; color: var(--ink); background: var(--white); outline: none; resize: vertical; transition: border-color .2s, box-shadow .2s; }
textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(13,139,103,.1); }

/* ---------- Propositions ---------- */
.prop-item { display: grid; }
.prop-item details summary::-webkit-details-marker { display: none; }

/* ---------- Menu utilisateur ---------- */
.user-menu { position: relative; }
.user-menu-btn { gap: 8px; }
.user-menu-btn span:first-child { display: inline-block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.user-menu-panel { position: absolute; z-index: 90; right: 0; top: calc(100% + 8px); width: 240px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; }
.user-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; display: grid; gap: 4px; }
.user-menu-head strong { font-size: .86rem; word-break: break-all; }
.user-menu-head small { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.user-menu-item { width: 100%; text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 10px 12px; font-size: .82rem; font-weight: 700; color: var(--ink); transition: background .15s; }
.user-menu-item:hover { background: var(--paper-2); }

/* ---------- Comptes ---------- */
.account-toggle { min-height: 36px; padding: 0 14px; font-size: .74rem; }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 1040px) {
  .app-shell { grid-template-columns: 82px 1fr; }
  .sidebar { padding-inline: 12px; }
  .sidebar .brand span:last-child, .nav-item span:last-child, .live-card div { display: none; }
  .sidebar .brand { margin-inline: auto; justify-content: center; }
  .nav-item { justify-content: center; padding: 0; }
  .live-card { justify-content: center; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid, .cols, .connect-layout { grid-template-columns: 1fr; }
  .advisor-panel, .reco-panel { flex-direction: column; align-items: stretch; }
  .advisor-actions { min-width: 0; max-width: none; }
  .advisor-positions, .reco-list { grid-template-columns: 1fr; }
  .m-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
  .app-shell { display: block; padding-bottom: 66px; }
  .sidebar { position: fixed; z-index: 60; inset: auto 0 0 0; height: 62px; padding: 6px 10px; flex-direction: row; }
  .sidebar > .brand, .sidebar-bottom { display: none; }
  .main-nav { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; width: 100%; }
  .nav-item { min-height: 50px; flex-direction: column; gap: 1px; font-size: .58rem; }
  .nav-item span:last-child { display: block; }
  .workspace { padding: 0 16px 34px; }
  .topbar { min-height: 78px; margin-bottom: 22px; }
  .topbar .eyebrow { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .allocation-content { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
