/* ==========================================================================
   SELENA — tirage.css
   Styles propres à la page de tirage interactif (cartes / runes).
   S'appuie sur les variables définies dans style.css.
   ========================================================================== */

.wizard {
  max-width: 780px;
  margin: 0 auto;
}

/* ---------- Barre de progression ---------- */
.wizard-progress { margin-bottom: 3.2rem; }

.wizard-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin-bottom: 1.1rem;
}
.wizard-progress-fill {
  height: 100%;
  width: 16.66%;
  background: linear-gradient(90deg, var(--violet-soft), var(--gold));
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  list-style: none;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mist-dim);
  flex-wrap: wrap;
  gap: 0.4rem;
}
.wizard-steps li { position: relative; padding-left: 1.1rem; transition: color var(--transition); }
.wizard-steps li::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  transition: background var(--transition);
}
.wizard-steps li.is-active,
.wizard-steps li.is-done { color: var(--gold-light); }
.wizard-steps li.is-active::before,
.wizard-steps li.is-done::before { background: var(--gold); }

/* ---------- Etapes ---------- */
.wizard-step { display: none; }
.wizard-step.is-active { display: block; animation: wizardFade 0.5s ease; }

@keyframes wizardFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-step h2 { margin-bottom: 0.5rem; }
.wizard-step .step-intro { margin-bottom: 2.2rem; }

.wizard-error {
  display: none;
  color: #e08a8a;
  font-size: 0.85rem;
  margin-top: 0.6rem;
}
.wizard-error.is-visible { display: block; }

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.4rem;
  gap: 1rem;
}
.wizard-nav .btn-prev { visibility: hidden; }
.wizard-nav .btn-prev.is-visible { visibility: visible; }

/* ---------- Choix en cartes (type de tirage) ---------- */
.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 1.6rem;
}
.choice-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  text-align: center;
  cursor: pointer;
  background: rgba(255,255,255,0.03);
  transition: all var(--transition);
}
.choice-card svg { width: 34px; height: 34px; color: var(--gold); margin: 0 auto 0.8rem; }
.choice-card h3 { font-size: 1.05rem; }
.choice-card p { font-size: 0.82rem; margin-top: 0.4rem; }
.choice-card.is-selected { border-color: var(--gold); background: linear-gradient(160deg, rgba(201,162,75,0.14), rgba(75,46,143,0.16)); }

/* ---------- Puces (emotions) ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }
.chip {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--mist-dim);
  cursor: pointer;
  transition: all var(--transition);
}
.chip.is-selected { border-color: var(--gold); color: var(--gold-light); background: rgba(201,162,75,0.12); }

/* ---------- Etape tirage ---------- */
.draw-zone { text-align: center; padding: 2rem 0; }
.draw-positions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin: 2.4rem 0;
}
.draw-slot {
  height: 200px;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}
.draw-slot-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.draw-slot.is-flipped .draw-slot-inner { transform: rotateY(180deg); }
.draw-slot-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem;
}
.draw-slot-back {
  background: linear-gradient(160deg, var(--violet-deep), var(--midnight-soft));
  border: 1px solid var(--gold);
}
.draw-slot-back svg { width: 30px; height: 30px; color: var(--gold); opacity: 0.7; }
.draw-slot-back.is-shuffling svg { animation: spinGlow 1.1s linear infinite; }
@keyframes spinGlow {
  from { transform: rotate(0deg); opacity: 0.5; }
  50% { opacity: 1; }
  to { transform: rotate(360deg); opacity: 0.5; }
}
.draw-slot-front {
  background: linear-gradient(160deg, var(--gold-light), var(--gold));
  color: var(--midnight);
  transform: rotateY(180deg);
  text-align: center;
}
.draw-slot-front .rune-symbol { font-size: 2.4rem; line-height: 1; }
.draw-slot-front .card-roman { font-family: var(--font-display); font-size: 0.75rem; letter-spacing: 0.1em; opacity: 0.75; }
.draw-slot-front .card-name { font-family: var(--font-display); font-size: 1.05rem; margin-top: 0.2rem; }
.draw-position-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.7rem;
  display: block;
}

/* ---------- Interpretation ---------- */
.interpretation-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  background: rgba(255,255,255,0.03);
  margin-bottom: 1.2rem;
}
.interpretation-card h3 {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--gold-light);
}
.interpretation-card .position-tag {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.interpretation-card p { margin-top: 0.6rem; }

/* ---------- Etape finale ---------- */
.final-message {
  text-align: center;
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 3rem 2rem;
  background: linear-gradient(160deg, rgba(201,162,75,0.1), rgba(75,46,143,0.18));
}
.final-message .btn-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .choice-row { grid-template-columns: 1fr; }
  .draw-positions { grid-template-columns: 1fr; }
  .draw-slot { height: 170px; }
  .wizard-steps { display: none; } /* trop étroit sur mobile : la barre suffit */
}
