/* f5zzo.fr - feuille de style commune (accueil et pages balises) */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); }

/* Theme sombre par defaut, clair si le systeme le demande */
:root {
	--bg: #0e1316; --bg2: #11171b; --card: #151c21; --card2: #1c252c;
	--line: #24303a; --line2: #34424d;
	--text: #e6edf1; --text2: #cfd9df; --muted: #b7c3cc; --dim: #9aa9b4;
	--accent: #f0a73a; --accent-ink: #14100a; --accent-bg: #2a2214; --link: #f0b250;
	--ok: #7fe0b4; --ok-bg: #143326;
	--code: #0a0e10;
	color-scheme: dark;
}
@media (prefers-color-scheme: light) {
	:root {
		--bg: #f6f7f5; --bg2: #eef1ef; --card: #ffffff; --card2: #eef1f3;
		--line: #dde3e7; --line2: #c3ccd3;
		--text: #141a1e; --text2: #2b353c; --muted: #46535c; --dim: #5d6a73;
		--accent: #a45f00; --accent-ink: #ffffff; --accent-bg: #fbedd6; --link: #8a4f00;
		--ok: #0d6b45; --ok-bg: #dcf3e8;
		--code: #f1f3f4;
		color-scheme: light;
	}
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 16px; line-height: 1.55; }
a { color: var(--link); }
a:hover { color: var(--text); }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
[hidden] { display: none !important; }

/* En-tete */
.top { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
html { scroll-padding-top: 76px; }   /* ancres (#balises, #doc) pas cachees sous l'en-tete fixe */
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand span { font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 18px; letter-spacing: .02em; }
.brand svg { stroke: var(--accent); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; padding: 12px 0; }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.hdr-r { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; justify-content: flex-end; }
.lang { display: inline-flex; align-items: center; padding: 6px; border: 1px solid var(--line2); border-radius: 6px; line-height: 0; }
.lang svg { display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.lang:hover, .lang:focus-visible { border-color: var(--accent); }

/* Cartes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card h2 { margin: 0 0 14px; font-size: 20px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.stale { opacity: .55; }
dl.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
dl.kv dt { color: var(--dim); }
dl.kv dd { margin: 0; }

.badge { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--card2); color: var(--dim); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.air { background: var(--accent-bg); color: var(--accent); }
.badge.nodot::before { display: none; }

.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { border: 1px solid var(--line2); color: var(--text); font-weight: 500; }

.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 24px; font-size: 14px; color: var(--dim); }

/* ---- Accueil ---- */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 72px; padding-bottom: 56px; }
.hero-text { flex: 999 1 520px; min-width: 0; }
.kicker { margin: 0 0 16px; font-family: "IBM Plex Mono", monospace; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { margin: 0 0 24px; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -.01em; max-width: 20ch; }
.lead { margin: 0 0 32px; font-size: 19px; color: var(--muted); max-width: 58ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.now { flex: 1 1 340px; min-width: 0; padding: 20px; }
.now-title { margin: 0 0 14px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.now-list { display: flex; flex-direction: column; gap: 10px; }
.now-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 8px; background: var(--card2); color: var(--text); text-decoration: none; }
.now-item.planned { background: none; border: 1px dashed var(--line2); }
.now-item .ni { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.now-item .ni > b { margin-bottom: 2px; }
.now-item .l { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.now-item .l b { color: var(--text); font-family: "IBM Plex Mono", monospace; }
.now-item .l .v { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--text2); }
.now-item .side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.go { font-size: 13px; font-weight: 600; color: var(--link); white-space: nowrap; }
a.now-item, a.bcard { transition: border-color .15s, background-color .15s; border: 1px solid transparent; }
a.bcard { border-color: var(--line2); }
a.now-item:hover, a.bcard:hover, a.now-item:focus-visible, a.bcard:focus-visible { border-color: var(--accent); }
a.now-item:hover .go, a.bcard:hover .go { text-decoration: underline; }
.bcard .go { margin-top: auto; }
.band { border-top: 1px solid var(--line); }
.band.alt { background: var(--bg2); }
.band > .wrap { padding-top: 56px; padding-bottom: 56px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.grid3 h2 { font-size: 22px; margin: 0 0 12px; }
.grid3 ul { margin: 0 0 20px; padding-left: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.photo { position: relative; display: block; overflow: hidden; border-radius: 6px; aspect-ratio: 1400 / 1004; cursor: zoom-in; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
.photo img { display: block; width: 100%; height: auto; }
.photo .zoom { position: absolute; inset: 0; background-repeat: no-repeat; opacity: 0; transition: opacity .15s; pointer-events: none; }
.photo.zooming .zoom { opacity: 1; }
.photo-cap { margin: 10px 0 0; font-size: 13px; color: var(--dim); }
@media (hover: none) { .photo { cursor: pointer; } }
.lightbox { padding: 0; border: 0; background: none; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; cursor: zoom-out; }
.lightbox::backdrop { background: rgba(0,0,0,.85); }
.lightbox img { display: block; width: auto; height: auto; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); margin: auto; position: absolute; inset: 0; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.lb-close { position: fixed; top: 12px; right: 12px; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #111; font-size: 28px; line-height: 1; cursor: pointer; }
body.lb-open { overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-family: "IBM Plex Mono", monospace; font-size: 13px; }
.chips span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); }
.split { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.split > div { flex: 1 1 340px; min-width: 0; }
.split h2 { margin: 0 0 16px; font-size: 30px; }
pre.code { flex: 999 1 520px; min-width: 0; margin: 0; overflow-x: auto; background: var(--code); border: 1px solid var(--line); border-radius: 12px; padding: 24px; font-family: "IBM Plex Mono", monospace; font-size: 14px; line-height: 1.7; color: var(--text2); }
pre.code .c { color: var(--dim); }
.doc { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.doc h2 { margin: 0 0 8px; font-size: 26px; }
.beacons { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.bcard { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 12px; background: var(--card); border: 1px solid var(--line2); color: var(--text); text-decoration: none; }
.bcard.planned { background: none; border-style: dashed; }
.bcard .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bcard .big { font-family: "IBM Plex Mono", monospace; font-size: 28px; font-weight: 600; }

/* ---- Page balise ---- */
.page { display: flex; flex-direction: column; gap: 24px; padding-top: 32px; padding-bottom: 64px; }
.bhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.bhead h1 { margin: 0; font-family: "IBM Plex Mono", monospace; font-size: clamp(28px, 4vw, 40px); font-weight: 600; }
.bhead .title { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.clock { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.clock .t { font-family: "IBM Plex Mono", monospace; font-size: 28px; font-weight: 500; }
.clock .t small { font-size: 16px; color: var(--dim); }
.banner { border-radius: 14px; padding: 18px 24px; background: var(--card2); border: 1px solid var(--line2); font-size: 17px; }
.intro { margin: 0; max-width: 75ch; color: var(--muted); font-size: 15px; }
.onair { border-color: var(--line2); display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; }
.onair .main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.onair h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.onair h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--line2); }
.onair.live h2 { color: var(--accent); }
.onair.live h2::before { background: var(--accent); }
.onair.veille h2 { color: var(--ok); }
.onair.veille h2::before { background: var(--ok); }
.onair .mode { font-family: "IBM Plex Mono", monospace; font-size: clamp(30px, 4.5vw, 44px); font-weight: 600; line-height: 1.1; }
.onair .msg { font-family: "IBM Plex Mono", monospace; font-size: 22px; color: var(--text2); }
.onair .line1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > div { height: 100%; width: 0; border-radius: 999px; background: var(--accent); }
.onair.veille .bar > div { background: var(--ok); }
.onair .line2 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-family: "IBM Plex Mono", monospace; font-size: 14px; color: var(--dim); }
.onair dl { flex: 1 1 260px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > .plan { flex: 999 1 600px; min-width: 0; }
.cols > .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.tablebox { overflow-x: auto; }
table.plan-t { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.plan-t th { text-align: left; color: var(--dim); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; font-weight: 500; padding: 8px 10px; }
.plan-t td { padding: 9px 10px; border-top: 1px solid var(--line); font-family: "IBM Plex Mono", monospace; }
.plan-t td.m { font-weight: 600; }
.plan-t td.r { text-align: right; }
.plan-t tr.minor td { color: var(--dim); font-size: 14px; }
.plan-t tr.cur td { background: var(--accent-bg); color: var(--accent); }
.plan-t tr.var td.m::after { content: " ≈"; color: var(--dim); font-weight: 400; }
@media (max-width: 640px) {
	.clock { text-align: left; }
	table.plan-t { min-width: 0; font-size: 14px; }
	.plan-t th, .plan-t td { padding: 8px 6px; }
	.plan-t .rf { display: none; }
}
.plan-opts { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-top: 14px; font-size: 13px; color: var(--dim); }
.plan-opts label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; color: var(--muted); font-size: 14px; }
.plan-opts input { width: 18px; height: 18px; accent-color: var(--accent); }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.metrics div { display: flex; flex-direction: column; }
.metrics span { font-size: 13px; color: var(--dim); }
.metrics b { font-family: "IBM Plex Mono", monospace; font-weight: 500; font-size: 18px; }
.metrics b.xl { font-size: 26px; }
.ref { display: flex; flex-wrap: wrap; gap: 24px 40px; }
.ref > div { flex: 1 1 300px; min-width: 0; }
.ref figure { flex: 999 1 480px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ref figcaption { font-size: 13px; color: var(--dim); }
.ref svg { width: 100%; height: auto; }
.ref svg .grid { stroke: var(--line); }
.ref svg .zero { stroke: var(--line2); stroke-dasharray: 4 4; }
.ref svg .curve { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.ref svg text { fill: var(--dim); font-size: 11px; font-family: "IBM Plex Mono", monospace; }
.ref-kv { grid-template-columns: max-content 1fr; }
.ref-kv dd { white-space: nowrap; }
.ref-kv sup, .ref figcaption sup { font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: .72em; line-height: 0; position: relative; top: -.1em; margin-left: 1px; }
.ref-note { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--dim); }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.help-grid article { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.help-grid h3 { margin: 0 0 8px; font-family: "IBM Plex Mono", monospace; font-size: 18px; }
.help-grid p { margin: 0; color: var(--muted); font-size: 15px; }
details.script summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
details.script pre { margin: 12px 0 0; max-height: 480px; overflow: auto; background: var(--code); border: 1px solid var(--line); border-radius: 10px; padding: 16px; font-family: "IBM Plex Mono", monospace; font-size: 13px; line-height: 1.6; color: var(--text2); tab-size: 4; }
.conn { font-size: 13px; color: var(--dim); }

/* Historique de l'ampli (hist.js) : couleurs des series validees
   (bleu / orange, daltonisme et contraste) pour chaque theme */
.hist { --s1: #3987e5; --s2: #d95926; }
@media (prefers-color-scheme: light) { .hist { --s1: #2a78d6; --s2: #eb6834; } }
.hist-ctl { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: 14px; min-height: 40px; padding: 0 14px; border: 0; border-left: 1px solid var(--line2); background: none; color: var(--muted); cursor: pointer; }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.hist-opts { display: flex; flex-wrap: wrap; gap: 0 18px; }
.hist-opts label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; color: var(--muted); font-size: 14px; }
.hist-opts input { width: 18px; height: 18px; accent-color: var(--accent); }
.hist-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px 28px; margin-top: 8px; }
.hchart { margin: 0; min-width: 0; }
.hchart figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; margin-bottom: 4px; }
.hleg { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.hleg b, .htip b { color: var(--text); font-family: "IBM Plex Mono", monospace; font-weight: 500; }
.key { display: inline-block; width: 14px; height: 2px; border-radius: 1px; vertical-align: middle; margin-right: 6px; background: var(--s1); }
.key.s2 { background: var(--s2); }
.hplot { position: relative; }
.hplot svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.hplot .grid { stroke: var(--line); stroke-width: 1; }
.hplot .axis, .hplot .tick { stroke: var(--line2); stroke-width: 1; }
.hplot text { fill: var(--dim); font-size: 11px; font-family: "IBM Plex Mono", monospace; }
.hplot .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.hplot .line.s1 { stroke: var(--s1); }
.hplot .line.s2 { stroke: var(--s2); }
.hplot circle.s1 { fill: var(--s1); }
.hplot circle.s2 { fill: var(--s2); }
.hplot circle.hov { stroke: var(--card); stroke-width: 2; }
.hplot .cross { stroke: var(--muted); stroke-width: 1; }
.hplot .hit { fill: transparent; pointer-events: all; cursor: crosshair; }
.htip { position: absolute; top: 4px; z-index: 2; pointer-events: none; padding: 8px 10px; border-radius: 8px; background: var(--card2); border: 1px solid var(--line2); box-shadow: 0 4px 14px rgba(0,0,0,.25); font-size: 13px; line-height: 1.5; white-space: nowrap; }
.hplot .grid.zero { stroke: var(--line2); }
.now-item .l .nw { white-space: nowrap; }
.now-item.ref-item { gap: 6px; }
.ref-item .l { white-space: nowrap; }
