body {
  font-family: Arial, sans-serif;
  background: #1e293b;
  color: #f8fafc;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.quiz {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

#choix {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

button {
  padding: 12px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background: #38bdf8;
  color: #0f172a;
  cursor: pointer;
}

button:hover {
  background: #7dd3fc;
}

button.bonne {
  background: #4ade80;
}

button.mauvaise {
  background: #f87171;
}

.confetti {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
}

#jokers {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

#jokers button {
  background: #facc15;
  font-size: 0.9rem;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#reglages {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

#btn-portes {
  margin-top: 12px;
  background: #c084fc;
}

#portes {
  position: fixed;
  inset: 0;
  z-index: 10;
}

#portes canvas {
  display: block;
}

#portes-hud {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 94vw);
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 10px;
  text-align: center;
}

#portes-hud ul {
  list-style: none;
  padding: 0;
  margin: 6px 0;
  text-align: left;
}

#portes-hud button {
  margin: 4px;
}

#portes-skins {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

#portes-skins button {
  padding: 4px 10px;
  font-size: 0.8rem;
  color: #0f172a;
}

#portes-pieces {
  margin: 4px 0;
  font-weight: bold;
  color: #facc15;
}

#boutique {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, 94vw);
  max-height: 86vh;
  overflow-y: auto;
  padding: 16px;
  background: rgba(15, 23, 42, 0.96);
  border-radius: 12px;
  text-align: center;
}

#boutique-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.carte-skin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: #1e293b;
  border-radius: 10px;
}

.carte-skin.choisi {
  outline: 2px solid #facc15;
}

.carte-skin span {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-weight: bold;
}

#portes-hud #portes-pieces {
  display: inline-block;
  margin: 2px 8px;
}

#portes-hud button {
  padding: 5px 12px;
  font-size: 0.85rem;
}

#portes-hud #portes-info {
  margin: 4px 0;
  font-size: 0.9rem;
}

#portes-vie {
  position: relative;
  height: 20px;
  margin: 6px 0;
  background: #475569;
  border-radius: 10px;
  overflow: hidden;
}

#portes-vie-barre {
  height: 100%;
  width: 100%;
  background: #22c55e;
  transition: width 0.2s;
}

#portes-vie-texte {
  position: absolute;
  inset: 0;
  font-size: 0.8rem;
  line-height: 20px;
  font-weight: bold;
}

#viseur {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  pointer-events: none;
}

#viseur::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  background: #ef4444;
  border-radius: 50%;
}

#portes-inventaire {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 4px 0;
}

#portes-inventaire .case {
  padding: 3px 10px;
  border: 2px solid #64748b;
  border-radius: 8px;
  font-size: 0.85rem;
}

#portes-inventaire .choisie {
  border-color: #fde047;
  background: rgba(253, 224, 71, 0.25);
}
