/* ═══════════════════════════════════════════════
   Moirans Pratique – Wizard de démarrage
   ═══════════════════════════════════════════════ */

.app-wizard {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background:
    radial-gradient(
      ellipse 80% 55% at 50% 0%,
      rgba(74, 222, 128, .08),
      transparent 65%
    ),
    var(--bg);

  overflow-y: auto;
}

.wizard-card {
  width: 100%;
  max-width: 520px;

  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);

  box-shadow:
    0 24px 70px rgba(0, 0, 0, .45);

  overflow: hidden;
}

.wizard-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;

  padding: 18px 20px 4px;
}

.wizard-progress-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--border2);

  transition:
    width .2s ease,
    background .2s ease;
}

.wizard-progress-dot.active {
  width: 24px;
  border-radius: 10px;
  background: var(--green);
}


/* ── CONTENU ─────────────────────────────────── */

.wizard-content {
  padding: 30px 30px 24px;
  text-align: center;
}

.wizard-content-done {
  padding-top: 44px;
  padding-bottom: 36px;
}

.wizard-icon,
.wizard-step-icon,
.wizard-success-icon {
  width: 64px;
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 auto 18px;

  border-radius: 20px;

  font-size: 30px;
}

.wizard-icon,
.wizard-step-icon {
  background: var(--green-dim);
  border: 1px solid rgba(74, 222, 128, .18);
}

.wizard-success-icon {
  background: var(--green);
  color: #0a1a10;

  font-family: var(--font-d);
  font-size: 30px;
  font-weight: 800;

  box-shadow:
    0 10px 30px rgba(74, 222, 128, .18);
}

.wizard-title {
  margin: 0;

  font-family: var(--font-d);
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.08;
  letter-spacing: -.04em;

  color: var(--text);
}

.wizard-text {
  max-width: 420px;

  margin: 16px auto 0;

  color: var(--text2);

  font-size: 14px;
  line-height: 1.6;
}


/* ── ÉCRAN D'ACCUEIL ────────────────────────── */

.wizard-features {
  display: flex;
  flex-direction: column;
  gap: 9px;

  margin-top: 26px;

  text-align: left;
}

.wizard-feature {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px 13px;

  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.wizard-feature > span {
  width: 34px;
  height: 34px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--surface);
  border-radius: 10px;

  font-size: 17px;
}

.wizard-feature strong {
  display: block;

  color: var(--text);

  font-size: 12.5px;
  font-weight: 600;
}

.wizard-feature small {
  display: block;

  margin-top: 2px;

  color: var(--text3);

  font-size: 11px;
  line-height: 1.35;
}


/* ── CHOIX ───────────────────────────────────── */

.wizard-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;

  margin-top: 24px;
}

.wizard-choice-grid-small {
  margin-top: 9px;
}

.wizard-choice-grid-three {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 9px;
}

.wizard-choice {
  min-height: 46px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 10px 12px;

  background: var(--surface2);
  color: var(--text2);

  border: 1px solid var(--border);
  border-radius: var(--r-md);

  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .15s ease;
}

.wizard-choice:hover {
  border-color: var(--border2);
  color: var(--text);
}

.wizard-choice:active {
  transform: scale(.98);
}

.wizard-choice.selected {
  background: var(--green-dim);
  border-color: rgba(74, 222, 128, .45);
  color: var(--green);
}


/* ── CHAMPS ──────────────────────────────────── */

.wizard-fields {
  display: none;

  margin-top: 18px;

  padding: 15px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);

  text-align: left;
}

.wizard-fields.visible {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wizard-label {
  display: flex;
  flex-direction: column;
  gap: 6px;

  color: var(--text2);

  font-size: 11.5px;
  font-weight: 600;
}

.wizard-input {
  width: 100%;

  min-height: 42px;

  padding: 9px 11px;

  background: var(--surface2);
  color: var(--text);

  border: 1px solid var(--border);
  border-radius: var(--r-sm);

  font-family: var(--font-b);
  font-size: 13px;

  outline: none;

  transition:
    border-color .18s ease,
    box-shadow .18s ease;
}

.wizard-input::placeholder {
  color: var(--text3);
}

.wizard-input:focus {
  border-color: rgba(74, 222, 128, .55);

  box-shadow:
    0 0 0 3px rgba(74, 222, 128, .08);
}

.wizard-check {
  display: flex;
  align-items: center;
  gap: 9px;

  color: var(--text2);

  font-size: 12px;
  font-weight: 500;

  cursor: pointer;
}

.wizard-check input {
  width: 16px;
  height: 16px;

  accent-color: var(--green);
}

.wizard-subtitle {
  color: var(--text3);

  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}


/* ── PERSONNALISATION ───────────────────────── */

.wizard-settings {
  display: flex;
  flex-direction: column;
  gap: 9px;

  margin-top: 25px;

  text-align: left;
}

.wizard-setting {
  display: flex;
  align-items: center;
  gap: 11px;

  padding: 12px;

  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.wizard-setting-icon {
  width: 36px;
  height: 36px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--surface);
  border-radius: 10px;

  font-size: 17px;
}

.wizard-setting-content {
  flex: 1;
  min-width: 0;
}

.wizard-setting-content strong {
  display: block;

  color: var(--text);

  font-size: 12.5px;
  font-weight: 600;
}

.wizard-setting-content small {
  display: block;

  margin-top: 3px;

  color: var(--text3);

  font-size: 10.5px;
  line-height: 1.4;
}

.wizard-toggle {
  position: relative;

  width: 44px;
  height: 25px;

  flex-shrink: 0;

  padding: 0;

  background: var(--border2);

  border: 0;
  border-radius: 20px;

  cursor: pointer;

  transition: background .2s ease;
}

.wizard-toggle span {
  position: absolute;
  top: 4px;
  left: 4px;

  width: 17px;
  height: 17px;

  background: var(--text);

  border-radius: 50%;

  transition: transform .2s ease;
}

.wizard-toggle.active {
  background: var(--green);
}

.wizard-toggle.active span {
  transform: translateX(19px);
  background: #0a1a10;
}

.wizard-install-btn {
  flex-shrink: 0;

  padding: 7px 10px;

  background: var(--blue-dim);
  color: var(--blue);

  border: 1px solid rgba(96, 165, 250, .2);
  border-radius: var(--r-sm);

  font-family: var(--font-b);
  font-size: 11px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background .18s ease,
    border-color .18s ease;
}

.wizard-install-btn:hover {
  background: rgba(96, 165, 250, .22);
  border-color: rgba(96, 165, 250, .35);
}


/* ── RÉSUMÉ FINAL ───────────────────────────── */

.wizard-summary {
  display: flex;
  flex-direction: column;
  gap: 7px;

  max-width: 300px;

  margin: 25px auto 0;

  padding: 14px 16px;

  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);

  color: var(--text2);

  font-size: 12px;
  line-height: 1.5;

  text-align: left;
}

.wizard-summary div {
  padding: 3px 0;
}


/* ── ACTIONS ─────────────────────────────────── */

.wizard-actions {
  padding: 0 30px 30px;
}

.wizard-actions-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
}

.wizard-btn {
  width: 100%;
  min-height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border: 0;
  border-radius: var(--r-md);

  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  transition:
    transform .15s ease,
    opacity .15s ease,
    box-shadow .15s ease;
}

.wizard-btn-primary {
  background: var(--green);
  color: #0a1a10;

  box-shadow:
    0 8px 24px rgba(74, 222, 128, .12);
}

.wizard-btn-primary:hover {
  opacity: .92;

  box-shadow:
    0 10px 28px rgba(74, 222, 128, .18);
}

.wizard-btn-primary:active {
  transform: scale(.98);
}

.wizard-btn-primary span {
  font-size: 18px;
}

.wizard-btn-secondary {
  width: 48px;

  background: var(--surface2);
  color: var(--text2);

  border: 1px solid var(--border);
}

.wizard-btn-secondary:hover {
  color: var(--text);
  border-color: var(--border2);
}


/* ── MOBILE ──────────────────────────────────── */

@media (max-width: 600px) {

  .app-wizard {
    align-items: flex-start;
    padding: 0;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .wizard-card {
    width: 100%;
    min-height: 100%;
    max-width: none;

    display: flex;
    flex-direction: column;

    border: 0;
    border-radius: 0;

    box-shadow: none;

    overflow: visible;
  }

  .wizard-progress {
    flex-shrink: 0;

    padding-top: 22px;
  }

  .wizard-content {
    flex: none;

    display: block;

    padding: 26px 20px 24px;
  }

  .wizard-content-done {
    padding-top: 36px;
    padding-bottom: 32px;
  }

  .wizard-actions {
    flex-shrink: 0;

    padding: 14px 20px 24px;

    background: var(--card);
  }

  .wizard-feature,
  .wizard-setting {
    padding: 11px 12px;
  }

  .wizard-choice {
    min-height: 44px;

    font-size: 11.5px;
  }

  .wizard-fields {
    width: 100%;
  }

  .wizard-label {
    width: 100%;
  }

  .wizard-input {
    width: 100%;
    box-sizing: border-box;
  }
}


/* ── PETITS ÉCRANS ───────────────────────────── */

@media (max-width: 380px) {

  .wizard-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .wizard-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .wizard-title {
    font-size: 25px;
  }

  .wizard-text {
    font-size: 13px;
  }

  .wizard-setting-content small {
    font-size: 10px;
  }

  .wizard-choice-grid-three {
    gap: 6px;
  }

  .wizard-choice-grid-three .wizard-choice {
    padding-left: 5px;
    padding-right: 5px;
  }
}