/* Radio Circus — marin · cirque · punk photocopié · batik */
@font-face { font-family: "Stencil"; src: url(fonts/stardos-stencil-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Typewriter"; src: url(fonts/special-elite.woff2) format("woff2"); font-display: swap; }

:root {
  color-scheme: light;
  --paper: #efe6d2; --paper-2: #e3d6ba; --ink: #141210; --red: #d7261e; --red-dark: #a8170f;
  --muted: #5c544a; --cream: #f7f0df;
  --stencil: "Stencil", Impact, "Arial Black", sans-serif;
  --type: "Typewriter", "Courier New", monospace;
  --shadow: 6px 6px 0 var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--type); overflow-x: hidden; }
/* grain de photocopie */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
a { color: var(--red); }
main { max-width: 980px; margin: 0 auto; padding: 0 16px; }
h1, h2 { font-family: var(--stencil); font-weight: 700; line-height: 1; margin: 0 0 .3em; text-transform: uppercase; letter-spacing: .02em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.id { font-style: italic; color: var(--red-dark); margin: -.2em 0 .8em; }
.id::before { content: "ID · "; font-style: normal; font-size: .72em; letter-spacing: .1em; opacity: .7; }

/* en-tête + bandeau défilant */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 980px; margin: 0 auto; padding: 14px 16px; }
.brand { font-family: var(--stencil); font-size: 1.5rem; text-transform: uppercase; color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 10px; }
.nose { width: 20px; height: 20px; border-radius: 50%; background: var(--red); border: 3px solid var(--ink); }
.top nav { display: flex; gap: 18px; }
.top nav a { color: var(--ink); text-decoration: none; border-bottom: 3px solid var(--red); }
.marquee { background: var(--ink); color: var(--paper); overflow: hidden; white-space: nowrap; border-block: 4px solid var(--red);
  font-family: var(--stencil); letter-spacing: .12em; padding: 7px 0; transform: rotate(-1deg); margin: 4px -10px 26px; }
.marquee > div { display: inline-block; animation: defile 38s linear infinite; }
@keyframes defile { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee > div { animation: none; } html { scroll-behavior: auto; } }

/* héros */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: center; margin-bottom: 34px; }
.kicker { font-family: var(--stencil); letter-spacing: .2em; text-transform: uppercase; margin: 0 0 6px; }
.title { font-size: clamp(3.6rem, 13vw, 7.6rem); line-height: .86; margin: 0 0 14px; }
.title span { display: block; }
.title .red { color: var(--red); -webkit-text-stroke: 2px var(--ink); text-shadow: 5px 5px 0 var(--ink); }
.tagline { font-size: 1.15rem; margin: 0 0 .5em; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-art { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.sunburst { position: absolute; inset: 0; border-radius: 50%; border: 5px solid var(--ink); box-shadow: var(--shadow);
  background: repeating-conic-gradient(from 0deg, var(--red) 0 9deg, var(--cream) 9deg 18deg); }
.sunburst::after { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: var(--paper);
  border: 5px solid var(--ink);
  background-image: radial-gradient(var(--paper) 55%, transparent 56%), var(--kawung); background-size: auto, 34px 34px; }
.clown { position: relative; width: 84%; height: auto; filter: drop-shadow(5px 5px 0 rgba(20,18,16,.9)); }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; width: 100%; margin: 0 auto; }
}

/* motif batik kawung */
:root { --kawung: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34'%3E%3Cg fill='%23141210'%3E%3Cellipse cx='17' cy='6' rx='5' ry='7.5'/%3E%3Cellipse cx='17' cy='28' rx='5' ry='7.5'/%3E%3Cellipse cx='6' cy='17' rx='7.5' ry='5'/%3E%3Cellipse cx='28' cy='17' rx='7.5' ry='5'/%3E%3C/g%3E%3Cg fill='%23efe6d2'%3E%3Ccircle cx='17' cy='7' r='1.6'/%3E%3Ccircle cx='17' cy='27' r='1.6'/%3E%3Ccircle cx='7' cy='17' r='1.6'/%3E%3Ccircle cx='27' cy='17' r='1.6'/%3E%3C/g%3E%3Ccircle cx='17' cy='17' r='2.2' fill='%23d7261e'/%3E%3C/svg%3E"); }
.kawung { height: 34px; background: var(--kawung) var(--paper); background-size: 34px 34px; border-block: 4px solid var(--ink); opacity: .9; }

/* boutons */
.btn { display: inline-block; background: var(--red); color: var(--cream); border: 3px solid var(--ink); border-radius: 0;
  padding: 10px 18px; font: 700 1.05rem var(--stencil); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  text-decoration: none; box-shadow: 4px 4px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .5; }
.btn.ghost { background: var(--cream); color: var(--ink); }
.btn.big { font-size: 1.25rem; padding: 14px 24px; }

/* ticket = lecteur */
.ticket { position: relative; display: flex; background: var(--cream); border: 4px solid var(--ink); box-shadow: var(--shadow);
  margin: 0 0 34px; transform: rotate(.4deg); scroll-margin-top: 20px; }
.ticket::before, .ticket::after { content: ""; position: absolute; left: 96px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--paper); border: 4px solid var(--ink); transform: translateX(-50%); }
.ticket::before { top: -15px; } .ticket::after { bottom: -15px; }
.stub { flex: none; width: 96px; background: var(--red); color: var(--cream); border-right: 4px dashed var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 14px 0;
  font-family: var(--stencil); text-transform: uppercase; letter-spacing: .14em; gap: 18px; }
.stub span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .8rem; }
.stub b { font-size: .95rem; color: var(--ink); background: var(--cream); padding: 2px 6px; }
.player { flex: 1; min-width: 0; display: flex; align-items: center; gap: 18px; padding: 20px; }
.play { flex: none; width: 84px; height: 84px; border-radius: 50%; border: 4px solid var(--ink); cursor: pointer;
  background: var(--red); color: var(--cream); display: grid; place-items: center; box-shadow: 4px 4px 0 var(--ink); }
.play:disabled { opacity: .45; cursor: default; }
.play:not(:disabled):hover { transform: rotate(-8deg); }
.play svg { width: 38px; height: 38px; fill: currentColor; }
.play .i-pause, .play.on .i-play { display: none; }
.play.on .i-pause { display: block; }
.play.on { animation: tremble .6s ease-in-out infinite alternate; }
@keyframes tremble { to { transform: rotate(6deg) scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .play.on { animation: none; } }
.np { flex: 1; min-width: 0; }
.np h2 { font-size: 1.6rem; overflow-wrap: anywhere; margin: 2px 0; }
.np p { margin: 0; }
.live { font-family: var(--stencil); text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; color: var(--red); }
.live #status::before { content: "● "; animation: blink 1.2s steps(2) infinite; }
.live.off { color: var(--muted); } .live.off #status::before { animation: none; }
@keyframes blink { 50% { opacity: 0; } }
.bar { height: 10px; border: 3px solid var(--ink); margin: 10px 0 6px; background: var(--paper);
  background-image: repeating-linear-gradient(90deg, transparent 0 8px, rgba(20,18,16,.15) 8px 10px); }
#progress { height: 100%; width: 0; background: var(--red); transition: width 1s linear; }
#np-art { width: 92px; height: 92px; object-fit: cover; flex: none; border: 4px solid var(--ink); filter: grayscale(1) contrast(1.4); }
@media (max-width: 560px) {
  #np-art { display: none; } .play { width: 64px; height: 64px; } .play svg { width: 30px; height: 30px; }
  .stub { width: 54px; } .stub b { display: none; } .ticket::before, .ticket::after { left: 54px; }
  .player { padding: 16px 12px; gap: 12px; } .np h2 { font-size: 1.25rem; }
}

/* cartes */
.card { background: var(--cream); border: 4px solid var(--ink); box-shadow: var(--shadow); padding: 24px; margin: 0 0 34px;
  scroll-margin-top: 20px; }
.card:nth-of-type(even) { transform: rotate(-.3deg); }
.tape { display: inline-block; background: var(--ink); color: var(--cream); padding: 8px 14px 6px; font-size: clamp(1.5rem, 5vw, 2.1rem);
  transform: rotate(-1.5deg) translateX(-6px); box-shadow: 4px 4px 0 var(--red); }

/* formulaire */
form label { display: block; margin: 0 0 16px; font-weight: 700; }
input:not([type=radio]):not([type=checkbox]), textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: 1rem var(--type); color: var(--ink);
  background: var(--paper); border: 3px solid var(--ink); border-radius: 0; }
input:focus, textarea:focus { outline: 3px solid var(--red); outline-offset: 2px; }
input[type=file] { background: var(--paper-2); }
input[type=file]::file-selector-button { font: 700 .9rem var(--stencil); text-transform: uppercase; letter-spacing: .08em;
  background: var(--ink); color: var(--cream); border: 0; padding: 8px 12px; margin-right: 12px; cursor: pointer; }
input[type=radio], input[type=checkbox] { accent-color: var(--red); width: 18px; height: 18px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } .card { padding: 18px 16px; } }
fieldset.kinds { border: 0; padding: 0; margin: 0 0 16px; display: flex; gap: 10px; flex-wrap: wrap; }
fieldset.kinds legend { font-weight: 700; margin-bottom: 6px; }
.chip { display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important; padding: 8px 14px;
  border: 3px solid var(--ink); background: var(--paper); cursor: pointer; font-family: var(--stencil); text-transform: uppercase;
  letter-spacing: .08em; }
.chip:has(input:checked) { background: var(--ink); color: var(--cream); }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.check input { margin-top: 4px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { background: var(--red); color: var(--cream); padding: 10px 14px; border: 3px solid var(--ink); }
.notice { background: var(--paper-2); padding: 10px 14px; border: 3px solid var(--ink); }

/* à l'affiche */
.recent { list-style: none; padding: 0; margin: 0; }
.recent li { padding: 14px 0; border-top: 3px dotted var(--ink); }
.recent li:first-child { border-top: 0; }
.recent p { margin: 4px 0 0; }
.tag { display: inline-block; font: .75rem var(--stencil); text-transform: uppercase; letter-spacing: .1em; padding: 3px 8px;
  background: var(--red); color: var(--cream); border: 2px solid var(--ink); margin-right: 6px; transform: rotate(-3deg); }

/* merci */
.merci .mini-clown { width: 180px; margin: 0 auto 8px; }
.merci .mini-clown .clown { width: 100%; }
.stamp { font-size: 3.4rem; color: var(--red); -webkit-text-stroke: 1.5px var(--ink); transform: rotate(-4deg); }
.merci .id::before { content: ""; }

/* admin */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 16px; }
.tabs a { padding: 6px 12px; border: 3px solid var(--ink); color: var(--ink); text-decoration: none; font-size: .9rem; background: var(--paper); }
.tabs a.on { background: var(--ink); color: var(--cream); }
.sub { border-top: 3px dotted var(--ink); padding: 16px 0; }
.sub header { margin-bottom: 4px; }
.sub audio { width: 100%; margin: 8px 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions form { margin: 0; }
code { overflow-wrap: anywhere; }

/* pied */
.foot { margin-top: 20px; background: var(--ink); color: var(--paper); }
.foot p { max-width: 980px; margin: 0 auto; padding: 20px 16px 30px; }
.foot .id { color: #ff8a80; margin: 0; }
.foot .id::before { content: ""; }

/* sélecteur de langue */
.langs { display: inline-flex; border: 3px solid var(--ink); margin-left: 4px; }
.top nav .langs a { border: 0; padding: 0 8px; font-family: var(--stencil); font-size: .9rem; line-height: 1.6; }
.top nav .langs a.on { background: var(--ink); color: var(--cream); }
.top nav { align-items: center; flex-wrap: wrap; }

/* source du son : micro ou fichier */
.source { margin: 0 0 18px; }
.source-label { font-weight: 700; margin: 0 0 8px; }
.modes { display: flex; gap: 0; flex-wrap: wrap; margin-bottom: 12px; }
.mode { font: 700 .95rem var(--stencil); text-transform: uppercase; letter-spacing: .06em; padding: 10px 14px; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); margin-right: -3px; }
.mode.on { background: var(--ink); color: var(--cream); }
.mode:disabled { opacity: .45; cursor: not-allowed; }
.panel[data-panel="mic"] { border: 3px dashed var(--ink); padding: 16px; background: var(--paper); }
.rec { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rec-btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; cursor: pointer;
  font: 700 1.1rem var(--stencil); text-transform: uppercase; letter-spacing: .08em;
  background: var(--cream); color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.rec-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); }
.recording .rec-btn { background: var(--red); color: var(--cream); }
.recording .rec-dot { border-radius: 3px; background: var(--cream); animation: blink 1s steps(2) infinite; }
.rec-time { font: 700 1.6rem var(--stencil); min-width: 4.2ch; }
.recording .rec-time { color: var(--red); }
.meter { flex: 1; min-width: 120px; height: 16px; border: 3px solid var(--ink); background: var(--cream); }
#rec-level { height: 100%; width: 0; background: var(--ink); transition: width .06s; }
#rec-level.hot { background: var(--red); }
.rec-msg { margin: 12px 0 0; }
.rec-msg.warn { color: var(--red-dark); font-weight: 700; }
.rec-review { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.rec-review audio { flex: 1; min-width: 220px; }

/* bandeau « en direct » (visible seulement quand un animateur est à l'antenne) */
.onair { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  background: var(--red); color: var(--cream); text-decoration: none; border-block: 4px solid var(--ink);
  font-family: var(--stencil); text-transform: uppercase; letter-spacing: .1em; padding: 8px 16px; font-size: 1.05rem; }
.onair b { background: var(--ink); color: var(--cream); padding: 2px 10px; font-weight: 700; }
.onair:hover b { background: var(--cream); color: var(--ink); }
.onair-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--cream); border: 2px solid var(--ink);
  animation: blink 1s steps(2) infinite; }
.live.is-live { color: var(--red); }
@media (prefers-reduced-motion: reduce) { .onair-dot { animation: none; } }
