/* NUIT BRUTE — Configurateur Atelier
   Variables issues de life.css (direction Salle obscure)
*/
:root {
  --bg: #281c27;
  --deep: #1e171d;
  --surface: #35262f;
  --surface-2: #44323c;
  --text: #f0e5dd;
  --muted: #c8b8b5;
  --dim: #ab9698;
  --accent: #e5b297;
  --border: #655059;
  --display: "Bodoni Moda", Georgia, serif;
  --body: "Atkinson Hyperlegible Next", Atkinson, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  background: radial-gradient(ellipse at 88% 0, #71443416, transparent 55%), var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.configurator {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 7rem;
}

.header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.back {
  display: inline-block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.progress {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 1.75rem;
  max-width: 280px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.35s ease;
}

h1 {
  font-family: var(--display);
  font-size: 2.6rem;
  margin: 0 0 0.35rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  margin: 0 0 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.step { display: none; }
.step.active { display: block; }

label {
  display: block;
  margin-bottom: 1.15rem;
  font-size: 0.92rem;
  color: var(--muted);
}

label input[type="text"],
label input[type="number"],
label select,
label textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease;
}

label input:focus,
label select:focus,
label textarea:focus {
  outline: none;
  border-color: var(--accent);
}

label textarea { resize: vertical; min-height: 80px; }

fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem 0.6rem;
  margin-bottom: 1.15rem;
  background: var(--surface);
}

legend {
  padding: 0 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

fieldset label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
  color: var(--text);
  font-weight: 400;
  cursor: pointer;
}

fieldset input[type="checkbox"] {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
}

.character-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem 1.1rem;
  margin-bottom: 1.1rem;
}

.character-card h3 {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
  font-family: var(--display);
  font-weight: 400;
  color: var(--accent);
}

.tags-group {
  margin-bottom: 1.4rem;
}

.tags-group h3 {
  font-size: 0.85rem;
  margin: 0 0 0.6rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.84rem;
  cursor: pointer;
  user-select: none;
  color: var(--text);
  transition: all 0.15s ease;
}

.tag:hover {
  border-color: var(--accent);
}

.tag.selected {
  background: var(--accent);
  color: #2b1d23;
  border-color: var(--accent);
  font-weight: 500;
}

.btn-secondary,
.btn-primary,
.btn-nav {
  font: inherit;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.3rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.92rem;
}

.btn-secondary:hover {
  background: rgba(229, 178, 151, 0.1);
}

.btn-primary {
  background: var(--accent);
  color: #2b1d23;
  font-weight: 600;
  width: 100%;
  margin-top: 1.25rem;
  font-size: 1rem;
}

.btn-primary:hover:not(:disabled) {
  background: #f0c3a7;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-nav {
  background: var(--surface-2);
  color: var(--text);
  min-width: 110px;
}

.btn-nav:hover:not(:disabled) {
  background: var(--border);
}

.btn-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(30, 23, 29, 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.result {
  margin-top: 1.75rem;
  padding: 1.25rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 0.98rem;
}

#recap p {
  margin: 0.4rem 0;
  color: var(--muted);
}

#recap strong {
  color: var(--text);
  font-weight: 500;
}

@media (min-width: 640px) {
  .configurator { padding-top: 3rem; }
  h1 { font-size: 3rem; }
}
