:root {
  --grad: linear-gradient(135deg, #7b2ff7 0%, #f107a3 55%, #ff9f43 100%);
  --bg: #fdf4ff;
  --card: #ffffff;
  --text: #2d1b4e;
  --muted: #8a7aa8;
  --line: #efe6fb;
  --soft: #f6effe;
  --accent: #7b2ff7;
  --pink: #f107a3;
  --good: #10ac84;
  --danger: #ee5253;
  --shadow: 0 2px 10px rgba(80, 30, 140, 0.07);
  --border: #ebe0f8;
  --accent-text: #6a1fe0;
  --radius: 20px;
}

/* Mode sombre : fond plus profond, cartes nettement plus claires + bordure, pour bien délimiter. */
/* Mode sombre (activé par le bouton 🌙) */
:root[data-theme="dark"] {
    --bg: #0e0719;
    --card: #1d1330;
    --text: #f7f2ff;
    --muted: #b6a7d4;
    --line: #31244b;
    --soft: #2a1d43;
    --border: #3a2b59;
    --accent: #a77bff;
    --accent-text: #c4a5ff;
    --shadow: none;
  }



* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: 'Fredoka', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

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

button { cursor: pointer; border: 0; background: none; }

/* ---------- Écran de connexion ---------- */

.auth {
  min-height: 100vh;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 28px;
  padding: 28px 22px;
  box-shadow: 0 20px 60px rgba(40, 0, 80, 0.35);
}

.logo {
  text-align: center;
  font-size: 2.3rem;
  font-weight: 700;
  margin: 0;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-emoji { font-size: 3.2rem; text-align: center; display: block; animation: bob 2.4s ease-in-out infinite; }

@keyframes bob { 50% { transform: translateY(-6px) rotate(-6deg); } }

.tagline { text-align: center; color: var(--muted); margin: 4px 0 20px; }

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--soft);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 18px;
}

.seg button {
  padding: 10px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--muted);
}

.seg button.on { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }

label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: 0.95rem; }

.input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: var(--soft);
  outline: none;
  transition: border-color 0.15s;
}

.input:focus { border-color: var(--accent); }

textarea.input { resize: vertical; min-height: 90px; }

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
}

.emoji-grid button {
  font-size: 1.35rem;
  padding: 0;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--soft);
  transition: transform 0.1s;
}

.emoji-grid button.on { background: var(--grad); transform: scale(1.08); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.1s, opacity 0.15s;
}

.btn:active { transform: scale(0.96); }

.btn:disabled { opacity: 0.5; cursor: default; }

.btn-main { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(241, 7, 163, 0.35); }

.btn-block { width: 100%; margin-top: 20px; font-size: 1.1rem; }

.btn-soft { background: var(--soft); color: var(--accent); }

.btn-small { padding: 7px 14px; font-size: 0.88rem; }

.btn-danger { color: var(--danger); }

.error { color: var(--danger); font-weight: 500; min-height: 1.3em; margin: 10px 0 0; text-align: center; }

/* ---------- Mise en page principale ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--grad);
  color: #fff;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(123, 47, 247, 0.3);
}

.top h1 { margin: 0; font-size: 1.5rem; font-weight: 700; }

.me-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.22);
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
}

.me-chip .avatar { width: 32px; height: 32px; font-size: 1.1rem; }

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

.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.nav-inner {
  pointer-events: auto;
  display: flex;
  gap: 4px;
  background: var(--card);
  padding: 6px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(40, 0, 80, 0.25);
  width: 100%;
  max-width: 420px;
}

.nav button {
  flex: 1;
  padding: 10px 6px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 0.8rem;
  position: relative;
}

.nav button .ico { font-size: 1.35rem; line-height: 1; }

.nav button.on { background: var(--grad); color: #fff; }

.badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 26px);
  background: #ff3b30;
  color: #fff;
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid var(--card);
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 22px 4px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title:first-child { margin-top: 4px; }

.section-title .count {
  background: var(--soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 0.85rem;
}

/* ---------- Cartes de sondage ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  animation: pop 0.25s ease-out;
}

@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

.card.todo { border: 2px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; }

.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.meta .avatar { width: 24px; height: 24px; font-size: 0.85rem; }

.pill {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--soft);
  color: var(--accent);
}

.pill.closed { background: #ffe8e8; color: var(--danger); }

/* Mode sombre (activé par le bouton 🌙) */
[data-theme="dark"] .pill.closed { background: #4a1e2e; } 


.question { font-size: 1.3rem; font-weight: 600; line-height: 1.3; margin: 0 0 14px; word-wrap: break-word; }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}

.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: 18px;
  background: var(--soft);
  font-weight: 500;
  font-size: 0.9rem;
  transition: transform 0.12s, background 0.12s;
  min-width: 0;
}

.choice span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.choice:hover { transform: translateY(-2px); }

.choice:active { transform: scale(0.94); }

.choice .avatar { width: 48px; height: 48px; font-size: 1.6rem; }

.results { display: flex; flex-direction: column; gap: 8px; }

.result {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border-radius: 16px;
  background: var(--soft);
  overflow: hidden;
}

.result .bar {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 16px;
  opacity: 0.28;
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.result > *:not(.bar) { position: relative; }

.result .avatar { width: 36px; height: 36px; font-size: 1.15rem; }

.result .name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.result .votes { font-weight: 700; font-variant-numeric: tabular-nums; }

.result .pct { color: var(--muted); font-size: 0.85rem; width: 42px; text-align: right; font-variant-numeric: tabular-nums; }

.result.mine { outline: 2px dashed var(--accent); outline-offset: -2px; }

.crown { font-size: 1.1rem; }

.foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.voters { display: flex; align-items: center; color: var(--muted); font-size: 0.85rem; gap: 8px; margin-right: auto; }

.stack { display: flex; }

.stack .avatar { width: 26px; height: 26px; font-size: 0.85rem; border: 2px solid var(--card); margin-left: -8px; }

.stack .avatar:first-child { margin-left: 0; }

.empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
}

.empty .big { font-size: 3rem; display: block; margin-bottom: 8px; }

/* ---------- Création ---------- */

.prefixes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }

.chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
}

.chip:active { transform: scale(0.95); }

.suggest-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

.suggest-list button {
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--soft);
  font-weight: 500;
}

.row { display: flex; gap: 10px; margin-top: 16px; }

.row .btn { flex: 1; }

.hint { color: var(--muted); font-size: 0.85rem; text-align: right; margin-top: 4px; }

/* ---------- Classement ---------- */

.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 8px;
  margin: 8px 0 20px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  min-width: 0;
}

.step .avatar { width: 56px; height: 56px; font-size: 1.8rem; box-shadow: var(--shadow); }

.step .name { font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.step .block {
  width: 100%;
  border-radius: 16px 16px 6px 6px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
  display: grid;
  place-items: center;
}

.step.p1 .block { height: 110px; }
.step.p2 .block { height: 80px; opacity: 0.85; }
.step.p3 .block { height: 60px; opacity: 0.7; }

.friend {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.friend-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

.friend-name { font-weight: 700; font-size: 1.1rem; }

.friend-stats { color: var(--muted); font-size: 0.85rem; }

.titles { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }

.titles li {
  background: var(--soft);
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 0.92rem;
}

.titles li::before { content: '🏅 '; }

/* ---------- Profil ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translate(-50%, 20px);
  background: #2d1b4e;
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
  max-width: calc(100% - 32px);
  text-align: center;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.confetti {
  position: fixed;
  top: -20px;
  font-size: 1.4rem;
  pointer-events: none;
  z-index: 60;
  animation: fall linear forwards;
}

@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* ---------- v2 : éléments communs ---------- */

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

.avatar.sm { width: 30px; height: 30px; font-size: 1rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 2.8rem; margin: 0 auto; }

.info {
  background: var(--soft);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.92rem;
  margin: 8px 0 4px;
}

.choice.picked { outline: 2px solid var(--accent); background: var(--card); }

.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}

.set-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.set-badge.spicy { background: #ffe3ef; color: #d6006f; }

.byline { color: var(--muted); font-size: 0.8rem; margin-top: 10px; }

.next-drop {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  background: var(--card);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.fab {
  position: fixed;
  right: max(16px, calc(50% - 284px));
  bottom: calc(96px + env(safe-area-inset-bottom));
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(241, 7, 163, 0.45);
  z-index: 11;
  transition: transform 0.12s;
}

.fab:active { transform: scale(0.92); }

.back { color: var(--accent); font-weight: 600; padding: 4px 2px 12px; }

.row .btn:only-child { flex: 1; }

.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; min-width: 0; }

.toggle { display: flex; align-items: center; gap: 10px; margin-top: 16px; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--pink); }

select.input { appearance: auto; }

.filter-row { margin-bottom: 14px; }

/* ---------- Feuille du bas ---------- */

.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap[hidden] { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(20, 5, 40, 0.5); animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }

.sheet {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 26px 26px 0 0;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  animation: up 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes up { from { transform: translateY(40px); opacity: 0; } }

.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; font-size: 1.35rem; }
.x { font-size: 1.2rem; color: var(--muted); padding: 6px 10px; }

body.noscroll { overflow: hidden; }

.set-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.chip.on { background: var(--grad); color: #fff; }
.chip.spicy:not(.on) { background: #ffe3ef; color: #d6006f; }

.or { text-align: center; color: var(--muted); margin: 16px 0 8px; font-size: 0.9rem; }

/* ---------- Sets ---------- */

.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }

.set-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  background: var(--card);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.12s;
  min-width: 0;
}

.set-card:active { transform: scale(0.97); }
.set-card.spicy { background: linear-gradient(160deg, #ff2d78 0%, #a1006b 100%); color: #fff; }
.set-card.spicy .set-count, .set-card.spicy .set-tag { color: rgba(255, 255, 255, 0.85); }

.set-emoji { font-size: 2rem; line-height: 1.1; }
.set-emoji.big { font-size: 3rem; }
.set-name { font-weight: 700; font-size: 1.02rem; line-height: 1.2; }
.set-count { color: var(--muted); font-size: 0.8rem; }
.set-tag { color: var(--muted); font-size: 0.75rem; font-style: italic; }

.set-hero { text-align: center; }
.set-hero.spicy { border: 2px solid #ff2d78; }

.qlist { padding: 6px 14px; }
.qrow {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.qrow:last-child { border-bottom: 0; }
.qrow .small { flex-shrink: 0; }

/* ---------- Stats ---------- */

.player-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin: 0 -16px 4px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: none;
}
.player-strip::-webkit-scrollbar { display: none; }

.strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 16px;
  min-width: 72px;
  max-width: 90px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}
.strip-item span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-item.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

.radar-card { text-align: center; }
.radar-title { display: flex; align-items: center; gap: 10px; text-align: left; }
.radar { width: 100%; max-width: 340px; margin: 4px auto 0; display: block; overflow: visible; }
.radar-ring { fill: none; stroke: var(--line); stroke-width: 1.5; }
.radar-axis { stroke: var(--line); stroke-width: 1; }
.radar-shape { stroke-width: 2.5; stroke-linejoin: round; }
.radar-compare { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 4; }
.radar-emoji { font-size: 18px; }
.radar-label { font-size: 11px; font-weight: 600; fill: var(--muted); font-family: inherit; }

.legend { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 0.8rem; }
.legend .dash { width: 20px; border-top: 2px dashed var(--muted); }

.title-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.title-chip {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}
.title-chip.low { background: var(--soft); color: var(--accent); }

.titles-board { padding: 8px 14px; }
.title-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.title-row:last-child { border-bottom: 0; }
.title-row .name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rank-card { padding: 14px 16px; }
.rank-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rank-emoji { font-size: 1.3rem; }
.rank-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.rank-pos { width: 22px; text-align: center; font-weight: 700; color: var(--muted); }
.rank-row .name { width: 90px; font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { flex: 1; height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.rank-bar span { display: block; height: 100%; border-radius: 999px; }
.rank-val { width: 30px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.9rem; }

/* ---------- Admin ---------- */

.roster { display: flex; flex-direction: column; }
.roster-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.roster-row:last-child { border-bottom: 0; }
.roster-row .name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.status.on { background: #d8f7ec; color: var(--good); }
.icon-btn { padding: 4px 6px; border-radius: 10px; font-size: 1rem; }
.icon-btn:hover { background: var(--soft); }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.settings-grid label, .card > label:has(.input) { font-size: 0.85rem; }
.settings-grid .input, label > .input { margin-top: 6px; }

/* ---------- Chat ---------- */

.avatar.xs { width: 20px; height: 20px; font-size: 0.7rem; }

.live-seg { margin-bottom: 12px; }

.poll-chat {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--soft);
}
.pc-line { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; margin-bottom: 5px; min-width: 0; }
.pc-line b { flex-shrink: 0; }
.pc-line span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.pc-open { color: var(--accent); font-weight: 600; font-size: 0.88rem; }
.pc-new { background: var(--pink); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 0.75rem; margin-left: 4px; }

.threads { padding: 4px 6px; }
.thread {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}
.thread:last-child { border-bottom: 0; }
.thread-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.thread-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.thread-title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.thread-last { color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread.unread .thread-title, .thread.unread .thread-last { color: var(--text); font-weight: 700; }
.thread-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.thread-badge { background: var(--pink); color: #fff; font-size: 0.75rem; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }

.chat-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 100dvh;
  z-index: 45;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
}
.chat-overlay[hidden] { display: none; }

.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: var(--grad);
  color: #fff;
  flex-shrink: 0;
}
.chat-back { color: #fff; font-size: 1.5rem; padding: 4px 10px 4px 2px; }
.chat-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.chat-title b { font-size: 1.02rem; }
.chat-title span { font-size: 0.8rem; opacity: 0.85; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.chat-list { flex: 1; overflow-y: auto; padding: 10px 12px 6px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.chat-empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.chat-older { display: block; margin: 0 auto 10px; color: var(--accent); font-weight: 600; font-size: 0.85rem; padding: 6px 12px; }
.chat-day { text-align: center; color: var(--muted); font-size: 0.78rem; font-weight: 600; margin: 14px 0 8px; text-transform: capitalize; }

.msg { display: flex; align-items: flex-end; gap: 6px; margin-top: 2px; }
.msg.first { margin-top: 10px; }
.msg.mine { justify-content: flex-end; }
.msg .avatar, .avatar-space { width: 28px; height: 28px; font-size: 0.9rem; flex-shrink: 0; }
.msg-body { display: flex; flex-direction: column; max-width: 78%; min-width: 0; }
.msg.mine .msg-body { align-items: flex-end; }
.msg-name { font-size: 0.75rem; font-weight: 600; color: var(--muted); margin: 0 0 2px 10px; }
.msg-time { font-size: 0.7rem; color: var(--muted); margin: 2px 8px 0; }

.bubble {
  padding: 8px 13px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(40, 0, 80, 0.08);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  font-size: 0.97rem;
  line-height: 1.35;
}
.msg:not(.first) .bubble { border-top-left-radius: 6px; }
.msg:not(.last) .bubble { border-bottom-left-radius: 6px; }
.msg.mine .bubble { background: var(--grad); color: #fff; border-radius: 18px; }
.msg.mine:not(.first) .bubble { border-top-right-radius: 6px; }
.msg.mine:not(.last) .bubble { border-bottom-right-radius: 6px; }
.bubble.gif { padding: 0; background: none !important; box-shadow: none; overflow: hidden; border-radius: 14px !important; }
.bubble.gif img { display: block; max-width: min(240px, 100%); height: auto; border-radius: 14px; }
.bubble.deleted { background: none !important; color: var(--muted) !important; border: 1px dashed var(--line); box-shadow: none; }
.bubble[data-delmsg] { cursor: pointer; }

.read-row { display: flex; gap: 2px; margin: 3px 0 0 34px; }
.read-row.mine { justify-content: flex-end; margin-left: 0; }
.read-row .avatar { border: 1.5px solid var(--bg); }

.chat-typing { min-height: 22px; padding: 0 16px 4px; font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.chat-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.chat-input textarea {
  flex: 1;
  resize: none;
  border: 0;
  outline: none;
  background: var(--soft);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 1rem;
  line-height: 1.35;
  max-height: 120px;
}
.gif-btn {
  font-weight: 700;
  font-size: 0.8rem;
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 10px;
  padding: 5px 7px;
  margin-bottom: 5px;
}
.gif-btn.on { background: var(--accent); color: #fff; }
.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.gif-panel { background: var(--card); border-top: 1px solid var(--line); padding: 10px; height: 42%; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.gif-panel[hidden] { display: none; }
.gif-grid { flex: 1; overflow-y: auto; columns: 2; column-gap: 6px; }
.gif-item { display: block; width: 100%; margin-bottom: 6px; break-inside: avoid; border-radius: 10px; overflow: hidden; background: var(--soft); }
.gif-item img { display: block; width: 100%; height: auto; }
.gif-msg { column-span: all; text-align: center; padding: 20px; }
.gif-credit { font-size: 0.7rem; color: var(--muted); text-align: right; }

/* ---------- Bannière d'installation ---------- */

.install-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 2px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box;
  border-radius: 18px;
  padding: 10px 8px 10px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.ib-icon { font-size: 1.6rem; }
.ib-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.85rem; color: var(--muted); }
.ib-text b { color: var(--text); font-size: 0.98rem; }
.install-banner .x { padding: 4px 6px; }

.steps { padding-left: 22px; margin: 6px 0 10px; line-height: 1.5; }
.steps li { margin-bottom: 8px; }
.share-ico { display: inline-block; transform: rotate(-90deg); }

/* ---------- Groupes & codes ---------- */

.seg-3 { grid-template-columns: 1fr 1fr 1fr; }
.seg-3 button { padding: 10px 4px; font-size: 0.92rem; }

.code-input { text-transform: uppercase; letter-spacing: 0.18em; font-weight: 600; }
.code-input::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; }

.link { color: var(--accent); font-weight: 600; text-decoration: underline; padding: 0; }

.big-code {
  text-align: center;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 18px 0 18px 0.2em;
  margin: 10px 0 4px;
  border-radius: 20px;
  background: var(--soft);
  color: var(--accent);
  user-select: all;
}

.group-code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.code-pill {
  font-weight: 700;
  letter-spacing: 0.15em;
  background: var(--soft);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 12px;
  user-select: all;
}

.top h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 10px; }

/* Mode sombre (activé par le bouton 🌙) */
[data-theme="dark"] .set-badge.spicy, [data-theme="dark"] .chip.spicy:not(.on) { background: #4a1530; color: #ff7ab8; }
[data-theme="dark"] .status.on { background: #133d31; }



@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Mise en page épurée (v3) : cartes bien délimitées, moins de décor.
   Ces règles passent après les précédentes et les remplacent.
   ===================================================================== */

main { padding-top: 14px; }

.card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: none;
  margin-bottom: 16px;
}

/* Titres de section : petits, discrets */
.section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 22px 4px 10px;
}
.section-title .count { background: none; color: var(--muted); padding: 0; font-size: inherit; }
.section-title .count::before { content: '· '; }

.seg { border: 1px solid var(--border); background: var(--soft); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.live-seg { margin-bottom: 8px; }

.next-line { margin: 0 4px 6px; font-size: 0.85rem; color: var(--muted); }
.next-line b { color: var(--text); }
.all-done { text-align: center; color: var(--muted); margin: 18px 0 4px; }

/* ---------- Carte de sondage ---------- */

.poll { padding: 16px 16px 12px; }
.poll.todo { border: 1.5px solid #f107a399; }

.poll-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.poll-set { color: var(--accent-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-set.spicy { color: #ff4f9a; }
.poll-time { color: var(--muted); flex-shrink: 0; }
.poll .question { font-size: 1.22rem; line-height: 1.3; margin: 0 0 14px; }

.vote-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vote-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--soft);
  border: 1px solid var(--border);
  font-weight: 500;
  font-size: 0.95rem;
  text-align: left;
  transition: transform 0.1s, border-color 0.1s;
}
.vote-opt span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-opt:active { transform: scale(0.97); }
.vote-opt.picked { border-color: var(--accent); background: transparent; }
.vote-opt .avatar { width: 30px; height: 30px; font-size: 1rem; }
.link-btn { color: var(--accent-text); font-weight: 600; font-size: 0.88rem; padding: 10px 2px 0; }

.results { gap: 6px; }
.result { padding: 6px 12px 6px 6px; border: 1px solid var(--border); background: var(--soft); }
.result .bar { opacity: 0.35; }
.result .avatar { width: 30px; height: 30px; font-size: 1rem; }
.result.mine { outline: none; border-color: var(--accent); }

.poll-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.more-btn {
  width: 34px;
  height: 28px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}
.more-btn:active { background: var(--soft); }

.poll-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--soft);
  text-align: left;
}
.pc-ico { font-size: 1rem; flex-shrink: 0; }
.pc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 0.86rem; }
.pc-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.pc-msg b { color: var(--text); font-weight: 600; }
.pc-count {
  flex-shrink: 0;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--border);
}
.pc-count.new { background: var(--pink); color: #fff; }

.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-item { text-align: left; padding: 14px 16px; border-radius: 14px; background: var(--soft); font-weight: 600; }
.menu-item.danger { color: var(--danger); }

/* ---------- Barre du bas & bouton + ---------- */

.nav-inner { border: 1px solid var(--border); box-shadow: 0 6px 24px rgba(20, 0, 50, 0.25); }
.nav button { font-size: 0.75rem; }
.fab { width: 54px; height: 54px; font-size: 1.8rem; }

/* ---------- Chat du groupe en grand (onglet Chat) ---------- */

.group-chat { display: block; width: 100%; text-align: left; padding: 14px 14px 12px; }
.gc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.gc-title { font-weight: 700; font-size: 1.05rem; }
.gc-msgs { display: flex; flex-direction: column; gap: 6px; }
.mini-msg { display: flex; align-items: flex-end; gap: 6px; }
.mini-msg.mine { justify-content: flex-end; }
.mini-body { display: flex; flex-direction: column; max-width: 80%; min-width: 0; }
.mini-name { font-size: 0.7rem; color: var(--muted); margin: 0 0 1px 8px; }
.mini-bubble {
  padding: 6px 11px;
  border-radius: 14px;
  background: var(--soft);
  font-size: 0.9rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-msg.mine .mini-bubble { background: var(--grad); color: #fff; }
.gc-input {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 20px;
  background: var(--soft);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}

.threads { padding: 2px 6px; }

/* ---------- Réglages de notifications ---------- */

.notif-prefs { margin-top: 14px; display: flex; flex-direction: column; }
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  margin: 0;
  border-top: 1px solid var(--line);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
}
.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: var(--border);
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.switch:checked { background: var(--pink); }
.switch:checked::after { transform: translateX(18px); }

/* ---------- Mode sombre : quelques ajustements ---------- */

/* Mode sombre (activé par le bouton 🌙) */
[data-theme="dark"] .poll.todo { border-color: #ff4fae88; }
[data-theme="dark"] .btn-soft { background: var(--soft); color: var(--accent-text); border: 1px solid var(--border); }
[data-theme="dark"] .input { background: var(--soft); border-color: var(--border); }
[data-theme="dark"] .chip { color: var(--accent-text); }
[data-theme="dark"] .set-badge { color: var(--accent-text); }
[data-theme="dark"] .pill.closed { background: #3d1a2a; }
[data-theme="dark"] .bubble { background: var(--soft); }
[data-theme="dark"] .chat-input { background: var(--card); }
[data-theme="dark"] .emoji-grid button { background: var(--soft); }
[data-theme="dark"] .status.on { background: #123b30; color: #4fe0b0; }



.set-card { border: 1px solid var(--border); box-shadow: var(--shadow); }
.set-card.spicy { border-color: transparent; }
.strip-item.on { border: 1px solid var(--border); }

/* ---------- Interrupteur clair / sombre (barre du haut) ---------- */

:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

.top h1 { flex: 1; min-width: 0; }
.theme-btn {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.25);
  margin-right: 10px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.theme-btn.on { background: rgba(0, 0, 0, 0.35); }
.theme-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  transition: transform 0.2s;
}
.theme-btn.on .theme-knob { transform: translateX(22px); background: #2a1d43; }

/* =====================================================================
   v4 : icônes au trait, résultats nominatifs, questions perso
   ===================================================================== */

[hidden] { display: none !important; }

.ico-svg { width: 1.15em; height: 1.15em; display: block; flex-shrink: 0; }
.nav button .ico .ico-svg { width: 22px; height: 22px; margin-bottom: 2px; }
.nav button .ico { display: grid; place-items: center; }
.fab { display: grid; place-items: center; }
.fab .ico-svg { width: 26px; height: 26px; stroke-width: 2.5; }
.more-btn { display: grid; place-items: center; }
.more-btn .ico-svg { width: 20px; height: 20px; }
.pc-ico { color: var(--muted); display: grid; place-items: center; }
.pc-ico .ico-svg { width: 18px; height: 18px; }
.chat-back { display: grid; place-items: center; }
.chat-back .ico-svg { width: 24px; height: 24px; }
.send-btn { display: grid; place-items: center; }
.send-btn .ico-svg { width: 18px; height: 18px; }
.icon-btn { color: var(--muted); display: grid; place-items: center; }
.icon-btn .ico-svg, .qrow .ico-svg { width: 18px; height: 18px; }
.theme-knob .ico-svg { width: 15px; height: 15px; color: #f59e0b; }
.theme-btn.on .theme-knob .ico-svg { color: #c4a5ff; }

/* Résultats : qui a voté pour qui */
.result { display: block; padding: 8px 12px 8px 8px; }
.result-main { position: relative; display: flex; align-items: center; gap: 10px; }
.result-main .name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result.winner .name { font-weight: 700; }
.result-voters { position: relative; margin: 4px 0 0 40px; font-size: 0.8rem; color: var(--muted); line-height: 1.3; }

/* Question écrite par quelqu'un du groupe : bandeau orange en haut de la carte */
.poll.custom { border: 1.5px solid #ff9f43; }
.custom-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -16px -16px 12px;
  padding: 8px 16px;
  border-radius: 19px 19px 0 0;
  background: #fff1e3;
  color: #b4530a;
  font-size: 0.85rem;
  border-bottom: 1px solid #ffd9b3;
}
.custom-tag .ico-svg { width: 15px; height: 15px; }
[data-theme="dark"] .custom-tag { background: #3a2312; color: #ffb36b; border-bottom-color: #5a3519; }
[data-theme="dark"] .poll.custom { border-color: #d97a2b; }

/* Moi */
.card-title { font-weight: 700; font-size: 1rem; margin-bottom: 10px; }
.profile-row { display: flex; align-items: center; gap: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.8rem; }
.profile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-text b { font-size: 1.15rem; }
.emoji-pick { margin-top: 14px; }
.emoji-pick summary { cursor: pointer; font-weight: 600; color: var(--accent-text); list-style: none; padding: 4px 0; }
.emoji-pick summary::-webkit-details-marker { display: none; }
.emoji-pick[open] summary { margin-bottom: 10px; }
.push-out { white-space: pre-wrap; margin: 10px 0 0; }
.push-out:empty { display: none; }
.group-code-row span:first-child { font-weight: 600; }

/* Feuille "Lancer une question" */
.drops-left { background: var(--soft); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 0.9rem; }
.drops-left.empty { color: var(--danger); }

.install-banner { padding-left: 16px; }

/* =====================================================================
   v5 : plus compact — barre du haut fine, lignes repliées, vote animé
   ===================================================================== */

/* Barre du haut : le nom du groupe a toute la place, on ne garde que l'avatar à droite */
.top { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); gap: 10px; }
.top h1 { font-size: 1.15rem; margin: 0; }
.me-chip { padding: 2px; gap: 0; flex-shrink: 0; }
.me-chip .avatar { width: 30px; height: 30px; font-size: 1rem; }
.theme-btn { width: 46px; height: 26px; margin-right: 0; }
.theme-knob { width: 20px; height: 20px; }
.theme-btn.on .theme-knob { transform: translateX(20px); }
.theme-knob .ico-svg { width: 13px; height: 13px; }

main { padding-top: 10px; }
.card { margin-bottom: 12px; }
.section-title { margin: 16px 4px 8px; }

/* En cours / Archives + compte à rebours sur la même ligne */
.live-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.live-head .live-seg { flex: 1; margin: 0; }
.drop-meter {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px 0 9px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.drop-meter svg { width: 20px; height: 20px; transform: rotate(-90deg); }
.dm-track, .dm-fill { fill: none; stroke-width: 3; }
.dm-track { stroke: var(--border); }
.dm-fill { stroke: var(--pink); stroke-linecap: round; transition: stroke-dashoffset 0.6s; }
.drop-info-big { font-size: 1.6rem; font-weight: 700; margin: 0 0 4px; }
.drop-info-big .muted { font-size: 1rem; font-weight: 500; }
.reserve { margin-top: 16px; }
.reserve-label { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 6px; }
.reserve-bar { height: 8px; border-radius: 4px; background: var(--soft); border: 1px solid var(--border); overflow: hidden; }
.reserve-bar span { display: block; height: 100%; background: var(--grad); border-radius: 4px; }

/* Cartes à voter : plus serrées */
.poll { padding: 14px 14px 10px; }
.poll .question { font-size: 1.08rem; margin: 0 0 12px; }
.poll-top { margin-bottom: 6px; }
.vote-list { gap: 6px; }
.vote-opt { padding: 6px 8px; gap: 7px; font-size: 0.9rem; border-radius: 12px; }
.vote-opt .avatar { width: 26px; height: 26px; font-size: 0.9rem; }
.result .avatar, .result-main .avatar { width: 26px; height: 26px; font-size: 0.9rem; }
.result { padding: 6px 10px 6px 6px; }
.result-voters { margin-left: 36px; }
.poll-foot { margin-top: 10px; padding-top: 6px; }
.foot-actions { display: flex; align-items: center; flex-shrink: 0; }
.poll-chat { margin-top: 8px; padding: 7px 10px; }
.custom-tag { margin: -14px -14px 10px; padding: 7px 14px; }
.poll-head[data-toggle] { cursor: pointer; }
.fold { display: inline-grid; vertical-align: middle; margin-left: 6px; transform: rotate(180deg); }
.fold .ico-svg { width: 16px; height: 16px; }

/* Lignes compactes : sondages déjà votés et archives */
.prow-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.prow-list > .card { margin-bottom: 0; }
.prow {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px 9px 9px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
}
.prow:active { transform: scale(0.99); }
.prow.custom { border-left: 3px solid #ff9f43; }
.prow-av { flex-shrink: 0; display: grid; }
.prow-av .avatar { width: 34px; height: 34px; font-size: 1.1rem; }
.empty-av { background: var(--soft); color: var(--muted); }
.prow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prow-q {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prow-meta { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-meta b { color: var(--text); font-weight: 600; }
.prow-by { display: inline-flex; align-items: center; gap: 3px; color: #c2620f; margin-right: 6px; }
.prow-by .ico-svg { width: 12px; height: 12px; }
[data-theme="dark"] .prow-by { color: #ffb36b; }
[data-theme="dark"] .prow.custom { border-left-color: #d97a2b; }
.prow-chat { display: flex; align-items: center; gap: 3px; flex-shrink: 0; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.prow-chat .ico-svg { width: 14px; height: 14px; }
.prow-chat.new { color: var(--pink); }

/* Animation du vote */
.poll.voting .vote-opt:not(.chosen) { opacity: 0.35; transform: scale(0.97); transition: opacity 0.25s, transform 0.25s; }
.vote-opt.chosen { border-color: var(--accent); background: var(--soft); animation: chosen 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); box-shadow: 0 0 0 3px #7b2ff733; }
@keyframes chosen { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }
.poll.just-voted { animation: pop 0.35s ease-out; border: 1.5px solid var(--accent); }
.voted-banner {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  padding: 7px 10px;
  border-radius: 12px;
  background: #10ac8418;
  color: var(--good);
  font-size: 0.88rem;
  animation: pop 0.35s ease-out;
}
.voted-banner b { color: var(--text); }
.voted-banner .ico-svg { width: 17px; height: 17px; stroke-width: 2.6; }
.poll.custom .voted-banner { margin-top: 0; }
.poll.leaving {
  overflow: hidden;
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  transform: translateY(24px) scale(0.97);
  transition: height 0.45s ease, opacity 0.35s ease, margin 0.45s ease, padding 0.45s ease, transform 0.45s ease;
}
.prow.flash { animation: flash 1.6s ease-out; }
@keyframes flash {
  0% { box-shadow: 0 0 0 0 #f107a300; transform: translateY(-10px); opacity: 0; }
  20% { box-shadow: 0 0 0 4px #f107a355; transform: none; opacity: 1; }
  100% { box-shadow: var(--shadow); }
}

/* =====================================================================
   v6 : compte à rebours en barre, cartes encore plus fines, réactions,
   « vu par » lisible, contours propres en mode sombre
   ===================================================================== */

/* En cours / Archives : compact ; le compte à rebours prend le reste */
.live-head .live-seg { flex: 0 0 auto; padding: 3px; border-radius: 12px; }
.live-head .live-seg button { padding: 7px 10px; font-size: 0.82rem; border-radius: 9px; }
.drop-meter {
  flex: 1;
  min-width: 0;
  height: auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 5px;
  padding: 7px 12px 8px;
  border-radius: 12px;
}
.dm-row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.dm-label { color: var(--muted); font-weight: 500; font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-row b { font-size: 0.95rem; }
.dm-bar { display: block; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.dm-bar span { display: block; height: 100%; border-radius: 3px; background: var(--grad); transition: width 0.6s; }

/* Cartes à voter : un cran plus petites */
.poll { padding: 12px 12px 8px; border-radius: 18px; }
.poll .question { font-size: 1rem; line-height: 1.28; margin: 0 0 10px; }
.poll-top { font-size: 0.74rem; margin-bottom: 4px; }
.vote-opt { padding: 5px 8px 5px 5px; font-size: 0.86rem; border-radius: 11px; gap: 6px; }
.vote-opt .avatar { width: 24px; height: 24px; font-size: 0.85rem; }
.result { padding: 5px 10px 5px 5px; }
.result .avatar, .result-main .avatar { width: 24px; height: 24px; font-size: 0.85rem; }
.result-main { gap: 8px; }
.result-voters { margin: 2px 0 0 32px; font-size: 0.76rem; }
.poll-foot { margin-top: 8px; padding-top: 4px; font-size: 0.74rem; }
.poll-foot .more-btn { height: 26px; width: 30px; }
.custom-tag { margin: -12px -12px 8px; padding: 6px 12px; font-size: 0.8rem; border-radius: 17px 17px 0 0; }
.voted-banner { padding: 6px 10px; font-size: 0.84rem; margin-bottom: 8px; }

/* « Personne » */
.vote-opt.nobody { border-style: dashed; color: var(--muted); }
.nobody-av { background: var(--soft); color: var(--muted); font-weight: 700; }
.vote-opt.nobody.picked, .vote-opt.nobody.chosen { color: var(--text); }

/* Lignes repliées : l'emoji de la catégorie */
.prow-set {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  background: var(--soft);
}
.prow-set.spicy { background: #ffe3f0; }
[data-theme="dark"] .prow-set.spicy { background: #4a1530; }

.switch-row small { display: block; font-size: 0.78rem; font-weight: 400; margin-top: 2px; line-height: 1.3; }
.card .switch-row:first-of-type { border-top: 0; }

/* ---------- Chat : réactions, détail, vu par ---------- */
.bubble[data-msg] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.msg.sel .bubble { box-shadow: 0 0 0 2px var(--accent); }
.reacts {
  display: inline-flex;
  gap: 2px;
  margin: -6px 8px 0;
  padding: 2px 6px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  line-height: 1.3;
  position: relative;
  z-index: 1;
  align-self: flex-start;
}
.msg.mine .reacts { align-self: flex-end; }
.reacts span { display: inline-flex; align-items: center; gap: 1px; }
.reacts i { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.reacts span.me i { color: var(--accent-text); }

.msg-detail {
  margin: 6px 0 8px 34px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  animation: pop 0.2s ease-out;
}
.msg-detail.mine { margin-left: 40px; }
.react-bar { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 8px; }
.react-bar button {
  flex: 1;
  height: 38px;
  border-radius: 12px;
  font-size: 1.3rem;
  background: var(--soft);
  transition: transform 0.1s;
}
.react-bar button:active { transform: scale(1.2); }
.react-bar button.on { background: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.md-row { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); align-items: baseline; }
.md-label { flex: 0 0 82px; color: var(--muted); font-weight: 600; font-size: 0.75rem; }
.md-people { display: flex; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.md-people.dim { opacity: 0.6; }
.who { display: inline-flex; align-items: center; gap: 4px; }
.who .avatar.xs { width: 18px; height: 18px; font-size: 0.65rem; }
.md-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; border-top: 1px solid var(--line); }
.md-del { display: inline-flex; align-items: center; gap: 5px; color: var(--danger); font-weight: 600; font-size: 0.8rem; padding: 4px 2px; }
.md-del .ico-svg { width: 15px; height: 15px; }

.seen-line { display: flex; align-items: center; gap: 4px; margin: 4px 0 2px 34px; font-size: 0.72rem; color: var(--muted); }
.seen-line.mine { justify-content: flex-end; margin: 4px 6px 2px 0; }
.seen-line .ico-svg { width: 13px; height: 13px; stroke-width: 2.6; color: var(--good); }

/* ---------- Mode sombre : contours fins et réguliers ---------- */
:root[data-theme="dark"] {
  --border: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.07);
  --card: #1b1230;
  --soft: #251a3c;
}
[data-theme="dark"] .card,
[data-theme="dark"] .prow { box-shadow: none; border-color: var(--border); }
[data-theme="dark"] .poll.todo { border: 1px solid rgba(241, 7, 163, 0.5); }
[data-theme="dark"] .poll.custom { border: 1px solid rgba(255, 159, 67, 0.55); }
[data-theme="dark"] .poll.just-voted { border: 1px solid var(--accent); }
[data-theme="dark"] .vote-opt,
[data-theme="dark"] .result { border-color: transparent; }
[data-theme="dark"] .vote-opt.nobody { border-color: var(--border); }
[data-theme="dark"] .result.mine { border-color: rgba(167, 123, 255, 0.6); }
[data-theme="dark"] .custom-tag { border-bottom-color: rgba(255, 159, 67, 0.25); }
[data-theme="dark"] .nav-inner { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }
[data-theme="dark"] .bubble { box-shadow: none; }
[data-theme="dark"] .msg:not(.mine) .bubble:not(.gif):not(.deleted) { background: var(--soft); }
[data-theme="dark"] .top { box-shadow: none; }

/* Lignes repliées : gagnant + barre de répartition des votes */
.prow-body { gap: 3px; }
.prow-lead { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.8rem; }
.prow-lead b { font-weight: 600; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
.prow-avs { display: flex; flex-shrink: 0; }
.prow-avs .avatar.xs { width: 20px; height: 20px; font-size: 0.7rem; }
.prow-avs .avatar.xs + .avatar.xs { margin-left: -6px; box-shadow: 0 0 0 1.5px var(--card); }
.prow-bar { flex: 1; min-width: 30px; display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--soft); }
.prow-bar i { display: block; height: 100%; min-width: 3px; }
.prow-pct { flex-shrink: 0; font-size: 0.75rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; width: 32px; text-align: right; }
.prow-meta { font-size: 0.72rem; }

/* =====================================================================
   v7 : photos de profil / animaux, couleur par personne, résultats en barre pleine largeur
   ===================================================================== */

.avatar { background: var(--pc, var(--soft)); overflow: hidden; padding: 0; }
.avatar svg, .avatar img { width: 100%; height: 100%; display: block; }
.avatar img { object-fit: cover; }
.avatar.has-photo { box-shadow: 0 0 0 2px var(--pc); }
.avatar.xs.has-photo { box-shadow: 0 0 0 1.5px var(--pc); }
.nobody-av { background: var(--soft); color: var(--muted); font-weight: 700; display: grid; place-items: center; }
.vote-opt.picked .avatar, .vote-opt.chosen .avatar { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--pc); }

/* Moi : photo cliquable */
.photo-btn { position: relative; padding: 0; border-radius: 50%; flex-shrink: 0; }
.photo-btn .avatar.lg { width: 64px; height: 64px; }
.photo-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--accent-text);
}
.photo-edit .ico-svg { width: 13px; height: 13px; }
.photo-links { display: flex; gap: 14px; margin-top: 2px; }
.photo-links .link-btn { padding: 2px 0; font-size: 0.85rem; }

/* Rejoindre / créer : choix de la photo */
.photo-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background: var(--soft);
  text-align: left;
  font-weight: 600;
  color: var(--accent-text);
}
.photo-pick .avatar.lg { width: 52px; height: 52px; flex-shrink: 0; }
.photo-pick small { display: block; font-weight: 400; font-size: 0.78rem; margin-top: 2px; }

/* Lignes repliées : question en haut, résultat sur toute la largeur en dessous */
.prow { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
.prow-top { display: flex; align-items: flex-start; gap: 10px; }
.prow-set { width: 32px; height: 32px; font-size: 1.05rem; border-radius: 10px; }
.prow-body { padding-top: 1px; }
.prow-q { font-size: 0.93rem; }
.prow-by { font-size: 0.74rem; margin: 2px 0 0; }
.prow-chat { padding-top: 6px; }
.prow-res { display: flex; flex-direction: column; gap: 6px; }
.prow-lead { display: flex; align-items: center; gap: 7px; font-size: 0.88rem; }
.prow-lead b { max-width: none; flex-shrink: 1; min-width: 0; }
.prow-avs .avatar.xs { width: 24px; height: 24px; }
.prow-avs .avatar.xs + .avatar.xs { margin-left: -7px; box-shadow: 0 0 0 2px var(--card); }
.prow-pct { width: auto; font-size: 0.85rem; color: var(--text); }
.prow-lead .prow-meta { margin-left: auto; font-size: 0.74rem; flex-shrink: 0; }
.prow-bar { flex: none; width: 100%; height: 10px; border-radius: 5px; gap: 2px; }
.prow-bar i { min-width: 4px; }
.prow-bar i:first-child { border-radius: 5px 0 0 5px; }
.prow-bar i:last-child { border-radius: 0 5px 5px 0; }
.prow-bar i:only-child { border-radius: 5px; }

/* =====================================================================
   v8 : moins de texte, moins de couleurs — résultats façon AskUs
   ===================================================================== */

/* Piles de petites photos */
.stack { display: inline-flex; align-items: center; flex-shrink: 0; }
.stack .avatar.xs { width: 20px; height: 20px; font-size: 0.62rem; box-shadow: 0 0 0 1.5px var(--card); }
.stack .avatar.xs + .avatar.xs { margin-left: -6px; }
.stack .avatar.more { background: var(--soft); color: var(--muted); font-weight: 700; display: grid; place-items: center; }

/* Temps restant : petite horloge */
.tleft { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tleft svg { width: 14px; height: 14px; transform: rotate(-90deg); }
.tl-track, .tl-fill { fill: none; stroke-width: 2.6; }
.tl-track { stroke: var(--border); }
.tl-fill { stroke: var(--accent); stroke-linecap: round; }
.tleft.soon .tl-fill { stroke: var(--danger); }
.tleft.soon { color: var(--danger); }
.poll-ended { color: var(--muted); }
.vote-count { font-size: 0.75rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Pied de carte : photos de ceux qui ont voté + 3/8 */
.foot-info { display: flex; align-items: center; gap: 6px; min-width: 0; }
.foot-info .by { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Résultats dépliés : la plus grande barre = toute la largeur */
.results { gap: 6px; }
.result { display: block; padding: 0; border: 0 !important; background: none; overflow: visible; }
.r-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; text-align: left; color: var(--text); }
.r-row > .avatar { width: 28px; height: 28px; }
.r-track { flex: 1; min-width: 0; display: flex; }
.r-fill {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: fit-content;
  height: 32px;
  padding: 0 4px 0 10px;
  border-radius: 10px;
  background: var(--soft);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.result.winner .r-fill { background: linear-gradient(90deg, #7b2ff733, #f107a333); }
.result.mine .r-fill { box-shadow: inset 0 0 0 1.5px var(--accent); }
.r-name { font-weight: 600; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: auto; }
.result.winner .r-name { font-weight: 700; }
.r-fill .stack .avatar.xs { width: 22px; height: 22px; box-shadow: 0 0 0 1.5px var(--soft); }
.result.winner .r-fill .stack .avatar.xs { box-shadow: 0 0 0 1.5px var(--card); }
.r-count { width: 18px; text-align: right; font-weight: 700; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.result.winner .r-count { color: var(--text); }
.r-list { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0 4px 36px; font-size: 0.82rem; animation: pop 0.2s ease-out; }
.r-list .who .avatar.xs { width: 20px; height: 20px; }
[data-theme="dark"] .result.winner .r-fill { background: linear-gradient(90deg, #7b2ff755, #f107a344); }

/* Lignes repliées : la question d'abord, puis une barre discrète */
.prow { gap: 7px; padding: 10px 12px 9px; }
.prow.custom { border-left-width: 1px; }
.prow-top { align-items: flex-start; }
.prow-set { width: 28px; height: 28px; font-size: 0.95rem; border-radius: 9px; }
.prow-set.spicy { background: var(--soft); }
.prow-q { flex: 1; min-width: 0; font-size: 0.95rem; font-weight: 600; padding-top: 3px; }
.prow-pen { display: inline-grid; vertical-align: -2px; margin-right: 5px; color: #e07b1f; }
.prow-pen .ico-svg { width: 14px; height: 14px; }
.prow-res { flex-direction: row; align-items: center; gap: 10px; padding-left: 38px; }
.mini-bars { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mini-res { display: flex; align-items: center; gap: 6px; }
.mini-res > .avatar.xs { width: 22px; height: 22px; flex-shrink: 0; }
.mini-track { flex: 1; min-width: 0; display: flex; }
.mini-fill {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: fit-content;
  height: 22px;
  padding: 0 2px 0 8px;
  border-radius: 7px;
  background: linear-gradient(90deg, #7b2ff726, #f107a326);
}
.mini-fill .stack .avatar.xs { width: 18px; height: 18px; }
[data-theme="dark"] .mini-fill { background: linear-gradient(90deg, #7b2ff74d, #f107a340); }
.prow-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tie-more { font-size: 0.72rem; color: var(--muted); padding-left: 28px; }

/* =====================================================================
   v9 : lignes repliées lisibles (photo + prénom + fine barre colorée),
   barres dépliées et prénoms du chat dans la couleur de chacun
   ===================================================================== */

/* Couleur de texte lisible à partir de la couleur de la personne */
.pname { color: color-mix(in srgb, var(--pc) 78%, #000); }
[data-theme="dark"] .pname { color: color-mix(in srgb, var(--pc) 70%, #fff); }
.msg-name.pname, .mini-name.pname { font-weight: 700; }

.prow-res { padding-left: 38px; gap: 12px; }
.mini-bars { gap: 5px; }
.mini-res { gap: 7px; }
.mini-res > .avatar.xs { width: 20px; height: 20px; }
.mr-name {
  flex: 0 1 auto;
  max-width: 40%;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: color-mix(in srgb, var(--pc) 78%, #000);
}
[data-theme="dark"] .mr-name { color: color-mix(in srgb, var(--pc) 70%, #fff); }
.mini-track { flex: 1; min-width: 24px; height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; display: block; }
.mini-fill { display: block; height: 100%; min-width: 0; padding: 0; border-radius: 3px; background: var(--pc) !important; }
.mr-n { font-size: 0.78rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.tie-more { padding-left: 27px; }

/* Barres dépliées : teinte de la couleur de la personne (plus soutenue pour le gagnant) */
.result .r-fill { background: color-mix(in srgb, var(--pc) 16%, var(--card)); }
.result.winner .r-fill { background: color-mix(in srgb, var(--pc) 34%, var(--card)); }
[data-theme="dark"] .result .r-fill { background: color-mix(in srgb, var(--pc) 22%, var(--card)); }
[data-theme="dark"] .result.winner .r-fill { background: color-mix(in srgb, var(--pc) 45%, var(--card)); }
.result.mine .r-fill { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--pc) 80%, #000); }
.r-fill .stack .avatar.xs, .result.winner .r-fill .stack .avatar.xs { box-shadow: 0 0 0 1.5px var(--card); }

/* Appui long → réactions : pas de sélection de texte ni de menu système sur les bulles */
.bubble[data-msg] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.react-preview { margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: var(--soft); font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.react-quick { display: flex; gap: 6px; margin-bottom: 10px; }
.react-quick button { flex: 1; height: 46px; border-radius: 14px; font-size: 1.55rem; background: var(--soft); transition: transform 0.1s; }
.react-quick button:active, .emoji-all button:active { transform: scale(1.2); }
.react-quick button.on, .emoji-all button.on { box-shadow: inset 0 0 0 2px var(--accent); }
.react-type { margin-bottom: 10px; }
.emoji-all { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; max-height: 38vh; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.emoji-all button { height: 40px; border-radius: 10px; font-size: 1.4rem; }
.sheet-wrap { z-index: 48; } /* au-dessus de la fenêtre de chat (réactions) */

/* =====================================================================
   v10 : lignes repliées alignées, section repliable, cartes à voter plus grandes,
   détail d'un message = réactions seulement
   ===================================================================== */

/* Lignes repliées : colonnes fixes → barres de même taille partout */
.prow-res { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 10px; padding-left: 38px; }
.mini-res { display: grid; grid-template-columns: 20px 62px minmax(0, 1fr) 16px; align-items: center; gap: 6px; }
.mr-name { max-width: none; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.mr-n { text-align: right; }
.mini-track { min-width: 0; }
.prow-side { flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; width: 44px; }
.prow-side .tleft { font-size: 0.72rem; }
.prow-side .vote-count { font-size: 0.72rem; }
.prow-top { padding-right: 0; }
.prow-chat { flex-shrink: 0; }

/* Titre de section cliquable */
.fold-title { display: flex; align-items: center; gap: 6px; width: calc(100% - 8px); background: none; border: 0; text-align: left; cursor: pointer; }
.fold-title .ico-svg { width: 15px; height: 15px; margin-left: auto; transition: transform 0.2s; }
.fold-title.folded .ico-svg { transform: rotate(-90deg); }

/* Cartes encore à voter : plus généreuses */
.poll.todo { padding: 16px 16px 10px; }
.poll.todo .question { font-size: 1.22rem; line-height: 1.3; margin: 2px 0 14px; }
.poll.todo .poll-top { font-size: 0.8rem; margin-bottom: 6px; }
.poll.todo .vote-list { gap: 8px; }
.poll.todo .vote-opt { padding: 8px 10px 8px 7px; font-size: 0.95rem; border-radius: 13px; gap: 8px; }
.poll.todo .vote-opt .avatar { width: 32px; height: 32px; }
.poll.todo .poll-foot { margin-top: 12px; }
.poll.todo .custom-tag { margin: -16px -16px 12px; padding: 8px 16px; }

/* Chat : détail = réactions avec les prénoms */
.md-reacts { display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem; }
.md-react { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.md-emoji { font-size: 1.15rem; margin-right: 4px; }
.md-foot { margin-top: 8px; }

/* Discussion fermée tant qu'on n'a pas voté */
.poll-chat.locked { cursor: default; }
.poll-chat.locked .pc-ico .ico-svg { width: 16px; height: 16px; }
.locked-line { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.locked-line .ico-svg { width: 13px; height: 13px; }
.chat-locked { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 56px 28px; }
.chat-locked .cl-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; color: var(--accent-text); }
.chat-locked .cl-ico .ico-svg { width: 26px; height: 26px; }
.chat-locked b { font-size: 1.15rem; }
.chat-locked p { margin: 0 0 8px; font-size: 0.9rem; line-height: 1.4; }
.chat-input.locked { opacity: 0.55; }

/* =====================================================================
   v11 : flèche à côté du titre, horloge + votes à côté de la barre (une seule colonne
   de largeur fixe pour tout le monde), cartes à voter plus compactes
   ===================================================================== */

.fold-title { width: auto; justify-content: flex-start; }
.fold-title .ico-svg { margin-left: 2px; }

/* Une seule personne en tête : horloge et votes sur la même ligne que la barre.
   Égalité : empilés. La colonne garde la même largeur → barres identiques partout. */
.prow-res { grid-template-columns: minmax(0, 1fr) 78px; gap: 8px; }
.prow-side { width: 78px; flex-direction: row; justify-content: flex-end; gap: 8px; }
.prow-res.tie .prow-side { flex-direction: column; align-items: flex-end; gap: 2px; }
.mini-res { grid-template-columns: 20px 56px minmax(0, 1fr) 14px; gap: 5px; }

/* Cartes à voter : la question en grand et centrée, les choix plus petits */
.poll.todo { padding: 14px 14px 8px; }
.poll.todo .poll-top { margin-bottom: 4px; }
.poll.todo .question { font-size: 1.32rem; line-height: 1.28; text-align: center; margin: 6px 4px 14px; }
.poll.todo .vote-list { gap: 6px; }
.poll.todo .vote-opt { padding: 5px 8px 5px 5px; font-size: 0.86rem; border-radius: 11px; gap: 6px; }
.poll.todo .vote-opt .avatar { width: 24px; height: 24px; }
.poll.todo .poll-foot { margin-top: 10px; }
.poll.todo .custom-tag { margin: -14px -14px 10px; padding: 7px 14px; }
.vote-list.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.poll.todo .vote-list.cols3 .vote-opt { padding: 5px 6px 5px 4px; gap: 5px; font-size: 0.82rem; }
.poll.todo .vote-list.cols3 .vote-opt .avatar { width: 22px; height: 22px; }

/* =====================================================================
   v12 : carte à voter entre les deux (2 colonnes, taille moyenne) ;
   lignes repliées sans emoji de catégorie, tout aligné à gauche
   ===================================================================== */
.poll.todo .vote-list { gap: 7px; }
.poll.todo .vote-opt { padding: 7px 10px 7px 6px; font-size: 0.92rem; border-radius: 12px; gap: 8px; }
.poll.todo .vote-opt .avatar { width: 28px; height: 28px; }
.poll.todo .poll-foot { margin-top: 12px; }

.prow-top { gap: 8px; }
.prow-q { padding-top: 0; }
.prow-res { padding-left: 0; }

/* Recadrage de la photo de profil */
.crop-hint { margin: 0 0 12px; text-align: center; }
.crop-box {
  position: relative;
  margin: 0 auto 14px;
  overflow: hidden;
  border-radius: 18px;
  background: #111;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.crop-box:active { cursor: grabbing; }
.crop-box img { position: absolute; top: 0; left: 0; transform-origin: 0 0; max-width: none; pointer-events: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.55); border: 2px solid rgba(255, 255, 255, 0.85); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; margin: 0 6px 16px; color: var(--muted); font-weight: 700; font-size: 1.2rem; }
.crop-zoom input { flex: 1; accent-color: var(--accent); }

/* =====================================================================
   v13 : carte à voter adaptée à la taille du groupe (voir fitVoteCards)
   ===================================================================== */
.poll.todo.fit { display: flex; flex-direction: column; }
.poll.todo.fit .poll-head { flex: 1; display: flex; flex-direction: column; }
.poll.todo.fit .question { margin-top: auto; margin-bottom: auto; padding: 8px 0 14px; }
.poll.todo.fit .vote-list { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--gap); }
.poll.todo.fit .vote-opt { height: var(--opt-h); padding-top: 0; padding-bottom: 0; font-size: var(--opt-fs); gap: calc(var(--opt-h) * 0.16); border-radius: calc(var(--opt-h) * 0.28); }
.poll.todo.fit .vote-opt .avatar { width: var(--opt-av); height: var(--opt-av); }
.poll.todo.fit .vote-opt.nobody .avatar { font-size: calc(var(--opt-av) * 0.5); }

/* =====================================================================
   v14 : langue FR/EN, demi-votes, unanimité, notes des questions, stats Affinités / Groupe,
   couleurs au choix, chat (réponses, tags, photos, double tap), clavier iPhone/Android
   ===================================================================== */

/* Interrupteur de langue */
.lang-switch { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; gap: 2px; flex-shrink: 0; }
.lang-switch button { padding: 4px 11px; border-radius: 999px; font-weight: 700; font-size: 0.78rem; color: var(--muted); }
.lang-switch button.on { background: var(--card); color: var(--accent-text); box-shadow: var(--shadow); }
.auth-box { position: relative; }
.auth-lang { position: absolute; top: 14px; right: 14px; z-index: 2; }
.lang-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Choix de vote : appui long possible sans sélectionner le texte */
.vote-opt { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* Demi-votes */
.half-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; min-height: 30px; flex-wrap: wrap; }
.half-toggle {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px dashed var(--border);
}
.half-toggle:active { transform: scale(0.96); }
.half-row.on { background: var(--soft); border-radius: 12px; padding: 6px 8px 6px 12px; }
.half-hint { flex: 1; min-width: 0; font-size: 0.8rem; font-weight: 600; color: var(--accent-text); }
.half-send { font-size: 0.8rem; font-weight: 700; color: #fff; background: var(--grad); padding: 5px 12px; border-radius: 999px; }
.half-cancel { font-size: 0.8rem; font-weight: 600; color: var(--muted); padding: 5px 6px; }
.poll.halfmode .vote-opt:not(.half-on) { opacity: 0.75; }
.vote-opt.half-on { border-color: var(--accent); border-style: dashed; background: color-mix(in srgb, var(--accent) 10%, var(--card)); opacity: 1; }
.half-mark {
  margin-left: auto;
  flex-shrink: 0;
  font-style: normal;
  font-weight: 800;
  font-size: 0.8rem;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}
.avatar.half { opacity: 0.55; }
.half-tag { font-style: normal; font-weight: 700; color: var(--accent-text); font-size: 0.75rem; }

/* Unanimité / personne d'accord : discret */
.cons-line { margin-top: 8px; font-size: 0.8rem; font-weight: 600; color: #b7791f; }
.cons-line.split { color: var(--muted); }
[data-theme="dark"] .cons-line { color: #f6c560; }
[data-theme="dark"] .cons-line.split { color: var(--muted); }
.cons-dot { font-size: 0.8rem; line-height: 1; }

/* Note de la question */
.rate-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 0.78rem; color: var(--muted); }
.rate-label { font-weight: 600; }
.stars { display: inline-flex; gap: 1px; }
.star { font-size: 1.15rem; line-height: 1; padding: 2px 3px; color: var(--border); transition: transform 0.1s, color 0.1s; }
.star.on { color: #ffb400; }
.star:active { transform: scale(1.3); }
.rate-avg { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .star { color: rgba(255, 255, 255, 0.18); }
[data-theme="dark"] .star.on { color: #ffc93c; }

/* Stats : onglets */
.stats-seg { margin-bottom: 12px; }
.title-chip.moment { background: linear-gradient(135deg, #f7b500, #ff7a00); }
.moments .qrow span:first-child { min-width: 0; }

/* Affinités */
.duo-intro { margin: 0 4px 8px; }
.duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.duo-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  padding: 10px 11px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-width: 0;
  border-top: 3px solid var(--pc);
}
.duo-tile:not(.static):active { transform: scale(0.98); }
.duo-head { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; }
.duo-emoji { font-size: 1.1rem; }
.duo-who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.duo-who b { font-size: 0.98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duo-who .avatar.sm { width: 28px; height: 28px; }
.duo-line { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }
.flock { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.flock .duo-emoji { font-size: 1.8rem; }
.duo-table { padding: 8px 10px; }
.dt-head, .dt-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr 1fr 44px; align-items: center; gap: 8px; }
.dt-head { font-size: 0.7rem; font-weight: 700; color: var(--muted); padding: 2px 2px 6px; text-transform: uppercase; }
.dt-head span:last-child { text-align: right; }
.dt-row { width: 100%; text-align: left; padding: 6px 2px; border-top: 1px solid var(--line); color: var(--text); }
.dt-who { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; font-size: 0.86rem; }
.dt-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-who .avatar.xs { width: 22px; height: 22px; }
.dt-bar { display: flex; align-items: center; gap: 5px; min-width: 0; }
.dt-bar b { font-size: 0.75rem; font-variant-numeric: tabular-nums; width: 32px; text-align: right; flex-shrink: 0; }
.dt-track { flex: 1; height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; min-width: 12px; }
.dt-track span { display: block; height: 100%; border-radius: 3px; background: var(--pc); }
.dt-track.sim span { background: color-mix(in srgb, var(--pc) 55%, var(--muted)); }
.dt-io { text-align: right; font-size: 0.75rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.dt-help { margin: 8px 2px 2px; line-height: 1.35; }

/* Groupe */
.num-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 4px; }
.num-tile { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px; text-align: center; box-shadow: var(--shadow); }
.num-tile b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.num-tile span { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.q-rate { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: 1px; }
.q-rate small { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.mini-stars {
  font-size: 0.85rem;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #ffb400 var(--v), var(--border) var(--v));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.moment-who { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.moment-who small { font-size: 0.72rem; color: var(--muted); font-weight: 700; }

/* Couleurs au choix */
.color-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; }
.swatch {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--pc);
  display: grid;
  place-items: center;
  color: #fff;
  padding: 0;
  transition: transform 0.1s;
}
.swatch:not(:disabled):active { transform: scale(0.9); }
.swatch.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--pc); }
.swatch .ico-svg { width: 60%; height: 60%; stroke-width: 3; }
.swatch.taken { opacity: 0.35; cursor: not-allowed; }
.swatch.taken .avatar.xs { width: 70%; height: 70%; box-shadow: none; }

/* ---------- Chat ---------- */

/* Glisser pour répondre */
.msg { position: relative; touch-action: pan-y; }
.msg .msg-body { will-change: transform; }
.swipe-hint {
  position: absolute;
  left: 4px;
  top: 50%;
  margin-top: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.swipe-hint .ico-svg { width: 16px; height: 16px; }
.msg.flash-msg .bubble { animation: flashmsg 1.4s ease-out; }
@keyframes flashmsg { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Citation du message auquel on répond */
.reply-quote {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  margin: 0 0 -6px;
  padding: 5px 10px 10px;
  border-radius: 14px 14px 6px 6px;
  border-left: 3px solid var(--pc);
  background: color-mix(in srgb, var(--pc) 10%, var(--card));
  font-size: 0.78rem;
  line-height: 1.3;
  cursor: pointer;
  opacity: 0.9;
}
.reply-quote b { font-size: 0.72rem; }
.reply-quote span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.mine .reply-quote { align-self: flex-end; }
[data-theme="dark"] .reply-quote { background: color-mix(in srgb, var(--pc) 18%, var(--card)); }

/* Barre « Répondre à … » */
.reply-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  background: var(--card);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.reply-bar[hidden] { display: none; }
.rb-ico { color: var(--accent-text); display: grid; }
.rb-ico .ico-svg { width: 18px; height: 18px; }
.rb-body { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 3px solid var(--pc); padding-left: 8px; font-size: 0.8rem; }
.rb-body span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tags @Prénom */
.mention { font-weight: 700; color: color-mix(in srgb, var(--pc) 78%, #000); background: color-mix(in srgb, var(--pc) 14%, transparent); border-radius: 5px; padding: 0 2px; }
[data-theme="dark"] .mention { color: color-mix(in srgb, var(--pc) 60%, #fff); background: color-mix(in srgb, var(--pc) 25%, transparent); }
.msg.mine .mention { color: #fff; background: rgba(255, 255, 255, 0.22); }
.bubble.tagged { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent); }
.mention-box {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 10px;
  background: var(--card);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  scrollbar-width: none;
}
.mention-box[hidden] { display: none; }
.mention-box::-webkit-scrollbar { display: none; }
.mention-box button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 0.88rem;
}
.mention-box .avatar.xs { width: 24px; height: 24px; }

/* Double tap : petit cœur */
.bubble[data-msg] { position: relative; }
.heart-pop {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 2.2rem;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: heartpop 0.8s ease-out forwards;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}
@keyframes heartpop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  30% { transform: translate(-50%, -50%) scale(1.25); opacity: 1; }
  60% { transform: translate(-50%, -60%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -110%) scale(0.9); opacity: 0; }
}

/* Photos */
.bubble.photo { position: relative; line-height: 0; }
.bubble.photo img { display: block; width: auto; height: auto; max-width: min(240px, 100%); max-height: 320px; border-radius: 14px; background: var(--soft); object-fit: cover; }
.msg.pending .bubble img { opacity: 0.55; }
.spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.6);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.att-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); flex-shrink: 0; margin-bottom: 3px; }
.att-btn .ico-svg { width: 22px; height: 22px; }
.chat-input .gif-btn { flex-shrink: 0; }

.viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fade 0.15s;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.viewer img { max-width: 100%; max-height: calc(100% - 60px); object-fit: contain; }
.viewer-top { position: absolute; top: max(8px, env(safe-area-inset-top)); left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; color: #fff; font-size: 0.9rem; }
.viewer-top span { display: inline-flex; align-items: center; gap: 6px; }
.viewer .x { color: #fff; }

/* Détail d'un message : Répondre / Supprimer */
.md-actions { display: inline-flex; gap: 12px; }
.md-reply { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-text); font-weight: 600; font-size: 0.8rem; padding: 4px 2px; }
.md-reply .ico-svg { width: 15px; height: 15px; }
.react-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.react-actions .link-btn { display: inline-flex; align-items: center; gap: 5px; }
.react-actions .ico-svg { width: 16px; height: 16px; }

/* Clavier ouvert (iPhone, Android) : la barre de saisie colle au clavier (plus de marge « barre d'accueil »),
   et le dessous de la fenêtre est rempli : derrière un clavier transparent ou plus petit, on ne voit plus l'app. */
.chat-overlay::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 100vh;
  background: var(--card);
  pointer-events: none;
}
.chat-overlay.kb-open .chat-input { padding-bottom: 8px; }
.chat-overlay { overscroll-behavior: contain; }
html:has(body.noscroll) { overflow: hidden; }

/* =====================================================================
   Comptes multi-groupes : connexion, accueil (mes groupes), retour à l'accueil
   ===================================================================== */

.field-hint { margin: 4px 2px 0; font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 6px; }
.auth-links .link-btn { padding: 6px 2px; font-size: 0.85rem; }
.auth-box .back { align-self: flex-start; margin-bottom: 4px; }

/* En-tête d'un groupe : flèche vers l'accueil */
.lobby-btn {
  width: 34px;
  height: 34px;
  margin: 0 2px 0 -6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.lobby-btn:active { background: rgba(255, 255, 255, 0.2); }
.lobby-btn .ico-svg { width: 22px; height: 22px; }

/* Accueil */
.lobby { padding-bottom: 40px; }
.lobby-hello { margin: 4px 4px 0; font-size: 1.05rem; }
.group-list { display: flex; flex-direction: column; gap: 10px; }
.group-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
}
.group-card:active { transform: scale(0.99); }
.group-card.busy { border-color: color-mix(in srgb, var(--pink) 45%, var(--border)); }
.group-card > .avatar { width: 46px; height: 46px; }
.gc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gc-name { font-weight: 700; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-meta { font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-meta b { color: var(--text); font-weight: 600; }
.gc-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.gb { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 6px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; color: #fff; }
.gb .ico-svg { width: 13px; height: 13px; }
.gb.vote { background: var(--accent); }
.gb.chat { background: var(--pink); }
.lobby-actions { margin-top: 16px; }
.lobby-actions .btn { flex: 1; }
.lobby-link { display: block; margin: 10px auto 0; text-align: center; font-size: 0.85rem; }
.account-card { margin-top: 26px; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.account-card .row { margin-top: 12px; }
.account-card .row .btn { flex: 1; }

/* =====================================================================
   v12 : accueil sans inscription, récupération de compte, séries, quiz, récap du mois, nouveautés
   ===================================================================== */

/* Écran d'attente : fond normal, logo qui n'apparaît qu'après un instant (pas de flash si c'est rapide). */
.splash { min-height: 100vh; display: grid; place-items: center; background: var(--bg); }
.splash-logo { font-size: 2.6rem; opacity: 0; animation: splashIn 0.4s ease 0.45s forwards, bob 2.4s ease-in-out 0.45s infinite; }
@keyframes splashIn { to { opacity: 1; } }

/* Squelette (premier passage dans un groupe) */
.skeleton { padding-top: 14px; }
.sk { background: var(--card); border: 1px solid var(--border); border-radius: 18px; margin-bottom: 10px; position: relative; overflow: hidden; }
.sk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--soft) 80%, transparent), transparent); animation: skShine 1.2s linear infinite; }
@keyframes skShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.sk-seg { height: 40px; border-radius: 999px; }
.sk-card { height: 46vh; }
.sk-row { height: 64px; }

/* Bienvenue */
.welcome .btn-block + .btn-block { margin-top: 10px; }
.welcome-login { display: block; margin: 12px auto 0; }
.auth-title { font-size: 1.7rem !important; margin-top: 4px; }
.auth-help { text-align: center; margin: 4px 0 2px; }

/* Accueil */
.gb.streak { background: color-mix(in srgb, #ff7a00 18%, var(--card)); color: #e05a00; }
.gb.streak:not(.on) { filter: saturate(0.4); opacity: 0.8; }
.gb.claim { background: #ffbe0b; color: #3a2400; }
.acc-val { display: inline-flex; align-items: center; gap: 6px; }
.acc-val .icon-btn { width: 28px; height: 28px; }
.pending-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-color: #ffbe0b; }
.pending-card.denied { border-color: var(--danger); }
.pending-card .pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pending-card .link-btn { padding: 6px 4px; flex-shrink: 0; }

/* Rejoindre : noms déjà pris (compte perdu) */
.taken-box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.taken-box summary { cursor: pointer; color: var(--accent-text); font-weight: 600; font-size: 0.9rem; padding: 6px 0; list-style: none; }
.taken-box summary::-webkit-details-marker { display: none; }
.taken-box summary::after { content: " ›"; }
.taken-box[open] summary::after { content: " ⌄"; }
.taken-box .choice { opacity: 0.85; }

/* Demande de récupération (dans le groupe) */
.claim-banner { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; margin-bottom: 10px; border-radius: 16px; background: color-mix(in srgb, #ffbe0b 20%, var(--card)); border: 1px solid #ffbe0b; color: var(--text); text-align: left; font-size: 0.9rem; }
.claim-banner.warn { background: color-mix(in srgb, var(--danger) 14%, var(--card)); border-color: var(--danger); }
.claim-banner span { flex: 1; }
.claim-banner .ico-svg { width: 18px; height: 18px; flex-shrink: 0; }
.claim-who { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 8px; font-size: 1.1rem; }

/* En-tête : série perso */
.streak-chip { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 9px 0 7px; border-radius: 15px; background: rgba(255, 255, 255, 0.22); color: #fff; font-size: 0.9rem; flex-shrink: 0; }
.streak-chip b { font-weight: 700; }
.streak-chip.pending { background: rgba(0, 0, 0, 0.18); }
.sc-fire.off { filter: grayscale(1); opacity: 0.75; }
.streak-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.streak-big { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 14px 8px; border-radius: 18px; background: color-mix(in srgb, #ff7a00 14%, var(--card)); border: 1px solid color-mix(in srgb, #ff7a00 45%, var(--border)); }
.streak-big.pending { background: var(--soft); border-color: var(--border); }
.streak-big.group { background: color-mix(in srgb, var(--accent) 12%, var(--card)); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.sb-n { font-size: 1.7rem; font-weight: 700; }
.sb-l { font-weight: 600; font-size: 0.85rem; }
.sb-s { font-size: 0.75rem; color: var(--muted); }
.streak-list .qrow { align-items: center; gap: 10px; }
.streak-list .name { flex: 1; font-weight: 600; }
.st-cur { font-weight: 700; }
.st-cur.off { opacity: 0.55; }
.st-best { width: 62px; text-align: right; }
.streak-card { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; color: var(--text); }
.sk-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.streak-mini { display: flex; flex-wrap: wrap; gap: 8px; }
.streak-mini > span { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 0.85rem; }
.streak-mini > span.off { opacity: 0.5; }

/* Admin : options du groupe */
.stepper { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; background: var(--soft); border: 1px solid var(--border); font-size: 1.1rem; font-weight: 700; color: var(--accent-text); }
.stepper b { min-width: 22px; text-align: center; font-size: 1.05rem; }
.tz-note { margin: 10px 0 0; }

/* Lancer une question */
.own-hint { margin: 6px 0 0; }
.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Quiz */
.quiz-intro .muted { margin: 0; }
.quiz-item { padding: 14px; }
.qi-label { font-weight: 700; margin-bottom: 8px; }
.qi-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.qi-opts .chip { margin: 0; }
.qi-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 12px; gap: 2px; }
.qi-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 0.75rem; color: var(--muted); }
.qi-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }

/* Récap du mois */
.recap-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.recap-card, .recap-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); color: var(--text); text-align: left; }
.recap-card.first, .recap-banner { background: var(--grad); color: #fff; border: 0; }
.recap-card.first small { color: rgba(255, 255, 255, 0.85); }
.rc-emoji { font-size: 1.6rem; }
.rc-text { flex: 1; display: flex; flex-direction: column; }
.rc-text small { color: var(--muted); }
.rc-go { transform: rotate(-90deg); width: 18px; height: 18px; }
.recap-banner { margin-bottom: 10px; font-size: 0.95rem; }
.recap-banner span { flex: 1; }
.story { position: fixed; inset: 0; z-index: 60; background: var(--sg, #7b2ff7); color: #fff; display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); -webkit-user-select: none; user-select: none; transition: background 0.3s; }
.story-bars { display: flex; gap: 4px; }
.story-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); }
.story-bars span.done, .story-bars span.on { background: #fff; }
.story-top { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 0.85rem; opacity: 0.9; }
.story-top .x { color: #fff; font-size: 1.2rem; padding: 6px; }
.story-slide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; max-width: 460px; width: 100%; margin: 0 auto; animation: storyIn 0.35s ease; overflow-y: auto; }
@keyframes storyIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.story-slide h2 { margin: 6px 0; font-size: 1.6rem; line-height: 1.2; }
.story-slide p { margin: 2px 0; }
.st-emoji { font-size: 3.2rem; }
.st-big { font-size: 3.6rem; font-weight: 700; line-height: 1.05; }
.st-word { font-size: 2.6rem; }
.st-name { font-size: 1.4rem; font-weight: 700; }
.st-small { font-size: 0.85rem; opacity: 0.85; margin-top: 10px !important; }
.st-pill { background: rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 6px 14px; margin-top: 12px !important; font-weight: 600; }
.st-q { font-size: 1.2rem; font-weight: 600; margin: 8px 0 !important; }
.avatar.xl { width: 96px; height: 96px; font-size: 3rem; }
.st-av .avatar.xl { width: 110px; height: 110px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9); }
.st-list { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 10px; text-align: left; }
.st-li { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.14); border-radius: 14px; padding: 9px 12px; font-size: 0.92rem; }
.st-li .avatar { flex-shrink: 0; box-shadow: 0 0 0 2px #fff; }
.st-msg { background: #fff; color: #2d1b4e; border-radius: 18px; padding: 10px 14px; max-width: 90%; text-align: left; margin-top: 12px; }
.st-msg span { display: block; font-size: 0.85rem; margin-top: 4px; }
.st-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 14px; }
.st-facts span { display: flex; flex-direction: column; background: rgba(255, 255, 255, 0.14); border-radius: 14px; padding: 10px; font-size: 0.8rem; }
.st-facts b { font-size: 1.3rem; }
.story-hint { text-align: center; font-size: 0.75rem; opacity: 0.7; }

/* Nouveautés & avis : une petite ligne discrète en bas de Moi / de l'accueil */
.about-links { display: flex; justify-content: center; gap: 18px; margin: 18px 0 6px; }
.about-links .link-btn { padding: 4px 2px; font-size: 0.85rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.dot-new { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); display: inline-block; }
.patch { padding: 12px 0; border-bottom: 1px solid var(--line); }
.patch:last-child { border-bottom: 0; }
.patch-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.patch-head b { font-size: 1rem; }
.patch ul { margin: 6px 0 0; padding-left: 20px; }
.patch li { margin: 3px 0; font-size: 0.9rem; }
.patch.new .patch-head b::after { content: " •"; color: var(--pink); }
.fb-kinds { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.fb-list .qrow { flex-direction: column; align-items: flex-start; gap: 2px; }

/* =====================================================================
   Mode sombre : plus de contraste (cartes nettement détachées du fond, contours visibles)
   ===================================================================== */
:root[data-theme="dark"] {
  --bg: #0b0614;
  --card: #241a3a;
  --soft: #31254c;
  --border: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.11);
  --muted: #c4b6e0;
  --text: #fbf8ff;
}
[data-theme="dark"] .card,
[data-theme="dark"] .prow,
[data-theme="dark"] .group-card,
[data-theme="dark"] .recap-card:not(.first) { border: 1px solid var(--border); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 6px 18px rgba(0, 0, 0, 0.35); }
[data-theme="dark"] .vote-opt { background: var(--soft); border-color: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .vote-opt.nobody { border-color: var(--border); }
[data-theme="dark"] .chip:not(.on) { background: var(--soft); border-color: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .input { background: #1a1230; border-color: rgba(255, 255, 255, 0.18); }
[data-theme="dark"] .nav-inner { background: #261c3e; border-color: rgba(255, 255, 255, 0.16); }
[data-theme="dark"] .section-title { color: #d8ccf0; }
[data-theme="dark"] .gb.streak { background: #4a2a12; color: #ffb36b; }
[data-theme="dark"] .claim-banner { background: #3d3112; }
[data-theme="dark"] .claim-banner.warn { background: #45161c; }
[data-theme="dark"] .sk::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); }

/* =====================================================================
   v15 : récap façon Wrapped (lecture auto, gestes, animations), récaps anciens
   ===================================================================== */
.confetti { z-index: 70; }
.story { overflow: hidden; touch-action: none; transition: background 0.6s ease, transform 0.2s ease, opacity 0.2s ease; background: var(--sg, #7b2ff7); }
.story.closing { opacity: 0; transform: scale(0.96); }
.story > *:not(.story-blobs) { position: relative; z-index: 1; }
/* Formes floues qui dérivent derrière le contenu */
.story-blobs { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.story-blobs i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(60px); opacity: 0.55; mix-blend-mode: overlay; animation: blob 14s ease-in-out infinite alternate; }
.story-blobs i:nth-child(1) { background: #ffbe0b; top: -30vmax; left: -20vmax; }
.story-blobs i:nth-child(2) { background: #00a8e8; bottom: -35vmax; right: -25vmax; animation-duration: 17s; animation-delay: -4s; }
.story-blobs i:nth-child(3) { background: #ff2e88; top: 30%; left: 40%; width: 45vmax; height: 45vmax; animation-duration: 11s; animation-delay: -7s; }
@keyframes blob { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vmax, 6vmax) scale(1.15); } 100% { transform: translate(-6vmax, 10vmax) scale(0.9); } }
.story.paused .story-blobs i { animation-play-state: paused; }
/* Barres de progression qui se remplissent */
.story-bars span { position: relative; overflow: hidden; background: rgba(255, 255, 255, 0.3); height: 3px; }
.story-bars span.done, .story-bars span.on { background: rgba(255, 255, 255, 0.3); }
.story-bars i { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.story-stage { flex: 1; display: flex; min-height: 0; }
.story-slide { animation: none; }
/* Chaque élément de la slide arrive à son tour */
.st-anim { animation: stIn 0.6s cubic-bezier(0.2, 0.9, 0.25, 1.15) both; animation-delay: calc(var(--i, 0) * 120ms + 60ms); }
@keyframes stIn { from { opacity: 0; transform: translateY(26px) scale(0.92); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.st-emoji.st-anim { animation-name: stPop; }
@keyframes stPop { 0% { opacity: 0; transform: scale(0.2) rotate(-25deg); } 70% { opacity: 1; transform: scale(1.2) rotate(8deg); } 100% { transform: none; } }
.st-big { font-variant-numeric: tabular-nums; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.18); }
.st-av.st-anim { animation-name: stAv; }
@keyframes stAv { 0% { opacity: 0; transform: scale(0.3); } 60% { opacity: 1; transform: scale(1.12); } 100% { transform: none; } }
.st-list .st-li { animation: stIn 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.1) both; }
.st-list .st-li:nth-child(1) { animation-delay: 0.45s; }
.st-list .st-li:nth-child(2) { animation-delay: 0.6s; }
.st-list .st-li:nth-child(3) { animation-delay: 0.75s; }
.st-list .st-li:nth-child(4) { animation-delay: 0.9s; }
.st-list .st-li:nth-child(n+5) { animation-delay: 1.05s; }
.story.paused .st-anim, .story.paused .st-li { animation-play-state: paused; }
/* Devine la star */
.guess-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 340px; margin-top: 16px; }
.guess-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 20px; background: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 700; transition: transform 0.2s, opacity 0.3s, background 0.3s; }
.guess-opt:active { transform: scale(0.95); }
.guess-opt .avatar.lg { width: 70px; height: 70px; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9); }
.guess-opt.right { background: #12b76a; transform: scale(1.06); animation: stPop 0.5s ease; }
.guess-opt.wrong { background: #e5383b; animation: shake 0.4s ease; }
.guess-opt.dim { opacity: 0.35; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.st-verdict { font-size: 1.1rem; font-weight: 700; background: rgba(0, 0, 0, 0.2); padding: 6px 14px; border-radius: 999px; }
.st-verdict.ok { background: rgba(18, 183, 106, 0.85); }
/* Fin : partager / revoir */
.st-actions { display: flex; gap: 10px; margin-top: 18px; }
.st-btn { padding: 12px 20px; border-radius: 999px; background: #fff; color: #2d1b4e; font-weight: 700; font-size: 0.95rem; }
.st-btn.ghost { background: rgba(255, 255, 255, 0.18); color: #fff; }
.st-btn:active { transform: scale(0.96); }
.story-hint { transition: opacity 0.3s; }
.story.paused .story-hint { opacity: 0; }
/* Liste des récaps */
.recap-card.unseen:not(.first) { border-color: var(--pink); }
.rc-new { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; background: var(--pink); color: #fff; flex-shrink: 0; }
.recap-card.first .rc-new { background: #fff; color: var(--pink); }
.recap-more { display: block; margin: 0 auto; padding: 4px 8px; }
@media (prefers-reduced-motion: reduce) {
  .st-anim, .st-list .st-li, .story-blobs i, .guess-opt.right, .guess-opt.wrong { animation: none !important; }
}

/* Nouveautés + signaler un bug : en haut de Moi, bien visibles */
.about-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.about-links .link-btn { justify-content: center; padding: 11px 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 0.88rem; box-shadow: var(--shadow); }
.about-links .link-btn:active { transform: scale(0.97); }

/* Questionnaire : fenêtre « l'admin demande » et carte admin */
.quiz-ask { text-align: center; padding: 6px 4px 2px; }
.quiz-ask h2 { margin: 6px 0; font-size: 1.35rem; }
.quiz-ask p { margin: 0 0 4px; line-height: 1.4; }
.quiz-ask .link-btn { display: block; margin: 8px auto 0; }
.qa-emoji { font-size: 2.6rem; animation: stPop 0.5s ease both; }
.quiz-admin { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.qa-row { display: flex; justify-content: space-between; font-size: 0.88rem; font-weight: 600; }
.qa-bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; margin-top: 6px; }
.qa-bar span { display: block; height: 100%; background: var(--grad); border-radius: 4px; transition: width 0.4s; }

/* Glisser pour changer d'onglet : la zone ne laisse au navigateur que le défilement vertical
   (sinon il « prend » le geste dès qu'il est un peu en diagonale). */
#view { touch-action: pan-y pinch-zoom; }

/* Stats : flèches sur les bords pour passer d'un sous-onglet à l'autre (Profil ↔ Affinités ↔ Groupe) */
.edge-nav {
  position: fixed;
  top: 50%;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 44px;
  padding: 0 8px 0 4px;
  border-radius: 0 22px 22px 0;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--border);
  border-left: 0;
  color: var(--accent-text);
  font-weight: 700;
  font-size: 0.72rem;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transform: translateY(-50%);
  animation: fade 0.25s;
}
.edge-nav.prev { left: 0; }
.edge-nav.next { right: 0; flex-direction: row-reverse; padding: 0 4px 0 8px; border-radius: 22px 0 0 22px; border-left: 1px solid var(--border); border-right: 0; }
.edge-nav .ico-svg { width: 20px; height: 20px; flex-shrink: 0; }
.edge-nav.prev .ico-svg { transform: rotate(90deg); }
.edge-nav.next .ico-svg { transform: rotate(-90deg); }
/* Le nom du sous-onglet ne s'affiche que s'il y a la place (pas par-dessus les cartes sur téléphone) */
.edge-nav span { display: none; }
@media (min-width: 760px) { .edge-nav span { display: inline; } }
.edge-nav:active { transform: translateY(-50%) scale(0.94); }
.edge-nav { color: var(--accent); }
.edge-nav .ico-svg { width: 22px; height: 22px; stroke-width: 2.8; }

/* =====================================================================
   v13 : stores (signaler, bloquer, quitter, supprimer son compte, pages légales) et app mobile
   ===================================================================== */
.legal-line { font-size: 0.75rem; color: var(--muted); text-align: center; margin: 14px 0 0; }
.legal-line a, .legal-links a { color: var(--muted); }
.legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; margin-top: 0; font-size: 0.78rem; }
.legal-links a { background: none; border: 0; box-shadow: none; padding: 2px 0; }
.danger-link { color: var(--danger) !important; }
.leave-link { display: block; margin: 12px auto 0; font-size: 0.85rem; }
.fb-done { opacity: 0.55; }
.fb-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.fb-acts .link-btn { padding: 4px 0 0; font-size: 0.8rem; }
/* App mobile : pas de survol, pas de sélection de texte sur les boutons, pas de « rebond » de la page entière. */
.native body { overscroll-behavior-y: none; }
.native button { -webkit-user-select: none; user-select: none; }
.qrow-acts { display: inline-flex; gap: 6px; flex-shrink: 0; }
