@font-face {
  font-family: Geist;
  src: url("/fonts/geist-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Geist;
  src: url("/fonts/geist-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Geist;
  src: url("/fonts/geist-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --aska-lime: #b9ff38;
  --aska-lime-hover: #a8f522;
  --aska-lime-pressed: #94df12;
  --aska-lime-soft: #edffd1;
  --aska-ink: #171815;
  --aska-body: #34352f;
  --aska-charcoal: #575951;
  --aska-muted: #73766d;
  --aska-ash: #9b9d95;
  --aska-canvas: #f7f4ec;
  --aska-surface-warm: #f1eee5;
  --aska-surface-card: #fcfbf7;
  --aska-dark: #171916;
  --aska-on-dark: #f7f4ec;
  --aska-hairline: rgba(23, 24, 21, 0.14);
  --aska-hairline-strong: rgba(23, 24, 21, 0.28);
  --serif: "Instrument Serif", Georgia, serif;
  --danger: #b3441f;
  --danger-bg: #fbeee7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--aska-canvas);
  color: var(--aska-ink);
  font-family: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Faint decorative texture behind the card — same pattern asset used on the marketing site,
   kept subtle since this is a functional auth screen, not a marketing page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("/patterns/topographic-lines.svg") center / cover no-repeat;
  opacity: 0.5;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--aska-surface-card);
  border: 1px solid var(--aska-hairline);
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 16px 50px rgba(13, 15, 13, 0.05);
}

.wordmark {
  display: block;
  height: 28px;
  width: auto;
  margin: 0 0 28px;
}

h1 {
  font: 400 40px/1.04 var(--serif);
  letter-spacing: -0.6px;
  margin: 0 0 12px;
  color: var(--aska-ink);
}

.subtitle {
  color: var(--aska-charcoal);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 28px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--aska-ink);
}

input[type="email"] {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--aska-hairline-strong);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 20px;
  background: var(--aska-surface-warm);
  color: var(--aska-ink);
}

input[type="email"]::placeholder {
  color: var(--aska-ash);
}

input[type="email"]:focus {
  outline: 2px solid var(--aska-ink);
  outline-offset: 1px;
  background: var(--aska-surface-card);
}

button {
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--aska-ink);
  color: var(--aska-on-dark);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.18s ease;
}

button:hover {
  background: #30312c;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.secondary {
  background: transparent;
  color: var(--aska-ink);
  border: 1px solid var(--aska-hairline-strong);
}

button.secondary:hover {
  background: var(--aska-surface-warm);
}

.link {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--aska-charcoal);
  margin-top: 20px;
}

.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.actions button {
  flex: 1;
}

.msg {
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-top: 16px;
  line-height: 1.5;
}

.msg.info {
  background: var(--aska-surface-warm);
  color: var(--aska-charcoal);
  border: 1px solid var(--aska-hairline);
}

.msg.error {
  background: var(--danger-bg);
  color: var(--danger);
}

[hidden] {
  display: none !important;
}

/* "Vérifiez votre boîte mail" success state */
.success-panel {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--aska-lime-soft);
  border: 1px solid #d8e4bd;
  border-radius: 12px;
  padding: 18px;
  margin: 24px 0;
}

.success-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--aska-lime);
  color: var(--aska-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.success-panel strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.success-panel p {
  margin: 0;
  font-size: 13px;
  color: var(--aska-charcoal);
  line-height: 1.5;
}

.hairline {
  border: 0;
  border-top: 1px solid var(--aska-hairline);
  margin: 24px 0 20px;
}

.footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--aska-muted);
  text-align: center;
}

.footnote svg {
  flex-shrink: 0;
}

.client-box {
  background: var(--aska-surface-warm);
  border: 1px solid var(--aska-hairline);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 24px;
}

.client-box .name {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 4px;
}

.client-box .scopes {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.client-box .scopes li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--aska-ink);
  line-height: 1.4;
}

.client-box .scopes .check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--aska-lime);
  color: var(--aska-ink);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.loading {
  color: var(--aska-charcoal);
  font-size: 14px;
}

.connect-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 4px 0 28px;
}

.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  object-fit: cover;
}

.icon-badge.client {
  background: var(--aska-surface-warm);
  color: var(--aska-charcoal);
  border: 1px solid var(--aska-hairline);
}

.connect-glyph {
  color: var(--aska-ash);
  flex-shrink: 0;
}

.connect-glyph svg {
  display: block;
}
