/*
 * F4IOZ site — « Direct HF »: the head (the station, the dial in big digits, the S-meter's needle, the counters, the
 * tabs, full screen), the waterfall (a smooth spectrum over it, its labels as bubbles), the CW skimmer's traces as
 * teleprinters and its conversations, the digital decodes, the map and the bands, the stations heard; a quiet waiting
 * screen off line. The site's tokens (light and dark follow); the waterfall and the spectrum stay dark, as on the
 * QO-100 page. On one desktop screen (1100 × 640 and more) the page never scrolls: each frame does. Phones stack.
 */
.dhf { --dhf-nuit: #040814; --dhf-cq: var(--green); --dhf-qso: var(--info); --dhf-ok: var(--accent); --dhf-moi: #FF4FA3;
  display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.dhf .card { margin-bottom: 0; }
.dhf .mono { font-family: var(--font-mono); }
.dhf .card-head { gap: 8px; }
.dhf-drapeau { font-family: Drapeaux, var(--font-sans); font-style: normal; }

/* ------------------------------------------------------------ the head */
.dhf-tete { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 8px 16px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 7%, var(--panel)), var(--panel) 45%); }
.dhf-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dhf-titre { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.dhf-titre b { font-size: 15px; letter-spacing: .01em; }
.dhf-titre span { font-size: 12px; }
.dhf-lecture { color: var(--text-muted); font-size: 11px !important; }
.dhf-afficheur { display: flex; align-items: center; gap: 12px; padding: 4px 14px; border-radius: var(--r-m);
  background: var(--dhf-nuit); border: 1px solid color-mix(in srgb, var(--accent) 25%, #1b2733);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .02); }
.dhf-freq { display: flex; align-items: baseline; white-space: pre; font: 700 30px/1.1 var(--font-mono); color: #5ff2d6; letter-spacing: .02em;
  text-shadow: 0 0 12px rgba(63, 224, 200, .55); font-variant-numeric: tabular-nums; }
.dhf-freq:empty { display: none; }
.dhf-freq .z { color: rgba(95, 242, 214, .16); text-shadow: none; }
.dhf-freq .sep { color: rgba(95, 242, 214, .55); }
.dhf-freq .sep:not(:empty) { margin: 0 -.06em; }
.dhf-freq .u { margin-left: 8px; font-size: 12px; font-weight: 600; color: rgba(95, 242, 214, .6); text-shadow: none; letter-spacing: .08em; }
.dhf-freq .ch { display: inline-block; }
.dhf-freq .ch.change { animation: dhf-chiffre .45s cubic-bezier(.2, .7, .3, 1); }
@keyframes dhf-chiffre { from { transform: translateY(-.35em); opacity: .2; filter: blur(1px); } to { transform: none; opacity: 1; filter: none; } }
.dhf-freq.bande-seule { font-size: 26px; }
.dhf-puces { display: flex; flex-direction: column; gap: 3px; }
.dhf-mode, .dhf-bande { padding: 0 8px; border-radius: 999px; border: 1px solid rgba(95, 242, 214, .35); font: 700 11px/1.6 var(--font-mono); color: #9ff5e5;
  text-align: center; letter-spacing: .06em; }
.dhf-mode:empty, .dhf-bande:empty { display: none; }
.dhf-smetre { margin: 0; display: flex; flex-direction: column; align-items: center; width: 132px; }
.dhf-smetre svg { width: 132px; height: 66px; display: block; overflow: visible; }
.dhf-smetre figcaption { font-size: 11px; color: var(--text-dim); line-height: 1.2; margin-top: 2px; min-height: 1.2em; }
.sm-fond { fill: var(--dhf-nuit); stroke: color-mix(in srgb, var(--accent) 22%, #1b2733); }
.sm-arc { fill: none; stroke: #6d8193; stroke-width: 1.2; }
.sm-arc.rouge { stroke: #ff6b5e; stroke-width: 2; }
.sm-graduation { stroke: #8fa3b5; stroke-width: 1; }
.sm-graduation.rouge { stroke: #ff6b5e; }
.sm-txt { fill: #b5c4d1; font: 600 7.5px var(--font-mono); text-anchor: middle; }
.sm-txt.rouge { fill: #ff8a7e; }
.sm-aiguille { stroke: #ffb454; stroke-width: 1.6; stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(255, 180, 84, .7)); }
.sm-pivot { fill: #ffb454; }
.sm-crete { fill: #ff6b5e; }
.dhf-compteurs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; flex: 1 1 auto; justify-content: flex-end; }
.dhf-compteurs > div { min-width: 74px; padding: 3px 10px 4px; border-radius: var(--r-m); background: var(--well); border: 1px solid var(--border); }
.dhf-compteurs dt { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; letter-spacing: .02em; }
.dhf-compteurs dd { margin: 0; font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.25; white-space: nowrap; }
.dhf-compteurs [data-c="utc"] dd { color: var(--accent); }
.dhf-compteurs dd.bouge { animation: dhf-bouge .6s ease; }
@keyframes dhf-bouge { 0% { color: var(--accent); } 100% { } }
.dhf-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dhf-kiosque-btn { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text-dim); font: 600 12.5px/1.6 var(--font-sans); cursor: pointer; }
.dhf-kiosque-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dhf-kiosque-btn:hover, .dhf-kiosque-btn:focus-visible { border-color: var(--accent); color: var(--accent); }

/* The site not answering for a moment: the light amber, nothing else (the page retries by itself). */
.dhf.reconnexion .dhf-point.vif { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 25%, transparent); }
.dhf-fps { position: fixed; right: 8px; bottom: 8px; z-index: 99; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .66); color: #5ff2d6; font-size: 12px; }

/* ------------------------------------------------------------ off line: a quiet waiting screen */
.dhf-hors { align-items: center; justify-content: center; text-align: center; padding: 48px 24px; gap: 8px; flex: 1;
  background: radial-gradient(600px 300px at 50% 35%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%), var(--panel); }
.dhf-ondes { position: relative; width: 120px; height: 120px; display: grid; place-items: center; margin-bottom: 8px; }
.dhf-ondes .ico { width: 40px; height: 40px; stroke: var(--text-muted); stroke-width: 1.4; fill: none; position: relative; }
.dhf-ondes i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--accent) 50%, transparent); opacity: 0;
  animation: dhf-onde 4.5s cubic-bezier(.2, .6, .4, 1) infinite; }
.dhf-ondes i:nth-child(2) { animation-delay: 1.5s; } .dhf-ondes i:nth-child(3) { animation-delay: 3s; }
@keyframes dhf-onde { 0% { transform: scale(.3); opacity: .8; } 100% { transform: scale(1.15); opacity: 0; } }
.dhf-hors h2 { margin: 0; font-size: 24px; letter-spacing: .01em; }
.dhf-hors p { margin: 0; max-width: 560px; color: var(--text-dim); }
.dhf-hors-infos { display: flex; gap: 10px; margin: 10px 0 4px; flex-wrap: wrap; justify-content: center; }
.dhf-hors-infos > div { padding: 6px 16px; border-radius: var(--r-m); background: var(--well); border: 1px solid var(--border); min-width: 150px; }
.dhf-hors-infos dt { font-size: 11px; color: var(--text-muted); }
.dhf-hors-infos dd { margin: 0; font-weight: 600; }
.dhf-hors[hidden], .dhf-grille[hidden] { display: none !important; }

/* ------------------------------------------------------------ the grid */
.dhf-grille { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); animation: dhf-apparait .5s ease; }
.dhf-grille > .card { min-height: 0; }
@keyframes dhf-apparait { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ the waterfall */
.dhf-outils { display: flex; align-items: center; gap: 6px; flex: none; }
.dhf-palettes { display: inline-flex; gap: 3px; padding: 2px; border-radius: 999px; background: var(--well); border: 1px solid var(--border); }
.dhf-pal { width: 22px; height: 14px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; padding: 0; }
.dhf-pal[aria-checked="true"] { border-color: var(--text); box-shadow: 0 0 0 1px var(--panel) inset; }
.p-classique { background: linear-gradient(90deg, #040814, #0a2a6e, #14aac8, #f0c83c, #ff6e32, #fff5eb); }
.p-viridis { background: linear-gradient(90deg, #440154, #3b528b, #21918c, #5ec962, #fde725); }
.p-inferno { background: linear-gradient(90deg, #000004, #420a68, #932667, #dd513a, #fca50a, #fcffa4); }
.dhf-btn { padding: 0 9px; height: 20px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-dim);
  font: 600 11px/18px var(--font-sans); cursor: pointer; }
.dhf-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.dhf-btn:hover { border-color: var(--border-strong); color: var(--text); }
.dhf-chute-corps { position: relative; display: flex; flex-direction: column; padding: 8px 10px 10px; min-height: 0; flex: 1; }
.dhf-chute canvas { display: block; width: 100%; }
.dhf-spectre { height: 96px; flex: none; border-radius: var(--r-s) var(--r-s) 0 0; background: var(--dhf-nuit); }
.dhf-echelle { height: 18px; flex: none; background: var(--dhf-nuit); border-top: 1px solid rgba(140, 170, 200, .12); }
.dhf-cascade-zone { position: relative; flex: none; height: 300px; border-radius: 0 0 var(--r-s) var(--r-s); overflow: hidden; background: var(--dhf-nuit);
  touch-action: pan-y; cursor: grab; }
.dhf-cascade-zone.tire { cursor: grabbing; }
.dhf-cascade { position: absolute; inset: 0; height: 100% !important; }
.dhf-aide-zoom { position: absolute; right: 8px; bottom: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(4, 8, 20, .66); color: #b7c6d4;
  font-size: 10.5px; pointer-events: none; opacity: 0; transition: opacity .5s; }
.dhf-cascade-zone:hover .dhf-aide-zoom { opacity: 1; }
.dhf-etiquettes { position: absolute; left: 0; right: 0; top: 0; height: 0; pointer-events: none; }
.dhf-et { position: absolute; left: 0; top: 6px; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px 0 6px; border-radius: 10px;
  border: 1px solid rgba(200, 215, 230, .35); background: rgba(8, 14, 26, .78); color: #e8f0f7; font: 700 11px/18px var(--font-mono); white-space: nowrap;
  cursor: pointer; pointer-events: auto; backdrop-filter: blur(3px); box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
  transition: transform .6s cubic-bezier(.2, .7, .3, 1), opacity .5s, border-color .3s, background .3s; will-change: transform; }
.dhf-et::after { content: ""; position: absolute; left: 50%; top: 19px; width: 1px; height: var(--queue, 10px);
  background: linear-gradient(currentColor, transparent); opacity: .55; }
.dhf-et i { font-style: normal; font-weight: 500; opacity: .7; font-size: 10px; }
.dhf-et .dhf-drapeau { font-size: 11px; }
.dhf-et.cq { border-color: color-mix(in srgb, var(--dhf-cq) 80%, transparent); color: #b9f5cf; background: rgba(10, 46, 26, .82); }
.dhf-et.qso { border-color: color-mix(in srgb, #6f8cff 85%, transparent); color: #cbd6ff; background: rgba(16, 24, 64, .82); }
.dhf-et.valide::before { content: "✓"; color: #5ff2d6; font-size: 10px; }
.dhf-et.autre { border-style: dashed; }
.dhf-et.moi { border-color: var(--dhf-moi); color: #ffd0e8; }
.dhf-et.nouveau { opacity: 0; }
.dhf-et.sort { opacity: 0; }
.dhf-et.choisi, .dhf-et:hover, .dhf-et:focus-visible { border-color: #5ff2d6; color: #fff; z-index: 3; box-shadow: 0 0 0 2px rgba(95, 242, 214, .25), 0 2px 10px rgba(0, 0, 0, .5); }
.dhf-lu { position: relative; margin: 0 10px 10px; padding: 8px 34px 8px 12px; border-radius: var(--r-m); background: var(--well); border: 1px solid var(--border); font-size: 13px;
  animation: dhf-apparait .3s ease; }
.dhf-lu-txt { display: block; margin-top: 3px; word-break: break-word; }
.dhf-lu-fermer { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: var(--text-dim); font-size: 18px; cursor: pointer; }

/* ------------------------------------------------------------ the CW skimmer: traces and conversations */
.dhf-segments { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--well); border: 1px solid var(--border); flex: none; }
.dhf-segments button { padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--text-dim); font: 600 11.5px/20px var(--font-sans); cursor: pointer; }
.dhf-segments button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.dhf-segments b { color: var(--accent); }
.dhf-segments b:empty { display: none; }
.dhf-traces { overflow-y: auto; padding: 6px 10px 8px; display: flex; flex-direction: column; gap: 4px; min-height: 0; flex: 1; }
.dhf-trace { display: grid; grid-template-columns: 8.2em minmax(0, 1fr); gap: 1px 10px; align-items: center; padding: 4px 8px; border-radius: var(--r-m);
  border: 1px solid transparent; background: var(--well); transition: opacity .5s, background .3s, border-color .3s; cursor: pointer; }
.dhf-trace:hover, .dhf-trace.choisi { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.dhf-trace.nouveau { animation: dhf-apparait .45s ease; }
.dhf-trace.sort { opacity: 0; }
.dhf-trace-qui { display: flex; align-items: center; gap: 5px; min-width: 0; font: 700 12.5px/1.3 var(--font-mono); }
.dhf-trace-qui b { overflow: hidden; text-overflow: ellipsis; }
.dhf-trace.cq .dhf-trace-qui b { color: var(--dhf-cq); }
.dhf-trace.qso .dhf-trace-qui b { color: var(--dhf-qso); }
.dhf-trace-info { grid-column: 1; font: 400 10.5px/1.2 var(--font-mono); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dhf-telex { grid-column: 2; grid-row: 1 / 3; display: flex; justify-content: flex-end; overflow: hidden; white-space: pre; font: 500 13px/1.5 var(--font-mono);
  color: var(--text); mask-image: linear-gradient(90deg, transparent, #000 18%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%); }
.dhf-telex span.d { color: var(--text-muted); opacity: .55; }
.dhf-telex span.n { animation: dhf-neuf 1.6s ease-out; }
@keyframes dhf-neuf { from { color: var(--accent); text-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent); } }
.dhf-telex span.d.n { animation: none; }
.dhf-telex::after { content: ""; flex: none; width: .55em; margin-left: 1px; background: var(--accent); opacity: 0; }
.dhf-trace.tape .dhf-telex::after { opacity: .8; animation: dhf-curseur 1s steps(2) infinite; }
@keyframes dhf-curseur { 50% { opacity: 0; } }
.dhf-fil { overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; }
.dhf-fil[hidden], .dhf-traces[hidden] { display: none; }
.dhf-qso { display: flex; flex-direction: column; gap: 5px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.dhf-qso:last-child { border-bottom: 0; }
.dhf-qso-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.dhf-badge { padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 700 10.5px/1.7 var(--font-sans); text-transform: uppercase; letter-spacing: .04em; }
.dhf-bulle { align-self: flex-start; max-width: 88%; padding: 6px 10px; border-radius: 12px 12px 12px 3px; background: var(--panel-2); border: 1px solid var(--border); }
.dhf-bulle.droite { align-self: flex-end; border-radius: 12px 12px 3px 12px; background: color-mix(in srgb, var(--info) 14%, var(--panel)); }
.dhf-bulle.moi { border-color: var(--dhf-moi); }
.dhf-bulle.nouveau { animation: dhf-apparait .4s ease; }
.dhf-qui { display: block; font-size: 10.5px; color: var(--text-muted); font-family: var(--font-mono); }
.dhf-dit { display: block; font-size: 13px; word-break: break-word; }

/* ------------------------------------------------------------ the digital decodes */
.dhf-num-corps, .dhf-ent-corps { overflow: auto; padding: 6px 10px 8px; min-height: 0; flex: 1; }
.dhf-decodes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dhf-dec { display: grid; grid-template-columns: 4.3em 2.9em 2.6em minmax(0, 1fr); gap: 0 8px; align-items: center; padding: 3px 6px; border-radius: var(--r-s);
  font: 400 12px/1.45 var(--font-mono); border-bottom: 1px solid var(--td-border); }
.dhf-dec.nouveau { animation: dhf-entree .55s cubic-bezier(.2, .7, .3, 1); }
@keyframes dhf-entree { from { opacity: 0; transform: translateX(-10px); background: var(--accent-soft); } 60% { background: var(--accent-soft); } to { opacity: 1; transform: none; } }
.dhf-dec time { color: var(--text-muted); }
.dhf-dec .m { font: 700 10px/16px var(--font-sans); text-align: center; border-radius: 4px; background: var(--panel-2); color: var(--text-dim); letter-spacing: .04em; }
.dhf-dec .m.ft8 { color: var(--info); } .dhf-dec .m.ft4 { color: color-mix(in srgb, var(--info) 50%, #c040ff); }
.dhf-dec .snr { text-align: right; color: var(--text-dim); }
.dhf-dec .snr.fort { color: var(--green); } .dhf-dec .snr.faible { color: var(--text-muted); }
.dhf-dec .txt { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.dhf-dec .txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dhf-dec .txt b { color: var(--text); }
.dhf-dec .pays { flex: none; margin-left: auto; color: var(--text-muted); font: 400 11px var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 9em; }
.dhf-dec.cq .txt span { color: var(--green); }
.dhf-dec.moi { background: color-mix(in srgb, var(--dhf-moi) 16%, transparent); }
.dhf-dec-creneau { padding: 5px 6px 2px; font: 600 10.5px/1.2 var(--font-sans); color: var(--text-muted); letter-spacing: .05em; text-transform: uppercase; }
.dhf-textes { display: grid; gap: 8px; margin-bottom: 8px; }
.dhf-textes:empty { display: none; }
.dhf-texte { margin: 0; }
.dhf-texte figcaption { font: 700 11px/1.4 var(--font-sans); color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.dhf-texte pre { margin: 2px 0 0; max-height: 92px; overflow-y: auto; padding: 6px 8px; border-radius: var(--r-s); background: var(--well); border: 1px solid var(--border);
  font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }

/* ------------------------------------------------------------ the map and the bands */
.dhf-carte-corps { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 10px; min-height: 0; flex: 1; }
.dhf-monde { display: block; width: 100%; flex: none; aspect-ratio: 2 / 1; max-height: 78%; border-radius: var(--r-m); background: var(--m-ocean); }
.dhf-bandes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; align-items: end; flex: 1 1 auto; min-height: 56px; max-height: 120px; }
.dhf-bandes:empty { display: none; }
.dhf-bande-c { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; gap: 2px; }
.dhf-bande-c i { display: block; width: 100%; max-width: 26px; border-radius: 4px 4px 1px 1px; background: var(--bc, var(--accent)); height: 0; min-height: 2px;
  transition: height .8s cubic-bezier(.2, .7, .3, 1); box-shadow: 0 0 10px color-mix(in srgb, var(--bc, var(--accent)) 35%, transparent); }
.dhf-bande-c.vide i { opacity: .25; box-shadow: none; }
.dhf-bande-c b { font: 600 10px/1 var(--font-mono); color: var(--text-dim); }
.dhf-bande-c span { font: 400 9.5px/1 var(--font-mono); color: var(--text-muted); }
.dhf-bande-c.actuelle b { color: var(--accent); }
.dhf-pays { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; overflow: hidden; flex: 0 1 auto; min-height: 0; }
.dhf-pays:empty { display: none; }
.dhf-pays li { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--well); border: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-dim); white-space: nowrap; }
.dhf-pays li b { font: 700 11px var(--font-mono); color: var(--text); }

/* ------------------------------------------------------------ heard in the hour */
.dhf-ent-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.dhf-ent-liste li { display: grid; grid-template-columns: 1.4em minmax(5.5em, auto) minmax(0, 1fr) auto; gap: 6px; align-items: baseline; font-size: 12.5px; padding: 3px 4px;
  border-bottom: 1px solid var(--td-border); border-radius: 4px; transition: background 1.2s; }
.dhf-ent-liste li.nouveau { background: var(--accent-soft); }
.dhf-ent-liste li b { font-family: var(--font-mono); }
.dhf-ent-liste li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); font-size: 12px; }
.dhf-ent-liste li time { color: var(--text-muted); font: 11px var(--font-mono); }
.dhf-ent-liste .bd { display: inline-block; padding: 0 5px; margin-right: 4px; border-radius: 4px; font: 700 10px/15px var(--font-mono); color: var(--dhf-nuit); background: var(--bc, var(--accent)); }

/* ------------------------------------------------------------ one desktop screen: only the frames scroll */
@media (min-width: 1100px) and (min-height: 640px) {
  body.ecran-dhf .site-main > .dhf, body.ecran-dhf .dhf { flex: 1; min-height: 0; }
  body.ecran-dhf .dhf-grille { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(280px, .95fr);
    grid-template-rows: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-areas: var(--dhf-zones, "chute chute carte" "cw num ent"); }
  body.ecran-dhf .dhf-chute { grid-area: chute; }
  body.ecran-dhf .dhf-cw { grid-area: cw; }
  body.ecran-dhf .dhf-num { grid-area: num; }
  body.ecran-dhf .dhf-carte { grid-area: carte; }
  body.ecran-dhf .dhf-entendues { grid-area: ent; }
  body.ecran-dhf .dhf-chute-corps { overflow: hidden; }
  body.ecran-dhf .dhf-cascade-zone { flex: 1; height: auto; min-height: 80px; }
  body.ecran-dhf .dhf-lu { flex: none; }
}
@media (min-width: 1100px) and (min-height: 640px) and (max-height: 820px) {
  body.ecran-dhf .dhf-spectre { height: 76px; }
  body.ecran-dhf .dhf-freq { font-size: 26px; }
}
/* Below 1300 px wide, the counters on their own line. */
@media (max-width: 1450px) { .dhf-compteurs > div { min-width: 64px; padding: 2px 8px 3px; } .dhf-compteurs dd { font-size: 15px; } }
/* A phone or a small window: stacked, the frames a fixed height. */
@media (max-width: 1099px) {
  .dhf-tete { gap: 8px 14px; padding: 8px 12px; }
  .dhf-compteurs { justify-content: flex-start; order: 4; width: 100%; }
  .dhf-compteurs > div { flex: 1 1 30%; min-width: 0; }
  .dhf-actions { order: 5; width: 100%; }
  .dhf-cascade-zone { height: 46vh; max-height: 420px; }
  .dhf-traces, .dhf-fil { max-height: 360px; }
  .dhf-num-corps, .dhf-ent-corps { max-height: 340px; }
  .dhf-bandes { height: 90px; flex: none; }
  .dhf-freq { font-size: 24px; }
  .dhf-outils .dhf-palettes { display: none; }
}
@media (max-width: 560px) {
  .dhf-afficheur { flex: 1 1 100%; justify-content: space-between; }
  .dhf-smetre { display: none; }
  .dhf-spectre { height: 70px; }
  .dhf-chute-corps { padding: 6px 6px 8px; }
  .card-head .card-meta[data-chute-info] { display: none; }
}

/* ------------------------------------------------------------ full screen, to leave running (« kiosque ») */
body.dhf-kiosque { padding-left: 0 !important; }
body.dhf-kiosque .rail, body.dhf-kiosque .rail-scrim, body.dhf-kiosque .shell-top, body.dhf-kiosque .site-footer, body.dhf-kiosque .site-bandeau,
body.dhf-kiosque .bandeau-direct, body.dhf-kiosque .dhf-onglets, body.dhf-kiosque .maj-site { display: none !important; }
body.dhf-kiosque .site-main { max-width: none !important; padding: 10px 12px !important; }
body.dhf-kiosque.curseur-cache, body.dhf-kiosque.curseur-cache * { cursor: none !important; }
body.dhf-kiosque .dhf-kiosque-btn { border-color: var(--accent); color: var(--accent); padding: 5px; }
body.dhf-kiosque .dhf-kiosque-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
body.dhf-kiosque .dhf-tete { gap: 8px 16px; }
body.dhf-kiosque .dhf-actions { order: 9; }
@media (min-width: 1100px) and (min-height: 640px) {
  body.dhf-kiosque .dhf-grille { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(320px, .9fr); }
}

@media (prefers-reduced-motion: reduce) {
  .dhf-ondes i, .dhf-freq .ch.change, .dhf-dec.nouveau, .dhf-trace.nouveau, .dhf-grille, .dhf-bulle.nouveau, .dhf-trace.tape .dhf-telex::after { animation: none; }
  .dhf-et, .dhf-bande-c i { transition: none; }
}

/* ------------------------------------------------------------ the tabs between the station's pages */
.dhf-onglets { display: flex; gap: 4px; flex-wrap: wrap; }
.dhf-onglets a { padding: 3px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.dhf-onglets a:hover { border-color: var(--border-strong); color: var(--text); }
.dhf-onglets a[aria-current] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------------ the statistics and the logbook (no script) */
.dhfs-periodes { display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--well); border: 1px solid var(--border); }
.dhfs-periodes a { padding: 2px 11px; border-radius: 999px; color: var(--text-dim); font-size: 12.5px; text-decoration: none; }
.dhfs-periodes a[aria-current] { background: var(--panel); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }
.dhfs-grille { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.dhfs-grille > .card { min-height: 0; }
.dhfs-corps { overflow: auto; padding: 8px 12px; min-height: 0; flex: 1; }
.dhfs-chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 0 0 8px; }
.dhfs-chiffres div { padding: 6px 10px; border-radius: var(--r-m); background: var(--well); border: 1px solid var(--border); }
.dhfs-chiffres dt { font-size: 11.5px; color: var(--text-muted); }
.dhfs-chiffres dd { margin: 0; font-size: 22px; font-weight: 700; color: var(--text); }
.dhfs-barres { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dhfs-barres li { display: grid; grid-template-columns: minmax(48px, 9em) minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 12.5px; }
.dhfs-cle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dhfs-barre { height: 8px; border-radius: 4px; background: var(--well); overflow: hidden; }
.dhfs-barre i { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--accent); }
.dhfs-n { color: var(--text-dim); font-size: 12px; text-align: right; min-width: 3ch; }
.dhfs-heures { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; align-items: end; height: 100%; min-height: 110px; padding-bottom: 16px; position: relative; }
.dhfs-heures span { position: relative; height: 100%; display: flex; align-items: flex-end; }
.dhfs-heures i { display: block; width: 100%; min-height: 1px; border-radius: 4px 4px 0 0; background: var(--accent); }
.dhfs-heures span:hover i { background: var(--accent-hover); }
.dhfs-heures b { position: absolute; bottom: -16px; left: 0; font: 400 10.5px/14px var(--font-mono); color: var(--text-muted); }
.dhfs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dhfs-table th { position: sticky; top: 0; background: var(--panel); text-align: left; font-weight: 600; color: var(--text-muted); padding: 3px 6px; border-bottom: 1px solid var(--border); }
.dhfs-table td { padding: 2px 6px; border-bottom: 1px solid var(--td-border); white-space: nowrap; }
.dhfs-sous { margin: 12px 0 4px; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.dhfs-parbande { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 10px; font-size: 12.5px; }
.dhfs-note { margin: 0; }
@media (min-width: 1100px) and (min-height: 640px) {
  body.ecran-dhfs .dhfs-grille { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-rows: repeat(3, minmax(0, 1fr)); grid-template-areas: "res bandes pays rec" "res modes pays rec" "heures heures cont rec"; }
  body.ecran-dhfs .dhfs-resume { grid-area: res; } body.ecran-dhfs .dhfs-bandes { grid-area: bandes; } body.ecran-dhfs .dhfs-modes { grid-area: modes; }
  body.ecran-dhfs .dhfs-pays { grid-area: pays; } body.ecran-dhfs .dhfs-records { grid-area: rec; } body.ecran-dhfs .dhfs-heures-c { grid-area: heures; }
  body.ecran-dhfs .dhfs-continents { grid-area: cont; }
  body.ecran-dhfs .dhfc { flex: 1; min-height: 0; }
}
@media (max-width: 1099px) {
  .dhfs-corps { max-height: 380px; }
  .dhfs-heures { height: 140px; }
  .dhf-onglets { order: 5; width: 100%; }
}

/* Off line: only the clock and the viewers stay among the counters. */
.dhf:not(.vif) .dhf-compteurs [data-c="ent"], .dhf:not(.vif) .dhf-compteurs [data-c="pays"], .dhf:not(.vif) .dhf-compteurs [data-c="dec"],
.dhf:not(.vif) .dhf-compteurs [data-c="duree"] { display: none; }
