:root {
  color-scheme: light;
  --navy: #082f49;
  --navy-light: #0c4a6e;
  --ink: #0f172a;
  --muted: #64748b;
  --primary: #0c4a6e;
  --primary-hover: #075985;
  --line: #e2e8f0;
  --field: #f8fafc;
  --paper: #fff;
  --font: "Inter Variable", Inter, ui-sans-serif, system-ui, sans-serif;
  --display: "Inter Variable", Inter, ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono Variable", "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f8fafc;
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.site-header {
  height: 82px;
  padding: 0 max(calc((100vw - 1180px) / 2), 6.4vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; }
.brand-logo { display: block; width: 148px; height: auto; }
.header-note { display: flex; align-items: center; gap: 9px; color: #475569; font-size: 12px; letter-spacing: .015em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #059669; box-shadow: 0 0 0 4px #0596691f; }

main { max-width: 1180px; margin: 0 auto; padding: 0 30px 78px; }
.intro { min-height: 382px; display: grid; grid-template-columns: 1.06fr .94fr; align-items: center; position: relative; }
.intro-copy { padding: 53px 0 48px; position: relative; z-index: 1; }
.eyebrow { margin: 0 0 17px; color: var(--primary-hover); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.eyebrow span { display: inline-block; vertical-align: 3px; width: 19px; height: 2px; margin-right: 7px; background: var(--primary); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 15px; color: var(--navy); font-family: var(--mono); font-size: clamp(30px, 3.6vw, 42px); line-height: 1.18; letter-spacing: -.03em; font-weight: 600; }
h1 em { color: var(--primary); font-style: normal; }
.intro-description { max-width: 470px; margin-bottom: 23px; color: #6b7b85; font-size: 14px; line-height: 1.8; }
.trust-note { display: flex; gap: 11px; align-items: center; }
.trust-icon { width: 36px; height: 36px; border: 1px solid #bae6fd; border-radius: 10px; display: grid; place-items: center; color: var(--navy-light); background: #f0f9ff; }
.trust-icon svg { width: 19px; height: 19px; }
.trust-note strong, .trust-note small { display: block; }
.trust-note strong { margin-bottom: 3px; color: #355161; font-size: 11px; font-weight: 700; }
.trust-note small { color: #87949b; font-size: 10px; }

.intro-art { position: relative; height: 340px; overflow: hidden; }
.art-orbit { position: absolute; border: 1px solid #dbeafe; border-radius: 50%; transform: rotate(-24deg); }
.orbit-one { width: 330px; height: 190px; left: 18%; top: 21%; }
.orbit-two { width: 400px; height: 256px; left: 9%; top: 11%; transform: rotate(38deg); }
.art-sun { position: absolute; width: 190px; height: 190px; left: 32%; top: 16%; border-radius: 50%; background: #f0f9ff; }
.art-line { position: absolute; background: #dbeafe; }
.line-one { width: 100%; height: 1px; top: 54%; left: 0; transform: rotate(-18deg); }
.line-two { width: 1px; height: 90%; top: 4%; left: 55%; transform: rotate(31deg); }
.line-three { width: 95%; height: 1px; top: 63%; left: 0; transform: rotate(23deg); }
.art-card { position: absolute; width: 228px; height: 143px; top: 27%; left: 30%; border: 1px solid #e6edeb; border-radius: 13px; background: #fff; box-shadow: 0 20px 50px #173a3b1a; transform: rotate(-8deg); overflow: hidden; }
.art-card-top { height: 21px; padding-left: 12px; display: flex; gap: 4px; align-items: center; border-bottom: 1px solid #f0f3f2; }
.art-card-top span { width: 4px; height: 4px; border-radius: 50%; background: #bae6fd; }
.art-card-content { display: flex; align-items: center; gap: 14px; padding: 16px 17px 10px; }
.art-avatar { width: 43px; height: 43px; border-radius: 11px; background: linear-gradient(145deg, #bae6fd 0%, #38bdf8 100%); position: relative; }
.art-avatar:before { content: ""; width: 12px; height: 12px; position: absolute; top: 8px; left: 16px; border-radius: 50%; background: #f4fbf7; }
.art-avatar:after { content: ""; width: 25px; height: 12px; position: absolute; bottom: 5px; left: 9px; border-radius: 14px 14px 7px 7px; background: #f4fbf7; }
.art-text { display: grid; gap: 7px; }
.art-text i { height: 5px; border-radius: 6px; background: #e2e8f0; }
.art-text i:first-child { width: 76px; background: #7dd3fc; }
.art-text i:nth-child(2) { width: 91px; }
.art-text i:last-child { width: 54px; }
.art-chip { height: 18px; width: 194px; position: absolute; left: 17px; bottom: 11px; border-radius: 4px; background: #f1f5f9; }
.floating-check { width: 41px; height: 41px; position: absolute; top: 22%; left: 68%; display: grid; place-items: center; border-radius: 13px; background: var(--primary); color: white; box-shadow: 0 9px 22px #0c4a6e4d; transform: rotate(8deg); }
.floating-check svg { width: 22px; height: 22px; }
.art-caption { position: absolute; right: 7%; bottom: 13%; display: flex; align-items: center; gap: 7px; color: #64748b; font-size: 8px; letter-spacing: .17em; }
.art-caption span { width: 5px; height: 5px; border-radius: 50%; background: #0ea5e9; }

.form-section { padding: 43px 54px 39px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: 0 14px 45px #1e293b0a; }
.form-heading { display: flex; align-items: end; justify-content: space-between; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.form-heading .eyebrow { margin-bottom: 8px; }
h2 { margin: 0; color: var(--navy); font-family: var(--mono); font-size: 20px; font-weight: 600; letter-spacing: -.035em; }
.required-note { margin: 0 0 3px; color: #8a969d; font-size: 10px; }
.required-note span, .field b { color: #de755d; font-weight: 700; }
.form-block { padding: 28px 0 30px; border-bottom: 1px solid var(--line); }
.details-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.details-fields:disabled { opacity: .58; }
.details-fields:disabled .upload-zone { cursor: not-allowed; }
.lock-hint { margin: 18px 0 0 41px; color: #64748b; font-size: 10px; }
.lock-hint[hidden] { display: none; }
.block-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 19px; }
.block-number { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 8px; background: #f0f9ff; color: var(--navy-light); font-family: var(--display); font-size: 10px; font-weight: 800; }
.block-heading h3 { margin: 1px 0 4px; color: var(--navy); font-family: var(--display); font-size: 14px; font-weight: 700; }
.block-heading p { margin: 0; color: #84919a; font-size: 11px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 20px; padding-left: 41px; }
.identity-grid { padding-left: 41px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 8px; color: #415866; font-size: 11px; font-weight: 600; }
.field > span:first-child, .field-label { min-height: 14px; }
.field > span:first-child small, .field-label-row small { margin-left: 6px; color: #a0aaaf; font-size: 9px; font-weight: 400; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-mode-reset { padding: 0; border: 0; background: none; color: var(--primary-hover); font: 600 10px var(--font); cursor: pointer; }
.field-mode-reset:hover { text-decoration: underline; }
.field-mode-reset[hidden], .select-wrap[hidden], .field input[hidden] { display: none; }
.field input, .field select { width: 100%; height: 43px; padding: 0 13px; outline: none; border: 1px solid var(--line); border-radius: 4px; background: var(--field); color: #334155; font: 400 11px var(--font); transition: border-color .16s, box-shadow .16s, background .16s; }
.field input::placeholder { color: #a6b0b5; }
.field input:focus, .field select:focus { border-color: #0284c7; background: white; box-shadow: 0 0 0 3px #0c4a6e1a; }
.field input.is-invalid { border-color: #c25a50; background: #fff8f7; }
.field input.is-invalid:focus { border-color: #c25a50; box-shadow: 0 0 0 3px #c25a5026; }
.field input[readonly] { color: #667b86; background: #f1f5f4; }
#matricule { text-transform: uppercase; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 40px; }
.input-wrap svg { width: 17px; height: 17px; position: absolute; right: 13px; top: 13px; color: #91a0a5; }
.phone-input {
  display: flex;
  align-items: stretch;
  height: 43px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.phone-input:focus-within { border-color: #0284c7; background: #fff; box-shadow: 0 0 0 3px #0c4a6e1a; }
.phone-input:has(input.is-invalid) { border-color: #c25a50; background: #fff8f7; }
.phone-input:has(input.is-invalid):focus-within { box-shadow: 0 0 0 3px #c25a5026; }
.phone-prefix {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  background: #f8fafc;
  color: #415866;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.phone-flag { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px #0f172a1f; }
.field .phone-input input {
  flex: 1 1 auto;
  min-width: 0;
  height: auto;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.field .phone-input input:focus { border: 0; background: transparent; box-shadow: none; }
.field-message { min-height: 12px; color: #9aa5aa; font-size: 9px; font-weight: 400; line-height: 1.4; }
.field-message.is-success { color: #047857; }
.field-message.is-error { color: #b64c43; }
.field-wide { grid-column: 1 / -1; }
.select-wrap { position: relative; }
.select-wrap:after { content: ""; width: 7px; height: 7px; position: absolute; right: 15px; top: 15px; border-right: 1.5px solid #84949b; border-bottom: 1.5px solid #84949b; transform: rotate(45deg); pointer-events: none; }
.field select { appearance: none; padding-right: 35px; cursor: pointer; }
.field select:invalid { color: #a6b0b5; }
.field[hidden] { display: none; }
.choice-group { display: flex; gap: 10px; }
.choice { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: 43px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--field); color: #667b86; font-size: 11px; font-weight: 500; cursor: pointer; transition: border-color .16s, background .16s, color .16s; }
.choice input { width: 14px; height: 14px; margin: 0; accent-color: #0284c7; cursor: pointer; }
.choice:has(input:checked) { border-color: #0284c7; background: #f0f9ff; color: #0c4a6e; font-weight: 600; }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 3px #0c4a6e1a; }
.upload-zone { min-height: 77px; display: flex; align-items: center; gap: 13px; padding: 12px 14px; border: 1px dashed #bae6fd; border-radius: 5px; background: #f8fcff; cursor: pointer; transition: background .16s, border-color .16s; }
.upload-zone:hover, .upload-zone.is-dragging { border-color: #0ea5e9; background: #f0f9ff; }
.upload-zone input { display: none; }
.upload-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border: 1px solid #bae6fd; border-radius: 9px; background: #f0f9ff; color: var(--navy-light); }
.upload-icon svg { width: 19px; height: 19px; }
.upload-copy { flex: 1; }
.upload-copy strong, .upload-copy small { display: block; }
.upload-copy strong { margin-bottom: 5px; color: #445b65; font-size: 10px; font-weight: 600; }
.upload-copy small { color: #9aa5aa; font-size: 9px; font-weight: 400; }
.upload-browse { padding: 8px 11px; border: 1px solid #e2e8f0; border-radius: 3px; background: white; color: var(--primary-hover); font-size: 9px; font-weight: 600; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px 0 0 41px; }
.form-footer p { max-width: 390px; margin: 0; display: flex; align-items: center; gap: 8px; color: #8a969c; font-size: 9px; line-height: 1.6; }
.form-footer p svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--primary); }
.form-footer button { min-height: 46px; padding: 0 18px; display: flex; align-items: center; justify-content: center; gap: 17px; border: 0; border-radius: 4px; background: var(--primary); color: white; font: 600 11px var(--font); cursor: pointer; transition: background .16s, transform .16s; }
.form-footer button:hover { background: var(--primary-hover); transform: translateY(-1px); }
.form-footer button:disabled { opacity: .7; cursor: wait; transform: none; }
.form-footer button svg { width: 16px; height: 16px; }
.form-status { margin: 18px 0 0 41px; padding: 12px 14px; border-radius: 4px; font-size: 11px; line-height: 1.5; }
.form-status.success { color: #267558; background: #eff8f3; border: 1px solid #d7eddf; }
.form-status.error { color: #a6443e; background: #fff5f3; border: 1px solid #f2d9d4; }

.site-footer { max-width: 1180px; margin: 0 auto; padding: 0 30px 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #97a2a7; font-size: 9px; letter-spacing: .035em; }
.site-footer span:first-child { font-weight: 600; letter-spacing: .1em; }
.site-footer i { padding: 0 4px; color: var(--primary); font-style: normal; }

@media (max-width: 760px) {
  .site-header { height: 70px; padding: 0 22px; }
  .header-note { font-size: 10px; }
  main { padding: 0 20px 55px; }
  .intro { min-height: unset; grid-template-columns: 1fr; }
  .intro-copy { padding: 42px 0 23px; }
  h1 { font-size: clamp(26px, 7vw, 34px); }
  .intro-description { font-size: 13px; }
  .intro-art { height: 190px; margin: -4px 0 15px; }
  .art-card { top: 19%; left: 36%; transform: scale(.83) rotate(-8deg); transform-origin: top left; }
  .art-sun { width: 160px; height: 160px; top: 6%; left: 34%; }
  .orbit-one { top: 11%; left: 16%; }
  .orbit-two { top: 0; left: 7%; }
  .floating-check { top: 12%; left: 72%; }
  .art-caption { bottom: 7%; right: 7%; }
  .form-section { padding: 30px 23px 27px; }
  .field-grid, .identity-grid { padding-left: 0; gap: 15px; }
  .lock-hint { margin-left: 0; }
  .form-footer { padding-left: 0; align-items: stretch; flex-direction: column; }
  .form-footer button { width: 100%; }
  .form-status { margin-left: 0; }
  .site-footer { padding-right: 20px; padding-left: 20px; }
}

@media (max-width: 480px) {
  .brand-logo { width: 126px; }
  .header-note { max-width: 130px; text-align: right; line-height: 1.4; }
  main { padding-right: 13px; padding-left: 13px; }
  .intro-copy { padding-top: 34px; }
  .form-section { padding: 26px 18px 22px; }
  .form-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .form-heading h2 { font-size: 21px; }
  .form-block { padding: 24px 0; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .block-heading { gap: 10px; }
  .block-heading p { line-height: 1.5; }
  .upload-zone { gap: 9px; padding: 10px; }
  .upload-browse { padding: 7px 8px; }
  .site-footer { padding-right: 13px; padding-left: 13px; flex-direction: column; gap: 7px; font-size: 8px; }
}
