/* A partner program's pages before the app (lib/partner-program.js): the
   program's page (views/partner-program/door.ejs) and the step after the
   sign-in (views/partner-program/setup.ejs). One white group on the window,
   drawn like the sign-in pages of the interface redo (DESIGN.md,
   coommit-ui-pages-billing.css's .uib-auth, 2026-10-29): coommit-ui.css's
   --ui-* tokens, a 1px ring, radii 12 / 8 / 6, 40px fields and buttons,
   indigo for the one filled action, grey for the others. No gradient, glow,
   shadow, tinted box, dot grid or motion (Alex, 25-26/10: "pas vibe codé",
   "des boutons basiques avec une seule couleur"). Its own classes (pp-*).
   Light only, like the sign-in pages. */

html { -webkit-text-size-adjust: 100%; }
body.pp {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px; box-sizing: border-box;
  background: var(--ui-win); color: var(--ui-ink);
  font-family: var(--cs-sans); font-weight: 500;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.pp *, .pp *::before, .pp *::after { box-sizing: border-box; }

.pp-card {
  width: 100%; max-width: 420px;
  background: var(--ui-group);
  border: 0; border-radius: var(--ui-r-group); box-shadow: 0 0 0 1px var(--ui-edge);
  padding: 36px 32px 24px;
}

/* The two marks, side by side, at the same visual weight. */
.pp-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 24px; }
.pp-brand-coommit { display: block; height: 22px; width: auto; }
.pp-brand-x { font-size: 14px; color: var(--ui-ink-3); }
.pp-brand-partner { display: block; height: 36px; width: auto; max-width: 132px; object-fit: contain; }
.pp-brand-name { font-size: 17px; font-weight: 700; color: var(--ui-ink); }

/* One title, one line under it. */
.pp-title {
  margin: 0; text-align: center;
  font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -.022em;
  color: var(--ui-ink); text-wrap: balance;
}
.pp-lead {
  margin: 8px 0 0; text-align: center;
  font-size: 15px; line-height: 22px; color: var(--ui-ink-2); text-wrap: pretty;
}
.pp-note { margin: 12px 0 0; text-align: center; font-size: 14px; line-height: 20px; color: var(--ui-ink-2); }
/* Messages: words in the group, no tinted box. */
.pp-msg { margin: 16px 0 0; text-align: center; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--ui-ink); }
.pp-msg.is-error { color: var(--ui-danger); }

.pp-body { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.pp-form { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.pp-form > .pp-btn { margin-top: 10px; }
.pp-form[hidden], .pp-btn[hidden], .pp-actions[hidden] { display: none; }
.pp-actions { display: flex; flex-direction: column; gap: 8px; }
.pp-actions form { margin: 0; }

.pp-label { font-size: 13px; line-height: 20px; font-weight: 600; color: var(--ui-ink-2); }
.pp-label:not(:first-child) { margin-top: 8px; }
.pp-input {
  width: 100%; height: 40px; padding: 0 12px; margin: 0;
  border: 1px solid rgba(29, 31, 43, .14); border-radius: var(--ui-r-ctl);
  background: var(--ui-group); color: var(--ui-ink);
  font-family: var(--cs-sans); font-size: 15px; font-weight: 500;
  transition: border-color .12s ease;
}
.pp-input::placeholder { color: var(--ui-ink-3); }
.pp-input:hover:not(:focus) { border-color: rgba(29, 31, 43, .24); }
.pp-input:focus { outline: 2px solid var(--ui-mark); outline-offset: 0; border-color: transparent; box-shadow: none; }
.pp-input[aria-invalid="true"] { border-color: var(--ui-danger); }
.pp-input[aria-invalid="true"]:focus { outline-color: var(--ui-danger); }
.pp-hint { margin: 2px 0 0; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ui-ink-3); }
.pp-error { margin: 2px 0 0; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ui-danger); }
.pp-error[hidden] { display: none; }
/* One message under the field at a time: the error replaces the hint. */
.pp-hint:has(+ .pp-error:not([hidden])) { display: none; }
.pp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons: a full-width bar, one flat colour, nothing that moves. */
.pp-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 40px; padding: 0 16px; margin: 0;
  border: 0; border-radius: var(--ui-r-ctl); box-shadow: none;
  font-family: var(--cs-sans); font-size: 15px; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
.pp-btn-primary { background: var(--ui-accent); color: #fff; }
.pp-btn-primary:hover { background: var(--ui-accent-hover); color: #fff; }
.pp-btn-quiet { background: var(--ui-fill); color: var(--ui-ink); }
.pp-btn-quiet:hover { background: var(--ui-fill-2); color: var(--ui-ink); }
.pp-btn:disabled { opacity: .6; cursor: default; }
/* Google's mark on its own white square when it sits on our indigo (the
   button's colour is ours, the G stays Google's). */
.pp-btn-primary svg { flex: none; width: 22px; height: 22px; padding: 3px; background: #fff; border-radius: var(--ui-r-small); }
.pp-btn:focus-visible, .pp-foot a:focus-visible, .pp-questions a:focus-visible { outline: 2px solid var(--ui-mark); outline-offset: 2px; }

.pp-foot { margin: 4px 0 0; text-align: center; font-size: 14px; line-height: 20px; }
.pp-foot a { color: var(--ui-accent-text); font-weight: 600; text-decoration: none; }
.pp-foot a:hover { color: var(--ui-accent-hover); }
.pp-questions { margin: 20px 0 0; text-align: center; font-size: 13px; line-height: 18px; color: var(--ui-ink-3); }
.pp-questions a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.pp-questions a:hover { color: var(--ui-ink-2); }

@media (max-width: 480px) {
  body.pp { align-items: flex-start; padding: 16px; }
  .pp-card { padding: 28px 20px 20px; }
  .pp-brand-partner { height: 32px; }
  .pp-brand-coommit { height: 20px; }
  .pp-title { font-size: 22px; line-height: 28px; }
  /* 16px: below it iOS Safari zooms the page on focus */
  .pp-input { font-size: 16px; }
}
/* A short laptop screen (1280x585, Arthur's): the actions above the fold. */
@media (max-height: 640px) and (min-width: 481px) {
  body.pp { align-items: flex-start; padding-top: 20px; }
  .pp-card { padding-top: 28px; }
  .pp-brand { margin-bottom: 18px; }
  .pp-body { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-btn, .pp-input { transition: none; }
}
