/* ═══════════════════════════════════════════════════════════
   LE RADAR — Le fil étudiant du Québec
   Design éditorial, texte d'abord. Pensé pour les jeunes adultes :
   typographie expressive, identité couleur par source, sobre et clair.
═══════════════════════════════════════════════════════════ */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --ink: #16181c;
  --ink-soft: #44474d;
  --muted: #80858c;
  --rule: #e7e7e3;
  --rule-strong: #14161a;
  --accent: #6c2163;       /* pourpre de marque (bleu QC + rouge Canada) */
  --accent-dark: #4f1749;
  --live: #c8102e;         /* rouge « en direct » — sémantique diffusion live */
  --live-dark: #9c0c24;
  --radio: #003da5;        /* bleu officiel du Québec — volet radio / syntoniseur */
  --radio-bright: #5d9be0; /* version éclaircie pour le bandeau sombre */
  --tuner-bg: #111317;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --maxw: 800px;
  --pad: 24px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0e0f12;
  --bg-soft: #181a1e;
  --ink: #f1f2f4;
  --ink-soft: #c2c6cd;
  --muted: #888d96;
  --rule: #26282d;
  --rule-strong: #f1f2f4;
  --tuner-bg: #1a1c21;
  --accent: #cf7ec1;       /* pourpre éclairci pour lisibilité sur fond sombre */
  --accent-dark: #b85fa8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* Empêche le pan horizontal (iPad portrait, textes longs, RTL).
     overflow-x:clip seul est mal géré sur certains Safari → hidden d’abord. */
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 240ms ease, color 240ms ease;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  position: relative;
  /* iPad : pas de glissement latéral du document */
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

/* Conteneurs principaux : jamais plus larges que le viewport */
.masthead,
.masthead-inner,
.tuner,
.tuner-inner,
.wire,
.filters-panel,
.news-list,
.news-hero,
.brief-rail,
.news-tail {
  max-width: 100%;
  min-width: 0;
}
.masthead,
.tuner,
.wire {
  overflow-x: clip;
}

/*
 * Scripts RTL (arabe, farsi, hébreu, ourdou) :
 * le shell UI reste LTR (pas de dir=rtl sur <html>), seul le contenu
 * éditorial lit de droite à gauche — évite le basculement du tuner/filtres.
 */
html[data-script-dir="rtl"] .wire-title,
html[data-script-dir="rtl"] .wire-status,
html[data-script-dir="rtl"] .news-updated,
html[data-script-dir="rtl"] .article-title,
html[data-script-dir="rtl"] .article-brief,
html[data-script-dir="rtl"] .article-byline,
html[data-script-dir="rtl"] .article-eyebrow,
html[data-script-dir="rtl"] .article-time,
html[data-script-dir="rtl"] .article-meta,
html[data-script-dir="rtl"] .filters-toggle__label,
html[data-script-dir="rtl"] .filters-compact__text {
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: start;
}

/* Slogan sous le wordmark : RTL pour la lecture, mais toujours centré
   (text-align:start le collait à droite en arabe / farsi / hébreu). */
html[data-script-dir="rtl"] .wordmark-full {
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: center;
}

html[data-script-dir="rtl"] .wordmark-mark {
  /* Titre de marque centré ; bidi naturel pour le texte traduit */
  unicode-bidi: plaintext;
  text-align: center;
}

/* Filet si un ancien cache a encore dir=rtl sur <html> */
html[dir="rtl"] {
  direction: ltr; /* force le chrome en LTR */
}
html[dir="rtl"] body {
  overflow-x: clip;
}

a { color: inherit; }

.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;
}
.hidden { display: none !important; }

/* ─────────────── MASTHEAD ─────────────── */
.masthead { border-bottom: 2px solid var(--rule-strong); }
/* En thème sombre, --rule-strong est presque blanc : ce trait apparaissait
   comme une ligne blanche juste au-dessus du module radio. On l'adoucit. */
[data-theme="dark"] .masthead { border-bottom-color: var(--rule); }

.masthead-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px var(--pad) 16px;
}

.masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.masthead-date { font-weight: 600; }

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.masthead-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  padding: 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 140ms ease, color 140ms ease, transform 140ms ease, background 140ms ease;
}
.masthead-icon svg { width: 15px; height: 15px; }

.theme-toggle {
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover,
  .masthead-home:hover,
  .masthead-rss:hover,
  .masthead-solitaire:hover,
  .masthead-coffee:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
  .masthead-ataraxia:hover {
    border-color: #c8102e;
    background: color-mix(in srgb, #c8102e 10%, transparent);
  }
}
.theme-toggle:active,
.masthead-home:active,
.masthead-rss:active,
.masthead-ataraxia:active,
.masthead-solitaire:active,
.masthead-coffee:active {
  transform: scale(0.9);
}
/* Ataraxia : seul bouton rouge du header (tomate Pomodoro, hors thème accent). */
.masthead-ataraxia {
  border-color: var(--rule);
}
.masthead-ataraxia .masthead-tomato,
.masthead-solitaire .masthead-card,
.masthead-coffee .masthead-coffee-emoji {
  font-size: 15px;
  line-height: 1;
  display: block;
  color: unset;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.masthead-home.is-active,
.masthead-home[aria-current="page"] {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--rule));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.masthead-icon:focus { outline: none; }
.masthead-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.masthead-brand {
  padding-top: 16px;
  text-align: center;
  max-width: 100%;
  min-width: 0;
}

.wordmark {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 2px;
}
/*
 * Hiérarchie typo (tous viewports) : LE RADAR > titre À la une > .wire-title.
 * --radar-wordmark-size max et min restent strictement au-dessus de
 * --radar-lead-title-size, dont le plancher reste lui-même au-dessus du
 * .wire-title « Le fil étudiant » (1.4rem).
 */
:root {
  /* LE-RADAR.ca : un cran au-dessus de l’ancien « LE RADAR » */
  --radar-wordmark-size: clamp(2.05rem, 6.8vw + 0.3rem, 4.25rem);
  --radar-lead-title-size: clamp(1.55rem, 4.1vw + 0.15rem, 2.55rem);
}
/* block (pas flex) : le texte traduit (ex. inuktitut) peut se couper
   sur plusieurs lignes sans déborder du viewport mobile/tablette. */
.wordmark-mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--radar-wordmark-size);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  display: block;
  width: 100%;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: none;
  box-sizing: border-box;
}
.wordmark-brand {
  white-space: nowrap;
}
.wordmark-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-weight: 400;
  font-size: 0.92em;
  line-height: 1;
  display: inline;
  white-space: nowrap;
}
.wordmark-full {
  font-size: clamp(10px, 2.6vw, 11.5px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  max-width: min(40rem, 100%);
  width: 100%;
  box-sizing: border-box;
  padding: 0 4px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: none;
}

/* Scripts longs (inuktitut, arabe, farsi, ourdou, hébreu…) : resserrer le wordmark */
html[lang="iu"] .wordmark-mark,
html[data-translate="iu"] .wordmark-mark,
html[data-translate="iu-latn"] .wordmark-mark,
html[lang="ar"] .wordmark-mark,
html[data-translate="ar"] .wordmark-mark,
html[data-script-dir="rtl"] .wordmark-mark {
  /* Toujours ≥ lead-title (max 2.1) */
  font-size: clamp(1.55rem, 5.2vw + 0.25rem, 2.95rem);
  letter-spacing: 0;
  line-height: 1.12;
}
html[lang="iu"],
html[data-translate="iu"],
html[data-translate="iu-latn"],
html[lang="ar"],
html[data-translate="ar"],
html[data-script-dir="rtl"] {
  --radar-lead-title-size: clamp(1.2rem, 3.6vw + 0.1rem, 2.1rem);
}
html[lang="iu"] .wordmark-full,
html[data-translate="iu"] .wordmark-full,
html[data-translate="iu-latn"] .wordmark-full,
html[lang="ar"] .wordmark-full,
html[data-translate="ar"] .wordmark-full,
html[data-script-dir="rtl"] .wordmark-full {
  letter-spacing: 0.04em;
  font-size: clamp(10px, 2.4vw, 11px);
  line-height: 1.5;
}

@media (max-width: 720px) {
  :root {
    --radar-wordmark-size: clamp(1.85rem, 7.6vw, 2.95rem);
    /* Plancher > .wire-title (1.4rem) et < --radar-wordmark-size. */
    --radar-lead-title-size: clamp(1.55rem, 4.8vw, 1.85rem);
  }
  .wordmark-mark {
    line-height: 1.08;
  }
  .wordmark-full {
    letter-spacing: 0.06em;
    font-size: clamp(9.5px, 2.8vw, 11px);
  }
  html[lang="iu"] .wordmark-mark,
  html[data-translate="iu"] .wordmark-mark,
  html[data-translate="iu-latn"] .wordmark-mark {
    font-size: clamp(1.45rem, 5.8vw, 2.2rem);
  }
  html[lang="iu"],
  html[data-translate="iu"],
  html[data-translate="iu-latn"] {
    --radar-lead-title-size: clamp(1.15rem, 4vw, 1.65rem);
  }
}

@media (min-width: 721px) and (max-width: 1024px) {
  :root {
    --radar-wordmark-size: clamp(2.15rem, 4.8vw, 3.6rem);
    --radar-lead-title-size: clamp(1.45rem, 2.8vw, 2.35rem);
  }
  html[lang="iu"] .wordmark-mark,
  html[data-translate="iu"] .wordmark-mark,
  html[data-translate="iu-latn"] .wordmark-mark {
    font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  }
  html[lang="iu"],
  html[data-translate="iu"],
  html[data-translate="iu-latn"] {
    --radar-lead-title-size: clamp(1.25rem, 2.4vw, 1.95rem);
  }
}

/* ─────────────── TUNER (sticky) ─────────────── */
.tuner {
  position: sticky;
  top: 0;
  /* Au-dessus du fil / bouton traduction : le popover volume sort sous la barre
     et ne doit pas passer sous .translate-control (même z-index + DOM plus bas). */
  z-index: 100;
  background: var(--tuner-bg);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.3), 0 6px 22px -16px rgba(0,0,0,0.7);
}

.tuner-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px var(--pad);
  display: flex;
  align-items: center;
  gap: 12px;
}

.tuner-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  container-type: inline-size;
  container-name: tuner-controls;
}

.tuner-label { flex-shrink: 0; }
/* Coral « en ondes » — partagé avec le titre d’émission (À l’antenne) sur bureau. */
.tuner {
  --tuner-onair-live: #ff7d6e;
  --tuner-onair-idle: rgba(255, 255, 255, 0.42);
}
.tuner-onair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--tuner-onair-idle);
  white-space: nowrap;
}
.tuner-onair::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 200ms ease;
}
.tuner.is-playing .tuner-onair { color: var(--tuner-onair-live); }
.tuner.is-playing .tuner-onair::before {
  background: var(--live);
  animation: onairPulse 1.6s ease-out infinite;
}
.tuner.is-external .tuner-onair { color: var(--radio-bright); }
.tuner.is-external .tuner-onair::before { background: var(--radio-bright); }
@keyframes onairPulse {
  0% { box-shadow: 0 0 0 0 rgba(200,16,46,0.55); }
  100% { box-shadow: 0 0 0 7px rgba(200,16,46,0); }
}
.tuner-step {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.72);
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.45);
}
.tuner-step:hover {
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.28);
  transform: scale(1.04);
}
.tuner-step:active { transform: scale(0.93); }
.tuner-step svg { width: 20px; height: 20px; display: block; }

.tuner-dial {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  width: 0;
}

.tuner-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  margin-left: auto;
}
.tuner-select {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
  font-size: 16px;
}
.tuner-now {
  pointer-events: none;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 36px;
  min-width: 0;
  width: 100%;
  padding: 3px 24px 3px 11px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 9px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.tuner-dial:hover .tuner-now { border-color: rgba(255,255,255,0.32); background: rgba(255,255,255,0.08); }
/* Lecture live : synthétiseur rouge sur tous les formats (mobile, tablette, bureau).
   Avant : seulement ≤600px ; EN ONDES restait le seul signal sur grand écran. */
.tuner.is-playing .tuner-now {
  border-color: rgba(255, 125, 110, 0.7);
  background: rgba(200, 16, 46, 0.1);
  box-shadow: 0 0 0 1px rgba(200, 16, 46, 0.22);
}
.tuner.is-playing .tuner-dial:hover .tuner-now {
  border-color: rgba(255, 125, 110, 0.85);
  background: rgba(200, 16, 46, 0.14);
}
.tuner.is-external .tuner-now {
  border-color: rgba(93, 155, 224, 0.55);
  background: rgba(0, 61, 165, 0.1);
  box-shadow: none;
}
.tuner.is-external .tuner-dial:hover .tuner-now {
  border-color: rgba(93, 155, 224, 0.7);
  background: rgba(0, 61, 165, 0.14);
}
.tuner-now::after {
  content: "▾";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  line-height: 1;
  pointer-events: none;
}
.tuner-now-name {
  display: block;
  min-width: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.15;
  color: var(--radio-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.7s cubic-bezier(0.33, 1, 0.68, 1);
}
.tuner-now-name.is-crossfading {
  opacity: 0;
}
.tuner-now-sub-rotate {
  display: grid;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
}
.tuner-now-sub-rotate > .tuner-now-sub {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 100%;
}
.tuner-now-sub {
  display: block;
  min-width: 0;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.7s cubic-bezier(0.33, 1, 0.68, 1);
}
.tuner-now-sub-rotate.is-rotating > .tuner-now-sub {
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(0.33, 1, 0.68, 1);
  pointer-events: none;
}
.tuner-now-sub-rotate.is-rotating > .tuner-now-sub.is-active {
  opacity: 1;
}
.tuner-now-sub.is-crossfading,
.tuner-now-sub-rotate.is-rotating > .tuner-now-sub.is-crossfading {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.33, 1, 0.68, 1);
}
.tuner-now-sub-rotate:not(.is-rotating) > .tuner-now-sub--air {
  display: none;
}
.tuner-now-sub-rotate.is-empty {
  display: none;
}
.tuner-now-sub-text {
  display: inline-block;
  white-space: nowrap;
}
/* Défilement droite → gauche (dial / filtres). GPU pour limiter le flou. */
.is-marquee { text-overflow: clip; }
.is-marquee > .tuner-now-sub-text {
  animation: tunerMarquee var(--marquee-duration, 12s) linear infinite alternate;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}
@keyframes tunerMarquee {
  0%, 14%   { transform: translate3d(0, 0, 0); }
  86%, 100% { transform: translate3d(var(--marquee-shift, 0), 0, 0); }
}
/* Panneau antenne : jamais de marquee (ellipsis + title au survol). */
.tuner-nowair-title,
.tuner-nowair-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tuner-nowair-title.is-marquee,
.tuner-nowair-sub.is-marquee {
  text-overflow: ellipsis;
}
.tuner-nowair-title.is-marquee > .tuner-now-sub-text,
.tuner-nowair-sub.is-marquee > .tuner-now-sub-text {
  animation: none !important;
  transform: none !important;
  display: inline;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (prefers-reduced-motion: reduce) {
  .is-marquee { text-overflow: ellipsis; }
  .is-marquee > .tuner-now-sub-text { animation: none; }
  .tuner-now-sub-rotate.is-rotating > .tuner-now-sub { transition: none; }
  .tuner-nowair-body { transition: none; }
}

.tuner-play {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--live);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 6px 18px -6px rgba(200,16,46,0.7);
}
.tuner-play:hover { background: var(--live-dark); transform: scale(1.06); }
.tuner-play:active { transform: scale(0.93); }
.tuner-play:disabled {
  background: rgba(255,255,255,0.12);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.tuner-play.is-external {
  background: var(--radio);
  box-shadow: 0 6px 18px -6px rgba(0,61,165,0.65);
}
.tuner-play.is-external:hover { background: #0049c2; }
.tuner-play svg { width: 20px; height: 20px; }
.tuner-play .ico-play { margin-left: 2px; }
.tuner-play .ico-external { width: 18px; height: 18px; }

.tuner-cast {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.tuner-cast:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}
.tuner-cast:active { transform: scale(0.93); }
.tuner-cast:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}
.tuner-cast.is-unavailable {
  opacity: 0.3;
  color: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}
.tuner-cast.is-unavailable:hover {
  color: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}
.tuner-cast.is-casting {
  color: #7eb8ff;
  border-color: rgba(93, 155, 224, 0.62);
  background: rgba(0, 61, 165, 0.18);
  box-shadow: 0 0 0 1px rgba(93, 155, 224, 0.22);
}
.tuner-cast.is-casting:hover {
  color: #9ecaff;
  border-color: rgba(93, 155, 224, 0.78);
  background: rgba(0, 61, 165, 0.26);
}
.tuner-cast svg { width: 20px; height: 20px; display: block; }

.tuner-eq {
  flex-shrink: 0;
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
  padding: 0 2px;
}
@media (min-width: 600px) { .tuner-eq { display: flex; } }
.tuner-eq span {
  width: 3px; height: 4px;
  background: var(--live);
  border-radius: 2px;
  opacity: 0.9;
}
.tuner.is-playing .tuner-eq span { animation: eq 760ms ease-in-out infinite; }
.tuner.is-playing .tuner-eq span:nth-child(2) { animation-duration: 1000ms; }
.tuner.is-playing .tuner-eq span:nth-child(3) { animation-duration: 600ms; animation-delay: 90ms; }
.tuner.is-playing .tuner-eq span:nth-child(4) { animation-duration: 880ms; animation-delay: 40ms; }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 16px; } }

.tuner-vol {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  overflow: visible;
}
.tuner-vol-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  margin: -4px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  border-radius: 7px;
  transition: color 0.15s ease, background 0.15s ease;
}
.tuner-vol-btn:hover { color: rgba(255,255,255,0.85); }
.tuner-vol-btn .ico-vol,
.tuner-vol-btn .ico-vol-mute { width: 16px; height: 16px; display: block; }
/* L'icône reflète la zone d'amplification (curseur masqué sur mobile). */
.tuner.is-boosted .tuner-vol-btn { color: #ff7d6e; }
.tuner-vol.is-muted .tuner-vol-btn[aria-pressed="true"] {
  color: #ff7d6e;
  border-color: rgba(255, 125, 110, 0.72);
  background: rgba(255, 125, 110, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 125, 110, 0.22);
}
.tuner-vol.is-muted .tuner-vol-btn[aria-pressed="true"]:hover {
  color: #ff9a90;
  border-color: rgba(255, 125, 110, 0.88);
  background: rgba(255, 125, 110, 0.22);
}
.tuner-vol-track {
  --vol-thumb: 16px;
  --vol-ratio: 0.5;
  --vol-base: 100%;
  --vol-boost: 0%;
  width: 100%;
  min-width: 108px;
  flex-shrink: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: visible;
}
.tuner-vol-slider {
  position: relative;
  min-height: var(--vol-thumb);
  overflow: visible;
  display: flex;
  align-items: center;
  touch-action: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tuner-vol-rail {
  position: absolute;
  left: calc(var(--vol-thumb) / 2);
  right: calc(var(--vol-thumb) / 2);
  top: 50%;
  height: 5px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
  overflow: visible;
}
.tuner-vol-zone--boost {
  position: absolute;
  left: 50%;
  right: 0;
  top: 0;
  bottom: 0;
  border-radius: 0 3px 3px 0;
  background: rgba(255, 125, 110, 0.1);
  opacity: 0;
  transition: opacity 140ms ease;
}
.tuner-vol-track.is-boost .tuner-vol-zone--boost { opacity: 1; }
.tuner-vol-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 3px;
  pointer-events: none;
}
.tuner-vol-fill--base {
  left: 0;
  width: calc(var(--vol-base) * 0.5);
  max-width: 50%;
  background: var(--radio-bright);
  z-index: 1;
}
.tuner-vol-fill--boost {
  left: 50%;
  width: calc(var(--vol-boost) * 0.5);
  max-width: 50%;
  background: #ff7d6e;
  z-index: 2;
}
.tuner-vol-tick {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 2px;
  height: 9px;
  border-radius: 1px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.34);
  pointer-events: none;
}
.tuner-vol-tick--100 {
  left: 50%;
  height: 11px;
  background: rgba(255, 255, 255, 0.58);
}
.tuner-vol-thumb {
  position: absolute;
  top: 50%;
  left: var(--vol-x);
  z-index: 4;
  box-sizing: border-box;
  width: var(--vol-thumb);
  height: var(--vol-thumb);
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(12, 14, 18, 0.22);
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.48);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: left 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.tuner-vol-track.is-boost .tuner-vol-thumb {
  border-color: rgba(255, 125, 110, 0.55);
  box-shadow: 0 1px 8px rgba(255, 90, 70, 0.35);
}
.tuner-vol-labels {
  position: relative;
  display: block;
  height: 10px;
  overflow: visible;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.34);
  user-select: none;
}
.tuner-vol-labels span {
  position: absolute;
  top: 0;
  white-space: nowrap;
}
/* Mute dans la bulle volume — masqué au bureau (curseur en ligne). */
.tuner-vol-mute-btn {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.tuner-vol-mute-btn .ico-vol-mute { width: 20px; height: 20px; display: block; overflow: visible; }
.tuner-vol-mute-btn:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}
.tuner-vol-mute-btn:active { transform: scale(0.93); }
.tuner-vol.is-muted .tuner-vol-mute-btn[aria-pressed="true"] {
  color: #ff7d6e;
  border-color: rgba(255, 125, 110, 0.72);
  background: rgba(255, 125, 110, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 125, 110, 0.22);
}
.tuner-vol.is-muted .tuner-vol-mute-btn[aria-pressed="true"]:hover {
  color: #ff9a90;
  border-color: rgba(255, 125, 110, 0.88);
  background: rgba(255, 125, 110, 0.22);
}
.tuner-vol-label--min {
  left: calc(var(--vol-thumb) / 2);
  transform: translateX(0);
}
.tuner-vol-label--mid {
  left: 50%;
  transform: translateX(-50%);
}
.tuner-vol-label--max {
  left: calc(100% - var(--vol-thumb) / 2);
  transform: translateX(-100%);
  color: rgba(255, 154, 144, 0.72);
}
/* Variantes Cast : une seule visible selon la largeur (voir media queries).
   .hidden / [hidden] masquent toutes les variantes quand Cast n'est pas prêt. */
.tuner-cast--bar { display: flex; }
.tuner-cast--bar.hidden,
.tuner-cast--bar[hidden] { display: none !important; }
html.is-firefox .tuner-cast--bar.hidden,
html.is-firefox .tuner-cast--bar[hidden] { display: flex !important; }
.tuner-cast--mobile { display: none; }
.tuner-cast--popover { display: none; }
/* Bureau : le popover interne ne change pas la mise en page en ligne. */
.tuner-vol-popover { display: contents; }
.tuner-volume {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  touch-action: none;
  opacity: 0;
  -webkit-appearance: none;
  appearance: none;
}
.tuner-vol-slider:has(.tuner-volume:focus-visible) {
  outline: 2px solid var(--radio-bright);
  outline-offset: 3px;
  border-radius: 6px;
}
.tuner-volume::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  height: var(--vol-thumb);
  background: transparent;
  border: none;
}
.tuner-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: max(var(--vol-thumb), 44px);
  height: max(var(--vol-thumb), 44px);
  border: none;
  background: transparent;
  cursor: pointer;
}
.tuner-volume::-moz-range-track {
  height: var(--vol-thumb);
  background: transparent;
  border: none;
}
.tuner-volume::-moz-range-thumb {
  width: max(var(--vol-thumb), 44px);
  height: max(var(--vol-thumb), 44px);
  border: none;
  background: transparent;
  cursor: pointer;
}
.tuner-vol-track.is-dragging .tuner-vol-thumb {
  transition: none;
}
.tuner-vol.is-muted .tuner-vol-track { opacity: 0.42; }

/* Sans Web Audio : curseur 0–100 %, pas de zone boost ni de 200 %.
   (Sur mobile moderne le 200 % reste affiché — voir GAIN_UI_MAX dans app.js.) */
.tuner-vol--no-boost .tuner-vol-zone--boost,
.tuner-vol--no-boost .tuner-vol-tick--100,
.tuner-vol--no-boost .tuner-vol-label--max {
  display: none;
}
.tuner-vol--no-boost .tuner-vol-label--mid {
  left: calc(100% - var(--vol-thumb) / 2);
  transform: translateX(-100%);
}
.tuner-vol--no-boost .tuner-vol-fill--base {
  width: var(--vol-base);
  max-width: 100%;
}

/* Grand bureau (≥1100 px) : curseur volume en ligne + mute au clic sur l'icône. */
@media (min-width: 1100px) {
  .tuner-now { min-height: 42px; }

  .tuner-actions {
    align-self: center;
    min-height: 42px;
    /* Dès le premier paint : ne pas pousser play+volume tout à droite. */
    margin-left: 0;
  }

  .tuner-vol {
    align-self: center;
    height: 42px;
    /* Largeur fixe — pas de croissance pendant le load (ni via cqw ni flex). */
    flex: 0 0 auto;
    flex-shrink: 0;
    max-width: 168px;
    min-width: 0;
  }

  .tuner-vol-slot {
    display: flex;
    align-items: center;
    height: 42px;
    overflow: visible;
    flex: 0 0 auto;
    max-width: 120px;
    min-width: 0;
  }

  /* Largeur fixe compacte (pas clamp/cqw : trop large tant que le conteneur est full-width). */
  .tuner-vol-track {
    width: 112px;
    max-width: 112px;
    min-width: 96px;
    flex: 0 0 112px;
    height: 42px;
    justify-content: center;
    gap: 0;
    position: relative;
    overflow: visible;
  }

  .tuner-vol-slider {
    min-height: 0;
    height: 100%;
    width: 100%;
  }

  .tuner-vol-labels {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: visible;
  }

  .tuner-vol-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.72);
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
  }
  .tuner-vol-btn:hover {
    color: rgba(255,255,255,0.95);
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.28);
  }
  .tuner-vol-btn:active { transform: scale(0.93); }
  .tuner-vol-btn .ico-vol,
  .tuner-vol-btn .ico-vol-mute { width: 20px; height: 20px; }
  .tuner.is-boosted .tuner-vol-btn {
    color: #ff7d6e;
    border-color: rgba(255,125,110,0.35);
  }
}

/* Tablette / mobile : volume en popover — libère l'espace du synthétiseur. */
@media (max-width: 1099.98px) {
  .tuner-now { min-height: 42px; }

  .tuner-actions {
    gap: 6px;
    align-self: center;
    align-items: center;
    min-height: 42px;
  }

  .tuner-vol {
    align-self: center;
    height: 42px;
  }

  .tuner-vol-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.72);
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
  }
  .tuner-vol-btn:hover { color: rgba(255,255,255,0.95); background: rgba(255,255,255,0.12); }
  .tuner-vol-btn:active { transform: scale(0.93); }
  .tuner-vol-btn .ico-vol,
  .tuner-vol-btn .ico-vol-mute { width: 20px; height: 20px; }
  .tuner.is-boosted .tuner-vol-btn { color: #ff7d6e; border-color: rgba(255,125,110,0.35); }

  .tuner-vol-slot {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    /* Au sein du tuner (z-index 100) : au-dessus des autres contrôles du synthé */
    z-index: 20;
    box-sizing: border-box;
    /* 100vw + 100dvw (min = le plus étroit des deux) : jamais hors écran.
       Pas de % ici — il se résoudrait contre .tuner-vol (~42 px), pas le viewport. */
    width: min(300px, calc(100vw - 20px), calc(100dvw - 20px));
    min-width: 0;
    padding: 12px 14px 10px;
    background: #22252c;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    box-shadow: 0 14px 34px -14px rgba(0,0,0,0.85);
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
  }
  /* Petite flèche pointant vers l'icône volume. */
  .tuner-vol-slot::before {
    content: "";
    position: absolute;
    top: -5px;
    right: 15px;
    width: 10px;
    height: 10px;
    background: #22252c;
    border-left: 1px solid rgba(255,255,255,0.14);
    border-top: 1px solid rgba(255,255,255,0.14);
    transform: rotate(45deg);
  }
  .tuner-vol.is-open .tuner-vol-slot {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .tuner-vol-popover {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }
  .tuner-vol-slot .tuner-vol-mute-btn {
    display: flex;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin: 0;
  }
  .tuner-vol-slot .tuner-vol-mute-btn .ico-vol-mute {
    width: 18px;
    height: 18px;
  }
  .tuner-vol-slot .tuner-vol-track {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    gap: 4px;
  }
  .tuner-vol-slot .tuner-vol-slider {
    min-height: 34px;
    height: 34px;
    width: 100%;
  }
  .tuner-vol-slot .tuner-vol-labels {
    position: relative;
    width: 100%;
    height: 11px;
    margin-top: 1px;
    font-size: 8px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.38);
  }
  .tuner-vol-slot .tuner-vol-label--max {
    color: rgba(255, 154, 144, 0.62);
  }
  /* Sous 1100 px : pas de cast « barre bureau ». */
  .tuner-cast--bar { display: none !important; }

  .tuner-cast--popover {
    display: none;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin: 0;
  }
  .tuner-cast--popover svg { width: 18px; height: 18px; }
  /* Téléphone : cast dans le popover volume (voir max-width 599.98). */
  .tuner-cast--popover:not(.hidden):not([hidden]) { display: flex; }
  .tuner-cast--popover.hidden,
  .tuner-cast--popover[hidden] { display: none !important; }
  html.is-firefox .tuner-cast--popover,
  html.is-firefox .tuner-cast--popover.hidden,
  html.is-firefox .tuner-cast--popover[hidden] { display: flex !important; }

  .tuner-vol.is-open .tuner-vol-btn { color: rgba(255,255,255,0.95); }

  /* Tablette / demi-laptop (600–1099) : cast dans la barre d'actions. */
  .tuner-cast--mobile:not(.hidden):not([hidden]) { display: flex; }
  .tuner-cast--mobile.hidden,
  .tuner-cast--mobile[hidden] { display: none !important; }
  html.is-firefox .tuner-cast--mobile,
  html.is-firefox .tuner-cast--mobile.hidden,
  html.is-firefox .tuner-cast--mobile[hidden] { display: flex !important; }
}

/* Téléphone étroit : pastille EN ONDES masquée (le synthétiseur rouge global
   signale déjà le live). Seuil bas pour ne pas traiter une demi-fenêtre laptop
   comme un téléphone. */
@media (max-width: 599.98px) {
  .tuner-inner { padding: 8px var(--pad); gap: 8px; }
  .tuner-controls { gap: 6px; }
  .tuner-label { display: none; }

  .tuner-vol-slot {
    width: min(292px, calc(100vw - 16px), calc(100dvw - 16px));
  }

  .tuner-step {
    box-shadow: 0 3px 10px -4px rgba(0,0,0,0.4);
  }

  /* Téléphone : cast uniquement dans le popover volume (pas dans la barre). */
  .tuner-cast--mobile { display: none !important; }
  html.is-firefox .tuner-cast--mobile { display: none !important; }
  /* Popover cast : visible quand le SDK l'active (retirant .hidden). */
  .tuner-cast--popover:not(.hidden):not([hidden]) { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .tuner-vol-slot { transition: none; }
}

.tuner-nowair {
  display: none;
  flex-shrink: 1;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  max-width: 340px;
  padding-left: 14px;
  border-left: none;
}

.tuner-nowair-label {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tuner-onair-idle, rgba(255, 255, 255, 0.42));
  white-space: nowrap;
}

.tuner-nowair-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Fondu antenne : changement de poste ou bascule CHOQ */
.tuner-nowair {
  transition: opacity 0.3s ease;
}
.tuner-nowair.is-swapping {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .tuner-nowair { transition: none; }
  .tuner-nowair.is-swapping { opacity: 1; }
}

.tuner-nowair-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--radio-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile / tablette : teinte live un peu plus claire (lisibilité). */
.tuner.is-playing .tuner-nowair-title {
  color: #ff9a90;
}

.tuner-nowair-sub {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tuner-nowair.is-empty .tuner-nowair-title {
  font-style: italic;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}

@media (min-width: 1100px) {
  /*
   * Grille finale dès le premier paint (voir aussi <style> critique dans index.html).
   * Colonne « À l'antenne » toujours présente — le volume reste compact.
   */
  .tuner-inner {
    max-width: 1180px;
    padding-top: 11px;
    padding-bottom: 11px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 370px);
    gap: 0;
    align-items: center;
  }

  .tuner-controls {
    grid-column: 1;
    flex: unset;
    min-width: 0;
  }

  .tuner-dial {
    flex: 1 1 0;
    width: 0;
    min-width: 120px;
    max-width: none;
  }

  .tuner-actions {
    margin-left: 0;
    flex-shrink: 0;
  }

  .tuner-nowair {
    grid-column: 2;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    flex: unset;
    /* Occupe toute la colonne grille (sinon le bloc « rapetisse » au libellé seul) */
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-left: 0;
    padding-left: 20px;
    border-left: none;
    align-self: center;
    opacity: 1;
    box-sizing: border-box;
  }

  .tuner-nowair-body {
    flex: 1 1 auto;
    min-width: 0;
  }

  .tuner-nowair-title,
  .tuner-nowair-sub {
    max-width: 100%;
  }

  /*
   * Bureau — couleur de l'émission selon le statut :
   *  - live (en cours) = même coral que « EN ONDES »
   *  - upcoming (à venir / entre créneaux) = ambre distinct (pas le live)
   *  - idle / empty = neutre
   */
  .tuner.is-playing .tuner-nowair.is-live .tuner-nowair-label,
  .tuner.is-playing .tuner-nowair.is-live .tuner-nowair-title {
    color: var(--tuner-onair-live);
  }
  .tuner.is-playing .tuner-nowair.is-upcoming .tuner-nowair-label,
  .tuner.is-playing .tuner-nowair.is-upcoming .tuner-nowair-title {
    color: #e8c07a;
  }
  .tuner.is-playing .tuner-nowair.is-upcoming .tuner-nowair-sub {
    color: rgba(232, 192, 122, 0.72);
  }
  .tuner.is-playing .tuner-nowair.is-idle .tuner-nowair-label,
  .tuner.is-playing .tuner-nowair.is-idle .tuner-nowair-title,
  .tuner.is-playing .tuner-nowair.is-empty .tuner-nowair-label,
  .tuner.is-playing .tuner-nowair.is-empty .tuner-nowair-title {
    color: rgba(255, 255, 255, 0.55);
  }
  .tuner.is-external .tuner-nowair-label,
  .tuner.is-external .tuner-nowair-title {
    color: var(--radio-bright);
  }
  .tuner.is-external .tuner-nowair.is-upcoming .tuner-nowair-label,
  .tuner.is-external .tuner-nowair.is-upcoming .tuner-nowair-title {
    color: #c9a86a;
  }

  /* Ne jamais masquer le panneau en display:none sur bureau (collapse de colonne). */
  .tuner-nowair.hidden {
    display: flex !important;
    /* Contenu placeholder du HTML reste lisible — pas d'opacity:0 (trou visuel). */
    opacity: 1;
    pointer-events: auto;
  }

  .tuner-vol {
    flex: 0 0 auto;
    flex-shrink: 0;
    min-width: 0;
    max-width: 168px;
  }

  .tuner-vol-slot {
    flex: 0 0 auto;
    min-width: 0;
    max-width: 120px;
    overflow: visible;
  }

  .tuner-vol-track {
    width: 112px;
    max-width: 112px;
    min-width: 96px;
    flex: 0 0 112px;
  }

  .masthead-inner {
    max-width: 1180px;
  }
}

/* ─────────────── WIRE ─────────────── */
.wire {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad) 80px;
}

.wire-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  /* Entre tuner et fil : même ordre de grandeur que les autres respirations (~20px) */
  margin-top: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rule-strong);
}
.wire-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  /* Titres longs (inuktitut, etc.) : le menu fixed ne doit pas être clipé ici */
  overflow: visible;
}
.wire-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
}
.wire-status {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.news-updated::before { content: "·"; margin-right: 8px; color: var(--rule); }

/* ── Traduction page (Original / FR / EN) ── */
.translate-control {
  position: relative;
  flex-shrink: 0;
  /* Le menu est en position:fixed (JS) : ne pas le clipper ici.
     Pas de z-index élevé ici : ça passait par-dessus le popover volume mobile. */
  overflow: visible;
  z-index: auto;
}
.translate-toggle {
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  /* Un peu plus d’air vertical pour les jambages (g, y, p de « Original »…). */
  padding: 6px 10px 7px 8px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  cursor: pointer;
  max-width: min(100%, 42vw);
  overflow: visible;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}
.translate-toggle:hover,
.translate-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--bg));
}
.translate-toggle__icon {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.85;
}
.translate-toggle__label {
  /* line-height: 1 + overflow:hidden coupait le « g » de Original.
     (overflow-x/y mixtes sont ramenés à auto en CSS — on élargit la ligne.) */
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.translate-toggle__chev {
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform 0.2s ease;
}
.translate-toggle[aria-expanded="true"] .translate-toggle__chev {
  transform: rotate(180deg);
}
/*
 * Menu en position:fixed (coordonnées posées par translate.js) pour rester
 * dans le viewport malgré overflow-x:clip sur html/body et les titres longs
 * (inuktitut, arabe, etc.) qui poussent le bouton vers la droite.
 */
.translate-menu {
  position: fixed;
  /* Au-dessus du tuner sticky (100) quand le menu langue est ouvert */
  z-index: 120;
  box-sizing: border-box;
  min-width: 260px;
  width: max-content;
  max-width: min(340px, calc(100% - 24px), calc(100dvw - 24px));
  max-height: min(75vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* top/left appliqués par JS ; repli CSS si JS n’a pas encore tourné */
  top: 0;
  left: 0;
}
.translate-menu[hidden] {
  display: none !important;
}
/* Filtre sticky en tête de liste — loupe, pas de texte « Filtrer… » */
.translate-menu__search-wrap {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 0 4px;
  padding: 4px 4px 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.translate-menu__search-field {
  position: relative;
  display: flex;
  align-items: center;
}
.translate-menu__search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
  flex-shrink: 0;
  opacity: 0.9;
}
.translate-menu__search {
  font-family: var(--sans);
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 8px 10px 8px 34px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  outline: none;
  /* Masquer la loupe native du type=search (WebKit) */
  -webkit-appearance: none;
  appearance: none;
}
.translate-menu__search::-webkit-search-decoration,
.translate-menu__search::-webkit-search-cancel-button,
.translate-menu__search::-webkit-search-results-button,
.translate-menu__search::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.translate-menu__search::placeholder {
  color: transparent;
}
.translate-menu__search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
}
.translate-menu__search:focus + .translate-menu__search-icon,
.translate-menu__search-field:focus-within .translate-menu__search-icon {
  color: var(--accent);
  opacity: 1;
}
.translate-menu[data-filter-empty="1"]::after {
  content: "Aucune langue";
  display: block;
  padding: 12px 10px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.translate-menu__group[hidden] {
  display: none !important;
}
.translate-menu__sep {
  margin: 6px 4px 2px;
  padding: 4px 6px 2px;
  border-top: 1px solid var(--rule);
}
.translate-menu__group:first-of-type .translate-menu__sep,
.translate-menu__sep:first-child {
  border-top: 0;
  margin-top: 2px;
}
.translate-menu__sep-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.translate-menu__opt {
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease;
}
.translate-menu__opt[hidden] {
  display: none !important;
}
.translate-menu__opt:hover,
.translate-menu__opt:focus-visible {
  background: var(--bg-soft);
  outline: none;
}
.translate-menu__opt.is-active {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
}
.translate-menu__opt.is-active .translate-menu__name::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 800;
}
.translate-menu__opt.is-unavailable {
  opacity: 0.55;
  cursor: help;
}
.translate-menu__opt.is-unavailable:hover {
  background: color-mix(in srgb, var(--muted) 12%, var(--bg));
}
.translate-menu__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.translate-menu__name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.translate-menu__code {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
}
.translate-menu__opt.is-active .translate-menu__code {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--rule));
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
}
.translate-menu__hint {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  max-width: 100%;
  overflow-wrap: anywhere;
}
[data-theme="dark"] .translate-menu {
  box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.55);
}

/* Traduction en cours (API gtx, pas le widget Google) */
html[data-translate-busy="1"] .translate-toggle {
  opacity: 0.75;
  pointer-events: none;
}

.article-meta--time-only {
  justify-content: flex-end;
}
.article-meta--time-only .article-time {
  margin-left: 0;
}
.article-meta--time-only .article-time::before {
  display: none;
}
.article--lead .article-eyebrow {
  margin-bottom: 10px;
}
.article--lead .article-eyebrow + .article-meta {
  margin-top: -2px;
  margin-bottom: 10px;
}
.article--lead .article-meta .article-time {
  justify-self: end;
}

/* Source filter chips */
.filters-panel {
  position: relative;
  margin: 16px 0 6px;
  --filters-row-h: 48px;
  --filters-cols: 5;
  /* Ordinateur + tablette paysage : une seule rangée ; le reste via « Plus de sources ». */
  --filters-collapsed-rows: 1;
  /* hauteur = N lignes + (N−1) gaps de 6px */
  --filters-collapsed-h: calc(
    var(--filters-row-h) * var(--filters-collapsed-rows)
    + 6px * (var(--filters-collapsed-rows) - 1)
  );
}

/* Tablette / téléphone en portrait : 2 rangées (moins de largeur pour les pastilles). */
@media (max-width: 1099.98px) and (orientation: portrait) {
  .filters-panel {
    --filters-collapsed-rows: 2;
  }
}

/*
 * Replié : rangée(s) pleine(s) + aperçu de la rangée d’après assez haut
 * pour lire un peu le *nom de source* (padding 6px + ligne ~14px ≈ 22px),
 * puis fondu/flou en bas — pas un flou opaque sur le nom.
 */
.filters-panel {
  /* ~ pastille : pad-top + nom (12px/1.2) + un peu d’air */
  --filters-peek: 30px;
}

.filters-panel:not(.is-expanded):not(.is-compact) .filters {
  max-height: calc(var(--filters-collapsed-h) + var(--filters-peek));
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.filters-panel.is-expanded .filters {
  max-height: 1200px;
  transition: max-height 0.45s ease;
}

/*
 * Dégradé surtout sur la *moitié basse* de l’aperçu : le haut du peek
 * (nom de source) reste lisible ; le bas s’estompe vers « Plus de sources ».
 */
/*
 * Le pseudo-élément existe dans tous les états (sinon il apparaît d'un coup,
 * déjà à sa position repliée, pendant que les rangées se replient encore) ;
 * seule son opacité change, avec un délai qui attend la fin du repli (0.35s).
 */
.filters-panel.has-overflow::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  /* Commence un peu sous le haut du peek pour ne pas noyer le nom */
  top: calc(var(--filters-collapsed-h) + 10px);
  height: calc(var(--filters-peek) - 8px);
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--bg) 0%, transparent) 0%,
    color-mix(in srgb, var(--bg) 40%, transparent) 45%,
    color-mix(in srgb, var(--bg) 85%, transparent) 80%,
    var(--bg) 100%
  );
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 40%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 40%, #000 100%);
  opacity: 0;
  /* visibility coupe aussi le backdrop-filter (que l'opacité seule n'éteint pas) */
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0s linear 0.12s;
}

.filters-panel.has-overflow:not(.is-expanded):not(.is-compact)::after {
  opacity: 1;
  visibility: visible;
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  transition: opacity 0.18s ease 0.3s, visibility 0s linear 0.3s;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  align-items: stretch;
}

.filters-compact[hidden],
.filters-toggle[hidden] {
  display: none !important;
}

.filters-toggle,
.filters-compact {
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.filters-toggle:hover,
.filters-compact:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
}

.filters-toggle__chev,
.filters-compact__chev {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.filters-panel.is-expanded .filters-toggle__chev {
  transform: rotate(180deg);
}

.filters-compact {
  justify-content: flex-start;
  text-align: left;
  margin-top: 0;
  margin-bottom: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c, var(--accent)) 10%, var(--bg));
  border-color: color-mix(in srgb, var(--c, var(--accent)) 40%, var(--rule));
  color: var(--ink);
}

.filters-compact__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  flex-shrink: 0;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--accent)) 22%, transparent);
}

.filters-compact__text {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filters-compact__chev {
  margin-left: auto;
}

/* Téléphone uniquement — une demi-fenêtre laptop (~680–960 px) reste tablette. */
@media (max-width: 599.98px) {
  .filters-panel {
    --filters-cols: 3;
  }

  .filters-panel.is-compact .filters {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    margin: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
  }
}

@media (max-width: 420px) {
  .filters-panel { --filters-cols: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .filters-panel .filters,
  .filters-toggle__chev,
  .filter-btn {
    transition: none;
  }
}
.filter-btn {
  font-family: var(--sans);
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 0 0 calc((100% - (var(--filters-cols) - 1) * 6px) / var(--filters-cols));
  min-width: 0;
  padding: 6px 12px 5px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    flex-basis 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    min-width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 130ms ease,
    color 130ms ease,
    background 130ms ease;
  max-width: 100%;
}
.filter-btn__row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}
.filter-btn__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  flex-shrink: 0;
}
.filter-btn__name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  text-align: left;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-btn__inst {
  display: block;
  box-sizing: border-box;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted);
  padding-left: 13px;
  text-align: left;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-btn:hover {
  border-color: color-mix(in srgb, var(--c, var(--accent)) 40%, var(--rule));
  background: color-mix(in srgb, var(--c, var(--accent)) 6%, var(--bg));
}
.filter-btn:hover .filter-btn__name { color: var(--ink); }
.filter-btn.active {
  background: color-mix(in srgb, var(--c, var(--accent)) 14%, var(--bg));
  border-color: color-mix(in srgb, var(--c, var(--accent)) 48%, var(--rule));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--accent)) 10%, transparent);
}
.filter-btn.active .filter-btn__name { color: var(--ink); }
.filter-btn.active .filter-btn__inst { color: var(--muted); }
.filter-btn.active .filter-btn__dot {
  background: var(--c, var(--accent));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--accent)) 22%, transparent);
}

/* Filtres sources — thème sombre : lisibilité des noms + pastille active teintée */
[data-theme="dark"] .filter-btn {
  background: var(--bg-soft);
  border-color: var(--rule);
  color: var(--ink-soft);
}
[data-theme="dark"] .filter-btn .filter-btn__name {
  color: var(--ink);
}
[data-theme="dark"] .filter-btn .filter-btn__inst {
  color: var(--ink-soft);
}
[data-theme="dark"] .filter-btn:hover {
  border-color: var(--ink-soft);
  background: #1c1e24;
}
[data-theme="dark"] .filter-btn:hover .filter-btn__name {
  color: var(--ink);
}
[data-theme="dark"] .filter-btn.active {
  background: color-mix(in srgb, var(--c, var(--accent)) 20%, var(--bg-soft));
  border-color: color-mix(in srgb, var(--c, var(--accent)) 50%, var(--rule));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--accent)) 12%, transparent);
}
[data-theme="dark"] .filter-btn.active .filter-btn__name {
  color: var(--ink);
}
[data-theme="dark"] .filter-btn.active .filter-btn__inst {
  color: var(--ink-soft);
}
[data-theme="dark"] .filter-btn.active .filter-btn__dot {
  background: var(--c, var(--accent));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--accent)) 28%, transparent);
}

/* ── Articles (text only) ── */
.news-list { margin-top: 4px; }

.article {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  transition: transform 160ms cubic-bezier(0.22,1,0.36,1);
  max-width: 100%;
  min-width: 0;
}
.article::before {
  content: "";
  position: absolute;
  /* Dans la gouttière (padding de .wire), à gauche du contenu et de la
     vignette — jamais par-dessus l'image. Le débordement à gauche reste
     contenu par .wire { overflow-x: clip } (pas de pan horizontal iPad). */
  left: -14px;
  top: 22px; bottom: 22px;
  width: 3px;
  border-radius: 3px;
  background: var(--c, var(--accent));
  opacity: 0;
  transition: opacity 160ms ease;
}
/* Hover translate seulement souris fine — pas iPad (hover+coarse) qui
   « colle » le décalage et contribue au pan horizontal. */
@media (hover: hover) and (pointer: fine) {
  .article:hover { transform: translateX(3px); }
  .article:hover::before { opacity: 1; }
}
@media (hover: hover) and (pointer: fine) {
  .article:hover .article-title { color: var(--c, var(--accent)); }
}
/* Tactile / iPad : surbrillance titre sans translate */
@media (hover: none), (pointer: coarse) {
  .article:active .article-title { color: var(--c, var(--accent)); }
}

.article-media {
  display: none;
  margin: 0 0 14px;
  overflow: hidden;
  background: var(--bg-soft);
  border-radius: 8px;
  aspect-ratio: 16 / 9;
}
.article.has-image .article-media { display: block; }
.article.has-image .article-media:has(.article-media-credit) {
  aspect-ratio: auto;
  overflow: visible;
  background: transparent;
}
.article-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Apparition en fondu : l'image n'est insérée qu'une fois chargée, donc
     l'animation joue exactement au moment où elle s'affiche. */
  animation: articleImgIn 0.45s ease both;
}
@keyframes articleImgIn {
  from { opacity: 0; transform: scale(1.015); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .article-media img { animation: none; }
}
.article--stock-image .article-media,
.article--fallback-image .article-media {
  aspect-ratio: auto;
  overflow: visible;
  background: transparent;
}
.article--stock-image .article-media img,
.article--fallback-image .article-media img {
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 8px;
  background: var(--bg-soft);
}
.article-media-credit {
  margin: 4px 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--muted);
}
.article-media-credit a {
  position: relative;
  z-index: 1;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--muted) 55%, transparent);
}
.article-media-credit a:hover {
  color: var(--ink-soft);
  text-decoration-color: currentColor;
}
.article-media-credit__creator {
  font-weight: 600;
  color: var(--c, var(--ink-soft));
  text-decoration-color: color-mix(in srgb, var(--c, var(--accent)) 45%, transparent);
}
.article-media-credit__creator:hover {
  color: var(--c, var(--accent));
}

.article-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 10px;
  row-gap: 2px;
  font-size: 12px;
  margin-bottom: 6px;
}
.article-meta__lead {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.article-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c, var(--accent));
}
.article-source::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c, var(--accent));
}
.article-inst { color: var(--muted); }
/* Par défaut acronyme. Nom complet tablette+ : À la une + vedettes seulement.
   En bref + Suite du fil restent en acronyme (UdeM, McGill, UQAM…). */
.article-inst__full { display: none; }
.article-inst__short { display: inline; }
@media (min-width: 600px) {
  .article--lead .article-inst__full,
  .news-hero .article--feature .article-inst__full {
    display: inline;
  }
  .article--lead .article-inst__short,
  .news-hero .article--feature .article-inst__short {
    display: none;
  }
}
.article-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  justify-self: end;
  text-align: right;
  font-size: 11px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.article-time::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--rule);
}
.article-time.is-fresh { color: var(--live); font-weight: 600; }
.article-time.is-fresh::before {
  width: 6px; height: 6px;
  background: var(--live);
  animation: onairPulse 1.6s ease-out infinite;
}

.article-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.012em;
  margin: 0 0 7px;
  color: var(--ink);
  transition: color 140ms ease;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.article-byline {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0 0 6px;
  font-weight: 500;
}
/* Espace stable entre libellé et auteur — survit aux traductions qui
   retirent le blanc final de « Par » / « By » / « Por »… */
.article-byline .article-author {
  color: var(--ink);
  font-weight: 600;
  margin-inline-start: 0.35em;
}
.article-byline strong {
  color: var(--ink);
  font-weight: 600;
}

.article-brief {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

.article-brief-text {
  display: inline;
}

.article-more {
  display: inline;
  margin-left: 0.35em;
  font-weight: 600;
  font-size: 0.88em;
  color: var(--c, var(--accent)); /* couleur du média (--c sur .article) */
  white-space: nowrap;
}
.article:hover .article-more {
  color: var(--c, var(--accent));
}
@media (min-width: 600px) { .article-title { font-size: 1.6rem; } }

/* ── Lead / À la une ── */
.article--lead {
  padding: 14px 0 22px;
  border-bottom: 2px solid var(--rule-strong);
  /* Colonne flex + order : titre toujours au-dessus de la photo, même si le DOM diverge. */
  display: flex;
  flex-direction: column;
}
.article--lead > .article-eyebrow { order: 1; }
.article--lead > .article-meta { order: 2; }
.article--lead > .article-title { order: 3; }
.article--lead > .article-media { order: 4; }
.article--lead > .article-byline { order: 5; }
.article--lead > .article-brief { order: 6; }

.article--lead::before { top: 56px; }
.article-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.article--lead .article-title {
  /* Toujours < --radar-wordmark-size (voir :root). */
  font-size: var(--radar-lead-title-size);
  line-height: 1.1;
  margin-bottom: 12px;
}
/* Titre au-dessus de l'image : un peu d'air avant la photo. */
.article--lead.has-image .article-title {
  margin-bottom: 14px;
}
.article--lead.has-image .article-media {
  margin-bottom: 12px;
}
.article--lead .article-byline {
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.article--lead .article-brief {
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: none;
}

/* Vedettes : même longueur d'extrait que la une, typo intermédiaire
   (plus compacte que la une, plus aérée que Suite du fil ~0.88–0.9rem). */
.article--feature .article-brief {
  font-size: 0.98rem;
  line-height: 1.52;
  max-width: none;
  color: var(--ink-soft);
}
.news-hero .article--feature .article-brief-text,
.news-hero .article--feature .article-brief.is-truncated .article-brief-text,
.news-hero .article--feature.article--thumb.has-image .article-brief-text,
.news-hero .article--feature.article--thumb.has-image .article-brief.is-truncated .article-brief-text {
  display: inline;
  -webkit-line-clamp: unset;
  overflow: visible;
  -webkit-box-orient: initial;
}

.article--compact {
  padding: 14px 0;
}
.article--compact .article-meta {
  margin-bottom: 4px;
}
.article--compact .article-title {
  font-size: 1.28rem;
  line-height: 1.18;
  margin-top: 0;
  hyphens: manual;
  -webkit-hyphens: manual;
  word-break: normal;
}
.article--compact .article-byline {
  font-size: 0.78rem;
  margin: 2px 0 4px;
}
.article--compact .article-brief {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin-top: 5px;
}
.brief-rail .article--compact .article-brief-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.brief-rail .article--compact .article-brief.is-truncated .article-brief-text {
  -webkit-line-clamp: 2;
}
/* En bref avec photo : plus de lignes d'extrait à côté de la vignette */
.brief-rail .article--compact.article--thumb.has-image .article-brief-text,
.brief-rail .article--compact.article--thumb.has-image .article-brief.is-truncated .article-brief-text {
  -webkit-line-clamp: 5;
}

/* En bref : date à droite sur la ligne source */
.brief-rail .article--compact .article-meta {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 8px;
  row-gap: 0;
  margin-bottom: 4px;
}
.brief-rail .article--compact .article-meta__lead {
  min-width: 0;
}
.brief-rail .article--compact .article-time {
  grid-row: 1;
  grid-column: 2;
  justify-self: end;
  text-align: right;
  align-self: start;
  white-space: nowrap;
}
.brief-rail .article--compact .article-time::before {
  display: none;
}

/* ── Vignette photo à gauche — En bref + vedettes (tous écrans) ──
   Photo en colonne fixe à gauche ; le texte (titre / byline / extrait) à droite.
   Crédit photo en petit sous la vignette. Tailles progressives mobile → bureau.
   (« Suite du fil » reste sans photo : le rôle standard n'a pas de média.) */
.article--thumb.has-image {
  display: grid;
  /* Mobile d'abord : vignette modeste pour ne pas squish le titre / extrait */
  grid-template-columns: clamp(64px, 22vw, 88px) minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
}
.article--thumb.has-image > .article-meta {
  grid-column: 1 / -1;
}
.article--thumb.has-image > .article-title,
.article--thumb.has-image > .article-byline,
.article--thumb.has-image > .article-brief {
  grid-column: 2;
  min-width: 0; /* évite le débordement horizontal du texte long */
}
.article--thumb.has-image > .article-media {
  grid-column: 1;
  grid-row: 2 / span 3;
  margin: 2px 0 0;
  aspect-ratio: auto;
  overflow: visible;
  background: transparent;
  min-width: 0;
}
.article--thumb.has-image .article-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-soft);
}
.article--thumb.has-image .article-media-credit {
  margin: 3px 0 0;
  font-size: 0.55rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* Vedettes (2 features) : clairement plus grandes que En bref, mais toujours
   en vignette à gauche — jamais pleine largeur comme À la une (~16:9). */
.news-hero .article--feature.article--thumb.has-image {
  grid-template-columns: clamp(96px, 30vw, 128px) minmax(0, 1fr);
  column-gap: 14px;
}
.news-hero .article--feature.article--thumb.has-image .article-media img {
  border-radius: 7px;
}
.news-hero .article--feature.article--thumb.has-image .article-media-credit {
  -webkit-line-clamp: 3;
  font-size: 0.58rem;
}

@media (min-width: 601px) {
  /* En bref : petite vignette */
  .article--thumb.has-image {
    grid-template-columns: clamp(72px, 22%, 110px) minmax(0, 1fr);
    column-gap: 14px;
  }
  .article--thumb.has-image > .article-media {
    margin: 3px 0 0;
  }
  .article--thumb.has-image .article-media-credit {
    font-size: 0.6rem;
    line-height: 1.3;
    -webkit-line-clamp: 3;
  }
  /* Features : ~1,4–1,5× En bref ; plafond loin de la une */
  .news-hero .article--feature.article--thumb.has-image {
    grid-template-columns: clamp(128px, 34%, 168px) minmax(0, 1fr);
    column-gap: 16px;
  }
  .news-hero .article--feature.article--thumb.has-image .article-media-credit {
    font-size: 0.62rem;
  }
}

/* Desktop magazine : features un cran plus présentes, toujours sous la une */
@media (min-width: 1100px) {
  .news-hero .article--feature.article--thumb.has-image {
    grid-template-columns: clamp(140px, 36%, 184px) minmax(0, 1fr);
    column-gap: 18px;
  }
}

/* Loading skeletons */
.skeleton { pointer-events: none; }
.skeleton .sk {
  background: var(--bg-soft);
  border-radius: 4px;
  animation: skel 1.3s ease-in-out infinite;
}
.skeleton .sk-meta { height: 12px; width: 40%; margin-bottom: 12px; }
.skeleton .sk-title { height: 22px; width: 92%; margin-bottom: 8px; }
.skeleton .sk-title2 { height: 22px; width: 65%; margin-bottom: 12px; }
.skeleton .sk-brief { height: 12px; width: 100%; margin-bottom: 6px; }
.skeleton .sk-brief2 { height: 12px; width: 80%; }
@keyframes skel { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }

.news-empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ─────────────── FOOTER ─────────────── */
.site-foot {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.site-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.site-foot a:hover { text-decoration: underline; }
.site-foot p { margin: 0 0 8px; }

.site-foot__credit {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.site-foot__author {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

.site-foot__legal {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.site-foot__bot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.site-foot__bot-ico {
  font-size: 14px;
  line-height: 1;
}

/* ─────────────── FEEDS PAGE ─────────────── */
.feeds-wire { padding-bottom: 56px; }

.feeds-head {
  margin-top: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--rule-strong);
}

.feeds-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.feeds-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.feeds-lead {
  margin: 0;
  max-width: 58ch;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.feeds-updated {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.feeds-card {
  margin-top: 22px;
  max-width: 52rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 4%, transparent);
}

.feeds-subscribe {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg));
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 640px) {
  .feeds-subscribe {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 18px;
  }
}

.feeds-subscribe__label {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.feeds-subscribe__url {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--rule));
  border-radius: 10px;
  background: var(--bg);
}

.feeds-subscribe__rss {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

.feeds-subscribe__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink);
  word-break: break-all;
}

.feeds-subscribe__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feeds-card__body {
  display: grid;
  gap: 0;
}

@media (min-width: 720px) {
  .feeds-card__body {
    grid-template-columns: 1fr 1fr;
  }

  .feeds-panel--sources {
    border-right: 1px solid var(--rule);
  }
}

.feeds-panel {
  padding: 20px 22px 22px;
}

.feeds-panel__title {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.feeds-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.feeds-grid__row {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  align-items: start;
  gap: 10px 12px;
  padding: 7px 8px;
  border-radius: 8px;
  transition: background 140ms ease;
}

.feeds-grid__row:hover {
  background: color-mix(in srgb, var(--c, var(--accent)) 6%, var(--bg));
}

.feeds-grid__campus {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.feeds-grid__campus::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--accent)) 22%, transparent);
  flex-shrink: 0;
}

.feeds-grid__paper {
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink);
}
.feeds-cegep-wrap {
  margin-top: 14px;
}
.feeds-panel__subtitle {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.feeds-grid__note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.feeds-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.feeds-points__item {
  position: relative;
  padding-left: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.feeds-points__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.feeds-schedule {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.feeds-schedule__label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.feeds-schedule__times {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feeds-schedule__times li {
  padding: 4px 9px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--bg-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.feed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
  white-space: nowrap;
}
.feed-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.feed-btn:focus { outline: none; }
.feed-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.feed-btn--primary {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rule));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}
.feed-btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
}
.feed-btn--primary:active {
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
}
.feed-btn--quiet {
  color: var(--muted);
}
.feed-btn--quiet:hover {
  color: var(--accent);
}

/* ─────────────── EXTERNAL RADIO LISTEN ─────────────── */
/* Modale ouverte : le fond ne défile pas (classe posée par app.js). */
body.external-listen-open {
  overflow: hidden;
}

.external-listen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.external-listen.hidden { display: none; }

.external-listen__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.62);
  backdrop-filter: blur(3px);
}

.external-listen__panel {
  position: relative;
  width: min(420px, calc(100% - 32px), calc(100dvw - 32px));
  max-height: min(92vh, 520px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 18px 48px -12px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.external-listen__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--rule);
}

.external-listen__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.external-listen__logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.external-listen__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.external-listen__sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.external-listen__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}
.external-listen__close:hover { background: var(--rule); color: var(--ink); }

.external-listen__status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 14px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--rule);
  font-size: 0.84rem;
  color: var(--ink-soft);
}
.external-listen__status.is-ready {
  background: rgba(0, 61, 165, 0.1);
  color: var(--ink);
}
.external-listen__status.is-error {
  background: rgba(180, 40, 40, 0.1);
  color: #8f1f1f;
}

.external-listen__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: external-spin 0.75s linear infinite;
  flex-shrink: 0;
}
.external-listen__status.is-ready .external-listen__spinner,
.external-listen__status.is-error .external-listen__spinner { display: none; }

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

.external-listen__frame-wrap {
  margin: 12px 14px 0;
  aspect-ratio: 1;
  width: calc(100% - 28px);
  max-height: 340px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: #0e1014;
}
.external-listen__frame-wrap.hidden { display: none; }

.external-listen__frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.external-listen__hint {
  margin: 10px 14px 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.external-listen__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 14px;
  margin-top: auto;
}

.external-listen__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.external-listen__btn:hover { border-color: var(--radio); color: var(--radio); }
.external-listen__btn--primary {
  background: var(--radio);
  border-color: var(--radio);
  color: #fff;
}
.external-listen__btn--primary:hover {
  background: #0049c2;
  border-color: #0049c2;
  color: #fff;
}

/* ─────────────── RECHERCHE LOCALE (loupe bas-droite) ─────────────── */
.news-search {
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  left: auto;
  /* --vk-inset : hauteur du clavier virtuel (visualViewport, voir app.js) */
  bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + var(--vk-inset, 0px));
  z-index: 180;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 28px));
}
.news-search > * { pointer-events: auto; }

.news-search__fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 2px 8px -2px rgba(0, 0, 0, 0.12),
    0 8px 24px -10px rgba(0, 0, 0, 0.18);
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.news-search__fab svg {
  width: 22px;
  height: 22px;
  display: block;
}
/* Survol : souris seulement — sur tactile, :hover reste « collé » après un
   tap et le bouton semble encore engagé une fois la recherche fermée. */
@media (hover: hover) and (pointer: fine) {
  .news-search__fab:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, var(--rule));
    color: var(--accent);
    box-shadow:
      0 2px 10px -2px rgba(0, 0, 0, 0.14),
      0 10px 28px -10px color-mix(in srgb, var(--accent) 35%, transparent);
  }
}
.news-search__fab:active {
  transform: scale(0.96);
}
.news-search__fab:focus { outline: none; }
.news-search__fab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* Requête active : pastille accent même panneau fermé */
.news-search__fab.is-active,
.news-search.has-query .news-search__fab {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
@media (hover: hover) and (pointer: fine) {
  .news-search__fab.is-active:hover,
  .news-search.has-query .news-search__fab:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
  }
}
[data-theme="dark"] .news-search__fab {
  background: var(--bg-soft);
  border-color: var(--rule);
  box-shadow:
    0 2px 10px -2px rgba(0, 0, 0, 0.45),
    0 10px 28px -12px rgba(0, 0, 0, 0.55);
}

.news-search__panel {
  width: min(320px, calc(100vw - 28px));
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: var(--bg);
  box-shadow:
    0 4px 16px -6px rgba(0, 0, 0, 0.14),
    0 16px 40px -16px rgba(0, 0, 0, 0.22);
  animation: newsSearchPanelIn 160ms ease both;
}
.news-search__panel[hidden] { display: none !important; }
@keyframes newsSearchPanelIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .news-search__panel { animation: none; }
}
[data-theme="dark"] .news-search__panel {
  background: var(--bg-soft);
  box-shadow:
    0 4px 18px -6px rgba(0, 0, 0, 0.5),
    0 18px 44px -16px rgba(0, 0, 0, 0.65);
}

.news-search__field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.news-search__field:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--rule));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.news-search__field-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
}
.news-search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.3;
  padding: 10px 0;
  /* Évite le zoom iOS sur focus */
  font-size: max(16px, 15px);
}
.news-search__input::placeholder {
  color: var(--muted);
  opacity: 0.9;
}
/* Masque le × natif de type=search (on a le nôtre) */
.news-search__input::-webkit-search-cancel-button,
.news-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.news-search__clear {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-right: -2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.news-search__clear:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.news-search__clear.hidden { display: none; }

.news-search__hint {
  margin: 8px 2px 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
}

/* En-tête de la liste de résultats (mode search) */
.news-search-results__title {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--rule);
}
.news-list[data-mode="search"] .news-search-results {
  margin-top: 4px;
}

/* ─────────────── TOAST ─────────────── */
.toast {
  position: fixed;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  background: var(--rule-strong);
  color: var(--bg);
  font-size: 13.5px;
  padding: 10px 16px;
  border-radius: 9px;
  box-shadow: 0 8px 28px -8px rgba(0,0,0,0.45);
  z-index: 200;
  max-width: min(calc(100% - 32px), calc(100dvw - 32px));
  text-align: center;
}

@media (max-width: 600px) {
  :root { --pad: 18px; }
  /* Filet reste dans le flux (left:0) — plus de left négatif iPad/téléphone */

  /* Cartes avec vignette : un peu moins de padding vertical pour compenser
     la hauteur crédit photo, sans écraser le bloc texte. */
  .brief-rail .article--compact.article--thumb.has-image,
  .news-hero .article--feature.article--thumb.has-image {
    padding-top: 11px;
    padding-bottom: 11px;
  }

  /* Titre / extrait : laisser de l'air à côté de la vignette */
  .article--thumb.has-image .article-title {
    padding-right: 0;
  }

  /* Mobile En bref + photo : 4 lignes (inchangé — pas de « fill » agressif) */
  .brief-rail .article--compact.article--thumb.has-image .article-brief-text,
  .brief-rail .article--compact.article--thumb.has-image .article-brief.is-truncated .article-brief-text {
    -webkit-line-clamp: 4;
  }

  /*
   * Vedettes seulement : vignette un cran plus étroite + plus d'extrait
   * pour combler la zone noire à côté de la photo (pas En bref / Suite).
   */
  .news-hero .article--feature.article--thumb.has-image {
    grid-template-columns: clamp(72px, 24vw, 100px) minmax(0, 1fr);
    column-gap: 12px;
  }
  .news-hero .article--feature.article--thumb.has-image .article-brief,
  .news-hero .article--feature.article--thumb.has-image .article-brief-text {
    max-width: none;
  }
  .news-hero .article--feature.article--thumb.has-image .article-brief-text,
  .news-hero .article--feature.article--thumb.has-image .article-brief.is-truncated .article-brief-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    overflow: hidden;
  }
}

@media (max-width: 1099.98px) {
  /* Crédits photo : figcaption hors du cadre image (overflow/aspect-ratio) */
  .article--lead.has-image .article-media {
    aspect-ratio: auto;
    overflow: visible;
    background: transparent;
  }

  .article--lead.has-image .article-media img {
    aspect-ratio: 16 / 10;
    height: auto;
    border-radius: 8px;
  }

  .article--lead.has-image .article-media-credit {
    margin: 3px 0 4px;
  }

  .news-list {
    display: block;
  }

  .news-hero {
    display: block;
  }

  .news-hero-spacer {
    display: none;
  }

  .brief-rail {
    padding-left: 0;
    border-left: 0;
    margin-top: 8px;
  }

  .brief-rail-spacer {
    display: none;
  }

  .article:hover {
    transform: none;
  }
}

@media (max-width: 1099.98px) {
  /* Titres de section mobile — gradation À la une > En bref > Suite du fil */
  .article-eyebrow,
  .brief-rail-title,
  .news-tail-title {
    font-family: var(--sans);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.2;
  }

  .article--lead .article-eyebrow {
    display: block;
    font-size: 13px;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin: 0 0 8px;
    padding: 0;
  }

  .brief-rail-title {
    font-size: 11.5px;
    letter-spacing: 0.15em;
    color: var(--ink-soft);
    padding: 20px 0 8px;
    margin: 0;
  }

  .news-tail-title {
    font-size: 10.5px;
    letter-spacing: 0.16em;
    color: var(--muted);
    padding: 16px 0 6px;
    margin: 0;
  }

  /* Méta mobile — date à droite sur la ligne source */
  .news-hero .article--lead .article-eyebrow + .article-meta {
    margin-top: 0;
    margin-bottom: 4px;
  }

  .news-hero .article--lead .article-meta,
  .news-hero .article--feature .article-meta,
  .brief-rail .article--compact .article-meta,
  .news-tail .article--standard .article-meta {
    font-size: 12px;
    margin-bottom: 5px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 8px;
    row-gap: 0;
  }

  .news-hero .article--lead .article-meta__lead,
  .news-hero .article--feature .article-meta__lead,
  .brief-rail .article--compact .article-meta__lead,
  .news-tail .article--standard .article-meta__lead {
    min-width: 0;
  }

  .news-hero .article--lead .article-source,
  .news-hero .article--feature .article-source,
  .brief-rail .article--compact .article-source,
  .news-tail .article--standard .article-source {
    font-size: 12px;
    gap: 5px;
    letter-spacing: 0.03em;
  }

  .news-hero .article--lead .article-source::before,
  .news-hero .article--feature .article-source::before,
  .brief-rail .article--compact .article-source::before,
  .news-tail .article--standard .article-source::before {
    width: 7px;
    height: 7px;
  }

  .news-hero .article--lead .article-inst,
  .news-hero .article--feature .article-inst,
  .brief-rail .article--compact .article-inst,
  .news-tail .article--standard .article-inst {
    font-size: 12px;
  }

  .news-hero .article--lead .article-time,
  .news-hero .article--feature .article-time,
  .brief-rail .article--compact .article-time,
  .news-tail .article--standard .article-time {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
    text-align: right;
    font-size: 12px;
    line-height: 1.35;
    align-self: start;
    white-space: nowrap;
  }

  .news-hero .article--lead .article-time::before,
  .news-hero .article--feature .article-time::before,
  .brief-rail .article--compact .article-time::before,
  .news-tail .article--standard .article-time::before {
    display: none;
  }

  .news-tail {
    border-top: 1px solid var(--rule);
    padding-top: 0;
    margin-top: 0;
  }

  /* Cartes fil mobile — En bref + Suite du fil (plus compactes que les vedettes) */
  .brief-rail .article--compact,
  .news-tail .article--standard {
    padding: 12px 0;
  }

  .brief-rail .article--compact .article-title,
  .news-tail .article--standard .article-title {
    font-family: var(--sans);
    font-size: 1.02rem;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-top: 0;
    hyphens: manual;
    -webkit-hyphens: manual;
    word-break: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  /* Vedettes (fil global) : un cran au-dessus d'En bref pour éviter le « double look » */
  .news-hero .article--feature .article-title {
    font-family: var(--serif);
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.22;
    -webkit-line-clamp: 3;
  }

  .brief-rail .article--compact .article-byline,
  .news-tail .article--standard .article-byline {
    font-size: 0.78rem;
    margin: 2px 0 4px;
  }

  .brief-rail .article--compact .article-brief,
  .news-tail .article--standard .article-brief {
    font-size: 0.88rem;
    line-height: 1.45;
    margin-top: 4px;
    color: var(--ink-soft);
  }

  .brief-rail .article--compact .article-brief-text,
  .news-tail .article--standard .article-brief-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .brief-rail .article--compact .article-brief.is-truncated .article-brief-text {
    -webkit-line-clamp: 2;
  }

  /* Suite du fil : 3 lignes d'extrait (y compris avec « Lire la suite ») */
  .news-tail .article--standard .article-brief.is-truncated .article-brief-text {
    -webkit-line-clamp: 3;
  }
}

/* ── Suite du fil : repli après 10 articles (toutes plateformes) ──
   Comme « Plus de sources » : 10 pleins + peek des titres de la rangée
   suivante + fondu, puis bouton. */
.news-tail {
  position: relative;
  display: flex;
  flex-direction: column;
  --news-tail-peek: 34px;
  /* Évite le scroll-anchoring qui envoie en bas à l’ouverture */
  overflow-anchor: none;
}
/* Corps grille : 1 col téléphone, 2 col dès 600 px (tablette / demi-écran / bureau) */
.news-tail-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  column-gap: 0;
  overflow-anchor: none;
}
.news-tail-toggle {
  overflow-anchor: none;
}
/*
 * IMPORTANT : ces media queries doivent venir *après* la règle 1-col de base,
 * sinon la cascade annule les 2 colonnes (régression v345).
 */
@media (min-width: 600px) {
  .news-tail-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(14px, 2.4vw, 28px);
  }
}
@media (min-width: 1100px) {
  .news-tail-body {
    column-gap: 32px;
  }
}
.news-tail.has-overflow:not(.is-expanded) .news-tail-body {
  overflow: hidden;
  max-height: var(--news-tail-collapsed-h, none);
  transition: max-height 0.4s ease;
}
.news-tail.is-expanded .news-tail-body {
  max-height: none !important;
  overflow: visible;
  transition: max-height 0.45s ease;
}
/* Même langage visuel que « Plus de sources » */
.news-tail-toggle {
  display: none;
  font-family: var(--sans);
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 10px 0 4px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-align: center;
  flex-shrink: 0;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}
.news-tail.has-overflow .news-tail-toggle {
  display: inline-flex;
}
.news-tail-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
}
.news-tail-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/*
 * Dégradé sur la zone peek : haut des titres de la rangée d’après lisible,
 * bas s’estompe vers le bouton (comme filters-panel peek).
 */
.news-tail.has-overflow:not(.is-expanded) .news-tail-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--news-tail-peek);
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--bg) 0%, transparent) 0%,
    color-mix(in srgb, var(--bg) 35%, transparent) 40%,
    color-mix(in srgb, var(--bg) 80%, transparent) 75%,
    var(--bg) 100%
  );
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 45%, #000 100%);
}
.news-tail.is-expanded .news-tail-body::after {
  display: none;
}

@media (min-width: 1100px) {
  :root {
    --maxw: 1180px;
    --pad: 32px;
  }

  .wire {
    padding-bottom: 56px;
  }

  .wire-head {
    margin-top: 22px;
  }

  .filters-panel {
    margin-bottom: 18px;
  }

  .news-list {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 370px);
    column-gap: 0;
    row-gap: 0;
    /* Colonnes de même hauteur → bas (bordures) flush */
    align-items: stretch;
    border-top: 1px solid var(--rule);
  }

  .article {
    min-width: 0;
  }

  .article:hover {
    transform: none;
  }

  /* Colonne principale : une + vedettes */
  .news-hero {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    padding-right: 32px;
    border-bottom: 1px solid var(--rule);
    overflow: visible;
    isolation: isolate;
  }

  .news-hero .article--lead,
  .news-hero .article--feature {
    border-bottom: 1px solid var(--rule);
  }

  .news-hero .article--lead {
    flex: 0 0 auto;
    padding-top: 20px;
    padding-bottom: 18px;
  }

  .news-hero .article--feature {
    flex: 0 0 auto;
  }

  /* Dernière vedette : pas de bordure si le spacer suit (bas flush). */
  .news-hero .article--feature:last-of-type {
    border-bottom: 1px solid var(--rule);
  }
  .news-hero .article--feature:has(+ .news-hero-spacer) {
    border-bottom: none;
  }

  .news-hero-spacer {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
  }

  .article--lead {
    padding-top: 20px;
    padding-bottom: 18px;
  }

  .article--lead::before {
    top: 58px;
  }

  .news-list[data-hero="text"] .article--lead {
    border-bottom: 2px solid var(--rule-strong);
  }

  .news-list[data-hero="text"] .article--lead .article-title {
    font-size: var(--radar-lead-title-size);
    line-height: 1.1;
    max-width: none;
  }

  .news-list[data-hero="text"] .article--lead .article-brief {
    display: block;
    max-width: none;
    min-height: 0;
    line-height: 1.58;
  }

  .news-list[data-hero="image"] .article--lead.has-image .article-media {
    margin-bottom: 12px;
    aspect-ratio: auto;
    overflow: visible;
  }

  .news-list[data-hero="image"] .article--lead.has-image .article-media img {
    aspect-ratio: 1.55 / 1;
    height: auto;
    border-radius: 8px;
  }

  .news-list[data-hero="image"] .article--lead.has-image .article-media-credit {
    margin: 3px 0 4px;
  }

  /* Titre au-dessus de l'image — pas de marge « sous photo ». */
  .news-list[data-hero="image"] .article--lead.has-image .article-title {
    margin-top: 0;
    margin-bottom: 14px;
  }

  .news-list[data-hero="image"]:not([data-mode="source"]) .article--lead .article-title {
    font-size: var(--radar-lead-title-size);
    line-height: 1.1;
    max-width: none;
  }

  .news-list[data-hero="image"]:not([data-mode="source"]) .article--lead .article-brief {
    display: block;
    max-width: none;
    min-height: 0;
    margin-top: 4px;
    line-height: 1.58;
  }

  @media (min-width: 1100px) {
    :root {
      --radar-wordmark-size: clamp(2.55rem, 3.4vw + 0.7rem, 4.25rem);
      --radar-lead-title-size: clamp(1.65rem, 1.6vw + 0.7rem, 2.55rem);
    }
  }

  .news-list[data-mode="source"] .article--lead .article-title,
  .news-list[data-mode="source"] .article--lead .article-brief {
    max-width: none;
  }

  .news-list[data-mode="source"] .article--lead .article-brief {
    display: block;
    min-height: 0;
    line-height: 1.58;
  }

  .news-list[data-mode="source"][data-hero="image"] .article--lead.has-image .article-media {
    aspect-ratio: auto;
    overflow: visible;
  }

  .news-list[data-mode="source"][data-hero="image"] .article--lead.has-image .article-media img {
    aspect-ratio: 16 / 10;
    height: auto;
    border-radius: 8px;
  }

  .news-hero .article--feature {
    padding: 16px 0;
  }

  .article--feature {
    padding: 16px 32px 16px 0;
  }

  .article--feature .article-title {
    font-size: 1.36rem;
    line-height: 1.2;
  }

  .article--feature .article-byline {
    margin-bottom: 5px;
  }

  /* Suite du fil : pleine largeur sous le bloc magazine */
  .news-tail {
    grid-column: 1 / -1;
    border-top: 2px solid var(--rule-strong);
    padding-top: 6px;
  }

  .news-tail-title {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 14px 0 6px;
    padding: 0;
  }

  /* Cartes fil — Suite du fil + En bref (même gabarit) */
  .news-tail .article--standard,
  .article--compact {
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
  }

  .news-tail-body > .article--standard {
    grid-column: auto;
  }

  .news-tail .article--standard .article-meta,
  .article--compact .article-meta {
    margin-bottom: 4px;
  }

  .news-tail .article--standard .article-title,
  .article--compact .article-title {
    font-size: 1.22rem;
    line-height: 1.2;
    margin-top: 0;
    hyphens: manual;
    -webkit-hyphens: manual;
    word-break: normal;
  }

  .news-tail .article--standard .article-byline,
  .article--compact .article-byline {
    font-size: 0.78rem;
    margin: 2px 0 4px;
  }

  .news-tail .article--standard .article-brief,
  .article--compact .article-brief {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Colonne droite : En bref — même hauteur que la une (stretch + spacer) */
  .brief-rail {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    padding-left: 28px;
    border-left: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    overflow: visible;
    isolation: isolate;
  }

  .brief-rail-title {
    flex: 0 0 auto;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
    padding: 20px 0 8px;
  }

  .brief-rail .article--compact {
    flex: 0 0 auto;
    padding: 9px 0 9px 14px;
    border-left: none;
    overflow: visible;
  }

  .brief-rail-spacer {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
  }

  .news-hero .article--lead,
  .news-hero .article--feature {
    padding-left: 14px;
    overflow: visible;
  }

  .news-hero .article--lead::before,
  .news-hero .article--feature::before,
  .brief-rail .article--compact::before {
    left: 0;
  }

  .brief-rail .article--compact:last-of-type {
    padding-bottom: 8px;
  }

  .brief-rail .article--compact .article-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 0;
  }

  .brief-rail .article--compact .article-brief {
    font-size: 0.86rem;
    line-height: 1.42;
    display: block;
    overflow: visible;
  }

  .brief-rail .article--compact .article-brief-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .brief-rail .article--compact .article-brief.is-truncated .article-brief-text {
    -webkit-line-clamp: 2;
  }

  .brief-rail-spacer {
    flex: 1 1 auto;
    min-height: 0;
  }

  /* Vedettes bureau : extrait complet (pas de clamp), typo intermédiaire */
  .news-hero .article--feature .article-brief {
    display: block;
    overflow: visible;
    font-size: 0.98rem;
    line-height: 1.52;
    max-width: none;
    min-height: 0;
    color: var(--ink-soft);
  }

  .news-hero .article--feature .article-brief-text,
  .news-hero .article--feature .article-brief.is-truncated .article-brief-text {
    display: inline;
    -webkit-line-clamp: unset;
    overflow: visible;
    -webkit-box-orient: initial;
  }

  .site-foot {
    margin-top: 28px;
  }
}

/*
 * Zones sûres iPhone (encoche / coins arrondis / barre d'accueil) :
 * viewport-fit=cover + PWA plein écran étendent la page sous la barre
 * d'état — on consomme les insets (env() = 0 hors PWA / sans encoche).
 * Déclaré en fin de feuille pour l'emporter sur les shorthands padding.
 */
.masthead-inner {
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.tuner {
  padding-top: env(safe-area-inset-top, 0px);
}
.masthead-inner,
.tuner-inner,
.wire {
  padding-left: max(var(--pad), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
}
.toast {
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}

/* ── Soft prompts : installer l’app (mobile) / page d’accueil (bureau) ── */
.engage-prompt {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  padding: 0 max(12px, env(safe-area-inset-left, 0px))
    calc(12px + env(safe-area-inset-bottom, 0px))
    max(12px, env(safe-area-inset-right, 0px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.engage-prompt.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.engage-prompt.is-leaving {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}
.engage-prompt__inner {
  position: relative;
  width: min(420px, 100%);
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid var(--rule);
  background: var(--bg);
  box-shadow:
    0 12px 40px -12px rgba(0, 0, 0, 0.28),
    0 0 0 1px color-mix(in srgb, var(--rule) 60%, transparent);
  color: var(--ink);
  font-family: var(--sans);
}
[data-theme="dark"] .engage-prompt__inner {
  box-shadow:
    0 16px 48px -10px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}
.engage-prompt__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.engage-prompt__close:hover {
  color: var(--ink);
  background: var(--bg-soft);
}
.engage-prompt__icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 6px;
}
.engage-prompt__title {
  margin: 0 28px 6px 0;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.engage-prompt__body {
  margin: 0 0 8px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.engage-prompt__steps {
  margin: 0 0 12px;
  padding: 0 0 0 1.15rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.engage-prompt__steps li {
  margin: 0.28em 0;
}
.engage-prompt__steps code {
  font-size: 0.78em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  word-break: break-all;
}
.engage-prompt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.engage-prompt__btn {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}
.engage-prompt__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.engage-prompt__btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.engage-prompt__btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}
.engage-prompt__btn--quiet {
  border-color: transparent;
  background: transparent;
  font-weight: 500;
  color: var(--muted);
  padding-left: 8px;
  padding-right: 8px;
}
.engage-prompt__btn--quiet:hover {
  color: var(--ink-soft);
  background: transparent;
  border-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
