:root {
  --bg: #0f172a;
  --primary: #38bdf8;
  --success: #ffd8f5;
  --text: #f8fafc;
  --muted: #64748b;
  --glass: rgba(30, 41, 59, 0.7);
}

.stepper-container {
  background: var(--glass);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
}

h2 {
  margin-bottom: 30px;
  font-weight: 300;
  text-align: center;
  letter-spacing: 1px;
}

.steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* La ligne de progression en arrière-plan */
.progress-line {
  position: absolute;
  left: 19px;
  top: 0;
  width: 4px;
  height: 100%;
  background: #334155;
  z-index: 1;
  border-radius: 2px;
}

/* La ligne qui se remplit */
.progress-fill {
  position: absolute;
  left: 19px;
  top: 0;
  width: 4px;
  height: 0%;
  background: var(--success);
  z-index: 2;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px var(--success);
}

.step {
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 3;
  cursor: pointer;
  transition: transform 0.2s;
}

.step:active {
  transform: scale(0.98);
}

.step-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1e293b;
  border: 3px solid #334155;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  transition: all 0.4s ease;
  position: relative;
}

.step.completed .step-circle {
  background: var(--success);
  border-color: var(--success);
  transform: rotateY(360deg);
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.3s;
}

.step.active .step-title {
  color: var(--primary);
}

.step.completed .step-title {
  color: var(--text);
}

.step-desc {
  font-size: 0.85rem;
  color: var(--muted);
}

/* L'icône du drapeau */
.flag-icon {
  display: none;
  font-size: 1.2rem;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.step.completed .flag-icon {
  display: block;
}

.step.completed .step-num {
  display: none;
}

@keyframes popIn {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

button#reset {
  margin-top: 30px;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

button#reset:hover {
  border-color: var(--primary);
  color: var(--primary);
}