/* ── Page layout ── */
.pub-form-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 16px 80px;
}

/* ── Step indicator ── */
.form-steps {
  display: flex; align-items: center; justify-content: center; margin-bottom: 36px;
}
.form-step-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: #e5e7eb;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #9ca3af;
  transition: all 0.25s; flex-shrink: 0;
}
.form-step-dot.active { background: #312783; color: #fff; box-shadow: 0 4px 12px rgba(49,39,131,0.3); }
.form-step-dot.done   { background: #16a34a; color: #fff; }
.form-step-line {
  flex: 1; height: 2px; background: #e5e7eb; max-width: 100px; transition: background 0.25s;
}
.form-step-line.done { background: #16a34a; }

/* ── Step title ── */
.form-step-title { text-align: center; margin-bottom: 28px; }
.form-step-title h2 { font-size: 1.4rem; font-weight: 800; color: #0a0a14; margin: 0 0 6px; }
.form-step-title p  { font-size: 0.88rem; color: #6b7280; margin: 0; }

/* ── Type cards ── */
.type-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px;
}
.type-card {
  border: 2px solid #e5e7eb; border-radius: 16px; padding: 22px 14px;
  text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  background: #fff;
}
.type-card:hover { border-color: #312783; transform: translateY(-2px); }
.type-card.selected { border-color: #F39200; background: rgba(243,146,0,0.04); }
.type-card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin: 0 auto 12px;
}
.type-card-label { font-size: 0.93rem; font-weight: 700; color: #0a0a14; margin-bottom: 4px; }
.type-card-desc  { font-size: 0.76rem; color: #6b7280; line-height: 1.4; }
.type-card-premium { border-color: rgba(243,146,0,0.3); background: linear-gradient(135deg,rgba(243,146,0,0.03),rgba(227,6,19,0.02)); }
.type-card-premium:hover { border-color: #F39200; }
.type-card-premium.selected { border-color: #F39200; background: rgba(243,146,0,0.07); }
.type-cards > div[style*="border-top"] { grid-column: 1 / -1; }
.badge-boost {
  display: inline-block; font-size: 0.6rem; font-weight: 800; letter-spacing: .05em;
  background: linear-gradient(135deg,#F39200,#E30613); color: #fff;
  padding: 2px 7px; border-radius: 20px; margin-left: 6px; vertical-align: middle;
}

/* ── Form sections ── */
.form-section {
  background: #fff; border: 1.5px solid #e5e7eb;
  border-radius: 16px; padding: 22px; margin-bottom: 18px;
}
.form-section-title {
  font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: #312783; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.form-field { margin-bottom: 14px; }
.form-field:last-child { margin-bottom: 0; }
.form-field label {
  display: block; font-size: 0.84rem; font-weight: 600; color: #374151; margin-bottom: 5px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid #e5e7eb; border-radius: 10px;
  font-size: 0.88rem; font-family: inherit; color: #0a0a14;
  background: #fafafa; transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: none; border-color: #312783; background: #fff; }
.form-field textarea { resize: vertical; min-height: 100px; }

/* ── Photo grid ── */
.photo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.photo-tile {
  aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  position: relative; background: #f3f4f6;
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,0.55); border: none;
  color: #fff; font-size: 0.68rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
}
.photo-main-badge {
  position: absolute; bottom: 4px; left: 4px;
  background: #F39200; color: #fff;
  font-size: 0.63rem; font-weight: 700;
  padding: 2px 6px; border-radius: 4px; z-index: 2;
}
.photo-add-btn {
  aspect-ratio: 1; border-radius: 10px;
  border: 2px dashed #d1d5db; background: #fafafa;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; cursor: pointer; color: #9ca3af;
  font-size: 0.75rem; font-family: inherit; transition: all 0.2s;
}
.photo-add-btn:hover { border-color: #312783; color: #312783; }
.photo-add-btn i { font-size: 1.25rem; }

/* Upload status overlay on each photo tile */
.photo-upload-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.38);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #fff; z-index: 2;
  border-radius: 10px; transition: opacity 0.3s;
}
.photo-upload-overlay.done {
  background: rgba(22,163,74,0.45);
  opacity: 0;          /* fade out when done */
  animation: fadeOutOverlay 1.2s forwards 0.6s;
}
.photo-upload-overlay.error {
  background: rgba(227,6,19,0.5);
  cursor: pointer;
  opacity: 1;
}
@keyframes fadeOutOverlay { to { opacity: 0; } }

/* ── Nav buttons ── */
.form-nav { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.btn-form-prev {
  padding: 11px 22px; border-radius: 50px;
  border: 1.5px solid #e5e7eb; background: #fff;
  color: #374151; font-size: 0.87rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.btn-form-prev:hover { border-color: #312783; color: #312783; }
.btn-form-next {
  flex: 1; padding: 12px 22px; border-radius: 50px;
  background: linear-gradient(135deg, #312783, #5448c8);
  color: #fff; font-size: 0.88rem; font-weight: 700;
  border: none; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(49,39,131,0.28);
}
.btn-form-next:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(49,39,131,0.38); }
.btn-form-submit {
  flex: 1; padding: 13px 22px; border-radius: 50px;
  background: linear-gradient(135deg, #F39200, #ff7b1c);
  color: #fff; font-size: 0.9rem; font-weight: 700;
  border: none; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(243,146,0,0.32);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit;
}
.btn-form-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(243,146,0,0.45); }
.btn-form-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Error ── */
.form-error {
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 10px; padding: 10px 14px;
  font-size: 0.84rem; color: #E30613; margin-bottom: 16px; display: none;
}

/* ── Success overlay ── */
.pub-success-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
}
.pub-success-card {
  background: #fff; border-radius: 20px; padding: 40px 28px; text-align: center;
  max-width: 380px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}
.pub-success-icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px; font-size: 1.8rem; color: #fff;
  box-shadow: 0 8px 24px rgba(22,163,74,0.35);
}
.pub-success-card h2 { font-size: 1.3rem; font-weight: 800; color: #0a0a14; margin: 0 0 8px; }
.pub-success-card p  { font-size: 0.87rem; color: #6b7280; margin: 0 0 22px; line-height: 1.6; }
.pub-success-actions { display: flex; flex-direction: column; gap: 9px; }
.pub-success-actions a {
  padding: 11px 20px; border-radius: 50px;
  font-size: 0.86rem; font-weight: 700; text-decoration: none; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 7px; transition: all 0.2s;
}
.btn-prim-link { background: linear-gradient(135deg,#F39200,#ff7b1c); color:#fff; box-shadow:0 4px 14px rgba(243,146,0,.32); }
.btn-prim-link:hover { transform: translateY(-1px); }
.btn-sec-link { background: transparent; border: 1.5px solid #e0e0ea; color: #374151; }
.btn-sec-link:hover { border-color: #312783; color: #312783; }

/* ── Desktop layout ── */
@media (min-width: 860px) {
  .pub-form-page { max-width: 1080px; padding: 48px 48px 80px; }
  .form-step-line { max-width: 160px; }
  .form-step-dot  { width: 40px; height: 40px; font-size: 0.9rem; }
  .form-step-title { text-align: left; margin-bottom: 32px; }
  .form-step-title h2 { font-size: 1.55rem; }

  .type-card      { padding: 32px 20px; }
  .type-card-icon { width: 64px; height: 64px; }
  .type-card-icon i { font-size: 1.6rem !important; }
  .type-card-label { font-size: 1rem; }
  .type-card-desc  { font-size: 0.82rem; }

  /* Step 2 : 2 colonnes */
  .step2-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start;
  }
  .step2-grid .form-section { margin-bottom: 0; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }

  /* Step 3 : 2 colonnes */
  .step3-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start;
  }
  .step3-col { display: flex; flex-direction: column; gap: 20px; }
  .step3-col .form-section,
  .step3-grid > .form-section { margin-bottom: 0; }

  .btn-form-next,
  .btn-form-submit { max-width: 260px; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .type-cards { grid-template-columns: 1fr; gap: 10px; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 420px) {
  .pub-form-page { padding: 24px 12px 60px; }
  .photo-grid  { grid-template-columns: repeat(2, 1fr); }
}
