@import url(root.css);

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.left-panel {
  background: linear-gradient(145deg, var(--blue) 0%, var(--blue-mid) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

/* motif diagonal */
.left-panel::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,.03) 0, rgba(255,255,255,.03) 1px,
      transparent 0, transparent 50%
    );
  background-size: 22px 22px;
}

/* glow accent orange */
.left-panel::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: rgba(255,107,0,.12);
}

.deco-circle {
  position: absolute; top: -60px; left: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}

.brand { position: relative; z-index: 1; }

.brand-logo-wrap {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-bottom: 48px;
}

.brand-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.brand-name {
  font-size: 22px; font-weight: 800;
  color: #fff; letter-spacing: -0.4px;
}

.brand-headline {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}
.brand-headline span { color: var(--primary-light); }

.brand-sub {
  font-size: 15px; color: rgba(255,255,255,.55);
  line-height: 1.65; max-width: 340px;
}

.trust-items {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 14px;
}

.trust-item {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255,255,255,.7); font-size: 14px; font-weight: 500;
}
.trust-dot {
  width: 8px; height: 8px;
  border-radius: 50%; background: var(--primary);
  flex-shrink: 0;
}

/* ═══════════════════════════════
   PANNEAU DROIT — Formulaire
═══════════════════════════════ */
.right-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px;
  background: var(--bg-card);
}

.form-wrapper { width: 100%; max-width: 400px; }

.form-header { margin-bottom: 28px; }
.form-header h1 {
  font-size: 28px; font-weight: 800;
  color: var(--text-main); letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.form-header p { font-size: 14px; color: var(--text-muted); }
.form-header p a { color: var(--primary); font-weight: 600; }
.form-header p a:hover { text-decoration: underline; }

/* Alerts */
.alert {
  padding: 12px 16px; border-radius: 9px;
  font-size: 13px; font-weight: 500;
  margin-bottom: 18px; display: none;
  align-items: flex-start; gap: 10px;
}
.alert.show { display: flex; }
.alert-error   { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: var(--accent-soft); color: var(--accent); border: 1px solid #6ee7b7; }

/* Form Groups */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.6px; margin-bottom: 7px;
}

.input-wrap { position: relative; }
.input-wrap input {
  width: 100%; padding: 12px 42px 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: var(--font-body); font-size: 14px;
  color: var(--text-main); background: var(--bg-page);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 225, 195, 0.1);
  background: #fff;
}
.input-wrap input.error { border-color: var(--danger); }

.input-icon {
  position: absolute; right: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-light); font-size: 14px;
  pointer-events: none;
}

.toggle-pw {
  position: absolute; right: 13px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-light); font-size: 12px; font-weight: 700;
  font-family: var(--font-body);
  padding: 2px 5px; border-radius: 5px;
  transition: color var(--transition);
}
.toggle-pw:hover { color: var(--primary); }

.field-error {
  font-size: 11px; color: var(--danger);
  margin-top: 5px; display: none;
}
.field-error.show { display: block; }

.options-row { display: flex; justify-content: flex-end; margin-bottom: 22px; }
.forgot-link { font-size: 13px; font-weight: 600; color: var(--primary); }
.forgot-link:hover { text-decoration: underline; }

/* Bouton submit */
.btn-submit {
  width: 100%; padding: 13px;
  background: var(--primary);
  color: #fff; border: none; border-radius: 9px;
  font-family: var(--font-body); font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  position: relative; overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow-glow);
}
.btn-submit:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.spinner {
  display: none; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto;
}
.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .spinner   { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.secure-note {
  text-align: center; font-size: 12px;
  color: var(--text-muted); margin-bottom: 20px;
}
.secure-note i { margin-right: 4px; color: var(--accent); }

.divider { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.divider-line { flex: 1; height: 1px; background: var(--border); }
.divider-text { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.register-cta {
  text-align: center; padding: 16px;
  background: var(--primary-soft); border-radius: 9px;
  font-size: 13px; color: var(--text-muted);
  border: 1px solid rgba(255,107,0,.15);
}
.register-cta a { color: var(--primary); font-weight: 700; }
.register-cta a:hover { text-decoration: underline; }

/* ── Wizard steps (signup) ── */
.wizard-progress { margin-bottom: 24px; }
.progress-bar    { height: 4px; background: var(--border); border-radius: 99px; margin-bottom: 14px; }
.progress-fill   { height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s ease; }
.progress-steps  { display: flex; justify-content: space-between; }
.progress-steps .step {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; transition: .3s;
}
.progress-steps .step.active   { background: var(--primary); color: #fff; }
.progress-steps .step.done     { background: var(--accent); color: #fff; }

.step-section { display: none; }
.step-section.active { display: block; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 9px;
  font-family: var(--font-body); font-size: 14px;
  color: var(--text-main); background: var(--bg-page);
  outline: none; transition: border-color .2s;
}
.field input:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 195, 255, 0.1); background: #fff; }

.map-card { height: 280px; border-radius: var(--radius); overflow: hidden; margin: 10px 0; border: 1.5px solid var(--border); }
.map-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.map-error { font-size: 12px; color: var(--danger); display: none; }

.wizard-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.wizard-actions button {
  padding: 11px 20px; border-radius: 9px;
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: .2s; border: none;
}
.wizard-actions .btn-secondary { background: var(--bg-alt); color: var(--text-main); border: 1.5px solid var(--border); }
.wizard-actions .btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.wizard-actions .btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-glow); }
.wizard-actions .btn-primary:hover { background: var(--primary-dark); }
.wizard-actions .btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 70px; }
.toggle-password {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  font-size: 14px; color: var(--text-muted); padding: 4px;
}

/* Responsive */
@media (max-width: 900px) {
  body { grid-template-columns: 1fr; }
  .left-panel { display: none; }
  .right-panel { padding: 36px 24px; min-height: 100vh; }
}

/* ROLE SELECT */
    .role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .role-card { position: relative; }
    .role-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
    .role-label {
      display: flex; flex-direction: column; gap: 3px;
      padding: 13px 14px; border: 1.5px solid var(--border);
      border-radius: 9px; cursor: pointer; background: var(--surface);
      transition: all 0.2s;
    }
    .role-label:hover { border-color: var(--accent); background: var(--accent-light); }
    .role-card input:checked + .role-label { border-color: var(--accent); background: var(--accent-light); }
    .role-name { font-weight: 700; font-size: 13px; color: var(--text); }
    .role-desc { font-size: 11px; color: var(--text2); line-height: 1.4; }
    .role-indicator {
      width: 14px; height: 14px; border-radius: 50%;
      border: 2px solid var(--border); margin-bottom: 6px;
      transition: all 0.2s;
    }
    .role-card input:checked + .role-label .role-indicator { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px #fff; }

    /* CGU */
    .cgu-row {
      display: flex; align-items: flex-start; gap: 10px;
      padding: 14px; background: var(--bg); border-radius: 9px;
      border: 1.5px solid var(--border); margin-bottom: 20px;
      cursor: pointer; transition: border-color 0.2s;
    }
    .cgu-row:hover { border-color: var(--accent); }
    .cgu-row.error-border { border-color: var(--error); }
    .cgu-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; margin-top: 2px; flex-shrink: 0; }
    .cgu-text { font-size: 12px; color: var(--text2); line-height: 1.5; }
    .cgu-text a { color: var(--accent); font-weight: 600; text-decoration: none; }
    .cgu-text a:hover { text-decoration: underline; }