/* ─── TRIFORMS — Theme & Brand ────────────────────────────────────────────── */

/* ─── Logo SVG inline ─────────────────────────────────────────────────────── */
.tf-logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  font-size: 1.375rem;
  text-decoration: none;
  color: var(--text);
}
.tf-logo span.brand { color: var(--primary); }
.tf-logo .dot       { color: var(--accent); }

/* ─── Landing hero ────────────────────────────────────────────────────────── */

.hero {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  background: linear-gradient(135deg, #f0f1ff 0%, #fdf2f8 100%);
}
.hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1.25rem; }
.hero h1 em { color: var(--primary); font-style: normal; }
.hero p { font-size: 1.125rem; max-width: 540px; margin: 0 auto 2.5rem; }

/* ─── Type cards (form-new.html) ──────────────────────────────────────────── */

.type-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.75rem;
  cursor: pointer;
  transition: var(--t);
  text-align: center;
}
.type-card:hover   { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.type-card.active  { border-color: var(--primary); background: var(--primary-light); }
.type-card .type-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.type-card h4      { margin-bottom: .5rem; }
.type-card p       { font-size: .875rem; }
.type-card .type-badge { margin-top: .75rem; }

/* ─── Form response page ──────────────────────────────────────────────────── */

.form-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.form-header .tf-logo { font-size: 1rem; }

.form-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.form-card-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.form-card-header h1 { font-size: 1.5rem; margin-bottom: .5rem; }
.form-card-body { padding: 2rem; }
.form-card-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.question-block {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--bg-2);
}
.question-block:last-child { border-bottom: none; }
.question-title { font-size: 1rem; font-weight: 500; margin-bottom: .875rem; color: var(--text); }
.question-title .req { color: var(--danger); margin-left: .2rem; }
.question-hint  { font-size: .8125rem; color: var(--text-2); margin-bottom: .75rem; }

/* ─── Dashboard form card ─────────────────────────────────────────────────── */

.form-list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--t);
}
.form-list-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.form-list-card .form-icon {
  width: 2.75rem; height: 2.75rem;
  background: var(--primary-light);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.form-list-card .form-info { flex: 1; min-width: 0; }
.form-list-card .form-name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-list-card .form-meta { font-size: .8125rem; color: var(--text-2); margin-top: .2rem; }
.form-list-card .form-actions { display: flex; gap: .5rem; flex-shrink: 0; }

/* ─── Builder split view ──────────────────────────────────────────────────── */

.builder-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  height: calc(100vh - 57px);
}
.builder-canvas {
  padding: 1.5rem;
  overflow-y: auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.builder-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 1.5rem;
}
.builder-panel h4 { margin-bottom: 1.25rem; }

.add-field-btn {
  border: 2px dashed var(--border);
  background: none;
  border-radius: var(--r-lg);
  padding: 1rem;
  width: 100%;
  cursor: pointer;
  color: var(--text-2);
  font-size: .875rem;
  transition: var(--t);
  display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.add-field-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ─── Results charts ──────────────────────────────────────────────────────── */

.chart-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
}
.chart-bar .bar-label { width: 160px; font-size: .875rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-bar .bar-track  { flex: 1; height: 1.5rem; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.chart-bar .bar-fill   { height: 100%; background: var(--primary); border-radius: 4px; transition: width .5s ease; }
.chart-bar .bar-count  { width: 60px; text-align: right; font-size: .875rem; font-weight: 600; color: var(--text); }

/* ─── Vote3D dans le formulaire ───────────────────────────────────────────── */

.vote3d-axes { display: flex; flex-direction: column; gap: 1.25rem; }
.axis-block label { font-size: .9rem; font-weight: 600; color: var(--text); margin-bottom: .5rem; display: block; }
.axis-btns { display: flex; gap: .5rem; }
.axis-btn {
  flex: 1; padding: .75rem .5rem;
  border: 2px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  font-size: .9rem; font-weight: 600;
  text-align: center;
  transition: var(--t);
  color: var(--text-2);
}
.axis-btn:hover { border-color: var(--primary); color: var(--primary); }
.axis-btn.sel-x { border-color: var(--x-color) !important; background: rgba(77,136,255,.1); color: var(--x-color); }
.axis-btn.sel-y { border-color: var(--y-color) !important; background: rgba(51,201,132,.1); color: var(--y-color); }
.axis-btn.sel-z-pos { border-color: var(--y-color) !important; background: rgba(51,201,132,.1); color: var(--y-color); }
.axis-btn.sel-z-neg { border-color: var(--danger) !important; background: rgba(239,68,68,.1); color: var(--danger); }
.axis-btn.sel-z-neu { border-color: var(--text-3) !important; background: var(--bg-2); color: var(--text-2); }

.intention-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.intention-btn {
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: var(--t);
  font-size: .9rem; font-weight: 600;
  color: var(--text-2);
}
.intention-btn:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.intention-btn.sel-human  { border-color: var(--human); background: rgba(232,66,122,.08); color: var(--human); }
.intention-btn.sel-money  { border-color: var(--money); background: rgba(51,201,132,.08); color: var(--money); }
.intention-btn.sel-chaos  { border-color: var(--chaos); background: rgba(245,166,35,.08); color: var(--chaos); }
.intention-btn.sel-philosophy { border-color: var(--philosophy); background: rgba(155,89,182,.08); color: var(--philosophy); }

/* ─── Responsive builder ──────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .builder-layout { grid-template-columns: 1fr; height: auto; }
  .builder-panel  { border-left: none; border-top: 1px solid var(--border); }
}

/* ─── Auth card ───────────────────────────────────────────────────────────── */

.auth-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
}
.auth-logo   { text-align: center; margin-bottom: 2rem; }
.auth-title  { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: .5rem; }
.auth-sub    { text-align: center; color: var(--text-2); margin-bottom: 2rem; font-size: .9375rem; }
.auth-form   { display: flex; flex-direction: column; gap: 1.25rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: .875rem; color: var(--text-2); }
