:root {
  --accent: #6c63ff;
  --accent-dark: #4b3df5;
  --ink: #151527;
  --muted: #6f7284;
  --border: #e3e2ee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top, #ffffff 0%, #f6f4ff 45%, #f1f0fb 100%);
  color: var(--ink);
  min-height: 100vh;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.header {
  margin-bottom: 24px;
  padding-top: 16px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.subtitle {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-dark);
}

/* Indicateur d'étapes */
.progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
}

.progress-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eceaf6;
  color: #9a98b3;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.progress-step.active {
  background: var(--ink);
  color: #fff;
  transform: scale(1.08);
}

.progress-step.done {
  background: var(--accent);
  color: #fff;
}

.progress-line {
  flex: 1;
  height: 2px;
  background: #eceaf6;
  max-width: 28px;
  border-radius: 1px;
  transition: background 0.25s ease;
}

.progress-line.done {
  background: var(--accent);
}

.notice {
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 18px;
}

.notice.error {
  background: #fff0f0;
  border: 1px solid #ffd0d0;
  color: #9b1c1c;
}

.notice.warning {
  background: #fff8e1;
  border: 1px solid #ffe49a;
  color: #8a6100;
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 224, 240, 0.9);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow:
    0 16px 32px rgba(35, 25, 90, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  animation: panel-in 0.35s ease;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}

.hint {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #55586a;
  margin-bottom: 7px;
}

.form-field input {
  width: 100%;
  border: 1px solid var(--border);
  background: white;
  border-radius: 16px;
  padding: 14px 15px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.14);
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 16px;
  padding: 14px 15px;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.product-item:has(input:checked) {
  border-color: var(--accent);
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.product-item input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.instructions {
  background: #f7f7fc;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 20px;
}

.send {
  width: 100%;
  border: none;
  border-radius: 22px;
  padding: 16px;
  font-size: 16px;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--ink) 0%, #2c2a4f 100%);
  box-shadow: 0 14px 28px rgba(21, 21, 39, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.send:hover:not(:disabled) {
  box-shadow: 0 16px 32px rgba(21, 21, 39, 0.24);
}

.send:disabled {
  opacity: 0.6;
  cursor: default;
}

.send:active:not(:disabled) {
  transform: scale(0.98);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.shop-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-link {
  display: block;
  border: 1px solid var(--border);
  background: white;
  border-radius: 16px;
  padding: 15px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.shop-link:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.shop-link:active {
  transform: scale(0.98);
}

/* Étape finale */
.done-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ecfaf0;
  color: #1f9d55;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.done-icon svg {
  width: 28px;
  height: 28px;
}

[data-step="done"] .panel-title {
  text-align: center;
}

[data-step="done"] .hint {
  text-align: center;
  margin-bottom: 0;
}

/* Tablette / desktop */
@media (min-width: 640px) {
  .app {
    max-width: 560px;
    padding: 48px 24px 64px;
  }

  h1 {
    font-size: 28px;
  }

  .panel {
    padding: 32px;
    border-radius: 28px;
  }

  .panel-title {
    font-size: 20px;
  }

  .send {
    font-size: 17px;
  }
}

@media (min-width: 960px) {
  .app {
    max-width: 620px;
  }
}
