/* ═══════════════════════════════════════════════════════
   DESIGN TOKENS — Charte Officielle Notaires de France
═══════════════════════════════════════════════════════ */
:root {
  --bleu:        #003189;
  --bleu-fonce:  #00205c;
  --bleu-vif:    #1a4fbd;
  --bleu-pale:   #dce8f8;
  --bleu-bg:     #f0f5fb;
  --or:          #b8993a;
  --or-clair:    #d4b85a;
  --blanc:       #ffffff;
  --fond:        #f7f9fc;
  --gris-border: #dde3ef;
  --gris-text:   #64748b;
  --texte:       #0f172a;
  --vert:        #0d7a55;
  --vert-pale:   #e3f5ee;
  --rouge:       #c0392b;
  --shadow-sm:   0 1px 3px rgba(0,33,92,0.08), 0 1px 2px rgba(0,33,92,0.04);
  --shadow-md:   0 4px 16px rgba(0,33,92,0.10), 0 2px 6px rgba(0,33,92,0.06);
  --shadow-lg:   0 12px 40px rgba(0,33,92,0.14), 0 4px 12px rgba(0,33,92,0.08);
  --radius:      10px;
  --font-serif:  'Libre Baskerville', Georgia, serif;
  --font-sans:   'Mulish', 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--fond);
  color: var(--texte);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}

/* ═══════════════════════════════════
   HEADER
═══════════════════════════════════ */
.header {
  background: var(--bleu-fonce);
  height: 62px;
  display: flex; align-items: center;
  padding: 0 2rem;
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 0 rgba(255,255,255,0.05), 0 4px 20px rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.header-logo {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; text-decoration: none; flex-shrink: 0;
}
.header-marianne { width: 34px; height: 34px; flex-shrink: 0; }
.header-brand-wrap { display: flex; flex-direction: column; }
.header-brand-small {
  font-size: 0.57rem; font-weight: 300;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.4); line-height: 1; margin-bottom: 2px;
}
.header-brand-main {
  font-family: var(--font-serif);
  font-size: 0.95rem; font-weight: 700;
  color: #fff; letter-spacing: 0.05em; line-height: 1;
}
.header-sep {
  width: 1px; height: 28px;
  background: rgba(255,255,255,0.12);
  margin: 0 1.5rem; flex-shrink: 0;
}
.header-product { font-size: 0.78rem; font-weight: 500; color: rgba(255,255,255,0.5); letter-spacing: 0.05em; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-secure {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px; padding: 5px 12px;
}
.header-secure-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #2ecc71; box-shadow: 0 0 6px #2ecc71;
  animation: blink 2.5s ease infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }
.header-secure-text { font-size: 0.7rem; color: rgba(255,255,255,0.5); font-weight: 400; }

/* ═══════════════════════════════════
   PROGRESS BAR TOP
═══════════════════════════════════ */
.progress-track {
  display: none; background: var(--blanc);
  border-bottom: 1px solid var(--gris-border);
  padding: 0 2rem; flex-shrink: 0;
}
.progress-track.show { display: block; }
.progress-inner {
  max-width: 680px; margin: 0 auto;
  padding: 16px 0; display: flex; align-items: center; gap: 0;
}
.prog-step { display: flex; align-items: center; flex: 1; min-width: 0; }
.prog-step-circle {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
  transition: all 0.4s; position: relative; z-index: 1;
}
.prog-step.done   .prog-step-circle { background: var(--vert); color: #fff; }
.prog-step.active .prog-step-circle { background: var(--bleu); color: #fff; box-shadow: 0 0 0 4px rgba(0,49,137,0.15); }
.prog-step.wait   .prog-step-circle { background: #e8edf5; color: var(--gris-text); }
.prog-step-info { margin-left: 8px; flex: 1; min-width: 0; }
.prog-step-label { font-size: 0.72rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.3s; }
.prog-step.done   .prog-step-label { color: var(--vert); }
.prog-step.active .prog-step-label { color: var(--bleu); }
.prog-step.wait   .prog-step-label { color: var(--gris-text); }
.prog-line { flex: 1; height: 2px; background: #e8edf5; margin: 0 6px; border-radius: 2px; transition: background 0.4s; }
.prog-line.done { background: var(--vert); }

/* ═══════════════════════════════════
   SPLIT LAYOUT
═══════════════════════════════════ */
main { flex: 1; display: flex; flex-direction: column; }
.page { display: none; flex: 1; animation: pgIn 0.35s cubic-bezier(0.25,0.46,0.45,0.94) both; }
.page.active { display: flex; flex-direction: column; }
@keyframes pgIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }

.split-layout {
  flex: 1; display: grid; grid-template-columns: 380px 1fr;
  min-height: calc(100vh - 62px);
}
@media (max-width: 800px) {
  .split-layout { grid-template-columns: 1fr; }
  .split-left { display: none !important; }
}

.split-left {
  background: linear-gradient(175deg, var(--bleu-fonce) 0%, var(--bleu) 55%, #1a4fbd 100%);
  padding: 3rem 2.5rem;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.split-left::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='64' height='64' viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0h1v64H8zM0 8h64v1H0z' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
}
.split-left-content { position: relative; z-index: 1; }
.left-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.8); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 50px; margin-bottom: 2rem;
}
.left-badge-dot { width: 5px; height: 5px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 5px #2ecc71; }
.left-heading { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 700; line-height: 1.25; color: #fff; margin-bottom: 1rem; }
.left-heading em { font-style: italic; color: rgba(255,255,255,0.65); }
.left-desc { font-size: 0.88rem; color: rgba(255,255,255,0.6); line-height: 1.75; font-weight: 300; margin-bottom: 2.5rem; }
.trust-items { display: flex; flex-direction: column; gap: 14px; }
.trust-item { display: flex; align-items: flex-start; gap: 12px; }
.trust-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.trust-title { font-size: 0.82rem; font-weight: 700; color: #fff; margin-bottom: 2px; }
.trust-text  { font-size: 0.75rem; color: rgba(255,255,255,0.5); line-height: 1.5; }
.split-left-footer { position: relative; z-index: 1; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); }
.left-footer-note { font-size: 0.68rem; color: rgba(255,255,255,0.3); line-height: 1.5; }

/* ═══════════════════════════════════
   FORM SIDE
═══════════════════════════════════ */
.split-right {
  background: var(--fond);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 3rem 2rem; overflow-y: auto;
}
.form-wrap { width: 100%; max-width: 460px; }
.form-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bleu); margin-bottom: 6px; }
.form-title { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 700; color: var(--texte); margin-bottom: 4px; line-height: 1.2; }
.form-sub { font-size: 0.88rem; color: var(--gris-text); margin-bottom: 2rem; line-height: 1.6; font-weight: 300; }

.form-card {
  background: var(--blanc); border: 1px solid var(--gris-border);
  border-radius: var(--radius); padding: 2rem;
  box-shadow: var(--shadow-md); margin-bottom: 1rem;
}

/* ── INPUTS ── */
.field { margin-bottom: 1.25rem; }
.field-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.78rem; font-weight: 700;
  color: var(--texte); margin-bottom: 7px; letter-spacing: 0.01em;
}
.field-label-hint { font-size: 0.72rem; color: var(--gris-text); font-weight: 400; }
.field-input-wrap { position: relative; }
.field-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 15px; pointer-events: none; opacity: 0.5; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number] {
  width: 100%; padding: 12px 14px 12px 38px;
  border: 1.5px solid var(--gris-border); border-radius: 8px;
  font-family: var(--font-sans); font-size: 0.9rem; color: var(--texte);
  background: var(--blanc); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
}
input:focus { border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(0,49,137,0.1); background: #fdfeff; }
input::placeholder { color: #b0bac8; }
input.no-icon { padding-left: 14px; }
input.has-valid { border-color: var(--vert); }
.field-valid-check { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--vert); font-size: 14px; opacity: 0; transition: opacity 0.2s; }
.field-valid-check.show { opacity: 1; }
.field-hint { font-size: 0.72rem; color: var(--gris-text); margin-top: 5px; display: flex; align-items: flex-start; gap: 5px; line-height: 1.4; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-size: 0.9rem; font-weight: 700;
  padding: 13px 24px; border-radius: 8px;
  border: none; cursor: pointer; transition: all 0.22s; letter-spacing: 0.02em;
  text-decoration: none; position: relative; overflow: hidden;
}
.btn-full { width: 100%; }
.btn-primary { background: var(--bleu); color: #fff; box-shadow: 0 2px 8px rgba(0,49,137,0.25); }
.btn-primary:hover { background: var(--bleu-fonce); box-shadow: 0 4px 16px rgba(0,49,137,0.35); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary .btn-arrow { transition: transform 0.2s; }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }
.btn-outline-blue { background: transparent; color: var(--bleu); border: 1.5px solid var(--bleu); }
.btn-outline-blue:hover { background: var(--bleu-pale); }
.btn-ghost { background: transparent; color: var(--gris-text); border: 1.5px solid var(--gris-border); font-size: 0.82rem; font-weight: 600; padding: 10px 18px; }
.btn-ghost:hover { border-color: #b0bac8; color: var(--texte); background: var(--fond); }
.btn-success { background: var(--vert); color: #fff; box-shadow: 0 2px 8px rgba(13,122,85,0.25); }
.btn-success:hover { background: #0a6345; box-shadow: 0 4px 16px rgba(13,122,85,0.35); transform: translateY(-1px); }
.btn-row { display: flex; gap: 10px; align-items: center; }
.btn-row .btn-ghost { padding: 13px 18px; }

/* ── ALERTS ── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.8rem; line-height: 1.55; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 1.2rem; }
.alert-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.alert-info    { background: var(--bleu-pale); border: 1px solid #b8cff0; color: var(--bleu-fonce); }
.alert-success { background: var(--vert-pale); border: 1px solid #9fd4be; color: #064d34; }
.alert-warning { background: #fff8ed; border: 1px solid #fad199; color: #7c4f00; }

.divider { height: 1px; background: var(--gris-border); margin: 1.5rem 0; }
.divider-or { display: flex; align-items: center; gap: 12px; margin: 1.5rem 0; }
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--gris-border); }
.divider-or span { font-size: 0.75rem; color: var(--gris-text); font-weight: 600; letter-spacing: 0.06em; }

/* ── OTP INPUT UNIQUE ── */
.otp-single-wrap { margin: 1.8rem 0 1rem; }
.otp-single {
  width: 100%; padding: 16px 20px;
  border: 2px solid var(--gris-border); border-radius: 8px;
  text-align: center; font-family: var(--font-serif);
  font-size: 1.8rem; font-weight: 700; color: var(--bleu);
  background: var(--blanc); outline: none;
  transition: all 0.15s; caret-color: var(--bleu);
  letter-spacing: 0.4em; text-transform: uppercase;
}
.otp-single:focus { border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(0,49,137,0.12); background: #f8faff; }
.otp-single.filled { border-color: var(--bleu); background: var(--bleu-pale); }
.otp-single.error  { border-color: var(--rouge); background: #fdf0ee; animation: shake 0.4s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-4px)} 40%{transform:translateX(4px)} 60%{transform:translateX(-3px)} 80%{transform:translateX(3px)} }
.otp-char-hint { font-size: 0.72rem; color: var(--gris-text); text-align: center; margin-top: 6px; }

/* ── OTP TIMER ── */
.otp-timer-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; color: var(--gris-text); margin-bottom: 1.5rem; }
.otp-timer-badge { background: var(--bleu-pale); color: var(--bleu); font-weight: 700; padding: 3px 10px; border-radius: 50px; font-size: 0.75rem; }
.otp-resend { background: none; border: none; color: var(--bleu); font-family: var(--font-sans); font-size: 0.78rem; font-weight: 700; cursor: pointer; text-decoration: underline; }
.otp-resend:disabled { color: var(--gris-text); cursor: default; text-decoration: none; }

/* ── PHONE BLOCK ── */
.phone-block { background: var(--bleu-fonce); border-radius: 8px; padding: 1rem 1.2rem; display: flex; align-items: center; gap: 12px; margin-bottom: 1.5rem; }
.phone-block-icon { font-size: 22px; flex-shrink: 0; }
.phone-block-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.5); margin-bottom: 3px; }
.phone-block-number { font-family: var(--font-serif); font-size: 1.05rem; color: #fff; font-weight: 700; letter-spacing: 0.08em; }

/* ── UPLOAD ZONE ── */
.drop-zone { border: 2px dashed var(--gris-border); border-radius: 10px; padding: 2rem; text-align: center; cursor: pointer; transition: all 0.22s; background: var(--fond); }
.drop-zone:hover, .drop-zone.over { border-color: var(--bleu); background: var(--bleu-bg); }
.drop-icon  { font-size: 2.2rem; margin-bottom: 0.8rem; }
.drop-title { font-size: 0.9rem; font-weight: 700; color: var(--texte); margin-bottom: 4px; }
.drop-hint  { font-size: 0.76rem; color: var(--gris-text); }
.drop-formats { font-size: 0.68rem; color: var(--gris-text); margin-top: 6px; opacity: 0.7; }
.file-pill { display: none; align-items: center; gap: 12px; background: var(--vert-pale); border: 1.5px solid #9fd4be; border-radius: 8px; padding: 12px 14px; margin-top: 10px; }
.file-pill.show { display: flex; }
.file-pill-icon { font-size: 1.6rem; flex-shrink: 0; }
.file-pill-name { font-size: 0.85rem; font-weight: 700; color: var(--texte); }
.file-pill-size { font-size: 0.72rem; color: var(--gris-text); margin-top: 1px; }
.file-pill-rm   { margin-left: auto; background: none; border: none; color: var(--rouge); font-size: 18px; cursor: pointer; padding: 2px 6px; line-height: 1; }
.upload-prog { display: none; margin-top: 12px; }
.upload-prog.show { display: block; }
.upload-prog-header { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--gris-text); margin-bottom: 6px; }
.upload-prog-track { height: 5px; background: var(--gris-border); border-radius: 3px; overflow: hidden; }
.upload-prog-fill  { height: 100%; background: linear-gradient(90deg, var(--bleu), var(--bleu-vif)); border-radius: 3px; transition: width 0.25s; }

/* ── SUCCESS ── */
.success-page { max-width: 540px; margin: 4rem auto; padding: 0 1.5rem 4rem; }
.success-card { background: var(--blanc); border: 1px solid var(--gris-border); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.success-top { background: linear-gradient(135deg, var(--bleu-fonce), var(--bleu)); padding: 3rem 2rem 2.5rem; text-align: center; position: relative; }
.success-check-ring { width: 88px; height: 88px; border-radius: 50%; background: rgba(255,255,255,0.12); border: 2px solid rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; animation: successRing 0.6s cubic-bezier(0.175,0.885,0.32,1.275) both; }
@keyframes successRing { from{transform:scale(0)rotate(-180deg);opacity:0} to{transform:scale(1)rotate(0deg);opacity:1} }
.success-check { font-size: 2.8rem; }
.success-top-title { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.success-top-sub   { font-size: 0.88rem; color: rgba(255,255,255,0.65); line-height: 1.6; font-weight: 300; }
.success-body { padding: 2rem; }
.recap-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gris-text); margin-bottom: 12px; }
.recap-list  { margin-bottom: 1.5rem; }
.recap-row   { display: flex; justify-content: space-between; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--gris-border); font-size: 0.84rem; }
.recap-row:last-child { border-bottom: none; }
.recap-key { color: var(--gris-text); font-weight: 400; }
.recap-val { color: var(--texte); font-weight: 700; text-align: right; }
.recap-val.green { color: var(--vert); }
.seal-block { background: var(--bleu-bg); border: 1px solid #b8cff0; border-radius: 8px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; margin-bottom: 1.5rem; }
.seal-block-icon  { font-size: 1.6rem; flex-shrink: 0; }
.seal-block-title { font-size: 0.8rem; font-weight: 700; color: var(--bleu-fonce); margin-bottom: 3px; }
.seal-block-text  { font-size: 0.74rem; color: var(--gris-text); line-height: 1.5; }

/* ── FOOTER ── */
.footer { background: var(--bleu-fonce); padding: 1.4rem 2rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; flex-shrink: 0; }
.footer-logo-area { display: flex; align-items: center; gap: 10px; }
.footer-logo-area svg { width: 24px; height: 24px; opacity: 0.5; }
.footer-brand-text { font-family: var(--font-serif); font-size: 0.85rem; color: rgba(255,255,255,0.4); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.3); font-size: 0.72rem; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: rgba(255,255,255,0.65); }
.footer-copy { font-size: 0.68rem; color: rgba(255,255,255,0.2); }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gris-border); border-radius: 2px; }
