/* =========================================================
   Ḥalqa en ligne — styles en plus de style.css
   ========================================================= */

/* Bandeau de connexion perdue */
.netbar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 60;
  background: var(--ko);
  color: #fff;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  padding-top: max(8px, env(safe-area-inset-top));
}

/* Accueil */
.home {
  max-width: 540px;
  margin: 0 auto;
  padding-top: 20px;
  display: grid;
  gap: 16px;
}
@media (min-width: 960px) {
  .home {
    padding-top: 40px;
  }
}
.joincard .label {
  margin: 18px 0 8px;
}
.joincard .label:first-child {
  margin-top: 0;
}
.joinrow,
.linkrow {
  display: flex;
  gap: 8px;
}
.joinrow .btn,
.linkrow .btn {
  flex: none;
}
.code-input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-weight: 700;
  text-align: center;
}
.code-input::placeholder {
  letter-spacing: 0.2em;
  font-weight: 600;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 20px 0;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.hint-text {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}
/* Arrivé par un lien d'invitation : « Rejoindre » passe en avant, « Créer » en retrait */
.joincard.invited #joinBtn {
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  color: var(--cta-ink);
  border: none;
}
.joincard.invited #createBtn {
  background: var(--surface2);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

/* Lobby */
.bigcode {
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(48px, 12vw, 64px);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold);
  line-height: 1;
  margin: 2px 0 10px;
}
.linkrow input {
  font-size: 14px;
  color: var(--ink2);
}
.plist {
  display: grid;
  gap: 8px;
}
.prow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sunken);
}
.prow b {
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prow.off {
  opacity: 0.55;
}
.prow .kick {
  margin-left: auto;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 18px;
  display: grid;
  place-items: center;
}
.prow .kick:hover {
  background: var(--kobg);
  color: var(--ko);
}
.badge {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}
.badge.host {
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
}
.badge.me {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.lobbyacts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.lobbyacts #leaveBtn {
  margin-left: auto;
}
.watchlink {
  display: block;
  margin: 10px auto 0;
}
.prow.watch b {
  color: var(--muted);
}
.waitnote {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.waitnote.left {
  text-align: left;
}
.waitnote:empty {
  display: none;
}
.revfoot #nextBtn {
  margin-left: auto;
}
#endNote {
  margin-top: 14px;
}
/* Règles en lecture seule pour les joueurs qui ne sont pas l'hôte */
.readonly .seg,
.readonly .cats,
.readonly .acts {
  pointer-events: none;
}
.readonly .opt:not(.on),
.readonly .cat-chip:not(.on) {
  opacity: 0.5;
}
.readonly .opt:not(.small)::after {
  display: none;
}

/* Partie */
.topacts {
  display: flex;
  gap: 6px;
  flex: none;
}
@media (max-width: 520px) {
  #codePill {
    display: none;
  }
}
.qcard.myturn {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent),
    0 18px 40px -20px var(--accent);
}
.turn .you {
  color: var(--accent);
  font-size: 17px;
}
.thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.thinking i {
  display: inline-flex;
  gap: 4px;
}
.thinking i::before,
.thinking i::after,
.thinking i span {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.2s infinite ease-in-out;
}
.thinking i span {
  animation-delay: 0.2s;
}
.thinking i::after {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}
.ps .me {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
}
.ps.off {
  opacity: 0.5;
}
.ps.off .sc span.jk::after {
  content: " · absent";
  color: var(--muted);
}

/* Page /culture (culture générale) : petit surtitre à la place de la ligne en arabe */
.hero .kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e9c274;
}
