/* Jetons partagés par la landing, l'authentification et l'application.
   Les valeurs viennent de la maquette Claude Design. */

:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --ink: #12151B;
  --ink-soft: #5C6473;
  --ink-faint: #6B7381;
  --line: #E2E6EC;
  --line-strong: #D8DDE5;
  --accent: #1B4DFF;
  --accent-dark: #0F2FA8;
  --accent-wash: rgba(27, 77, 255, 0.1);
  --dark: #12151B;
  --dark-soft: #1C2029;
  --dark-line: #2C323E;
  --dark-ink: #A6AFBE;
  --dark-faint: #78818F;

  --sans: "IBM Plex Sans", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 7px;
  --radius-lg: 10px;
  --shadow-card: 0 24px 60px -30px rgba(18, 21, 27, 0.28);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, p { margin: 0; }

button { font-family: inherit; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ── Boutons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); color: #fff; }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }

.btn-quiet { background: transparent; color: var(--ink-soft); border-color: transparent; padding: 8px 12px; }
.btn-quiet:hover:not(:disabled) { color: var(--ink); background: rgba(18, 21, 27, 0.04); }

.btn-danger { background: transparent; color: #B42318; border-color: #F3C9C4; }
.btn-danger:hover:not(:disabled) { background: #FEF3F2; }

.btn-sm { font-size: 13.5px; padding: 8px 13px; }
.btn-lg { font-size: 16px; padding: 16px 30px; }

/* ── Champs ──────────────────────────────────────────────────────────────── */

.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="url"], select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 11px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

input:disabled, select:disabled, textarea:disabled {
  background: var(--bg);
  color: var(--ink-faint);
  cursor: not-allowed;
}

/* ── Messages ────────────────────────────────────────────────────────────── */

.notice {
  border-radius: 6px;
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.notice-error { background: #FEF3F2; color: #912018; border: 1px solid #F3C9C4; }
.notice-ok { background: #ECFDF3; color: #05603A; border: 1px solid #ABEFC6; }
.notice-info { background: var(--accent-wash); color: #12306E; border: 1px solid rgba(27, 77, 255, 0.2); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Toasts ──────────────────────────────────────────────────────────────── */

#toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
  max-width: min(360px, calc(100vw - 40px));
}
.toast {
  background: var(--dark);
  color: #fff;
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 18px 40px -18px rgba(18, 21, 27, 0.6);
  animation: toast-in 0.18s ease-out;
}
.toast--error { background: #912018; }
.toast--ok { background: #05603A; }

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

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
