body.home {
  background: var(--bg-gradient);
  color: var(--text);
}

.pb-screen { display: none; }
.pb-screen.active { display: block; }

.pb-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pb-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.pb-card {
  background: var(--container-bg);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
}

.pb-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pb-summary h2 { margin-bottom: 8px; }
.pb-summary ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--toggle-on-gradient);
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.lede { margin-top: 8px; color: var(--muted); line-height: 1.6; }

.pb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.pb-card h3 { margin-bottom: 12px; }
.pb-card .hint { color: var(--muted); font-size: 0.95rem; margin-bottom: 10px; }

.input-row { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.input-row input[type="number"],
.input-row input[type="text"] {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}
.input-row input:disabled { opacity: 0.6; cursor: not-allowed; }

.pb-themes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 8px;
}
.pb-themes label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.pb-letters-mode {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.pb-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.25);
}
.pb-secondary:hover { transform: translateY(-1px); }

.pb-mp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.pb-mp-status { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); }
.pb-mp-list { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; }

.pb-play-card { display: flex; flex-direction: column; gap: 16px; }
.pb-play-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pb-play-meta { display: flex; align-items: center; gap: 12px; }
.pb-letter { width: 56px; height: 56px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; border: 1px solid rgba(255,255,255,0.14); }
.pb-timer { min-width: 90px; padding: 10px 14px; border-radius: 12px; background: var(--timer-gradient); color: #fff; font-weight: 700; text-align: center; }
.pb-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pb-field { display: flex; flex-direction: column; gap: 6px; }
.pb-field input { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: var(--surface); color: var(--text); }
.pb-play-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pb-results { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 10px; color: var(--muted); font-size: 0.95rem; }
.pb-results strong { color: var(--text); }

.pb-review { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.pb-review-item { border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 12px; background: var(--surface); }
.pb-review-item h4 { margin-bottom: 8px; }
.pb-review-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pb-review-vote { display: flex; align-items: center; gap: 8px; }

#pb-final-board { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 900px) {
  .pb-hero { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .pb-themes { grid-template-columns: 1fr; }
}




/* NEW: ces blocs ne sont visibles que sur l'écran setup */
#pb-grid-section,
#pb-actions {
  display: none;
}

/* NEW: visibles uniquement quand on est en setup */
body.pb-view-setup #pb-grid-section,
body.pb-view-setup #pb-actions {
  display: grid; /* pb-grid */
}

body.pb-view-setup #pb-actions {
  display: flex; /* pb-actions */
}