/* ========== TRAKOUT — Pages secondaires (FAQ, Login, Onboarding, Legal) ========== */
/* Charge après system.css. Styles partagés pages statiques hors landing. */

/* ============ PAGE WRAPPER ============ */
.tk-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 140px 48px 120px;
}
.tk-page-head {
  margin-bottom: 64px; padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.tk-page-head h1 {
  font-size: clamp(40px, 6vw, 80px); line-height: 0.98;
  letter-spacing: -0.03em; font-weight: 500; margin: 24px 0 0; text-wrap: balance;
}
.tk-page-head p {
  font-size: 19px; line-height: 1.45; color: var(--text-2); margin: 24px 0 0; max-width: 620px;
}

/* ============ NAV (partagée avec landing) ============ */
/* Voir landing.css .tk-nav — chargé conjointement */

/* ============ FAQ ============ */
.faq-group { margin-bottom: 48px; }
.faq-group-label {
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent); margin: 0 0 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.faq-item { border-bottom: 1px solid var(--line); padding: 24px 0; cursor: pointer; }
.faq-item .faq-q { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.faq-item h4 { font-size: 19px; margin: 0; font-weight: 500; }
.faq-item .toggle { font-family: var(--font-mono); color: var(--accent); transition: transform .3s; flex-shrink: 0; font-size: 20px; }
.faq-item.open .toggle { transform: rotate(45deg); }
.faq-item .faq-a { max-height: 0; overflow: hidden; transition: max-height .4s, margin .4s; color: var(--text-2); font-size: 16px; line-height: 1.5; }
.faq-item.open .faq-a { max-height: 240px; margin-top: 16px; }

/* ============ FORMULAIRES (onboarding, login) ============ */
.field { margin-bottom: 20px; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font-sans); font-size: 15px;
  transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
}
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; font-family: var(--font-mono); }

/* Prefix input (slug) */
.input-prefix-group { display: flex; align-items: center; gap: 0; }
.input-prefix {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--bg-3); border: 1px solid var(--line); border-right: none;
  padding: 14px 12px; border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text-3); white-space: nowrap;
}
.input-prefix + input { border-radius: 0 var(--radius) var(--radius) 0; }

/* ============ LOGIN ============ */
.tk-login {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
}
.tk-login-aside {
  background: var(--bg-2); color: var(--text);
  padding: 64px 56px; display: flex; flex-direction: column;
  justify-content: space-between; position: relative; overflow: hidden;
}
.tk-login-aside::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 40px 40px; opacity: .5;
  mask-image: radial-gradient(ellipse 80% 80% at 30% 50%, black 30%, transparent 100%);
}
.tk-login-aside > * { position: relative; z-index: 1; }
.tk-login-aside h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; margin: 32px 0 0; text-wrap: balance; }
.tk-login-aside p { font-size: 16px; line-height: 1.5; color: var(--text-2); margin-top: 20px; max-width: 340px; }
.tk-login-form {
  padding: 80px 56px; display: flex; flex-direction: column; justify-content: center;
  border-left: 1px solid var(--line); background: var(--bg);
}
.tk-login-form h1 { font-size: clamp(36px, 4vw, 56px); margin: 0 0 12px; font-weight: 500; letter-spacing: -0.02em; }
.login-subtitle {
  font-size: 15px; color: var(--text-2); margin: 0 0 32px;
}
.login-subtitle a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Override system.css card layout inside login context */
.tk-login #auth-anchor { min-height: 0; display: block; }

/* Form row: "Rester connecté" + "Mot de passe oublié ?" */
.form-row-split {
  display: flex; align-items: center; justify-content: space-between;
  margin: 8px 0 20px; font-size: 14px;
}
.checkbox-label {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-2); cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0;
}
.form-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Tenant options — styled like input-prefix-group */
.tenant-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.tenant-option-btn {
  display: flex;
  align-items: stretch;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  transition: opacity .15s;
}
.tenant-option-btn:hover { opacity: 0.85; }
.tenant-option-btn .input-prefix {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text-3);
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.tenant-option-btn .tenant-option-slug {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-right: none;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  text-align: left;
  display: flex;
  align-items: center;
}
.tenant-option-btn .tenant-option-name {
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-3);
  font-size: 13px;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.tenant-option-btn:not(:has(.tenant-option-name)) .tenant-option-slug {
  border-right: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.tenant-option-btn.active .input-prefix,
.tenant-option-btn.active .tenant-option-slug,
.tenant-option-btn.active .tenant-option-name {
  border-color: var(--accent);
}
.tenant-option-btn.active .tenant-option-slug { color: var(--accent); }

/* Submit button: full-width, large */
.btn-login-submit {
  width: 100%; justify-content: center; padding: 14px 20px; font-size: 16px;
}

.sso-divider { text-align: center; position: relative; margin: 24px 0; }
.sso-divider::before, .sso-divider::after {
  content: ""; position: absolute; top: 50%; width: calc(50% - 28px);
  height: 1px; background: var(--line);
}
.sso-divider::before { left: 0; }
.sso-divider::after  { right: 0; }
.sso-divider span { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); }

/* tenant-choice select needs field styling */
.tenant-choice { margin-bottom: 12px; }

@media (max-width: 860px) {
  .tk-login { grid-template-columns: 1fr; min-height: auto; }
  .tk-login-aside { padding: 32px 24px; }
  .tk-login-form {
    padding: 40px 24px; border-left: 0; border-top: 1px solid var(--line);
  }
  .tk-page { padding: 100px 24px 80px; }
}
@media (max-width: 480px) {
  .tk-login-aside { display: none; }
}

/* ============ ONBOARDING ============ */
.onboarding-steps {
  display: flex; gap: 0; margin-bottom: 48px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.onboarding-step-tab {
  flex: 1; padding: 16px 20px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg-2); transition: background .2s;
}
.onboarding-step-tab:last-child { border-right: none; }
.onboarding-step-tab.active { background: var(--accent); color: var(--accent-ink); }
.onboarding-step-tab .step-n { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: .7; }
.onboarding-step-tab .step-l { font-size: 14px; font-weight: 500; }

.onboarding-panel { display: none; }
.onboarding-panel.active { display: block; }

.plan-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.plan-opt {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: border-color .2s, background .2s;
}
.plan-opt:hover { border-color: var(--accent); }
.plan-opt.selected { border-color: var(--accent); background: oklch(0.66 0.17 38 / 0.08); }
.plan-opt h4 { font-size: 15px; font-weight: 500; margin: 0 0 4px; }
.plan-opt p { font-size: 12px; color: var(--text-3); margin: 0; }
.plan-opt .price { font-family: var(--font-mono); font-size: 20px; font-weight: 500; color: var(--accent); margin-top: 8px; }

/* ============ ONBOARDING PAGE — layout 2026 ============ */

/* Shell & header */
.onboarding-header {
  padding: 120px 48px 80px;
  position: relative;
  overflow: hidden;
}
.onboarding-header::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 70% at 30% 50%, black 20%, transparent 100%);
  opacity: 0.3; pointer-events: none;
}

.onboarding-hero-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 64px; align-items: start; position: relative;
}

/* Override the old multi-step panel hide rule */
.onboarding-hero-grid .onboarding-panel {
  display: block !important;
  position: sticky; top: 84px;
}

/* Left copy */
.onboarding-copy { display: flex; flex-direction: column; }

.eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent); margin: 0 0 20px;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  box-shadow: 0 0 8px oklch(0.66 0.17 38 / 0.6);
}

.onboarding-copy h1 {
  font-size: clamp(34px, 4vw, 56px); line-height: 1.04;
  letter-spacing: -0.03em; font-weight: 500;
  margin: 0 0 20px; text-wrap: balance;
}

.onboarding-lead {
  font-size: 16px; line-height: 1.6;
  color: var(--text-2); margin: 0 0 28px; max-width: 520px;
}

/* Trust chips */
.trust-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; margin-bottom: 28px;
}
.trust-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-2); letter-spacing: 0.02em;
}
.trust-chip svg { flex-shrink: 0; color: var(--accent); width: 14px; height: 14px; }

/* Legal cards */
.legal-grid { display: flex; flex-direction: column; gap: 10px; }
.legal-card {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 18px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); transition: border-color .2s;
}
.legal-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.legal-icon svg { width: 16px; height: 16px; }
.legal-card h3 { font-size: 14px; font-weight: 500; margin: 0 0 4px; }
.legal-card p { font-size: 13px; color: var(--text-2); line-height: 1.5; margin: 0; }

/* Checkout card (right column) */
.checkout-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 24px 60px -16px oklch(0 0 0 / .4);
}
.checkout-head {
  padding: 20px 24px; border-bottom: 1px solid var(--line);
  background: var(--bg-3); display: flex; flex-direction: column; gap: 10px;
}
.stripe-flag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ok); letter-spacing: 0.06em; text-transform: uppercase;
}
.stripe-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); flex-shrink: 0;
  animation: tkPulse 1.8s ease-in-out infinite;
}
.plan-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 3px 9px;
  background: oklch(0.66 0.17 38 / 0.12); color: var(--accent);
  border: 1px solid oklch(0.66 0.17 38 / 0.3); border-radius: 100px;
}
.price-line { display: flex; align-items: baseline; gap: 8px; }
.price {
  font-family: var(--font-mono); font-size: 34px; font-weight: 500;
  color: var(--text); line-height: 1;
}
.price-meta {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-3); letter-spacing: 0.04em;
}

/* Form inside checkout */
.stacked-form {
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.stacked-form label {
  display: block;
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-3); margin-bottom: 5px;
}
.stacked-form input {
  display: block; width: 100%; box-sizing: border-box;
  padding: 11px 14px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font-sans); font-size: 15px;
  transition: border-color .2s;
}
.stacked-form input:focus { outline: none; border-color: var(--accent); }
.slug-preview {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
  margin-top: -8px; padding: 5px 10px;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); letter-spacing: 0.04em;
}
.btn.full, .btn.primary.full { width: 100%; justify-content: center; }
.form-message { font-size: 14px; color: var(--text-2); text-align: center; min-height: 20px; }

/* Payment mentions (bottom of card) */
.payment-mentions {
  padding: 14px 24px 18px; border-top: 1px solid var(--line);
  background: var(--bg-3); display: flex; flex-direction: column; gap: 8px;
}
.payment-logos { display: flex; gap: 6px; flex-wrap: wrap; }
.logo-chip {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 4px; color: var(--text-3);
}

/* Utility */
.muted { color: var(--text-2); }
.small { font-size: 13px !important; line-height: 1.5 !important; }

/* Main section (below fold) */
.onboarding-main {
  max-width: 1280px; margin: 0 auto;
  padding: 64px 48px;
}
.onboarding-details {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line);
}
.details-card {
  background: var(--bg); padding: 32px 28px;
  display: flex; align-items: flex-start; gap: 18px;
  transition: background .2s;
}
.details-card:hover { background: var(--bg-2); }
.detail-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--bg-3); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.detail-icon svg { width: 18px; height: 18px; }
.details-card h3 { font-size: 17px; font-weight: 500; margin: 0 0 10px; }
.details-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.details-card li {
  display: flex; gap: 8px;
  font-size: 14px; color: var(--text-2); line-height: 1.45;
}
.details-card li::before { content: "→"; color: var(--accent); font-family: var(--font-mono); flex-shrink: 0; }

/* Help / CTA strip */
.onboarding-help {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 32px; background: var(--bg-2);
  border: 1px solid var(--line); border-top: none;
}
.onboarding-help h3 { font-size: 20px; font-weight: 500; margin: 0 0 6px; letter-spacing: -0.01em; }
.help-actions { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
.onboarding-shell .btn { display: inline-flex; align-items: center; gap: 8px; }

/* Responsive */
@media (max-width: 1100px) {
  .onboarding-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .onboarding-hero-grid .onboarding-panel { position: static; }
  .onboarding-details { grid-template-columns: 1fr 1fr; }
  .onboarding-help { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 700px) {
  .onboarding-header { padding: 100px 20px 48px; }
  .onboarding-main { padding: 40px 20px; }
  .trust-grid { grid-template-columns: 1fr; }
  .onboarding-details { grid-template-columns: 1fr; }
  .details-card { padding: 24px 20px; }
  .onboarding-help { padding: 24px 20px; }
}

/* ============ MENTIONS LÉGALES / CGU / CONFIDENTIALITÉ ============ */
.legal-content h2 { font-size: 26px; margin: 56px 0 16px; font-weight: 500; }
.legal-content h3 { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin: 32px 0 8px; }
.legal-content p, .legal-content li { color: var(--text-2); font-size: 15px; line-height: 1.65; }
.legal-content ul, .legal-content ol { padding-left: 20px; }
.legal-content a { color: var(--accent); }
.legal-content hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

/* ============ MINI FOOTER (pages secondaires) ============ */
/* Body flex column pour coller le footer en bas */
body:has(.page-footer) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body:has(.page-footer) .page-footer {
  margin-top: auto;
}

.page-footer {
  border-top: 1px solid var(--line); padding: 32px 48px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-3); background: var(--bg-2);
  flex-wrap: wrap; gap: 16px;
}
.page-footer a { color: var(--text-2); text-decoration: none; }
.page-footer a:hover { color: var(--accent); }
.page-footer-links { display: flex; gap: 24px; flex-wrap: wrap; }

@media (max-width: 600px) {
  .page-footer { padding: 24px; flex-direction: column; align-items: flex-start; }
}
