/* Token FM, lecteur à intégrer sur un autre site (/integrer/…) : une page seule, sans le
   reste du site. Jetons et couleurs des formats repris de site.css (à garder en accord). */

@font-face {
  font-family: "Jakarta";
  src: url("/static/fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --orange: #ff6e1f; --orange-hover: #ff8a47; --on-orange: #111113;
  --bg: #ffffff; --surface-2: #efebe3; --line: #e2ddd2;
  --fg: #111113; --fg-2: #45454c; --fg-3: #6a6a72; --accent-ink: #b9400a;
  --f-rdv: #9a3508; --f-dossier: #1a4fa0; --f-chronique: #5b3aa8; --f-breve: #08645a; --f-motia: #962862;
  --f-decryptage: #006f8c; --f-presse: #b0223c; --f-papier: #3f51c4; --f-chiffre: #855a00; --f-outil: #1c7038; --f-histoire: #8a4f12; --f-debat: #566200; --f-reportage: #8f2d8f;
  --font: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141416; --surface-2: #1f1f23; --line: #2a2a30;
    --fg: #f4f3f0; --fg-2: #c3c2c8; --fg-3: #9796a0; --accent-ink: #ff8a4c;
    --f-rdv: #ff8a4c; --f-dossier: #7fb0ff; --f-chronique: #b79cff; --f-breve: #4fd1bf; --f-motia: #f48cc0;
    --f-decryptage: #5ec8ef; --f-presse: #ff7a8a; --f-papier: #9aa6ff; --f-chiffre: #f2b84b; --f-outil: #6fd68a; --f-histoire: #d99a5b; --f-debat: #c3dd63; --f-reportage: #e39be3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141416; --surface-2: #1f1f23; --line: #2a2a30;
  --fg: #f4f3f0; --fg-2: #c3c2c8; --fg-3: #9796a0; --accent-ink: #ff8a4c;
  --f-rdv: #ff8a4c; --f-dossier: #7fb0ff; --f-chronique: #b79cff; --f-breve: #4fd1bf; --f-motia: #f48cc0;
  --f-decryptage: #5ec8ef; --f-presse: #ff7a8a; --f-papier: #9aa6ff; --f-chiffre: #f2b84b; --f-outil: #6fd68a; --f-histoire: #d99a5b; --f-debat: #c3dd63; --f-reportage: #e39be3;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; font: 400 15px/1.45 var(--font); color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* le cadre de l'iframe fait la carte : le lecteur remplit sa hauteur */
.player { display: flex; flex-direction: column; justify-content: space-between; gap: .45rem; height: 100%; padding: .8rem 1rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }

.top { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: .4rem; color: var(--fg); font-weight: 800; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.brand img { display: block; width: 1.25rem; height: 1.25rem; }
.date { margin-left: auto; color: var(--fg-3); font-size: .78rem; white-space: nowrap; }

.badge { display: inline-flex; align-items: center; padding: .06rem .42rem; border-radius: 6px; background: color-mix(in srgb, var(--fam, var(--fg-3)) 13%, transparent); color: var(--fam, var(--fg-2)); font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; line-height: 1.55; }
.badge:empty { display: none; }
.fam-rdv { --fam: var(--f-rdv); } .fam-dossier { --fam: var(--f-dossier); } .fam-chronique { --fam: var(--f-chronique); }
.fam-breve { --fam: var(--f-breve); } .fam-motia { --fam: var(--f-motia); }
.fam-decryptage { --fam: var(--f-decryptage); } .fam-presse { --fam: var(--f-presse); } .fam-papier { --fam: var(--f-papier); }
.fam-chiffre { --fam: var(--f-chiffre); } .fam-outil { --fam: var(--f-outil); } .fam-histoire { --fam: var(--f-histoire); } .fam-debat { --fam: var(--f-debat); } .fam-reportage { --fam: var(--f-reportage); }

.live-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .06rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--accent-ink); font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.live-pill i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--orange); }
@media (prefers-reduced-motion: no-preference) { .is-playing .live-pill i { animation: pulse 1.6s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: .35; } }

.title { margin: 0; font-weight: 700; font-size: 1rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.title .badge { margin-right: .4rem; vertical-align: .12em; }

.controls { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.play { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: var(--orange); color: var(--on-orange); cursor: pointer; }
.play:hover { background: var(--orange-hover); }
.play svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.play .when-playing, .is-playing .play .when-paused { display: none; }
.is-playing .play .when-playing { display: block; }
.is-loading .play { opacity: .75; }

.seek { flex: 1; min-width: 0; height: 1.5rem; margin: 0; background: transparent; accent-color: var(--orange); cursor: pointer; }
.time { flex: none; color: var(--fg-2); font-size: .8rem; font-variant-numeric: tabular-nums; }
.speed { flex: none; min-width: 2.6rem; height: 2rem; padding: 0 .45rem; border: 1px solid var(--fg-3); border-radius: 999px; background: transparent; color: var(--fg-2); font: inherit; font-size: .74rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; cursor: pointer; }
.speed:hover { color: var(--fg); }
.speed.is-on { border-color: var(--accent-ink); color: var(--accent-ink); }
.onair { flex: 1; min-width: 0; color: var(--fg-2); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gone { margin: 0; color: var(--fg-2); font-size: .9rem; }
.foot { margin: 0; color: var(--fg-3); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot a { color: var(--fg-2); font-weight: 600; }

@media (max-width: 22rem) {
  .date { display: none; }
  .time { font-size: .74rem; }
}
.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; }
/* fenêtre détachée (/lecteur/…) : la fenêtre fait le cadre */
.is-popup { border: 0; border-radius: 0; }
.popup-hint { margin: 0; color: var(--accent-ink); font-size: .8rem; font-weight: 700; }
