/* Chat vocal MoonDusk (servi à part : la CSP interdit les styles en ligne). */
:root {
    --bg: #0b0a07;
    --panel: #16140e;
    --line: #2a261a;
    --text: #ece4c8;
    --dim: #8f8768;
    --accent: #f4d35e;
    --good: #7ce8a5;
    --bad: #ff6b6b;
    --violet: #c08cff;
}
* { box-sizing: border-box; }
body {
    margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
    font-family: "Consolas", "Lucida Console", ui-monospace, monospace;
    display: flex; justify-content: center; padding: 24px 16px;
}
body::after {
    content: ""; position: fixed; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
}
main { width: 100%; max-width: 520px; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.logo { font-weight: 700; letter-spacing: 3px; color: var(--accent); text-shadow: -2px 0 rgba(255,40,80,.5), 2px 0 rgba(40,220,255,.5); font-size: 20px; }
.rec { color: var(--bad); font-size: 13px; letter-spacing: 2px; }
.rec::before { content: "● "; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 14px; }
.status { font-size: 14px; color: var(--dim); line-height: 1.5; }
.status b { color: var(--text); }
.zone { color: var(--accent); }
.center { display: flex; flex-direction: column; align-items: center; gap: 14px; }
button {
    font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line);
    background: #211e14; color: var(--text); padding: 10px 14px;
}
button:hover { border-color: var(--accent); }
#start { font-size: 18px; padding: 16px 26px; background: var(--accent); color: #1a1608; border: none; font-weight: 700; }
.mic {
    width: 132px; height: 132px; border-radius: 50%; font-size: 15px; font-weight: 700;
    border: 3px solid var(--good); position: relative; background: #13170f;
}
.mic.muted { border-color: var(--bad); background: #1d1010; }
.mic .ring { position: absolute; inset: -9px; border-radius: 50%; border: 3px solid var(--good); opacity: 0; transition: opacity .08s; }
.mic.speaking .ring { opacity: .8; }
.row { display: flex; gap: 10px; width: 100%; }
.row button { flex: 1; }
button.on { border-color: var(--bad); color: var(--bad); }
label { display: block; font-size: 13px; color: var(--dim); margin: 10px 0 4px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.meter { height: 6px; background: #000; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.meter div { height: 100%; width: 0; background: var(--good); transition: width .05s; }
h2 { font-size: 13px; letter-spacing: 2px; color: var(--dim); margin: 0 0 10px; font-weight: 400; }
.peer { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.peer:first-of-type { border-top: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #3a3626; }
.peer.speaking .dot { background: var(--good); box-shadow: 0 0 8px var(--good); }
.peer .name { font-size: 15px; }
.peer .meta { font-size: 12px; color: var(--dim); }
.peer input { width: 90px; }
.badge { font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-left: 6px; border: 1px solid var(--line); color: var(--violet); }
.empty { color: var(--dim); font-size: 13px; }
footer { color: var(--dim); font-size: 12px; text-align: center; line-height: 1.6; margin-top: 10px; }
.error { color: var(--bad); }
.hidden { display: none !important; }
.full { width: 100%; }

/* Têtes des joueurs (initiale en attendant l'image, ou si le joueur n'a pas de skin). */
.head {
    width: 32px; height: 32px; border-radius: 6px; flex: none; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: #2a261a; border: 2px solid #3a3626; color: var(--accent); font-weight: 700; font-size: 15px;
    transition: border-color .08s, box-shadow .08s;
}
.head img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.head.big { width: 44px; height: 44px; border-radius: 8px; font-size: 20px; }
.peer.speaking .head, .chip.speaking .head { border-color: var(--good); box-shadow: 0 0 8px var(--good); }
.status-row { display: flex; align-items: center; gap: 14px; }
.status-row #me:empty { display: none; }
.online { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
    display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 6px;
    border: 1px solid var(--line); border-radius: 8px; background: #100e09;
}
.chip.near { border-color: #3d6b4c; }
.chip .who { font-size: 14px; }
.chip.self .who::after { content: " (toi)"; color: var(--dim); }
.chip .where { font-size: 11px; color: var(--dim); }
.chip.near .where { color: var(--good); }
