/* Style de la boîte SMS : téléphone à bord noir, bulles de couleur, logo fin. Mobile d'abord. Polices et couleurs : base.css. */
* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  font: 18px/1.4 var(--font);
  background: var(--bg);
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}

/* Sur grand écran, le jeu s'affiche dans un téléphone, comme sur la boîte et la règle. */
@media (min-width: 600px) {
  body { padding: 40px 16px; background: var(--page); min-height: 100vh; }
  main {
    position: relative;
    max-width: 430px;
    min-height: 760px;
    padding: 20px 24px 28px;
    border: 16px solid var(--ink);
    border-width: 40px 16px 34px;
    border-radius: 40px;
    background: var(--bg);
    box-shadow: 0 0 0 2px #8a8a8a, 0 16px 40px rgb(0 0 0 / 20%);
  }
  main::before {
    content: "";
    position: absolute;
    top: -24px;
    left: 50%;
    width: 56px;
    transform: translateX(-50%);
    border-top: 4px dotted #555;
  }
}

h1, h2, h3 { margin: 0.4em 0; font-weight: 600; }
p { margin: 0.4em 0; }

/* Accueil : auteurs, logo fin en minuscules, pastilles */
.authors { margin: 18px 0 0; text-align: center; font-family: "Caveat", cursive; font-size: 1.35rem; }
.logo {
  margin: 0;
  text-align: center;
  font-family: var(--logo);
  font-size: 7rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
}
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 6px; margin: 4px 0 14px; }
.tagline { text-align: center; }

/* Pastille en bulle, comme sur la boîte */
.pill {
  position: relative;
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--group, var(--orange));
  color: #fff;
  font-size: 0.9rem;
}
.pill::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: -5px;
  border: 6px solid transparent;
  border-bottom: 0;
  border-top-color: var(--group, var(--orange));
}

.muted { color: var(--muted); font-size: 0.92rem; }
.center { text-align: center; }
.big { font-size: 1.3rem; font-weight: 600; }
.or { text-align: center; color: var(--muted); margin: 4px 0; }
.sep { border: none; border-top: 2px dotted #9cb98a; margin: 6px 0 12px; }
label[for="code"] { margin-bottom: 0; }
.join-row { display: flex; gap: 10px; align-items: center; }
.join-row input { flex: 1; min-width: 0; font-weight: 600; letter-spacing: 0.1em; }
.join-row button { width: auto; margin: 0; padding-inline: 18px; }

/* Encadré vert clair, comme « Matériel / But / Mise en place » dans la règle */
.card {
  background: var(--box);
  border-radius: 18px;
  padding: 14px 16px;
  margin: 14px 0;
}

label { display: block; margin-bottom: 10px; }
label > span { display: block; font-weight: 600; margin-bottom: 4px; }

input, select, textarea, button { font: inherit; }

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

input:focus, select:focus, textarea:focus { outline: 3px solid var(--mark); outline-offset: 0; }
input::placeholder, textarea::placeholder { color: #a5a5a5; }

textarea { resize: none; font-size: 1.4rem; }
textarea.forbidden { border-color: var(--danger); color: var(--danger); background: #fdebef; }

button {
  display: block;
  width: 100%;
  padding: 11px 16px;
  margin: 10px 0;
  border: none;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
}

button:active { filter: brightness(0.9); }
button:disabled { background: #d6d6d6; color: var(--muted); cursor: not-allowed; }
button.secondary { background: var(--bleu); }
button.link {
  background: none;
  color: var(--bleu);
  text-decoration: underline;
  font-weight: 400;
}

.row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.row button { width: auto; margin: 0; }
.reason { color: var(--danger); font-size: 0.95rem; font-weight: 600; }
.warn { color: #9a4d00; background: #fff1dc; border-radius: 10px; padding: 6px 10px; margin: 0 0 10px; font-size: 0.95rem; }
.count { color: var(--muted); font-size: 0.95rem; margin-left: auto; white-space: nowrap; }

.players { list-style: none; margin: 0; padding: 0; }
.players li { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid #c8dcbb; font-weight: 600; }
.players li:last-child { border-bottom: none; }
.players .tag { margin-left: auto; }
.tag { color: var(--muted); font-size: 0.85rem; font-weight: 400; }

/* Rappel des interdits : encadré rose à têtes de mort, au survol, au toucher ou au clavier. */
.word-label { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-weight: 600; }
.tip { position: relative; display: inline-block; }
.tip-btn {
  width: 24px; height: 24px; padding: 0; margin: 0;
  border: 2px solid var(--pink); border-radius: 50%;
  background: #fff; color: var(--pink);
  font-size: 0.85rem; line-height: 20px;
}
.tip-box {
  display: none;
  position: absolute; z-index: 10; top: calc(100% + 8px); left: -40px;
  width: min(280px, 80vw);
  padding: 10px 12px;
  border: 2px solid var(--pink); border-radius: 14px;
  background: #fff; color: var(--pink);
  font-size: 0.95rem; font-weight: 400; text-align: left;
  box-shadow: 0 6px 16px rgb(0 0 0 / 12%);
}
.tip:hover .tip-box, .tip:focus-within .tip-box { display: block; }
.tip-box strong, .tip-item, .tip-note { display: block; }
.tip-box strong::after { content: " ☠☠☠"; letter-spacing: 2px; }
.tip-item { margin-top: 4px; padding-left: 12px; text-indent: -12px; }
.tip-item::before { content: "– "; }
.tip-note { margin-top: 6px; color: var(--muted); }

/* Règles du jeu (accueil) */
#help-open { display: block; margin: 8px auto 0; width: auto; }
.help {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 18px 20px;
  border: 10px solid var(--ink);
  border-radius: 28px;
  background: var(--bg); color: var(--ink);
}
.help::backdrop { background: rgb(20 20 20 / 55%); }
.help h2 { font-family: var(--logo); font-weight: 400; font-size: 2rem; }
.help h3 { font-size: 1.1rem; margin-top: 1em; }
.help ul {
  margin: 0.4em 0; padding: 8px 12px 8px 28px;
  border: 2px solid var(--pink); border-radius: 14px; color: var(--pink);
}
.help li { margin: 0.2em 0; }
.help form { margin-top: 14px; }
