/* Daily — palette inspirée de Wordle/NYT Games. */

:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --border: #d3d6da;
  --text: #1a1a1b;
  --muted: #787c7e;
  --correct: #6aaa64;
  --wrong: #db4040;
  --selected: #3a3a3c;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);

  --serif: "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121213;
    --card: #1f1f20;
    --border: #3a3a3c;
    --text: #f5f5f7;
    --muted: #9aa0a6;
    --selected: #d3d6da;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: 1rem;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem 0;
}

.container--centered {
  min-height: 70vh;
  justify-content: center;
}

/* --- Header --------------------------------------------------------- */
.header {
  text-align: center;
}
.brand {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.title {
  font-family: var(--serif);
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.date {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* --- Message mystère ----------------------------------------------- */
.message-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}
.message-card blockquote {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.6;
  font-style: italic;
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  word-wrap: break-word;
}

/* --- Stats ---------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.875rem 0.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-value {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
}
.stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.35rem;
}

/* --- Result --------------------------------------------------------- */
.result {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  animation: pop 0.35s ease-out;
}
.result h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.result p {
  color: var(--muted);
  font-size: 1rem;
}

/* --- Options (boutons) --------------------------------------------- */
.options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.95rem 1.1rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease,
              background 0.18s ease, color 0.18s ease;
  text-align: left;
}
.option:hover:not(.disabled) {
  border-color: var(--selected);
  transform: translateY(-1px);
}
.option:active:not(.disabled) {
  transform: translateY(0);
}
.option.disabled {
  cursor: default;
  opacity: 0.55;
}
.option.correct {
  background: var(--correct);
  border-color: var(--correct);
  color: #fff;
  opacity: 1;
  animation: pop 0.35s ease-out;
}
.option.wrong {
  background: var(--wrong);
  border-color: var(--wrong);
  color: #fff;
  opacity: 1;
  animation: shake 0.4s ease-out;
}
.option-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* --- Players list --------------------------------------------------- */
.players h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}
.players .count {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  margin-left: 0.25rem;
}
.player-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.player.empty {
  justify-content: center;
  color: var(--muted);
  font-style: italic;
}
.player .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--border);
}
.player .name {
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player .status {
  font-size: 1.15rem;
  flex-shrink: 0;
}
.player.win {
  border-left: 4px solid var(--correct);
}
.player.lose {
  border-left: 4px solid var(--wrong);
}

/* --- Footer --------------------------------------------------------- */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.footer a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Animations ----------------------------------------------------- */
@keyframes pop {
  0%   { transform: scale(0.92); opacity: 0; }
  60%  { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  50%      { transform: translateX(6px); }
  75%      { transform: translateX(-3px); }
}
