/* =========================================================
   PHOENIX INVEST — Espace investisseur
   ========================================================= */
body.investor { padding-bottom: 0; background: var(--cream); }

/* ---------- Barre supérieure ---------- */
.topbar {
  position: sticky; top: 0; z-index: 500;
  background: rgba(254,250,248,.92);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-in {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  height: 66px; display: flex; align-items: center; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--cream-100); display: grid; place-items: center;
  border: 1px solid var(--line); overflow: hidden; flex: none;
}
.brand-mark img { width: 34px; height: 34px; object-fit: contain; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-txt strong { font-family: var(--serif); font-size: 15.5px; font-weight: 600; color: var(--brown-900); letter-spacing: -.01em; }
.brand-txt em { font-style: normal; font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.topnav { display: flex; gap: 2px; margin-left: 6px; }
.topnav a {
  padding: 8px 13px; border-radius: var(--r-full); font-size: 13.5px;
  color: var(--ink-soft); transition: background .15s, color .15s;
}
.topnav a:hover { background: var(--cream-100); color: var(--brown); }
.topnav a.active { background: var(--cream-200); color: var(--brown-900); font-weight: 500; }
.topbar-search { flex: 1; max-width: 300px; margin-left: auto; }
.topbar-search .input { height: 38px; min-height: 38px; font-size: 13px; background: #fff; }
.icon-btn {
  position: relative; width: 38px; height: 38px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 50%;
  color: var(--ink-soft); transition: background .15s;
}
.icon-btn:hover { background: var(--cream-100); }
.dot-count {
  position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px;
  background: var(--terracotta); color: #fff; border-radius: 99px;
  font-size: 9.5px; font-weight: 600; display: grid; place-items: center; padding: 0 4px;
  border: 2px solid var(--cream);
}
.avatarmenu { position: relative; }
.avatar-btn {
  display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-full);
  color: var(--ink-soft);
}
.avatar-btn:hover { background: var(--cream-100); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(145deg, var(--brown-600), var(--brown-900));
  color: var(--gold-100); display: grid; place-items: center;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.avatarmenu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 232px; z-index: 600;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-3); padding: 6px; animation: pop .16s ease-out;
}
.avatarmenu-pop a, .avatarmenu-pop button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border-radius: var(--r-sm); background: none; border: 0;
  font-size: 13px; color: var(--ink-soft); text-align: left;
}
.avatarmenu-pop a:hover, .avatarmenu-pop button:hover { background: var(--cream-100); color: var(--brown); }
.avatarmenu-pop hr { border: 0; border-top: 1px solid var(--line-soft); margin: 5px 4px; }
.avatarmenu-pop svg { color: var(--muted); flex: none; }

/* ---------- Zone principale ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 28px 24px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(25px, 3vw, 34px); }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.crumb { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.crumb a:hover { color: var(--brown); }
.crumb svg { opacity: .5; }

/* ---------- Bandeau patrimoine ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--brown-900) 0%, var(--brown) 55%, #6A3A16 100%);
  color: var(--cream); border-radius: var(--r-xl); padding: 30px 32px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 26px 60px -34px rgba(46,22,5,.65);
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -140px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(205,160,67,.24), transparent 62%);
  pointer-events: none;
}
.hero .eyebrow { color: var(--gold-300); }
.hero-total { font-family: var(--serif); font-size: clamp(34px, 5vw, 46px); letter-spacing: -.03em; line-height: 1; margin: 10px 0 8px; }
.hero-total .dev { font-size: .42em; letter-spacing: .04em; opacity: .72; margin-left: 8px; font-family: var(--sans); font-weight: 500; }
.hero-meta { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.13); }
.hero-meta div { min-width: 92px; }
.hero-meta span { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #C7AE99; }
.hero-meta strong { font-size: 16px; font-weight: 600; }
.hero .delta { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.1); }
.hero .delta.up { color: #9EE0BE; }
.hero .delta.down { color: #F2A794; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero .btn.gold { }
.hero .btn.on-dark { background: rgba(255,255,255,.1); color: var(--cream); border-color: rgba(255,255,255,.18); }
.hero .btn.on-dark:hover { background: rgba(255,255,255,.17); }

/* ---------- KPI ---------- */
.kpi { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 16px 18px; }
.kpi .k-label { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi .k-val { font-family: var(--serif); font-size: 24px; letter-spacing: -.02em; margin-top: 4px; }
.kpi .k-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Cartes fonds ---------- */
.fund-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.fund-card {
  display: flex; flex-direction: column; gap: 14px;
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  padding: 18px 18px 16px; transition: border-color .18s, box-shadow .18s, transform .18s;
  position: relative; overflow: hidden;
}
.fund-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent, var(--terracotta)); opacity: .85;
}
.fund-card:hover { border-color: var(--line); box-shadow: var(--sh-2); transform: translateY(-2px); }
.fund-card .fc-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.fund-card h4 { font-family: var(--serif); font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.fund-card .cat { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.fund-card .fc-num { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.fund-card .vl { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fund-card .vl span { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.fund-card .perf { font-size: 12.5px; font-weight: 600; }
.fund-card .fc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.fund-card .fc-stats { display: flex; gap: 18px; }
.fund-card .fc-stats div span { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fund-card .fc-stats div strong { font-size: 12.5px; font-weight: 500; }

.risk-dots { display: inline-flex; gap: 3px; align-items: center; }
.risk-dots i { width: 5px; height: 11px; border-radius: 1px; background: var(--cream-200); display: block; }
.risk-dots i.on { background: var(--gold); }

/* ---------- Ligne fonds (liste) ---------- */
.fund-row {
  display: grid; grid-template-columns: minmax(0,2fr) repeat(3, minmax(70px,.7fr)) auto;
  gap: 14px; align-items: center; padding: 14px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.fund-row:last-child { border-bottom: 0; }
.fund-row:hover { background: var(--cream-50); }
.fund-row .fr-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.fund-row .fr-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.fund-row .fr-name strong { font-size: 13.5px; font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fund-row .fr-name span { font-size: 11px; color: var(--muted); }
.fund-row .fr-cell { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.fund-row .fr-cell span { display: block; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* ---------- Notifications ---------- */
.notif { display: flex; gap: 12px; padding: 12px 10px; border-radius: var(--r-sm); }
.notif.unread { background: var(--cream-100); }
.notif + .notif { border-top: 1px solid var(--line-soft); }
.notif-ico { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--terracotta); flex: none; }

/* ---------- Liste d'opérations ---------- */
.op { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.op:last-child { border-bottom: 0; }
.op-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--cream-100); color: var(--brown-600); }
.op-ico.buy { background: var(--success-bg); color: var(--success); }
.op-ico.sell { background: var(--danger-bg); color: var(--danger); }
.op-main { flex: 1; min-width: 0; }
.op-main strong { display: block; font-size: 13px; font-weight: 500; }
.op-main span { font-size: 11.5px; color: var(--muted); }
.op-amt { text-align: right; font-size: 13.5px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.op-amt small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }

/* ---------- Timeline état d'ordre ---------- */
.steps { display: flex; flex-direction: column; gap: 0; margin: 6px 0; }
.step { display: flex; gap: 14px; position: relative; padding-bottom: 22px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 1px; background: var(--line); }
.step:last-child::before { display: none; }
.step-dot {
  width: 23px; height: 23px; border-radius: 50%; flex: none; z-index: 1;
  display: grid; place-items: center; background: #fff; border: 1.5px solid var(--line);
  color: var(--muted-2); font-size: 10px; font-weight: 600;
}
.step.done .step-dot { background: var(--brown); border-color: var(--brown); color: var(--gold-100); }
.step.current .step-dot { border-color: var(--gold); color: var(--gold); background: var(--gold-100); box-shadow: 0 0 0 4px rgba(205,160,67,.16); }
.step-txt strong { display: block; font-size: 13px; font-weight: 500; }
.step-txt span { font-size: 11.5px; color: var(--muted); }
.step.current .step-txt strong { color: var(--brown); }

/* ---------- Simulateur ---------- */
.sim-wrap { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr); gap: 18px; align-items: start; }
@media (max-width: 880px) { .sim-wrap { grid-template-columns: 1fr; } }
.seg { display: inline-flex; background: var(--cream-100); padding: 3px; border-radius: var(--r-full); gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  border: 0; background: none; padding: 7px 14px; border-radius: var(--r-full);
  font-size: 12.5px; color: var(--ink-soft); font-weight: 500;
}
.seg button.on { background: #fff; color: var(--brown-900); box-shadow: var(--sh-1); }
input[type=range] {
  -webkit-appearance: none; width: 100%; height: 4px; border-radius: 99px;
  background: var(--cream-200); outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brown); border: 3px solid #fff; box-shadow: 0 1px 6px rgba(46,22,5,.35); cursor: pointer;
}
input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--brown);
  border: 3px solid #fff; box-shadow: 0 1px 6px rgba(46,22,5,.35); cursor: pointer;
}
.sim-result { position: sticky; top: 86px; }
.sim-big { font-family: var(--serif); font-size: 34px; letter-spacing: -.02em; line-height: 1.05; }
.sim-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 12px; }
.sim-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; }

/* ---------- Parcours / wizard ---------- */
.wizard-head { display: flex; gap: 0; margin-bottom: 26px; }
.wstep { flex: 1; display: flex; align-items: center; gap: 9px; padding-right: 12px; position: relative; }
.wstep .n {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; background: var(--cream-200); color: var(--muted);
}
.wstep.on .n { background: var(--brown); color: var(--gold-100); }
.wstep.done .n { background: var(--success); color: #fff; }
.wstep span { font-size: 12px; color: var(--muted); }
.wstep.on span { color: var(--ink); font-weight: 500; }
.wstep::after { content: ""; flex: 1; height: 1px; background: var(--line); margin-left: 4px; }
.wstep:last-child::after { display: none; }
@media (max-width: 700px) { .wstep span { display: none; } }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 10px; }
.choice {
  border: 1px solid var(--line); background: #fff; border-radius: var(--r-md);
  padding: 14px; text-align: left; display: flex; gap: 11px; align-items: flex-start;
  transition: all .15s;
}
.choice:hover { border-color: var(--brown-500); }
.choice.on { border-color: var(--brown); background: var(--cream-100); box-shadow: 0 0 0 1px var(--brown) inset; }
.choice .c-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--cream-100); display: grid; place-items: center; color: var(--brown-600); flex: none; }
.choice.on .c-ico { background: #fff; }
.choice strong { display: block; font-size: 13px; font-weight: 500; }
.choice span { font-size: 11px; color: var(--muted); }

/* ---------- Documents ---------- */
.doc {
  display: flex; align-items: center; gap: 13px; padding: 13px 14px;
  border: 1px solid var(--line-soft); border-radius: var(--r-md); background: #fff;
  transition: border-color .15s, background .15s;
}
.doc:hover { border-color: var(--line); background: var(--cream-50); }
.doc-ico { width: 36px; height: 42px; border-radius: 5px; background: var(--cream-100); border: 1px solid var(--line); display: grid; place-items: center; color: var(--brown-600); flex: none; font-size: 8.5px; font-weight: 700; letter-spacing: .04em; }
.doc-main { flex: 1; min-width: 0; }
.doc-main strong { display: block; font-size: 13px; font-weight: 500; }
.doc-main span { font-size: 11px; color: var(--muted); }

/* ---------- État vide ---------- */
.empty { text-align: center; padding: 46px 20px; }
.empty .e-ico { width: 54px; height: 54px; border-radius: 50%; background: var(--cream-100); color: var(--muted); display: grid; place-items: center; margin: 0 auto 14px; }
.empty h4 { font-family: var(--serif); font-size: 17px; margin-bottom: 5px; }
.empty p { font-size: 12.5px; color: var(--muted); max-width: 320px; margin: 0 auto 16px; }

/* ---------- Mobile ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 550;
  background: rgba(254,250,248,.97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  display: none; justify-content: space-around;
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 9.5px; color: var(--muted); padding: 5px 8px; border-radius: 8px; flex: 1; }
.bottomnav a.active { color: var(--brown-900); }
.bottomnav a.active svg { color: var(--terracotta); }
@media (max-width: 860px) {
  .topbar-in { height: 58px; padding: 0 16px; gap: 12px; }
  .topnav { display: none; }
  .page { padding: 20px 16px 92px; }
  .hero { padding: 24px 20px; border-radius: var(--r-lg); }
  .bottomnav { display: flex; }
  #toasts { bottom: 76px; right: 12px; left: 12px; max-width: none; }
  .avatar-btn > svg { display: none; }
}

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line-soft); margin-top: 40px; padding: 22px 0 40px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted);
}
.foot a:hover { color: var(--brown); }

/* ---------- Vue fonds détail ---------- */
.detail-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 16px; }
.dl div span { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.dl div strong { font-size: 14px; font-weight: 500; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 22px 0 18px; overflow-x: auto; }
.tabs button {
  background: none; border: 0; padding: 10px 14px; font-size: 13px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button.on { color: var(--brown-900); border-bottom-color: var(--terracotta); font-weight: 500; }
.bullets { display: flex; flex-direction: column; gap: 9px; }
.bullets li { display: flex; gap: 9px; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.bullets svg { color: var(--gold); flex: none; margin-top: 2px; }
