/* Daily Tier : styles, pensés d'abord pour le téléphone. */

:root {
  --bg: #1a1625;
  --surface: #252034;
  --surface-2: #2f2942;
  --text: #f4f1fa;
  --muted: #b3aac6;
  --accent: #a78bfa;
  --accent-text: #1a1625;
  --border: #3b3452;
  --danger: #ff8787;
  --ok: #69db7c;
  --wait: #ffd43b;
  --tier-s: #ff6b6b;
  --tier-a: #ffa94d;
  --tier-b: #ffd43b;
  --tier-c: #69db7c;
  --tier-d: #74c0fc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.5;
}

a { color: var(--accent); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.topbar .brand { color: var(--text); font-weight: 700; text-decoration: none; }
.topbar .links { display: flex; align-items: center; gap: 16px; }
.topbar form { margin: 0; }

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
}

.hero { text-align: center; padding: 48px 0 24px; }
.hero h1 { font-size: 2.2rem; margin: 0 0 8px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 16px;
  margin-bottom: 16px;
}
.card.highlight { border-color: var(--accent); }
.card h1 { font-size: 1.5rem; margin: 0 0 8px; }
.card h2 { font-size: 1.2rem; margin: 0 0 8px; }

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.tiers {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 24px 0;
  font-weight: 800;
  font-size: 1.5rem;
}
.S { color: var(--tier-s); } .A { color: var(--tier-a); } .B { color: var(--tier-b); }
.C { color: var(--tier-c); } .D { color: var(--tier-d); }

.form { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.form .hint { font-weight: 400; }

input, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* évite le zoom automatique sur iPhone */
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; margin: 8px 0 12px; }

.button {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: var(--accent-text);
  background: var(--accent);
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  cursor: pointer;
}
.button.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.hero .button { margin-top: 8px; }

.linkish {
  font: inherit;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.row { display: flex; gap: 10px; flex-wrap: wrap; }

.greeting { margin: 4px 0 12px; }

.event .day-label {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.event h1 { font-size: 1.45rem; }
.event .story { margin: 12px 0; }
.event .question { font-weight: 700; font-size: 1.1rem; margin: 16px 0 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.countdown { text-align: center; }
.countdown p { margin: 0; }
.countdown .timer { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }

.flash { border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.flash.error { background: rgba(255, 135, 135, 0.12); color: var(--danger); }
.flash.ok { background: rgba(105, 219, 124, 0.12); color: var(--ok); }

.players { list-style: none; margin: 0; padding: 0; }
.player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.player:first-child { border-top: none; }
.player-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.player-actions form { margin: 0; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--surface-2);
  color: var(--muted);
}
.badge.ok { color: var(--ok); }
.badge.wait { color: var(--wait); }
.badge.off { color: var(--danger); }
