/* ===================== APP SHELL (auth, dashboard, offres, paiement) ===================== */
.app-body{ min-height: 100vh; }
.btn-block{ width: 100%; }

.app-header{
  display:flex; align-items:center; justify-content:space-between;
  height: 76px; padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(5,7,13,0.72);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 10;
}
.app-header-actions{ display:flex; align-items:center; gap: 14px; }
.app-user{ font-size: .88rem; color: var(--text-dim); }

.admin-nav{ display:flex; gap: 20px; margin-right: 6px; }
.admin-nav a{ font-size: .88rem; font-weight:600; color: var(--text-dim); }
.admin-nav a:hover, .admin-nav a.admin-nav-active{ color: var(--accent); }

.app-main{ padding: 56px 24px 100px; }
.app-container{ max-width: 1000px; margin: 0 auto; }
.app-container-narrow{ max-width: 640px; margin: 0 auto; }

.app-title-row{ display:flex; align-items:center; justify-content:space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.app-title-row h1{ margin:0; }

/* ---- Auth cards ---- */
.auth-wrap{
  min-height: 100vh; display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding: 40px 20px; gap: 32px;
}
.auth-logo{ font-size: 1.5rem; }
.auth-card{
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 40px 34px;
  box-shadow: var(--shadow);
}
.auth-card h1{ font-size: 1.12rem; margin-bottom: 6px; }
.auth-sub{ font-size: .92rem; margin-bottom: 26px; }
.auth-switch{ text-align:center; margin: 22px 0 0; font-size: .9rem; }
.auth-switch a{ color: var(--accent); font-weight: 600; }
.auth-forgot{ text-align:right; margin: -10px 0 18px; font-size: .84rem; }
.auth-forgot a{ color: var(--text-mute); transition: color .2s ease; }
.auth-forgot a:hover{ color: var(--accent); }

.field{ display:block; margin-bottom: 18px; }
.field span{ display:block; font-size: .82rem; font-weight:600; color: var(--text-dim); margin-bottom: 7px; }
.field input, .field textarea{
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-alt); border: 1px solid var(--border-strong); color: var(--text);
  font-family: var(--ff-body); font-size: .96rem; outline: none;
  transition: border-color .2s ease; resize: vertical;
}
.field input:focus, .field textarea:focus{ border-color: var(--accent); }
.field-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px){ .field-row{ grid-template-columns: 1fr; } }

.alert{ padding: 12px 16px; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 20px; }
.alert-error{ background: rgba(255,107,107,0.1); border: 1px solid rgba(255,107,107,0.35); color: #ffb3b3; }
.alert-success{ background: rgba(0,224,161,0.1); border: 1px solid rgba(0,224,161,0.35); color: var(--accent); }

.phone-settings{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 18px; margin-bottom: 20px; font-size: .88rem; color: var(--text-dim);
}
.phone-settings summary{ cursor:pointer; font-family: var(--ff-head); font-weight:600; color: var(--text); }

/* ---- Dashboard ---- */
.section-title-sm{ font-size: 0.735rem; margin: 40px 0 18px; color: var(--text-dim); }
.sub-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.sub-card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px;
}
.sub-card-pending{ opacity: .85; }
.sub-card-top{ display:flex; align-items:flex-start; justify-content:space-between; margin-bottom: 18px; gap: 10px; }
.sub-card-top h3{ margin:0; flex:1; min-width:0; font-size:0.672rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.badge{ font-family: var(--ff-head); font-size: .7rem; font-weight:700; padding: 4px 10px; border-radius: 999px; white-space:nowrap; flex-shrink:0; }
.badge-demo{ background: rgba(77,124,255,0.15); color: var(--accent-2); }
.badge-live{ background: rgba(0,224,161,0.15); color: var(--accent); }
.badge-pending{ background: rgba(242,184,75,0.15); color: var(--accent-gold); }
.sub-card-days{ display:flex; align-items:baseline; gap: 8px; margin-bottom: 8px; }
.sub-days-num{ font-family: var(--ff-head); font-size: 2.4rem; font-weight: 800; color: var(--text); }
.sub-days-label{ color: var(--text-dim); font-size: .88rem; }
.sub-card-end{ margin:0; font-size: .85rem; }
.sub-card-mode{
  margin: 16px 0 6px; padding-top: 14px; border-top: 1px dashed var(--border);
  font-family: var(--ff-head); font-size: .85rem; font-weight:600; color: var(--text);
}
.sub-card-tip{ margin:0; font-size: .8rem; color: var(--text-mute); line-height: 1.6; }

.discover-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; }
.discover-card{
  display:flex; flex-direction:column; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; text-align:left;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.discover-card:hover{ border-color: var(--accent); background: var(--surface-2); transform: translateY(-3px); }
.discover-card-cat{ font-size: .72rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .05em; font-family: var(--ff-head); }
.discover-card h3{ margin: 0; font-size: 0.735rem; }
.discover-card-add{ font-family: var(--ff-head); font-size: .82rem; font-weight:700; color: var(--accent); }

/* ---- Choisir offre ---- */
.checkout-container{ max-width: 720px; }
.center-title{ text-align:center; }

.checkout-steps{ display:flex; align-items:center; justify-content:center; gap: 10px; margin-bottom: 40px; }
.checkout-step{ display:flex; flex-direction:column; align-items:center; gap: 6px; font-size: .76rem; color: var(--text-mute); font-family: var(--ff-head); font-weight:600; }
.checkout-step-dot{ width: 28px; height: 28px; border-radius: 50%; display:flex; align-items:center; justify-content:center; border: 1px solid var(--border-strong); font-size: .82rem; }
.checkout-step-done{ color: var(--accent); }
.checkout-step-done .checkout-step-dot{ background: var(--accent); color: #041018; border-color: var(--accent); }
.checkout-step-active{ color: var(--text); }
.checkout-step-active .checkout-step-dot{ border-color: var(--accent-2); color: var(--accent-2); }
.checkout-step-line{ width: 44px; height: 1px; background: var(--border-strong); margin-bottom: 22px; }

.plan-card{
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 34px; margin-bottom: 26px; position: relative;
}
.plan-card-highlight{ border-color: rgba(0,224,161,0.4); background: linear-gradient(160deg, rgba(0,224,161,0.08), var(--surface)); }
.plan-badge{
  position:absolute; top:-13px; left:50%; transform: translateX(-50%);
  background: var(--gradient); color: #041018; font-family: var(--ff-head);
  font-size: .72rem; font-weight:700; padding: 6px 16px; border-radius: 999px; white-space:nowrap;
}
.plan-card h2{ text-align:center; font-size: 0.77rem; margin-bottom: 8px; }
.plan-price{ text-align:center; font-family: var(--ff-head); font-size: 2.2rem; font-weight: 800; color: var(--text); margin-bottom: 22px; }
.plan-price span{ font-size: .95rem; font-weight: 500; color: var(--text-mute); }
.check-list{ list-style:none; margin: 0 0 24px; padding: 0; display:flex; flex-direction:column; gap: 10px; }
.check-list li{ display:flex; align-items:flex-start; gap: 10px; font-size: .9rem; color: var(--text-dim); }
.plan-trust{ text-align:center; font-size: .8rem; color: var(--text-mute); margin: 18px 0 0; }

.offer-sub{ margin-bottom: 30px; }
.market-picker{ display:grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; margin-bottom: 30px; }
.market-pick{
  display:flex; align-items:center; justify-content:center; text-align:center;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 16px 10px; cursor:pointer; font-family: var(--ff-head); font-weight:600;
  transition: border-color .2s ease, background .2s ease;
  position: relative;
}
.market-pick input{ position:absolute; opacity:0; inset:0; cursor:pointer; margin:0; }
.market-pick:has(input:checked){ border-color: var(--accent); background: rgba(0,224,161,0.08); color: var(--accent); }
.market-pick:has(input:disabled){ opacity: .4; cursor:not-allowed; }

.market-pick-all{
  display:flex; width:100%; justify-content:center; text-align:center;
  padding: 20px; margin-bottom: 18px;
  border: 1px solid rgba(242,184,75,0.4);
  background: linear-gradient(160deg, rgba(242,184,75,0.1), var(--surface));
}
.market-pick-all:has(input:checked){ border-color: var(--accent-gold); background: rgba(242,184,75,0.14); color: var(--text); }
.market-pick-all strong{ color: var(--accent-gold); }
.market-pick-all-sub{ display:block; font-family: var(--ff-body); font-weight:400; font-size: .8rem; color: var(--text-mute); margin-top: 4px; }

.market-cat-label{ font-size: .8rem; color: var(--text-mute); margin: 0 0 10px; font-family: var(--ff-head); font-weight:600; }
.offer-sub a{ color: var(--accent); font-weight:600; white-space: nowrap; }

.offer-trial{
  display:flex; align-items:center; justify-content:space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(160deg, rgba(0,224,161,0.1), rgba(77,124,255,0.05));
  border: 1px solid rgba(0,224,161,0.3); border-radius: var(--radius);
  padding: 26px; margin-bottom: 26px;
}
.offer-trial h2{ font-size: 0.805rem; margin-bottom: 4px; }
.offer-trial p{ margin:0; font-size: .88rem; }

.offer-or{ text-align:center; font-size: .82rem; color: var(--text-mute); text-transform: uppercase; letter-spacing:.06em; margin-bottom: 22px; font-family: var(--ff-head); }
.offer-or-top{ margin-bottom: 22px; color: var(--text); font-size: .95rem; text-transform:none; letter-spacing:0; }

.pay-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; }
.pay-tile{
  display:flex; flex-direction:column; align-items:flex-start; gap: 4px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 20px; cursor:pointer; text-align:left; font-family: var(--ff-body);
  transition: border-color .2s ease, transform .2s ease;
}
.pay-tile:hover{ border-color: var(--accent-2); transform: translateY(-3px); }
.pay-tile-title{ font-family: var(--ff-head); font-weight:700; color: var(--text); }
.pay-tile-sub{ font-size: .8rem; color: var(--text-mute); }

/* ---- Crypto ---- */
.crypto-box{ background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 28px; margin-bottom: 26px; }
.crypto-ref-label{ font-size: .8rem; color: var(--text-mute); margin-bottom: 4px; }
.crypto-ref{ font-family: var(--ff-head); font-size: 1.3rem; font-weight:700; color: var(--accent); margin-bottom: 20px; }
.crypto-wallet{ display:flex; align-items:center; justify-content:space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.crypto-coin{ font-family: var(--ff-head); font-weight:600; color: var(--text-dim); min-width: 100px; }
.crypto-addr{ font-size: .82rem; color: var(--text); word-break: break-all; }
.crypto-note{ margin-top: 18px; font-size: .85rem; }

/* ---- Admin: client detail ---- */
.client-info-grid{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 34px;
}
.client-info-grid div{ display:flex; flex-direction:column; gap: 4px; }
.client-info-grid span{ font-size: .76rem; color: var(--text-mute); text-transform:uppercase; letter-spacing:.05em; }
.client-info-grid strong{ font-family: var(--ff-head); font-size: .98rem; color: var(--text); }

.grant-form{ display:flex; gap: 12px; align-items:center; flex-wrap: wrap; margin-bottom: 34px; }
.grant-form select{
  padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--bg-alt); border: 1px solid var(--border-strong); color: var(--text);
  font-family: var(--ff-body); font-size: .92rem;
}

/* ---- Admin ---- */
.sms-preview{
  background: var(--bg-alt); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 18px 20px; font-family: 'Courier New', monospace; font-size: .95rem; color: var(--text);
  white-space: pre-wrap; line-height: 1.6;
}
.admin-table{ width:100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 34px; }
.admin-table th{ text-align:left; padding: 10px 12px; color: var(--text-mute); font-family: var(--ff-head); font-size: .78rem; text-transform:uppercase; border-bottom: 1px solid var(--border-strong); }
.admin-table td{ padding: 12px; border-bottom: 1px solid var(--border); }
.admin-actions form{ display:flex; gap: 8px; }
.admin-actions .btn{ padding: 8px 14px; font-size: .8rem; }

@media (max-width: 640px){
  .offer-trial{ flex-direction:column; align-items:flex-start; }
  .app-header{ padding: 0 16px; }
  .app-main{ padding: 40px 16px 80px; }
}

/* ===================== BAZILOO OS™ — dashboard home ===================== */
.os-greeting{ margin-bottom: 28px; }
.os-greeting h1{ margin: 6px 0 8px; }
.os-greeting-sub{ color: var(--text-dim); font-size: 1rem; margin: 0; }

.os-modules{ display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-bottom: 16px; }
.os-module{
  position: relative; display:flex; flex-direction:column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; text-decoration:none; color: var(--text);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.os-module.os-module-active:hover{ transform: translateY(-4px); border-color: var(--accent); background: var(--surface-2); }
.os-module:not(.os-module-active){ opacity: .72; }
.os-module-icon{ font-size: 1.8rem; line-height:1; margin-bottom: 12px; }
.os-module h3{ margin: 0 0 8px; font-size: 0.735rem; }
.os-module p{ margin: 0; font-size: .88rem; color: var(--text-dim); flex:1; }
.os-module-cta{ margin-top: 14px; font-family: var(--ff-head); font-weight:700; font-size: .85rem; color: var(--accent); }
.os-module-soon{
  position:absolute; top: 16px; right: 16px;
  font-family: var(--ff-head); font-size: .68rem; font-weight:700; letter-spacing:.04em;
  padding: 4px 10px; border-radius: 999px; background: rgba(242,184,75,0.15); color: var(--accent-gold);
}
.os-soon-note{ font-size: .82rem; color: var(--text-mute); margin: 0 0 24px; max-width: 760px; }

/* ===================== BAZILOO DISCOVER™ ===================== */
.discover-form{ max-width: 640px; margin: 0 auto; }
.discover-question{ margin-bottom: 28px; }
.discover-q-label{ font-family: var(--ff-head); font-weight:600; font-size: 1.05rem; color: var(--text); margin: 0 0 14px; }
.discover-question .market-picker{ margin-bottom: 0; }
.discover-tags{ display:flex; flex-wrap:wrap; gap: 6px; margin-top: 12px; }
.discover-tag{
  font-size: .72rem; font-family: var(--ff-head); font-weight:600;
  padding: 4px 10px; border-radius: 999px; background: rgba(0,224,161,0.12); color: var(--accent);
}

/* ===== Idées à explorer (Baziloo OS™) ===== */
.idees-asof{ font-size:.82rem; color:var(--muted); margin-top:8px; }
.idees-filters{ display:flex; flex-wrap:wrap; gap:8px; margin:20px 0 26px; }
.idees-chip{
  font-family:var(--ff-head); font-size:.82rem; font-weight:600;
  padding:7px 14px; border-radius:999px; text-decoration:none;
  border:1px solid var(--border-strong); color:var(--muted); background:var(--bg-alt);
  transition:all .15s ease;
}
.idees-chip:hover{ color:var(--text); border-color:var(--accent); }
.idees-chip.is-active{ background:var(--accent); color:#04120c; border-color:var(--accent); }

.idees-grid{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:16px;
}
.idee-card{
  background:var(--bg-alt); border:1px solid var(--border); border-radius:16px;
  padding:20px; display:flex; flex-direction:column; gap:14px;
}
.idee-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.idee-id h3{ margin:0 0 3px; font-size:0.714rem; line-height:1.25; }
.idee-ticker{ font-size:.75rem; color:var(--muted); font-family:var(--ff-head); }
.idee-score{ text-align:center; flex-shrink:0; border-radius:12px; padding:8px 12px; min-width:64px; }
.idee-score-num{ display:block; font-family:var(--ff-head); font-weight:800; font-size:1.7rem; line-height:1; }
.idee-score-label{ display:block; font-size:.62rem; letter-spacing:.06em; text-transform:uppercase; opacity:.75; margin-top:2px; }
.idee-band{
  align-self:flex-start; font-family:var(--ff-head); font-weight:600; font-size:.74rem;
  padding:4px 12px; border-radius:999px;
}
.sig-high{ background:rgba(0,224,161,0.16); color:var(--accent); }
.sig-solid{ background:rgba(0,224,161,0.10); color:var(--accent); }
.sig-mid{ background:rgba(255,255,255,0.06); color:var(--text); }
.sig-low{ background:rgba(255,255,255,0.04); color:var(--muted); }
.idee-score.sig-high,.idee-score.sig-solid{ background:rgba(0,224,161,0.12); color:var(--accent); }
.idee-score.sig-mid{ background:rgba(255,255,255,0.06); color:var(--text); }
.idee-score.sig-low{ background:rgba(255,255,255,0.04); color:var(--muted); }

.idee-factors{ display:flex; flex-direction:column; gap:6px; }
.idee-factor{ display:flex; justify-content:space-between; align-items:center; font-size:.82rem; }
.idee-factor-lab{ color:var(--muted); }
.idee-factor-stars{ color:var(--accent); letter-spacing:1px; font-size:.8rem; }
.idee-tags{ display:flex; flex-wrap:wrap; gap:6px; margin-top:2px; }
.idee-tag{
  font-size:.7rem; font-family:var(--ff-head); font-weight:600; text-decoration:none;
  padding:4px 10px; border-radius:999px; background:rgba(0,224,161,0.10); color:var(--accent);
}
.idee-tag:hover{ background:rgba(0,224,161,0.2); }

/* ===== Fiche action (Baziloo OS™) ===== */
.fiche-back{ display:inline-block; margin-bottom:18px; color:var(--muted); text-decoration:none; font-size:.85rem; font-family:var(--ff-head); }
.fiche-back:hover{ color:var(--accent); }
.fiche-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:20px; flex-wrap:wrap; }
.fiche-id h1{ margin:0 0 4px; font-size:1.19rem; line-height:1.15; }
.fiche-meta{ margin:0; color:var(--muted); font-size:.9rem; display:flex; gap:8px; flex-wrap:wrap; }
.fiche-ticker{ font-family:var(--ff-head); font-weight:600; color:var(--text); }
.fiche-score{ text-align:center; border-radius:16px; padding:14px 20px; min-width:120px; }
.fiche-score-num{ display:block; font-family:var(--ff-head); font-weight:800; font-size:2.6rem; line-height:1; }
.fiche-score-lab{ display:block; font-size:.62rem; letter-spacing:.08em; text-transform:uppercase; opacity:.75; margin-top:3px; }
.fiche-score-band{ display:block; font-size:.78rem; font-family:var(--ff-head); font-weight:600; margin-top:6px; }

.fiche-price-row{ display:flex; align-items:flex-end; gap:28px; flex-wrap:wrap; margin:22px 0 4px; }
.fiche-price-num{ font-family:var(--ff-head); font-weight:700; font-size:1.9rem; }
.fiche-price-num small{ font-size:.9rem; color:var(--muted); font-weight:500; }
.fiche-price-lab,.fiche-perf-lab{ display:block; font-size:.78rem; color:var(--muted); margin-top:3px; }
.fiche-perf-num{ font-family:var(--ff-head); font-weight:700; font-size:1.3rem; }
.fiche-perf.is-up .fiche-perf-num{ color:var(--accent); }
.fiche-perf.is-down .fiche-perf-num{ color:#ff6b6b; }

.fiche-spark-wrap{ margin-top:16px; border:1px solid var(--border); border-radius:14px; background:var(--bg-alt); padding:8px; }
.fiche-spark{ width:100%; height:140px; display:block; }
.fiche-spark-note{ font-size:.75rem; color:var(--muted); margin:8px 2px 0; }

.fiche-cols{ display:grid; grid-template-columns:1.6fr 1fr; gap:18px; margin-top:24px; align-items:start; }
.fiche-side{ display:flex; flex-direction:column; gap:18px; }
.fiche-panel{ background:var(--bg-alt); border:1px solid var(--border); border-radius:16px; padding:22px; }
.fiche-panel h2{ margin:0 0 4px; font-size:0.77rem; }
.fiche-panel-sub{ margin:0 0 16px; color:var(--muted); font-size:.84rem; }
/* ===== Panneau repliable générique (bandeau façon Copilote) ===== */
.cp button.cp-head{ width:100%; display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:0 0 12px; background:none; border:0; padding:0; font:inherit; color:inherit; cursor:pointer; text-align:left; }
.cp-head h2{ margin:0; font-size:0.77rem; }
.cp-badge{ font-family:var(--ff-head); font-weight:700; font-size:.72rem; padding:5px 11px; border-radius:999px; background:rgba(0,224,161,0.14); color:var(--accent); flex-shrink:0; }
.cp-chevron{ margin-left:auto; flex-shrink:0; width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; background:rgba(0,224,161,0.12); color:var(--accent); font-size:.85rem; line-height:1; transition:transform .35s ease, background .18s ease; }
.cp-head:hover .cp-chevron{ background:rgba(0,224,161,0.24); }
.cp--collapsed .cp-chevron{ transform:rotate(-90deg); }
.cp-wrap{ display:grid; grid-template-rows:1fr; }
.cp-body{ overflow:hidden; min-height:0; }
.cp--ready .cp-wrap{ transition:grid-template-rows .35s ease; }
.cp--ready.cp{ transition:padding .35s ease; }
.cp--collapsed .cp-wrap{ grid-template-rows:0fr; }
.cp--collapsed.cp{ padding-bottom:16px; }
.cp--collapsed .cp-head{ margin-bottom:0; }
/* Tableau des valeurs intégré au panneau repliable : pas de double bordure ni de marge. */
.cp .pf-table{ margin-top:0; border:none; border-radius:0; }
.cp .pf-table .pf-row{ padding-left:0; padding-right:0; }
.cp .pf-table .pf-row:last-child{ border-bottom:none; }
.fiche-factors{ display:flex; flex-direction:column; gap:16px; }
.fiche-factor-top{ display:flex; justify-content:space-between; align-items:baseline; }
.fiche-factor-name{ font-family:var(--ff-head); font-weight:600; font-size:.92rem; }
.fiche-factor-val{ font-family:var(--ff-head); font-weight:700; color:var(--accent); }
.fiche-bar{ height:7px; border-radius:999px; background:rgba(255,255,255,0.07); margin:6px 0 5px; overflow:hidden; }
.fiche-bar span{ display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,rgba(0,224,161,.5),var(--accent)); }
.fiche-factor-desc{ margin:0; font-size:.78rem; color:var(--muted); }
.fiche-stats{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.fiche-stats li{ display:flex; justify-content:space-between; align-items:center; padding:11px 0; border-bottom:1px solid var(--border); font-size:.88rem; }
.fiche-stats li:last-child{ border-bottom:none; }
.fiche-stats li span{ color:var(--muted); }
.fiche-stats li strong{ font-family:var(--ff-head); }

@media (max-width:760px){
  .fiche-cols{ grid-template-columns:1fr; }
}

/* liens de carte Idées → fiche */
.idee-cardlink{ display:flex; flex-direction:column; gap:14px; text-decoration:none; color:inherit; }
.idee-cardlink:hover h3{ color:var(--accent); }
.idee-card{ transition:border-color .15s ease, transform .15s ease; }
.idee-card:hover{ border-color:var(--accent); transform:translateY(-2px); }
.idee-more{ font-family:var(--ff-head); font-weight:600; font-size:.8rem; color:var(--accent); text-decoration:none; margin-top:auto; }
.idee-more:hover{ text-decoration:underline; }

/* Les pages d'application ne chargent pas main.js : le contenu .reveal doit rester visible. */
.app-body .reveal{ opacity:1 !important; transform:none !important; }

/* ===== Radar Baziloo (Baziloo OS™) ===== */
.radar-synth{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:24px 0 8px; }
.radar-stat{ background:var(--bg-alt); border:1px solid var(--border); border-radius:14px; padding:20px; text-align:center; }
.radar-stat-num{ display:block; font-family:var(--ff-head); font-weight:800; font-size:2.1rem; line-height:1; color:var(--accent); }
.radar-stat-num small{ font-size:1rem; color:var(--muted); font-weight:600; }
.radar-stat-lab{ display:block; font-size:.8rem; color:var(--muted); margin-top:8px; }

.radar-section{ margin-top:30px; }
.radar-section > h2{ font-size:0.805rem; margin:0 0 14px; }
.radar-section-head{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:14px; }
.radar-section-head h2{ font-size:0.805rem; margin:0; }
.radar-seeall{ font-family:var(--ff-head); font-weight:600; font-size:.82rem; color:var(--accent); text-decoration:none; }
.radar-seeall:hover{ text-decoration:underline; }

.radar-bands,.radar-sectors{ background:var(--bg-alt); border:1px solid var(--border); border-radius:14px; padding:18px 20px; display:flex; flex-direction:column; gap:12px; }
.radar-band-row,.radar-sector-row{ display:grid; grid-template-columns:150px 1fr 34px; align-items:center; gap:12px; }
.radar-band-lab{ font-family:var(--ff-head); font-weight:600; font-size:.82rem; padding:3px 10px; border-radius:999px; justify-self:start; }
.radar-band-bar,.radar-sector-bar{ height:8px; border-radius:999px; background:rgba(255,255,255,0.06); overflow:hidden; }
.radar-band-bar span{ display:block; height:100%; border-radius:999px; }
.radar-band-bar span.sig-high{ background:var(--accent); }
.radar-band-bar span.sig-solid{ background:rgba(0,224,161,0.65); }
.radar-band-bar span.sig-mid{ background:rgba(255,255,255,0.35); }
.radar-band-bar span.sig-low{ background:rgba(255,255,255,0.18); }
.radar-band-count,.radar-sector-val{ font-family:var(--ff-head); font-weight:700; text-align:right; }
.radar-sector-name{ font-size:.88rem; }
.radar-sector-name small{ color:var(--muted); }
.radar-sector-bar span{ display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,rgba(0,224,161,.5),var(--accent)); }
.radar-sector-val{ color:var(--accent); }

.radar-minis{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:12px; }
.radar-mini{ background:var(--bg-alt); border:1px solid var(--border); border-radius:14px; padding:16px; text-decoration:none; color:inherit; display:flex; flex-direction:column; gap:4px; transition:border-color .15s ease, transform .15s ease; }
.radar-mini:hover{ border-color:var(--accent); transform:translateY(-2px); }
.radar-mini-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.radar-mini-name{ font-family:var(--ff-head); font-weight:600; font-size:.92rem; line-height:1.2; }
.radar-mini-score{ font-family:var(--ff-head); font-weight:700; font-size:.9rem; padding:2px 9px; border-radius:999px; flex-shrink:0; }
.radar-mini-ticker{ font-size:.72rem; color:var(--muted); font-family:var(--ff-head); }
.radar-mini-metric{ display:flex; justify-content:space-between; align-items:baseline; margin-top:8px; padding-top:8px; border-top:1px solid var(--border); font-size:.8rem; }
.radar-mini-metric span{ color:var(--muted); }
.radar-mini-metric strong{ font-family:var(--ff-head); font-weight:700; }
.radar-mini-metric.is-up strong{ color:var(--accent); }

@media (max-width:720px){
  .radar-synth{ grid-template-columns:1fr; }
  .radar-band-row,.radar-sector-row{ grid-template-columns:120px 1fr 30px; }
}

/* ===== Étoile favori ===== */
.fav-star{
  background:none; border:none; cursor:pointer; padding:0; line-height:1;
  color:var(--muted); font-size:1.25rem; transition:color .15s ease, transform .15s ease;
}
.fav-star:hover{ color:var(--accent); transform:scale(1.15); }
.fav-star.is-fav{ color:var(--accent); }
.fav-star[data-busy="1"]{ opacity:.5; }
/* étoile posée en haut à droite des cartes idées */
.idee-card{ position:relative; }
.idee-card .fav-star{ position:absolute; top:12px; right:14px; z-index:2; }
.idee-card .idee-score{ margin-right:26px; }
/* grande étoile dans l'en-tête de la fiche */
.fav-star-lg{ font-size:1.5rem; vertical-align:middle; margin-right:4px; }

/* ===== Mon portefeuille ===== */
.pf-section{ margin-top:32px; }
.pf-alloc-cols{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:16px; align-items:start; }
.pf-table{ margin-top:18px; border:1px solid var(--border); border-radius:14px; }
.pf-row{ display:grid; grid-template-columns:2.4fr 1fr .7fr .9fr 1.4fr 40px; align-items:center; gap:10px; padding:12px 16px; border-bottom:1px solid var(--border); font-size:.9rem; }
.pf-row:last-child{ border-bottom:none; }
.pf-row-head{ background:var(--bg-alt); font-family:var(--ff-head); font-weight:600; font-size:.76rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); border-radius:14px 14px 0 0; }
.pf-val a{ color:var(--text); text-decoration:none; font-weight:600; }
.pf-val a:hover{ color:var(--accent); }
.pf-val small{ display:block; color:var(--muted); font-size:.72rem; font-family:var(--ff-head); }
.pf-sector{ color:var(--muted); font-size:.82rem; }
.pf-row .idee-band{ font-family:var(--ff-head); font-weight:700; padding:2px 9px; border-radius:999px; font-size:.8rem; }
.pf-remove,.pf-chip-x{ background:none; border:none; color:var(--muted); cursor:pointer; font-size:.9rem; padding:2px 6px; border-radius:6px; }
.pf-remove:hover,.pf-chip-x:hover{ color:#ff6b6b; background:rgba(255,107,107,.1); }

.pf-addbar{ display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; align-items:center; }
.pf-addbar select,.pf-addbar input[type=text]{ padding:11px 14px; border-radius:10px; border:1px solid var(--border-strong); background:var(--bg-alt); color:var(--text); font-family:inherit; font-size:.9rem; }
.pf-addbar select{ min-width:170px; flex:1; }
.pf-addbar input[type=text]{ width:128px; }
/* Listes montant / nombre d'actions : compactes (valeurs courtes), sans grandir. */
.pf-addbar select.pf-num{ flex:0 1 148px; min-width:110px; }
/* Boutons de bascule Montant / Nombre d'actions : compacts pour tenir sur une ligne. */
.pf-addbar .addmode-btn{ flex:0 0 auto; white-space:nowrap; padding-left:14px; padding-right:14px; }
.pf-addbar-sm select{ min-width:200px; }
.pf-note{ font-size:.78rem; color:var(--muted); margin-top:10px; }
/* Points d'entrée du parcours d'investissement (valeur / stratégie). */
.pf-journey{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:6px 0 22px; }
.pf-journey-card{ display:flex; flex-direction:column; gap:8px; padding:18px 20px; border:1px solid var(--border-strong); border-radius:16px; background:linear-gradient(180deg, rgba(212,254,117,.06), var(--bg-alt)); text-decoration:none; color:var(--text); transition:border-color .18s ease, transform .18s ease; }
.pf-journey-card:hover{ border-color:var(--accent); transform:translateY(-2px); }
.pf-journey-ico{ font-size:1.7rem; line-height:1; }
.pf-journey-txt strong{ display:block; font-family:var(--ff-head); font-size:1.05rem; }
.pf-journey-txt small{ display:block; color:var(--muted); font-size:.82rem; line-height:1.45; margin-top:4px; }
.pf-journey-go{ margin-top:auto; padding-top:6px; color:var(--accent); font-weight:700; font-size:.85rem; }
@media (max-width:720px){ .pf-journey{ grid-template-columns:1fr; } }
/* Catalogue Idées : barre de recherche + actions par carte. */
.idees-search{ margin:10px 0 4px; }
.idees-search input{ width:100%; box-sizing:border-box; padding:12px 16px; border-radius:12px; border:1px solid var(--border-strong); background:var(--bg-alt); color:var(--text); font-family:inherit; font-size:.95rem; }
.idee-actions{ display:flex; gap:8px; margin-top:auto; padding-top:10px; }
.idee-actions a{ flex:1; text-align:center; padding:8px 10px; border-radius:9px; font-size:.82rem; font-weight:600; text-decoration:none; }
.idee-actions .idee-more{ border:1px solid var(--border-strong); color:var(--text); }
.idee-actions .idee-add{ background:var(--accent); color:var(--noir); }
.idee-actions .idee-more:hover{ border-color:var(--accent); color:var(--accent); }
.idee-actions .idee-add:hover{ filter:brightness(1.06); }
/* Estimation du nombre de titres : texte blanc + clignotement doux (opacité).
   Désactivé si l'utilisateur préfère réduire les animations (accessibilité). */
#pfAddCalc{ color:#fff; font-weight:600; animation:pfAddBlink 1.1s ease-in-out infinite; }
@keyframes pfAddBlink{ 0%,100%{ opacity:1; } 50%{ opacity:.35; } }
@media (prefers-reduced-motion: reduce){ #pfAddCalc{ animation:none; } }
.btn-sm{ padding:9px 14px; font-size:.82rem; }

.pf-list{ background:var(--bg-alt); border:1px solid var(--border); border-radius:14px; padding:18px 20px; margin-bottom:14px; }
.pf-list-head{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.pf-list-head h3{ margin:0; font-size:0.7rem; }
.pf-list-head small{ color:var(--muted); font-weight:500; }
.pf-inline{ display:inline; margin:0; }
.pf-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.pf-chip{ display:inline-flex; align-items:center; gap:8px; background:var(--bg); border:1px solid var(--border); border-radius:999px; padding:5px 8px 5px 14px; font-size:.84rem; }
.pf-chip a{ color:var(--text); text-decoration:none; font-weight:500; }
.pf-chip a:hover{ color:var(--accent); }
.pf-chip b{ font-family:var(--ff-head); font-size:.76rem; padding:1px 7px; border-radius:999px; }
.pf-empty{ color:var(--muted); font-size:.85rem; margin:0 0 12px; }

@media (max-width:760px){
  .pf-alloc-cols{ grid-template-columns:1fr; }
  .pf-row{ grid-template-columns:1.8fr 1fr .8fr 40px; }
  .pf-row span:nth-child(4),.pf-row span:nth-child(5){ display:none; }
  .pf-row-head span:nth-child(4),.pf-row-head span:nth-child(5){ display:none; }
}

/* ===== Les marchés (Baziloo OS™) ===== */
.txt-up{ color:var(--accent); }
.txt-down{ color:#ff6b6b; }
.market-baros{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; }
.market-baro{ background:var(--bg-alt); border:1px solid var(--border); border-radius:14px; padding:18px; text-decoration:none; color:inherit; display:flex; flex-direction:column; gap:3px; transition:border-color .15s ease, transform .15s ease; }
.market-baro:hover{ border-color:var(--accent); transform:translateY(-2px); }
.market-baro-name{ font-family:var(--ff-head); font-weight:700; font-size:1.02rem; }
.market-baro-desc{ font-size:.75rem; color:var(--muted); min-height:2.2em; }
.market-baro-perf{ font-family:var(--ff-head); font-weight:800; font-size:1.7rem; margin-top:6px; }
.market-baro-perf.is-up{ color:var(--accent); }
.market-baro-perf.is-down{ color:#ff6b6b; }
.market-baro-sub{ font-size:.72rem; color:var(--muted); }

.market-zones{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.market-sector-row{ grid-template-columns:150px 1fr 70px 34px !important; }
.market-sector-perf{ font-size:.8rem; text-align:right; }

.market-ll{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:16px; }
.market-ll-list{ list-style:none; margin:8px 0 0; padding:0; }
.market-ll-list li{ display:flex; justify-content:space-between; align-items:center; padding:9px 0; border-bottom:1px solid var(--border); font-size:.9rem; }
.market-ll-list li:last-child{ border-bottom:none; }
.market-ll-list a{ color:var(--text); text-decoration:none; }
.market-ll-list a:hover{ color:var(--accent); }
.market-ll-list span{ font-family:var(--ff-head); font-weight:700; font-size:.85rem; }

@media (max-width:760px){
  .market-zones,.market-ll{ grid-template-columns:1fr; }
  .market-sector-row{ grid-template-columns:110px 1fr 60px 30px !important; }
}

/* ===== Portefeuille — valorisation quotidienne ===== */
.pf-hero{ display:grid; grid-template-columns:1.2fr 2fr; gap:18px; background:var(--bg-alt); border:1px solid var(--border); border-radius:16px; padding:22px 24px; margin-top:8px; align-items:start; }
.pf-hero-main{ display:flex; flex-direction:column; gap:2px; }
.pf-hero-lab{ font-size:.8rem; color:var(--muted); }
.pf-hero-value{ font-family:var(--ff-head); font-weight:800; font-size:2.4rem; line-height:1.05; }
.pf-hero-day{ font-family:var(--ff-head); font-weight:700; font-size:1.05rem; margin-top:4px; }
.pf-hero-day small{ font-weight:500; color:var(--muted); font-family:var(--ff-body); margin-left:4px; font-size:.75rem; }
/* Détail des fonds : lignes label/valeur alignées (label à gauche, valeur à droite). */
.pf-funds{ display:grid; grid-template-columns:1fr auto; gap:6px 24px; margin:16px 0 0; padding-top:14px; border-top:1px solid var(--border); font-size:.82rem; max-width:380px; }
.pf-funds dt{ color:var(--muted); }
.pf-funds dd{ margin:0; text-align:right; font-family:var(--ff-head); font-weight:700; color:#e8eef7; white-space:nowrap; }
.pf-funds dd.txt-up{ color:var(--accent); }
.pf-funds dd.txt-down{ color:#ff6b6b; }
.pf-funds .pf-funds-strong{ margin-top:4px; padding-top:10px; border-top:1px solid var(--border); }
.pf-funds dt.pf-funds-strong{ color:var(--text); font-weight:600; }
/* Liste des portefeuilles (vue consolidée) : nom · valeur totale · +/-value. */
.pf-pflist{ margin:16px 0 0; padding-top:14px; border-top:1px solid var(--border); max-width:430px; }
.pf-pflist-row{ display:grid; grid-template-columns:1fr auto auto; gap:6px 18px; align-items:center; padding:7px 0; font-size:.82rem; text-decoration:none; color:var(--text); border-top:1px solid var(--border); }
.pf-pflist-row:first-child{ border-top:none; }
.pf-pflist-row span{ text-align:right; font-family:var(--ff-head); font-weight:700; white-space:nowrap; }
.pf-pflist-name{ text-align:left !important; font-weight:600 !important; overflow:hidden; text-overflow:ellipsis; }
.pf-pflist-head{ padding:0 0 4px; }
.pf-pflist-head span{ font-family:var(--ff-body); font-weight:500; font-size:.68rem; color:var(--muted); }
a.pf-pflist-row:hover .pf-pflist-name{ color:var(--accent); }
.pf-pflist-row .txt-up{ color:var(--accent); }
.pf-pflist-row .txt-down{ color:#ff6b6b; }
.pf-hero-side{ display:flex; flex-direction:column; gap:14px; }
.pf-hero-kpis{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.pf-hero-kpi{ text-align:center; border-left:1px solid var(--border); padding:4px 8px; }
.pf-hero-kpi:first-child{ border-left:none; }
.pf-kpi-num{ display:block; font-family:var(--ff-head); font-weight:800; font-size:1.4rem; line-height:1; }
.pf-kpi-lab{ display:block; font-size:.72rem; color:var(--muted); margin-top:5px; }
/* Widget « Top positions » (colonne droite du héros). */
.pf-toppos{ border:1px solid var(--border); border-radius:12px; padding:12px 14px; background:var(--bg); }
.pf-toppos-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.pf-toppos-head > span{ font-family:var(--ff-head); font-weight:700; font-size:.82rem; }
.pf-toppos-head select{ font-family:var(--ff-body); font-size:.74rem; color:var(--text); background:var(--bg-alt); border:1px solid var(--border-strong); border-radius:8px; padding:5px 8px; cursor:pointer; }
.pf-toppos-tbl{ width:100%; border-collapse:collapse; font-size:.78rem; }
.pf-toppos-tbl th{ text-align:right; color:var(--muted); font-weight:600; font-size:.68rem; padding:2px 6px 6px; }
.pf-toppos-tbl th:first-child{ text-align:left; }
.pf-toppos-tbl td{ text-align:right; padding:6px; border-top:1px solid var(--border); font-family:var(--ff-head); font-weight:600; white-space:nowrap; }
.pf-toppos-tbl td:first-child{ text-align:left; font-weight:700; max-width:130px; overflow:hidden; text-overflow:ellipsis; }
.pf-toppos-tbl td.up{ color:var(--accent); }
.pf-toppos-tbl td.down{ color:#ff6b6b; }
.pf-toppos-empty{ font-size:.78rem; color:var(--muted); margin:4px 0 0; }

.pf-table-pos .pf-row{ grid-template-columns:2.2fr .7fr 1fr 1.1fr 1.1fr .6fr 34px; }
.pf-table-pos .pf-strong{ font-family:var(--ff-head); font-weight:700; }
.pf-pct{ display:block; font-family:var(--ff-body); font-weight:600; font-size:.72rem; opacity:.85; }

@media (max-width:820px){
  .pf-hero{ grid-template-columns:1fr; }
  .pf-hero-kpis{ grid-template-columns:repeat(3,1fr); }
}
@media (max-width:760px){
  .pf-table-pos .pf-row{ grid-template-columns:1.6fr .9fr 1.1fr 34px; }
  .pf-table-pos .pf-row span:nth-child(2),
  .pf-table-pos .pf-row span:nth-child(5),
  .pf-table-pos .pf-row span:nth-child(6){ display:none; }
}

/* ===== Portefeuille — graphique d'évolution ===== */
.pf-chart-wrap{ background:var(--bg-alt); border:1px solid var(--border); border-radius:16px; padding:18px 20px; margin-top:16px; }
.pf-chart-head{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:10px; }
.pf-chart-head h2{ margin:0; font-size:0.735rem; }
.pf-chart-evo{ font-family:var(--ff-head); font-weight:700; font-size:.9rem; }
.pf-chart{ width:100%; }
.pf-chart-svg{ width:100%; height:190px; display:block; }
.pf-chart-axis{ display:flex; justify-content:space-between; font-size:.72rem; color:var(--muted); margin-top:6px; }
.pf-chart-empty{ color:var(--muted); font-size:.88rem; text-align:center; padding:24px 12px; margin:0; }

/* ===== Portefeuille — clôture de position ===== */
.pf-table-pos .pf-row{ grid-template-columns:1.9fr .85fr .5fr 1fr 1.05fr 1fr 1.05fr .5fr 88px; }
.pf-entrycol, .pf-datecol{ font-size:.86rem; color:var(--muted); }
.pf-close{ position:relative; }
.pf-close > summary{ list-style:none; cursor:pointer; font-family:var(--ff-head); font-weight:600; font-size:.76rem; color:var(--muted); padding:5px 9px; border:1px solid var(--border-strong); border-radius:8px; text-align:center; white-space:nowrap; }
.pf-close > summary::-webkit-details-marker{ display:none; }
.pf-close > summary:hover{ color:#ff6b6b; border-color:#ff6b6b; }
.pf-close[open] > summary{ color:var(--text); }
.pf-close-pop{ position:absolute; right:0; top:calc(100% + 6px); z-index:10; width:230px; background:var(--bg); border:1px solid var(--border-strong); border-radius:12px; padding:14px; box-shadow:0 12px 30px rgba(0,0,0,.4); }
.pf-close-form label{ display:block; font-size:.76rem; color:var(--muted); margin-bottom:5px; }
.pf-close-form input[type=text]{ width:100%; padding:9px 12px; border-radius:8px; border:1px solid var(--border-strong); background:var(--bg-alt); color:var(--text); font-family:inherit; margin-bottom:10px; }
.btn-block{ display:block; width:100%; }
.pf-close-hint{ display:block; font-size:.7rem; color:var(--muted); margin-top:8px; line-height:1.4; }

@media (max-width:760px){
  .pf-table-pos .pf-row{ grid-template-columns:1.6fr .7fr 1fr 88px; }
  .pf-table-pos .pf-row span:nth-child(2),
  .pf-table-pos .pf-row span:nth-child(5),
  .pf-table-pos .pf-row span:nth-child(6),
  .pf-table-pos .pf-row span:nth-child(7),
  .pf-table-pos .pf-row span:nth-child(8){ display:none; }
  .pf-close-pop{ right:auto; left:0; }
}

/* ===== Copilote Baziloo ===== */
.copilot{ background:linear-gradient(180deg, rgba(0,224,161,0.06), var(--bg-alt)); border:1px solid var(--border-strong); border-radius:16px; padding:20px 22px; margin-top:16px; }
.copilot-head{ display:flex; align-items:center; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.copilot-head h2{ margin:0; font-size:0.77rem; }
/* En-tête cliquable (bouton replier/déployer) : réinitialise l'apparence native du bouton. */
button.copilot-head{ width:100%; text-align:left; background:none; border:0; padding:0; font:inherit; color:inherit; cursor:pointer; }
.copilot-chevron{ margin-left:auto; flex-shrink:0; width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; background:rgba(0,224,161,0.12); color:var(--accent); font-size:.9rem; line-height:1; transition:transform .35s ease, background .18s ease; }
button.copilot-head:hover .copilot-chevron{ background:rgba(0,224,161,0.24); }
.copilot--collapsed .copilot-chevron{ transform:rotate(-90deg); }
/* Corps repliable : animation fluide de la hauteur via grid-template-rows (0fr ↔ 1fr). */
.copilot-collapse{ display:grid; grid-template-rows:1fr; }
.copilot-body{ overflow:hidden; min-height:0; }
.copilot--ready .copilot-collapse{ transition:grid-template-rows .35s ease; }
.copilot--ready.copilot{ transition:padding .35s ease; }
.copilot--collapsed .copilot-collapse{ grid-template-rows:0fr; }
.copilot--collapsed.copilot{ padding-bottom:16px; }
.copilot--collapsed .copilot-head{ margin-bottom:0; }
.copilot-badge{ font-family:var(--ff-head); font-weight:700; font-size:.72rem; padding:5px 12px; border-radius:999px; background:rgba(0,224,161,0.14); color:var(--accent); }
.copilot-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.copilot-card{ display:flex; gap:12px; align-items:flex-start; background:var(--bg); border:1px solid var(--border); border-left-width:3px; border-radius:12px; padding:14px 16px; }
.copilot-ok{ border-left-color:var(--accent); }
.copilot-info{ border-left-color:#5b9dff; }
.copilot-attention{ border-left-color:#ffb020; }
.copilot-ico{ font-size:1rem; line-height:1.4; flex-shrink:0; }
.copilot-tag{ display:block; font-family:var(--ff-head); font-weight:600; font-size:.78rem; color:var(--muted); margin-bottom:3px; }
.copilot-card p{ margin:0; font-size:.88rem; line-height:1.45; }
.copilot-note{ font-size:.76rem; color:var(--muted); margin:14px 0 0; }

/* ===== Plus/moins-values réalisées ===== */
.pf-realized{ background:var(--bg-alt); border:1px solid var(--border); border-radius:14px; padding:18px 20px; margin-top:18px; }
.pf-realized-head{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:10px; }
.pf-realized-head h2{ margin:0; font-size:0.735rem; }
.pf-realized-total{ font-family:var(--ff-head); font-weight:800; font-size:1.2rem; }
.pf-realized-row{ display:grid; grid-template-columns:90px 1fr auto; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--border); font-size:.88rem; }
.pf-realized-row:last-child{ border-bottom:none; }
.pf-realized-date{ color:var(--muted); font-size:.8rem; }
.pf-realized-name a{ color:var(--text); text-decoration:none; font-weight:600; }
.pf-realized-name a:hover{ color:var(--accent); }
.pf-realized-name small{ color:var(--muted); font-weight:400; }
.pf-realized-val{ font-family:var(--ff-head); font-weight:700; text-align:right; }

@media (max-width:720px){ .copilot-grid{ grid-template-columns:1fr; } }

/* ===== Pistes à explorer (copilote) ===== */
.pistes{ margin-top:16px; border-top:1px dashed var(--border-strong); padding-top:16px; }
.pistes-title{ font-size:0.665rem; margin:0 0 12px; }
.pistes-list{ display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; }
.piste-card{ background:var(--bg); border:1px solid var(--border); border-radius:12px; padding:15px 16px; display:flex; flex-direction:column; gap:6px; }
.piste-tit{ font-family:var(--ff-head); font-weight:700; font-size:.9rem; }
.piste-card p{ margin:0; font-size:.83rem; color:var(--text); line-height:1.45; }
.piste-link{ margin-top:auto; font-family:var(--ff-head); font-weight:600; font-size:.8rem; color:var(--accent); text-decoration:none; }
.piste-link:hover{ text-decoration:underline; }

/* opt-in alertes SMS */
.copilot-alerts{ margin-top:14px; padding-top:14px; border-top:1px dashed var(--border-strong); display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; }
.copilot-switch{ display:inline-flex; align-items:center; gap:9px; cursor:pointer; font-family:var(--ff-head); font-weight:600; font-size:.88rem; }
.copilot-switch input{ width:17px; height:17px; accent-color:var(--accent); cursor:pointer; }
.copilot-alerts-note{ font-size:.76rem; color:var(--muted); }
.copilot-alerts-note a{ color:var(--accent); }

/* Performance depuis le 1er janvier sur les cartes Idées */
.idee-metrow{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.idee-ytd{ font-family:var(--ff-head); font-weight:700; font-size:.92rem; white-space:nowrap; }
.idee-ytd small{ display:block; font-family:var(--ff-body); font-weight:500; font-size:.62rem; color:var(--muted); text-align:right; margin-top:1px; }

/* Bannière d'entrée Assistant portefeuille */
.asst-banner{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  background:linear-gradient(120deg, rgba(0,224,161,.12), rgba(0,224,161,.03)); border:1px solid var(--border-strong);
  border-radius:16px; padding:18px 22px; margin:18px 0; }
.asst-banner-txt strong{ display:block; font-family:var(--ff-head); font-size:1.05rem; }
.asst-banner-txt span{ font-size:.86rem; color:var(--muted); }

/* ===== Page PEA ===== */
.pea-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; margin-top:8px; }
.pea-card{ background:var(--bg-alt); border:1px solid var(--border); border-radius:16px; padding:20px; display:flex; flex-direction:column; gap:10px; }
.pea-card-head{ display:flex; align-items:center; gap:12px; }
.pea-ico{ font-size:1.6rem; }
.pea-card-head h3{ margin:0; font-size:0.735rem; }
.pea-count{ font-size:.76rem; color:var(--muted); }
.pea-card-head .strat-bscore{ margin-left:auto; }
.pea-desc{ margin:0; font-size:.85rem; color:var(--muted); line-height:1.45; }
.pea-ytd{ font-family:var(--ff-head); font-weight:800; font-size:1.3rem; }
.pea-ytd small{ display:block; font-family:var(--ff-body); font-weight:500; font-size:.66rem; color:var(--muted); margin-top:1px; }
.pea-holds{ font-size:.79rem; color:var(--muted); margin:0; }
.pea-actions{ margin-top:auto; display:flex; flex-direction:column; gap:8px; padding-top:6px; }
.pea-see{ text-align:center; font-family:var(--ff-head); font-weight:600; font-size:.8rem; color:var(--accent); text-decoration:none; }
.pea-see:hover{ text-decoration:underline; }
/* bannière PEA */
.pea-banner{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  background:linear-gradient(120deg, rgba(0,80,200,.14), rgba(0,224,161,.05)); border:1px solid var(--border-strong);
  border-radius:16px; padding:18px 22px; margin:14px 0; }
.pea-banner-txt strong{ display:block; font-family:var(--ff-head); font-size:1.05rem; }
.pea-banner-txt span{ font-size:.86rem; color:var(--muted); }
/* chip PEA sur Idées */
.idees-chip.pea-chip{ border-color:rgba(0,224,161,.4); }
.idees-chip.pea-chip.is-active{ background:var(--accent); color:#04120c; }

/* ===== Fiche : profil entreprise + actualités ===== */
.fiche-profile{ margin-top:18px; }
.fiche-desc{ font-size:.9rem; line-height:1.6; color:var(--text); margin:0 0 16px; }
.fiche-stats-grid{ display:grid; grid-template-columns:1fr 1fr; gap:0 22px; }
.fiche-web{ margin:14px 0 0; }
.fiche-web a{ color:var(--accent); font-family:var(--ff-head); font-weight:600; font-size:.85rem; text-decoration:none; }
.fiche-web a:hover{ text-decoration:underline; }

.fiche-news{ margin-top:18px; }
.fiche-news-list{ display:flex; flex-direction:column; gap:2px; margin-top:6px; }
.fiche-news-item{ display:block; padding:12px 0; border-bottom:1px solid var(--border); text-decoration:none; }
.fiche-news-item:last-child{ border-bottom:none; }
.fiche-news-top{ display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.fiche-news-date{ font-size:.74rem; color:var(--muted); font-family:var(--ff-head); }
.fiche-news-sent{ font-size:.68rem; font-family:var(--ff-head); font-weight:700; padding:2px 8px; border-radius:999px; background:rgba(255,255,255,.06); }
.fiche-news-sent.txt-up{ background:rgba(0,224,161,.12); }
.fiche-news-sent.txt-down{ background:rgba(255,107,107,.12); }
.fiche-news-title{ display:block; font-size:.92rem; line-height:1.4; color:var(--text); font-weight:500; }
.fiche-news-item:hover .fiche-news-title{ color:var(--accent); }
.fiche-news-note{ font-size:.74rem; color:var(--muted); margin:12px 0 0; }

@media (max-width:600px){ .fiche-stats-grid{ grid-template-columns:1fr; } }

/* Prix d'entrée + date d'ajout sous chaque position */
.pf-entry{ display:block; font-size:.7rem; color:var(--muted); margin-top:2px; }

/* ===== Thème « Nuit raffinée » — application connectée uniquement (.app-body) ===== */
/* Le thème public (style.css) est clair ; ici on redéclare la palette sombre adoucie. */
.app-body{
  --bg: #1c2637;
  --bg-alt: #263248;
  --surface: #263248;
  --surface-2: #2e3d58;
  --border: rgba(158,176,206,0.16);
  --border-strong: rgba(158,176,206,0.30);
  --text: #f0f4fa;
  --text-dim: #a6b3ca;
  --text-mute: #8290a8;
  --accent: #2ed8a1;
  --accent-2: #6a99ff;
  --accent-gold: #f2b84b;
  --danger: #ff7b7b;
  --gradient: linear-gradient(135deg, #2ed8a1, #6a99ff);
  --shadow: 0 20px 55px rgba(0,0,0,0.35);
}
.app-body .btn-primary{ color:#0a1420; box-shadow: 0 8px 26px rgba(46,216,161,0.22); }
.app-body .btn-primary:hover{ box-shadow: 0 12px 34px rgba(46,216,161,0.30); }
.app-body .app-header{ background: rgba(28,38,55,0.82); }

/* ===================== MOBILE — Vague 1 : en-tête + navigation de l'espace ===================== */
/* Objectif : supprimer tout défilement horizontal de page sur les écrans étroits.
   Les sélecteurs sont préfixés .app-body pour l'emporter sur les .appnav définis en <style> inline. */
@media (max-width: 720px){
  /* En-tête : logo sur une ligne, actions repliées en bande défilante interne (jamais de scroll de page) */
  .app-body .app-header{ height:auto; min-height:56px; flex-wrap:wrap; gap:8px; padding:10px 14px; }
  .app-body .app-header .logo{ flex:1 1 auto; }
  .app-body .app-header-actions{ width:100%; gap:8px; flex-wrap:nowrap; justify-content:flex-start;
    overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; padding-bottom:2px; }
  .app-body .app-header-actions::-webkit-scrollbar{ display:none; }
  .app-body .app-header-actions .btn{ flex:0 0 auto; white-space:nowrap; }
  .app-body .app-header .app-user{ display:none; } /* e-mail masqué sur mobile pour gagner de la place */
  /* Anti-doublon : les liens d'espaces sont déjà dans la barre de pastilles (.appnav) ;
     on ne garde dans la barre du haut que Aide + Déconnexion sur mobile. */
  .app-body .app-header-actions a[href="portefeuille.php"],
  .app-body .app-header-actions a[href="dashboard.php"],
  .app-body .app-header-actions a[href="idees.php"],
  .app-body .app-header-actions a[href="mes-strategies.php"]{ display:none; }

  /* Barre de navigation de l'espace : 4 pastilles repliées sur 2 lignes (toutes visibles,
     plus de défilement horizontal qui masquait « Actions »). */
  .app-body .appnav{ flex-wrap:wrap; margin-top:14px; padding:0 14px; gap:8px; }
  .app-body .appnav a{ white-space:nowrap; }

  /* Garde-fou : aucun média/embed ne déborde de sa colonne */
  .app-body img, .app-body svg, .app-body video, .app-body iframe{ max-width:100%; }

  /* Confort tactile */
  .app-body .btn{ min-height:40px; }
}

/* iOS : empêcher le zoom automatique au focus des champs (police d'entrée >= 16px) */
@media (max-width: 720px){
  .app-body input, .app-body select, .app-body textarea{ font-size:16px; }
}

/* ===================== MOBILE — Vague 2 : page Portefeuille (hero + listes) ===================== */
/* Clé : les pistes de grille 1fr refusent de rétrécir sous la largeur mini de leur contenu
   (montants en white-space:nowrap). On passe en minmax(0,1fr) + min-width:0 pour autoriser
   le rétrécissement, l'ellipsis prenant le relais sur les noms. */
@media (max-width: 820px){
  .pf-hero{ grid-template-columns:minmax(0,1fr); }
  .pf-hero-main, .pf-hero-side{ min-width:0; }
}
@media (max-width: 600px){
  .pf-hero{ padding:18px 16px; }
  .pf-hero-value{ font-size:1.9rem; overflow-wrap:anywhere; }
  .pf-funds{ max-width:none; min-width:0; gap:6px 12px; }
  .pf-funds dd{ white-space:normal; }
  .pf-pflist{ max-width:none; min-width:0; }
  .pf-pflist-row{ grid-template-columns:minmax(0,1fr) auto auto; gap:6px 10px; }
  .pf-pflist-name{ min-width:0; }
  /* Widget « Top du portefeuille » : conteneur défilant + table compacte */
  .pf-toppos{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .pf-toppos-tbl{ font-size:.72rem; }
  .pf-toppos-tbl td:first-child{ max-width:96px; }
}

/* ===================== MOBILE — Vague 3 : confort tactile & lisibilité ===================== */
@media (max-width: 720px){
  /* Cibles tactiles plus généreuses (cases à cocher, favoris, menus) */
  .app-body .idees-check{ min-height:42px; }
  .app-body .idees-check input[type=checkbox]{ width:19px; height:19px; }
  .app-body .idees-toolbar select{ min-height:42px; }
  .app-body .fav-star{ padding:8px; margin:-8px; font-size:1.3rem; }
}
@media (max-width: 600px){
  /* Portefeuille : en-têtes de tableaux et labels plus lisibles + lignes aérées */
  .pf-pflist-head span{ font-size:.76rem; }
  .pf-pflist-row{ padding:9px 0; }
  .pf-toppos-tbl{ font-size:.78rem; }
  .pf-toppos-tbl th{ font-size:.74rem; }
  .pf-kpi-lab{ font-size:.76rem; }
  .pf-hero-lab{ font-size:.86rem; }
}
