/* ============================================================
   CREER-PAGE.CSS — Formulaire multi-étapes Atryvia
   ============================================================ */

/* ===== HERO ===== */
.hero {
  padding: 72px 0 34px;
  position: relative;
}

.hero-wrap {
  max-width: 920px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--navy);
}

.hero-subtitle {
  margin: 0;
  max-width: 760px;
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ===== LAYOUT ===== */
.section {
  padding: 42px 0 84px;
}

.form-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* ===== SIDEBAR PROGRESSION ===== */
.progress-sidebar {
  position: sticky;
  top: 100px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.progress-step.active {
  opacity: 1;
}

.progress-step.completed {
  opacity: 0.8;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(45, 90, 61, 0.1);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.progress-step.active .step-number {
  background: var(--green);
  color: white;
}

.progress-step.completed .step-number {
  background: var(--green);
  color: white;
}

.progress-step.completed .step-number::after {
  content: '✓';
}

.step-label {
  font-size: 0.95rem;
  color: var(--navy);
  font-weight: 500;
}

.progress-bar {
  height: 4px;
  background: rgba(45, 90, 61, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ===== CONTENU FORMULAIRE ===== */
.form-content {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-header {
  margin-bottom: 32px;
}

.step-header h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--navy);
  letter-spacing: -0.03em;
}

.step-header p {
  margin: 0;
  color: var(--text-light);
  font-size: 1rem;
}

/* ===== CHAMPS DE FORMULAIRE ===== */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}

.required {
  color: #e53e3e;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(109, 125, 115, 0.15);
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--navy);
  transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--green);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== SÉLECTEUR DE TYPE ===== */
.type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.type-card {
  position: relative;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(109, 125, 115, 0.15);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.type-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}

.type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.type-card input[type="radio"]:checked + .type-icon {
  transform: scale(1.1);
}

.type-card:has(input[type="radio"]:checked) {
  border-color: var(--green);
  background: rgba(45, 90, 61, 0.05);
}

.type-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}

.type-title {
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.type-desc {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  position: relative;
  border: 2px dashed rgba(109, 125, 115, 0.3);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.4);
}

.upload-zone:hover {
  border-color: var(--green);
  background: rgba(45, 90, 61, 0.03);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.upload-text {
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 0.85rem;
  color: var(--text-light);
}

.upload-preview {
  position: relative;
  display: inline-block;
  margin-top: 16px;
}

.upload-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.upload-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e53e3e;
  color: white;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.upload-remove:hover {
  transform: scale(1.1);
}

/* ===== GALERIE ===== */
.gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.gallery-item-remove:hover {
  background: #e53e3e;
}

/* ===== HISTOIRES ===== */
.story-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(109, 125, 115, 0.15);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

.story-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.story-card-title {
  font-weight: 600;
  color: var(--navy);
}

.story-card-remove {
  background: none;
  border: none;
  color: #e53e3e;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.story-card-remove:hover {
  background: rgba(229, 62, 62, 0.1);
}

.btn-add-story {
  width: 100%;
  padding: 16px;
  background: rgba(45, 90, 61, 0.05);
  border: 2px dashed rgba(45, 90, 61, 0.3);
  border-radius: 12px;
  color: var(--green);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-story:hover {
  background: rgba(45, 90, 61, 0.1);
  border-color: var(--green);
}

/* ===== SÉLECTEUR DE CONFIDENTIALITÉ ===== */
.privacy-selector {
  display: grid;
  gap: 12px;
}

.privacy-option {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(109, 125, 115, 0.15);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.privacy-option:hover {
  border-color: var(--green);
}

.privacy-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.privacy-option:has(input[type="radio"]:checked) {
  border-color: var(--green);
  background: rgba(45, 90, 61, 0.05);
}

.privacy-icon {
  font-size: 1.5rem;
}

.privacy-text strong {
  display: block;
  color: var(--navy);
  margin-bottom: 2px;
}

.privacy-text span {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== CHECKBOX ===== */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--green);
}

.checkbox-label strong {
  display: block;
  color: var(--navy);
  margin-bottom: 4px;
}

.checkbox-desc {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== URL PREVIEW ===== */
.url-preview {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(109, 125, 115, 0.15);
  border-radius: 12px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.url-prefix {
  color: var(--text-light);
}

.url-slug {
  color: var(--green);
  font-weight: 600;
}

/* ===== BOUTONS D'ACTION ===== */
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(109, 125, 115, 0.15);
}

.btn-prev,
.btn-next,
.btn-submit {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-prev {
  background: rgba(109, 125, 115, 0.1);
  color: var(--navy);
}

.btn-prev:hover {
  background: rgba(109, 125, 115, 0.2);
}

.btn-next,
.btn-submit {
  background: var(--green);
  color: white;
  margin-left: auto;
}

.btn-next:hover,
.btn-submit:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(45, 90, 61, 0.2);
}

.btn-submit {
  position: relative;
}

.btn-loader {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-loader svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .form-layout {
    grid-template-columns: 1fr;
  }
  .progress-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero { padding: 46px 0 24px; }
  .hero-title { font-size: 2.4rem; }
  
  .form-content {
    padding: 24px 20px;
    border-radius: 20px;
  }
  
  .type-selector {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn-prev,
  .btn-next,
  .btn-submit {
    width: 100%;
  }
}