/* =============================== */
/*      ÉTAPES - LAYOUT            */
/* =============================== */

/* Page principale */
.etape-main {
  padding: 40px 20px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 220px);
  color: var(--text-main);
}

/* Conteneur d'étape */
.etape-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

/* Titre bandeau moderne */
.etape-title {
  margin: 0 0 24px;
  padding: 20px 28px;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.3;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e88e5 0%, #7e57c2 100%);
  box-shadow: 0 12px 32px rgba(30, 136, 229, 0.25);
  position: relative;
  overflow: hidden;
}

.etape-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  pointer-events: none;
}

.etape-title::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Description */
.etape-description {
  text-align: center;
  color: #334155;
  font-weight: 600;
  margin: 0 0 18px;
}

/* Badge indicateur d'étape moderne */
.page-etape .etape-indicateur {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #1e88e5 0%, #7e57c2 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  border-radius: 12px;
  border: none;
  box-shadow: 0 8px 24px rgba(30, 136, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  width: max-content;
  position: relative;
  margin-top: 24px;
  margin-left: auto;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.page-etape .etape-indicateur:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(30, 136, 229, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.page-etape .etape-indicateur::before {
  content: "⬤";
  font-size: 8px;
  color: #fff;
  opacity: 0.9;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Évite doublon dans actions */
.page-etape .etape-actions .etape-indicateur {
  display: none;
}

/* Conteneur final steps */
.final-step-container {
  padding: var(--spacing-xl) var(--spacing-md);
  background: var(--surface-contrast);
  display: flex;
  justify-content: center;
}

.final-step-wrapper {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}

.final-title {
  margin: 0 0 .35rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 900;
  color: var(--text-main);
  font-family: var(--font-accent);
}

.final-description {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 var(--spacing-lg);
}

/* Hero final */
.final-hero {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.final-hero_poster {
  flex: 0 0 auto;
  width: clamp(120px, 18vw, 200px);
}

.final-hero_poster img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.image-source {
  font-size: .85rem;
  margin-top: 6px;
  color: var(--text-muted);
}

.image-source a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  transition: opacity .2s;
}

.image-source a:hover {
  opacity: .8;
}

/* Responsive */
@media (max-width: 768px) {
  .etape-title {
    padding: 16px 20px;
    font-size: 1.4rem;
    margin-bottom: 20px;
  }

  .etape-title::after {
    width: 150px;
    height: 150px;
    right: -15%;
  }

  .page-etape .etape-indicateur {
    padding: 10px 18px;
    font-size: 0.85rem;
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  .etape-title {
    padding: 14px 16px;
    font-size: 1.2rem;
    border-radius: 12px;
  }

  .page-etape .etape-indicateur {
    padding: 8px 16px;
    font-size: 0.8rem;
    gap: 8px;
  }
}

@media (max-width: 980px) {
  .etape-container {
    padding: 20px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-etape .etape-indicateur,
  .page-etape .etape-indicateur::before {
    animation: none;
    transition: none;
  }

  .etape-title::before,
  .etape-title::after {
    display: none;
  }
}
