/* gloppr·crypto — feuille de style
   Palette divergente validée (blue #2a78d6 ↔ red #e34948, midpoint gris).
   Les deux modes sont choisis, pas dérivés par inversion automatique. */

/* IBM Plex Sans — recommandée par la base UI/UX pour « banques, finance,
   assurance, investissement ». Hébergée localement, sous-ensemble latin :
   la règle de la maison interdit toute ressource externe au chargement, et
   un appel à Google Fonts trahirait aussi le visiteur. Trois graisses
   (~86 Ko au total). Piège corrigé le 4 août 2026 : les fichiers 600 et 700
   étaient des copies du Regular — tout le gras du site était synthétisé par
   le navigateur. Vérifier `usWeightClass` avant de remplacer un woff2.
   `swap` : le texte s'affiche immédiatement dans la police système. */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/plex-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/plex-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/plex-700.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --surface-1:      #fcfcfb;
  --surface-page:   #f9f9f7;
  --text-primary:   #0b0b0b;
  --text-secondary: #52514e;
  --text-muted:     #898781;
  --gridline:       #e1e0d9;
  --baseline:       #c3c2b7;

  /* Pôles divergents + midpoint neutre. */
  --pole-buy:       #2a78d6;
  --pole-sell:      #e34948;
  --pole-neutral:   #898781;
  --midpoint:       #f0efec;

  /* Échelle d'élévation (base UI/UX, « Dimensional Layering »). Quatre
     niveaux plutôt qu'un filet unique : sans profondeur, tous les blocs
     pèsent pareil et l'œil n'a aucun point d'entrée. */
  --elev-1: 0 1px 2px rgb(0 0 0 / .05), 0 1px 3px rgb(0 0 0 / .07);
  --elev-2: 0 2px 4px rgb(0 0 0 / .05), 0 4px 10px rgb(0 0 0 / .07);
  --elev-3: 0 4px 8px rgb(0 0 0 / .06), 0 12px 28px rgb(0 0 0 / .10);

  --radius: 10px;
  --font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --surface-1:      #1a1a19;
    --surface-page:   #0d0d0d;
    --text-primary:   #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted:     #898781;
    --gridline:       #2c2c2a;
    --baseline:       #383835;
    --pole-buy:       #3987e5;
    --pole-sell:      #e66767;
    --pole-neutral:   #898781;
    --midpoint:       #383835;
  --elev-1: 0 1px 2px rgb(0 0 0 / .5), inset 0 1px 0 rgb(255 255 255 / .03);
  --elev-2: 0 4px 12px rgb(0 0 0 / .55), inset 0 1px 0 rgb(255 255 255 / .04);
  --elev-3: 0 12px 32px rgb(0 0 0 / .6), inset 0 1px 0 rgb(255 255 255 / .05);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-1:      #1a1a19;
  --surface-page:   #0d0d0d;
  --text-primary:   #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted:     #898781;
  --gridline:       #2c2c2a;
  --baseline:       #383835;
  --pole-buy:       #3987e5;
  --pole-sell:      #e66767;
  --pole-neutral:   #898781;
  --midpoint:       #383835;
  --elev-1: 0 1px 2px rgb(0 0 0 / .5), inset 0 1px 0 rgb(255 255 255 / .03);
  --elev-2: 0 4px 12px rgb(0 0 0 / .55), inset 0 1px 0 rgb(255 255 255 / .04);
  --elev-3: 0 12px 32px rgb(0 0 0 / .6), inset 0 1px 0 rgb(255 255 255 / .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--surface-page);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- En-tête ---------- */

/* En-tête collant. `sticky` plutôt que `fixed` : l'élément garde sa place
   dans le flux, donc rien à compenser en haut de page et aucun saut au
   chargement. Le fond doit être opaque — le contenu défile dessous. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gridline);
  background: var(--surface-1);
  transition: box-shadow .18s ease;
}

/* Ombre portée seulement une fois décollé du haut : au repos, la barre doit
   rester à plat, sinon elle paraît flotter sur une page non défilée. */
.site-header.est-colle { box-shadow: var(--elev-2); }

/* Les ancres (#signaux, #methode) atterrissaient sous la barre : la réserve
   évite de scroller à la main après chaque clic. */
html { scroll-padding-top: 5.5rem; }

/* Écran bas : une barre collante mangerait trop de hauteur utile. */
@media (max-height: 480px) {
  .site-header { position: static; }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-mark { color: var(--pole-buy); }

/* Le symbole est en dégradé turquoise : lisible sur les deux thèmes, il ne
   demande aucune variante. Dimensions fixées en HTML pour réserver la place
   et éviter le décalage de mise en page au chargement. */
.brand-logo { display: block; width: 26px; height: 26px; object-fit: contain; }
.brand-accent { color: var(--text-muted); font-weight: 500; }

.site-header nav { display: flex; gap: 1.25rem; }

.site-header nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .9rem;
}

.site-header nav a:hover { color: var(--text-primary); }

/* Page courante : texte plein + soulignement bleu, sans décaler la ligne. */
.site-header nav a[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--pole-buy);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ---------- Sous-menu de l'espace personnel ----------
   Trois pages qui forment un même espace : une seule entrée dans la barre,
   le détail au déroulé. Le panneau s'ouvre au survol, au focus clavier
   (`:focus-within`) et au clic — cette dernière voie étant la seule qui
   existe au tactile. */

.nav-group { position: relative; display: inline-flex; }

.nav-group-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .9rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.nav-group-btn:hover { color: var(--text-primary); }

/* Section courante : même traitement que nav a[aria-current], pour que la
   barre ne parle qu'un seul langage. */
.nav-group-active .nav-group-btn {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--pole-buy);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.nav-submenu {
  position: absolute;
  top: calc(100% + .55rem);
  left: 0;
  z-index: 70;
  display: none;
  flex-direction: column;
  min-width: 12rem;
  padding: .35rem;
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgb(0 0 0 / .14);
}

.nav-group:hover .nav-submenu,
.nav-group:focus-within .nav-submenu,
.nav-group.is-open .nav-submenu { display: flex; }

/* Zone de rattrapage : sans elle, le curseur traverse le vide entre le bouton
   et le panneau, et le menu se referme en cours de route. */
.nav-group::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: .6rem;
}

.nav-submenu a {
  padding: .45rem .6rem;
  border-radius: 6px;
  font-size: .88rem;
  white-space: nowrap;
}

.nav-submenu a:hover { background: var(--midpoint); color: var(--text-primary); }

/* Dans le panneau, la page courante se marque par un fond, pas par un
   soulignement : trois entrées soulignées côte à côte deviennent illisibles. */
.nav-submenu a[aria-current="page"] {
  background: color-mix(in srgb, var(--pole-buy) 12%, transparent);
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
}

/* Barre d'onglets en tête des trois pages de l'espace. */

/* ---------- Interrupteur de thème ---------- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: -.35rem 0;              /* n'épaissit pas la barre de navigation */
  padding: 0;
  border: 1px solid var(--gridline);
  border-radius: 50%;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.theme-toggle:hover { color: var(--text-primary); border-color: var(--baseline); }

/* En clair on propose la lune (passer au sombre), en sombre le soleil. */
.theme-toggle .icon-sun { display: none; }

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .theme-toggle .icon-sun { display: block; }
  :root:where(:not([data-theme="light"])) .theme-toggle .icon-moon { display: none; }
}

:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Focus clavier ---------- */

/* Les champs de formulaire ont déjà leur style de focus ; ici, tout ce qui
   se navigue au clavier sans être un champ. */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--pole-buy);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- Structure ---------- */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.page-head { margin-bottom: 1.75rem; }

.page-head h1 {
  margin: 0 0 .35rem;
  font-size: 1.6rem;
  letter-spacing: -.02em;
}

.page-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: .92rem;
}

/* Note factuelle sous l'introduction : discrète, jamais promotionnelle. */
.page-head .page-note {
  margin-top: .45rem;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ---------- Landing institutionnelle (refonte du 3 août 2026) ----------
   Motif « Trust & Authority » : mission, preuve chiffrée, méthode, limites.
   Retenue assumée : pas de titre géant façon agence — une institution parle
   bas. L'échelle typographique reste bornée (clamp 2 → 3,1 rem), l'accent
   coloré est réservé au CTA et à un seul segment de titre. */

/* Le héros pose un fond distinct du reste de la page : sans lui, la landing
   n'était qu'une pile de blocs sur une surface uniforme, sans point d'entrée
   pour l'œil. Le dégradé reste très léger — on cherche une assise, pas un
   effet. */
.lp-hero {
  position: relative;
  max-width: 46rem;
  margin: 0 auto 4rem;
  padding: 3rem 1.5rem 3.25rem;
  text-align: center;
}

.lp-hero::before {
  content: '';
  position: absolute;
  inset: 0 -50vw;
  z-index: -1;
  background:
    radial-gradient(60% 80% at 50% 0%,
      color-mix(in srgb, var(--pole-buy) 7%, transparent), transparent 70%),
    var(--surface-1);
  border-bottom: 1px solid var(--gridline);
}

/* Héros en deux colonnes quand un graphique vedette est disponible : le
   produit se montre au lieu de se décrire. Sans données (cache vide), le
   héros retombe sur la version centrée d'origine — d'où la variante. */
.lp-hero.has-chart { max-width: 76rem; text-align: left; }

.lp-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2.5rem;
  align-items: center;
}

.lp-hero.has-chart .lp-lede,
.lp-hero.has-chart .lp-hook { margin-left: 0; margin-right: 0; }
.lp-hero.has-chart .lp-actions { justify-content: flex-start; }

/* Carte graphique vedette : mêmes conventions que partout — bleu monte,
   rouge descend, prix en mono. Le SVG est rendu côté serveur depuis le
   cache de clôtures, aucun script requis. */
.chart-card {
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-radius: var(--radius);
  box-shadow: var(--elev-2);
  padding: 1rem 1.1rem .55rem;
}

.chart-top { display: flex; align-items: center; gap: .6rem; }
.chart-top .chart-nom { font-weight: 700; line-height: 1.25; }
.chart-top .chart-sym { color: var(--text-muted); font-size: .78rem; }
.chart-px { margin-left: auto; text-align: right; }
.chart-px .chart-val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1.12rem;
}

.chart-svg { display: block; width: 100%; height: auto; margin-top: .35rem; }

.chart-meta {
  display: flex;
  align-items: center;
  gap: .9rem;
  flex-wrap: wrap;
  font-size: .74rem;
  color: var(--text-muted);
  padding-top: .5rem;
  margin-top: .3rem;
  border-top: 1px solid var(--gridline);
}
.chart-meta b { color: var(--text-secondary); font-weight: 600; }

.lp-eyebrow {
  margin: 0 0 1rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lp-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.2rem, 5.6vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 700;
}

.lp-title-accent { color: var(--pole-buy); }

.lp-lede {
  margin: 0 auto 2rem;
  max-width: 40rem;
  font-size: 1.02rem;
  line-height: 1.68;
  color: var(--text-secondary);
}

/* L'accroche : la seule phrase que le visiteur retiendra s'il ne lit rien
   d'autre. Filets au-dessus et en dessous plutôt qu'un encadré — un cadre
   se lit comme un avertissement. */
.lp-hook {
  margin: 0 auto 2rem;
  padding: .9rem 0;
  max-width: 38rem;
  border-top: 1px solid var(--gridline);
  border-bottom: 1px solid var(--gridline);
  font-size: .95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.lp-hook strong { color: var(--text-primary); }

.lp-actions {
  display: flex;
  gap: .7rem;
  justify-content: center;
  flex-wrap: wrap;
}

.lp-note {
  margin: 1rem 0 0;
  font-size: .78rem;
  color: var(--text-muted);
}

/* ---------- Bandeau de cours ----------
   Une ligne de tickers défilable sous l'en-tête, à la TradingView : logo,
   code, prix, variation. Défilement horizontal natif, pas d'animation —
   les cours sont relevés à heures fixes, un mouvement mentirait. */

.tape {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--surface-1);
  border-bottom: 1px solid var(--gridline);
  margin-bottom: 0;
}
.tape::-webkit-scrollbar { display: none; }

.tape a {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .85rem;
  flex: 0 0 auto;
  border-right: 1px solid var(--gridline);
  font-size: .8rem;
  text-decoration: none;
  color: inherit;
}
.tape a:hover { background: var(--midpoint); }
.tape .tape-sym { font-weight: 600; }
.tape .tape-px {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

/* Pastille de variation, partagée par le bandeau, la table et les tuiles. */
.pct-chip {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: .74rem;
  font-weight: 600;
  padding: .08rem .38rem;
  border-radius: 5px;
  white-space: nowrap;
}
.pct-chip.up   { color: var(--pole-buy);  background: color-mix(in srgb, var(--pole-buy) 12%, transparent); }
.pct-chip.down { color: var(--pole-sell); background: color-mix(in srgb, var(--pole-sell) 12%, transparent); }

/* Pastille de tonalité d'article (−10…+10) : même langage que .pct-chip.
   Rendue par tone_chip() seulement — ne pas la recomposer à la main. */
.tone-chip {
  display: inline-block;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: .72rem;
  font-weight: 700;
  padding: .08rem .4rem;
  border-radius: 5px;
  white-space: nowrap;
}
.tone-chip.tone-up   { color: var(--pole-buy);  background: color-mix(in srgb, var(--pole-buy) 12%, transparent); }
.tone-chip.tone-down { color: var(--pole-sell); background: color-mix(in srgb, var(--pole-sell) 12%, transparent); }
.tone-chip.tone-flat { color: var(--text-secondary); background: var(--midpoint); }
.tone-chip.tone-na   { color: var(--text-muted); border: 1px dashed var(--baseline); font-weight: 600; }

.why-news .tone-chip { margin-right: .4rem; min-width: 3.2em; text-align: center; }

/* ---------- Tête de section partagée ---------- */

.sec-head {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.sec-head h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.02em; }
.sec-head .sec-sub { font-size: .8rem; color: var(--text-muted); }
.sec-head .sec-more {
  margin-left: auto;
  font-size: .82rem;
  font-weight: 600;
  color: var(--pole-buy);
  text-decoration: none;
  white-space: nowrap;
}
.sec-head .sec-more:hover { text-decoration: underline; }

/* Pastille de fraîcheur : le seul point de couleur « vivante » de la page.
   Pas d'animation — un clignotement suggérerait un flux en temps réel, or
   les avis sont produits à heures fixes. */
.sec-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pole-buy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pole-buy) 18%, transparent);
}

/* ---------- Table des signaux (screener) ----------
   Le produit montré en table dense plutôt qu'en cartes : une ligne par
   actif, balayable, triable. Les colonnes de confort disparaissent sur
   petit écran (.col-opt), l'essentiel — actif, prix, 24 h, signal — reste. */

.screener-sec {
  margin-bottom: 3.5rem;
  scroll-margin-top: 3.5rem;   /* l'ancre #signaux ne colle pas à l'en-tête collant */
}

.screener {
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-radius: var(--radius);
  box-shadow: var(--elev-1);
  overflow-x: auto;
}

.screener table { width: 100%; border-collapse: collapse; font-size: .88rem; }

.screener th {
  text-align: left;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 600;
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--gridline);
  white-space: nowrap;
}

.screener td {
  padding: .55rem .9rem;
  border-bottom: 1px solid var(--gridline);
  vertical-align: middle;
}

.screener tbody tr { transition: background .12s ease; cursor: pointer; }
.screener tbody tr:hover { background: var(--midpoint); }
.screener tbody tr:last-child td { border-bottom: 0; }
.screener tr[hidden] { display: none; }

.scr-asset {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.scr-asset .scr-nom { font-weight: 600; }
.scr-asset .scr-code { color: var(--text-muted); font-size: .76rem; margin-left: .3rem; }

.screener td.num, .screener th.num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.scr-score { font-weight: 600; }

.scr-spark { display: block; }

.scr-conf { display: flex; align-items: center; gap: .5rem; min-width: 110px; }
.scr-conf .scr-conf-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--midpoint);
  overflow: hidden;
}
.scr-conf .scr-conf-bar i { display: block; height: 100%; border-radius: 2px; }
.scr-conf .scr-conf-val {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--text-secondary);
  min-width: 2.6em;
  text-align: right;
}

.scr-note {
  margin: .9rem 0 0;
  font-size: .82rem;
  color: var(--text-secondary);
}

/* ---------- Carte de marché ----------
   Tuiles teintées par la variation 24 h, aux pôles du site — bleu monte,
   rouge descend, jamais le vert/rouge d'ailleurs. L'intensité suit
   l'amplitude ; le chiffre reste, la couleur n'est qu'un renfort. */

.heat-sec { margin-bottom: 3.5rem; }

.heat {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .5rem;
}

.heat a {
  border-radius: 8px;
  padding: .65rem .75rem;
  border: 1px solid var(--gridline);
  background: var(--surface-1);
  display: flex;
  flex-direction: column;
  gap: .1rem;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.heat a:hover { transform: translateY(-2px); box-shadow: var(--elev-1); }
.heat .heat-sym { font-weight: 700; font-size: .85rem; display: flex; align-items: center; gap: .4rem; }
.heat .heat-pc {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: .78rem;
}

/* Trois usages concrets, avant toute explication de fonctionnement. */
.lp-uses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem 2rem;
  margin-bottom: 3.5rem;
}

.lp-uses article {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.25rem;
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-top: 2px solid var(--pole-buy);
  border-radius: var(--radius);
  box-shadow: var(--elev-1);
  transition: box-shadow .18s ease, transform .18s ease;
}

.lp-uses article:hover { box-shadow: var(--elev-3); transform: translateY(-2px); }

.lp-uses h3 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -.015em;
}

.lp-uses p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
}

.lp-uses-link {
  font-size: .83rem;
  font-weight: 600;
  color: var(--pole-buy);
  text-decoration: none;
}

.lp-uses-link:hover { text-decoration: underline; }

/* Bande de preuve : filets fins, chiffres en chasse fixe. Le grid s'adapte
   au nombre réel de cellules — une donnée absente retire la sienne. */
.lp-proof {
  margin: 0 0 3.5rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--gridline);
  border-bottom: 1px solid var(--gridline);
}

.lp-proof dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.4rem 1rem;
  margin: 0;
  text-align: center;
}

.lp-proof dt {
  font-family: var(--mono);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.lp-proof .lp-unit { font-size: .95rem; color: var(--text-muted); font-weight: 400; }

.lp-proof dd {
  margin: .4rem 0 0;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Méthode : titre de section centré, puis les quatre temps. */
.lp-method { margin-bottom: 3.5rem; }

.lp-method-head {
  max-width: 40rem;
  margin: 0 auto 1.8rem;
  text-align: center;
}

.lp-method-head h2 {
  margin: 0 0 .6rem;
  font-size: 1.5rem;
  letter-spacing: -.02em;
}

.lp-method-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: .92rem;
}

.lp-method .home-pipeline ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.6rem 2rem;
}

/* ---------- Vitrine d'actualités sur la landing ----------
   Le visuel est le logo de l'actif traité, pas une image d'article : aucune
   n'est stockée, et une photo d'illustration de presse crypto n'informe de
   toute façon jamais sur le contenu. */

.lp-news { margin-bottom: 3.5rem; }

.lp-news-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.lp-news-head h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.02em; }

.lp-news-head a {
  font-size: .85rem;
  font-weight: 600;
  color: var(--pole-buy);
  text-decoration: none;
  white-space: nowrap;
}

.lp-news-head a:hover { text-decoration: underline; }

.lp-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.lp-news-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-radius: var(--radius);
  box-shadow: var(--elev-1);
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}

.lp-news-card:hover { box-shadow: var(--elev-2); transform: translateY(-2px); }

/* Bandeau visuel : fond teinté à la couleur de marque de l'actif traité,
   logo centré. La teinte identifie l'actif, elle ne porte aucun sens
   directionnel — le ton de l'article, lui, reste chiffré à côté du code. */
.lp-news-visuel {
  flex: 0 0 auto;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-news-corps { min-width: 0; padding: .8rem 1rem 1rem; }

.lp-news-actifs {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .35rem;
  flex-wrap: wrap;
}

.lp-news-code {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-muted);
}


.lp-news-titre {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  text-decoration: none;
}

.lp-news-titre:hover { text-decoration: underline; }

.lp-news-resume {
  margin: .4rem 0 0;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.lp-news-meta {
  margin: .5rem 0 0;
  font-size: .72rem;
  color: var(--text-muted);
}

.lp-news-note {
  margin: 1.1rem 0 0;
  font-size: .78rem;
  color: var(--text-muted);
  max-width: 46rem;
}

/* Limites : le bloc de crédibilité. Filet à gauche plutôt qu'un cadre —
   une mise en garde encadrée se lit comme une alerte, or ce n'en est pas
   une : c'est une définition du périmètre. */
.lp-limits {
  margin-bottom: 3.5rem;
  padding: 1.6rem 0 1.6rem 1.5rem;
  border-left: 2px solid var(--baseline);
}

.lp-limits h2 {
  margin: 0 0 1.1rem;
  font-size: 1.25rem;
  letter-spacing: -.02em;
}

.lp-limits ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem 2.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-limits li {
  font-size: .89rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.lp-limits li strong { color: var(--text-primary); }

@media (max-width: 640px) {
  .lp-hero { margin-bottom: 2.5rem; }
  .lp-proof dt { font-size: 1.55rem; }
  .lp-limits { padding-left: 1rem; }
}

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

.home-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 2.5rem;
  align-items: start;
  margin: 1rem 0 2rem;
}

.home-intro h1 {
  margin: 0 0 .8rem;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -.02em;
  /* Autorise la pleine largeur du bloc, contrairement au h1 des pages internes. */
  max-width: 22ch;
}

.home-tagline {
  margin: 0 0 1.4rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 46ch;
}

.home-ctas { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.6rem; }

.home-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--gridline);
}

.home-stats dt {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -.01em;
}

.home-stats dd {
  margin: .1rem 0 0;
  font-size: .78rem;
  color: var(--text-muted);
}

.home-pipeline h2 { margin-top: 0; }

.home-pipeline ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.home-pipeline li {
  display: flex;
  gap: .8rem;
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.home-pipeline li strong { color: var(--text-primary); }

.step-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-top: .05rem;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--pole-buy) 45%, transparent);
  background: color-mix(in srgb, var(--pole-buy) 8%, transparent);
  color: var(--pole-buy);
}

.step-badge svg { width: .95rem; height: .95rem; }

/* L'aperçu marché en cartes sparklines (.home-market/.mkt-*) a été remplacé
   le 4 août 2026 par la carte de marché en tuiles (.heat) et les sparklines
   de la table screener — voir plus haut. */

/* Les limites assumées : le bloc le plus important de la page, pas le plus
   voyant. Trois faits, sans pictogramme ni couleur d'alerte. */
.home-truths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.home-truths > div {
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.home-truths h3 {
  margin: 0 0 .4rem;
  font-size: .85rem;
  letter-spacing: .01em;
}

.home-truths p {
  margin: 0;
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

@media (max-width: 860px) {
  .home-hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .home-truths { grid-template-columns: 1fr; }
  .home-intro h1 { font-size: 1.6rem; }
}

/* La grille de cartes d'actifs (.asset-grid/.asset-card) a été remplacée le
   4 août 2026 par la table screener (.screener) — le score et le résumé du
   modèle restent lisibles sur la fiche de chaque actif. */

.asset-symbol {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
  font-family: var(--mono);
  letter-spacing: .02em;
}

.change-up   { color: var(--pole-buy); }
.change-down { color: var(--pole-sell); }

/* ---------- Badge de signal ----------
   La couleur double toujours un libellé et une flèche : jamais seule. */

.signal-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .28rem .6rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.sig-buy {
  color: var(--pole-buy);
  border-color: color-mix(in srgb, var(--pole-buy) 40%, transparent);
  background: color-mix(in srgb, var(--pole-buy) 10%, transparent);
}

.sig-sell {
  color: var(--pole-sell);
  border-color: color-mix(in srgb, var(--pole-sell) 40%, transparent);
  background: color-mix(in srgb, var(--pole-sell) 10%, transparent);
}

.sig-neutral {
  color: var(--text-secondary);
  border-color: var(--baseline);
  background: var(--midpoint);
}

.signal-arrow { font-size: .7rem; }

/* Confiance sous 50 % : le badge se fait discret — fond retiré, trait
   pointillé. Le doute du modèle doit se voir, pas se deviner. */
.sig-low {
  background: transparent;
  border-style: dashed;
  opacity: .75;
}

/* ---------- Filtre et tri de la table des signaux ---------- */

.grid-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}

.filter-group { display: flex; flex-wrap: wrap; gap: .4rem; }

.chip {
  padding: .3rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--gridline);
  background: var(--surface-1);
  color: var(--text-secondary);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}

.chip:hover { color: var(--text-primary); border-color: var(--baseline); }

.chip.is-active {
  color: var(--text-primary);
  border-color: var(--baseline);
  background: var(--midpoint);
  font-weight: 600;
}

.sort-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-secondary);
}

.sort-label select {
  font: inherit;
  font-size: .82rem;
  color: var(--text-primary);
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-radius: 6px;
  padding: .3rem .5rem;
}

/* ---------- Page d'aide ----------
   Créée le 4 août 2026. Sobre : la page explique, elle ne vend pas. Les
   paramètres cités viennent du code réel — voir le commentaire de help.php. */

.help-toc {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 2rem;
}

.help-toc a {
  padding: .3rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--gridline);
  background: var(--surface-1);
  color: var(--text-secondary);
  font-size: .82rem;
  text-decoration: none;
}
.help-toc a:hover { color: var(--text-primary); border-color: var(--baseline); }

.help-sec { max-width: 46rem; margin-bottom: 3rem; scroll-margin-top: 3.5rem; }
.help-sec h2 { font-size: 1.3rem; letter-spacing: -.02em; margin: 0 0 .8rem; }
.help-sec p, .help-sec li { color: var(--text-secondary); line-height: 1.65; font-size: .92rem; }
.help-sec li { margin-bottom: .5rem; }
.help-sec strong { color: var(--text-primary); }
/* Sous-titres des pages légales : plus discrets que h2, sinon la politique de
   confidentialité se lit comme une succession de chapitres de même poids. */
.help-sec h3 {
  font-size: 1rem;
  letter-spacing: -.01em;
  margin: 1.6rem 0 .55rem;
  color: var(--text-primary);
}
.help-sec code {
  font-family: var(--mono);
  font-size: .86em;
  padding: .1em .35em;
  border-radius: 4px;
  background: var(--surface-1);
  border: 1px solid var(--gridline);
}
.help-mark { font-family: var(--mono); }

/* ---------- Macro ---------- */

.macro-graph {
  display: block;
  width: 100%;
  height: auto;
  margin: 1rem 0 1.25rem;
}

.macro-figures {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1.75rem;
  margin: 1.1rem 0 .3rem;
}
.macro-fig { display: flex; flex-direction: column; gap: .15rem; }
.macro-fig-val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--text-primary);
}
.macro-fig-lab {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.macro-fig-note {
  flex: 1 1 15rem;
  margin: 0;
  font-size: .8rem !important;
  color: var(--text-muted) !important;
}

/* Légende des deux fenêtres : le trait, pas une pastille pleine — c'est une
   courbe qu'il désigne, et la forme doit dire laquelle. */
.macro-key { display: inline-flex; align-items: center; gap: .35rem; margin-left: .9rem; }
.macro-swatch { display: inline-block; width: 15px; height: 0; border-top-width: 2px; border-top-style: solid; }
.macro-swatch-30 { border-top-color: var(--pole-buy); opacity: .75; }
.macro-swatch-90 { border-top-color: var(--text-muted); }

/* Verdict de mesure : un constat, pas un filtre cliquable — d'où une forme
   distincte de .chip, qui porte un état interactif. */
.macro-verdict {
  display: inline-block;
  padding: .12rem .5rem;
  border: 1px dashed var(--gridline);
  border-radius: 999px;
  font-size: .72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.help-card {
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: .8rem;
}
.help-card h3 { margin: 0 0 .4rem; font-size: .95rem; }
.help-card p { margin: 0; font-size: .88rem; }

.help-tablewrap { overflow-x: auto; margin: 1rem 0; }

.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-radius: var(--radius);
}
.help-table th {
  text-align: left;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: .55rem .8rem;
  border-bottom: 1px solid var(--gridline);
}
.help-table td { padding: .5rem .8rem; border-bottom: 1px solid var(--gridline); color: var(--text-secondary); }
.help-table tr:last-child td { border-bottom: 0; }
.help-table td.num, .help-table th.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.help-gloss { margin: 0; }
.help-gloss dt {
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1rem;
  font-size: .92rem;
}
.help-gloss dd {
  margin: .2rem 0 0;
  color: var(--text-secondary);
  font-size: .88rem;
  line-height: 1.6;
}

/* ---------- Page « Why this call » ---------- */

/* Le repli technique se signale avant tout le reste : expliquer un
   raisonnement qui n'a pas eu lieu serait le défaut central de cette page. */
.why-fallback { border-left: 3px solid var(--pole-neutral); }

.why-link {
  margin-left: .6rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--pole-buy);
  text-decoration: none;
  white-space: nowrap;
}
.why-link:hover { text-decoration: underline; }

.why-derive { color: var(--text-muted); font-size: .8em; }

.why-news { list-style: none; margin: 0 0 1rem; padding: 0; }
.why-news li { padding: .7rem 0; border-bottom: 1px solid var(--gridline); }
.why-news li:last-child { border-bottom: 0; }
.why-news a { color: var(--text-primary); font-weight: 600; text-decoration: none; font-size: .92rem; }
.why-news a:hover { text-decoration: underline; }

/* (rendu de tonalité remplacé par tone_chip() le 4 août 2026) */

.why-news-resume { margin: .25rem 0 0; font-size: .84rem; color: var(--text-secondary); }
.why-news-meta { margin: .25rem 0 0; font-size: .74rem; color: var(--text-muted); }

/* Sankey de réallocation (why-strategy.php). Aucune teinte propre : les
   rubans reprennent les pôles du site, la légende ne fait que les rappeler. */
.strat-sankey { display: block; width: 100%; height: auto; margin: .6rem 0 .3rem; }

.sankey-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem 1.1rem;
  margin: 0 0 .8rem;
  font-size: .78rem;
  color: var(--text-muted);
}
.sk-key {
  display: inline-block;
  width: .8rem;
  height: .55rem;
  border-radius: 2px;
  margin-right: .3rem;
  vertical-align: -1px;
}
/* Sankey d'évolution (history.php) : deux catégories de nœuds seulement —
   exposé ou stable. Huit teintes d'actifs ont échoué au validateur. */
.hebdo-sankey { display: block; width: 100%; height: auto; margin: .6rem 0 .4rem; }

/*
 * Remplissages des deux Sankey, en un seul endroit.
 *
 * Les opacités DIFFÈRENT d'un thème à l'autre, et c'est la raison d'être de
 * ces classes : portées par un attribut `opacity` dans le SVG, elles ne
 * pourraient pas varier. Mesuré au validateur du skill dataviz plutôt que
 * jugé à l'œil — les valeurs calibrées sur le fond clair, composées sur le
 * fond sombre, donnaient des rubans à 2,1:1 de contraste et ΔE 14 entre
 * « vendu » et « conservé ». Aux valeurs ci-dessous, la paire vendu/acheté
 * passe les six contrôles dans les deux thèmes (ΔE normal 28,5 en clair,
 * 24,6 en sombre ; contraste ≥ 3:1).
 *
 * Le neutre « conservé » reste volontairement en dessous de 3:1 : ce n'est
 * pas une série pair des deux autres, c'est le fond sur lequel elles se
 * lisent. Le relief exigé dans ce cas est présent — code d'actif écrit à
 * chaque colonne et infobulle sur chaque ruban.
 */
.sk-r-keep, .sk-r-out, .sk-r-in,
.sk-n-line, .sk-n-pool, .sk-n-expo, .sk-n-stable { stroke: none; }

.sk-r-keep   { fill: var(--text-muted);   opacity: .28; }
.sk-r-out    { fill: var(--pole-sell);    opacity: .88; }
.sk-r-in     { fill: var(--pole-buy);     opacity: .88; }
.sk-n-line   { fill: var(--text-secondary); opacity: .75; }
.sk-n-pool   { fill: var(--text-primary); opacity: .8; }
.sk-n-expo   { fill: var(--pole-buy);     opacity: .85; }
.sk-n-stable { fill: var(--text-muted);   opacity: .6; }

/* `:where()` comme partout ailleurs dans ce fichier : sans lui la règle du
   thème système pèserait autant que le choix manuel, et l'utilisateur qui
   force le thème clair depuis un système sombre garderait ces opacités. */
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .sk-r-keep { opacity: .42; }
  :root:where(:not([data-theme="light"])) .sk-r-out,
  :root:where(:not([data-theme="light"])) .sk-r-in   { opacity: .82; }
  :root:where(:not([data-theme="light"])) .sk-n-pool { opacity: .85; }
}
:root[data-theme="dark"] .sk-r-keep { opacity: .42; }
:root[data-theme="dark"] .sk-r-out,
:root[data-theme="dark"] .sk-r-in   { opacity: .82; }
:root[data-theme="dark"] .sk-n-pool { opacity: .85; }

/* Puces de légende : mêmes teintes, en HTML. */
.sk-keep   { background: var(--text-muted); opacity: .28; }
.sk-out    { background: var(--pole-sell);  opacity: .88; }
.sk-in     { background: var(--pole-buy);   opacity: .88; }
.sk-expo   { background: var(--pole-buy);   opacity: .85; }
.sk-stable { background: var(--text-muted); opacity: .6; }

.help-sec-note { font-size: .8rem; color: var(--text-muted); }

/* ---------- Fiche détaillée ---------- */

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--gridline);
  margin-bottom: 1.5rem;
}

.detail-price {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 650;
  letter-spacing: -.02em;
}

.panel {
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.panel h2 {
  margin: 0 0 .9rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  font-weight: 620;
}

.panel p { margin: 0 0 .75rem; }
.panel p:last-child { margin-bottom: 0; }

.risk-list { margin: 0; padding-left: 1.1rem; color: var(--text-secondary); font-size: .9rem; }
.risk-list li { margin-bottom: .35rem; }

/* ---------- Table d'indicateurs ---------- */

.indicator-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.indicator-table th,
.indicator-table td {
  text-align: left;
  padding: .55rem .5rem;
  border-bottom: 1px solid var(--gridline);
}

.indicator-table th {
  color: var(--text-muted);
  font-weight: 550;
  width: 45%;
}

.indicator-table td {
  font-family: var(--mono);
  text-align: right;
  color: var(--text-primary);
}

.indicator-table tr:last-child th,
.indicator-table tr:last-child td { border-bottom: none; }

/* ---------- Graphique ---------- */

.chart-wrap { overflow-x: auto; }
.chart { display: block; width: 100%; height: auto; min-width: 280px; }
.chart-grid { stroke: var(--gridline); stroke-width: 1; }
.chart-zero { stroke: var(--baseline); stroke-width: 1; }
.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-label { fill: var(--text-muted); font-size: 10px; font-family: var(--font); }

/* ---------- Niveaux ---------- */

.levels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.level-box {
  border: 1px solid var(--gridline);
  border-radius: 8px;
  padding: .8rem;
}

.level-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .25rem;
}

.level-value { font-family: var(--mono); font-size: 1.05rem; font-weight: 600; }

/* ---------- États ---------- */

.empty-state {
  background: var(--surface-1);
  border: 1px dashed var(--baseline);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-secondary);
}

.empty-state h2 { margin: 0 0 .5rem; font-size: 1.1rem; color: var(--text-primary); }
.empty-state code {
  font-family: var(--mono);
  font-size: .82rem;
  background: var(--midpoint);
  padding: .15rem .4rem;
  border-radius: 4px;
}

.source-tag {
  display: inline-block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border: 1px solid var(--gridline);
  border-radius: 4px;
  padding: .1rem .35rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .875rem;
}

.back-link:hover { color: var(--text-primary); }

/* ---------- Pied de page ---------- */

.site-footer {
  border-top: 1px solid var(--gridline);
  background: var(--surface-1);
  padding: 1.75rem 1.5rem;
}

.disclaimer {
  max-width: 1120px;
  margin: 0 auto 1rem;
  font-size: .8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-meta {
  max-width: 1120px;
  margin: 0 auto;
  font-size: .75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  max-width: 1120px;
  margin: .55rem auto 0;
  font-size: .75rem;
}
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text-primary); text-decoration: underline; }

/* ---------- Prose ---------- */

.prose { max-width: 68ch; }
.prose h2 { font-size: 1.05rem; margin: 1.75rem 0 .6rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-secondary); margin: 0 0 .85rem; }
.prose ul { color: var(--text-secondary); padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose strong { color: var(--text-primary); }

@media (max-width: 560px) {
  main { padding: 1.5rem 1rem 2.5rem; }
  .levels { grid-template-columns: 1fr; }
  .detail-price { font-size: 1.6rem; }
}

/* ================= Backend : authentification & portefeuille ================= */

/* ---------- Formulaires ---------- */

.auth-wrap { max-width: 420px; margin: 2rem auto; }

.field { display: block; margin-bottom: 1rem; }

.field-label {
  display: block;
  font-size: .8rem;
  color: var(--text-secondary);
  margin-bottom: .3rem;
  font-weight: 550;
}

.field input[type="text"],
.field input[type="password"],
.field select {
  width: 100%;
  padding: .55rem .7rem;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface-page);
  border: 1px solid var(--baseline);
  border-radius: 8px;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--pole-buy);
  outline-offset: 1px;
  border-color: var(--pole-buy);
}

.btn {
  display: inline-block;
  padding: .58rem 1.1rem;
  font-size: .92rem;
  font-family: inherit;
  font-weight: 580;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary { background: var(--pole-buy); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-block { width: 100%; }

/* Bouton Google. Fond neutre et bordure visible dans les deux thèmes : le
   logo est multicolore, il ne peut pas porter le contraste tout seul. Les
   couleurs du logo sont imposées par Google — seule exception à la palette. */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  text-decoration: none;
  background: var(--surface);
  border-color: var(--gridline);
  color: var(--text-primary);
}
.btn-google:hover { background: var(--surface-alt, var(--surface)); border-color: var(--text-muted); }
.btn-google svg { flex: 0 0 auto; }

/* Séparateur « or » : un trait qui traverse, le mot posé dessus. */
.auth-sep {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.05rem 0;
  color: var(--text-muted);
  font-size: .8rem;
}
.auth-sep::before,
.auth-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gridline);
}

.btn-inline {
  background: none;
  border: 1px solid var(--gridline);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .8rem;
  padding: .2rem .45rem;
  margin-left: .3rem;
}

.btn-inline:hover { color: var(--pole-buy); border-color: var(--pole-buy); }

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: .1rem .35rem;
  border-radius: 5px;
}

.btn-icon:hover { color: var(--pole-sell); background: color-mix(in srgb, var(--pole-sell) 12%, transparent); }

/* ---------- Messages ---------- */

.alert {
  padding: .7rem .9rem;
  border-radius: 8px;
  font-size: .88rem;
  margin-bottom: 1rem;
  color: var(--pole-sell);
  border: 1px solid color-mix(in srgb, var(--pole-sell) 40%, transparent);
  background: color-mix(in srgb, var(--pole-sell) 8%, transparent);
}

.alert-ok {
  color: var(--pole-buy);
  border-color: color-mix(in srgb, var(--pole-buy) 40%, transparent);
  background: color-mix(in srgb, var(--pole-buy) 8%, transparent);
}

/* ---------- Chiffre principal ---------- */

.hero-panel { text-align: center; padding: 1.75rem 1.25rem; }

.hero-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  font-weight: 620;
  margin-bottom: .5rem;
}

.hero-value {
  font-family: var(--mono);
  font-size: 2.4rem;
  font-weight: 680;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.hero-unit { font-size: 1.1rem; font-weight: 500; color: var(--text-muted); }
.hero-meta { font-size: .8rem; color: var(--text-muted); margin-top: .5rem; }

/* Repères de stratégies sous l'axe du graphique : discrets au repos,
   francs au survol, colorés quand la courbe est affichée. */
.strat-marker { cursor: pointer; }

.strat-marker-dot {
  fill: var(--baseline);
  opacity: .8;
  transition: opacity .15s ease, fill .15s ease;
}

.strat-marker:hover .strat-marker-dot,
.strat-marker:focus .strat-marker-dot {
  fill: var(--text-secondary);
  opacity: 1;
}

/* La chaîne hebdomadaire : cercles, plus petits et plus resserrés que les
   losanges des stratégies ponctuelles — une série, pas des événements. */
.strat-marker-chain {
  fill: var(--baseline);
  opacity: .7;
  transition: opacity .15s ease, fill .15s ease;
}

.strat-marker:hover .strat-marker-chain,
.strat-marker:focus .strat-marker-chain {
  fill: var(--text-secondary);
  opacity: 1;
}

/* Puce de la politique hebdomadaire dans le panneau de comparaison. */
.tab-hebdo .tag { margin-left: .35rem; }

/* ---------- Positions en petits multiples ---------- */

.pos-note {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.pos-tri-demo {
  display: inline-block;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  vertical-align: middle;
}

.pos-tri-buy  { border-bottom: 8px solid var(--pole-buy); }
.pos-tri-sell { border-top: 8px solid var(--pole-sell); }

/* Pendant de la légende pour le retour au neutre. */
.pos-carre-demo {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--pole-neutral);
  vertical-align: middle;
}

/* Liste dépliable de toutes les recommandations d'une période. */
.reco-list { margin-top: 1rem; }

.reco-list summary {
  cursor: pointer;
  font-size: .82rem;
  color: var(--text-secondary);
}

.reco-list summary:hover { color: var(--text-primary); }

.reco-list .table-wrap { margin-top: .7rem; }

.reco-badge { font-size: .72rem; padding: .15rem .5rem; }

.pos-filter { margin-bottom: 1rem; }

.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.pos-card[hidden] { display: none; }

.pos-card {
  display: block;
  border: 1px solid var(--gridline);
  border-radius: var(--radius);
  padding: .9rem 1rem .7rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease;
}

.pos-card:hover { border-color: var(--baseline); }

.pos-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .6rem;
  margin-bottom: .5rem;
}

.pos-name { font-size: .88rem; font-weight: 620; }

.pos-perf { font-family: var(--mono); font-size: .85rem; font-weight: 600; }

.pos-spark { display: block; width: 100%; height: 88px; }

.pos-base {
  stroke: var(--baseline);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.pos-foot {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  margin-top: .4rem;
  font-size: .7rem;
  color: var(--text-muted);
}

/* Référence achat-conservation BTC : le rendement sans décision. */
.hero-btc {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .55rem;
  padding-top: .55rem;
  border-top: 1px dashed var(--gridline);
}

/* Variation ponctuelle d'une valeur rafraîchie. */
@keyframes tick-up   { from { color: var(--pole-buy); }  to { color: inherit; } }
@keyframes tick-down { from { color: var(--pole-sell); } to { color: inherit; } }
.tick-up   { animation: tick-up 1.2s ease-out; }
.tick-down { animation: tick-down 1.2s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .tick-up, .tick-down { animation: none; }
}

/* ---------- Dialogue de confirmation ----------
   `<dialog>` natif : le navigateur fournit le fond bloquant, le piège de
   focus, Échap et le retour du focus. On n'habille que l'apparence. */

.dlg {
  width: min(24rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: 1px solid var(--gridline);
  border-radius: var(--radius);
  background: var(--surface-1);
  color: var(--text-primary);
  box-shadow: var(--elev-3);
}

.dlg::backdrop { background: rgb(0 0 0 / .45); }

.dlg h2 {
  margin: 0 0 .6rem;
  font-size: 1.1rem;
  letter-spacing: -.015em;
}

.dlg-corps { margin: 0 0 1rem; font-size: .92rem; color: var(--text-secondary); }

.dlg-detail {
  margin: 0 0 1rem;
  padding: .7rem .85rem;
  background: var(--surface-page);
  border-radius: 8px;
  font-size: .82rem;
}

.dlg-detail > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.dlg-detail > div + div { margin-top: .3rem; }
.dlg-detail dt { color: var(--text-muted); }
.dlg-detail dd { margin: 0; font-weight: 550; }

.dlg-note {
  margin: 0 0 1.25rem;
  font-size: .76rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.dlg-actions {
  display: flex;
  gap: .6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Le bouton destructeur porte le rouge des ventes : le site n'a qu'un seul
   vocabulaire de couleur, on ne lui en invente pas un second. */
.btn-danger {
  background: var(--pole-sell);
  border: 1px solid var(--pole-sell);
  color: #fff;
}

.btn-danger:hover { filter: brightness(1.08); }

/* ---------- Sommaire du portefeuille ----------
   Valeur, évolution et répartition dans un seul panneau : trois informations
   qui se lisent ensemble occupaient auparavant deux panneaux et une pleine
   hauteur d'écran. */

.pf-sommaire {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.pf-sommaire-chiffre { min-width: 0; }

.pf-courbe { margin-top: 1.4rem; }

.pf-courbe-tete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .3rem;
  font-size: .78rem;
  color: var(--text-muted);
}

.pf-courbe-tete strong { font-family: var(--mono); font-size: .85rem; }

/* Hauteur fixe : la place est réservée avant le rendu, la page ne saute pas. */
.pf-courbe-svg { display: block; width: 100%; height: 68px; }

.pf-courbe-lien {
  display: inline-block;
  margin-top: .5rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--pole-buy);
  text-decoration: none;
}

.pf-courbe-lien:hover { text-decoration: underline; }

.pf-courbe-vide {
  margin: 1.2rem 0 0;
  font-size: .8rem;
  color: var(--text-muted);
}

/* Anneau : tracé en arcs par stroke-dasharray, sans bibliothèque. */
.pf-sommaire-anneau {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  min-width: 0;
}

.pf-anneau-wrap { position: relative; flex: 0 0 140px; }
.pf-anneau { display: block; width: 140px; height: 140px; }

.pf-anneau-centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.pf-anneau-n {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
}

.pf-anneau-lbl { font-size: .72rem; color: var(--text-muted); }

.pf-anneau-legende {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  flex: 1;
}

.pf-anneau-legende li {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .18rem 0;
  font-size: .8rem;
}

.pf-legende-nom {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-legende-pct {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--text-muted);
}

@media (max-width: 780px) {
  .pf-sommaire { grid-template-columns: 1fr; gap: 1.5rem; }
  .pf-sommaire-anneau { padding-top: 1.2rem; border-top: 1px solid var(--gridline); }
}

@media (max-width: 420px) {
  .pf-sommaire-anneau { flex-direction: column; align-items: flex-start; }
  .pf-anneau-legende { width: 100%; }
}

/* ---------- Répartition ---------- */

.alloc-bar {
  display: flex;
  height: 26px;
  border-radius: 6px;
  overflow: hidden;
  gap: 2px;               /* séparation nette entre segments */
  background: var(--midpoint);
}

.alloc-seg { min-width: 2px; }

.alloc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.1rem;
  margin-top: .8rem;
  font-size: .82rem;
  color: var(--text-secondary);
}

.legend-item { display: inline-flex; align-items: center; gap: .4rem; }

.legend-dot {
  width: 9px; height: 9px;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}

.legend-pct { color: var(--text-muted); font-family: var(--mono); font-size: .78rem; }

/* ---------- Table des positions ---------- */

.table-wrap { overflow-x: auto; }

.holdings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  min-width: 640px;
}

.holdings-table th {
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  font-weight: 600;
  padding: .5rem .55rem;
  border-bottom: 1px solid var(--gridline);
  white-space: nowrap;
}

.holdings-table td {
  padding: .65rem .55rem;
  border-bottom: 1px solid var(--gridline);
  vertical-align: middle;
}

.holdings-table tr:last-child td { border-bottom: none; }
.holdings-table .num { text-align: right; }
.holdings-table .mono { font-family: var(--mono); white-space: nowrap; }

.holding-name {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 570;
  display: block;
}

.holding-name:hover { color: var(--pole-buy); }

.qty-form { display: inline-flex; align-items: center; justify-content: flex-end; }

.qty-input {
  width: 8.5rem;
  padding: .28rem .45rem;
  font-family: var(--mono);
  font-size: .85rem;
  text-align: right;
  color: var(--text-primary);
  background: var(--surface-page);
  border: 1px solid var(--gridline);
  border-radius: 6px;
}

.qty-input:focus {
  outline: 2px solid var(--pole-buy);
  outline-offset: 1px;
  border-color: var(--pole-buy);
}

/* ---------- Lecture agrégée ---------- */

.assess-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.assess-score { font-size: .9rem; color: var(--text-secondary); }
.assess-score strong { font-family: var(--mono); color: var(--text-primary); }

/* ---------- Ajout ---------- */

.add-form {
  display: flex;
  align-items: flex-end;
  gap: .9rem;
  flex-wrap: wrap;
}

.field-inline { margin-bottom: 0; flex: 1 1 190px; }

/* ---------- Navigation utilisateur ---------- */

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-muted);
}

.nav-sep { color: var(--gridline); }

@media (max-width: 560px) {
  .hero-value { font-size: 1.9rem; }
  .add-form { flex-direction: column; align-items: stretch; }
  .field-inline { flex: 1 1 auto; }
}

/* ---------- Catalogue : recherche, filtres, pagination ---------- */

.filter-row {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: .9rem;
}

.search-input {
  flex: 1 1 260px;
  padding: .55rem .75rem;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface-page);
  border: 1px solid var(--baseline);
  border-radius: 8px;
}

.search-input:focus {
  outline: 2px solid var(--pole-buy);
  outline-offset: 1px;
  border-color: var(--pole-buy);
}

.btn-ghost {
  background: none;
  border: 1px solid var(--gridline);
  color: var(--text-secondary);
  text-decoration: none;
}

.btn-ghost:hover { border-color: var(--baseline); color: var(--text-primary); }

/* Action secondaire en fin de ligne de tableau : discrète, mais atteignable. */
.btn-mini {
  padding: .22rem .6rem;
  font-size: .74rem;
  white-space: nowrap;
}

.filter-tabs {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--gridline);
  padding-top: .8rem;
}

.tab {
  padding: .3rem .7rem;
  border-radius: 999px;
  font-size: .82rem;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid var(--gridline);
}

.tab:hover { border-color: var(--baseline); color: var(--text-primary); }

.tab-active {
  color: var(--pole-buy);
  border-color: color-mix(in srgb, var(--pole-buy) 45%, transparent);
  background: color-mix(in srgb, var(--pole-buy) 10%, transparent);
  font-weight: 570;
}

.tag {
  display: inline-block;
  font-size: .72rem;
  padding: .16rem .45rem;
  border-radius: 5px;
  border: 1px solid var(--gridline);
  color: var(--text-muted);
  white-space: nowrap;
}

.tag-analysed {
  color: var(--pole-buy);
  border-color: color-mix(in srgb, var(--pole-buy) 40%, transparent);
  background: color-mix(in srgb, var(--pole-buy) 8%, transparent);
}

.tag-owned {
  color: var(--text-primary);
  border-color: var(--baseline);
  background: var(--midpoint);
  font-weight: 550;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gridline);
}

.pager-info { font-size: .82rem; color: var(--text-muted); }

/* ---------- Graphique d'historique ---------- */

.chart-wrap { position: relative; }
.chart-history { min-width: 320px; }

.chart-cross {
  stroke: var(--baseline);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}

.chart-dot {
  fill: var(--surface-1);
  stroke: var(--pole-buy);
  stroke-width: 2.5;
  pointer-events: none;
}

.chart-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: var(--surface-1);
  border: 1px solid var(--baseline);
  border-radius: 8px;
  padding: .5rem .7rem;
  font-size: .8rem;
  line-height: 1.4;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
  white-space: nowrap;
}

.tip-date { color: var(--text-muted); font-size: .72rem; margin-bottom: .15rem; }
.tip-value { font-family: var(--mono); font-weight: 650; font-size: .95rem; }
.tip-delta { font-size: .75rem; font-weight: 550; margin-top: .1rem; }

.chart-foot {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: .8rem;
  padding-top: .8rem;
  border-top: 1px solid var(--gridline);
  font-size: .78rem;
  color: var(--text-muted);
}

.chart-foot strong { color: var(--text-primary); font-family: var(--mono); font-weight: 600; }

.source-badge {
  display: inline-block;
  font-size: .68rem;
  padding: .1rem .4rem;
  border-radius: 4px;
  border: 1px solid var(--gridline);
  color: var(--text-muted);
  margin-left: .4rem;
}

/* ---------- Actualités ---------- */

.news-list { list-style: none; margin: 0; padding: 0; }

.news-item {
  padding: .85rem 0;
  border-bottom: 1px solid var(--gridline);
}

.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: none; padding-bottom: 0; }

.news-title {
  display: block;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 570;
  font-size: .95rem;
  line-height: 1.4;
}

.news-title:hover { color: var(--pole-buy); }

.news-snippet {
  margin: .3rem 0 0;
  font-size: .84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .9rem;
  margin-top: .35rem;
  font-size: .74rem;
  color: var(--text-muted);
}

.news-meta span + span::before {
  content: "·";
  margin-right: .55rem;
  color: var(--gridline);
}

.news-compact .news-item { padding: .6rem 0; }
.news-compact .news-title { font-size: .88rem; }

/* ---------- Logos d'actifs ---------- */

.coin-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Lettre de repli, visible si l'image ne charge pas. */
.coin-letter {
  font-size: .68rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  user-select: none;
}

.coin-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface-1);
}

.coin-logo-none { background: var(--baseline) !important; }

/* Variante image locale : le PNG est déjà un disque, pas de fond ni de
   rognage à imposer. `object-fit` protège si un fichier non carré entre. */
.coin-img { object-fit: contain; background: transparent; }

.logo-link { display: inline-flex; text-decoration: none; }

/* Article avec logos : deux colonnes. */
.news-item-logo {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

.news-logos {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding-top: .1rem;
  flex-shrink: 0;
}

.news-body { flex: 1; min-width: 0; }

.news-meta .asset-symbol {
  display: inline;
  font-size: .7rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ---------- Voile d'attente ----------
   Une génération de stratégie dure une trentaine de secondes en POST
   synchrone : sans retour visuel la page paraît morte, et l'utilisateur
   soumet une seconde fois. Aucune barre de progression : le serveur ne
   renvoie rien avant la fin, une progression affichée serait inventée. */

.wait-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--surface-page) 86%, transparent);
  backdrop-filter: blur(3px);
}

.wait-overlay[data-open="1"] { display: flex; }

.wait-card {
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem 1.4rem;
  text-align: center;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .16);
}

.wait-spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 3px solid var(--gridline);
  border-top-color: var(--pole-buy);
  animation: wait-spin .9s linear infinite;
}

@keyframes wait-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .wait-spinner { animation-duration: 2.8s; }
}

.wait-card h2 {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-primary);
}

.wait-scope {
  margin: 0 0 1.1rem;
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.wait-steps {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: .8rem 0 0;
  border-top: 1px solid var(--gridline);
  text-align: left;
  font-size: .82rem;
  color: var(--text-secondary);
}

.wait-steps li {
  padding: .22rem 0 .22rem 1.05rem;
  position: relative;
  line-height: 1.45;
}

.wait-steps li::before {
  content: "·";
  position: absolute;
  left: .2rem;
  color: var(--baseline);
  font-weight: 700;
}

.wait-elapsed {
  margin: 0;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text-muted);
}

/* ---------- Tonalité d'un article ----------
   Échelle divergente de -10 à +10, neutre au centre. Le chiffre est toujours
   écrit à côté : la couleur ne porte jamais l'information seule. */

/* Un article promotionnel reste visible mais s'efface : il est écarté de
   l'analyse, le lecteur doit pouvoir le constater plutôt que le deviner. */
.news-item-promo .news-title,
.news-item-promo .news-snippet { color: var(--text-muted); }

.news-tag {
  display: inline-block;
  padding: .06rem .4rem;
  border-radius: 4px;
  border: 1px solid var(--gridline);
  background: var(--midpoint);
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Courbes de stratégies superposées à l'historique réel. */
.chart-line-alt { stroke-width: 1.6; stroke-dasharray: 5 3; opacity: .9; }
.chart-cut { stroke-width: 1.5; stroke-dasharray: 2 3; opacity: .7; }

/* ---------- Bannière comparative réel / hypothétique ---------- */

.hero-compare {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  padding: 1.5rem 1rem;
  text-align: left;
}

.hero-col {
  flex: 1 1 240px;
  min-width: 220px;
  padding: 0 1.5rem;
}

/* Séparateur entre colonnes, sans bordure sur la première. */
.hero-compare .hero-col + .hero-col {
  border-left: 1px solid var(--gridline);
}

.hero-compare .hero-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  justify-content: flex-start;
}

.hero-compare .hero-value { font-size: 1.9rem; }

.hero-diff {
  margin-top: .7rem;
  padding-top: .6rem;
  border-top: 1px solid var(--gridline);
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
}

.hero-diff-value {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 650;
}

.hero-diff-pts { font-size: .75rem; color: var(--text-secondary); }

.hero-strat-title {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .5rem;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .hero-compare { padding: 1.25rem .75rem; }
  .hero-compare .hero-col + .hero-col {
    border-left: 0;
    border-top: 1px solid var(--gridline);
    padding-top: 1.1rem;
    margin-top: 1.1rem;
  }
  .hero-compare .hero-value { font-size: 1.6rem; }
}

/* ---------- Sélection des lignes à analyser ---------- */

.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .55rem;
}

/* Tuile-bouton : la case à cocher reste dans l'arbre d'accessibilité mais
   l'état se lit sur la tuile entière — bordure, pastille, filigrane. */
.pick-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem .75rem;
  border: 1px solid var(--gridline);
  border-radius: 10px;
  cursor: pointer;
  background: var(--surface-page);
  overflow: hidden;
  user-select: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.pick-item:hover { border-color: var(--baseline); }

.pick-item input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* Filigrane : le logo en grand, débordant à droite, assez pâle pour ne pas
   gêner la lecture. S'il ne charge pas, il ne laisse aucune trace. */
.pick-fond {
  position: absolute;
  top: 50%;
  right: -14px;
  width: 74px;
  height: 74px;
  transform: translateY(-50%);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: .12;
  filter: grayscale(1);
  pointer-events: none;
}

/* Le contenu passe au-dessus du filigrane. */
.pick-item > .coin-logo,
.pick-body,
.pick-coche { position: relative; }

.pick-body { display: flex; flex-direction: column; min-width: 0; }
.pick-name { font-size: .85rem; font-weight: 570; }
.pick-meta { font-size: .72rem; color: var(--text-muted); font-family: var(--mono); }

/* Pastille d'état en bout de tuile : cercle vide ou coche pleine. */
.pick-coche {
  margin-left: auto;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1.5px solid var(--baseline);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  color: #fff;
  transition: background .15s ease, border-color .15s ease;
}

.pick-item:has(input:checked) {
  border-color: color-mix(in srgb, var(--pole-buy) 45%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pole-buy) 25%, transparent);
}
.pick-item:has(input:checked) .pick-fond { filter: none; opacity: .16; }
.pick-item:has(input:checked) .pick-coche {
  background: var(--pole-buy);
  border-color: var(--pole-buy);
}
.pick-item:has(input:checked) .pick-coche::after { content: "✓"; }

/* Ligne écartée : logo éteint, texte en retrait — l'état se voit sans lire. */
.pick-item:not(:has(input:checked)) .coin-logo { filter: grayscale(1); opacity: .55; }
.pick-item:not(:has(input:checked)) .pick-name { color: var(--text-secondary); }

/* La case étant masquée, le contour de focus clavier passe sur la tuile. */
.pick-item:has(input:focus-visible) {
  outline: 2px solid var(--pole-buy);
  outline-offset: 2px;
}

/* ---------- Infobulle de statistiques longues (page stratégie) ----------
   La mini-courbe dans le tableau est le déclencheur ; l'infobulle porte la
   courbe complète et les chiffres que les justifications citent. */

.stat-trigger {
  display: inline-flex;
  align-items: center;
  margin-top: .15rem;
  padding: .2rem .35rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.stat-trigger:hover, .stat-trigger[aria-expanded="true"] {
  color: var(--text-secondary);
  background: var(--midpoint);
}

.stat-pop {
  position: fixed;
  z-index: 60;
  width: 268px;
  padding: .8rem .9rem;
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgb(0 0 0 / .14);
}

.stat-pop-head {
  margin: 0 0 .5rem;
  font-size: .78rem;
  color: var(--text-secondary);
}

.stat-pop-spark {
  color: var(--text-secondary);
  border-bottom: 1px solid var(--gridline);
  padding-bottom: .5rem;
  margin-bottom: .5rem;
}

.stat-pop-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .22rem .8rem;
  margin: 0;
  font-size: .78rem;
}

.stat-pop-grid dt { color: var(--text-muted); }
.stat-pop-grid dd { margin: 0; text-align: right; }

/* ---------- Graphique unique des 180 jours (page stratégie) ----------
   Huit séries : l'identité passe par l'étiquette directe et la surbrillance,
   jamais par huit couleurs — la palette validée n'en offre pas autant. */

/* `relative` : référentiel de l'infobulle ancrée (.pos-tip-ancree). Sans
   décalage, il ne change rien au rendu des autres pages. */
.strat-chart { position: relative; }
.strat-chart svg { width: 100%; height: auto; display: block; }

.sc-grid   { stroke: var(--gridline); stroke-width: 1; }
.sc-zero   { stroke: var(--baseline); stroke-width: 1.2; }
.sc-ylab, .sc-xlab { fill: var(--text-muted); font-size: 10.5px; font-family: var(--mono); }

.sc-ligne {
  stroke: var(--text-secondary);
  stroke-width: 1.4;
  opacity: .55;
  transition: opacity .12s ease, stroke .12s ease;
}

/* Bande invisible large : cible de survol confortable sans épaissir le trait. */
.sc-hit { stroke: transparent; stroke-width: 12; cursor: pointer; }

.sc-lab {
  fill: var(--text-secondary);
  font-size: 10.5px;
  font-family: var(--mono);
  cursor: pointer;
}

/* Étiquette-lien vers la fiche de l'actif : soulignée au survol seulement,
   pour ne pas alourdir un graphique qui en porte huit. */
.sc-lab-lien { cursor: pointer; }
.sc-lab-lien:hover .sc-lab { text-decoration: underline; fill: var(--pole-buy); }
.sc-lab-lien:focus-visible { outline: 2px solid var(--pole-buy); outline-offset: 1px; }

.pos-liens {
  margin: .7rem 0 0;
  font-size: .78rem;
  color: var(--text-muted);
}

.pos-liens a { color: var(--text-secondary); }

/* Une courbe isolée : elle prend le bleu, les autres s'estompent. */
.sc-isole .sc-ligne          { opacity: .18; }
.sc-isole .sc-ligne.sc-actif { opacity: 1; stroke: var(--pole-buy); stroke-width: 2.2; }
.sc-isole .sc-lab            { opacity: .35; }
.sc-isole .sc-lab.sc-actif   { opacity: 1; fill: var(--pole-buy); font-weight: 700; }

.sc-curseur { stroke: var(--baseline); stroke-width: 1; stroke-dasharray: 3 3; }

/* Variante ancrée (history.php) : absolue dans le conteneur du graphique,
   elle défile avec lui — un élément `fixed` restait planté à l'écran après
   un défilement, au-dessus d'un contenu étranger. `pointer-events: none` :
   l'infobulle ne doit jamais intercepter la souris qu'elle suit. */
.pos-tip-ancree {
  position: absolute !important;
  pointer-events: none;
}

.strat-chart-tip {
  position: fixed;
  z-index: 60;
  display: grid;
  grid-template-columns: auto auto;
  gap: .1rem .7rem;
  padding: .55rem .7rem;
  background: var(--surface-1);
  border: 1px solid var(--gridline);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgb(0 0 0 / .14);
  font-size: .74rem;
  font-family: var(--mono);
  pointer-events: none;
}

.strat-chart-tip strong { grid-column: 1 / -1; font-family: var(--font); }
.strat-chart-tip span:nth-child(even) { text-align: right; }

.hero-warn {
  margin-top: .6rem;
  padding: .5rem .6rem;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--pole-sell) 35%, transparent);
  background: color-mix(in srgb, var(--pole-sell) 7%, transparent);
  font-size: .72rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.tip-alt {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--mono);
  font-size: .78rem;
  margin-top: .2rem;
  color: var(--text-secondary);
}

.zoom-info { color: var(--text-muted); }
#pf-hit { touch-action: pan-y; }

.alert-info {
  color: var(--text-secondary);
  border-color: var(--baseline);
  background: var(--midpoint);
}

.hero-strat-start {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .5rem;
  line-height: 1.4;
}

/* Mouvement réduit — les nouvelles cartes en relief. Les translations
   disparaissent, l'élévation reste : elle porte de l'information
   hiérarchique, pas de l'animation. Les deux règles existantes plus haut
   ne couvrent que les clignotements de cours et le voile d'attente. */
@media (prefers-reduced-motion: reduce) {
  .lp-uses article:hover,
  .lp-news-card:hover,
  .heat a:hover { transform: none; }
}

/* ---------- Refonte du 4 août 2026 : réactivité des nouveaux blocs ---------- */

@media (max-width: 960px) {
  .lp-hero-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .heat { grid-template-columns: repeat(3, 1fr); }
  /* Colonnes de confort de la table : 30 j, sparkline, score, confiance. */
  .screener .col-opt { display: none; }
}

@media (max-width: 480px) {
  .heat { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Couverture de presse contre cours (news.php) ----------
   Ajouté le 4 août 2026. Le graphique est descriptif : la mesure imprimée
   à côté dit que la tonalité colle au mouvement DÉJÀ survenu (+0,36 le jour
   même) et n'a aucun lien avec la suite (−0,02 le lendemain). Ne pas retirer
   ce tableau : sans lui, le dessin suggère l'inverse de ce qui est mesuré. */

.news-graph { display: block; width: 100%; height: auto; margin: .4rem 0 .2rem; }

.ng-lede {
  font-size: .87rem;
  color: var(--text-secondary);
  margin: 0 0 .3rem;
  max-width: 52rem;
  line-height: 1.6;
}

.ng-mesure {
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--gridline);
}

.ng-mesure-titre {
  margin: 0 0 .5rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 600;
}

.ng-verdict {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: .6rem 0 .4rem;
  max-width: 52rem;
}

.ng-verdict strong { color: var(--text-primary); }

.ng-note {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 52rem;
}

/* Deux sorties depuis la fiche d'une stratégie : l'atelier et l'inventaire. */
.detail-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: baseline;
  margin-bottom: .3rem;
}

/* ---------- Sélecteur de courbes de stratégies (history.php) ----------
   Refondu le 4 août 2026 : il occupait tout le haut de page avec quatorze
   pavés de titres. Les réelles restent visibles, les backtests passent
   derrière un <details> natif — replié par défaut, ouvert d'office si l'un
   d'eux est tracé. La ségrégation réel / rétrospectif est une exigence du
   produit, pas un choix graphique. */

.strat-picker {
  margin: .2rem 0 1rem;
  padding: .8rem .9rem;
  background: var(--midpoint);
  border-radius: var(--radius);
}

.sp-tete {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: .55rem;
}

.sp-titre {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 600;
}

.sp-reset {
  margin-left: auto;
  font-size: .76rem;
  color: var(--pole-buy);
  text-decoration: none;
  font-weight: 600;
}
.sp-reset:hover { text-decoration: underline; }

.sp-vide { font-size: .82rem; color: var(--text-muted); }

/* Puce de backtest : la date suffit à l'identifier, le titre complet vit
   dans l'infobulle. Trait pointillé — même langage que les avis
   reconstitués de la fiche actif : la forme dit « jamais émis en réel ». */
.tab-retro {
  border-style: dashed;
  font-family: var(--mono);
  font-size: .78rem;
}

.sp-retro { margin-top: .6rem; }

.sp-retro > summary {
  cursor: pointer;
  font-size: .8rem;
  color: var(--text-secondary);
  list-style-position: inside;
}
.sp-retro > summary::marker { color: var(--text-muted); }
.sp-retro > summary:hover { color: var(--text-primary); }

.sp-retro-note {
  color: var(--text-muted);
  font-size: .76rem;
}

.sp-note {
  margin: .7rem 0 0;
  font-size: .76rem;
  color: var(--text-muted);
  max-width: 46rem;
}

/* ---------- Réglages ---------- */

/* Case à cocher et son explication : la case reste native (accessibilité,
   focus clavier), c'est l'alignement qui est repris. */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  cursor: pointer;
  line-height: 1.45;
}
.check-row input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: .2rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--pole-buy);
  cursor: pointer;
}
.check-row strong { color: var(--text-primary); font-weight: 580; }

/* ---------------------------------------------------------------------------
   Barre « voir comme » : un administrateur regarde le site avec les yeux d'un
   autre compte. Fixée en bas plutôt qu'en haut — l'en-tête y est déjà collé, et
   deux éléments à `top: 0` se recouvrent. Aucun moyen de la masquer : c'est le
   seul indice que les chiffres à l'écran ne sont pas les siens.
   Teinte neutre volontaire : le bleu et le rouge du site portent un avis de
   marché, les recycler pour un état de session brouillerait ce langage.
   --------------------------------------------------------------------------- */
.view-as-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem 1rem;
  padding: .6rem 1rem;
  font-size: .85rem;
  color: var(--text-primary);
  background: var(--surface-1);
  border-top: 2px solid var(--text-muted);
  box-shadow: var(--elev-3);
}

.view-as-bar strong { font-weight: 600; }

.view-as-bar form { margin: 0; }

.view-as-bar button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: .3rem .8rem;
  border-radius: 6px;
  color: var(--surface-page);
  background: var(--text-primary);
  border: 1px solid var(--text-primary);
}

.view-as-bar button:hover { opacity: .85; }

/* Réserve de la hauteur de la barre : sans elle, la fin de chaque page passe
   dessous. Elle n'est rendue que pendant une observation. */
.view-as-reserve { height: 3.6rem; }

@media (max-width: 32rem) {
  .view-as-bar { font-size: .8rem; }
  .view-as-reserve { height: 5rem; }
}
