.config-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

.config-section {
  margin-bottom: 2.5rem;
}

.config-section h2 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  color: #94a3b8;
}

.config-select {
  width: 100%;
  max-width: 160px;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid #2d4a6f;
  background: #243352;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.config-select:focus {
  outline: none;
  border-color: #3d5a80;
}

.config-hero-inputs {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.config-select-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.config-select-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.config-select-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Bloc visuel — héros centré, colonnes gauche/droite, arme en bas */
.config-hero-visual {
  position: relative;
  min-height: 520px;
  background: linear-gradient(165deg, rgba(28, 45, 72, 0.5) 0%, rgba(36, 51, 82, 0.6) 100%);
  border-radius: 20px;
  border: 1px solid rgba(45, 74, 111, 0.4);
  padding: 2rem;
}

.config-hero-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  min-height: 380px;
}

/* Colonne gauche : casque (haut), ceinture (bas) */
.config-slots-left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

/* Colonne droite : gants (haut), bottes (bas) */
.config-slots-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

/* Héros : centre, image intacte */
.config-hero-img-wrap {
  width: 280px;
  height: 360px;
  display: none;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.config-hero-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35));
}

/* Arme : centrée en bas */
.config-slot-arme-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Slots : icônes seules, zones visibles pour cliquer */
.config-slot-icon {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
}

.config-slot-icon .config-slot-select {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.config-slot-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: none;
  pointer-events: none;
}

.config-slot-icon.config-slot-empty {
  background: rgba(30, 58, 95, 0.4);
  border: 1px dashed rgba(69, 90, 122, 0.6);
  border-radius: 8px;
}

.config-slot-arme-label {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 0.25rem;
}

.config-slot-arme .config-slot-select {
  opacity: 1;
  width: 100%;
  height: auto;
  min-height: 36px;
  padding: 0.4rem;
  font-size: 0.8rem;
  position: relative;
}

.config-slot-arme .config-slot-arme-label {
  display: none;
}

/* Positions via flexbox : row-top = casque | gants, row-bottom = ceinture | arme | bottes */
.config-slot-arme {
  width: 180px;
  height: auto;
  min-height: 50px;
}

.config-actions-row {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(45, 74, 111, 0.4);
}

.config-btn {
  padding: 0.65rem 1.4rem;
  background: #2d4a6f;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.config-btn:hover {
  background: #3d5a80;
}

.config-btn-blue {
  background: #1e3a5f;
}

.config-btn-blue:hover {
  background: #2d4a6f;
}

.config-export-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.config-preview {
  margin-top: 1rem;
  padding: 1.25rem;
  background: #16213e;
  border-radius: 12px;
  font-size: 0.85rem;
  color: #94a3b8;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid rgba(45, 74, 111, 0.4);
}

.config-forbidden {
  text-align: center;
  padding: 4rem 2rem;
  color: #94a3b8;
}

.config-forbidden a {
  color: #60a5fa;
}

@media (max-width: 768px) {
  .config-main { padding: 1rem; }
  .config-hero-visual { min-height: 480px; padding: 1.5rem; }
  .config-hero-layout { gap: 1rem; min-height: 320px; }
  .config-hero-img-wrap { width: 220px; height: 280px; }
  .config-slots-left, .config-slots-right { gap: 1.5rem; }
  .config-slot-icon { width: 56px; height: 56px; }
  .config-slot-img { width: 56px; height: 56px; }
  .config-slot-arme { max-width: 160px; }
}
