:root {
  --fond: #10151f;
  --carte: #1b2331;
  --texte: #f3f5f9;
  --doux: #9aa6b8;
  --accent: #f2b233;
  --ok: #2fbf71;
  --non: #e5484d;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --fond: #f4f6fa;
  --carte: #ffffff;
  --texte: #141a24;
  --doux: #5b6576;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}

#jeu {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px;
  overflow: auto;
}

header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

h1 { margin: 0; font-size: 20px; letter-spacing: 0.04em; }
#manche { color: var(--doux); font-size: 14px; }

.message {
  margin: 4px 0;
  text-align: center;
  font-size: clamp(16px, 4vmin, 26px);
  font-weight: 600;
  min-height: 1.4em;
}

#zone-joueur { display: flex; flex-direction: column; align-items: center; gap: 6px; }
#zone-joueur[hidden], #zone-maitre[hidden] { display: none; }

#buzz {
  width: clamp(140px, 42vmin, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.15);
  background: var(--non);
  color: #fff;
  font: 800 clamp(26px, 9vmin, 56px) system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 0 #8f2226;
  transition: transform 60ms, box-shadow 60ms, filter 120ms;
}
#buzz:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 2px 0 #8f2226; }
#buzz:disabled { filter: grayscale(0.85) brightness(0.6); cursor: default; }
#buzz.gagne, #buzz.gagne:disabled { background: var(--ok); box-shadow: 0 8px 0 #1b7a47; filter: none; }

.aide { margin: 0; color: var(--doux); font-size: 13px; }

#zone-maitre { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.commandes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

#zone-maitre button {
  padding: 10px 16px;
  border-radius: 8px;
  border: 0;
  background: var(--accent);
  color: #1a1300;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
#zone-maitre button.ok { background: var(--ok); color: #fff; }
#zone-maitre button.non { background: var(--non); color: #fff; }
#zone-maitre button.discret { background: transparent; color: var(--doux); text-decoration: underline; font-weight: 500; }
#zone-maitre button:disabled { opacity: 0.35; cursor: default; }

#classement {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#classement li {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--carte);
}
#classement li.moi { outline: 2px solid var(--accent); }
#classement li.hors-ligne { opacity: 0.5; }
#classement li.main { background: color-mix(in srgb, var(--ok) 35%, var(--carte)); }
#classement li.exclu { text-decoration: line-through; }

#bandeau {
  position: fixed;
  left: 0; right: 0; top: 0;
  padding: 8px 12px;
  background: #5b3b00;
  color: #ffe2a8;
  text-align: center;
  font-weight: 600;
}
