/* =============================== */
/*     ÉTAPE 9 - Épisodes*/
/* =============================== */

/* ================================
   Layout principal
   ================================ */
.etape-main {
  padding: 20px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 220px);
}

.etape-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ================================
   Titre
   ================================ */
.etape-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}

.etape-title span {
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* ================================
   Sélecteur de saison
   ================================ */
.etape-form-selector {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.etape-form-selector label {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.95rem;
}

.etape-form-selector select {
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 150px;
}

.etape-form-selector select:hover {
  border-color: #a1a5b5;
}

.etape-form-selector select:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* ================================
   Message de succès
   ================================ */
.form-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 600;
  animation: slideIn 0.3s ease;
}

/* ================================
   Formulaire principal
   ================================ */
.etape-form {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* ================================
   Boîtes d'épisodes
   ================================ */
.recap-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.recap-box:hover {
  border-color: #cbd5e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.recap-box h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
}

/* ================================
   Disposition double
   ================================ */
.form-row-double {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .form-row-double {
    grid-template-columns: 1fr;
  }
}

/* ================================
   Champs de formulaire
   ================================ */
.form-line {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-line label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: #0f172a;
  transition: 
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-input[type="text"],
.form-input[type="url"] {
  min-height: 40px;
}

.form-input[type="text"]:hover,
.form-input[type="url"]:hover {
  background: #f9fafb;
  border-color: #a1a5b5;
}

.form-input[type="text"]:focus,
.form-input[type="url"]:focus {
  outline: none;
  background: #fff;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

textarea.form-input {
  min-height: 100px;
  resize: vertical;
  padding: 12px;
}

textarea.form-input:hover {
  background: #f9fafb;
  border-color: #a1a5b5;
}

textarea.form-input:focus {
  outline: none;
  background: #fff;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* ================================
   Prévisualisation d'image
   ================================ */
.image-preview {
  padding: 12px;
  background: #f9fafb;
  border: 1px dashed #cbd5e0;
  border-radius: 10px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview img {
  max-height: 140px;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: block;
}

.muted {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
  font-weight: 500;
}

/* ================================
   Actions
   ================================ */
.etape-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
  flex-wrap: wrap;
}

.btn-etape {
  padding: 0.7rem 1.2rem;
  border: 1px solid #cbd5e0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  transition: 
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.12s ease,
    box-shadow 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-etape:hover {
  background: #f9fafb;
  border-color: #a1a5b5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-etape.primary {
  background: #0ea5e9;
  color: #fff;
  border-color: #0ea5e9;
}

.btn-etape.primary:hover {
  background: #0b98d6;
  border-color: #0b98d6;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(14, 165, 233, 0.3);
}

.btn-secondary {
  background: #0ea5e9;
  color: #fff;
  border-color: #0ea5e9;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover {
  background: #0b98d6;
  border-color: #0b98d6;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(14, 165, 233, 0.3);
}

/* ================================
   Indicateur d'étape
   ================================ */
.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;
  margin-top: 28px;
}

/* ================================
   Animations
   ================================ */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 640px) {
  .etape-title {
    font-size: 1.4rem;
  }

  .etape-form-selector {
    flex-direction: column;
    align-items: flex-start;
  }

  .etape-form-selector select {
    width: 100%;
  }

  .recap-box {
    padding: 16px;
  }

  .recap-box h3 {
    font-size: 1rem;
  }

  .etape-actions {
    flex-direction: column;
  }

  .btn-etape,
  .btn-secondary {
    width: 100%;
  }
}
