/* Écho dans le site : mêmes couleurs que le reste (site.css), motif de l'emplacement d'inventaire gardé pour le code. */
[hidden] { display: none !important; }
.echo-mark { width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.echo-srv { color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.small { font-size: .875rem; }

/* ----- Connexion ----- */
.echo-login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 5vw, 72px); align-items: center; padding: 12px 0 24px; }
.echo-intro h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 15ch; }
.echo-intro .lead { max-width: 46ch; margin: 0 0 22px; }
.echo-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; max-width: 46ch; }
.echo-steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; color: #e4d6cc; }
.echo-steps li::before {
  content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px;
  font-weight: 800; color: var(--orange-2); background: var(--bg-2);
  box-shadow: inset 2px 2px 0 #0b0806, inset -2px -2px 0 #4a3628;
}
.echo-join { display: grid; gap: 18px; margin: 0; padding: clamp(20px, 4vw, 32px); }
.echo-join h2 { margin: 0; }
.echo-join .btn { width: 100%; }
.echo-linked { display: grid; gap: 10px; }
.echo-linked p { margin: 0; }
.echo-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-top: 6px !important; }
.echo-or::before, .echo-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(6px, 1.6vw, 12px); }
.slot {
  width: 100%; aspect-ratio: 1; min-height: 46px; text-align: center; text-transform: uppercase;
  font: 800 clamp(1.3rem, 4.6vw, 1.9rem) ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--orange-2); caret-color: var(--orange);
  background: var(--bg-2); border: 0; border-radius: 4px; padding: 0;
  box-shadow: inset 3px 3px 0 #0b0806, inset -3px -3px 0 #4a3628;
}
.slot:focus { outline: 3px solid var(--orange); outline-offset: 1px; }
.slot.bad { animation: eshake .3s; outline: 3px solid var(--error); }
@keyframes eshake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.echo-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 107, 91, .1); border: 1px solid rgba(255, 107, 91, .4); color: #ffc4bc; font-weight: 600; }
.echo-warn { margin: 0; color: var(--warn); }

/* ----- Boutons propres au vocal ----- */
.ebtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--text); font-family: inherit; font-size: .95rem; font-weight: 700; line-height: 1;
  transition: background-color .15s, border-color .15s, color .15s, transform .05s;
}
.ebtn:hover:not(:disabled) { border-color: var(--orange); }
.ebtn:active:not(:disabled) { transform: translateY(1px); }
.ebtn:disabled { opacity: .5; cursor: not-allowed; }
.ebtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ebtn.tog[aria-pressed="true"], .ebtn.icon[aria-pressed="true"] { background: rgba(255, 107, 91, .12); border-color: rgba(255, 107, 91, .6); color: var(--error); }
.ebtn.icon { width: 44px; min-height: 44px; padding: 0; flex: none; }
.ebtn.small { min-height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 9px; }
.ebtn.icon.small { width: 36px; min-height: 36px; padding: 0; }
.ebtn.icon.small svg { width: 18px; height: 18px; }

/* ----- Salon ----- */
.echo-room { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 22px; align-items: start; }
.echo-banner { grid-column: 1 / -1; padding: 12px 16px; border-radius: 12px; font-weight: 600; background: rgba(255, 194, 74, .1); border: 1px solid rgba(255, 194, 74, .4); color: #ffe2a6; }
.echo-banner.info { background: var(--card-2); border-color: var(--line); color: var(--text); }
.echo-me { display: grid; gap: 18px; position: sticky; top: 84px; margin: 0; }
.me-head { display: flex; align-items: center; gap: 14px; }
.me-name { font-weight: 800; font-size: 1.25rem; overflow-wrap: anywhere; }
.me-sub { color: var(--muted); font-size: .9rem; }
.ctl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.efield { display: grid; gap: 8px; }
.efield > label:not(.echeck) { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.efield select { min-height: 44px; }
.opts { gap: 10px; }
.echeck { display: flex; align-items: center; gap: 10px; font-size: .95rem; cursor: pointer; }
.echeck input { width: 18px; height: 18px; margin: 0; accent-color: var(--orange); flex: none; }
.meter { height: 8px; border-radius: 2px; background: var(--bg-2); box-shadow: inset 1px 1px 0 #0b0806; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), var(--orange-2)); transition: width .06s linear; }
.meter.muted i { background: var(--muted); opacity: .5; }

.players-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.players-head h2 { margin: 0; font-size: 1.5rem; }
.count { color: var(--muted); }
.room-tag {
  padding: 2px 10px; border-radius: 6px; font-weight: 700; font-size: .85rem; color: var(--orange-2); background: var(--bg-2);
  border: 1px solid var(--line); max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.room-tag:empty { display: none; }

/* ----- Accueil / vue OP ----- */
.lobby-wait { display: grid; gap: 10px; margin: 0; }
.lobby-wait p { margin: 0; }
.echo-admin { display: grid; gap: 14px; }
.rooms { display: grid; gap: 14px; }
.rcard { padding: 16px 18px; display: grid; gap: 12px; margin: 0; }
.rhead { display: flex; align-items: center; gap: 12px; }
.rhead h3 { margin: 0; overflow-wrap: anywhere; color: var(--orange-2); }
.rhead .ebtn, .rgroup-title .ebtn { margin-left: auto; }
.rgroup { display: grid; gap: 8px; }
.rgroup.sub { padding-left: 14px; border-left: 3px solid var(--line); }
.rgroup-title { display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 700; color: var(--muted); }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mrow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.mempty { margin: 0; font-size: .9rem; color: var(--muted); }
.macts { display: flex; gap: 6px; }

.elist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.erow {
  display: grid; grid-template-columns: 48px minmax(120px, 1fr) minmax(150px, 260px) 44px; gap: 16px; align-items: center;
  padding: 12px 16px; background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: 14px;
}
.erow.is-muted .pname { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.who { display: grid; min-width: 0; }
.pname { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pstate { font-size: .85rem; color: var(--muted); min-height: 1.3em; }
.echo-empty { margin: 8px 0 0; padding: 28px; border: 2px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }

/* Avatar : un bloc coloré, biseauté ; anneau orange quand la personne parle */
.eavatar {
  --h: 30; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 4px; flex: none;
  font-weight: 800; font-size: 1.3rem; color: hsl(var(--h) 60% 12%); background: hsl(var(--h) 52% 62%);
  box-shadow: inset 3px 3px 0 hsl(var(--h) 60% 78%), inset -3px -3px 0 hsl(var(--h) 45% 42%);
  transition: outline-color .1s; outline: 3px solid transparent; outline-offset: 2px; user-select: none;
}
.eavatar.big { width: 56px; height: 56px; font-size: 1.5rem; }
.eavatar.small { width: 36px; height: 36px; font-size: 1rem; box-shadow: inset 2px 2px 0 hsl(var(--h) 60% 78%), inset -2px -2px 0 hsl(var(--h) 45% 42%); }
.eavatar.speaking { outline-color: var(--orange); }
.eavatar.face { background-size: cover; background-position: center; image-rendering: pixelated; box-shadow: none; }

/* Curseurs de volume */
.vol { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vol output { min-width: 3.6em; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
input[type="range"] { --fill: 50%; -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 28px; background: transparent; margin: 0; cursor: pointer; padding: 0; border: 0; }
input[type="range"]:focus { outline: none; }
input[type="range"]:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 2px; background: linear-gradient(90deg, var(--orange) var(--fill), var(--line) var(--fill)); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 2px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 2px; background: var(--orange); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 24px; margin-top: -8px; border-radius: 3px; border: 0; background: var(--orange-2); box-shadow: inset 2px 2px 0 rgba(255,255,255,.35), inset -2px -2px 0 rgba(0,0,0,.3); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 24px; border-radius: 3px; border: 0; background: var(--orange-2); }

@media (max-width: 860px) {
  .echo-login { grid-template-columns: 1fr; }
  .echo-room { grid-template-columns: 1fr; }
  .echo-me { position: static; }
}
@media (max-width: 560px) {
  .erow { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 10px 12px; }
  .erow .vol { grid-column: 1 / -1; order: 5; }
  .eavatar { width: 44px; height: 44px; }
}
