/* =====================================================================
   Sornfolio — feuille de style
   Thème clair par défaut, thème sombre via [data-theme="dark"]
   ===================================================================== */

:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f8;
  --border: #e1e7f0;
  --border-strong: #cdd6e4;
  --text: #0f1a2e;
  --muted: #566a85;
  --accent: #2457d6;
  --accent-ink: #ffffff;
  --accent-soft: #e8efff;
  --pos: #0b8a48;
  --pos-soft: #e3f6ec;
  --neg: #cf2f27;
  --neg-soft: #fdeceb;
  --warn: #a8660b;
  --warn-soft: #fdf2db;
  --shadow: 0 1px 2px rgba(15, 26, 46, .05), 0 6px 20px rgba(15, 26, 46, .05);
  --shadow-pop: 0 10px 40px rgba(15, 26, 46, .18);
  --radius: 14px;
  --radius-sm: 10px;

  /* graphique */
  --c-up: #17a34a;
  --c-down: #dc2f2f;
  --c-grid: #e8edf4;
  --c-text: #566a85;
  --c-strong: #0f1a2e;
  --c-surface: #ffffff;
  --c-accent: #2457d6;
  --c-cross: #6b7c96;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #080e1c;
  --surface: #101a2e;
  --surface-2: #0c1527;
  --surface-3: #16223a;
  --border: #213150;
  --border-strong: #30436a;
  --text: #e7edf8;
  --muted: #93a6c4;
  --accent: #7aa7ff;
  --accent-ink: #0a1226;
  --accent-soft: #172a52;
  --pos: #3ddc97;
  --pos-soft: #0f3326;
  --neg: #ff7a73;
  --neg-soft: #3a1618;
  --warn: #f2b84b;
  --warn-soft: #3a2a0b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 26px rgba(0, 0, 0, .35);
  --shadow-pop: 0 12px 44px rgba(0, 0, 0, .6);

  --c-up: #34d399;
  --c-down: #f87171;
  --c-grid: #1a2742;
  --c-text: #93a6c4;
  --c-strong: #e7edf8;
  --c-surface: #101a2e;
  --c-accent: #7aa7ff;
  --c-cross: #7f93b3;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- Base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.ico { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 16px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.flat { color: var(--muted); }

/* ---------------------------------------------------------------- Barre supérieure */

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar__in { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 20px; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 32px; height: 32px; flex: none; }
.brand b { font-weight: 800; color: var(--accent); }
.brand span { font-weight: 600; }

.search { position: relative; flex: 1; max-width: 680px; margin: 0 auto 0 12px; }
.search__ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 44px; padding: 0 44px 0 44px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search input::placeholder { color: var(--muted); opacity: .85; }
.search input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  display: grid; place-items: center;
}
.search__clear:hover { background: var(--surface-3); color: var(--text); }
.spin { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; position: absolute; right: 38px; top: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

.results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-pop); overflow: hidden; max-height: min(70vh, 520px); overflow-y: auto;
  padding: 6px;
}
.result {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  width: 100%; text-align: left; padding: 10px 12px; border: 0; background: transparent; border-radius: 9px;
}
.result:hover, .result[aria-selected="true"] { background: var(--accent-soft); }
.result__sym { font-weight: 700; min-width: 74px; }
.result__name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result__meta { color: var(--muted); font-size: 12.5px; }
.result__note { padding: 12px; color: var(--muted); font-size: 14px; }
.badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-3); color: var(--muted); white-space: nowrap;
}
.badge--accent { background: var(--accent-soft); color: var(--accent); }
.badge--pos { background: var(--pos-soft); color: var(--pos); }
.badge--neg { background: var(--neg-soft); color: var(--neg); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }

.tabbar { display: flex; gap: 6px; margin-left: auto; }
.topbar__actions { display: flex; gap: 6px; }
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; min-width: 40px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text);
}
.iconbtn:hover { background: var(--surface-3); }
.iconbtn span { font-size: 14px; font-weight: 500; }

.watch { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: thin; }
.watch:empty { display: none; }
.chip-q {
  flex: 0 0 auto; min-width: 128px; text-align: left; padding: 8px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  display: grid; gap: 1px;
}
.chip-q:hover { border-color: var(--border-strong); background: var(--surface-2); }
.chip-q.is-current { border-color: var(--accent); background: var(--accent-soft); }
.chip-q__sym { font-weight: 700; font-size: 13.5px; }
.chip-q__row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }

/* ---------------------------------------------------------------- Cartes & mise en page */

main { flex: 1; padding-top: 18px; padding-bottom: 30px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 0; }
.card__title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; letter-spacing: -.005em; }
.card__body { padding: 14px 18px 18px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.layout {
  display: grid; gap: 16px; align-items: start;
  grid-template-columns: minmax(0, 1fr) 390px;
  grid-template-areas: "chart side" "tabs side";
}
.area-chart { grid-area: chart; min-width: 0; }
.area-side { grid-area: side; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.area-tabs { grid-area: tabs; min-width: 0; }

/* ---------------------------------------------------------------- Accueil */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 12px;
  font-weight: 650; font-size: 15.5px; border: 1px solid transparent; text-decoration: none; transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn--primary:hover { box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--light { background: #fff; color: #1b3fa8; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); flex: none; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center;
  margin-top: 18px; padding: 52px 48px; border: 1px solid var(--border); border-radius: 24px; overflow: hidden; position: relative;
  background:
    radial-gradient(900px 420px at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(600px 360px at 0% 100%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}
.hero__copy { min-width: 0; text-align: left; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); }
.hero__eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(30px, 3.6vw, 48px); letter-spacing: -.035em; line-height: 1.08; font-weight: 800; margin: 16px 0 0; max-width: 620px; }
.hero h1 b { color: var(--accent); }
.hero__lead { margin-top: 16px; max-width: 560px; color: var(--muted); font-size: 17.5px; line-height: 1.55; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; font-size: 14px; font-weight: 550; color: var(--muted); }
.hero__trust li { display: inline-flex; align-items: center; gap: 6px; }
.hero__trust .ico { color: var(--pos); }
.hero__visual { min-width: 0; }
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-pop); padding: 0 18px 18px; max-width: 460px; margin: 0 auto; transform: rotate(1.2deg); }
.mock__bar { display: flex; align-items: center; gap: 6px; padding: 12px 0; color: var(--muted); font-size: 12px; }
.mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.mock__bar span { margin-left: 8px; }
.mock__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mock__head b { display: block; font-size: 17px; }
.mock__head small { color: var(--muted); font-size: 12px; }
.mock__price { text-align: right; }
.mock__price b { font-size: 22px; letter-spacing: -.01em; }
.mock__price span { font-size: 13.5px; font-weight: 600; }
.mock__chart { display: block; width: 100%; height: 130px; margin: 12px 0; }
.mock__row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.mock__score { position: relative; width: 58px; height: 58px; flex: none; display: grid; place-items: center; }
.mock__score svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mock__score b { font-size: 19px; font-weight: 800; }
.mock__verdict { display: grid; gap: 1px; min-width: 0; }
.mock__tag { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.mock__verdict b { font-size: 15.5px; color: var(--pos); }
.mock__verdict small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.mock__fair { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.mock__fair .pos { font-weight: 700; }
.mock__gauge { position: relative; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--neg-soft), var(--surface-3) 50%, var(--pos-soft)); border: 1px solid var(--border); }
.mock__gauge i { position: absolute; top: 50%; left: 68%; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.mock__cap { text-align: center; margin-top: 12px; font-size: 12px; color: var(--muted); }

.section-head { text-align: center; max-width: 640px; margin: 56px auto 24px; }
.section-head--left { text-align: left; max-width: none; margin: 44px 0 14px; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.025em; line-height: 1.15; }
.section-head p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.feats { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.feat:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); transform: translateY(-2px); }
.feat__ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); margin-bottom: 14px; }
.feat h3 { font-size: 17px; letter-spacing: -.01em; margin-bottom: 6px; }
.feat p { color: var(--muted); font-size: 14.5px; line-height: 1.55; }

.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 44px 0 8px; padding: 34px 40px; border-radius: 22px; color: #fff;
  background: radial-gradient(600px 260px at 100% 0%, rgba(155, 208, 255, .35), transparent 70%), linear-gradient(135deg, #2457d6, #1b3fa8);
}
.cta h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.025em; }
.cta p { margin-top: 6px; opacity: .9; font-size: 16px; max-width: 560px; }
.hero__try { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero__try span { color: var(--muted); align-self: center; font-size: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.chip:hover { border-color: var(--border-strong); background: var(--surface-2); }
.chip.is-on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); color: var(--accent); font-weight: 600; }
.chip--sm { height: 30px; padding: 0 11px; font-size: 13px; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.section-title h2 { font-size: 18px; letter-spacing: -.01em; }
.grid-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.qcard {
  text-align: left; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; color: var(--text); min-width: 0; overflow: hidden;
}
.qcard:hover { border-color: var(--accent); transform: translateY(-1px); transition: transform .12s; }
.qcard__top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; min-width: 0; }
.qcard__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.qcard__sym { font-size: 12px; color: var(--muted); flex: none; }
.qcard__price { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.qcard__chg { font-size: 13.5px; font-weight: 600; }
.qcard__row { display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.spark { width: 84px; height: 30px; flex: none; }

.steps { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; }
.step { padding: 18px; }
.step__n { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; margin-bottom: 10px; }
.step h3 { font-size: 16px; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 14.5px; }

.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-card { height: 110px; }

/* ---------------------------------------------------------------- Fiche valeur */

#asset { padding-top: 16px; }
.asset-head { padding: 18px 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id quote" "tools quote"; gap: 12px 28px; align-items: start; margin-bottom: 16px; }
.asset-head__id { min-width: 0; grid-area: id; }
.asset-head h1 { font-size: clamp(20px, 3vw, 27px); letter-spacing: -.02em; line-height: 1.2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.asset-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; color: var(--muted); font-size: 13.5px; }
.asset-head__meta .sep { opacity: .5; }
.asset-head__quote { text-align: right; grid-area: quote; align-self: start; }
.price { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.price small { font-size: .5em; font-weight: 600; color: var(--muted); margin-left: 4px; }
.change { font-size: 15px; font-weight: 700; margin-top: 4px; display: inline-flex; gap: 8px; align-items: center; justify-content: flex-end; }
.asset-head__tools { grid-area: tools; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; align-self: end; }
.status { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot--open { background: var(--pos); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos) 25%, transparent); }
.starbtn.is-on { color: #e8a317; }
.starbtn.is-on svg { fill: currentColor; }

.notice { padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 14px; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.notice--err { background: var(--neg-soft); color: var(--neg); }
.errbox { padding: 40px 20px; text-align: center; }
.errbox h2 { font-size: 20px; margin-bottom: 8px; }
.errbox p { color: var(--muted); max-width: 520px; margin: 0 auto 16px; }

/* Barre d'outils du graphique */
.toolbar { padding: 12px 14px 8px; display: grid; gap: 10px; }
.toolbar__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 0 11px; height: 30px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15, 26, 46, .12); }
.toolbar__scroll { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 2px; }
@media (max-width: 760px) {
  .toolbar__scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
}
.toolbar__scroll::-webkit-scrollbar { display: none; }
.toolbar__spacer { flex: 1; }
.select {
  height: 34px; padding: 0 30px 0 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 500;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23788aa6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.btn-ico { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); display: grid; place-items: center; color: var(--text); }
.btn-ico:hover { background: var(--surface-3); }
.group-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); align-self: center; padding-right: 2px; }

.chart-wrap { position: relative; padding: 0 0 6px; }
.chart { position: relative; width: 100%; height: 470px; user-select: none; -webkit-user-select: none; }
.chart__layer { position: absolute; left: 0; top: 0; }
.chart__top { cursor: crosshair; outline: none; }
.chart__top:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.chart-load { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 70%, transparent); z-index: 2; }
.chart-card.is-max { position: fixed; inset: 0; z-index: 60; border-radius: 0; display: flex; flex-direction: column; overflow: auto; }
.chart-card.is-max .chart { height: calc(100vh - 190px) !important; min-height: 320px; }
.chart-foot { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 4px 16px 10px; font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- Verdict */

.verdict__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gauge { width: 100%; max-width: 280px; margin: 8px auto 0; display: block; }
.gauge__needle { transform-origin: 100px 100px; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.gauge text { font: 600 9.5px var(--font); fill: var(--muted); }
.verdict__label { text-align: center; margin-top: -2px; }
.verdict__label strong { display: block; font-size: 28px; letter-spacing: -.02em; line-height: 1.1; font-weight: 800; }
.verdict__label span { color: var(--muted); font-size: 13.5px; }
.rely { --rc: var(--muted); margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.rely--bull { --rc: var(--pos); } .rely--bear { --rc: var(--neg); } .rely--warn { --rc: var(--warn); } .rely--neutral { --rc: var(--accent); }
.rely > summary { list-style: none; cursor: pointer; display: grid; gap: 7px; padding: 11px 14px; }
.rely > summary::-webkit-details-marker { display: none; }
.rely__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; min-width: 0; }
.rely__t { font-weight: 700; font-size: 14px; min-width: 0; }
.rely__v { display: inline-flex; align-items: baseline; gap: 3px; flex: none; }
.rely__v b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--rc); line-height: 1; }
.rely__v small { color: var(--muted); font-size: 12px; }
.rely__v em { font-style: normal; font-weight: 700; font-size: 12.5px; margin-left: 6px; color: var(--rc); }
.rely__bar { display: block; height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.rely__bar i { display: block; height: 100%; border-radius: 99px; background: var(--rc); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.rely__more { font-size: 12px; color: var(--muted); }
.rely[open] .rely__more { display: none; }
.rely__body { padding: 0 14px 14px; font-size: 13.5px; }
.rely__body > p { color: var(--muted); margin-bottom: 8px; }
.rely__list { list-style: none; display: grid; gap: 9px; }
.rely__row { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 13px; }
.rely__row b { font-variant-numeric: tabular-nums; flex: none; }
.rely__mini { display: block; height: 4px; border-radius: 4px; background: var(--surface-3); margin: 4px 0 3px; overflow: hidden; }
.rely__mini i { display: block; height: 100%; }
.rely__mini .rhi { background: var(--pos); } .rely__mini .rmid { background: var(--warn); } .rely__mini .rlo { background: var(--neg); }
.rely__list small { color: var(--muted); font-size: 12.5px; display: block; }
.rely__note { margin-top: 10px; font-size: 12px; font-style: italic; }
.verdict__advice { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14.5px; }
.tone-bull-text { color: var(--pos); }
.tone-bear-text { color: var(--neg); }
.tone-neutral-text { color: var(--muted); }
.tone-warn-text { color: var(--warn); }
.forcon { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; font-size: 13.5px; }
.forcon h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.forcon li { padding: 2px 0; }
.forcon li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 7px; vertical-align: middle; background: currentColor; }
.scen { display: grid; gap: 8px; margin-top: 14px; }
.scen__item { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); font-size: 13.5px; }
.scen__item b { display: block; font-size: 13px; margin-bottom: 1px; }
.scen__ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.scen__item--bull .scen__ico { background: var(--pos-soft); color: var(--pos); }
.scen__item--bear .scen__ico { background: var(--neg-soft); color: var(--neg); }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.kv__i { padding: 9px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.kv__i small { display: block; color: var(--muted); font-size: 11.5px; }
.kv__i b { font-size: 14.5px; }
.disclaimer-mini { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- Note /100 */

.score { display: grid; grid-template-columns: 124px 1fr; gap: 16px; align-items: center; }
.ring { width: 124px; height: 124px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__bg { stroke: var(--surface-3); }
.ring__fg { transition: stroke-dashoffset .9s cubic-bezier(.2, .8, .2, 1); }
.ring__txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; line-height: 1; }
.ring__txt b { font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.ring__txt small { font-size: 12px; color: var(--muted); display: block; line-height: 1; }
.score__label { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.score__sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.comps { margin-top: 16px; display: grid; gap: 4px; }
.comp { border-radius: 10px; }
.comp > button { width: 100%; background: transparent; border: 0; padding: 7px 4px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; text-align: left; border-radius: 10px; }
.comp > button:hover { background: var(--surface-2); }
.comp__name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.comp__pts { font-size: 13px; color: var(--muted); font-weight: 600; }
.bar { grid-column: 1 / -1; height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.bar > i.is-good { background: var(--pos); }
.bar > i.is-mid { background: var(--accent); }
.bar > i.is-low { background: var(--warn); }
.bar > i.is-bad { background: var(--neg); }
.comp__notes { padding: 2px 6px 10px 8px; font-size: 13px; color: var(--muted); display: grid; gap: 3px; }
.comp__notes li { display: flex; gap: 8px; }
.comp__notes li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--muted); }
.comp__notes li.ok::before { background: var(--pos); }
.comp__notes li.ko::before { background: var(--neg); }
.comp__notes li.mid::before { background: var(--warn); }
.hist { margin-top: 12px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.hist svg { width: 110px; height: 28px; }

/* ---------------------------------------------------------------- Horizons */

.hor { display: grid; gap: 8px; }
.hor__row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.hor__name { font-weight: 700; font-size: 14px; }
.hor__name small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.hor__facts { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }

/* ---------------------------------------------------------------- Onglets d'analyse */

.tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: transparent; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabpanel { padding: 12px 18px 18px; }
.tabpanel__tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tabpanel__tools small { color: var(--muted); }

.sigs { display: grid; }
.sig { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 0 12px; padding: 11px 4px; border-bottom: 1px solid var(--border); align-items: start; }
.sig:last-child { border-bottom: 0; }
.sig__dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--muted); }
.tone-bull .sig__dot, .tone-bull.dotc { background: var(--pos); }
.tone-bear .sig__dot, .tone-bear.dotc { background: var(--neg); }
.tone-warn .sig__dot, .tone-warn.dotc { background: #e8a317; }
.tone-neutral .sig__dot { background: #8696ae; }
.sig__title { font-weight: 700; font-size: 15px; }
.sig__detail { color: var(--muted); font-size: 14px; }
.sig__score { font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-3); color: var(--muted); align-self: start; margin-top: 2px; }
.sig__score.pos { background: var(--pos-soft); color: var(--pos); }
.sig__score.neg { background: var(--neg-soft); color: var(--neg); }
.sig__why { grid-column: 2 / -1; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; color: var(--text); }
.sig__why ul { margin-top: 6px; padding-left: 18px; list-style: disc; color: var(--muted); }
.sig--bias { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 4px; }
.sig--bias .sig__title { font-size: 16px; }

.term { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; font-weight: inherit; border-bottom: 1px dotted var(--muted); cursor: help; }
.term:hover { color: var(--accent); border-bottom-color: var(--accent); }
.term__i { color: var(--muted); display: inline-grid; opacity: .8; }
.term:hover .term__i { color: var(--accent); }

.lvl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.table td { padding: 9px 8px; border-bottom: 1px solid var(--border); }
.table td.num, .table th.num { text-align: right; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-near td { background: var(--accent-soft); }
.h4 { font-size: 13px; font-weight: 700; margin: 4px 0 8px; display: flex; align-items: center; gap: 6px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.stat small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.stat b { font-size: 16.5px; letter-spacing: -.01em; }
.perf { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-bottom: 18px; }
.perf__i { text-align: center; padding: 9px 6px; border-radius: 12px; border: 1px solid var(--border); }
.perf__i small { display: block; color: var(--muted); font-size: 12px; }
.perf__i b { font-size: 15px; }
.perf__i.pos { background: var(--pos-soft); }
.perf__i.neg { background: var(--neg-soft); }
.empty { color: var(--muted); padding: 18px 4px; font-size: 14.5px; }

/* ---------------------------------------------------------------- Pied de page & mentions */

.disclaimer { margin-top: 18px; padding: 14px 18px; font-size: 13px; color: var(--muted); border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--border-strong); }
.disclaimer b { color: var(--text); }
.foot { border-top: 1px solid var(--border); background: var(--surface); padding: 18px 0 22px; font-size: 13.5px; color: var(--muted); }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; align-items: center; }
.foot strong { color: var(--text); }
.foot a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.foot a:hover strong { color: var(--accent); }
.foot__dev { font-variant-numeric: tabular-nums; padding: 3px 10px; border-radius: 99px; background: var(--surface-3); font-size: 12.5px; }

/* ---------------------------------------------------------------- Infobulle, fenêtre, toast */

.tip {
  position: fixed; z-index: 90; width: min(340px, calc(100vw - 16px)); padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-pop); font-size: 13.5px; line-height: 1.5;
}
.tip__cat { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tip__t { font-weight: 800; font-size: 15px; margin: 2px 0 6px; }
.tip__s { color: var(--text); }
.tip__r { margin: 8px 0 0; padding-left: 18px; list-style: disc; color: var(--muted); }
.tip__r li { margin: 2px 0; }
.tip__more { margin-top: 10px; background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; font-size: 13px; }
.tip__more:hover { text-decoration: underline; }

dialog { border: 1px solid var(--border-strong); border-radius: 18px; padding: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); width: min(780px, calc(100vw - 24px)); max-height: min(86vh, 900px); }
dialog::backdrop { background: rgba(8, 14, 28, .55); backdrop-filter: blur(3px); }
dialog[open] { display: flex; flex-direction: column; }
.gloss__head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 20px 22px 8px; }
.gloss__head h2 { font-size: 22px; letter-spacing: -.02em; }
.gloss__tools { padding: 8px 22px 12px; display: grid; gap: 10px; border-bottom: 1px solid var(--border); }
.gloss__cats { display: flex; gap: 6px; flex-wrap: wrap; }
.gloss__list { padding: 6px 22px 22px; overflow-y: auto; }
.gloss__cat { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin: 18px 0 6px; }
.gloss__item { border-bottom: 1px solid var(--border); padding: 4px 0; }
.gloss__item summary { cursor: pointer; font-weight: 700; padding: 9px 0; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.gloss__item summary::-webkit-details-marker { display: none; }
.gloss__item summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
.gloss__item[open] summary::after { content: "–"; }
.gloss__item p { color: var(--text); margin-bottom: 6px; }
.gloss__item ul { padding-left: 18px; list-style: disc; color: var(--muted); margin-bottom: 8px; }
.gloss__item.is-flash { background: var(--accent-soft); border-radius: 8px; }
.gloss__empty { padding: 24px 0; }
.input { width: 100%; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--text); color: var(--surface); padding: 10px 18px; border-radius: 99px; font-size: 14px; font-weight: 600; z-index: 95; transition: .25s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------------------------------------------------------- Responsive */

@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 40px 32px; }
  .mock { transform: none; }
  .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "chart" "side" "tabs"; }
  .area-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .area-side > .card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  /* En-tête : logo à gauche, glossaire + thème à droite, recherche dessous */
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
  .topbar__in { flex-wrap: wrap; gap: 8px 10px; padding-top: 8px; padding-bottom: 10px; }
  .topbar__actions { margin-left: auto; gap: 4px; }
  .topbar__actions .iconbtn { width: 40px; padding: 0; border-radius: 12px; background: var(--surface-3); }
  .topbar__actions .iconbtn span:not(#themeIco) { display: none; }
  .search { order: 3; flex: 1 1 100%; max-width: none; margin: 0; }
  .brand { font-size: 18px; }
  .brand__mark { width: 28px; height: 28px; }
  /* Navigation principale : barre d'onglets fixe en bas, icône + libellé */
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; margin: 0; gap: 0;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(15, 26, 46, .08);
  }
  .tabbar .iconbtn {
    flex-direction: column; gap: 3px; height: 52px; min-width: 0; padding: 4px 0; border-radius: 12px;
    color: var(--muted); font-size: 11px;
  }
  .tabbar .iconbtn .ico { width: 22px; height: 22px; }
  .tabbar .iconbtn span { display: block; font-size: 10.5px; font-weight: 600; line-height: 1; letter-spacing: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .iconbtn:hover, .tabbar .iconbtn:active { background: var(--surface-3); color: var(--accent); }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .asset-head { padding: 14px; grid-template-columns: 1fr; grid-template-areas: "id" "quote" "tools"; }
  .asset-head__quote { text-align: left; width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .change { justify-content: flex-start; }
  .chart { height: 380px; }
  .area-side { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .lvl-grid { grid-template-columns: 1fr; }
  .score { grid-template-columns: 104px 1fr; gap: 12px; }
  .ring { width: 104px; height: 104px; }
  .ring__txt b { font-size: 30px; }
  .tabpanel { padding: 10px 12px 14px; }
  .card__head { padding: 12px 14px 0; }
  .card__body { padding: 12px 14px 14px; }
  .toolbar { padding: 10px 10px 6px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px 18px 24px; border-radius: 18px; margin-top: 10px; }
  .hero__lead { font-size: 16px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .hero__trust { gap: 6px 16px; font-size: 13.5px; }
  .mock { transform: none; padding: 0 14px 14px; }
  .mock__chart { height: 100px; }
  .section-head { margin: 40px auto 18px; }
  .feats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .feat { padding: 18px; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; }
  .feat__ico { grid-row: 1 / span 2; margin: 0; }
  .feat h3 { align-self: end; }
  .cta { flex-direction: column; align-items: stretch; text-align: center; padding: 26px 20px; gap: 18px; }
  .cta .btn { width: 100%; }
  .wrap { padding: 0 12px; }
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qcard { padding: 12px; }
  .qcard__price { font-size: 17px; }
  .spark { width: 60px; }
  .sig { grid-template-columns: 12px minmax(0, 1fr) auto; gap: 0 10px; }
  .kv { grid-template-columns: repeat(3, 1fr); }
  .forcon { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .grid-cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .topbar, .tabbar, .toolbar, .foot__dev, .watch { display: none !important; }
}

/* ---------------------------------------------------------------- Jauge */
.gseg0 { stroke: var(--neg); }
.gseg1 { stroke: color-mix(in srgb, var(--neg) 50%, var(--surface-3)); }
.gseg2 { stroke: var(--border-strong); }
.gseg3 { stroke: color-mix(in srgb, var(--pos) 50%, var(--surface-3)); }
.gseg4 { stroke: var(--pos); }

/* ---------------------------------------------------------------- Classement */

.rank-links { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.rank-link { text-decoration: none; align-content: start; }
.rank-link__d { font-size: 13px; line-height: 1.35; }
.rank-link .badge { justify-self: start; }
.rk-title { align-items: center; }
.rk-title h1 { font-size: 24px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.rk-title h1 svg { color: var(--accent); }
.rk-card { padding: 16px; }
.rk-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.rk-tab { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 14px; color: var(--text); }
.rk-tab small { color: var(--muted); font-weight: 500; font-size: 12px; }
.rk-tab:hover { border-color: var(--border-strong); background: var(--surface-2); }
.rk-tab.is-on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); color: var(--accent); }
.rk-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; align-items: end; margin-bottom: 14px; }
.rk-head h2 { font-size: 20px; letter-spacing: -.01em; }
.rk-head p { font-size: 14px; }
.rk-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13.5px; }
.rk-meta b { color: var(--text); }
.rk-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.rk-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 1240px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.rk-table th, .rk-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
.rk-table thead th { background: var(--surface-2); font-size: 12px; color: var(--muted); font-weight: 700; position: sticky; top: 0; vertical-align: bottom; }
.rk-table tbody tr:last-child td { border-bottom: 0; }
.rk-row { cursor: pointer; }
.rk-row:hover td { background: var(--surface-2); }
.rk-num { text-align: right !important; }
.rk-na { color: var(--muted); }
.rk-table .pos { color: var(--pos); } .rk-table .neg { color: var(--neg); } .rk-table .flat { color: var(--muted); }
.rk-c-rank { position: sticky; left: 0; z-index: 2; width: 44px; text-align: center !important; }
.rk-c-name { position: sticky; left: 44px; z-index: 2; min-width: 190px; max-width: 250px; box-shadow: 1px 0 0 var(--border); }
.rk-table thead .rk-c-rank, .rk-table thead .rk-c-name { z-index: 3; }
.rk-c-name a { display: grid; text-decoration: none; color: var(--text); min-width: 0; }
.rk-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; max-width: 232px; }
.rk-c-name small { color: var(--muted); font-size: 12px; }
.rk-pos { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-weight: 700; font-size: 12.5px; background: var(--surface-3); color: var(--muted); }
.rk-pos--1 { background: #f6d56a; color: #5c4300; } .rk-pos--2 { background: #d5dbe5; color: #3b4658; } .rk-pos--3 { background: #e7b98a; color: #5a3410; }
.rk-sort { background: transparent; border: 0; padding: 0; font: inherit; color: inherit; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; text-align: inherit; }
.rk-sort:hover, .rk-sort.is-on { color: var(--text); }
.rk-arrow { font-size: 9px; width: 9px; color: var(--accent); }
.rk-num .rk-sort { flex-direction: row-reverse; }
.rk-c-score .rk-score { display: inline-flex; align-items: center; gap: 8px; }
.rk-score b { display: inline-grid; place-items: center; min-width: 38px; height: 28px; padding: 0 6px; border-radius: 8px; font-size: 15px; font-weight: 800; color: #fff; }
.rk-score small { font-size: 12px; font-weight: 600; color: var(--muted); }
.rk-score--pos b { background: var(--pos); } .rk-score--mid b { background: #6b7a90; } .rk-score--warn b { background: #d28a12; } .rk-score--neg b { background: var(--neg); }
[data-theme="dark"] .rk-score b { color: #07101f; }
.rk-comp { min-width: 84px; }
.rk-comp__v { display: block; font-weight: 700; }
.rk-comp__v small { color: var(--muted); font-weight: 500; }
.rk-comp__bar { display: block; height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 4px; overflow: hidden; }
.rk-comp__bar i { display: block; height: 100%; border-radius: 4px; }
.rk-comp__bar .hi { background: var(--pos); } .rk-comp__bar .mid { background: var(--warn); } .rk-comp__bar .lo { background: var(--neg); }
.rk-hz__in { display: inline-flex; gap: 4px; }
.rk-hz__in i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.rk-hz__in .hz-bull { background: var(--pos); } .rk-hz__in .hz-bear { background: var(--neg); }
.rk-foot { display: flex; justify-content: center; margin: 14px 0 4px; }
.rk-legend { margin-top: 14px; font-size: 13.5px; color: var(--text); display: grid; gap: 8px; max-width: 980px; }
.rk-legend .muted { font-size: 12.5px; }
@media (max-width: 760px) {
  .rk-card { padding: 12px; }
  .rk-title h1 { font-size: 20px; }
  .rk-title .muted { display: none; }
  .rk-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; padding: 0 4px 2px; }
  .rk-tab { flex: none; }
  .rk-c-rank { width: 34px; padding-inline: 4px; }
  .rk-c-name { left: 34px; min-width: 112px; max-width: 120px; padding-inline: 6px; }
  .rk-name { max-width: 104px; }
}

/* ---------------------------------------------------------------- Évolution sur la période, avertissement verdict */

.perchg { margin-top: 8px; display: grid; justify-items: end; gap: 1px; font-size: 13px; color: var(--muted); }
.perchg__l { font-weight: 600; }
.perchg b { font-size: 17px; letter-spacing: -.01em; }
.perchg--pos b { color: var(--pos); } .perchg--neg b { color: var(--neg); } .perchg--flat b { color: var(--text); }
.perchg__r { font-size: 12px; }
@media (max-width: 760px) { .asset-head__quote { text-align: left; } .perchg { justify-items: start; } .change { justify-content: flex-start; } }
.verdict__caveat { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; line-height: 1.4; }
.verdict__caveat .ico { flex: none; margin-top: 1px; }

/* ---------------------------------------------------------------- Prix juste : comparaison des méthodes */

.value-card { margin-top: 16px; }
.vf__top { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.vf__big small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.vf__big b { font-size: 34px; letter-spacing: -.03em; font-weight: 800; line-height: 1.1; }
.vf__big b span { font-size: 16px; color: var(--muted); font-weight: 600; }
.vf__big em { display: block; font-style: normal; color: var(--muted); font-size: 12.5px; }
.vf__verdict { display: grid; gap: 2px; flex: 1 1 260px; min-width: 0; }
.vf__verdict strong { font-size: 22px; letter-spacing: -.01em; font-weight: 800; }
.vf__verdict span { font-size: 13.5px; color: var(--text); }
.vf__mos { color: var(--muted) !important; }
.vf { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.vf__row { display: grid; grid-template-columns: minmax(120px, 30%) 1fr; align-items: center; border-bottom: 1px solid var(--border); min-height: 46px; }
.vf__row.is-ref { opacity: .72; }
.vf__lab { padding: 6px 12px; display: grid; min-width: 0; font-size: 13.5px; font-weight: 600; }
.vf__lab small { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.vf__track { position: relative; height: 46px; margin-right: 14px; }
.vf__band { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.vf__range { position: absolute; top: 18px; height: 10px; border-radius: 6px; }
.vf__range.up { background: color-mix(in srgb, var(--pos) 45%, transparent); }
.vf__range.down { background: color-mix(in srgb, var(--neg) 40%, transparent); }
.vf__mid { position: absolute; top: 16px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg) scale(.82); background: var(--text); border-radius: 2px; }
.vf__val { position: absolute; top: 0; font-size: 11.5px; font-weight: 700; margin-left: 10px; white-space: nowrap; color: var(--text); font-variant-numeric: tabular-nums; }
.vf__line { position: absolute; top: 0; bottom: 0; width: 0; }
.vf__line--px { border-left: 2px dashed var(--muted); }
.vf__line--fair { border-left: 2px solid var(--accent); }
.vf__axis { display: grid; grid-template-columns: minmax(120px, 30%) 1fr; }
.vf__ticks { position: relative; height: 24px; margin-right: 14px; }
.vf__ticks span { position: absolute; top: 5px; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vf__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.vf__legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 16px; height: 0; }
.lg--px { border-top: 2px dashed var(--muted); } .lg--fair { border-top: 2px solid var(--accent); }
.lg--band { height: 10px; background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 2px; }
.lg--range { height: 8px; background: color-mix(in srgb, var(--pos) 45%, transparent); border-radius: 4px; }
.vf__more { margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; }
.vf__more > summary { cursor: pointer; padding: 11px 0; font-weight: 600; font-size: 14px; }
.vf__list { list-style: none; display: grid; gap: 12px; padding-bottom: 6px; }
.vf__li-h { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.vf__li-h .pos { color: var(--pos); } .vf__li-h .neg { color: var(--neg); }
.vf__list small { color: var(--muted); font-size: 12.5px; display: block; }
.vf__ass { color: var(--muted); font-size: 12.5px; margin: 8px 0 12px; }
.fin { margin-top: 20px; }
.fin__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 8px; }
.fin__h { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 8px; }
.fin__h .pos { color: var(--pos); } .fin__h .neg { color: var(--neg); }
.fin__bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; }
.fin__b { flex: 1; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; height: 100%; gap: 3px; min-width: 0; }
.fin__b i { width: 70%; max-width: 44px; align-self: end; border-radius: 6px 6px 2px 2px; }
.fin__v { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fin__b small { font-size: 11px; color: var(--muted); }
@media (max-width: 760px) {
  .vf__row, .vf__axis { grid-template-columns: 96px 1fr; }
  .vf__lab { padding: 6px 8px; font-size: 12.5px; }
  .vf__big b { font-size: 28px; }
}
.rk-flags { white-space: nowrap; }
.rk-flag { display: inline-block; margin: 1px 3px 1px 0; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; background: rgba(214, 158, 46, .16); color: #9a6b00; }
.rk-fvl { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.toolbar__row > .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.toolbar__row > .seg::-webkit-scrollbar { display: none; }
.toolbar__row > .seg button { flex: none; }
.toolbar { grid-template-columns: minmax(0, 1fr); }
.toolbar > * { min-width: 0; }
@media (max-width: 760px) { .vf__row, .vf__axis { grid-template-columns: 104px 1fr; } }

/* ================================================================ Fiche détaillée : onglets, cartes, graphiques */

.vtabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 14px 0 16px; border-bottom: 1px solid var(--border); }
.vtabs::-webkit-scrollbar { display: none; }
.vtab { background: none; border: 0; padding: 11px 16px; font-weight: 600; font-size: 14.5px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.vtab:hover { color: var(--text); }
.vtab.is-on { color: var(--accent); border-bottom-color: var(--accent); }
.view { display: block; min-width: 0; }

.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.fc { min-width: 0; }
.fc--wide { grid-column: 1 / -1; }
.fc__sub { color: var(--muted); font-size: 12.5px; margin: -2px 0 12px; line-height: 1.45; }
.fc .card__title { min-width: 0; }
.view > .fc--wide { margin-bottom: 16px; }
.vmore { display: grid; gap: 16px; margin-top: 16px; }
#fairStrip, #insightCard { margin-top: 16px; }
.fairstrip { display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: center; padding: 14px 18px; }
.fairstrip small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.fairstrip b { font-size: 19px; letter-spacing: -.01em; }
.fairstrip .chip { margin-left: auto; }
@media (max-width: 760px) { .fairstrip .chip { margin-left: 0; } .vtab { padding: 10px 12px; } }

.t-good { color: var(--pos); } .t-mid { color: var(--warn); } .t-bad { color: var(--neg); }
.dl { display: grid; }
.dl__r { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.dl__r:last-child { border-bottom: 0; }
.dl dt { color: var(--muted); min-width: 0; }
.dl dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.tbl thead th { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tbl tbody th { font-weight: 600; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl--fin th:first-child, .tbl--fin td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.tbl--fin td small { display: block; font-size: 11px; font-weight: 600; }
.tbl--fin tbody tr:nth-child(odd) th, .tbl--fin tbody tr:nth-child(odd) td { background: var(--surface-2); }

/* histogrammes */
.bc__plot { position: relative; display: flex; gap: 6px; }
.bc__col { position: relative; flex: 1 1 0; min-width: 0; height: 100%; }
.bc__bar { position: absolute; left: 14%; right: 14%; border-radius: 4px 4px 0 0; min-height: 2px; }
.bc__val { position: absolute; left: -6px; right: -6px; text-align: center; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.bc__val--sm { font-size: 10.5px; left: -10px; right: -10px; }
.bc__na { position: absolute; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 12px; }
.bc__zero { position: absolute; left: 0; right: 0; height: 1px; background: var(--border-strong); }
.bc__col.is-est .bc__bar { opacity: .5; background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .45) 0 4px, transparent 4px 8px); }
.bc__col.is-est .bc__val { color: var(--muted); }
.bc__grp { flex: 1 1 0; display: flex; gap: 2px; height: 100%; min-width: 0; }
.bc__grp .bc__bar { left: 6%; right: 6%; }
.bc__labels { display: flex; gap: 6px; margin-top: 6px; }
.bc__labels span { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; font-size: 11.5px; color: var(--muted); }
.bc__labels span.is-est { font-style: italic; }
.bc__legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.bc__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
@media (max-width: 640px) { .bc__val--sm { display: none; } .bc__val { font-size: 10.5px; } }

/* barres empilées */
.stk { display: flex; gap: 2px; border-radius: 8px; overflow: hidden; }
.stk__s { display: flex; align-items: center; justify-content: center; min-width: 0; color: #fff; font-size: 12px; font-weight: 700; }
.stk__leg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 4px; font-size: 12px; color: var(--muted); }
.stk__leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* radar */
.radar { width: 100%; max-width: 360px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.radar__ring { fill: none; stroke: var(--border); }
.radar__axis { stroke: var(--border); }
.radar__area { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.radar__dot { fill: var(--accent); }
.radar__lab { font-size: 12px; font-weight: 700; fill: var(--text); }
.radar__sc { font-size: 11.5px; fill: var(--muted); }

/* jauge de fourchette */
.rg { position: relative; height: 112px; margin: 6px 36px 10px; }
.rg__track { position: absolute; left: 0; right: 0; top: 66px; height: 8px; border-radius: 6px; background: var(--surface-3); }
.rg__fill { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: color-mix(in srgb, var(--accent) 40%, transparent); }
.rg__m { position: absolute; top: 0; width: 0; height: 112px; }
.rg__m i { position: absolute; left: -1px; width: 2px; background: var(--muted); border-radius: 1px; }
.rg__m span { position: absolute; left: 0; transform: translateX(-50%); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.rg__m--px i { top: 18px; height: 52px; background: var(--text); width: 3px; left: -1.5px; }
.rg__m--px span { top: 0; color: var(--text); }
.rg__m--mean i { top: 40px; height: 30px; background: var(--accent); }
.rg__m--mean span { top: 20px; color: var(--accent); }
.rg__m--lo i, .rg__m--hi i { top: 62px; height: 16px; }
.rg__m--lo span, .rg__m--hi span { top: 84px; color: var(--muted); }
@media (max-width: 760px) { .rg { margin: 6px 26px 10px; } }

/* synthèse */
.ins__top { display: grid; grid-template-columns: minmax(250px, 340px) 1fr; gap: 20px; align-items: start; }
.ins__qtot { text-align: center; margin-top: 4px; font-size: 13px; color: var(--muted); }
.ins__qtot b { display: block; font-size: 22px; color: var(--text); }
.ins__headline { font-size: 16.5px; font-weight: 700; margin-bottom: 12px; letter-spacing: -.005em; }
.ins__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ins__list li { display: flex; gap: 8px; font-size: 14px; line-height: 1.4; margin: 7px 0; }
.ins__list .ico { margin-top: 2px; }
.ins__list.is-pos .ico { color: var(--pos); } .ins__list.is-neg .ico { color: var(--neg); }
.ins__none { font-size: 13.5px; }
.ins .h4.pos, .ins .h4.neg { margin-top: 0; }
.qchips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.qchip { border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; display: grid; gap: 1px; background: var(--surface-2); }
.qchip b { font-size: 20px; }
.qchip small { color: var(--muted); font-size: 12px; }
.qchip.tone-bull b { color: var(--pos); } .qchip.tone-bear b { color: var(--neg); } .qchip.tone-neutral b { color: var(--warn); }
.ins__facts { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--border); }
.ins__facts .dl { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); column-gap: 32px; }
@media (max-width: 900px) { .ins__top { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .ins__cols { grid-template-columns: 1fr; } }

/* analystes */
.cons { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; margin-bottom: 16px; }
.cons__big b { display: block; font-size: 28px; letter-spacing: -.02em; }
.cons__big small { color: var(--muted); font-size: 12.5px; }
.cons__gauge { position: relative; flex: 1 1 200px; height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--pos), var(--warn), var(--neg)); margin-bottom: 24px; }
.cons__gauge i { position: absolute; top: -5px; width: 4px; height: 20px; background: var(--text); border-radius: 2px; transform: translateX(-50%); box-shadow: 0 0 0 2px var(--surface); }
.cons__gauge span { position: absolute; top: 18px; font-size: 11px; color: var(--muted); }
.cons__gauge span:nth-of-type(1) { left: 0; } .cons__gauge span:nth-of-type(2) { left: 50%; transform: translateX(-50%); } .cons__gauge span:nth-of-type(3) { right: 0; }
.cons__hist { display: grid; gap: 8px; }
.cons__h { display: grid; grid-template-columns: 104px 1fr 40px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.cons__h small { text-align: right; font-weight: 700; color: var(--text); }

/* ratios */
.rts { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.rt { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: grid; gap: 3px; background: var(--surface-2); }
.rt__l { font-size: 13px; color: var(--muted); }
.rt__v { font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.rt__t { font-size: 12px; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.rt__t i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.rt--good .rt__t i { background: var(--pos); } .rt--mid .rt__t i { background: var(--warn); } .rt--bad .rt__t i { background: var(--neg); }

/* simulateur */
.sim { display: grid; gap: 18px; }
.sim__in { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.sim__f { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.sim__f > div { display: flex; align-items: center; gap: 8px; }
.sim__f input[type="number"] { width: 100%; height: 40px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 0 10px; background: var(--surface); color: var(--text); }
.sim__f em { font-style: normal; color: var(--muted); }
.sim__f .select { width: 100%; }
.sim__chk { display: flex; align-items: center; gap: 8px; height: 40px; font-size: 14px; }
.sim__out { display: grid; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.sim__big small, .sim__row small { display: block; color: var(--muted); font-size: 12.5px; }
.sim__big b { font-size: 32px; letter-spacing: -.02em; }
.sim__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.sim__row b { font-size: 20px; }
.tbl--mx th, .tbl--mx td { text-align: center; white-space: nowrap; }
.tbl--mx tbody th { text-align: left; }
.mx--pos { background: var(--pos-soft); color: var(--pos); font-weight: 600; }
.mx--mid { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.mx--neg { background: var(--neg-soft); color: var(--neg); font-weight: 600; }

/* société */
.prof__sum { font-size: 14.5px; line-height: 1.65; margin-bottom: 8px; }
.gov__r { display: grid; grid-template-columns: 170px 1fr 44px; gap: 12px; align-items: center; margin: 9px 0; font-size: 13.5px; }
.gov__bar { height: 8px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.gov__bar i { display: block; height: 100%; }
.gov__bar i.good { background: var(--pos); } .gov__bar i.mid { background: var(--warn); } .gov__bar i.bad { background: var(--neg); }
.gov__r b { text-align: right; }
@media (max-width: 640px) { .gov__r { grid-template-columns: 110px 1fr 40px; } }

/* watchlist */
.wl-empty { text-align: center; padding: 40px 16px; display: grid; gap: 10px; justify-items: center; }
.wl-empty .ico { color: var(--warn); }
.wl-empty p { max-width: 520px; }
.wl-sugg { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 6px; }
.wl-table .wl-x { width: 44px; text-align: center; }
.wl-del { border: 0; background: none; color: var(--muted); padding: 6px; border-radius: 8px; line-height: 0; }
.wl-del:hover { background: var(--neg-soft); color: var(--neg); }
.wl-miss { margin-top: 10px; font-size: 13px; }
.wl-table .wl-g { width: 30px; padding-left: 8px; padding-right: 0; text-align: center; }
.wl-grip { border: 0; background: none; color: var(--muted); padding: 6px 2px; border-radius: 6px; line-height: 0; cursor: grab; touch-action: none; user-select: none; }
.wl-grip:hover, .wl-grip:focus-visible { color: var(--text); background: var(--surface-2); }
.is-sorting, .is-sorting .wl-grip { cursor: grabbing; }
.is-sorting { user-select: none; }
.wl-table tr.is-dragging td { background: var(--surface-2); box-shadow: 0 1px 0 var(--accent, #2563eb) inset, 0 -1px 0 var(--accent, #2563eb) inset; opacity: .9; }

/* histogrammes denses (projection sur 10 ans, longs historiques) */
.bc--dense .bc__plot, .bc--dense .bc__labels { gap: 3px; }
.bc--dense .bc__val { font-size: 10px; left: -8px; right: -8px; }
.bc--dense .bc__labels span { font-size: 10.5px; }
@media (max-width: 640px) {
  .bc--dense .bc__labels span { font-size: 9.5px; letter-spacing: -.02em; }
  .bc--dense .bc__col:nth-child(even) .bc__val { display: none; }
  .bc--dense .bc__labels span:nth-child(even) { visibility: hidden; }
}

/* la watchlist n'a pas de colonne de rang : la colonne « Valeur » colle au bord */
.wl-table .rk-c-name { left: 0; }
@media (max-width: 640px) { .wl-table .rk-c-name { left: 0; } }

/* ---- Prix juste dans le temps ---- */
.fh-card { margin-bottom: 16px; }
.fh__top { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.fh__intro { margin: 0; flex: 1 1 360px; font-size: 14px; line-height: 1.55; }
.fh__intro b { color: var(--text); font-weight: 600; }
.fh__seg { flex: none; }
.fh__banner { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 12px 24px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin-bottom: 12px; }
.fh__fig { display: grid; gap: 1px; }
.fh__fig small { color: var(--muted); font-size: 12px; }
.fh__fig b { font-size: 26px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.fh__fig--f b { color: var(--accent); }
.fh__fig em { color: var(--muted); font-size: 11.5px; font-style: normal; }
.fh__verdict { display: grid; gap: 2px; border-left: 4px solid var(--border-strong); padding-left: 14px; min-width: 0; }
.fh__verdict strong { font-size: 18px; }
.fh__verdict span { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.fh__verdict--up { border-color: var(--pos); } .fh__verdict--up strong { color: var(--pos); }
.fh__verdict--down { border-color: var(--neg); } .fh__verdict--down strong { color: var(--neg); }
.fh__wrap { position: relative; width: 100%; min-height: 360px; }
.fh__svg { display: block; width: 100%; height: auto; overflow: visible; }
.fh__grid { stroke: var(--c-grid, var(--border)); stroke-width: 1; }
.fh__vgrid { stroke: var(--c-grid, var(--border)); stroke-width: 1; opacity: .6; }
.fh__zero { stroke: var(--border-strong); stroke-width: 1.4; }
.fh__ax { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.fh__ax--x { font-size: 12px; } .fh__ax--yr { fill: var(--text); font-weight: 700; }
.fh__ax--pos { fill: var(--pos); } .fh__ax--neg { fill: var(--neg); }
.fh__sub { fill: var(--text); font-size: 13.5px; font-weight: 700; }
.fh__subsm { fill: var(--muted); font-size: 12px; }
.fh__band { fill: color-mix(in srgb, var(--accent) 11%, transparent); stroke: none; }
.fh__gap { stroke: none; }
.fh__gap--up { fill: color-mix(in srgb, var(--pos) 24%, transparent); }
.fh__gap--down { fill: color-mix(in srgb, var(--neg) 22%, transparent); }
.fh__gap--solid.fh__gap--up { fill: color-mix(in srgb, var(--pos) 42%, transparent); }
.fh__gap--solid.fh__gap--down { fill: color-mix(in srgb, var(--neg) 38%, transparent); }
.fh__gapline { fill: none; stroke: var(--muted); stroke-width: 1.3; }
.fh__price { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fh__fair { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
.fh__fair--est { stroke-dasharray: 1 7; }
.fh__hatch { stroke: var(--muted); stroke-width: 1; opacity: .22; }
.fh__estbg { opacity: .9; }
.fh__esttxt { fill: var(--muted); font-size: 11.5px; font-style: italic; }
.fh__zone { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.fh__zone--up { fill: var(--pos); } .fh__zone--down { fill: var(--neg); }
.fh__dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2.4; }
.fh__dot--now { fill: var(--accent); stroke: var(--surface); }
.fh__pill--f { fill: var(--accent); } .fh__pill--p { fill: var(--text); }
.fh__pilltxt { fill: var(--surface); font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fh__pilllab { fill: var(--surface); font-size: 10px; font-weight: 600; opacity: .85; letter-spacing: .02em; }
.fh__leader { stroke: var(--muted); stroke-width: 1; }
.fh__endlab { font-size: 12px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.fh__endlab--f { fill: var(--accent); } .fh__endlab--p { fill: var(--text); }
.fh__vline { stroke: var(--c-cross, var(--muted)); stroke-width: 1; stroke-dasharray: 3 3; }
.fh__cp { fill: var(--text); stroke: var(--surface); stroke-width: 2; }
.fh__cf { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.fh__tip { position: absolute; z-index: 5; pointer-events: none; min-width: 170px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 9px 11px; font-size: 13px; display: grid; gap: 3px; }
.fh__tip[hidden] { display: none; }
.fh__tip b { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fh__tip div { display: flex; align-items: center; gap: 6px; }
.fh__tip .lg { width: 12px; flex: none; }
.fh__tip strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.fh__tipm { color: var(--muted); font-size: 12px; }
.fh__tipg { font-weight: 700; }
.fh__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 16px; font-size: 12.5px; color: var(--muted); }
.fh__legend span { display: inline-flex; align-items: center; gap: 7px; }
.fh__legend .lg--px { border-top: 2px solid var(--text); }
.fh__legend .lg--fair { border-top: 3px solid var(--accent); }
.fh__legend .lg--est { border-top: 3px dotted var(--accent); }
.fh__legend .lg--dot { width: 10px; height: 10px; border: 2.4px solid var(--accent); border-radius: 50%; background: var(--surface); }
.fh__share { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; display: grid; gap: 8px; }
.fh__sharet { font-size: 13.5px; font-weight: 600; }
.fh__shareleg { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12.5px; color: var(--muted); }
.fh__shareleg span { display: inline-flex; align-items: center; gap: 6px; }
.fh__shareleg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fh__avg { margin: 0; font-size: 12.5px; }
@media (max-width: 640px) {
  .fh__banner { grid-template-columns: 1fr 1fr; padding: 12px 14px; }
  .fh__verdict { grid-column: 1 / -1; }
  .fh__fig b { font-size: 22px; }
  .fh__wrap { min-height: 300px; }
  .fh__intro { font-size: 13.5px; }
}

/* Page mentions légales */
.legal { max-width: 820px; margin: 0 auto; padding: 28px 0 48px; }
.legal h1 { font-size: 30px; letter-spacing: -.02em; margin-bottom: 4px; }
.legal h2 { font-size: 19px; margin: 28px 0 8px; }
.legal p { margin: 0 0 10px; line-height: 1.6; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal .small { font-size: 13px; }
.sig-nom { height: 1.1em; width: auto; vertical-align: -.22em; }
.mail-protege { cursor: pointer; }

/* Fiabilité mesurée (page dédiée) et blocs de preuve sur la fiche */
.rely-page ul { padding-left: 20px; margin: 0 0 12px; line-height: 1.6; }
.rp-hero { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0 4px; }
.rp-hero > div { flex: 1 1 150px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.rp-hero b { display: block; font-size: 24px; letter-spacing: -.02em; }
.rp-hero small { color: var(--muted); }
.rp-tab { overflow-x: auto; margin: 8px 0 14px; }
.rp-tab table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.rp-tab th, .rp-tab td { text-align: right; padding: 7px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rp-tab th:first-child { text-align: left; }
.rp-tab thead th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.rp-tab small { color: var(--muted); }
.rely__track { border-left: 3px solid var(--rc); background: var(--surface-3); border-radius: 8px; padding: 9px 12px; margin: 0 0 10px; }
.rely__track b { display: block; font-size: 13px; margin-bottom: 3px; }
.rely__track p { margin: 0 0 4px; color: var(--text); font-size: 13px; }
.rely__track a { font-size: 12.5px; color: var(--accent); }
.rely__track--worse, .rely__track--same { --rc: var(--warn); }
.rely__track--better { --rc: var(--pos); }
.vf__probs { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; }
.vf__probs > div { flex: 1 1 130px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.vf__probs b { display: block; font-size: 20px; }
.vf__probs small { color: var(--muted); }
.vf__sens table { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.vf__sens th, .vf__sens td { padding: 5px 9px; border: 1px solid var(--border); text-align: right; }
.vf__sens td.is-base { font-weight: 700; background: var(--surface-3); }
.rely__hist { font-size: 12px; color: var(--muted); }

/* Cône de probabilité et calculateur de position */
.fc__lead { margin: 0 0 8px; font-size: 13.5px; color: var(--muted); }
.cone { width: 100%; height: auto; display: block; }
.cone__b80 { fill: var(--accent); opacity: .16; }
.cone__b50 { fill: var(--accent); opacity: .3; }
.cone__px { stroke: var(--text); stroke-width: 1.3; stroke-dasharray: 3 3; }
.cone__grid { stroke: var(--border); stroke-width: 1; }
.cone__lab, .cone__val { fill: var(--muted); font-size: 10px; }
.cone__legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin: 4px 0 6px; }
.cone__legend .lg { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 5px; background: var(--accent); }
.cone__legend .lg--b80 { opacity: .25; } .cone__legend .lg--b50 { opacity: .55; }
.cone__tab table { font-size: 12.5px; }
.sz__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 10px; }
.sz__f span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.sz__f div { display: flex; align-items: center; gap: 4px; }
.sz__f input { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.sz__f em { font-style: normal; color: var(--muted); font-size: 12px; }
.sz__big small { display: block; color: var(--muted); font-size: 12px; }
.sz__big b { font-size: 28px; letter-spacing: -.02em; margin-right: 8px; }
.sz__list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: 13px; }
.sz__warn, .sz__err { color: var(--warn); font-size: 12.5px; }

/* ---- Page Marché ---- */
.mk-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 860px) { .mk-grid { grid-template-columns: 1fr; } }
#marketPage .card, #comparePage .card { margin-bottom: 16px; }
#watchPage .card, #watchCal .card, #watchExtra .card { margin-bottom: 16px; }
#watchBody, #watchCal { margin-top: 16px; }
#watchCal:empty { margin-top: 0; }
.mk-grid .card { margin-bottom: 0; }
.mk-verdict__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.mk-verdict__head .badge { font-size: 15px; padding: 5px 12px; }
.mk-points { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 6px; }
.mk-tab table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mk-tab th, .mk-tab td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
.mk-tab th:first-child, .mk-tab td:first-child { text-align: left; }
.mk-tab thead th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.mk-row { cursor: pointer; }
.mk-row:hover, .mk-row:focus-visible { background: var(--surface-2); outline: none; }
.mk-spark { width: 90px; }
.mk-spark .spark { display: block; width: 84px; height: 28px; }
.mk-tab tr.is-now { background: var(--accent-soft); }
.mk-now { margin-left: 8px; font-size: 11px; }
.mk-h3 { font-size: 14px; margin: 14px 0 6px; }
.mk-vix__big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.mk-vix__big small { color: var(--muted); }
.mk-vix__big b { font-size: 34px; }
.mk-gauge { position: relative; height: 10px; border-radius: 6px; margin: 12px 0 6px; background: linear-gradient(90deg, var(--pos) 0, var(--warn) 60%, var(--neg) 100%); opacity: .85; }
.mk-gauge i { position: absolute; top: -4px; width: 4px; height: 18px; border-radius: 2px; background: var(--text); transform: translateX(-2px); }
.warn { color: var(--warn); }

/* ---- Comparateur ---- */
.cmp-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cmp-add input { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); min-width: 200px; }
.cmp-table th, .cmp-table td { text-align: right; }
.cmp-table th:first-child { text-align: left; color: var(--muted); font-weight: 600; }
.cmp-h { text-align: right; vertical-align: top; position: relative; padding-right: 22px !important; }
.cmp-name { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.cmp-h small { display: block; }
.cmp-x { position: absolute; top: 2px; right: 2px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
.cmp-best { background: var(--pos-soft); font-weight: 700; }
.cmp-chart { width: 100%; height: auto; max-height: 300px; }
.cmp-grid { stroke: var(--border); stroke-width: 1; }
.cmp-base { stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 1; }
.cmp-lab { fill: var(--muted); font-size: 10.5px; }
.cmp-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.cmp-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.cmp-corr td, .cmp-corr th { text-align: center !important; }

/* ---- Alertes ---- */
#alertBar:empty { display: none; }
.alertbar { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; }
.alertbar__t { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--warn); margin-bottom: 6px; }
.alertbar ul, .wl-chg__list, .al__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.alertbar li, .al__list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.alertbar__open { background: none; border: 0; padding: 2px 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.alertbar__open:hover { text-decoration: underline; }
.alertbar__x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 4px; }
.al__form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.al__form select, .al__val input { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); }
.al__val { display: flex; align-items: center; gap: 6px; }
.al__val input { width: 96px; }
.wl-chg { margin-bottom: 16px; }
.wl-chg__n { margin-top: 10px; }
.wl-chg .chip { margin-top: 8px; }

/* ---- Screener ---- */
.sc-presets { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.sc-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sc-grid select { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); width: 100%; }
.sc-chk { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 14px; }
#screenerPage .card, #portfolioPage .card { margin-bottom: 16px; }

/* ---- Portefeuille ---- */
.pf-table th.rk-num, .pf-table td.rk-num { text-align: center !important; }
.pf-table .rk-score { display: inline-flex; justify-content: center; }
.pf-sym { position: relative; }
.pf-add select, .pf-add input[type=date] { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.pf-add input[type=date] { width: 150px; }
.pf-sym input { width: 260px; }
.pf-sug { z-index: 30; top: calc(100% + 4px); left: 0; right: auto; width: min(420px, 90vw); }
.pf-msg { margin: 0 0 10px; color: var(--warn); font-size: 14px; }
.pf-add input { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); width: 150px; }
.pf-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.pf-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.pf-kpi small { color: var(--muted); }
.pf-kpi b { font-size: 22px; }
.pf-kpi span { color: var(--muted); font-size: 12.5px; }
.pf-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin-bottom: 8px; background: var(--surface-2); }
.pf-bar i { display: block; height: 100%; }
.pf-al--warn::marker { color: var(--warn); }
.pf-al--bull::marker { color: var(--pos); }

/* ---- Calendrier ---- */
.cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cal-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-d { width: 62px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- Risque et historique ---- */
.rk2-tiles { margin-bottom: 8px; }
.rk2-uw { width: 100%; height: auto; max-height: 160px; display: block; }
.rk2-uw__a { fill: color-mix(in srgb, var(--neg) 28%, transparent); stroke: var(--neg); stroke-width: 1.2; }
.rk2-uw__z { stroke: var(--muted); stroke-width: 1; }
.rk2-uw__g { stroke: var(--border); stroke-dasharray: 3 4; }
.rk2-uw__l { fill: var(--muted); font-size: 10px; }
.rk2-seas { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
@media (min-width: 900px) { .rk2-seas { grid-template-columns: repeat(12, 1fr); } }
.rk2-seas__c { border-radius: 8px; padding: 6px 4px; text-align: center; display: grid; gap: 1px; border: 1px solid var(--border); }
.rk2-seas__c small { color: var(--muted); font-size: 11px; }
.rk2-seas__c b { font-size: 12.5px; }
.rk2-seas__c span { font-size: 10.5px; color: var(--muted); }
.rk2-years { display: flex; gap: 6px; align-items: flex-end; overflow-x: auto; padding-bottom: 4px; }
.rk2-years__c { display: grid; gap: 2px; text-align: center; min-width: 46px; flex: 1; }
.rk2-years__bar { height: 70px; display: flex; align-items: flex-end; justify-content: center; }
.rk2-years__bar i { display: block; width: 70%; border-radius: 3px 3px 0 0; }
.rk2-years__bar i.up { background: var(--pos); }
.rk2-years__bar i.dn { background: var(--neg); }
.rk2-years__c b { font-size: 11.5px; }
.rk2-years__c small { color: var(--muted); font-size: 11px; }

/* ---- Secteurs ---- */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sec { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: grid; gap: 2px; text-align: left; cursor: pointer; font: inherit; color: var(--text); background: var(--surface); }
.sec small { color: var(--muted); }
.sec b { font-size: 18px; }
.sec span { font-size: 12px; color: var(--muted); }
.sec--up2 { background: color-mix(in srgb, var(--pos) 24%, var(--surface)); }
.sec--up1 { background: color-mix(in srgb, var(--pos) 11%, var(--surface)); }
.sec--dn1 { background: color-mix(in srgb, var(--neg) 11%, var(--surface)); }
.sec--dn2 { background: color-mix(in srgb, var(--neg) 24%, var(--surface)); }

/* ---- Briefing d'accueil ---- */
.brief { margin: 28px 0 28px; position: relative; overflow: hidden; --bc: var(--accent); }
.brief::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--bc); }
.brief--bull { --bc: var(--pos); } .brief--bear { --bc: var(--neg); } .brief--warn { --bc: var(--warn); }
.brief .card__head { padding-left: 22px; }
.brief .card__body { padding-left: 22px; display: grid; gap: 16px; }
.brief__time { margin-left: 10px; font-weight: 400; color: var(--muted); font-size: 12px; }
.brief__lead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; }
.brief__verdict { display: flex; align-items: center; gap: 8px; }
.brief__verdict small { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 600; }
.brief__verdict b { font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.brief__verdict .badge { font-size: 14px; padding: 4px 11px; }
.brief__points { flex: 1 1 100%; list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; }
.brief__points li { position: relative; padding-left: 18px; line-height: 1.45; }
.brief__points li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--bc); }
.brief__idx { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.brief__tile { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--text); cursor: pointer; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; transition: border-color .15s, transform .15s; }
.brief__tile:hover, .brief__tile:focus-visible { border-color: var(--accent); outline: none; transform: translateY(-1px); }
.brief__tile small { color: var(--muted); font-weight: 600; }
.brief__tile b { font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.brief__tile span { color: var(--muted); font-size: 12px; }
.brief__events { border-top: 1px solid var(--border); padding-top: 14px; }
.brief__events .cal-list { margin-top: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 24px; }

/* ---- Page Marché : tableau historique et lecture ---- */
.mk-hist table { table-layout: fixed; min-width: 680px; }
.mk-hist col.c-lab { width: 27%; }
.mk-hist col.c-hit { width: 21%; }
.mk-hist th, .mk-hist td, .mk-hist thead th { text-align: right; vertical-align: middle; padding: 10px 12px; }
.mk-hist th:first-child, .mk-hist td:first-child, .mk-hist thead th:first-child { text-align: left; }
.mk-hist tbody th { font-weight: 700; white-space: normal; }
.mk-lab { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.mk-hist .mk-now { margin-left: 0; }
.mk-n { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 6px; }
.mk-few { font-size: 11px; color: var(--warn); }
.mk-hit { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.mk-bar { display: inline-block; width: 44px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.mk-bar u { display: block; height: 100%; background: var(--pos); text-decoration: none; }
.mk-legend { margin: 4px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; display: grid; gap: 3px; }
.mk-read { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 24px; }
.mk-read__i { border-left: 3px solid var(--accent-soft); padding-left: 12px; }
.mk-read__i b { font-size: 13.5px; }
.mk-read__i p { margin: 4px 0 0; line-height: 1.5; }

/* ---- Impression / PDF ---- */
@media print {
  .topbar, .tabbar, .skip, #alertBar, .asset-head__tools, .vtabs, #assetNav, .toolbar, #toolbar, .footer, footer, #sizerCard, #alertCard, #watchExtra, .iconbtn, .favbar { display: none !important; }
  body { background: #fff !important; }
  .card { box-shadow: none !important; break-inside: avoid; border: 1px solid #ccc !important; }
  .wrap { max-width: none !important; padding: 0 !important; }
  a { color: inherit !important; text-decoration: none !important; }
}

/* Avertissement réglementaire (lecture technique) : plus visible qu'une mention discrète */
.disclaimer--strong { padding: 10px 12px; border: 1px solid var(--border, rgba(127,127,127,.35)); border-left: 3px solid var(--warn, #b7791f); border-radius: 8px; line-height: 1.5; }

/* Profil de risque */
.rp__top { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rp__top small, .rp__s small { display: block; font-size: 12px; color: var(--muted); }
.rp__lvl { font-size: 26px; line-height: 1.1; }
.rp__stats { display: flex; gap: 14px; flex-wrap: wrap; }
.rp__s b { font-size: 15px; }
.rp__tab { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.rp__tab th, .rp__tab td { padding: 6px 4px; border-bottom: 1px solid rgba(127,127,127,.2); font-variant-numeric: tabular-nums; }
.rp__tab th:first-child { text-align: left; width: 22%; }
.rp__tab th.num, .rp__tab td.num { text-align: right; }
.rp__tab thead th { font-size: 12px; color: var(--muted); font-weight: 600; }
.rp__proof { margin: 10px 0 0; font-size: 13px; line-height: 1.5; }


/* ===== Espace membre : en-tête, invitation à s'inscrire, encart « réservé aux membres » ===== */
.topbar__in { align-items: center; }
.topbar__actions { align-items: center; gap: 6px; padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--border); }
.topbar__actions form.inline { display: contents; margin: 0; }
.topbar__actions button.iconbtn { font: inherit; cursor: pointer; }
.search { min-width: 200px; }
/* Boutons d'action : icônes seules (libellé en infobulle), sauf « Connexion » et le bouton d'inscription. */
.topbar__actions .iconbtn:not(.hdr-login) span:not(#themeIco) { display: none; }
.hdr-login { padding: 0 12px; }
.btn--sm { height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; white-space: nowrap; }
.hdr-join .short { display: none; }
.btn--sm.btn--primary { box-shadow: none; }
.who { display: none; }
.join { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px clamp(18px, 3vw, 36px); margin: 8px 0 26px;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); }
.join h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin: 8px 0 8px; letter-spacing: -.01em; }
.join p { margin: 0 0 14px; }
.join__note { font-size: .86rem; margin: 12px 0 0 !important; }
.join__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.join__list li { position: relative; padding: 10px 12px 10px 38px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .94rem; }
.join__list li::before { content: ""; position: absolute; left: 12px; top: 13px; width: 16px; height: 16px; border-radius: 50%; background: var(--pos-soft);
  box-shadow: inset 0 0 0 2px var(--pos); }
.join__list li::after { content: ""; position: absolute; left: 17px; top: 17px; width: 5px; height: 8px; border: solid var(--pos); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(.8); }
.welcome { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; padding: 14px 18px; margin: 8px 0 22px; }
.welcome__links { display: flex; gap: 8px; flex-wrap: wrap; }
.gate { margin: 8px 0; }
.gate__body { text-align: center; padding: 28px 18px; }
.gate__body h2 { margin: 0 0 6px; font-size: 1.2rem; }
.gate__cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 860px) {
  .join { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 760px) {
  .topbar__actions { padding-left: 0; margin-left: auto; border-left: 0; gap: 6px; }
  .topbar__actions .iconbtn, .topbar__actions .btn--sm { height: 38px; }
  .topbar__actions .iconbtn:not(.hdr-login) { width: 38px; min-width: 38px; }
  .hdr-login { background: transparent !important; width: auto !important; padding: 0 8px !important; }
  .hdr-login span { display: inline !important; font-weight: 600; }
  .hdr-login .ico { display: none; }
  .btn--sm { padding: 0 14px; border-radius: 12px; }
  .hdr-join .long { display: none; }
  .hdr-join .short { display: inline; }
}
@media (max-width: 520px) {
  #btnGlossary { display: none; }
}

/* Bureau : barre compacte pour laisser sa place à la recherche */
@media (min-width: 861px) {
  .topbar__in { gap: 12px; }
  .tabbar { gap: 0; }
  .tabbar .iconbtn { padding: 0 8px; gap: 6px; }
  .tabbar .iconbtn span { font-size: 13.5px; }
  .search { min-width: 240px; margin-left: 4px; }
}
@media (min-width: 861px) and (max-width: 1240px) {
  .tabbar .iconbtn span { display: none; }
  .tabbar .iconbtn { padding: 0 10px; }
}
.rk-cat { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
/* Risque et historique : en-têtes alignés comme les chiffres (à droite), sauf la 1re colonne */
.rk2 .mk-tab thead th:not(:first-child) { text-align: right; }

/* Marché : cycle du halving du bitcoin */
.hv { margin: 14px 0 18px; }
.hv-marks { position: relative; height: 18px; }
.hv-mark { position: absolute; transform: translateX(-50%); font-size: 12px; font-style: normal; line-height: 1; }
.hv-mark--peak { color: var(--warn); }
.hv-mark--low { color: var(--pos); }
.hv-mark--cur { color: var(--neg); }
p .hv-mark, .hv-leg .hv-mark { position: static; transform: none; }
.hv-track { position: relative; display: flex; height: 46px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.hv-seg:first-child { border-radius: 9px 0 0 9px; } .hv-seg:nth-last-child(3) { border-radius: 0 9px 9px 0; }
.hv-fill { border-radius: 9px 0 0 9px; }
.hv-seg { display: flex; flex-direction: column; justify-content: center; padding: 0 8px; min-width: 0; border-right: 1px solid var(--border); position: relative; z-index: 1; }
.hv-seg:last-of-type { border-right: 0; }
.hv-seg small { font-size: 11.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv-seg span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.hv-fill { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 22%, transparent); z-index: 0; }
.hv-now { position: absolute; top: -1px; bottom: -1px; width: 3px; background: var(--accent); transform: translateX(-1.5px); z-index: 2; }
.hv-now b { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; white-space: nowrap; }
.hv-axis { display: flex; justify-content: space-between; margin-top: 30px; font-size: 12px; color: var(--muted); gap: 12px; }
.hv-leg { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.hv-stages { display: grid; gap: 8px; margin-bottom: 12px; }
.hv-stage { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.hv-stage.hv-stage--current { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.hv-stage summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.hv-badge--current { background: var(--accent-soft); color: var(--accent); }
.hv-stage__b { padding: 0 14px 12px; }
.hv-stage__b p { margin: 8px 0 0; }
@media (max-width: 640px) { .hv-seg span { display: none; } .hv-seg small { font-size: 10.5px; } }
.hv-stage .mk-tab thead th:not(:first-child) { text-align: right; }
