/* === PHOTO PIXELISÉE : STYLES PARTAGÉS ===
   Page solo (photo-pixelisee/) et mode en ligne du multijoueur (duel/). Voir shared/js/pixelphoto.js. */

/* Photo (canvas) et nom révélé par-dessus */
.pix-stage {
  position: relative;
  width: min(100%, 22rem);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid var(--border, #334155);
  background: #1e293b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.pix-stage.found { border-color: #22c55e; }
.pix-stage.missed { border-color: #ef4444; }

.pix-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.pix-answer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 0.75rem 0.7rem;
  background: linear-gradient(transparent, rgba(2, 6, 23, 0.92) 55%);
  color: #f1f5f9;
  font-weight: 800;
  font-size: 1.15rem;
  text-align: center;
  animation: pix-pop 0.3s ease;
}
.pix-answer small {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
}
@keyframes pix-pop {
  from { opacity: 0; transform: translateY(0.5rem); }
  to   { opacity: 1; transform: none; }
}

/* Saisie */
.pix-input-area {
  display: flex;
  gap: 0.5rem;
  width: min(100%, 26rem);
  margin: 0 auto;
}
.pix-input-inner {
  position: relative;
  flex: 1;
  min-width: 0;
}
.pix-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 0.6rem;
  color: #f1f5f9;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.pix-input:focus { border-color: #60a5fa; }
.pix-input:disabled { opacity: 0.45; cursor: not-allowed; }
.pix-input.shake { animation: pix-shake 0.35s; }
@keyframes pix-shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.pix-btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0 1.2rem;
  background: var(--accent, #B6D8F2);
  color: #0f172a;
  border: none;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: background 0.2s;
}
.pix-btn:not(:disabled):hover { background: #9dc8e8; }
.pix-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Suggestions (noms seulement) */
.pix-drop {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.3rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.6rem;
  z-index: 100;
  max-height: 16rem;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.pix-drop-item {
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  color: #e2e8f0;
  font-size: 0.95rem;
}
.pix-drop-item:hover,
.pix-drop-item.highlighted { background: #0f172a; }

/* Message sous la saisie (nom inconnu…) */
.pix-msg {
  min-height: 1.2rem;
  text-align: center;
  font-size: 0.85rem;
  color: #fbbf24;
}

/* Interrupteur Pixel / Flou */
.pix-effect {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #94a3b8;
}
.pix-effect-ctrl {
  display: flex;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 0.15rem;
  gap: 0.15rem;
}
.pix-effect-opt {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  background: transparent;
  border: none;
  color: #64748b;
  border-radius: 16px;
  cursor: pointer;
}
.pix-effect-opt.active { background: #334155; color: #f1f5f9; }
.pix-effect-opt:disabled { cursor: default; }
