/* Section « Nouveautes » de la mini app iglook.
 *
 * Tous les styles passent par des variables --wn-*. Dans Telegram, whatsnew.js
 * les remplit depuis themeParams : la section suit alors le theme choisi par
 * l'utilisateur, y compris les themes personnalises. Hors Telegram, les valeurs
 * ci-dessous s'appliquent telles quelles.
 */

.wn {
  --wn-bg: #f5f6f8;
  --wn-card: #ffffff;
  --wn-ink: #161a20;
  --wn-slate: #5d6774;
  --wn-faint: #8b94a1;
  --wn-line: #dde1e7;
  --wn-rule: #eef0f4;
  --wn-accent: #2f5d8a;
  --wn-before: #a8402f;
  --wn-before-bg: #f6ebe8;
  --wn-after: #1c6f53;
  --wn-after-bg: #e7f2ed;
  --wn-night: #e9ecf1;

  --wn-radius: 10px;
  --wn-gap: 18px;

  color: var(--wn-ink);
  background: var(--wn-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

@media (prefers-color-scheme: dark) {
  .wn:not([data-wn-theme="light"]) {
    --wn-bg: #10141a;
    --wn-card: #171c24;
    --wn-ink: #e7eaef;
    --wn-slate: #9aa4b2;
    --wn-faint: #717c8b;
    --wn-line: #2a323d;
    --wn-rule: #222932;
    --wn-accent: #7aa9d8;
    --wn-before: #e08b76;
    --wn-before-bg: #2c1e1a;
    --wn-after: #6fc3a0;
    --wn-after-bg: #152722;
    --wn-night: #1c222b;
  }
}

.wn[data-wn-theme="dark"] {
  --wn-bg: #10141a;
  --wn-card: #171c24;
  --wn-ink: #e7eaef;
  --wn-slate: #9aa4b2;
  --wn-faint: #717c8b;
  --wn-line: #2a323d;
  --wn-rule: #222932;
  --wn-accent: #7aa9d8;
  --wn-before: #e08b76;
  --wn-before-bg: #2c1e1a;
  --wn-after: #6fc3a0;
  --wn-after-bg: #152722;
  --wn-night: #1c222b;
}

.wn * { box-sizing: border-box; }
.wn__inner { max-width: 760px; margin: 0 auto; padding-inline: 16px; padding-block: 20px 40px; }

/* --- en-tete --- */
.wn__head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.wn__eyebrow {
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--wn-faint); margin: 0;
}
.wn__title { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }

/* --- une version --- */
.wn-release { border-top: 1px solid var(--wn-line); padding-top: 18px; margin-top: 18px; }
.wn-release:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }

.wn-release__bar {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; padding: 0; margin: 0;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.wn-release__bar:focus-visible { outline: 2px solid var(--wn-accent); outline-offset: 3px; border-radius: 6px; }
.wn-release__meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.wn-release__name { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.wn-release__date { font-size: 12.5px; color: var(--wn-faint); font-variant-numeric: tabular-nums; }
.wn-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--wn-after); background: var(--wn-after-bg);
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.wn-release__chev {
  width: 20px; height: 20px; flex: none; color: var(--wn-faint);
  transition: transform .18s ease;
}
.wn-release[data-open="true"] .wn-release__chev { transform: rotate(180deg); }
.wn-release__body { display: flex; flex-direction: column; gap: var(--wn-gap); padding-top: 16px; }
.wn-release[data-open="false"] .wn-release__body { display: none; }
.wn-release__summary { margin: 0; color: var(--wn-slate); font-size: 15.5px; }

/* --- blocs --- */
.wn-block__title {
  margin: 0 0 12px; font-size: 13px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; color: var(--wn-accent);
}
.wn-card {
  background: var(--wn-card); border: 1px solid var(--wn-line);
  border-radius: var(--wn-radius); padding: 16px;
}

/* stats */
.wn-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 620px) { .wn-stats { grid-template-columns: 1fr; } }
.wn-stat { display: flex; flex-direction: column; gap: 6px; }
.wn-stat__label { font-size: 13px; color: var(--wn-slate); line-height: 1.35; }
.wn-stat__hint { color: var(--wn-faint); }
.wn-stat__pair { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.wn-num { font-variant-numeric: tabular-nums; font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; }
.wn-num--old { font-size: 18px; color: var(--wn-before); text-decoration: line-through; opacity: .85; }
.wn-num--new { font-size: 28px; color: var(--wn-after); letter-spacing: -.02em; }
.wn-stat__arrow { color: var(--wn-faint); font-size: 13px; }
.wn-stat__note { font-size: 12.5px; color: var(--wn-faint); }

/* tableau */
.wn-scroll { overflow-x: auto; border: 1px solid var(--wn-line); border-radius: var(--wn-radius); background: var(--wn-card); }
.wn-table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14.5px; }
.wn-table th {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--wn-line);
  font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--wn-faint);
}
.wn-table th:nth-child(2) { color: var(--wn-before); }
.wn-table th:nth-child(3) { color: var(--wn-after); }
.wn-table td { padding: 11px 14px; border-bottom: 1px solid var(--wn-rule); vertical-align: top; }
.wn-table tr:last-child td { border-bottom: 0; }
.wn-table td:first-child { font-weight: 600; width: 28%; }
.wn-table td:nth-child(2) { color: var(--wn-slate); width: 33%; }
.wn-table td:nth-child(2) code { color: var(--wn-before); }
.wn-table td:nth-child(3) code { color: var(--wn-after); }

.wn code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em;
  background: var(--wn-rule); padding: 1px 5px; border-radius: 4px;
}

/* listes a coches */
.wn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.wn-list li { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: start; font-size: 14.5px; line-height: 1.45; }
.wn-mark {
  width: 17px; height: 17px; border-radius: 50%; margin-top: 2px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.wn-mark--ok { background: var(--wn-after-bg); color: var(--wn-after); }
.wn-mark--limit { background: var(--wn-before-bg); color: var(--wn-before); }
.wn-card--limits { background: var(--wn-before-bg); }
.wn-card--limits .wn-block__title { color: var(--wn-before); }

/* graphique */
.wn-figure { margin: 0; }
.wn-figure__scroll { overflow-x: auto; }
.wn-figure svg { display: block; max-width: 100%; height: auto; min-width: 500px; }
.wn-figure figcaption { margin-top: 10px; font-size: 13px; color: var(--wn-slate); line-height: 1.5; }
.wn-svg-label { font-size: 12.5px; font-weight: 600; fill: var(--wn-ink); }
.wn-svg-meta, .wn-svg-axis {
  font-size: 10.5px; fill: var(--wn-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.wn-svg-base { stroke: var(--wn-line); stroke-width: 1; }
.wn-svg-before { stroke: var(--wn-before); stroke-width: 1.6; opacity: .75; }
.wn-svg-after { stroke: var(--wn-after); stroke-width: 1.8; }
.wn-svg-highlight { stroke: var(--wn-after); stroke-width: 2.6; }
.wn-svg-night { fill: var(--wn-night); }
.wn-svg-night-label { font-size: 10.5px; fill: var(--wn-faint); }

.wn-empty { color: var(--wn-faint); font-size: 14.5px; }

@media (prefers-reduced-motion: reduce) {
  .wn-release__chev { transition: none; }
}
