/* ========================================
   MÉDIATION GRATUITE — Inscription Premium CSS
   Complete design overhaul for the registration wizard
   ======================================== */

/* ==========================================
   PAGE LAYOUT
   ========================================== */
.inscription-page {
  min-height: 100vh;
  background: linear-gradient(170deg, #f0f4ff 0%, #ffffff 40%, #f8fafc 100%);
  position: relative;
  overflow-x: hidden;
}

html[data-theme="dark"] .inscription-page {
  background: linear-gradient(170deg, #0c1529 0%, #0f172a 40%, #131c31 100%);
}

/* Subtle background orbs */
.inscription-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.inscription-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
}

.inscription-bg .orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 51, 153, 0.3) 0%, transparent 70%);
  top: -10%;
  right: -8%;
}

.inscription-bg .orb-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  bottom: 5%;
  left: -5%;
}

html[data-theme="dark"] .inscription-bg .orb-1 {
  opacity: 0.12;
}

html[data-theme="dark"] .inscription-bg .orb-2 {
  opacity: 0.08;
}

/* ==========================================
   HEADER BAR
   ========================================== */
.inscription-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(0, 51, 153, 0.06);
  padding: 0.75rem 0;
}

html[data-theme="dark"] .inscription-header {
  background: rgba(15, 23, 42, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.inscription-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.inscription-header .logo img {
  height: 38px;
  width: auto;
}

.inscription-header .btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.inscription-header .btn-back:hover {
  color: var(--primary, #0066cc);
  background: rgba(0, 102, 204, 0.06);
}

.inscription-header .btn-back svg {
  width: 16px;
  height: 16px;
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */
.inscription-main {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ==========================================
   PROGRESS / STEPPER
   ========================================== */
.premium-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
  gap: 0;
}

.premium-stepper-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.premium-stepper-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: #ffffff;
  color: var(--text-muted, #94a3b8);
  border: 2px solid var(--border, #e2e8f0);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.premium-stepper-item.active .premium-stepper-circle {
  background: var(--primary, #0066cc);
  color: #ffffff;
  border-color: var(--primary, #0066cc);
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15), 0 4px 12px rgba(0, 102, 204, 0.2);
  transform: scale(1.05);
}

.premium-stepper-item.completed .premium-stepper-circle {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.premium-stepper-item.completed .premium-stepper-circle::after {
  content: '✓';
  font-size: 1rem;
}

.premium-stepper-item.completed .premium-stepper-num {
  display: none;
}

.premium-stepper-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.premium-stepper-item.active .premium-stepper-label {
  color: var(--primary, #0066cc);
}

.premium-stepper-item.completed .premium-stepper-label {
  color: #059669;
}

.premium-stepper-line {
  width: 48px;
  height: 2px;
  background: var(--border, #e2e8f0);
  margin: 0 0.4rem;
  flex-shrink: 0;
  transition: background 0.4s ease;
  border-radius: 1px;
}

.premium-stepper-line.completed {
  background: #059669;
}

@media (max-width: 600px) {
  .premium-stepper-label {
    display: none;
  }
  .premium-stepper-line {
    width: 24px;
  }
  .premium-stepper-circle {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
}

/* Dark mode stepper */
html[data-theme="dark"] .premium-stepper-circle {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

html[data-theme="dark"] .premium-stepper-item.active .premium-stepper-circle {
  background: #3b82f6;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 4px 12px rgba(59, 130, 246, 0.2);
}

html[data-theme="dark"] .premium-stepper-line {
  background: #334155;
}

/* ==========================================
   WIZARD CARD
   ========================================== */
.wizard-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 51, 153, 0.06);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03),
              0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.3s ease;
}

.wizard-card:hover {
  border-color: rgba(0, 102, 204, 0.1);
}

html[data-theme="dark"] .wizard-card {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

/* Step header */
.step-header {
  text-align: center;
  margin-bottom: 2rem;
}

.step-header .step-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(0, 102, 204, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--primary, #0066cc);
}

html[data-theme="dark"] .step-header .step-icon {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.step-header .step-icon svg {
  width: 26px;
  height: 26px;
}

.step-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

html[data-theme="dark"] .step-header h2 {
  color: #f1f5f9;
}

.step-header .step-desc {
  font-size: 0.925rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
}

html[data-theme="dark"] .step-header .step-desc {
  color: #94a3b8;
}

/* ==========================================
   FORM ELEMENTS — PREMIUM
   ========================================== */
.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  margin-bottom: 0.4rem;
}

html[data-theme="dark"] .form-field label {
  color: #e2e8f0;
}

.form-field .required {
  color: #ef4444;
  margin-left: 2px;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.925rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary, #1e293b);
  background: #ffffff;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 12px;
  transition: all 0.25s ease;
  outline: none;
  box-sizing: border-box;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--primary, #0066cc);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #94a3b8;
}

html[data-theme="dark"] .form-field input,
html[data-theme="dark"] .form-field textarea,
html[data-theme="dark"] .form-field select {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

html[data-theme="dark"] .form-field input:focus,
html[data-theme="dark"] .form-field textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.7;
}

.form-field .field-error {
  display: none;
  font-size: 0.78rem;
  color: #ef4444;
  margin-top: 0.35rem;
  font-weight: 500;
}

.form-field.has-error input,
.form-field.has-error textarea {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.form-field.has-error .field-error {
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 540px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Character counter */
.form-char-count {
  text-align: right;
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 0.35rem;
}

/* ==========================================
   INFO CARD (contextual tip)
   ========================================== */
.info-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(0, 102, 204, 0.04);
  border: 1px solid rgba(0, 102, 204, 0.1);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
}

.info-card--success {
  background: rgba(5, 150, 105, 0.04);
  border-color: rgba(5, 150, 105, 0.12);
}

.info-card .info-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--primary, #0066cc);
  margin-top: 1px;
}

.info-card--success .info-icon {
  color: #059669;
}

.info-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary, #475569);
  margin: 0;
}

.info-card strong {
  color: var(--text-primary, #1e293b);
  font-weight: 600;
}

html[data-theme="dark"] .info-card {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.12);
}

html[data-theme="dark"] .info-card--success {
  background: rgba(52, 211, 153, 0.06);
  border-color: rgba(52, 211, 153, 0.1);
}

html[data-theme="dark"] .info-card p {
  color: #94a3b8;
}

html[data-theme="dark"] .info-card strong {
  color: #e2e8f0;
}

/* ==========================================
   DOMAIN SELECTOR — PREMIUM
   ========================================== */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 540px) {
  .domain-grid {
    grid-template-columns: 1fr;
  }
}

.domain-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  background: #ffffff;
  border: 2px solid var(--border, #e2e8f0);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.domain-card:hover {
  border-color: rgba(0, 102, 204, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 102, 204, 0.08);
}

.domain-card.selected {
  border-color: var(--primary, #0066cc);
  background: rgba(0, 102, 204, 0.03);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.domain-card .domain-emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.domain-card .domain-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}

.domain-card .domain-sub {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.domain-card.selected .domain-name {
  color: var(--primary, #0066cc);
}

/* Check indicator */
.domain-card::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border, #e2e8f0);
  transition: all 0.3s ease;
}

.domain-card.selected::after {
  background: var(--primary, #0066cc);
  border-color: var(--primary, #0066cc);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

html[data-theme="dark"] .domain-card {
  background: #1e293b;
  border-color: #334155;
}

html[data-theme="dark"] .domain-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

html[data-theme="dark"] .domain-card.selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.06);
}

html[data-theme="dark"] .domain-card .domain-name {
  color: #f1f5f9;
}

html[data-theme="dark"] .domain-card.selected .domain-name {
  color: #60a5fa;
}

/* ==========================================
   DROPZONE — PREMIUM
   ========================================== */
.premium-dropzone {
  border: 2px dashed var(--border, #d1d5db);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.5);
  margin-top: 1.5rem;
}

.premium-dropzone:hover,
.premium-dropzone.dragover {
  border-color: var(--primary, #0066cc);
  background: rgba(0, 102, 204, 0.02);
}

.premium-dropzone .drop-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 102, 204, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--primary, #0066cc);
}

.premium-dropzone .drop-icon svg {
  width: 24px;
  height: 24px;
}

.premium-dropzone .drop-text {
  font-size: 0.925rem;
  color: var(--text-secondary, #64748b);
  margin: 0 0 0.35rem;
}

.premium-dropzone .drop-text strong {
  color: var(--text-primary, #1e293b);
}

.premium-dropzone .drop-text .browse-link {
  color: var(--primary, #0066cc);
  text-decoration: underline;
  text-decoration-color: rgba(0, 102, 204, 0.3);
  text-underline-offset: 2px;
}

.premium-dropzone .drop-hint {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

html[data-theme="dark"] .premium-dropzone {
  background: rgba(30, 41, 59, 0.4);
  border-color: #334155;
}

html[data-theme="dark"] .premium-dropzone:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.04);
}

html[data-theme="dark"] .premium-dropzone .drop-icon {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

/* File list */
.premium-file-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.premium-file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  font-size: 0.85rem;
}

.premium-file-item .file-icon {
  color: var(--primary, #0066cc);
  flex-shrink: 0;
}

.premium-file-item .file-name {
  flex: 1;
  color: var(--text-primary, #1e293b);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-file-item .file-size {
  color: var(--text-muted, #94a3b8);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.premium-file-item .file-remove {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.premium-file-item .file-remove:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

html[data-theme="dark"] .premium-file-item {
  background: #1e293b;
  border-color: #334155;
}

/* ==========================================
   WIZARD ACTIONS — PREMIUM
   ========================================== */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .wizard-nav {
  border-top-color: rgba(255, 255, 255, 0.04);
}

.btn-prev {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: transparent;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 0.7rem 1.25rem;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
}

.btn-prev:hover {
  border-color: var(--primary, #0066cc);
  color: var(--primary, #0066cc);
  background: rgba(0, 102, 204, 0.03);
}

.btn-prev svg {
  width: 16px;
  height: 16px;
}

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--primary, #0066cc);
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
  font-family: 'Inter', sans-serif;
}

.btn-next:hover {
  background: #0052a3;
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.3);
  transform: translateY(-1px);
}

.btn-next svg {
  width: 16px;
  height: 16px;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: none;
  border-radius: 14px;
  padding: 0.85rem 2rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(5, 150, 105, 0.25);
  font-family: 'Inter', sans-serif;
}

.btn-submit:hover {
  box-shadow: 0 6px 24px rgba(5, 150, 105, 0.35);
  transform: translateY(-1px);
}

.btn-submit svg {
  width: 20px;
  height: 20px;
}

html[data-theme="dark"] .btn-prev {
  border-color: #334155;
  color: #94a3b8;
}

html[data-theme="dark"] .btn-prev:hover {
  border-color: #3b82f6;
  color: #60a5fa;
}

html[data-theme="dark"] .btn-next {
  background: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ==========================================
   CONFIRMATION SCREEN
   ========================================== */
.confirm-screen {
  text-align: center;
  padding: 2rem 0;
}

.confirm-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #059669;
}

.confirm-icon svg {
  width: 36px;
  height: 36px;
}

.confirm-screen h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #059669;
  margin: 0 0 0.75rem;
}

.confirm-screen .confirm-text {
  font-size: 0.95rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.confirm-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================
   SECURITY BADGE
   ========================================== */
.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.6rem 1.25rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 100px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.security-badge svg {
  width: 14px;
  height: 14px;
  color: #059669;
}

.security-badge span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  letter-spacing: 0.02em;
}

html[data-theme="dark"] .security-badge {
  background: rgba(255, 255, 255, 0.03);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 540px) {
  .inscription-main {
    padding: 1.5rem 1rem 3rem;
  }

  .wizard-card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .step-header h2 {
    font-size: 1.25rem;
  }

  .step-header .step-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .wizard-nav {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .btn-next,
  .btn-submit {
    width: 100%;
    justify-content: center;
    order: -1;
  }

  .btn-prev {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .inscription-main {
    padding-top: 3rem;
  }

  .wizard-card {
    padding: 3rem;
  }
}

/* ==========================================
   PRINT
   ========================================== */
@media print {
  .inscription-header,
  .premium-stepper,
  .wizard-nav,
  .inscription-bg {
    display: none;
  }

  .wizard-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
