/* ssg-meta-trends.css — page /tendances-meta/ (FR) + /en/meta-trends/ (EN) */

.mt-hero { max-width: 1100px; margin: 0 auto; padding: 48px 20px 8px; text-align: center; }
.mt-hero__title { font-size: clamp(28px, 4vw, 42px); color: #fff; margin: 0 0 10px; }
.mt-hero__title span { color: var(--accent-cyan, #42b7ff); }
.mt-hero__sub { color: rgba(255,255,255,.5); font-size: 15px; margin: 0; }

.mt-intro { max-width: 900px; margin: 0 auto; padding: 16px 20px 32px; color: rgba(255,255,255,.7); line-height: 1.6; font-size: 15px; }
.mt-intro p { margin: 0 0 12px; }
.mt-intro strong { color: #fff; }

.mt-insights { max-width: 1100px; margin: 0 auto 40px; padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.mt-insight-card { background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 18px 20px; }
.mt-insight-card__label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: rgba(255,255,255,.4); margin-bottom: 8px; }
.mt-insight-card p { margin: 0; color: rgba(255,255,255,.8); font-size: 14.5px; line-height: 1.55; }
.mt-insight-card strong { color: #fff; }
.mt-insight-card .mt-up { color: #4ade80; font-weight: 600; }
.mt-insight-card .mt-down { color: #f87171; font-weight: 600; }

.mt-section { max-width: 1100px; margin: 0 auto 48px; padding: 0 20px; }
.mt-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.mt-section__head h2 { font-size: 20px; color: #fff; margin: 0; }
.mt-section__head span { font-size: 13px; color: rgba(255,255,255,.4); }

.mt-table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.02); border-radius: 12px; overflow: hidden; }
.mt-table th, .mt-table td { padding: 10px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
.mt-table th { color: rgba(255,255,255,.4); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.mt-table tbody tr:hover { background: rgba(255,255,255,.03); }
.mt-table tbody tr:last-child td { border-bottom: none; }
.mt-row-champ { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 600; }
.mt-row-champ img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.mt-delta { font-weight: 700; }
.mt-delta--up { color: #4ade80; }
.mt-delta--down { color: #f87171; }
.mt-spark { display: block; }

/* ── Comparateur multi-champions ──────────────────────────────────────────────
   Palette de séries (validée dataviz, fond sombre) : les hex vivent dans
   generate-meta-trends-page.mjs (SERIES_COLORS) et sont appliqués inline par le JS,
   parce que l'ordre d'attribution suit la sélection de l'utilisateur. Ne pas les
   redéfinir ici : deux sources de vérité pour une même couleur finissent par diverger. */
.mt-cmp { max-width: 1100px; margin: 0 auto 20px; padding: 0 20px; }
.mt-cmp__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.mt-cmp__head h2 { font-size: 20px; color: #fff; margin: 0; }

.mt-cmp__metrics, .mt-cmp__ranges, .mt-cmp__presets { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-cmp__metric, .mt-cmp__range, .mt-cmp__preset {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.65);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; font-family: inherit; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.mt-cmp__metric:hover, .mt-cmp__range:hover, .mt-cmp__preset:hover { background: rgba(255,255,255,.08); color: #fff; }
.mt-cmp__metric.is-on, .mt-cmp__range.is-on {
  background: rgba(66,183,255,.16); border-color: rgba(66,183,255,.5); color: #fff; font-weight: 600;
}
.mt-cmp__metric:focus-visible, .mt-cmp__range:focus-visible, .mt-cmp__preset:focus-visible,
.mt-cmp__picker input:focus-visible { outline: 2px solid #42b7ff; outline-offset: 2px; }

.mt-cmp__controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mt-cmp__picker input {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.15); color: #fff;
  border-radius: 8px; padding: 8px 12px; font-size: 14px; font-family: inherit; min-width: 210px;
}
.mt-cmp__picker input::placeholder { color: rgba(255,255,255,.4); }
.mt-cmp__picker input:disabled { opacity: .5; cursor: not-allowed; }
.mt-cmp__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-cmp__chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: #fff;
  background: color-mix(in srgb, var(--chip) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--chip) 55%, transparent);
  border-radius: 999px; padding: 5px 6px 5px 13px;
}
.mt-cmp__chip::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--chip); margin-right: -2px; }
.mt-cmp__chip button {
  background: none; border: 0; color: rgba(255,255,255,.55); cursor: pointer;
  font-size: 17px; line-height: 1; padding: 0 5px; font-family: inherit;
}
.mt-cmp__chip button:hover { color: #fff; }

/* Les filtres tiennent sur une seule ligne au-dessus du graphe, période en premier */
.mt-cmp__filters { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }

.mt-cmp__plot { position: relative; background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 8px 4px; }
.mt-cmp__plot svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.mt-cmp__tip {
  position: absolute; top: 14px; pointer-events: none; z-index: 2;
  background: rgba(10,13,24,.95); border: 1px solid rgba(255,255,255,.14); border-radius: 9px;
  padding: 9px 12px; font-size: 13px; min-width: 132px;
  box-shadow: 0 8px 26px rgba(0,0,0,.45);
}
.mt-cmp__tip[hidden] { display: none; }
.mt-cmp__tip-date { color: rgba(255,255,255,.5); font-size: 11.5px; margin-bottom: 6px; }
/* Valeur d'abord, nom ensuite : le lecteur sait déjà quelle série il vise, il veut le chiffre */
.mt-cmp__tip-row { display: flex; align-items: center; gap: 7px; line-height: 1.7; }
.mt-cmp__tip-row i { width: 11px; height: 2.5px; border-radius: 2px; flex: none; }
.mt-cmp__tip-row b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.mt-cmp__tip-row span { color: rgba(255,255,255,.55); }

.mt-cmp__legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: rgba(255,255,255,.7); }
.mt-cmp__legend-item { display: inline-flex; align-items: center; gap: 7px; }
.mt-cmp__legend-item i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }

.mt-cmp__note { margin: 10px 0 0; font-size: 12.5px; color: rgba(255,255,255,.42); line-height: 1.55; }
.mt-cmp__summary {
  max-width: 1100px; margin: 0 auto 40px; padding: 14px 20px 0;
  color: rgba(255,255,255,.75); font-size: 14.5px; line-height: 1.6;
}
.mt-cmp__summary strong { color: #fff; }
.mt-cmp__summary .mt-up { color: #4ade80; font-weight: 600; }
.mt-cmp__summary .mt-down { color: #f87171; font-weight: 600; }

.mt-cmp__data { margin-top: 12px; }
.mt-cmp__data summary { color: rgba(255,255,255,.55); font-size: 13px; cursor: pointer; }
.mt-cmp__data summary:hover { color: #fff; }
.mt-cmp__data-wrap { max-height: 320px; overflow: auto; margin-top: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; }
.mt-cmp__data table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mt-cmp__data th, .mt-cmp__data td { padding: 6px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.05); color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; }
.mt-cmp__data th { position: sticky; top: 0; background: #0d111d; color: rgba(255,255,255,.5); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }

@media (max-width: 640px) {
  .mt-cmp__head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .mt-cmp__filters { flex-direction: column; align-items: flex-start; }
  .mt-cmp__picker input { min-width: 0; width: 100%; }
  .mt-cmp__metric, .mt-cmp__range, .mt-cmp__preset { padding: 6px 11px; font-size: 12.5px; }
  .mt-cmp__tip { font-size: 12px; min-width: 118px; }
}

.mt-faq { max-width: 900px; margin: 0 auto 60px; padding: 0 20px; }
.mt-faq h2 { font-size: 20px; color: #fff; margin: 0 0 16px; }
.mt-faq details { background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.mt-faq summary { color: #fff; font-weight: 600; cursor: pointer; font-size: 14.5px; }
.mt-faq p { color: rgba(255,255,255,.65); font-size: 14px; line-height: 1.6; margin: 10px 0 0; }

@media (max-width: 640px) {
  .mt-table th:nth-child(4), .mt-table td:nth-child(4) { display: none; }
}
