/* SilaLink — connexion, création de compte, mot de passe oublié. Même style que la landing (silalink.com). */
:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --brand: #4f46e5;
  --brand-soft: #eef2ff;
  --ring: #c7d2fe;
  --ok: #059669;
  --night: #0b1023;
  --gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 52%, #7c3aed 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.sl-auth {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
.sl-auth img { max-width: 100%; height: auto; display: block; }
.sl-auth a { color: var(--brand); font-weight: 700; text-decoration: none; }
.sl-auth a:hover { text-decoration: underline; }
.sl-auth :focus-visible { outline: 3px solid #a5b4fc; outline-offset: 3px; border-radius: 6px; }
:where(.sl-auth) h1, :where(.sl-auth) h2 { margin: 0; line-height: 1.12; letter-spacing: -.02em; }
:where(.sl-auth) p { margin: 0; }

/* Mise en page : panneau de marque à gauche, formulaire à droite */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 46%) 1fr; }
.auth-side {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 44px 52px; color: #fff;
  background:
    radial-gradient(640px 420px at 10% 0%, rgba(79, 70, 229, .55), transparent 62%),
    radial-gradient(560px 460px at 100% 100%, rgba(124, 58, 237, .45), transparent 60%),
    var(--night);
}
.auth-side::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 75%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
}
.auth-side > * { position: relative; z-index: 1; }
.auth-side .side-logo img { height: 40px; width: auto; }
.auth-side .side-copy { max-width: 470px; }
.side-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #e0e7ff; font-size: 13px; font-weight: 700;
}
.side-badge svg { width: 15px; height: 15px; }
.auth-side h2 { margin: 18px 0 14px; font-size: clamp(30px, 3.2vw, 42px); font-weight: 800; color: #fff; }
.auth-side h2 .grad { background: linear-gradient(90deg, #a5b4fc, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-side .side-lead { color: #c7d2fe; font-size: 16px; }
.side-list { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.side-list li { display: flex; align-items: flex-start; gap: 12px; color: #e2e8f0; font-weight: 600; }
.side-list .ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #c7d2fe; }
.side-list .ico svg { width: 16px; height: 16px; }
.side-list small { display: block; color: #a5b4fc; font-weight: 500; font-size: 13px; }

/* Étapes de l'inscription */
.side-steps { display: grid; gap: 0; margin: 28px 0 0; padding: 0; list-style: none; counter-reset: step; }
.side-steps li { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding-bottom: 18px; counter-increment: step; }
.side-steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: #e0e7ff; font-weight: 800; font-size: 14px;
}
.side-steps li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 38px; bottom: 2px; width: 2px; background: rgba(255, 255, 255, .12); }
.side-steps li.is-current::before { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, .45); }
.side-steps strong { display: block; color: #fff; font-size: 15px; }
.side-steps span { display: block; color: #a5b4fc; font-size: 13px; }

/* Cartes flottantes, comme sur la landing */
.side-cards { display: grid; gap: 12px; max-width: 380px; }
.side-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .96); color: var(--ink); box-shadow: 0 20px 40px rgba(2, 6, 23, .35);
  animation: sl-float 6s ease-in-out infinite;
}
.side-card:nth-child(2) { margin-left: 34px; animation-delay: -2s; }
.side-card:nth-child(3) { margin-left: 12px; animation-delay: -4s; }
.side-card .ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.side-card .ico.is-ok { background: #ecfdf5; color: var(--ok); }
.side-card .ico svg { width: 19px; height: 19px; }
.side-card strong { display: block; font-size: 14px; }
.side-card span { display: block; color: var(--muted); font-size: 12.5px; }
@keyframes sl-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.side-quote { max-width: 440px; padding: 18px 20px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); }
.side-quote p { color: #fff; font-size: 15px; font-weight: 600; }
.side-quote footer { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: #a5b4fc; font-size: 13px; }
.side-quote footer img { height: 30px; width: auto; padding: 4px 8px; border-radius: 8px; background: #fff; }
.side-foot { color: #818cf8; font-size: 13px; }

/* Colonne du formulaire */
.auth-main {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 40px 24px;
  background: radial-gradient(700px 420px at 100% 0%, #eef2ff 0, transparent 60%), var(--soft);
}
.auth-card { width: 100%; max-width: 460px; padding: 38px 36px 32px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 24px 60px rgba(15, 23, 42, .1); }
.sl-auth--signup .auth-card { max-width: 580px; }
.card-logo { display: none; margin-bottom: 24px; }
.card-logo img { height: 34px; width: auto; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.auth-eyebrow svg { width: 15px; height: 15px; }
.auth-card h1 { margin: 10px 0 8px; font-size: 30px; font-weight: 800; }
.auth-sub { color: var(--muted); font-size: 15px; margin-bottom: 26px; }

.auth-alert { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; padding: 12px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; }
.auth-alert svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.auth-alert.is-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.auth-alert.is-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.auth-alert .alert-actions { margin-top: 8px; }

.field { margin: 0 0 16px; }
.field label { display: block; margin: 0 0 7px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.control { position: relative; }
.control > svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.control input, .control select, .phone-row select, .phone-row input {
  width: 100%; height: 52px; padding: 0 16px 0 46px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
  font: inherit; font-size: 15px; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.control input::placeholder, .phone-row input::placeholder { color: #94a3b8; }
.control input:hover, .phone-row select:hover, .phone-row input:hover { border-color: #cbd5e1; }
.control input:focus, .phone-row select:focus, .phone-row input:focus { outline: none; border-color: #818cf8; box-shadow: 0 0 0 4px var(--ring); }
.control.has-toggle input { padding-right: 52px; }
.control .toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center;
  width: 40px; height: 40px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); cursor: pointer;
}
.control .toggle:hover { background: var(--soft); color: var(--brand); }
.control .toggle svg { width: 19px; height: 19px; }
.control .toggle .when-visible, .control .toggle[aria-pressed="true"] .when-hidden { display: none; }
.control .toggle[aria-pressed="true"] .when-visible { display: block; }
.phone-row { display: grid; grid-template-columns: minmax(150px, .8fr) 1.2fr; gap: 10px; }
.phone-row select { padding: 0 34px 0 14px; appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.phone-row input { padding-left: 16px; }
.field-hint { margin-top: 7px; color: var(--muted); font-size: 12.5px; }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; font-size: 14px; }
.btn-auth {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; padding: 12px 22px;
  border: 0; border-radius: 14px; background: var(--gradient); color: #fff; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
  box-shadow: 0 12px 28px rgba(79, 70, 229, .32); transition: transform .15s ease, box-shadow .15s ease;
}
.btn-auth:hover { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(79, 70, 229, .4); }
.btn-auth svg { width: 18px; height: 18px; }
.btn-auth.is-small { width: auto; min-height: 40px; padding: 8px 16px; font-size: 14px; box-shadow: none; }
.auth-switch { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14.5px; }
.auth-note { display: flex; gap: 10px; margin-top: 22px; padding: 14px 16px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.auth-note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--brand); }
.auth-note strong { color: var(--ink-2); }
.auth-legal { color: #94a3b8; font-size: 12.5px; text-align: center; }
.auth-legal a { color: #64748b; font-weight: 600; }
.auth-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 18px; color: var(--muted); font-size: 13px; font-weight: 600; }
.auth-trust span { display: inline-flex; align-items: center; gap: 6px; }
.auth-trust svg { width: 15px; height: 15px; color: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  .side-card { animation: none; }
  .btn-auth { transition: none; }
}
@media (max-width: 1100px) {
  .auth-shell { grid-template-columns: minmax(380px, 42%) 1fr; }
  .auth-side { padding: 38px 36px; }
  .side-cards { display: none; }
}
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .card-logo { display: block; }
  .auth-main { justify-content: flex-start; padding: 28px 16px 36px; }
}
@media (max-width: 560px) {
  .auth-card { padding: 28px 20px 24px; border-radius: 20px; }
  .auth-card h1 { font-size: 26px; }
  .field-row, .phone-row { grid-template-columns: 1fr; }
  .auth-row { flex-direction: column-reverse; align-items: stretch; text-align: center; }
}
