:root {
  --fond: #0a0a0c;
  --carte: #131317;
  --carte-2: #1a1a20;
  --bord: #26262d;
  --texte: #f4f4f5;
  --doux: #a1a1aa;
  --pale: #71717a;
  --rouge: #b91c2c;
  --rouge-vif: #e5383b;
  --vert: #4ade80;
  --ambre: #fbbf24;
  --rayon: 16px;
  --police: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.5 var(--police);
  -webkit-font-smoothing: antialiased;
}
.fond {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(185, 28, 44, .22), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(185, 28, 44, .12), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0 1px, transparent 1px 4px);
}
.cache { display: none !important; }

/* ---------------------------------------------------------------- entete */
.entete {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 980px; margin: 0 auto; padding: 22px 16px 8px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-ic { width: 30px; height: 30px; fill: none; stroke: var(--rouge-vif); stroke-width: 2; stroke-linecap: round; }
.logo-txt { font-size: 22px; letter-spacing: .04em; line-height: 1; }
.logo-txt b { font-weight: 900; }
.logo-txt em { font-style: normal; font-weight: 900; color: var(--rouge-vif); }
.logo-sub {
  font-size: 11px; text-transform: uppercase; letter-spacing: .18em; color: var(--doux);
  border: 1px solid var(--bord); border-radius: 999px; padding: 3px 9px;
}
.pastille {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--doux);
  background: var(--carte); border: 1px solid var(--bord); border-radius: 999px; padding: 6px 12px; white-space: nowrap;
}
.pastille i { width: 8px; height: 8px; border-radius: 50%; background: var(--pale); }
.pastille.ok i { background: var(--vert); box-shadow: 0 0 10px var(--vert); }
.pastille.ok { color: var(--texte); }
.pastille.attente i { background: var(--ambre); animation: clignote 1s infinite; }
.pastille.hors i { background: var(--rouge-vif); }
@keyframes clignote { 50% { opacity: .3; } }

/* ---------------------------------------------------------------- page */
.page { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 12px 16px 24px; }
.carte {
  background: linear-gradient(180deg, var(--carte-2), var(--carte));
  border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 20px; box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.carte-titre {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--doux);
  margin-bottom: 14px;
}
.compteur {
  font-size: 12px; letter-spacing: 0; color: var(--texte); background: var(--rouge);
  border-radius: 999px; padding: 1px 9px;
}

/* accueil */
.accueil { text-align: center; padding: 44px 24px 34px; margin-top: 18px; }
.accueil h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.1; margin: 18px 0 10px; letter-spacing: -.01em; }
.lead { color: var(--doux); max-width: 560px; margin: 0 auto; }
.joueur-ligne { margin: 16px 0 0; color: var(--texte); min-height: 22px; }
.joueur-ligne b { color: var(--rouge-vif); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 16px; }
.note { font-size: 13px; color: var(--pale); max-width: 520px; margin: 0 auto; }
.onde { display: flex; justify-content: center; align-items: center; gap: 5px; height: 46px; }
.onde span {
  width: 6px; border-radius: 3px; background: var(--rouge-vif);
  animation: onde 1.2s ease-in-out infinite;
}
.onde span:nth-child(1) { animation-delay: -.9s; } .onde span:nth-child(2) { animation-delay: -.6s; }
.onde span:nth-child(3) { animation-delay: -.3s; } .onde span:nth-child(5) { animation-delay: -.45s; }
.onde span:nth-child(6) { animation-delay: -.75s; } .onde span:nth-child(7) { animation-delay: -.15s; }
@keyframes onde { 0%, 100% { height: 10px; opacity: .55; } 50% { height: 44px; opacity: 1; } }

/* boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 600 15px var(--police); color: var(--texte); cursor: pointer;
  background: var(--carte-2); border: 1px solid var(--bord); border-radius: 12px; padding: 11px 18px;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, opacity .15s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; }
.btn:hover { border-color: #3a3a44; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--rouge-vif); outline-offset: 2px; }
.btn.rouge { background: linear-gradient(180deg, var(--rouge-vif), var(--rouge)); border-color: #d32f3c; box-shadow: 0 6px 24px rgba(229, 56, 59, .35); }
.btn.rouge:hover { filter: brightness(1.08); }
.btn.gros { font-size: 17px; padding: 15px 26px; border-radius: 14px; }
.btn.fantome { background: transparent; }
.btn.bascule.actif { background: rgba(229, 56, 59, .14); border-color: var(--rouge-vif); color: #ffb3b5; }

/* grille */
.grille { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.conseils, .appel { grid-column: 1 / -1; }
@media (max-width: 760px) { .grille { grid-template-columns: 1fr; } }

/* moi */
.moi-nom { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.moi-nom span { font-size: 22px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.moi-nom small { color: var(--doux); font-size: 13px; white-space: nowrap; }
.vu { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.vu-barre { position: relative; flex: 1; height: 12px; border-radius: 6px; background: #0d0d10; border: 1px solid var(--bord); overflow: hidden; }
.vu-barre i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #3f3f46, #71717a); transition: width .06s linear; }
.vu-barre.parle i { background: linear-gradient(90deg, #22c55e, var(--vert)); }
.vu-barre b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ambre); }
.vu-etat { width: 72px; text-align: right; font-size: 13px; color: var(--doux); }
.vu-etat.parle { color: var(--vert); font-weight: 700; }
.reglage { display: grid; gap: 6px; margin: 12px 0; font-size: 13px; color: var(--doux); }
input[type=range] { width: 100%; accent-color: var(--rouge-vif); }
select {
  width: 100%; font: 14px var(--police); color: var(--texte); background: #0d0d10;
  border: 1px solid var(--bord); border-radius: 10px; padding: 9px 10px;
}
.boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

/* autour */
#radar { display: block; width: 100%; max-width: 340px; aspect-ratio: 1; margin: 0 auto 6px; }

/* appel */
.appel { display: flex; align-items: center; gap: 16px; border-color: rgba(229, 56, 59, .55); }
.appel-ic {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--rouge); box-shadow: 0 0 0 0 rgba(229, 56, 59, .6);
}
.appel.sonne .appel-ic { animation: sonne 1.2s infinite; }
@keyframes sonne { 0% { box-shadow: 0 0 0 0 rgba(229,56,59,.6); } 100% { box-shadow: 0 0 0 18px rgba(229,56,59,0); } }
.appel-ic svg { width: 24px; height: 24px; fill: #fff; }
.appel-txt { flex: 1; min-width: 0; }
.appel-etat { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--doux); }
.appel-qui { font-size: 20px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appel-duree { font: 700 18px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--doux); }

/* conseils */
.conseils ul { margin: 0; padding-left: 18px; color: var(--doux); display: grid; gap: 6px; }
.conseils b { color: var(--texte); }
kbd {
  font: 600 12px ui-monospace, monospace; color: var(--texte);
  background: #0d0d10; border: 1px solid var(--bord); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px;
}

/* voile */
.voile { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; background: rgba(5, 5, 7, .78); backdrop-filter: blur(6px); }
.voile-carte { max-width: 440px; text-align: center; }
.voile-carte h2 { margin: 4px 0 8px; }
.voile-carte p { color: var(--doux); }

.pied { position: relative; z-index: 1; text-align: center; color: var(--pale); font-size: 12px; padding: 8px 16px 28px; }

/* v0.2 : ligne d'etat (porte-voix, vehicule, ecoute staff) */
.statut { margin: -4px 0 10px; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; line-height: 1.35;
  background: rgba(229, 56, 59, .12); border: 1px solid rgba(229, 56, 59, .35); color: #fde2e2; }
.statut.cache { display: none; }
