/* ============================================================
   IndiLeX — visitor.css  v4
   ============================================================ */

/* ── Layout global ── */
.ix-visitor-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: var(--space-6);
  padding: var(--space-2) var(--space-6) var(--space-8);
  max-width: var(--content-max);
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 800px) {
  .ix-visitor-layout { grid-template-columns: 1fr; }
}

/* ── Colonne stream ── */
.ix-stream-col {
  position: sticky;
  top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.ix-player-wrap { width: 100%; aspect-ratio: 16/9; }
.ix-player-iframe { width: 100%; height: 100%; border: none; display: block; }

.ix-chat-wrap { height: 340px; }
.ix-chat-iframe { width: 100%; height: 100%; border: none; display: block; background: var(--surface); }

/* ── Colonne jeu ── */
.ix-game-col { min-width: 0; }

/* ── Banneau en file ── */
.ix-in-queue-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(60, 255, 180, .08);
  border: 1px solid rgba(60, 255, 180, .25);
  border-radius: var(--radius-md);
  font-size: .84rem;
  color: var(--green);
  margin-bottom: var(--space-4);
}

/* ── Pulse dot ── */
.ix-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: ix-pulse 1.4s ease-in-out infinite;
}
@keyframes ix-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.7); }
}

/* ── Bandeau match ── */
.ix-match-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.ix-mh-mode {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}
.ix-mh-round { font-size: .78rem; color: var(--muted-2); }
.ix-mh-diff  { font-size: .78rem; color: var(--gold); margin-left: var(--space-2); }

/* ── Duel scores ── */
.ix-duel-scores {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.ix-ds-side { flex: 1; text-align: center; }
.ix-ds-name {
  font-size: .72rem;
  color: var(--muted-2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}
.ix-ds-pts {
  font-family: var(--font-title);
  font-size: 2.4rem;
  color: var(--red);
  line-height: 1;
}
.ix-ds-vs {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 3px;
}

/* ── Timer ── */
.ix-timer-wrap { display: flex; align-items: center; gap: var(--space-4); }
.ix-timer-num {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--green);
  min-width: 60px;
  transition: color .5s;
}
.ix-timer-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  overflow: hidden;
}
.ix-timer-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .8s linear, background .5s;
}

/* ── Grille indices ── */
.ix-grid-header { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.ix-gh-col {
  font-family: var(--font-title);
  font-size: .68rem;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
  text-align: center;
}
.ix-clues-grid { display: flex; flex-direction: column; gap: var(--space-2); }
.ix-clue-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }

.ix-ind {
  padding: var(--space-3) var(--space-4);
  background: rgba(60, 168, 255, .08);
  border: 1px solid rgba(60, 168, 255, .2);
  border-radius: var(--radius-md);
  color: var(--blue);
  font-size: .95rem;
  font-weight: 500;
  text-align: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ix-ind--empty {
  background: rgba(255,255,255,.02);
  border: 1px dashed rgba(255,255,255,.08);
  color: var(--muted);
  font-style: italic;
  font-size: .78rem;
}
.ix-rep {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: .95rem;
  font-weight: 500;
  text-align: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ix-rep--found { background: rgba(60,255,180,.12); border: 1px solid rgba(60,255,180,.3); color: var(--green); }
.ix-rep--wrong { background: rgba(255,110,180,.08); border: 1px solid rgba(255,110,180,.2); color: var(--pink); }
.ix-rep--wait  { background: rgba(255,255,255,.03); border: 1px dashed rgba(255,255,255,.1); color: var(--muted); font-style: italic; font-size: .78rem; }
.ix-rep--empty { background: rgba(255,255,255,.02); border: 1px dashed rgba(255,255,255,.08); color: var(--muted); font-style: italic; font-size: .78rem; }

/* ── CTA multi ── */
.ix-cta-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: rgba(255, 60, 110, .08);
  border: 1px solid rgba(255, 60, 110, .25);
  border-radius: var(--radius-lg);
  font-size: .88rem;
  color: var(--text);
  animation: ix-cta-pulse 2s ease-in-out infinite;
}
@keyframes ix-cta-pulse {
  0%, 100% { border-color: rgba(255,60,110,.25); }
  50%       { border-color: rgba(255,60,110,.55); }
}
.ix-cta-icon { font-size: 1.1rem; }

/* ── Mot caché ── */
.ix-word-display {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: var(--space-4) 0;
}
.ix-letter-blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 44px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--muted);
}

/* ── Scores ── */
.ix-scores-list { display: flex; flex-direction: column; gap: 4px; }
.ix-score-row { display: flex; align-items: center; gap: var(--space-2); font-size: .8rem; padding: 4px 0; }
.ix-score-rank { color: var(--muted); min-width: 18px; }
.ix-score-name { flex: 1; color: var(--muted-2); }
.ix-score-pts  { color: var(--gold); font-weight: 500; }
.ix-score-empty { color: var(--muted); font-size: .78rem; font-style: italic; }

/* ════════════════════════════════════════════════════════════
   Matchmaking 1v1 visiteur + partie 1v1  (v3)
   ════════════════════════════════════════════════════════════ */

/* Carte matchmaking */
.ix-mm-searching {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(60, 168, 255, .08);
  border: 1px solid rgba(60, 168, 255, .25);
  border-radius: var(--radius-md);
  font-size: .88rem;
  color: var(--blue);
}
.ix-mm-searching .ix-pulse { background: var(--blue); }

/* Mode dans le bandeau de la partie 1v1 */
.ix-v2-mode { color: #fff; }

/* Flash de changement de manche */
.ix-v2-flash {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  text-align: center;
  padding: var(--space-3);
  background: rgba(60, 168, 255, .15);
  border: 1px solid rgba(60, 168, 255, .35);
  border-radius: var(--radius-md);
  font-family: var(--font-title);
  letter-spacing: 3px;
  color: var(--blue);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

/* Champs désactivés (hors-tour) dans la partie 1v1 */
#screen-vmatch input:disabled,
#screen-vmatch button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* ── Pause entre manches : chips "prêt" (v4) ── */
.ix-ready-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: .82rem;
  color: var(--muted-2);
  transition: var(--transition);
}
.ix-ready-chip .ix-ready-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: var(--transition);
}
.ix-ready-chip.is-ready {
  color: var(--green);
  border-color: rgba(60, 255, 180, .3);
  background: rgba(60, 255, 180, .08);
}
.ix-ready-chip.is-ready .ix-ready-dot { background: var(--green); }
