/* ============================================
   Ped'IActivité - Premium Dark Wizard (OLED)
   ============================================ */
:root {
  --bg-dark: #000000;
  --glass-panel: rgba(20, 20, 20, 0.6);
  --glass-border: rgba(255, 255, 255, 0.12);
  --brand-orange: #ff9640;
  --brand-blue: #6ea3ff;
  --brand-gradient: linear-gradient(135deg, #ff9640 0%, #6ea3ff 100%);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
}

[data-route="/pediactivite"] {
  background: var(--bg-dark);
  min-height: 100vh;
  color: var(--text-main);
}

/* ============================================
   CONTAINER & WIZARD BASICS
   ============================================ */
.pediactivite-container {
  max-width: 850px;
  margin: 20px auto;
  background: #000000;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  position: relative;
  min-height: 600px;
  /* display: flex; -> Keep flex but allow height growth */
  display: flex;
  flex-direction: column;
  height: auto;
  /* Allow growth */
}

.pediactivite-wizard {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  perspective: 1000px;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.wizard-progress {
  padding: 30px 40px 10px;
  position: relative;
  z-index: 10;
}

/* Compteur de filtres */
.filters-count {
  text-align: center;
  padding: 8px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.filters-count strong {
  color: var(--brand-orange);
  font-weight: 600;
}

.progress-bar-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  position: relative;
  top: 14px;
  /* Align with dots */
  z-index: 0;
}

.progress-bar-fill {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(110, 163, 255, 0.5);
}

.steps-indicator {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #111;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s ease;
}

.step-dot.active {
  border-color: var(--brand-orange);
  color: #fff;
  background: #222;
  box-shadow: 0 0 15px rgba(255, 150, 64, 0.3);
  transform: scale(1.1);
}

.step-dot.completed {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: transparent;
  /* Hide number */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='16px' height='16px'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ============================================
   STEPS ANIMATION
   ============================================ */
.wizard-step {
  padding: 40px;
  /* More padding */
  display: none;
  /* Hide by default */
  flex-direction: column;
  gap: 30px;
  /* Better spacing between sections */
  animation: slideIn 0.5s ease-out;
}

.wizard-step.active {
  display: flex;
  /* Show when active */
  opacity: 1;
  pointer-events: auto;
}

/* Remove prev/next absolute transforms, use simple animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}





.step-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.step-subtitle {
  color: var(--text-muted);
  margin: 0 0 24px;
  font-size: 1rem;
}

/* ============================================
   MOSAIC GRID (Step 1 & 2)
   ============================================ */
.mosaic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.mosaic-card-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mosaic-card-group.full-width {
  grid-column: span 2;
}

.mosaic-card-group h4 {
  color: white;
  margin: 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

/* BIG CARDS (Radio) */
.radio-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
}

.radio-cards.small {
  grid-template-columns: repeat(3, 1fr);
}

.radio-card {
  position: relative;
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  opacity: 0;
}

.card-content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  height: 100%;
}

.card-icon {
  width: 32px;
  height: 32px;
  color: var(--brand-orange);
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Hover & Checked States */
.radio-card:hover .card-content {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.radio-card input:checked+.card-content {
  background: rgba(110, 163, 255, 0.15);
  /* Blue tint */
  border-color: var(--brand-blue);
  box-shadow: 0 0 20px rgba(110, 163, 255, 0.2);
}

.radio-card input:checked+.card-content .card-icon {
  opacity: 1;
  transform: scale(1.15);
}

.radio-card input:checked+.card-content .card-label {
  color: white;
}

/* TRISTATE TOGGLES (Row) */
.tristate-toggles {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-btn {
  flex: 1;
  position: relative;
  cursor: pointer;
  text-align: center;
}

.toggle-btn input {
  position: absolute;
  opacity: 0;
}

.toggle-btn span {
  display: block;
  padding: 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.toggle-btn input:checked+span {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.tristate-toggles.vertical {
  flex-direction: column;
}

/* ============================================
   POWER-UPS GRID (Step 3)
   ============================================ */
.powerup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.powerup-card {
  position: relative;
  cursor: pointer;
}

.powerup-card input {
  position: absolute;
  opacity: 0;
}

.powerup-content {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.powerup-icon {
  width: 36px;
  height: 36px;
  color: var(--brand-orange);
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.powerup-icon svg {
  width: 100%;
  height: 100%;
}

.powerup-label {
  font-weight: 600;
  color: var(--text-muted);
}

.powerup-card:hover .powerup-content {
  background: rgba(255, 255, 255, 0.08);
}

.powerup-card input:checked+.powerup-content {
  background: linear-gradient(135deg, rgba(255, 150, 64, 0.2), rgba(110, 163, 255, 0.2));
  border-color: var(--brand-orange);
  box-shadow: 0 0 15px rgba(255, 150, 64, 0.2);
}

.powerup-card input:checked+.powerup-content .powerup-icon {
  opacity: 1;
  transform: scale(1.1) rotate(5deg);
}

.powerup-card input:checked+.powerup-content .powerup-label {
  color: white;
}

/* ============================================
   ACTIONS (Next/Prev)
   ============================================ */
.wizard-actions {
  display: flex;
  margin-top: 40px;
  /* Plain margin, no sticky bottom needed if flow */
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  /* Separator */
}

.wizard-actions.right {
  justify-content: flex-end;
}

.wizard-actions.split {
  justify-content: space-between;
}

/* Buttons inherit from global .btn style now */
.wizard-actions .btn {
  /* Minimal overrides if needed for spacing */
  margin-left: 8px;
}

/* ============================================
   RESULT CARD (Remains similar but integrated)
   ============================================ */
.activity-result {
  background: #000;
  padding: 40px;
  animation: fadeIn 0.5s ease;
  overflow-y: auto;
  flex: 1;
}

.activity-result h2 {
  font-size: 2rem;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media(max-width: 600px) {
  .mosaic-grid {
    grid-template-columns: 1fr;
  }

  .mosaic-card-group.full-width {
    grid-column: span 1;
  }

  .pediactivite-container {
    min-height: auto;
    height: 100vh;
    border-radius: 0;
    border: none;
  }

  .wizard-progress {
    padding: 20px 20px 10px;
  }

  .wizard-step {
    padding: 20px;
  }
}

/* ============================================
   RESULT ACTIONS (Nouvelle recherche + Regénérer)
   ============================================ */
.result-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.result-actions .btn {
  flex: 1;
  min-width: 140px;
}

/* ============================================
   STEP SECTION TITLE
   ============================================ */
.step-section-title {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 600;
  margin: 24px 0 16px;
  text-align: center;
  opacity: 0.9;
}

/* ============================================
   ACTIVITY RESULT STYLING
   ============================================ */
.activity-result {
  padding: 30px;
  animation: fadeInUp 0.4s ease;
}

.activity-result h2 {
  color: var(--brand-orange);
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
}

.activity-result .section {
  background: var(--glass-panel);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.activity-result .section h4 {
  color: var(--brand-blue);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.activity-result .section p,
.activity-result .section li {
  color: var(--text-main);
  line-height: 1.6;
}

.activity-result .section ul {
  padding-left: 20px;
}

.activity-result .section li {
  margin-bottom: 8px;
}

/* ============================================
   SVG ICONS STYLING
   ============================================ */

/* Title icons (in h3.step-title) */
.title-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-left: 8px;
  color: var(--brand-orange);
}

/* Toggle icons (in toggle buttons) */
.toggle-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-left: 4px;
  color: var(--brand-orange);
  opacity: 0.8;
}

/* Button icons */
.btn-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

.btn-wizard-next .btn-icon {
  margin-left: 4px;
}

.btn-wizard-prev .btn-icon {
  margin-right: 4px;
}

#generate-wizard-btn .btn-icon {
  margin-right: 6px;
}