/* =========================================================
   Connexion — reproduction de accounts.crypto.com
   Deux panneaux : carte de connexion + bannière produit.
   Parcours en 3 étapes avec chargements.
   ========================================================= */

:root {
  --auth-page: #02061a;
  --auth-card: #151d32;
  --auth-card-2: #0f1929;
  --auth-line: #26334b;
  --auth-line-soft: #1c2940;
  --auth-ink: #f7f9fa;
  --auth-muted: #a0a9be;
  --auth-dim: #7b849b;
  --auth-blue: #1199fa;
  --auth-red: #ff5c56;
  --auth-green: #2ed47a;
}

/* ----------------------------- Page ----------------------------- */

.auth-page {
  position: relative;
  min-height: 100dvh;
  padding-block-end: 36px;
  background: var(--auth-page);
  overflow: hidden;
}

.auth-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(52% 55% at 76% 36%, rgba(17, 64, 126, 0.3), transparent 68%),
    radial-gradient(40% 40% at 12% 8%, rgba(17, 64, 126, 0.12), transparent 70%);
  pointer-events: none;
}

.auth-topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  padding-inline: 80px;
}

.auth-topbar .brand img {
  width: 124px;
}

.auth-top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.auth-lang {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding-inline: 10px;
  border-radius: 999px;
  border: 1px solid var(--auth-line);
  color: var(--auth-muted);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s, border-color 0.2s;
}

.auth-lang:hover {
  color: #fff;
  border-color: #3a4a66;
}

.auth-lang .icon {
  width: 14px;
  height: 14px;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--auth-muted);
  font-size: 12px;
  transition: color 0.2s;
}

.auth-back:hover {
  color: #fff;
}

.auth-back .icon {
  width: 14px;
  height: 14px;
}

[dir="rtl"] .auth-back .icon,
[dir="rtl"] .step-back .icon {
  transform: scaleX(-1);
}

.auth-main {
  position: relative;
  z-index: 2;
  width: min(1140px, calc(100% - 48px));
  margin-inline: auto;
}

.auth-shell {
  display: grid;
  grid-template-columns: 556px 554px;
  gap: 30px;
  align-items: stretch;
}

/* ----------------------------- Carte ----------------------------- */

.auth-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: 36px;
  border-radius: 8px;
  border: 1px solid var(--auth-line);
  background: var(--auth-card);
  overflow: hidden;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 6px;
  background: #0b1424;
}

.auth-switch-btn {
  height: 38px;
  border-radius: 4px;
  color: var(--auth-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.auth-switch-btn:hover {
  color: #fff;
}

.auth-switch-btn.is-active {
  background: #1b3f62;
  color: #fff;
}

.auth-tabs {
  display: flex;
  gap: 26px;
  margin-block-start: 22px;
  border-block-end: 1px solid var(--auth-line);
}

.auth-tab {
  position: relative;
  height: 36px;
  padding: 0;
  color: var(--auth-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-tab:hover {
  color: #fff;
}

.auth-tab.is-active {
  color: #fff;
}

.auth-tab.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--auth-blue);
}

/* Progression compacte */
.auth-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-block-start: 16px;
  transition: opacity 0.3s, max-height 0.3s, margin 0.3s;
  max-height: 30px;
}

.auth-card.is-success .auth-progress {
  opacity: 0;
  max-height: 0;
  margin-block-start: 0;
  overflow: hidden;
}

.ap-step {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

.ap-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid var(--auth-line);
  color: var(--auth-dim);
  font-size: 9px;
  font-weight: 600;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.ap-num {
  line-height: 1;
}

.ap-check {
  position: absolute;
  width: 9px;
  height: 9px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s, transform 0.25s;
}

.ap-label {
  font-size: 10px;
  color: var(--auth-dim);
  white-space: nowrap;
  transition: color 0.25s;
}

.ap-line {
  width: 16px;
  height: 1px;
  flex: none;
  background: var(--auth-line);
}

.ap-step.is-current .ap-dot {
  background: var(--auth-blue);
  border-color: var(--auth-blue);
  color: #fff;
}

.ap-step.is-current .ap-label {
  color: var(--auth-muted);
}

.ap-step.is-done .ap-dot {
  background: rgba(46, 212, 122, 0.12);
  border-color: rgba(46, 212, 122, 0.4);
  color: var(--auth-green);
}

.ap-step.is-done .ap-num {
  opacity: 0;
}

.ap-step.is-done .ap-check {
  opacity: 1;
  transform: none;
}

.ap-step.is-done .ap-label {
  color: var(--auth-dim);
}

/* Corps */

.auth-card.is-shaking {
  animation: card-shake 0.4s var(--ease);
}

@keyframes card-shake {
  20%,
  60% {
    transform: translateX(-4px);
  }
  40%,
  80% {
    transform: translateX(4px);
  }
}
.auth-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-body.is-switching {
  overflow: hidden;
}

.auth-step {
  animation: step-in 0.35s var(--ease) both;
}

.auth-step.is-leaving {
  animation: step-out 0.15s ease both;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes step-out {
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.step-head {
  margin-block-start: 18px;
}

.step-head h1,
.step-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--auth-ink);
}

.step-head p {
  margin-block-start: 6px;
  color: var(--auth-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.step-sub {
  max-width: 42ch;
}

.step-sub strong {
  color: var(--auth-ink);
  font-weight: 600;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.step-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-block-start: 14px;
  padding: 3px 6px 3px 2px;
  border-radius: 4px;
  color: var(--auth-muted);
  font-size: 11.5px;
  transition: color 0.2s;
}

.step-back:hover {
  color: #fff;
}

.step-back .icon {
  width: 13px;
  height: 13px;
}

/* Champs */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-block-start: 18px;
}

.field label {
  font-size: 12.5px;
  font-weight: 500;
  color: #c8d0de;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.text-link {
  color: var(--auth-blue);
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 4px;
  transition: color 0.2s;
}

.text-link:hover {
  color: #7cc8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-link:disabled {
  color: var(--auth-dim);
  text-decoration: none;
  cursor: default;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 6px;
  border: 1px solid #2a3a55;
  background: var(--auth-card-2);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap:hover {
  border-color: #3a4c6b;
}

.input-wrap:focus-within {
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 1px var(--auth-blue);
}

.input-wrap.has-error {
  border-color: var(--auth-red);
}

.input-wrap.has-error:focus-within {
  box-shadow: 0 0 0 1px var(--auth-red);
}

.input-wrap input {
  width: 100%;
  height: 48px;
  padding-inline: 13px 42px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--auth-ink);
  font-size: 14px;
}

.input-wrap input::placeholder {
  color: #5e6b83;
}

.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover,
.input-wrap input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--auth-ink);
  -webkit-box-shadow: 0 0 0 1000px #0d1728 inset;
  caret-color: var(--auth-ink);
  transition: background-color 9999s ease-out 0s;
}

.valid-check {
  position: absolute;
  inset-inline-end: 12px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(46, 212, 122, 0.14);
  color: var(--auth-green);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.25s;
  pointer-events: none;
}

.valid-check .icon {
  width: 10px;
  height: 10px;
  stroke-width: 2.6;
}

.input-wrap.is-valid .valid-check {
  opacity: 1;
  transform: none;
}

.eye-btn {
  position: absolute;
  inset-inline-end: 5px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 5px;
  color: var(--auth-muted);
  transition: color 0.2s, background 0.2s;
}

.eye-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.eye-btn .icon {
  width: 17px;
  height: 17px;
}

.field-error {
  display: none;
  margin: 0;
  color: #ff8b8b;
  font-size: 11.5px;
  line-height: 1.4;
}

.field-error.is-visible {
  display: flex;
  align-items: center;
  gap: 5px;
  animation: fade-up 0.2s var(--ease);
}

.field-error::before {
  content: "!";
  display: grid;
  place-items: center;
  flex: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255, 92, 86, 0.16);
  font-size: 8.5px;
  font-weight: 700;
}

.field-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--auth-muted);
  font-size: 11px;
}

.field-hint .icon {
  width: 12px;
  height: 12px;
  color: #f5c451;
}

/* Bouton principal */
.auth-submit {
  height: 48px;
  margin-block-start: 20px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
}

.btn-primary.auth-submit {
  background: var(--auth-blue);
  background-image: none;
  box-shadow: none;
}

.btn-primary.auth-submit:hover {
  background: #3cabff;
  box-shadow: none;
}

.btn-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.75s linear infinite;
}

.btn.is-loading .btn-label {
  opacity: 0.75;
}

.btn.is-loading .btn-spinner {
  display: block;
}

/* Note démo */
.demo-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-block-start: 16px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px dashed #24405f;
  background: rgba(17, 153, 250, 0.04);
  color: var(--auth-dim);
  font-size: 10.5px;
  line-height: 1.45;
}

.demo-tag {
  flex: none;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(17, 153, 250, 0.35);
  color: #7cc8ff;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.card-legal {
  margin-block-start: auto;
  padding-block-start: 14px;
  color: #5c6579;
  font-size: 9.5px;
  line-height: 1.5;
}

/* ----------------------------- OTP ----------------------------- */

.otp-block {
  margin-block-start: 20px;
}

.otp-label {
  display: block;
  margin-block-end: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: #c8d0de;
}

.otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  direction: ltr;
}

.otp-input {
  width: 100%;
  height: 52px;
  padding: 0;
  text-align: center;
  font-size: 19px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--auth-ink);
  caret-color: var(--auth-blue);
  background: var(--auth-card-2);
  border: 1px solid #2a3a55;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.otp-input:hover {
  border-color: #3a4c6b;
}

.otp-input:focus {
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 1px var(--auth-blue);
  background: #0e1b2e;
}

.otp-input.is-filled {
  border-color: rgba(17, 153, 250, 0.6);
  background: rgba(17, 153, 250, 0.07);
}

.otp.is-error .otp-input {
  border-color: var(--auth-red);
  animation: otp-shake 0.35s var(--ease);
}

.otp.is-success .otp-input {
  border-color: rgba(46, 212, 122, 0.7);
  color: var(--auth-green);
}

@keyframes otp-shake {
  20%,
  60% {
    transform: translateX(-3px);
  }
  40%,
  80% {
    transform: translateX(3px);
  }
}

.otp-block .field-error {
  margin-block-start: 8px;
}

.resend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-block-start: 14px;
  color: var(--auth-muted);
  font-size: 11.5px;
}

.demo-code {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-block-start: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px dashed #24405f;
  background: rgba(17, 153, 250, 0.04);
  color: var(--auth-dim);
  font-size: 10.5px;
  text-align: start;
  transition: border-color 0.2s, background 0.2s;
}

.demo-code:hover {
  border-color: rgba(17, 153, 250, 0.6);
  background: rgba(17, 153, 250, 0.08);
  color: var(--auth-muted);
}

.demo-fill {
  margin-inline-start: auto;
  color: #7cc8ff;
  font-weight: 600;
  font-size: 10.5px;
  white-space: nowrap;
}

.otp-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-block-start: 10px;
  color: var(--auth-dim);
  font-size: 10px;
}

.otp-timer .icon {
  width: 12px;
  height: 12px;
}

.timer-bar {
  flex: 1;
  height: 3px;
  margin-inline-start: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.timer-bar span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--auth-blue), #6a4dff);
  transition: width 1s linear;
}

.twofa-app {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-start: 16px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, 0.025);
}

.twofa-app-ic {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: rgba(106, 77, 255, 0.12);
  border: 1px solid rgba(106, 77, 255, 0.22);
  color: #b9a9ff;
  flex: none;
}

.twofa-app-ic .icon {
  width: 15px;
  height: 15px;
}

.twofa-app-txt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.twofa-app-txt strong {
  font-size: 11.5px;
  font-weight: 600;
}

.twofa-app-txt span {
  font-size: 9.5px;
  color: var(--auth-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.key-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-block-start: 14px;
  padding: 7px;
  border-radius: 5px;
  color: var(--auth-muted);
  font-size: 11px;
  transition: color 0.2s, background 0.2s;
}

.key-link:hover {
  color: var(--auth-blue);
  background: rgba(17, 153, 250, 0.06);
}

.key-link .icon {
  width: 13px;
  height: 13px;
}

.step-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-block-start: 14px;
  color: var(--auth-dim);
  font-size: 10px;
}

.step-note .icon {
  width: 11px;
  height: 11px;
  color: var(--auth-green);
}

/* ----------------------------- Chargement ----------------------------- */

.step-loader {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  text-align: center;
  background: var(--auth-card);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.step-loader.is-visible {
  opacity: 1;
  visibility: visible;
}

.loader-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin-block-end: 22px;
}

.loader-visual img {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  animation: loader-breathe 2.2s ease-in-out infinite;
}

@keyframes loader-breathe {
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 16px rgba(17, 153, 250, 0.5));
  }
}

.loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(17, 153, 250, 0.2);
  border-block-start-color: var(--auth-blue);
  animation: spin 1.3s linear infinite;
}

.loader-ring-2 {
  inset: 9px;
  border-color: rgba(106, 77, 255, 0.15);
  border-block-end-color: #6a4dff;
  animation-duration: 1.9s;
  animation-direction: reverse;
}

.step-loader h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--auth-ink);
}

.step-loader p {
  max-width: 30ch;
  margin-block-start: 5px;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.5;
}

.loader-bar {
  width: min(220px, 100%);
  height: 3px;
  margin-block-start: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.loader-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--auth-blue);
}

.loader-secure {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-block-start: 16px;
  color: #5c6579 !important;
  font-size: 10px !important;
}

.loader-secure .icon {
  width: 11px;
  height: 11px;
}

/* ----------------------------- Succès ----------------------------- */

.auth-step-success {
  padding-block-start: 8px;
}

.success-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.success-block.is-out {
  opacity: 0;
  transform: translateY(-6px);
}

.check-svg {
  width: 84px;
  height: 84px;
  margin-block-end: 16px;
  overflow: visible;
  filter: drop-shadow(0 8px 24px rgba(46, 212, 122, 0.15));
}

.check-circle {
  fill: none;
  stroke: rgba(46, 212, 122, 0.35);
  stroke-width: 2;
  stroke-dasharray: 239;
  stroke-dashoffset: 239;
  animation: draw 0.8s var(--ease) 0.1s forwards;
}

.check-circle-glow {
  fill: rgba(46, 212, 122, 0.06);
  stroke: none;
  transform-origin: center;
  animation: check-ping 2.2s ease-out 0.6s infinite;
}

.check-path {
  fill: none;
  stroke: var(--auth-green);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 52;
  stroke-dashoffset: 52;
  animation: draw 0.4s var(--ease) 0.5s forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes check-ping {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

.success-block h2 {
  font-size: 22px;
  margin-block-end: 6px;
}

.success-block > p {
  color: var(--auth-muted);
  font-size: 12.5px;
}

.success-bar {
  width: min(240px, 100%);
  height: 3px;
  margin-block: 22px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.success-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--auth-green);
  transition: width 1.6s var(--ease);
}

.success-note {
  color: #5c6579 !important;
  font-size: 11px !important;
}

/* Portefeuille */
.wallet {
  text-align: start;
  animation: wallet-in 0.5s var(--ease) both;
}

@keyframes wallet-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.wallet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-end: 16px;
}

.wallet-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(140deg, #1199fa, #6a4dff);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex: none;
}

.wallet-user-txt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.wallet-user-txt span {
  font-size: 10px;
  color: var(--auth-dim);
}

.wallet-user-txt strong {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: isolate;
}

.wallet-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 5px;
  border: 1px solid var(--auth-line);
  color: var(--auth-muted);
  font-size: 10.5px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.wallet-logout:hover {
  color: #fff;
  border-color: #3a4a66;
}

.wallet-logout .icon {
  width: 12px;
  height: 12px;
}

.wallet-balance {
  position: relative;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--auth-line);
  background: var(--auth-card-2);
  overflow: hidden;
  margin-block-end: 12px;
}

.wallet-label {
  font-size: 10.5px;
  color: var(--auth-dim);
}

.wallet-amount {
  display: flex;
  align-items: baseline;
  gap: 1px;
  margin-block: 2px 4px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.wallet-amount .cur {
  font-size: 18px;
  color: var(--auth-muted);
  margin-inline-end: 3px;
  font-weight: 600;
}

.wallet-amount .dec {
  font-size: 18px;
  color: var(--auth-dim);
  font-weight: 600;
}

.wallet-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 5px;
  border-radius: 999px;
  background: rgba(46, 212, 122, 0.1);
  color: #5fe39b;
  font-size: 10px;
  font-weight: 600;
}

.wallet-change .icon {
  width: 11px;
  height: 11px;
}

.wallet-period {
  opacity: 0.7;
}

.wallet-chart {
  width: 100%;
  height: 52px;
  margin-block-start: 6px;
}

.wallet-line {
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: draw 1.4s var(--ease) 0.2s forwards;
}

.wallet-assets {
  display: grid;
  margin-block-end: 14px;
}

.wallet-asset {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-block: 8px;
  border-block-end: 1px solid var(--auth-line-soft);
}

.wallet-asset:last-child {
  border-block-end: 0;
}

.coin {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  flex: none;
}

.coin-btc {
  background: linear-gradient(140deg, #f7931a, #b96404);
}
.coin-eth {
  background: linear-gradient(140deg, #6f86ff, #3c4bb9);
}
.coin-cro {
  background: linear-gradient(140deg, #1f6fe0, #062b6e);
}

.wa-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.25;
}

.wa-name strong {
  font-size: 11.5px;
  font-weight: 600;
}

.wa-name span {
  font-size: 10px;
  color: var(--auth-dim);
}

.wa-value {
  margin-inline-start: auto;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.wallet .btn {
  height: 46px;
  border-radius: 6px;
  font-size: 14px;
  background: var(--auth-blue);
  background-image: none;
  box-shadow: none;
}

.wallet .btn:hover {
  background: #3cabff;
  transform: none;
  box-shadow: none;
}

.auth-submit:hover,
.wallet .btn:hover {
  transform: none;
}

.wallet-note {
  margin-block-start: 10px;
  text-align: center;
  color: #5c6579;
  font-size: 9.5px;
  line-height: 1.5;
}

/* ----------------------------- Bannière ----------------------------- */

.auth-promo {
  min-height: 520px;
  border-radius: 8px;
  overflow: hidden;
  background: #071426;
}

.auth-promo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----------------------------- Pied de page ----------------------------- */

.auth-footer {
  width: 100%;
  margin-block-start: 20px;
  padding-block-start: 18px;
  border-block-start: 1px solid #1a2438;
}

.auth-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 32px;
  color: #6a7488;
  font-size: 10.5px;
  line-height: 1.5;
}

.auth-footer-row > p:first-child {
  max-width: 70ch;
}

.auth-footer-copy {
  color: #5c6579;
  white-space: nowrap;
}

.auth-disclaimer {
  max-width: 120ch;
  margin-block-start: 10px;
  color: #4b5468;
  font-size: 9.5px;
  line-height: 1.6;
}

/* ----------------------------- Responsive ----------------------------- */

@media (max-width: 1200px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr) 480px;
  }
  .auth-topbar {
    padding-inline: 40px;
  }
}

@media (max-width: 1024px) {
  .auth-shell {
    grid-template-columns: minmax(0, 556px);
    justify-content: center;
  }
  .auth-promo {
    display: none;
  }
  .auth-topbar {
    padding-inline: 32px;
  }
}

@media (max-width: 720px) {
  .auth-page {
    padding-block-end: 24px;
  }

  .auth-topbar {
    height: 76px;
    padding-inline: 16px;
  }

  .auth-topbar .brand img {
    width: 106px;
  }

  .auth-top-actions {
    gap: 10px;
  }

  .auth-back span {
    display: none;
  }

  .auth-back {
    width: 32px;
    height: 32px;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--auth-line);
  }

  .auth-main {
    width: calc(100% - 32px);
  }

  .auth-card {
    min-height: 0;
    padding: 20px;
  }

  .auth-switch-btn {
    height: 36px;
    font-size: 12.5px;
  }

  .auth-tabs {
    gap: 20px;
    margin-block-start: 18px;
  }

  .auth-tab {
    height: 34px;
    font-size: 12.5px;
  }

  .auth-tab[data-auth-tab="qr"] {
    display: none;
  }

  .auth-progress {
    margin-block-start: 12px;
  }

  .ap-label {
    font-size: 9px;
  }

  .ap-line {
    width: 10px;
  }

  .step-head {
    margin-block-start: 14px;
  }

  .step-head h1,
  .step-head h2 {
    font-size: 20px;
  }

  .otp {
    gap: 6px;
  }

  .otp-input {
    height: 48px;
    font-size: 18px;
  }

  .wallet-user-txt strong {
    max-width: 150px;
  }

  .wallet-logout span {
    display: none;
  }

  .wallet-logout {
    width: 30px;
    height: 30px;
    padding: 0;
    justify-content: center;
  }

  .auth-footer-row {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .otp {
    gap: 4px;
  }
  .otp-input {
    height: 44px;
    font-size: 17px;
  }
  .auth-card {
    padding: 16px;
  }
}

[dir="rtl"] .wallet-logout .icon,
[dir="rtl"] .wallet .btn .icon {
  transform: scaleX(-1);
}

/* ----------------------------- Signature des nouvelles CGU ----------------------------- */

.auth-shell.is-contract {
  grid-template-columns: minmax(0, 1fr);
}

.auth-shell.is-contract .auth-promo {
  display: none;
}

.auth-card.is-contract {
  min-height: 0;
  padding: 24px 28px 26px;
}

.auth-card.is-contract .auth-body {
  justify-content: flex-start;
}

.contract-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #26314a;
}

.contract-head-main {
  min-width: 0;
}

.contract-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7cc8ff;
}

.contract-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1199fa;
  box-shadow: 0 0 0 4px rgba(17, 153, 250, 0.12);
}

.contract-head h2 {
  margin: 9px 0 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #f7f9fa;
}

.contract-sub {
  max-width: 680px;
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #8f9bb3;
}

.contract-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  height: 36px;
  margin-top: 4px;
  padding-inline: 12px;
  border-radius: 7px;
  border: 1px solid #2b3a57;
  color: #c8d3e4;
  font-size: 12px;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.contract-download:hover {
  border-color: #3d5578;
  color: #fff;
  background: rgba(17, 153, 250, 0.06);
}

.contract-download .icon {
  width: 15px;
  height: 15px;
}

.contract-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.82fr);
  gap: 22px;
  align-items: start;
  margin-top: 20px;
}

.contract-doc {
  min-width: 0;
  border: 1px solid #26314a;
  border-radius: 10px;
  overflow: hidden;
  background: #0b1424;
}

.contract-doc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #26314a;
  background: #0e1829;
}

.contract-doc-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: #d6deea;
}

.contract-doc-title .icon {
  width: 15px;
  height: 15px;
  color: #7cc8ff;
}

.contract-doc-lang {
  font-size: 10.5px;
  color: #6f7c93;
}

.contract-pages {
  height: 520px;
  padding: 16px;
  overflow-y: auto;
  background: #091120;
  scrollbar-width: thin;
  scrollbar-color: #2b3a57 transparent;
}

.contract-pages::-webkit-scrollbar {
  width: 8px;
}

.contract-pages::-webkit-scrollbar-thumb {
  background: #2b3a57;
  border-radius: 4px;
}

.contract-pages img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 14px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.contract-pages img:last-child {
  margin-bottom: 0;
}

.contract-readhint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 9px 14px;
  border-top: 1px solid #26314a;
  font-size: 10.5px;
  color: #6f7c93;
}

.contract-readhint .icon {
  width: 13px;
  height: 13px;
  transform: rotate(-90deg);
}

.contract-sign {
  border: 1px solid #26314a;
  border-radius: 10px;
  background: #0e1829;
  padding: 18px;
}

.contract-sign h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #f7f9fa;
}

.contract-sign-hint {
  margin: 6px 0 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #8f9bb3;
}

.sign-pad {
  position: relative;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  cursor: crosshair;
}

.sign-pad canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.sign-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #98a2b3;
  pointer-events: none;
  transition: opacity 0.2s;
}

.sign-placeholder.is-hidden {
  opacity: 0;
}

.sign-line {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 34px;
  border-bottom: 1px solid #e2e8f0;
  pointer-events: none;
}

.sign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.sign-status {
  font-size: 11px;
  color: #8f9bb3;
}

.sign-status.is-signed {
  color: #63e6be;
}

.sign-clear {
  font-size: 11px;
  font-weight: 500;
  color: #8f9bb3;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sign-clear:hover {
  color: #fff;
}

.sign-accept {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #c8d3e4;
  cursor: pointer;
}

.sign-accept input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex: none;
  accent-color: #1199fa;
}

.sign-error {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #ffb4b4;
}

.sign-meta {
  min-height: 14px;
  margin: 10px 0 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: #7cc8ff;
}

.contract-sign .auth-submit {
  height: 44px;
  margin-top: 12px;
  font-size: 13px;
}

.contract-sign .auth-submit:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.contract-sign .auth-submit:disabled:hover {
  transform: none;
  background: var(--auth-blue);
}

.sign-note {
  margin: 10px 0 0;
  font-size: 10px;
  line-height: 1.45;
  color: #6f7c93;
  text-align: center;
}

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

  .contract-pages {
    height: 42vh;
    min-height: 300px;
  }

  .contract-head {
    flex-direction: column;
    gap: 12px;
  }

  .contract-download {
    margin-top: 0;
  }
}

@media (max-width: 720px) {
  .auth-card.is-contract {
    padding: 18px;
  }

  .contract-head h2 {
    font-size: 21px;
  }

  .contract-doc-bar {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .contract-doc-lang {
    flex-basis: 100%;
  }

  .contract-grid {
    gap: 14px;
    margin-top: 14px;
  }

  .contract-pages {
    height: 38vh;
    min-height: 260px;
    padding: 10px;
  }

  .contract-sign {
    padding: 14px;
  }

  .sign-pad {
    height: 160px;
  }
}

/* ----------------------------- Écran de signature dédié ----------------------------- */

.auth-shell.is-sign {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.auth-shell.is-sign .auth-promo {
  display: none;
}

.auth-card.is-sign {
  min-height: 0;
  padding: 32px 34px 30px;
}

.auth-card.is-sign .auth-body {
  justify-content: flex-start;
}

.sign-screen {
  width: 100%;
}

.sign-head h2 {
  margin: 8px 0 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #f7f9fa;
}

.sign-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7cc8ff;
}

.sign-kicker::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1199fa;
  box-shadow: 0 0 0 4px rgba(17, 153, 250, 0.13);
}

.sign-sub {
  max-width: 620px;
  margin: 9px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #8f9bb3;
}

.sign-doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid #26314a;
  border-radius: 10px;
  background: #111a2c;
}

.sign-doc-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 9px;
  background: rgba(17, 153, 250, 0.1);
  color: #7cc8ff;
}

.sign-doc-icon .icon {
  width: 19px;
  height: 19px;
}

.sign-doc-thumb {
  display: block;
  width: 42px;
  height: 58px;
  flex: none;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.sign-doc-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sign-doc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sign-doc-info strong {
  font-size: 12.5px;
  font-weight: 600;
  color: #f4f7fc;
  letter-spacing: -0.01em;
}

.sign-doc-info span {
  font-size: 10.5px;
  color: #8f9bb3;
}

.sign-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: none;
  height: 30px;
  padding-inline: 9px;
  border-radius: 6px;
  border: 1px solid #2b3a57;
  color: #c8d3e4;
  font-size: 10.5px;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.sign-doc-link:hover {
  border-color: #3d5578;
  color: #fff;
  background: rgba(17, 153, 250, 0.07);
}

.sign-doc-link .icon {
  width: 13px;
  height: 13px;
}

.sign-pad-block {
  margin-top: 20px;
}

.sign-pad-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.sign-pad-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: #f7f9fa;
  letter-spacing: -0.01em;
}

.sign-pad-head span {
  font-size: 10.5px;
  color: #8f9bb3;
  text-align: right;
}

.sign-screen .sign-pad {
  height: 220px;
  border-style: solid;
  border-color: #d5dee8;
}

.sign-screen .sign-placeholder {
  font-size: 14px;
}

.sign-screen .sign-line {
  bottom: 40px;
}

.sign-screen .sign-status {
  font-size: 11.5px;
}

.sign-screen .sign-clear {
  font-size: 11.5px;
}

.sign-screen .sign-accept {
  margin-top: 16px;
  font-size: 12.5px;
}

.sign-screen .sign-accept input {
  width: 17px;
  height: 17px;
}

.sign-screen .sign-error {
  font-size: 11.5px;
}

.sign-screen .sign-meta {
  font-size: 11px;
}

.sign-submit {
  height: 46px;
  margin-top: 14px;
  border-radius: 7px;
  font-size: 13.5px;
  background: var(--auth-blue);
  box-shadow: none;
}

.sign-submit:hover {
  background: #3cabff;
  transform: none;
}

.sign-submit:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.sign-submit:disabled:hover {
  background: var(--auth-blue);
  transform: none;
}

.sign-screen .sign-note {
  margin-top: 10px;
  font-size: 10.5px;
}

@media (max-width: 720px) {
  .auth-card.is-sign {
    padding: 22px 18px 24px;
  }

  .sign-head h2 {
    font-size: 22px;
  }

  .sign-doc-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
  }

  .sign-doc-icon,
  .sign-doc-thumb {
    grid-column: 1;
    grid-row: 1;
  }

  .sign-doc-info {
    grid-column: 2;
    grid-row: 1;
  }

  .sign-doc-link {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 4px 0 0;
    justify-self: start;
  }

  .sign-pad-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .sign-pad-head span {
    text-align: left;
  }

  .sign-screen .sign-pad {
    height: 175px;
  }

  .sign-screen .sign-accept {
    font-size: 11.5px;
  }
}
/* ---------- Écran « Validé » ---------- */

.auth-step[data-step="done"] .step-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.auth-step[data-step="done"] .step-head h2 {
  margin-left: auto;
  margin-right: auto;
  font-size: 26px;
}
.auth-step[data-step="done"] .step-sub {
  margin-left: auto;
  margin-right: auto;
  max-width: 320px;
}

.done-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #2ed47a;
  box-shadow: 0 12px 32px rgba(46, 212, 122, 0.22);
  animation: done-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.done-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(46, 212, 122, 0.55);
  animation: done-burst 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.done-check {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 28;
  stroke-dashoffset: 28;
  animation: done-draw 0.45s ease-out 0.15s forwards;
}

@keyframes done-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}
@keyframes done-burst {
  0%   { transform: scale(1);    opacity: 0.8; }
  100% { transform: scale(1.45); opacity: 0; }
}
@keyframes done-draw {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 720px) {
  .done-badge { width: 76px; height: 76px; }
  .done-check { width: 34px; height: 34px; }
}
.caps-hint .icon {
  width: 12px !important;
  height: 12px !important;
  min-width: 12px;
  max-width: 12px;
  flex: 0 0 12px;
  aspect-ratio: 1;
}