/* ==========================================================================
   Page Performance (/track-record/) — styles propres a la page.
   Bandeau KPI + Annual return + Cumulative return : porte du prototype de
   Jeremie (prefixe perf-). Regional trends et Large vs midcap retires
   (10/2026, demande du proprietaire). Les regles `body` sont portees par
   site.css.
   ========================================================================== */

.track-record-page {
  padding: 10px 0 40px 0;
}

/* Titre de page discret, comme le "Performance" du site actuel */
.tr-page-title {
  font-family: var(--font-titres);
  font-weight: 700;
  font-size: 2rem;
  color: var(--bleu);
  max-width: 1200px;
  margin: 25px auto 5px auto;
  padding: 0 10px;
}

/* Disclaimers sous les charts de perf (reference/blocks/track-record/disclaimers.md) */
.tr-disclaimers {
  font-family: 'Quattrocento Sans', sans-serif;
  font-style: italic;
  font-size: 12px;
  line-height: 1.5;
  color: #777;
  margin: 20px 0 0 0;
  padding-left: 20px;
}

.tr-disclaimers li {
  margin-bottom: 3px;
}

@media (max-width: 768px) {
  .tr-page-title {
    font-size: 1.4rem;
    margin-top: 15px;
  }
  .tr-disclaimers {
    font-size: 11px;
  }
}

/* ==========================================================================
   1-2. Bandeau KPI, Annual return, Cumulative return — porte du prototype
   de Jeremie (10/2026). Prefixe perf- ; aucune regle ne depend de
   .track-record-page.
   Scripts : assets/js/charts/perf-core.js, annualized.js,
   cumulative.js.
   ========================================================================== */

:root {
  --perf-navy: #000190;
  --perf-deep: #087f73;            /* turquoise-deep du prototype (chiffres benchmark) */
  --perf-muted: #6a6f8c;
  --perf-line: rgba(0, 1, 144, 0.12);
  --perf-line-80: rgba(0, 1, 144, 0.096);
  --perf-paper-soft: #f4faf8;
  --perf-shadow: 0 24px 70px -48px rgba(0, 1, 144, 0.42);
  --perf-tip-shadow: 0 2px 10px rgba(0, 1, 144, 0.13), 0 0 0 0.5px rgba(0, 1, 144, 0.06);
  --perf-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.perf-block {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
  box-sizing: border-box;
}

.perf-eyebrow {
  font-family: var(--font-titres);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.perf-display {
  font-family: var(--font-titres);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--perf-navy);
  font-variant-numeric: tabular-nums;
}
.perf-muted { color: var(--perf-muted); }
.perf-c-navy { color: var(--perf-navy); }
.perf-c-deep { color: var(--perf-deep); }
.perf-c-navy75 { color: rgba(0, 1, 144, 0.75); }
.perf-c-navy70 { color: rgba(0, 1, 144, 0.7); }
.perf-strong {
  font-family: var(--font-titres);
  font-weight: 600;
  color: rgba(0, 1, 144, 0.8);
  font-variant-numeric: tabular-nums;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Carte « surface » du prototype : ombre douce, liseré blanc interne,
   trait turquoise qui balaie le bord haut au survol */
.perf-card {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--perf-line);
  box-shadow: var(--perf-shadow);
  box-sizing: border-box;
  transition: border-color 0.3s var(--perf-ease), box-shadow 0.3s var(--perf-ease);
}
.perf-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.58);
}
.perf-card::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 10%;
  z-index: 3;
  width: 28%;
  height: 2px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--turquoise), transparent);
  transform: translateX(-18%);
  transition: opacity 0.3s ease, transform 0.55s var(--perf-ease);
}
.perf-card:hover {
  border-color: rgba(43, 216, 194, 0.32);
  box-shadow: 0 28px 78px -46px rgba(0, 1, 144, 0.5);
}
.perf-card:hover::after { opacity: 0.72; transform: translateX(190%); }

/* ---------- Panneaux de chart ---------- */
/* SANS CADRE (10/2026, retour du proprietaire) : les deux charts se posent
   sur le fond de la page, comme le reste du site - plus de carte, de fond
   vert d'eau ni d'ombre. Le titre et l'espace les separent ; la largeur
   rendue va aux SVG. Les tuiles KPI gardent leur carte (.perf-card). */
.perf-panel {
  padding: 0;
}
.perf-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px 32px;
  margin-bottom: 12px;
}
.perf-section-title {
  margin: 0;
  font-family: var(--font-titres);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--bleu);
}
.perf-chart {
  position: relative;
  border-radius: 12px;
  outline: none;
}
.perf-chart:focus-visible { outline: 2px solid var(--perf-deep); outline-offset: 4px; }
.perf-svg { display: block; width: 100%; height: auto; overflow: visible; }
/* Telephone : les charts debordent dans la gouttiere de 20px (8px du
   bord) - le texte garde la gouttiere, le trace gagne 24px (18/11/2026). */
@media (max-width: 640px) {
  .perf-chart { margin-left: -12px; margin-right: -12px; }
  /* Annual : un peu plus d'air de chaque cote (14px du bord) */
  .perf-chart.perf-ann { margin-left: -6px; margin-right: -6px; }
}
/* Charte : Quattrocento Sans pour le corps et les charts (CLAUDE.md) */
.perf-svg-num { font-family: var(--font-corps); font-variant-numeric: tabular-nums; }
.perf-svg-label, .perf-svg-caps { font-family: var(--font-corps); }

/* Annual return */
.perf-ann-year {
  transform-box: view-box;
  transition: opacity 0.25s ease, transform 0.25s var(--perf-ease);
}
.perf-ann-year rect { transform-box: fill-box; }
.perf-bar-grow { animation: perf-bar 0.55s var(--perf-ease) both; }
@keyframes perf-bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.perf-ann-focus {
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--perf-ease), opacity 0.14s;
}
.perf-ann-focus.is-on { opacity: 1; }
.perf-ann-focus.no-slide { transition: opacity 0.14s !important; }

/* Tooltips */
.perf-tip {
  position: absolute;
  top: 0;
  z-index: 10;
  width: max-content;
  transform: translateX(-50%);
  border: 0;
  border-radius: 8px;
  background: #fff;
  padding: 6px 9px;
  box-shadow: var(--perf-tip-shadow);
  pointer-events: none;
  transition: left 0.3s var(--perf-ease);
}
.perf-tip[hidden], .perf-sel-tip[hidden] { display: none; }
.perf-tip.is-in { animation: perf-tip-in 0.18s var(--perf-ease); }
@keyframes perf-tip-in {
  from { opacity: 0; transform: translateX(-50%) translateY(7px) scale(0.96); filter: blur(5px); }
  to { opacity: 1; transform: translateX(-50%); filter: blur(0); }
}
.perf-tip-head { margin-bottom: 3px; font-size: 0.6rem; letter-spacing: 0.14em; }
.perf-tip-row { display: flex; align-items: center; gap: 6px; padding: 0; }
.perf-tip-swatch { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.perf-tip-label {
  white-space: nowrap;
  font-family: var(--font-corps);
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(0, 1, 144, 0.6);
}
.perf-tip-value {
  margin-left: auto;
  padding-left: 12px;
  font-family: var(--font-titres);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--perf-navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.perf-tip-sep { margin-top: 3px; border-top: 1px solid var(--perf-line); padding-top: 3px; }

.perf-sel-tip {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 10;
  width: max-content;
  max-width: 92%;
  box-sizing: border-box;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 12px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  padding: 6px 10px;
  box-shadow: var(--perf-tip-shadow);
  pointer-events: none;
}
.perf-sel-tip.is-in { animation: perf-tip-in 0.2s var(--perf-ease); }
.perf-sel-v {
  font-family: var(--font-titres);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Legende juste apres le titre de chaque chart, au format du site
   d'origine (18/11/2026) : carres arrondis, Omnium en degrade navy,
   Benchmark turquoise, texte bleu charte en gras. */
.perf-legend-top {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-corps);
  font-size: 15px;
  font-weight: 700;
  color: var(--bleu);
}
.perf-legend-top-item { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.perf-legend-sq { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.perf-legend-sq-omnium { background: linear-gradient(180deg, #000190 0%, #4040FF 100%); }
.perf-legend-sq-bench { background: var(--turquoise); }
/* « (net of fees) » fait partie du titre : meme ligne, plus leger */
.perf-title-note {
  font-weight: 400;
  font-size: 0.62em;
  letter-spacing: 0;
  color: rgba(0, 1, 144, 0.55);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .perf-legend-top { font-size: 13px; gap: 14px; }
  .perf-legend-sq { width: 12px; height: 12px; border-radius: 3px; }
}

/* ---------- Cumulative return ---------- */
.perf-cum-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px 32px;
  margin-bottom: 20px;
}
.perf-cum-head .perf-cum-controls { margin-left: auto; align-self: center; }
@media (max-width: 640px) {
  /* titre, legende puis periodes : tout aligne a gauche */
  .perf-cum-head .perf-cum-controls { margin-left: 0; justify-content: flex-start; }
}
.perf-cum-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}

/* Controle segmente : pastille navy glissante */
.perf-seg {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--perf-line);
  border-radius: 999px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 8px 24px -22px rgba(0, 1, 144, 0.75);
}
.perf-seg button {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 999px;
  background: none;
  padding: 6px 14px;
  font-family: var(--font-titres);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
  color: rgba(0, 1, 144, 0.55);
  cursor: pointer;
  transition: color 0.15s;
}
.perf-seg button:hover { color: var(--perf-navy); }
.perf-seg button.is-active { color: #fff; }
.perf-seg button:focus-visible { outline: 2px solid var(--perf-deep); outline-offset: 2px; }
.perf-seg-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  z-index: 0;
  width: 0;
  border-radius: 999px;
  background: var(--perf-navy);
  box-shadow: 0 5px 14px -7px rgba(0, 1, 144, 0.9);
  pointer-events: none;
  transition: transform 0.35s var(--perf-ease), width 0.35s var(--perf-ease), opacity 0.2s;
}


.perf-cum {
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
}
.perf-move { transition: transform 0.3s var(--perf-ease); }
.perf-move.no-slide, .perf-tip.no-slide { transition: none !important; }
.perf-anim-area { animation: perf-area 0.48s var(--perf-ease) both; }
@keyframes perf-area { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.perf-anim-bench { animation: perf-bench 0.38s var(--perf-ease) 0.12s both; }
@keyframes perf-bench { from { opacity: 0; transform: translateY(4px); } to { opacity: 0.88; transform: none; } }
.perf-anim-draw { stroke-dasharray: 1; animation: perf-draw 0.78s var(--perf-ease) both; }
@keyframes perf-draw {
  from { stroke-dashoffset: 1; opacity: 0.35; }
  25% { opacity: 1; }
  to { stroke-dashoffset: 0; opacity: 1; }
}
.perf-end-tag { animation: perf-end 0.3s var(--perf-ease) 0.58s backwards; }
@keyframes perf-end { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Paliers (Tailwind du prototype : sm 640, md 768) ---------- */
@media (min-width: 768px) {
  .perf-section-title { font-size: 1.875rem; }
}
.perf-notes { padding-top: 0; padding-bottom: 8px; }
/* Les disclaimers suivent le chart Annual return : ils s'y rattachent
   (pas de grand blanc entre la legende et eux). */
.perf-annual { padding-bottom: 0; }
.perf-notes .tr-disclaimers { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .perf-card, .perf-card::after, .perf-move, .perf-tip, .perf-seg-pill,
  .perf-ann-year, .perf-ann-focus { transition: none !important; }
  .perf-bar-grow, .perf-anim-area, .perf-anim-bench, .perf-anim-draw, .perf-end-tag,
  .perf-tip.is-in, .perf-sel-tip.is-in { animation: none !important; }
}


/* Gouttiere commune a tout le site (03/10/2026) : 20px de chaque cote en
   mobile, contenu de 1160px au plus sur ordinateur - les bords du hero de
   l'accueil. Place en fin de feuille : l'emporte sur les paliers plus haut. */
.tr-page-title {
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}
