:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #eef0f4;
  --border: #dcdfe6;
  --text: #1d2130;
  --muted: #687085;
  --accent: #a8701a;
  --accent-text: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--surface));
  --danger: #d0384b;
  --ok: #1f9d63;
  --warn: #c98a12;
  --mention: #fff3c4;
  --code-bg: #eceff5;
  --felt: #1f6b45;
  --felt-dark: color-mix(in srgb, var(--felt) 70%, #000);
  --sea: #cfe4f7;
  --sea-dark: #9cc4ea;
  --sq-light: #ecd9b9;
  --sq-dark: #b58863;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 25, 40, .08), 0 4px 16px rgba(20, 25, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1f2b; --surface: #132b34; --surface-2: #1c3640; --border: #2b4752; --text: #dfedf6;
    --muted: #95adbb; --accent: #dc9729; --accent-text: #1c1204; --accent-soft: color-mix(in srgb, var(--accent) 20%, var(--surface)); --danger: #f06272;
    --ok: #3cc488; --warn: #e2a73a; --mention: #4d3d17; --code-bg: #11232d; --sea: #123b52; --sea-dark: #1d5675;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1f2b; --surface: #132b34; --surface-2: #1c3640; --border: #2b4752; --text: #dfedf6;
  --muted: #95adbb; --accent: #dc9729; --accent-text: #1c1204; --accent-soft: color-mix(in srgb, var(--accent) 20%, var(--surface)); --danger: #f06272;
  --ok: #3cc488; --warn: #e2a73a; --mention: #4d3d17; --code-bg: #11232d; --sea: #123b52; --sea-dark: #1d5675;
  --shadow: 0 1px 3px rgba(0, 0, 0, .4); color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: var(--font-size, 15px); }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.online-user.off::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.online-user.off a { color: var(--muted); }
.home-welcome { font-weight: 400; margin: .4rem 0 .7rem; }
.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 700px) { .shortcuts { grid-template-columns: 1fr; } }
.shortcut { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); min-width: 0; transition: border-color .15s, background .15s; }
.shortcut:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.shortcut-ico { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 14px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--bg)); }
.shortcut-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; flex: 1; }
.shortcut-text b { font-size: 1.05rem; font-weight: 600; }
.shortcut-text span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shortcut-go { flex: none; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: .9rem;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; }
.shortcut:hover .shortcut-go { color: var(--accent); }
.vdot-tab { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.salon-count { background: var(--ok); }
.salon-pane { padding: 1rem; overflow-y: auto; flex: 1; }
.salon-pane .voice-panel { border: 0; background: none; padding: 0; }

/* ---- Mise en page : barre du haut + barre latérale ---- */
:root { --topbar-h: 56px; --sidebar-w: 76px; }
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 30; display: flex; align-items: center; gap: .8rem;
  padding: 0 1rem 0 0; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { width: var(--sidebar-w); flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-name { font-weight: 800; font-size: 1.05rem; color: var(--text); white-space: nowrap; margin-left: -.4rem; }
.search { position: relative; flex: 1; max-width: 520px; margin: 0 auto; }
.search input { padding-left: 2.2rem; border-radius: 99px; background: var(--surface-2); border-color: transparent; }
.search input:focus { background: var(--surface); }
.search .ico { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; display: flex; }
.top-right { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.points-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 99px; background: var(--surface-2); color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; transition: background .3s; }
.points-pill:hover { text-decoration: none; background: var(--accent-soft); }
.points-pill .coin { color: #d9a514; display: flex; }
.points-pill.up { background: color-mix(in srgb, var(--ok) 30%, var(--surface-2)); }
.points-pill.down { background: color-mix(in srgb, var(--danger) 25%, var(--surface-2)); }
.bell-wrap { position: relative; }
.icon-btn.round { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; position: relative; color: var(--text); }
.icon-btn .badge { position: absolute; top: 1px; right: 0; }
.me-link { display: flex; align-items: center; gap: .45rem; color: var(--text); font-weight: 600; padding: .2rem .5rem .2rem .25rem; border-radius: 99px; }
.me-link:hover { background: var(--surface-2); text-decoration: none; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; }
.conn-dot.on { background: var(--ok); }
.badge {
  display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 99px; background: var(--danger);
  color: #fff; font-size: .7rem; font-weight: 700; text-align: center; line-height: 1.3em;
}

.sidebar {
  position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: var(--sidebar-w); z-index: 25; display: flex; flex-direction: column;
  align-items: center; gap: .25rem; padding: .7rem 0; background: var(--surface); border-right: 1px solid var(--border);
}
.side-link {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem; width: 62px; padding: .5rem 0 .4rem;
  border-radius: 12px; color: var(--muted); font-size: .68rem; font-weight: 600; background: none; border: 0; cursor: pointer; font-family: inherit;
}
.side-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-link.active { background: var(--accent-soft); color: var(--accent); }
.side-link .badge { position: absolute; top: 3px; right: 9px; }
.side-spacer { flex: 1; }

.popover {
  position: fixed; z-index: 40; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 10px 40px rgba(0,0,0,.25); padding: .9rem; width: 300px; max-width: calc(100vw - 24px);
  max-height: calc(100vh - var(--topbar-h) - 24px); overflow-y: auto;
}
.popover h4 { margin: .8rem 0 .4rem; font-size: .75rem; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
.popover h4:first-child { margin-top: 0; }
.seg { display: flex; background: var(--surface-2); border-radius: 8px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; color: var(--muted); padding: .3rem; border-radius: 6px; cursor: pointer; font: inherit; font-size: .85rem; }
.seg button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.swatches { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.swatches input[type=color] { width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; }

.dropdown { position: absolute; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,.25); z-index: 40; overflow: hidden; }
.search .dropdown { left: 0; right: 0; max-height: 70vh; overflow-y: auto; }
.dd-section { padding: .3rem 0; border-bottom: 1px solid var(--border); }
.dd-section:last-child { border-bottom: 0; }
.dd-title { font-size: .7rem; text-transform: uppercase; color: var(--muted); padding: .3rem .8rem; font-weight: 700; }
.dd-item { display: flex; gap: .55rem; align-items: center; padding: .45rem .8rem; color: var(--text); cursor: pointer; }
.dd-item:hover, .dd-item.kb { background: var(--surface-2); text-decoration: none; }
.dd-item .sub { color: var(--muted); font-size: .8rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-item > div { min-width: 0; }
.dd-empty { padding: 1rem; text-align: center; color: var(--muted); }
.dd-foot { display: block; text-align: center; padding: .5rem; font-size: .85rem; border-top: 1px solid var(--border); }
mark { background: color-mix(in srgb, var(--warn) 40%, transparent); color: inherit; border-radius: 2px; }
.notif-panel { right: 0; width: 360px; max-width: calc(100vw - 24px); }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: .6rem .8rem; border-bottom: 1px solid var(--border); }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif { display: flex; gap: .6rem; padding: .6rem .8rem; color: var(--text); border-bottom: 1px solid var(--border); cursor: pointer; }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif.unread { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.notif.unread::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; margin-top: .4rem; }
.notif .txt { flex: 1; font-size: .9rem; overflow-wrap: anywhere; }

main { margin: var(--topbar-h) 0 0 var(--sidebar-w); padding: 1.2rem 16px 3rem; }
main > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
main.wide > * { max-width: none; }
main.bare { margin: 0; }

@media (max-width: 700px) {
  :root { --sidebar-w: 0px; }
  .brand { width: auto; padding-left: .8rem; }
  .brand-name, .me-link .name, .conn-dot { display: none; }
  .topbar { gap: .4rem; padding-right: .5rem; }
  .points-pill { padding: .25rem .5rem; font-size: .85rem; }
  .sidebar {
    top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 60px; flex-direction: row; justify-content: space-around;
    padding: 0 .3rem; border-right: 0; border-top: 1px solid var(--border);
  }
  .side-spacer { display: none; }
  .side-link { width: auto; flex: 1; padding: .35rem 0; }
  main { padding-bottom: 80px; }
  table.list { display: block; overflow-x: auto; }
}

/* ---- Composants ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-text); padding: .45rem .9rem; border-radius: 8px; cursor: pointer;
  font: inherit; font-weight: 600; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.small { padding: .2rem .55rem; font-size: .85rem; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.05rem; padding: .2rem .35rem; border-radius: 6px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
input, textarea, select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: .45rem .6rem; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { resize: vertical; min-height: 6rem; }
label { display: block; font-weight: 600; margin: .7rem 0 .25rem; font-size: .92rem; }
.switch-row { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
.switch-row input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; flex: none; accent-color: var(--accent); }
.form-error { color: var(--danger); margin-top: .5rem; min-height: 1.2em; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); font-size: .85rem; }
.avatar.lg { width: 96px; height: 96px; font-size: 2rem; }
.avatar.sm { width: 22px; height: 22px; font-size: .7rem; }
.avatar.md { width: 34px; height: 34px; font-size: .95rem; }
.role { font-size: .7rem; padding: .05rem .4rem; border-radius: 4px; background: var(--surface-2); color: var(--muted); text-transform: uppercase; font-weight: 700; }
.role.admin { background: var(--danger); color: #fff; }
.role.mod { background: var(--ok); color: #fff; }
.role.bot { background: var(--accent); color: var(--accent-text); }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.list th { color: var(--muted); font-size: .8rem; text-transform: uppercase; font-weight: 600; }
table.list tr:last-child td { border-bottom: 0; }
.pager { display: flex; gap: .3rem; margin: 1rem 0; flex-wrap: wrap; }
.pager a, .pager span { padding: .2rem .6rem; border-radius: 6px; border: 1px solid var(--border); }
.pager span { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.breadcrumb { color: var(--muted); margin-bottom: .8rem; font-size: .9rem; }
.empty { color: var(--muted); text-align: center; padding: 2rem 1rem; }
.tag { font-size: .75rem; padding: .05rem .45rem; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.tag.ok { background: var(--ok); color: #fff; } .tag.warn { background: var(--warn); color: #fff; }

/* ---- Toasts & lightbox ---- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: .5rem; z-index: 50; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); padding: .6rem .8rem; border-radius: 8px; box-shadow: var(--shadow); cursor: pointer; }
.toast.error { border-left-color: var(--danger); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.8); display: flex; align-items: center; justify-content: center; z-index: 60; cursor: zoom-out; }
.lightbox img { max-width: 95vw; max-height: 95vh; border-radius: 6px; }

/* ---- Authentification ---- */
.auth-box { max-width: 380px; margin: 8vh auto; }
.auth-box h1 { text-align: center; }

/* ---- Markdown ---- */
.md { overflow-wrap: anywhere; }
.md p { margin: 0 0 .5em; } .md p:last-child { margin-bottom: 0; }
.md .md-gap { height: 1.4em; }            /* ligne vide en plus, saisie par l'auteur */
.md code { background: var(--code-bg); padding: .1em .35em; border-radius: 4px; font-size: .9em; font-family: ui-monospace, Menlo, Consolas, monospace; }
.md pre { background: var(--code-bg); padding: .7rem; border-radius: 8px; overflow-x: auto; margin: .4em 0; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: .4em 0; padding: .1em .8em; border-left: 3px solid var(--border); color: var(--muted); }
.md ul, .md ol { margin: .3em 0; padding-left: 1.5em; }
.md h2, .md h3, .md h4 { margin: .7em 0 .35em; line-height: 1.25; }
.md h2 { font-size: 1.35rem; padding-bottom: .2em; border-bottom: 1px solid var(--border); }
.md h3 { font-size: 1.15rem; }
.md h4 { font-size: 1rem; }
.md > h2:first-child, .md > h3:first-child, .md > h4:first-child { margin-top: 0; }
.md hr { border: 0; border-top: 1px solid var(--border); }
.md img.md-img { max-width: min(100%, 360px); max-height: 300px; border-radius: 6px; display: block; margin: .3em 0; cursor: zoom-in; }
.md .spoiler { background: var(--text); color: transparent; border-radius: 3px; cursor: pointer; padding: 0 .2em; }
.md .spoiler.open { background: var(--surface-2); color: inherit; }
.md .mention { background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 .2em; font-weight: 600; }
.md .mention.me { background: var(--mention); color: var(--text); }

/* ---- Éditeur Markdown ---- */
.editor .toolbar { display: flex; gap: .2rem; flex-wrap: wrap; margin-bottom: .3rem; }
.editor .toolbar button svg { vertical-align: -3px; }
.editor .toolbar button { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: .15rem .5rem; cursor: pointer; font: inherit; font-size: .85rem; }
.editor .preview { border: 1px dashed var(--border); border-radius: 8px; padding: .6rem; margin-top: .4rem; min-height: 3rem; }
.drop-hint { outline: 2px dashed var(--accent) !important; }

/* ---- Forum ---- */
.cat-row td:first-child a { font-weight: 600; font-size: 1.02rem; }
.post { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; }
.post + .post { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
.post-author { text-align: center; font-size: .85rem; }
.post-author .name { font-weight: 700; display: block; margin-top: .3rem; }
.post-meta { display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: .82rem; margin-bottom: .4rem; }
@media (max-width: 640px) {
  .post { grid-template-columns: 1fr; }
  .post-author { display: flex; align-items: center; gap: .5rem; text-align: left; }
  .post-author .name { margin: 0; }
}
.topic-flags { font-size: .85rem; }

/* ---- Chat ---- */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, max-content); gap: .8rem; height: calc(100vh - var(--topbar-h) - 2.6rem); min-height: 420px; }
.chat-side { overflow-y: auto; padding: .7rem; max-width: 260px; }
.chat-layout > .card { margin: 0; }              /* pas d'écart « carte après carte » : le chat et les membres sont côte à côte */
.chat-side .online-user { white-space: nowrap; }
.chat-side .online-user .icon-btn { margin-left: auto; padding: .15rem; }
.chat-salon { display: block; flex: 1; }
.chat-side h3 { font-size: .78rem; text-transform: uppercase; color: var(--muted); margin: .8rem 0 .3rem; }
.chat-side h3:first-child { margin-top: 0; }
.room-link { display: flex; align-items: center; gap: .4rem; padding: .3rem .45rem; border-radius: 6px; color: var(--text); cursor: pointer; }
.room-link:hover { background: var(--surface-2); text-decoration: none; }
.room-link.active { background: var(--accent-soft); color: var(--accent); }
.online-user { display: flex; align-items: center; gap: .45rem; padding: .25rem .2rem; font-size: .9rem; }
.online-user::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.chat-main { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.tabs { display: flex; gap: 2px; background: var(--surface-2); padding: .35rem .35rem 0; overflow-x: auto; flex: none; }
.tab { display: flex; align-items: center; gap: .35rem; padding: .35rem .55rem .35rem .8rem; border-radius: 8px 8px 0 0; cursor: pointer; color: var(--muted); white-space: nowrap; font-size: .9rem; }
.tab.active { background: var(--surface); color: var(--text); font-weight: 600; }
.tab-add { border: 0; background: none; font: inherit; font-weight: 700; color: var(--muted); padding: .35rem .7rem; }
.tab-add:hover { background: var(--surface); color: var(--accent); }
.tab .close { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 .15rem; font-size: 1rem; line-height: 1; border-radius: 4px; }
.tab .close:hover { background: var(--border); }
.chatbox { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.messages { flex: 1; overflow-y: auto; padding: .5rem .8rem; }
.msg { display: grid; grid-template-columns: 34px 1fr; gap: .55rem; padding: .3rem .3rem; border-radius: 6px; position: relative; }
.msg:hover { background: var(--surface-2); }
.msg.cont { padding-top: 0; }
.msg.cont .avatar, .msg.cont .av-frame, .msg.cont .msg-head { visibility: hidden; height: 0; }
.msg.mentioned { background: var(--mention); }
.msg-head { display: flex; gap: .5rem; align-items: baseline; font-size: .85rem; }
.msg-head b { font-size: .95rem; }
.msg-actions { position: absolute; right: .4rem; top: .1rem; display: none; gap: .1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.msg:hover .msg-actions { display: flex; }
.msg.deleted .md { color: var(--muted); font-style: italic; }
.typing { height: 1.3rem; padding: 0 .9rem; font-size: .8rem; color: var(--muted); flex: none; }
.composer { border-top: 1px solid var(--border); padding: .5rem; display: flex; gap: .4rem; align-items: flex-end; flex: none; }
.composer textarea { min-height: 2.5rem; max-height: 10rem; resize: none; }
.emoji-pop { position: absolute; bottom: 3.5rem; left: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .4rem; display: grid; grid-template-columns: repeat(8, 1.9rem); gap: .1rem; box-shadow: var(--shadow); z-index: 5; }
.emoji-pop button { font-size: 1.2rem; background: none; border: 0; cursor: pointer; border-radius: 4px; }
.emoji-pop button:hover { background: var(--surface-2); }
.load-more { text-align: center; padding: .3rem; }
@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-main { height: 70vh; }
}

/* ---- Salle de jeux ---- */
.game-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.section-title { margin: 1.2rem auto .6rem; }   /* auto : aligné sur le contenu centré de la page */
.game-cards > .card { margin: 0; }
.game-card { text-align: center; cursor: pointer; transition: transform .1s; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .2rem; color: var(--text); }
.game-card:hover { text-decoration: none; border-color: var(--accent); }
.game-card h3 { margin: .2rem 0; }
.game-card:hover { transform: translateY(-2px); }
.game-card .icon { font-size: 2.4rem; }
.game-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; align-items: start; }
.game-layout .side { display: flex; flex-direction: column; gap: 1rem; }
.game-chat { height: 360px; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
@media (max-width: 960px) { .game-layout { grid-template-columns: 1fr; } }
.status-line { font-weight: 600; margin: .5rem 0; min-height: 1.5em; }

/* Échecs */
.chess-wrap { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.chess-board { display: grid; grid-template-columns: repeat(8, 1fr); width: min(100%, 520px); aspect-ratio: 1; border: 3px solid var(--sq-dark); border-radius: 4px; user-select: none; }
.sq { position: relative; display: flex; align-items: center; justify-content: center; font-size: clamp(1.6rem, 5.5vw, 2.9rem); cursor: pointer; line-height: 1; }
.sq.light { background: var(--sq-light); } .sq.dark { background: var(--sq-dark); }
.sq.sel { box-shadow: inset 0 0 0 4px #3a7bd5; }
.sq.last { background-image: linear-gradient(rgba(255, 230, 60, .4), rgba(255, 230, 60, .4)); }
.sq.check { background-image: radial-gradient(circle, rgba(230, 30, 30, .85) 20%, transparent 75%); }
.sq.target::after { content: ""; position: absolute; width: 28%; height: 28%; border-radius: 50%; background: rgba(20, 20, 20, .28); }
.sq.target.capture::after { width: 88%; height: 88%; background: none; border: 5px solid rgba(20, 20, 20, .28); }
.sq .coord { position: absolute; font-size: .62rem; font-weight: 700; opacity: .7; color: #3b2a1a; }
.sq .coord.f { bottom: 1px; right: 3px; } .sq .coord.r { top: 1px; left: 3px; }
.piece.w { color: #fff; text-shadow: 0 0 2px #000, 0 0 1px #000, 0 1px 2px #000; }
.piece.b { color: #111; text-shadow: 0 0 2px rgba(255,255,255,.4); }
.chess-info { flex: 1; min-width: 220px; }
.clock { font: 700 1.4rem ui-monospace, monospace; padding: .2rem .6rem; border-radius: 6px; background: var(--surface-2); }
.clock.running { background: var(--accent); color: var(--accent-text); }
.player-bar { display: flex; justify-content: space-between; align-items: center; margin: .3rem 0; gap: .5rem; }
.move-list { max-height: 260px; overflow-y: auto; font-family: ui-monospace, monospace; font-size: .9rem; display: grid; grid-template-columns: 2.5em 1fr 1fr; gap: .1rem .4rem; }
.promo { display: flex; gap: .3rem; }
.promo button { font-size: 2rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }

/* Bataille navale */
.bs-wrap { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.bs-grid-box { flex: 1 1 300px; max-width: 420px; }
.bs-grid-box h3 { text-align: center; }
.bs-grid { display: grid; grid-template-columns: 1.4rem repeat(10, minmax(0, 1fr)); grid-auto-rows: auto; width: 100%; gap: 3px; user-select: none; }
.bs-grid .lbl { display: flex; align-items: center; justify-content: center; font-size: .72rem; color: var(--muted); font-weight: 700; }
.cell { background: var(--sea); border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: .9rem; aspect-ratio: 1;
  min-width: 0; min-height: 0; overflow: hidden; line-height: 1; }
.cell.ship { background: #7c8597; }
.cell.ship.sunk, .cell.sunk { background: #5a2a2a; }
.cell.hit::after { content: "✹"; color: #ff5a3c; font-size: 1.05rem; }
.cell.miss::after { content: "•"; color: var(--muted); font-size: 1.2rem; }
.cell.preview { background: #8fbf8f; } .cell.preview.bad { background: #d98585; }
.cell.last { outline: 2px solid var(--warn); }
.bs-grid.clickable .cell:not(.hit):not(.miss):hover { background: var(--sea-dark); cursor: crosshair; }
.fleet-list { display: flex; flex-direction: column; gap: .3rem; margin: .5rem 0; }
.fleet-item { padding: .3rem .5rem; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; }
.fleet-item.sel { border-color: var(--accent); background: var(--accent-soft); }
.fleet-item.placed { opacity: .5; }

/* Poker */
.poker-table { position: relative; width: 100%; max-width: 820px; aspect-ratio: 16 / 9.5; margin: 0 auto; }
.felt { position: absolute; inset: 14% 8%; border-radius: 999px; background: radial-gradient(ellipse at center, var(--felt) 55%, var(--felt-dark)); border: 10px solid #5a3a22; box-shadow: inset 0 0 30px rgba(0,0,0,.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; color: #fff; }
.board-cards { display: flex; gap: .3rem; min-height: 3.6rem; }
.pot { font-weight: 700; background: rgba(0,0,0,.3); padding: .1rem .7rem; border-radius: 99px; }
.seat { position: absolute; transform: translate(-50%, -50%); width: 128px; text-align: center; background: var(--surface); border: 2px solid var(--border); border-radius: 10px; padding: .3rem .3rem .4rem; font-size: .82rem; box-shadow: var(--shadow); }
.seat.to-act { border-color: var(--warn); box-shadow: 0 0 0 3px rgba(226, 167, 58, .4); }
.seat.folded { opacity: .45; }
.seat.me { border-color: var(--accent); }
.seat.winner { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(60, 196, 136, .45); }
.seat .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .hole { display: flex; justify-content: center; gap: .2rem; margin: .2rem 0; min-height: 2.6rem; }
.seat .bet { position: absolute; left: 50%; transform: translateX(-50%); background: #f2c94c; color: #222; border-radius: 99px; padding: 0 .5rem; font-weight: 700; font-size: .78rem; white-space: nowrap; }
.dealer-btn { display: inline-block; width: 1.3em; height: 1.3em; border-radius: 50%; background: #fff; color: #000; border: 1px solid #999; font-weight: 800; font-size: .7rem; line-height: 1.2em; }
.pcard { width: 2.5rem; height: 3.5rem; border-radius: 5px; background: #fff; color: #111; border: 1px solid #bbb; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; line-height: 1; font-size: 1.05rem; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.pcard.red { color: #c8102e; }
.pcard.back { background: repeating-linear-gradient(45deg, #3346a8, #3346a8 4px, #2a3a8c 4px, #2a3a8c 8px); border-color: #223; }
.seat .pcard { width: 1.8rem; height: 2.5rem; font-size: .8rem; }
.pcard.hl { outline: 3px solid var(--ok); }
.poker-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; margin-top: .8rem; min-height: 2.6rem; }
.poker-actions input[type=range] { width: 160px; }
.poker-actions input[type=number] { width: 90px; }
.poker-log { max-height: 220px; overflow-y: auto; font-size: .82rem; }
.poker-log div { padding: .1rem 0; border-bottom: 1px dashed var(--border); }
@media (max-width: 640px) {
  .seat { width: 92px; font-size: .72rem; }
  .pcard { width: 1.9rem; height: 2.7rem; font-size: .85rem; }
  .seat .pcard { width: 1.4rem; height: 2rem; font-size: .66rem; }
  .poker-table { aspect-ratio: 4 / 4.2; }
  .felt { inset: 16% 4%; }
}

/* ---- Profil ---- */
.profile-head { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; }
.stat { background: var(--surface-2); border-radius: 8px; padding: .6rem; text-align: center; }
.stat b { display: block; font-size: 1.3rem; }

/* ---- Casino ---- */
.casino-card h1 { text-align: center; }
.btn.big { font-size: 1.1rem; padding: .65rem 1.6rem; }
.casino-card > .btn.big { display: flex; margin: 1rem auto 0; min-width: 220px; }
.bet-picker { justify-content: center; margin-top: 1rem; }
.chip { border: 2px dashed color-mix(in srgb, var(--warn) 70%, transparent); background: var(--surface-2); color: var(--text); width: 3.3rem; height: 3.3rem;
  border-radius: 50%; font-weight: 800; cursor: pointer; font-family: inherit; font-size: .85rem; }
.chip.on { background: var(--warn); color: #222; border-style: solid; }
.slot-machine { background: linear-gradient(180deg, #7a1f2b, #4a1018); border: 6px solid #c99a2e; border-radius: 22px; padding: 1.2rem; box-shadow: inset 0 0 24px rgba(0,0,0,.5); }
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.reel { background: #fffdf6; border-radius: 12px; aspect-ratio: 1 / 1.1; display: flex; align-items: center; justify-content: center;
  font-size: clamp(2.4rem, 9vw, 4.4rem); box-shadow: inset 0 6px 12px rgba(0,0,0,.35), inset 0 -6px 12px rgba(0,0,0,.25); }
.reel.spinning { filter: blur(1.5px); }
.slot-result { margin-top: 1rem; text-align: center; color: #fff6d8; font-weight: 700; min-height: 1.6em; font-size: 1.05rem; }
.slot-result.win { color: #8ff0b6; } .slot-result.lose { color: #ffb3b3; } .slot-result.push { color: #ffe9a8; }
.slot-result.jackpot { animation: jackpot .4s ease-in-out 6 alternate; }
@keyframes jackpot { from { transform: scale(1); } to { transform: scale(1.12); color: #ffd84d; } }
.slot-history div { display: flex; justify-content: space-between; padding: .2rem 0; border-bottom: 1px dashed var(--border); font-size: 1.05rem; }
.paysym { font-size: 1.25rem; letter-spacing: .1em; }
.bj-table { background: radial-gradient(ellipse at center, var(--felt) 55%, var(--felt-dark)); border: 8px solid #5a3a22; border-radius: 24px;
  padding: 1.2rem; color: #fff; display: flex; flex-direction: column; gap: 1rem; min-height: 340px; justify-content: space-between; }
.bj-label { font-weight: 700; text-align: center; margin-bottom: .4rem; opacity: .9; }
.bj-cards { display: flex; justify-content: center; gap: .4rem; min-height: 3.6rem; }
.bj-cards .pcard { width: 3rem; height: 4.2rem; font-size: 1.2rem; }
.bj-msg { text-align: center; font-weight: 700; background: rgba(0,0,0,.25); border-radius: 99px; padding: .35rem 1rem; align-self: center; }
.bj-msg.win { background: rgba(31, 157, 99, .75); } .bj-msg.lose { background: rgba(208, 56, 75, .75); } .bj-msg.push { background: rgba(201, 138, 18, .75); }

/* ---- Salon vocal ---- */
.voice-panel { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .5rem 1rem; border-bottom: 1px solid var(--border);
  background: var(--surface-2); flex: none; }
.voice-panel.in { background: color-mix(in srgb, var(--ok) 14%, var(--surface-2)); }
.vtitle { font-weight: 700; white-space: nowrap; }
.vmembers { display: flex; gap: .35rem; flex-wrap: wrap; flex: 1; min-width: 0; }
.vmember { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .5rem .15rem .2rem; border-radius: 99px; background: var(--surface);
  font-size: .82rem; border: 2px solid transparent; transition: border-color .1s; }
.vmember.speaking { border-color: var(--ok); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 35%, transparent); }
.vmuted { font-size: .75rem; }
.vcontrols { display: flex; gap: .3rem; }
.voice-bar { position: fixed; right: 16px; bottom: 16px; z-index: 45; display: flex; align-items: center; gap: .5rem; padding: .4rem .5rem .4rem .8rem;
  background: var(--surface); border: 1px solid var(--ok); border-radius: 99px; box-shadow: var(--shadow); }
.vdot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); animation: vpulse 1.6s infinite; }
@keyframes vpulse { 50% { opacity: .35; } }
.toasts { bottom: 70px; }
/* Téléphone : pas de pastille du salon vocal (elle masquait le bouton d'envoi) ; le point vert de l'onglet « Le salon » suffit */
@media (max-width: 700px) { .voice-bar { display: none !important; } }

/* ---- Chat façon Discord ---- */
.messages { padding: .5rem 0; }
.msg { display: block; position: relative; padding: .15rem 1rem .15rem .6rem; margin: 0 .4rem; border-radius: 10px; grid-template-columns: none; }
.msg:not(.cont) { margin-top: .55rem; }
.msg:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.msg.mentioned { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.msg.flash { animation: msgflash 1.6s ease; }
@keyframes msgflash { 0%, 40% { background: color-mix(in srgb, var(--accent) 30%, transparent); } }
.msg-row { display: grid; grid-template-columns: 44px 1fr; gap: .7rem; }
.msg-avatar .avatar { width: 40px; height: 40px; }
.msg.cont .msg-avatar { visibility: hidden; height: 0; }
.msg.cont .msg-head { display: none; }
.msg-content { min-width: 0; }
.msg-head { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.uname a { font-weight: 700; font-size: 1rem; color: var(--text); }
.uname.role-admin a { color: var(--accent); }
.uname.role-mod a { color: var(--ok); }
.uname.role-bot a { color: #7fb4ff; }
.badge-icon { font-size: .95rem; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.msg-time { color: var(--muted); font-size: .78rem; }
.md.jumbo { font-size: 2.6rem; line-height: 1.2; }
.msg-quote { display: flex; align-items: center; gap: .35rem; margin: .2rem 0 .1rem 2.2rem; font-size: .82rem; color: var(--muted);
  cursor: pointer; overflow: hidden; white-space: nowrap; }
.msg-quote::before { content: ""; width: 1.6rem; height: .7rem; border: 2px solid var(--border); border-right: 0; border-bottom: 0;
  border-top-left-radius: 6px; margin-top: .55rem; flex: none; }
.msg-quote b { color: var(--text); }
.msg-quote span { overflow: hidden; text-overflow: ellipsis; }
.msg-quote:hover span { color: var(--text); }
.msg-toolbar { position: absolute; right: .8rem; top: -1.1rem; display: none; gap: .1rem; padding: .2rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: 3; }
.msg:hover .msg-toolbar { display: flex; }
.msg-toolbar .tool { border: 0; background: none; color: var(--muted); width: 36px; height: 32px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
.msg-toolbar .tool:hover { background: var(--surface-2); color: var(--text); }
.msg-toolbar .tool.danger:hover { color: var(--danger); }
.reactions { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.reaction { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; font-size: .9rem; }
.reaction span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.reaction.mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); }
.reaction.mine span { color: var(--accent); }
.reaction.add { opacity: 0; color: var(--muted); padding: .1rem .35rem; }
.msg:hover .reaction.add { opacity: 1; }
.react-pop { position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); padding: .35rem; max-width: 330px; }
.react-quick { display: flex; gap: .15rem; align-items: center; }
.react-pop button { border: 0; background: none; font-size: 1.35rem; cursor: pointer; border-radius: 8px; padding: .15rem .3rem; color: var(--muted); }
.react-pop button:hover { background: var(--surface-2); transform: scale(1.12); }
.embeds:empty { display: none; }
.embeds { margin-top: .35rem; }
.link-card { display: flex; gap: .8rem; max-width: 520px; padding: .6rem .8rem; border-radius: 8px; background: var(--surface-2);
  border-left: 4px solid var(--accent); color: var(--text); }
.link-card:hover { text-decoration: none; filter: brightness(1.05); }
.link-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1; }
.link-site { font-size: .75rem; color: var(--muted); }
.link-text b { color: var(--accent); }
.link-desc { font-size: .85rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.link-card img { width: 90px; height: 90px; object-fit: cover; border-radius: 6px; flex: none; }
.yt-thumb { position: relative; display: block; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; max-width: 420px; width: 100%; background: #000; }
.yt-thumb img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; opacity: .9; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 46px; border-radius: 14px; background: #e62117; color: #fff;
  display: flex; align-items: center; justify-content: center; }
.yt-frame { max-width: 560px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; }
.yt-frame iframe { width: 100%; height: 100%; border: 0; }

/* Zone de saisie */
.composer-wrap { position: relative; padding: .5rem .7rem .7rem; flex: none; }
/* Message épinglé en haut d'un salon */
.pin-bar { flex: none; display: flex; align-items: flex-start; gap: .5rem; padding: .45rem .7rem; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); max-height: 40vh; overflow: auto; }
.pin-bar .pin-ico { color: var(--accent); flex: none; padding-top: .15rem; }
.pin-bar .pin-body { flex: 1; min-width: 0; cursor: pointer; font-size: .92rem; }
.pin-bar .pin-body > b { color: var(--accent); }
.pin-bar .pin-body .md { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pin-bar .poll { cursor: default; margin-top: .3rem; }
.pin-bar .pin-poll-toggle { display: flex; align-items: center; gap: .35rem; max-width: 100%; margin-top: .1rem; padding: 0;
  background: none; border: 0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.pin-bar .pin-poll-toggle svg { flex: none; color: var(--accent); transition: transform .15s; }
.pin-bar .pin-poll-toggle[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
.reply-bar { display: flex; align-items: center; gap: .45rem; padding: .35rem .7rem; margin-bottom: -.4rem; padding-bottom: .7rem;
  background: var(--surface-2); border-radius: 12px 12px 0 0; font-size: .85rem; color: var(--muted); }
.reply-bar b { color: var(--text); }
.reply-excerpt { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.composer { display: flex; align-items: flex-end; gap: .6rem; padding: .45rem .5rem .45rem 1rem; border-top: 0;
  background: color-mix(in srgb, var(--surface-2) 85%, transparent); border: 1px solid var(--border); border-radius: 22px; position: relative; }
.composer textarea { flex: 1; background: transparent; border: 0; padding: .55rem 0; min-height: 2.4rem; max-height: 10rem; resize: none; }
.composer textarea:focus { outline: none; }
.composer-tools { display: flex; gap: .4rem; align-items: center; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: inherit; flex: none; }
.round-btn:hover { color: var(--text); border-color: var(--muted); }
.round-btn.txt { font-weight: 800; font-size: .8rem; width: auto; min-width: 44px; padding: 0 .75rem; border-radius: 22px; }
.round-btn.txt.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 500; }
.round-btn.send { background: color-mix(in srgb, var(--accent) 70%, var(--surface)); color: var(--accent-text); border-color: transparent; }
.round-btn.send:hover { background: var(--accent); }
.picker { position: absolute; right: .7rem; bottom: calc(100% - .2rem); width: min(380px, calc(100% - 1.4rem)); max-height: 360px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.35); padding: .6rem; z-index: 20; }
.picker input { margin-bottom: .5rem; }
.picker-title { font-size: .75rem; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: .4rem; }
.picker-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: .1rem; }
.picker-grid button { font-size: 1.35rem; background: none; border: 0; cursor: pointer; border-radius: 8px; padding: .15rem; }
.picker-grid button:hover { background: var(--surface-2); }
.picker-grid.big { grid-template-columns: repeat(6, 1fr); }
.picker-grid.big button { font-size: 2.2rem; }
.picker-hint { margin-top: .4rem; }
.gif-grid { columns: 2; column-gap: .4rem; }
.gif-grid img { width: 100%; border-radius: 8px; margin-bottom: .4rem; cursor: pointer; display: block; break-inside: avoid; }
.gif-grid .gif-cell { position: relative; break-inside: avoid; }
.gif-grid .gif-cell img { margin-bottom: .4rem; }
.gif-grid img:hover { outline: 2px solid var(--accent); }
/* Cœur des favoris, posé dans le coin du GIF */
.gif-fav { position: absolute; top: .3rem; right: .3rem; width: 28px; height: 28px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: .85; }
.gif-fav:hover { opacity: 1; }
.gif-fav.on { color: #ff4d6d; opacity: 1; }
.gif-fav.on svg { fill: currentColor; }
.gif-tabs { display: flex; gap: .3rem; margin-bottom: .5rem; }
.gif-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: .35rem .5rem;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--muted); font: inherit;
  font-size: .85rem; font-weight: 600; cursor: pointer; }
.gif-tabs button.on { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }
.giphy-credit { text-align: right; font-size: .7rem; color: var(--muted); margin-top: .3rem; }
@media (max-width: 700px) {
  .round-btn { width: 36px; height: 36px; }
  .round-btn.txt { min-width: 36px; padding: 0 .45rem; font-size: .7rem; }
  .composer-tools { gap: .2rem; }
  .composer { flex-wrap: wrap; padding-left: .7rem; }
  .composer textarea { flex-basis: 100%; }
}

/* ---- Fins de partie ---- */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti-layer i { position: absolute; top: -20px; display: block; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { transform: translate(var(--drift), 105vh) rotate(var(--spin)); opacity: .9; } }
.endgame { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .55); animation: fade-in .25s ease; }
@keyframes fade-in { from { opacity: 0; } }
.endgame-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.6rem 1.8rem;
  text-align: center; display: flex; flex-direction: column; gap: .7rem; align-items: center; min-width: min(380px, 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: pop-in .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop-in { from { transform: scale(.6); opacity: 0; } }
.endgame.win .endgame-card { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent), 0 20px 60px rgba(0,0,0,.5); }
.endgame.loss .endgame-card { animation: pop-in .45s ease, shake .5s .45s; }
.endgame-title { font-size: 2.1rem; font-weight: 800; }
.endgame.win .endgame-title { color: var(--accent); }
.endgame-gain { font-size: 1.6rem; font-weight: 800; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.endgame.win .endgame-gain { color: var(--ok); } .endgame.loss .endgame-gain { color: var(--danger); }
.endgame-gain span { font-size: .9rem; color: var(--muted); }
.endgame-rematch { display: flex; flex-direction: column; gap: .5rem; align-items: center; padding: .8rem; border-radius: 12px; background: var(--surface-2); width: 100%; }
.endgame-close { position: absolute; top: .5rem; right: .5rem; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.rematch-banner { margin: .6rem 0; padding: .55rem .8rem; border-radius: 10px; border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.sq.mated .piece { display: inline-block; animation: shake .5s 4; }
.cell.last.hit { animation: boom .6s ease; }
@keyframes boom { 0% { transform: scale(1.6); background: #ffb347; } 100% { transform: scale(1); } }

/* ---- Barre du haut (style monospace, couleur d'accent) ---- */
.topbar { font-family: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace; gap: .7rem; }
.brand-name { color: var(--accent); letter-spacing: .02em; }
.search input { font-family: inherit; border: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 60%, var(--surface));
  padding-left: 3.6rem; height: 42px; }
.search .ico { left: 1rem; }
.search-kbd { position: absolute; left: 2.5rem; top: 50%; transform: translateY(-50%); color: var(--muted); font: inherit; pointer-events: none; }
.bonus-pill { display: inline-flex; align-items: center; gap: .4rem; height: 42px; padding: 0 1rem; border-radius: 99px; cursor: pointer;
  font: inherit; font-weight: 400; color: var(--accent); white-space: nowrap;
  border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 25%, transparent); animation: bonus-glow 2.4s ease-in-out infinite; }
.bonus-pill:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }
@keyframes bonus-glow { 50% { box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 45%, transparent); } }
.points-pill { height: 42px; padding: 0 1rem; border: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 60%, var(--surface));
  color: var(--accent); font-weight: 600; gap: .5rem; }
.points-pill .coin { color: var(--accent); }
.points-pill .currency { color: var(--muted); font-weight: 400; font-size: .85em; }
.rank-sep { width: 1px; height: 18px; background: var(--border); }
.points-pill .rank { color: var(--accent); }
.top-right .icon-btn.round { color: var(--accent); width: 42px; height: 42px; }
.me-link { color: var(--accent); }
@media (max-width: 1000px) { .points-pill .currency, .rank-sep, .points-pill .rank { display: none; } .bonus-pill { font-size: .75rem; padding: 0 .7rem; } }
@media (max-width: 700px) { .search-kbd { display: none; } .search input { padding-left: 2.2rem; }
  .topbar .bonus-pill, .topbar .points-pill { display: none; }   /* solde et bonus : page des fifrelins (menu du profil) */
  .top-right { gap: .15rem; }
  .top-right .icon-btn.round { width: 36px; height: 36px; } }
@media (max-width: 400px) { .top-right { gap: 0; } .top-right .icon-btn.round { width: 33px; height: 33px; } }

/* ---- Forum (sections, thématiques, sujets) ---- */
.accent { color: var(--accent); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.link-btn { border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; display: inline-flex; gap: .35rem; align-items: center; }
.link-btn:hover { color: var(--text); }
.forum-head, .cat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.forum-head h1, .cat-head h1 { margin: 0; font-size: 2rem; }
.forum-head p, .cat-head p { margin: .3rem 0 0; }
.cat-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cat-actions .btn.on { border-color: var(--accent); color: var(--accent); }
.forum-search { display: flex; align-items: center; gap: .6rem; padding: 0 1rem; border: 1px solid var(--border); border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 50%, var(--surface)); color: var(--muted); margin-bottom: 1rem; }
.forum-search input { border: 0; background: transparent; padding: .9rem 0; }
.forum-search input:focus { outline: none; }
.recent-box { padding: 0; }
.recent-toggle { width: 100%; display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.3rem; border: 0; background: none; color: var(--muted); cursor: pointer;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .18em; font-size: .9rem; }
.recent-toggle svg { color: var(--accent); }
#recent-list { border-top: 1px solid var(--border); }
.recent-post { display: flex; gap: .7rem; align-items: center; padding: .6rem 1.3rem; color: var(--text); border-bottom: 1px solid var(--border); }
.recent-post:hover { background: var(--surface-2); text-decoration: none; }
.recent-post > span { flex: 1; min-width: 0; }
.forum-section { padding: 0; overflow: hidden; margin-top: 1.4rem; }
.forum-section-head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.4rem; background: color-mix(in srgb, var(--surface) 70%, var(--surface-2));
  border-bottom: 1px solid var(--border); }
.forum-section-head h2 { margin: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); flex: none; }
.forum-cat { display: grid; grid-template-columns: 56px 1fr 80px 80px minmax(180px, 30%); gap: 1rem; align-items: center;
  padding: 1rem 1.4rem; border-bottom: 1px solid var(--border); color: var(--text); }
.forum-cat:last-child { border-bottom: 0; }
.forum-cat:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); text-decoration: none; }
.cat-icon { position: relative; width: 52px; height: 52px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center;
  justify-content: center; font-size: 1.6rem; }
.unread-dot { position: absolute; top: -4px; right: -4px; width: 13px; height: 13px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px var(--surface); }
.unread-dot.inline { position: static; display: inline-block; width: 9px; height: 9px; margin-right: .5rem; box-shadow: none; vertical-align: middle; }
.cat-main { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cat-main b { font-size: 1.08rem; }
.cat-count { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.cat-count b { font-size: 1.15rem; }
.cat-count small, .reply-box small { color: var(--muted); font-size: .7rem; letter-spacing: .08em; }
.cat-last { min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.sort-row { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.pill { padding: .45rem 1.1rem; border-radius: 99px; border: 1px solid var(--border); color: var(--text); }
.pill:hover { text-decoration: none; border-color: var(--muted); }
.pill.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.topic-list { padding: 0; overflow: hidden; }
.topic-row { display: grid; grid-template-columns: 64px 1fr auto 80px 130px; gap: 1rem; align-items: center; padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border); color: var(--text); }
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); text-decoration: none; }
.topic-avatar .avatar { width: 54px; height: 54px; font-size: 1.2rem; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 70%, transparent); }
.topic-main { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.topic-title { font-weight: 700; font-size: 1.08rem; }
.reply-box { display: flex; flex-direction: column; align-items: center; padding: .4rem .8rem; border-radius: 10px; background: var(--surface-2); min-width: 64px; }
.views { display: flex; align-items: center; gap: .35rem; color: var(--muted); }
.last-act { display: flex; flex-direction: column; align-items: flex-end; }
.post-tools { display: inline-flex; gap: .1rem; }
.post-tools .tool, .lb-top .tool { border: 0; background: none; color: var(--muted); width: 34px; height: 30px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
.post-tools .tool:hover, .lb-top .tool:hover { background: var(--surface-2); color: var(--text); }
.post-tools .tool.danger:hover, .lb-top .tool.danger:hover { color: var(--danger); }
.discussion-title { margin-top: 1.5rem; }
.forum-admin summary { cursor: pointer; }
.admin-rows { display: flex; flex-direction: column; gap: .5rem; }
.cat-form { display: grid; grid-template-columns: 60px 1.2fr 2fr 1fr 1fr 1fr 70px auto auto; gap: .4rem; align-items: center; }
@media (max-width: 900px) {
  .forum-cat { grid-template-columns: 48px 1fr 60px; }
  .forum-cat .cat-count:nth-of-type(2), .forum-cat .cat-last { display: none; }
  .topic-row { grid-template-columns: 48px 1fr auto; }
  .topic-row .views, .topic-row .last-act { display: none; }
  .cat-form { grid-template-columns: 1fr 1fr; }
}

/* ---- Galerie ---- */
.gallery-bar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .8rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; }
.g-item { position: relative; margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--surface-2); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.g-item:hover img { transform: scale(1.04); }
.g-item.sel { outline: 3px solid var(--accent); outline-offset: -3px; }
.g-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.g-badge, .g-comments { position: absolute; bottom: .4rem; padding: .1rem .45rem; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff;
  font-size: .75rem; display: inline-flex; gap: .25rem; align-items: center; }
.g-badge { left: .4rem; } .g-comments { right: .4rem; }
.g-check { position: absolute; top: .4rem; left: .4rem; width: 26px; height: 26px; border-radius: 6px; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; margin: 0; opacity: 0; transition: opacity .15s; }
.g-item:hover .g-check, .g-item.sel .g-check { opacity: 1; }
.g-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.gallery-drop { text-align: center; margin: .6rem 0 0; }
.upload-queue { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .6rem; }
.up-row { display: grid; grid-template-columns: 1fr 140px 190px; gap: .6rem; align-items: center; font-size: .85rem; }
.up-row progress { width: 100%; accent-color: var(--accent); }
.up-row.error small { color: var(--danger); }
.lb { position: fixed; inset: 0; z-index: 85; display: grid; grid-template-columns: 1fr 340px; background: rgba(0, 0, 0, .92); }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; }
.lb-media img, .lb-media video { max-width: calc(100vw - 360px); max-height: calc(100vh - 90px); border-radius: 6px; display: block; }
/* Flèches posées sur la photo : verre dépoli discret, flèche noire, pour laisser toute la place à l'image */
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 44px; height: 60px; border: 0; border-radius: 12px;
  font-size: 2.2rem; line-height: 1; padding: 0 0 .25rem; background: rgba(255,255,255,.28); color: #111; cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lb-nav:hover { background: rgba(255,255,255,.5); }
.lb-nav.prev { left: .6rem; } .lb-nav.next { right: .6rem; }
.lb-top { position: absolute; top: .8rem; left: 1rem; right: 1rem; display: flex; align-items: center; gap: .3rem; color: #fff; }
.lb-top .tool { color: #ddd; font-size: 1.05rem; }
.lb-side { background: var(--surface); display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--border); }
.lb-info { padding: 1rem; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: .2rem; overflow-wrap: anywhere; }
.lb-comments { flex: 1; overflow-y: auto; padding: .8rem 1rem; display: flex; flex-direction: column; gap: .7rem; }
.lb-comment { display: flex; gap: .5rem; font-size: .9rem; }
.lb-comment .icon-btn { padding: 0 .2rem; }
.lb-form { display: flex; gap: .4rem; padding: .7rem; border-top: 1px solid var(--border); }
@media (max-width: 800px) {
  .lb { grid-template-columns: 1fr; grid-template-rows: 1fr 40%; }
  .lb-media img, .lb-media video { max-width: 100vw; max-height: 55vh; }
  .up-row { grid-template-columns: 1fr 90px; } .up-row small { grid-column: 1 / -1; }
}

/* ---- Jeu des Explorateurs ---- */
.explo-card { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; margin-bottom: .5rem; color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface) 60%); }
.explo-card:hover { text-decoration: none; transform: translateY(-2px); }
.explo-card b { font-size: 1.25rem; display: block; }
.explo-emoji { font-size: 3rem; }
.explo-frame { width: 100%; height: calc(100vh - var(--topbar-h) - 5rem); min-height: 520px; border: 0; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); }
@media (max-width: 700px) { .explo-card { grid-template-columns: auto 1fr; } .explo-card .btn { grid-column: 1 / -1; } .explo-frame { height: calc(100vh - 150px); } }

/* ---- Boutique : cartes, cadres d'avatar animés, effets de pseudo ---------------------------------- */
.shop-section { margin-top: 1.6rem; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.shop-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; --rar: #9aa5ad; }
.shop-card.on { border-color: color-mix(in srgb, var(--rar) 70%, transparent); }
.shop-card.rarity-rare { --rar: #4aa3ff; }
.shop-card.rarity-epique { --rar: #b06cff; }
.shop-card.rarity-legendaire { --rar: #f0a52a; }
.shop-card.rarity-mythique { --rar: #ff5c8a; }
.shop-preview { display: grid; place-items: center; height: 150px;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--rar) 22%, transparent), transparent 70%), var(--surface-2); }
.shop-preview.name { font-size: 1.35rem; font-weight: 700; text-align: center; padding: 0 .8rem; }
.shop-preview.name .nm-title { font-size: .8rem; }
.shop-body { padding: .8rem .9rem .9rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.shop-body p { margin: 0; flex: 1; }
.shop-title { gap: .5rem; flex-wrap: nowrap; }
.rarity-pill { margin-left: auto; padding: .1rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--rar); background: color-mix(in srgb, var(--rar) 16%, transparent); white-space: nowrap; }
.shop-price { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.shop-foot a, .shop-foot a svg { vertical-align: middle; }
.shop-actions { gap: .4rem; }
.shop-actions .btn:not(.small) { width: 100%; justify-content: center; }
.shop-on { color: var(--ok); font-weight: 700; }
.shop-opt { display: flex; gap: .4rem; }
.shop-opt input[type=color] { width: 3rem; height: 2rem; padding: 0; border-radius: 6px; }
.shop-opt .seal-input { width: 5rem; text-align: center; font-size: 1.2rem; }
.shop-gift { display: flex; gap: .4rem; }
.shop-gift input { flex: 1; min-width: 0; }

/* Cadres : l'avatar garde sa taille, le cadre est dessiné autour par ::before et ::after */
.av-frame { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; vertical-align: middle; isolation: isolate; }
.av-frame > .avatar { position: relative; z-index: 1; }
.av-frame::before, .av-frame::after { content: ""; position: absolute; inset: -14%; border-radius: 50%; pointer-events: none; }
.av-frame::before { z-index: 0; }
.av-frame::after { z-index: 2; }
/* anneau : masque qui ne laisse que le bord du cercle */
.av-frame::before { -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - max(3px, 9%)), #000 calc(100% - max(3px, 9%) + 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - max(3px, 9%)), #000 calc(100% - max(3px, 9%) + 1px)); }

/* Auréole du Moine Brasseur */
.fx-halo::before { background: linear-gradient(135deg, #ffe08a, #d99a1f 55%, #fff1c2); animation: fx-breathe 2.8s ease-in-out infinite; }
.fx-halo::after { inset: -22%; background: radial-gradient(closest-side, transparent 62%, rgb(255 210 110 / .45), transparent); animation: fx-breathe 2.8s ease-in-out infinite; z-index: -1; }
/* Lanterne du Veilleur */
.fx-lanterne::before { background: conic-gradient(from 0deg, transparent 0 70%, #ffd77a 85%, #fff6d6 90%, transparent 100%), #5b4a2a; animation: fx-spin 3.2s linear infinite; }
.fx-lanterne::after { inset: -30%; background: conic-gradient(from 0deg, transparent 0 78%, rgb(255 225 140 / .35) 90%, transparent 100%); animation: fx-spin 3.2s linear infinite; z-index: -1; }
/* Luciole Vagabonde */
.fx-luciole::before { background: rgb(190 255 120 / .35); }
.fx-luciole::after { inset: -20%; background: radial-gradient(circle at 50% 4%, #f6ffb0 0 5%, rgb(200 255 90 / .7) 7%, transparent 13%);
  animation: fx-spin 4s linear infinite, fx-blink 1.3s ease-in-out infinite; }
/* Vitrail de la Chapelle */
.fx-vitrail::before { background: conic-gradient(#e94b4b, #f3b33d, #f2e14b, #4bd47a, #3fa9f5, #8a5cf6, #e94b8a, #e94b4b); animation: fx-spin 6s linear infinite; }
.fx-vitrail::after { inset: -20%; background: conic-gradient(rgb(233 75 75 / .25), rgb(63 169 245 / .25), rgb(138 92 246 / .25), rgb(233 75 75 / .25));
  filter: blur(6px); animation: fx-spin 6s linear infinite reverse; z-index: -1; }
/* Ciel des Terres du Nord */
.fx-aurore::before { background: conic-gradient(from 0deg, #2ef2a0, #3bc7d9, #8b5cf6, #2ef2a0); animation: fx-spin 7s linear infinite, fx-hue 9s ease-in-out infinite; }
.fx-aurore::after { inset: -32%; background: radial-gradient(ellipse 60% 45% at 30% 30%, rgb(46 242 160 / .45), transparent 70%),
  radial-gradient(ellipse 55% 40% at 70% 70%, rgb(139 92 246 / .45), transparent 70%); filter: blur(5px); animation: fx-sway 5s ease-in-out infinite; z-index: -1; }
/* Forge du Maître-Forgeron */
.fx-forge::before { background: conic-gradient(#ff4d00, #ffb000, #ff7a00, #c62a00, #ff4d00); animation: fx-spin 2.4s linear infinite, fx-breathe 1.2s ease-in-out infinite; }
.fx-forge::after { inset: -45% -25% -10%; border-radius: 0;
  background: radial-gradient(circle, #ffd060 0 1.5px, transparent 2.5px) 20% 100% / 30% 40%,
    radial-gradient(circle, #ff8a00 0 1.5px, transparent 2.5px) 70% 100% / 35% 45%,
    radial-gradient(circle, #ffe9a0 0 1px, transparent 2px) 45% 100% / 25% 35%;
  animation: fx-sparks 1.6s linear infinite; }
/* Écume du Kraken */
.fx-kraken::before { background: repeating-conic-gradient(from 0deg, #0b6fa4 0 8%, #34c6e0 12%, #e8fbff 15%, #0b6fa4 20%); animation: fx-spin 5s linear infinite reverse; }
.fx-kraken::after { inset: -40% -18% -12%; border-radius: 0;
  background: radial-gradient(circle, transparent 0 2px, rgb(220 250 255 / .9) 2.5px 3px, transparent 3.5px) 15% 100% / 30% 35%,
    radial-gradient(circle, transparent 0 1.5px, rgb(160 235 255 / .9) 2px 2.5px, transparent 3px) 80% 100% / 28% 30%;
  animation: fx-bubbles 2.6s linear infinite; }
/* Roses de la Ménestrelle */
.fx-roses::before { background: conic-gradient(#ff7aa8, #ffc2d6, #e0457b, #ff9cbd, #ff7aa8); animation: fx-spin 8s linear infinite; }
.fx-roses::after { inset: -28%;
  background: radial-gradient(ellipse 7% 4.5% at 50% 4%, #ff6f9c 90%, transparent),
    radial-gradient(ellipse 4.5% 7% at 96% 50%, #ffb3cb 90%, transparent),
    radial-gradient(ellipse 7% 4.5% at 50% 96%, #e0457b 90%, transparent),
    radial-gradient(ellipse 4.5% 7% at 4% 50%, #ff8fb3 90%, transparent);
  animation: fx-spin 5s linear infinite; }
/* Plumes de la Valkyrie */
.fx-valkyrie::before { background: linear-gradient(135deg, #fff4c4, #e3b341 40%, #fffbe6 60%, #c8962a); animation: fx-breathe 2.2s ease-in-out infinite; }
.fx-valkyrie::after { inset: -6% -40%; border-radius: 0; z-index: -1;
  background: radial-gradient(ellipse 14% 9% at 15% 34%, rgb(255 248 222 / 0.95) 55%, rgb(235 190 90 / .5) 78%, transparent 82%),
    radial-gradient(ellipse 15% 8% at 12% 47%, rgb(255 248 222 / 0.9) 55%, rgb(235 190 90 / .5) 78%, transparent 82%),
    radial-gradient(ellipse 12% 7% at 15% 60%, rgb(255 248 222 / 0.85) 55%, rgb(235 190 90 / .5) 78%, transparent 82%),
    radial-gradient(ellipse 14% 9% at 85% 34%, rgb(255 248 222 / 0.95) 55%, rgb(235 190 90 / .5) 78%, transparent 82%),
    radial-gradient(ellipse 15% 8% at 88% 47%, rgb(255 248 222 / 0.9) 55%, rgb(235 190 90 / .5) 78%, transparent 82%),
    radial-gradient(ellipse 12% 7% at 85% 60%, rgb(255 248 222 / 0.85) 55%, rgb(235 190 90 / .5) 78%, transparent 82%);
  filter: drop-shadow(0 0 3px rgb(255 215 120 / .6)); animation: fx-wings 2.2s ease-in-out infinite; }

@keyframes fx-spin { to { transform: rotate(1turn); } }
@keyframes fx-breathe { 0%, 100% { opacity: .75; filter: brightness(.95); } 50% { opacity: 1; filter: brightness(1.25); } }
@keyframes fx-blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes fx-hue { 50% { filter: hue-rotate(40deg); } }
@keyframes fx-sway { 50% { transform: translate(6%, -4%) rotate(12deg); } }
@keyframes fx-sparks { from { background-position-y: 100%, 100%, 100%; opacity: 1; } to { background-position-y: -40%, -60%, -30%; opacity: .2; } }
@keyframes fx-bubbles { from { background-position-y: 110%, 110%; } to { background-position-y: -40%, -30%; } }
@keyframes fx-wings { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.86); } }

/* Pseudos */
.nmw { display: inline; }
.nm-seal { margin-left: .25em; }
.xp-bar { height: 8px; margin: .6rem 0 .3rem; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.xp-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.xp-badge { margin-left: .25em; font-size: .9em; cursor: help; text-shadow: none; }
.nm-title { display: block; font-size: .72em; font-weight: 500; font-style: italic; color: var(--muted); line-height: 1.2; }
.msg-head .nm-title { display: inline; margin-left: .4em; }
.nm.fx-tison { color: #ff9a3c; text-shadow: 0 0 6px rgb(255 110 20 / .7); animation: fx-ember 1.8s ease-in-out infinite; }
.nm.fx-follet { color: var(--accent); text-shadow: 0 0 4px var(--accent), 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); animation: fx-glow 2.4s ease-in-out infinite; }
.nm.fx-grimoire { position: relative; display: inline-block; animation: fx-glitch 3.5s steps(1) infinite; }
.nm.fx-blason { background: linear-gradient(90deg, var(--c1, #dc9729), var(--c2, #e0457b)); -webkit-background-clip: text; background-clip: text;
  color: transparent; font-weight: 700; }
@keyframes fx-ember { 0%, 100% { text-shadow: 0 0 5px rgb(255 110 20 / .6); } 30% { text-shadow: 0 0 9px rgb(255 140 30 / .9), 0 -1px 2px #ffd060; }
  60% { text-shadow: 0 0 3px rgb(255 90 10 / .5); } }
@keyframes fx-glow { 50% { text-shadow: 0 0 7px var(--accent), 0 0 16px color-mix(in srgb, var(--accent) 70%, transparent); } }
@keyframes fx-glitch { 0%, 86%, 100% { transform: none; text-shadow: none; }
  88% { transform: translate(-1px, 1px); text-shadow: 2px 0 #ff3d6e, -2px 0 #2de2ff; }
  91% { transform: translate(1px, -1px) skewX(-8deg); text-shadow: -2px 0 #ff3d6e, 2px 0 #2de2ff; }
  94% { transform: translate(-1px, 0); text-shadow: 1px 0 #ff3d6e, -1px 0 #2de2ff; } }

@media (prefers-reduced-motion: reduce) {
  .av-frame::before, .av-frame::after, .nm.fx-tison, .nm.fx-follet, .nm.fx-grimoire { animation: none !important; }
}

.nmw { white-space: nowrap; }

/* ---- Sondages --------------------------------------------------------------------------------------- */
.poll { margin: .3rem 0; padding: .8rem .9rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-2) 55%, transparent); max-width: 560px; }
.topic-poll-card .poll { border: 0; padding: 0; background: none; max-width: none; }
.poll-q { font-weight: 700; margin-bottom: .55rem; }
.poll-options { display: flex; flex-direction: column; gap: .4rem; margin: 0; }
.poll-opt { position: relative; display: flex; align-items: center; gap: .5rem; padding: .45rem .65rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); overflow: hidden; cursor: pointer; }
.poll-opt input { margin: 0; width: auto; }
.poll-opt.result { cursor: default; }
.poll-opt.mine { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 22%, transparent);
  transition: width .5s ease; z-index: 0; }
.poll-label, .poll-pct, .poll-voters { position: relative; z-index: 1; }
.poll-label { flex: 1; min-width: 0; }
.poll-pct { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.poll-pct small { font-weight: 400; color: var(--muted); }
.poll-voters { display: inline-flex; align-items: center; }
.poll-voters .avatar { width: 20px; height: 20px; font-size: .6rem; margin-left: -5px; box-shadow: 0 0 0 2px var(--surface); }
.poll-foot { margin-top: .2rem; gap: .5rem; }
.poll-dialog { width: min(520px, calc(100vw - 32px)); border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); padding: 1.2rem; box-shadow: var(--shadow); }
.poll-dialog::backdrop { background: rgb(0 0 0 / .5); }
.poll-dialog h2 { margin-top: 0; }
.poll-opt-list { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .5rem; }
.poll-opt-row { flex-wrap: nowrap; gap: .4rem; }
.poll-opt-row input { flex: 1; }
.poll-settings { gap: 1rem; margin-top: .8rem; }
.poll-settings .check { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-weight: 400; }
.poll-settings .check input { width: auto; margin: 0; }
.poll-settings select { width: auto; }
.topic-poll { gap: .6rem; margin: .6rem 0; }

/* ---- Barre du haut : texte plus petit (sauf « La Taverne »), photo de profil plus grande ---------------- */
.topbar .search input, .topbar .points-pill, .topbar .bonus-pill { font-size: .88em; }
.me-link { padding: .15rem; }

/* ---- Smartphone --------------------------------------------------------------------------------------- */
@media (max-width: 700px) {
  html { font-size: calc(var(--font-size, 15px) * .92); }
  .bonus-pill { display: none !important; }
  .side-link { font-size: 0; gap: 0; }
  .side-link .badge { font-size: .62rem; top: 2px; right: calc(50% - 20px); }
  /* Chat : toute la place entre la barre du haut et le menu du bas, sans colonne ni marges */
  main.page-chat { padding: 0; }
  main.page-chat .chat-layout { display: block; height: calc(100dvh - var(--topbar-h) - 60px); min-height: 0; }
  main.page-chat .chat-side { display: none; }
  main.page-chat .chat-main { height: 100%; border: 0; border-radius: 0; box-shadow: none; }
}

/* ---- TO dans la shout ------------------------------------------------------------------------------------ */
.mute-bar { padding: .45rem 1rem; font-size: .88rem; color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.composer.muted { opacity: .55; }
.composer.muted .composer-tools { pointer-events: none; }
.mute-menu { width: auto; max-width: calc(100vw - 16px); }
.mute-chips { display: flex; gap: .3rem; flex-wrap: wrap; }
.mute-chips .chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: .85rem;
  font-weight: 600; padding: .3rem .6rem; border-radius: 99px; cursor: pointer; }
.mute-chips .chip:hover { border-color: var(--warn); color: var(--warn); }
.mute-chips .chip.lift { color: var(--ok); }
.mute-chips .chip.lift:hover { border-color: var(--ok); }
.tag.muted-tag { color: var(--warn); border-color: var(--warn); }

.members-gap { height: .9rem; }

/* ---- Fenêtre de chat : colonne Membres alignée en haut, ajustée à son contenu ; version réduite (accueil) ---- */
@media (min-width: 901px) {
  .chat-layout { align-items: start; }
  .chat-main { height: 100%; }
  .chat-layout > .chat-side { align-self: stretch; max-height: 100%; min-height: 0; }   /* même haut et même bas que le chat ; défile si besoin */
  .chat-layout.compact { height: 480px; min-height: 0; }
}
@media (max-width: 900px) { .chat-layout.compact .chat-main { height: 480px; } }
.chat-open { align-self: center; padding: 0 .7rem .3rem; font-size: .85rem; white-space: nowrap; }
@media (max-width: 600px) { .chat-open { display: none; } }

/* ---- Autocomplétion des membres ------------------------------------------------------------------------ */
.mention-pop { position: fixed; z-index: 60; min-width: 180px; max-width: 280px; padding: .3rem; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.mention-item { padding: .35rem .6rem; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.mention-item.on, .mention-item:hover { background: var(--accent-soft); }
.vhelp { font-size: .85rem; color: var(--warn); max-width: 420px; }

/* ---- Ambiance taverne pirate : salle de jeux ------------------------------------------------------------ */
:root { --wood-1: #6b4423; --wood-2: #8a5a2e; --wood-3: #4a2e16; --wood-4: #2e1d0e; --brass: #c9a04a; --brass-hi: #f0c860;
  --parchment: #f1e3c2; --parchment-ink: #4a2e16;
  --wood-planks: repeating-linear-gradient(90deg, var(--wood-1) 0 46px, var(--wood-2) 46px 48px, var(--wood-1) 48px 94px, var(--wood-3) 94px 96px); }
.tavern-title { font-family: Georgia, "Times New Roman", serif; letter-spacing: .02em; }
.tavern-title::after { content: ""; display: block; height: 6px; margin-top: .4rem; border-radius: 3px; background: var(--wood-planks); max-width: 260px; }
.section-title .emblem { display: inline-block; margin-right: .2rem; }
.game-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.game-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .game-cards.three, .game-cards.two { grid-template-columns: 1fr 1fr; } }
.game-card { padding-top: 1.4rem; padding-bottom: 1.2rem; }
.game-card:hover { border-color: var(--brass); box-shadow: 0 0 0 1px var(--wood-2) inset, var(--shadow); }
.game-card:hover .icon { animation: card-sway 1.2s ease-in-out infinite; }
.game-card.soon { border-style: dashed; cursor: default; opacity: .7; }
.game-card.soon:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }
.game-card.soon:hover .icon { animation: none; }
@keyframes card-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .game-card:hover .icon { animation: none; } }

/* ---- Échecs : cases toujours carrées, échiquier en bois ------------------------------------------------- */
.chess-wrap { justify-content: center; }
.chess-frame { padding: 10px; border-radius: 10px; background: var(--wood-planks); box-shadow: inset 0 0 0 2px var(--wood-4), 0 6px 18px rgb(0 0 0 / .35); }
.chess-board { grid-template-rows: repeat(8, minmax(0, 1fr)); width: 100%; border: 2px solid var(--wood-4); border-radius: 3px;
  container-type: inline-size; overflow: hidden; --sq-light: #ecd3a5; --sq-dark: #a8743f; }
.sq { min-width: 0; min-height: 0; aspect-ratio: 1; overflow: hidden; font-size: 10cqw; }
.sq.light { background: linear-gradient(135deg, #f0dab0, #e6c993); }
.sq.dark { background: linear-gradient(135deg, #b07c45, #976434); }
.sq.last { background-image: linear-gradient(rgb(240 180 40 / .45), rgb(240 180 40 / .45)); }
.sq .coord { font-size: max(.55rem, 2.2cqw); color: #4a2e16; font-family: Georgia, serif; }
.piece { display: inline-block; transition: transform .12s; }
.sq:hover .piece { transform: translateY(-2px) scale(1.04); }
.piece.w { color: #fbf3df; text-shadow: 0 0 1px #3a2414, 1px 0 0 #3a2414, -1px 0 0 #3a2414, 0 1px 0 #3a2414, 0 -1px 0 #3a2414, 0 3px 4px rgb(0 0 0 / .45); }
.piece.b { color: #1f140a; text-shadow: 0 0 1px #f0dab0, 0 1px 0 rgb(255 240 210 / .35), 0 3px 4px rgb(0 0 0 / .5); }

/* ---- Machine à sous : vieille machine en bois de taverne pirate ------------------------------------------- */
.slots-layout { display: grid; grid-template-columns: minmax(0, 520px) 260px; gap: 1.5rem; justify-content: center; align-items: start; }
@media (max-width: 860px) { .slots-layout { grid-template-columns: minmax(0, 1fr); } }
.slot-cabinet { position: relative; padding-right: 34px; }
.slot-crown { position: relative; height: 70px; margin: 0 18px -4px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: var(--wood-planks);
  box-shadow: inset 0 0 0 3px var(--wood-4); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px; }
.slot-crown span { font-family: Georgia, serif; font-size: 1.25rem; color: var(--brass-hi); letter-spacing: .06em; text-shadow: 0 2px 0 var(--wood-4); }
.slot-body { position: relative; border-radius: 12px; padding: 1.4rem 1.6rem 1.2rem; background: var(--wood-planks);
  box-shadow: inset 0 0 0 3px var(--wood-4), inset 0 -60px 60px -40px rgb(0 0 0 / .35), 0 10px 24px rgb(0 0 0 / .4); }
.slot-body::before, .slot-body::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: var(--wood-3); }
.slot-body::before { top: 34%; } .slot-body::after { bottom: 22%; }
.rivet { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--brass-hi), var(--brass) 55%, #7a5a1a); z-index: 1; }
.rivet.tl { top: 10px; left: 10px; } .rivet.tr { top: 10px; right: 10px; } .rivet.bl { bottom: 10px; left: 10px; } .rivet.br { bottom: 10px; right: 10px; }
.slot-window { position: relative; z-index: 1; padding: .7rem; border-radius: 12px; background: #1a1208; border: 5px solid var(--brass);
  box-shadow: inset 0 0 18px rgb(0 0 0 / .8), 0 0 0 2px var(--wood-4); }
.slot-window .reel { background: linear-gradient(180deg, #e9dcc0, #fffdf6 30%, #fffdf6 70%, #e9dcc0); }
.slot-body .slot-result { position: relative; z-index: 1; color: var(--brass-hi); font-family: Georgia, serif; text-shadow: 0 1px 0 var(--wood-4); }
.slot-plaque { position: relative; z-index: 1; margin: .8rem auto 0; max-width: 420px; padding: .5rem .7rem; border-radius: 8px;
  background: var(--wood-4); border: 2px solid var(--brass); }
.slot-plaque .bet-picker { justify-content: center; margin: 0; }
.slot-spin { position: relative; z-index: 1; display: flex; margin: .9rem auto 0; min-width: 200px; background: #a33b20; color: #fff3d6;
  border: 2px solid var(--wood-4); font-family: Georgia, serif; letter-spacing: .04em; }
.slot-lever { position: absolute; top: 120px; right: 0; width: 34px; height: 160px; border: 0; padding: 0; background: none; cursor: pointer; }
.slot-lever .stick { position: absolute; left: 13px; top: 18px; width: 8px; height: 110px; border-radius: 4px; background: linear-gradient(90deg, #8a8a8a, #d8d8d8, #8a8a8a);
  transform-origin: 50% 100%; transition: transform .25s; }
.slot-lever .knob { position: absolute; left: 3px; top: 0; width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e05a3a, #a33b20 60%, #5a1a0a);
  border: 2px solid var(--wood-4); transition: transform .25s; }
.slot-lever::after { content: ""; position: absolute; left: 0; bottom: 18px; width: 22px; height: 26px; border-radius: 4px; background: var(--brass); border: 2px solid var(--wood-4); }
.slot-lever.pulled .knob { animation: lever-pull .6s ease; }
.slot-lever.pulled .stick { animation: lever-stick .6s ease; }
@keyframes lever-pull { 40% { transform: translateY(96px); } }
@keyframes lever-stick { 40% { transform: scaleY(.15); } }
.slot-base { height: 18px; margin: -2px 14px 0; border-radius: 0 0 8px 8px; background: var(--wood-3); box-shadow: inset 0 0 0 2px var(--wood-4); }
.parchment { padding: 1rem 1.1rem; border-radius: 6px; color: var(--parchment-ink); background: linear-gradient(180deg, #f6ead0, var(--parchment) 40%, #e8d4a8);
  box-shadow: 0 6px 16px rgb(0 0 0 / .35), inset 0 0 30px rgb(120 80 30 / .25); font-family: Georgia, serif; }
.parchment h2 { color: var(--parchment-ink); font-size: 1.15rem; margin-top: 0; }
.paytable table { width: 100%; border-collapse: collapse; }
.paytable td { padding: .3rem 0; border-bottom: 1px dashed rgb(74 46 22 / .3); }
.paytable td:last-child { text-align: right; white-space: nowrap; }
.paytable .paysym { font-size: 1.15rem; letter-spacing: .05em; }
@media (prefers-reduced-motion: reduce) { .slot-lever.pulled .knob, .slot-lever.pulled .stick { animation: none; } }

/* ---- Cartes et blackjack : feutre profond, cuir clouté, dos bordeaux doré -------------------------------- */
.pcard { font-family: Georgia, "Times New Roman", serif; background: linear-gradient(180deg, #fffdf6, #f3ead6); border-color: #cbb88f; }
.pcard.back { background: repeating-linear-gradient(45deg, #7a2a1a 0 4px, #6a2214 4px 8px); border: 2px solid var(--brass); box-shadow: inset 0 0 0 2px #4a140a, 0 1px 2px rgb(0 0 0 / .4); }
.bj-layout { grid-template-columns: minmax(0, 620px) 260px; }
.bj-table { position: relative; --felt: #1d4a34; --felt-dark: #0f2a1d; border: 10px solid #3a2414;
  border-radius: 24px 24px 50% 50% / 24px 24px 38% 38%; padding: 1.2rem 1.2rem 2.4rem;
  box-shadow: 0 0 0 3px #22150a, inset 0 0 40px rgb(0 0 0 / .45), 0 10px 24px rgb(0 0 0 / .4); }
.bj-table::before { content: ""; position: absolute; inset: -7px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle, var(--brass) 1.6px, transparent 2px) 0 0 / 22px 22px; -webkit-mask: linear-gradient(#000 0 0) top / 100% 7px no-repeat; mask: linear-gradient(#000 0 0) top / 100% 7px no-repeat; }
.bj-shoe { position: absolute; top: 14px; right: 16px; width: 46px; height: 32px; border-radius: 4px; background: #2e1d0e; border: 2px solid var(--brass); }
.bj-shoe::after { content: ""; position: absolute; left: 6px; right: 6px; top: 6px; height: 16px; border-radius: 2px; background: repeating-linear-gradient(45deg, #7a2a1a 0 3px, #6a2214 3px 6px); }
.bj-arc { width: 100%; max-width: 420px; height: 44px; align-self: center; overflow: visible; }
.bj-arc text { fill: #e8cfa0; font-family: Georgia, serif; font-size: 12px; letter-spacing: .06em; opacity: .85; }
.bj-label { font-family: Georgia, serif; color: #e8cfa0; }
.bj-cards .pcard.dealt { animation: deal-in .35s ease-out both; }
.bj-cards .pcard.dealt:nth-child(2) { animation-delay: .12s; } .bj-cards .pcard.dealt:nth-child(3) { animation-delay: .24s; }
@keyframes deal-in { from { opacity: 0; transform: translate(120px, -60px) rotate(12deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bj-cards .pcard.dealt { animation: none; } }

/* ---- Poker pirate : pont en planches, cordage, coffre au trésor ----------------------------------------- */
.pk-deck { position: relative; padding: 1rem .6rem; border-radius: 14px; overflow: hidden;
  background: repeating-linear-gradient(180deg, #5a3a1e 0 46px, #4a2e16 46px 48px), #5a3a1e;
  box-shadow: inset 0 0 60px rgb(0 0 0 / .45); }
.pk-flag { position: absolute; top: 10px; right: 14px; width: 54px; height: 36px; border-radius: 2px; background: #141414; color: #e8e8e8;
  display: grid; place-items: center; font-size: 1.3rem; box-shadow: -4px 0 0 #2e1d0e; animation: flag-wave 3s ease-in-out infinite; transform-origin: left center; }
@keyframes flag-wave { 50% { transform: skewY(-4deg) scaleX(.96); } }
.poker-table.pirate .felt { --felt: #1d4a34; --felt-dark: #0e2618; border: 12px solid #2e1d0e;
  box-shadow: 0 0 0 4px #c9a04a, 0 0 0 7px #2e1d0e, inset 0 0 40px rgb(0 0 0 / .5), 0 12px 30px rgb(0 0 0 / .5); }
.poker-table.pirate .felt::before { content: ""; position: absolute; inset: -9px; border-radius: inherit; pointer-events: none;
  border: 4px dashed rgb(232 207 160 / .55); }
.pk-stage { font-size: .78rem; color: #e8cfa0; font-family: Georgia, serif; letter-spacing: .04em; }
.pcard.slot { opacity: .14; background: #fff; }
.pk-chest { position: relative; width: 44px; height: 34px; margin-top: .1rem; }
.pk-chest .box { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; border-radius: 3px; background: linear-gradient(180deg, #8a5a2e, #6b4423);
  border: 2px solid var(--brass); box-shadow: inset 0 -4px 0 rgb(0 0 0 / .25); }
.pk-chest .box::after { content: ""; position: absolute; left: 50%; top: 2px; width: 8px; height: 8px; margin-left: -4px; border-radius: 2px; background: var(--brass-hi); }
.pk-chest .lid { position: absolute; left: 0; right: 0; top: 0; height: 14px; border-radius: 10px 10px 2px 2px; background: linear-gradient(180deg, #a06a36, #7a4a1e);
  border: 2px solid var(--brass); transform-origin: 50% 100%; transition: transform .4s; z-index: 1; }
.pk-chest.open .lid { transform: rotateX(70deg) translateY(-6px); }
.pk-chest.open::before { content: "✨"; position: absolute; left: 50%; top: -16px; transform: translateX(-50%); animation: chest-shine 1s ease-in-out infinite alternate; }
.pk-chest.clink { animation: chest-clink .35s ease; }
@keyframes chest-clink { 30% { transform: translateY(-4px) rotate(-3deg); } 60% { transform: translateY(0) rotate(2deg); } }
@keyframes chest-shine { to { transform: translateX(-50%) scale(1.3); opacity: .6; } }
.poker-table.pirate .pot { background: rgb(46 29 14 / .75); color: var(--brass-hi); border: 1px solid var(--brass); font-family: Georgia, serif; }
.poker-table.pirate .seat { background: color-mix(in srgb, #2e1d0e 85%, var(--surface)); border-color: #6b4423; color: #f1e3c2; padding-top: 1rem; }
.poker-table.pirate .seat.me { border-color: var(--accent); }
.poker-table.pirate .seat.to-act { border-color: #f0b840; box-shadow: 0 0 0 3px rgb(240 184 64 / .45), 0 0 16px rgb(240 184 64 / .35); }
.poker-table.pirate .seat { padding-top: 1.5rem; }
.poker-table.pirate .seat .seat-avatar { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); }
.poker-table.pirate .seat .seat-avatar .avatar { width: 40px; height: 40px; border: 2px solid var(--brass); box-shadow: 0 2px 6px rgb(0 0 0 / .5); }
.poker-table.pirate .seat .emblem { position: absolute; right: -8px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; z-index: 3;
  display: grid; place-items: center; font-size: .7rem; background: #132b34; border: 1.5px solid var(--brass); }
@media (max-width: 640px) { .poker-table.pirate .seat .seat-avatar .avatar { width: 30px; height: 30px; } .poker-table.pirate .seat .seat-avatar { top: -16px; } }
.poker-table.pirate .seat .captain { font-size: .66rem; color: var(--brass-hi); font-family: Georgia, serif; letter-spacing: .05em; }
.poker-table.pirate .seat .bet { background: radial-gradient(circle at 35% 35%, var(--brass-hi), #d9a63a 60%, #8a6a1a); color: #2e1d0e; border: 1px solid #7a5a1a; }
.poker-table.pirate .dealer-btn { background: radial-gradient(circle at 35% 35%, #fff2b0, #e0b23a 60%, #8a6a1a); color: #2e1d0e; border-color: #7a5a1a; }
@media (prefers-reduced-motion: reduce) { .pk-flag, .pk-chest.clink, .pk-chest.open::before { animation: none; } }
@media (max-width: 640px) { .pk-flag { width: 40px; height: 26px; font-size: 1rem; } }

/* ---- Bataille navale : carte marine sur parchemin --------------------------------------------------------- */
.bs-chart { position: relative; padding: 12px; border-radius: 6px; background: linear-gradient(180deg, #f6ead0, #f1e3c2 40%, #e3cc9a);
  box-shadow: 0 6px 16px rgb(0 0 0 / .35), inset 0 0 30px rgb(120 80 30 / .3); }
.bs-chart .compass { position: absolute; right: -10px; bottom: -14px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.6rem; color: #a33b20; background: #f1e3c2; border: 2px solid #4a2e16; z-index: 1; }
.bs-chart .bs-grid .lbl { color: #4a2e16; font-family: Georgia, serif; }
.bs-chart .cell { background: color-mix(in srgb, #4f8fb0 55%, #f1e3c2); border-radius: 2px; }
.bs-chart .cell.ship { background: linear-gradient(180deg, #8a5a2e, #6b4423); box-shadow: inset 0 0 0 1px #2e1d0e; }
.bs-chart .cell.ship.sunk, .bs-chart .cell.sunk { background: #3a1a12; }
.bs-chart .cell.hit::after { content: "🔥"; font-size: .85rem; }
.bs-chart .cell.miss::after { content: "💦"; font-size: .75rem; }
.bs-chart .bs-grid.clickable .cell:not(.hit):not(.miss):hover { background: color-mix(in srgb, #2f6f90 70%, #f1e3c2); }
.bs-chart .cell.last { outline: 2px solid #a33b20; }
/* Aperçu du placement : sans ces règles, le fond bleu de la carte masquait l'aperçu vert (seul le rouge se voyait) */
.bs-chart .cell.preview { background: color-mix(in srgb, #8a5a2e 65%, #f1e3c2); box-shadow: inset 0 0 0 2px #6b4423; }
.bs-chart .cell.preview.bad { background: color-mix(in srgb, #c0392b 70%, #f1e3c2); box-shadow: inset 0 0 0 2px #7a1f16; }
.bj-layout #controls .bet-picker { justify-content: center; margin-top: 1rem; }
.bj-layout #controls > .btn.big { display: flex; margin: .8rem auto 0; min-width: 200px; }
.chess-wrap .chess-info { flex: 0 1 240px; }

/* ---- Table de jeu : le chat descend jusqu'en bas de la fenêtre de la table ------------------------------ */
@media (min-width: 961px) {
  .game-layout { align-items: stretch; }
  .game-layout .side .game-chat { flex: 1; height: auto; min-height: 320px; }
}

/* ---- Admin : journal des connexions ---------------------------------------------------------------------- */
.login-filters { gap: .8rem; margin: .4rem 0 .6rem; align-items: center; }
.auth-box .remember { display: flex; align-items: center; gap: .45rem; margin: .6rem 0 .2rem; font-weight: 400; cursor: pointer; }
.auth-box .remember input { width: auto; margin: 0; }
.login-filters .check { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-weight: 400; white-space: nowrap; }
.login-filters .check input { width: auto; margin: 0; }
.login-log td { white-space: nowrap; }
.login-log tr.log-fail td { color: var(--danger); }
.login-log tr.log-fail td a { color: inherit; }

/* ---- Admin : état du serveur ------------------------------------------------------------------------------ */
.health-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: .8rem 0; }
.health-tiles .stat { display: flex; flex-direction: column; gap: .2rem; padding: .6rem .7rem; border-radius: 8px; background: var(--surface-2); }
.probe-checks { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.tag.danger { color: var(--danger); border-color: var(--danger); }

.dc-cmd code { font-size: 1.15rem; padding: .3rem .6rem; letter-spacing: .08em; }

/* ---- Shout sur téléphone : rien ne dépasse à droite, les bords restent visibles ---------------------------- */
#home-chat, .home-top, .home-main, .chat-layout, .chat-main, .chatbox, .messages { min-width: 0; max-width: 100%; box-sizing: border-box; }
.messages { overflow-x: hidden; }
.msg { min-width: 0; max-width: 100%; box-sizing: border-box; }
.msg-row { grid-template-columns: 44px minmax(0, 1fr) auto; }   /* 3e colonne : « Vu · n » (admin) */
.msg-content, .msg-content .md, .embeds { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.msg-content .md a { word-break: break-all; }
.msg-content img, .msg-content video, .msg-content iframe, .link-card, .yt-thumb, .yt-frame { max-width: 100%; }
.link-card { box-sizing: border-box; min-width: 0; }
@media (max-width: 700px) {
  .msg { margin: 0 .2rem; padding-right: .5rem; }
  .msg-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: .5rem; }
  .msg-avatar .avatar { width: 32px; height: 32px; }
  .composer-wrap { padding: .4rem .4rem .5rem; }
  .composer { gap: .35rem; padding-left: .7rem; min-width: 0; }
  .composer textarea { min-width: 0; }
  .link-card img { width: 60px; height: 60px; }
}
.nowrap { white-space: nowrap; }

/* ---- Historique des fifrelins par jour ---------------------------------------------------------------- */
.hist-days .num { text-align: right; white-space: nowrap; }
.hist-head { cursor: pointer; }
.hist-head:hover { background: var(--surface-2); }
.hist-caret { display: inline-block; transition: transform .15s; color: var(--muted); }
.hist-day.open .hist-caret { transform: rotate(90deg); }
.hist-item { display: none; }
.hist-day.open .hist-item { display: table-row; }
.hist-item td:first-child { padding-left: 1.6rem; }

/* ---- Menu de l'avatar --------------------------------------------------------------------------------- */
.me-wrap { position: relative; }
button.me-link { border: 0; background: none; font: inherit; cursor: pointer; }
.me-menu { right: 0; width: 250px; padding: .35rem; }
.me-head { display: flex; align-items: center; gap: .6rem; padding: .45rem .5rem .6rem; margin-bottom: .25rem; border-bottom: 1px solid var(--border);
  color: var(--text); }
.me-head:hover { text-decoration: none; }
.me-head > span { display: flex; flex-direction: column; min-width: 0; }
.me-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .55rem; border: 0; border-radius: 8px; background: none;
  color: var(--text); font: inherit; font-size: .93rem; text-align: left; cursor: pointer; }
.me-item:hover { background: var(--surface-2); text-decoration: none; }
.me-item svg { color: var(--muted); flex: none; }
.me-item .me-extra { margin-left: auto; font-weight: 700; color: var(--muted); font-size: .85rem; }
.me-item.danger:hover, .me-item.danger:hover svg { color: var(--danger); }

/* ---- En-tête du profil : bannière, identité, badges, carte de niveau ------------------------------------ */
.profile-card { padding: 0; overflow: hidden; }
.p-banner { position: relative; height: 230px; background: center 50% / cover no-repeat; touch-action: none;
  background-color: var(--surface-2); }
.p-banner.empty { background-image: linear-gradient(135deg, color-mix(in srgb, var(--accent) 35%, var(--surface-2)), var(--surface-2) 70%); }
.p-banner::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; pointer-events: none;
  background: linear-gradient(transparent, color-mix(in srgb, var(--surface) 55%, transparent)); }
.p-banner.repositioning { cursor: grab; outline: 2px dashed var(--accent); outline-offset: -2px; }
.p-banner.repositioning:active { cursor: grabbing; }
.p-banner-tools, .p-banner-save { position: absolute; top: .8rem; right: .8rem; display: flex; gap: .5rem; z-index: 2; align-items: center; }
.p-banner-save > span { color: #fff; font-size: .85rem; text-shadow: 0 1px 3px #000; }
.pill-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 99px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(15, 20, 30, .62); color: #fff; font: inherit; font-size: .88rem; cursor: pointer; backdrop-filter: blur(6px); }
.pill-btn:hover { background: rgba(15, 20, 30, .8); }
.pill-btn.ok { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.p-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 1.2rem 2rem; padding: 0 1.4rem 1.3rem; }
.p-left { min-width: 0; }
.p-id { display: flex; align-items: flex-end; gap: 1.1rem; margin-top: -48px; position: relative; z-index: 1; }
.p-avatar { position: relative; flex: none; }
.p-avatar .avatar.lg { box-shadow: 0 0 0 4px var(--surface), 0 6px 18px rgba(0,0,0,.35); }
.p-cam { position: absolute; right: -4px; bottom: -4px; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface);
  background: var(--accent); color: var(--accent-text); display: grid; place-items: center; cursor: pointer; padding: 0; }
.p-name { margin: 0 0 .25rem; font-size: 1.7rem; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.p-badges { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin: .8rem 0 .4rem; }
.pbadge { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem; cursor: help;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, #f3c969 40%, var(--surface-2)), var(--surface-2) 70%);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, #d9a514 70%, transparent), 0 2px 5px rgba(0,0,0,.3); }
.pbadge.rank { box-shadow: inset 0 0 0 2px #d9a514, 0 0 0 2px color-mix(in srgb, #d9a514 30%, transparent), 0 2px 5px rgba(0,0,0,.3); }
.pbadge.more { font-size: .8rem; font-weight: 800; color: var(--muted); }
.online-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .7rem; border-radius: 99px; font-size: .85rem; font-weight: 600;
  background: color-mix(in srgb, #d9a514 16%, var(--surface-2)); color: #e7b53a; }
.online-pill span { width: 8px; height: 8px; border-radius: 50%; background: #e7b53a; }
.streak { font-weight: 800; color: #f0a43a; font-size: 1.05rem; cursor: help; }
.p-meta { font-size: .9rem; margin-bottom: .9rem; }
.p-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.p-right { display: flex; flex-direction: column; min-width: 0; }
.level-card { --lc: #a78bfa; margin-top: -60px; position: relative; z-index: 1; padding: .9rem 1.1rem; border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--lc) 55%, transparent); background: color-mix(in srgb, var(--surface) 92%, var(--lc));
  box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.lc-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.lc-rank { color: var(--lc); font-weight: 600; }
.lc-lv { font-size: 1.25rem; }
.lc-bar { height: 8px; margin: .8rem 0 .5rem; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.lc-bar span { display: block; height: 100%; border-radius: inherit; background: var(--lc); }
.lc-foot { display: flex; justify-content: space-between; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85rem; color: var(--muted); }
.p-bio { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 1rem .5rem 0; }
@media (max-width: 860px) {
  .p-body { grid-template-columns: minmax(0, 1fr); }
  .level-card { margin-top: 0; }
  .p-bio { padding-top: 0; }
}
@media (max-width: 560px) {
  .p-banner { height: 150px; }
  .p-body { padding: 0 1rem 1rem; }
  .p-id { flex-direction: column; align-items: flex-start; gap: .5rem; margin-top: -42px; }
  .p-name { font-size: 1.4rem; }
}
.msg-toolbar .tool.purge { color: #f08a24; }
.msg-toolbar .tool.purge:hover { color: #ff7a00; background: color-mix(in srgb, #ff7a00 15%, transparent); }

/* ---- Admin › Membres : actions en icônes --------------------------------------------------------------- */
.member-actions { display: flex; align-items: center; gap: .15rem; flex-wrap: nowrap; }
.act-ico { width: 34px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
.act-ico:hover { background: var(--surface-2); color: var(--text); }
.act-ico.warn:hover { color: var(--warn); }
.act-ico.ok { color: var(--ok); }
.act-ico.danger:hover { color: var(--danger); }
.act-ico.on { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }

/* ---- Sortilèges : bandeau, secousses, particules, vague, fenêtre de lancement -------------------------- */
.spell-layer { position: fixed; inset: 0; pointer-events: none; z-index: 900; overflow: hidden; }
.spell-banner { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); display: flex; align-items: center; gap: .9rem;
  max-width: min(560px, calc(100vw - 32px)); padding: .9rem 1.2rem; border-radius: 16px; pointer-events: auto;
  background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--border); box-shadow: 0 16px 50px rgba(0,0,0,.45);
  animation: spellIn .45s cubic-bezier(.2, 1.4, .4, 1); z-index: 3; flex-wrap: wrap; }
.spell-banner.out { opacity: 0; transform: translate(-50%, -12px); transition: .6s; }
.spell-emoji { font-size: 2.6rem; line-height: 1; }
.spell-text { font-size: 1.1rem; font-weight: 700; }
.spell-text b { color: var(--accent); }
.spell-by { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.spell-seisme { border-color: #c2571a; }
.spell-tsunami { border-color: #1d8fc4; }
.spell-prout { border-color: #7cae3a; }
@keyframes spellIn { from { opacity: 0; transform: translate(-50%, -30px) scale(.8); } }

body.spell-shake > *:not(.spell-layer):not(dialog) { animation: spellShake .11s linear 10; }
body.spell-quake > *:not(.spell-layer):not(dialog) { animation: spellQuake .13s linear 20; }
@keyframes spellShake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-6px, 3px) rotate(-.4deg); }
  50% { transform: translate(5px, -3px) rotate(.4deg); } 75% { transform: translate(-3px, -4px); } }
@keyframes spellQuake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-14px, 6px) rotate(-1deg); }
  40% { transform: translate(12px, -8px) rotate(1.1deg); } 60% { transform: translate(-10px, -5px) rotate(-.7deg); }
  80% { transform: translate(9px, 8px) rotate(.8deg); } }

.spell-particle { position: absolute; bottom: -3rem; opacity: 0; will-change: transform, opacity; }
.spell-particle.gas { animation: spellGas 2.6s ease-out forwards; filter: hue-rotate(40deg) saturate(1.4); }
.spell-particle.dust { top: -3rem; bottom: auto; animation: spellFall 2.4s ease-in forwards; color: #8a6a4a; }
.spell-particle.drop { top: -3rem; bottom: auto; animation: spellFall 2s ease-in forwards; }
@keyframes spellGas { 10% { opacity: .9; } to { transform: translateY(-75vh) scale(2.2); opacity: 0; } }
@keyframes spellFall { 10% { opacity: 1; } to { transform: translateY(110vh) rotate(160deg); opacity: .7; } }


.spell-dialog .spell-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: .6rem; }
.spell-pick { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .7rem .4rem; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; }
.spell-pick:hover:not(:disabled) { border-color: var(--muted); }
.spell-pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.spell-pick:disabled { opacity: .45; cursor: not-allowed; }
.spell-pick-emoji { font-size: 2rem; }
.spell-wizz { display: flex; align-items: baseline; gap: .4rem; margin-top: .8rem; font-weight: 600; flex-wrap: wrap; }
.spell-wizz input { width: auto; margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .spell-banner { animation: none; }
  body.spell-shake > *, body.spell-quake > * { animation: none !important; }
}
.spell-preview { font-size: 3.4rem; cursor: pointer; user-select: none; }
.spell-card[data-spell="wizz"] .spell-preview { cursor: default; }
.spell-banner > div { flex: 1 1 200px; min-width: 0; }

/* ---- Forum : nouvelle catégorie, nouvelle section, votes ------------------------------------------------ */
.link-btn.new-cat { color: var(--accent); font-weight: 600; font-size: .85rem; margin-left: .4rem; }
.link-btn.new-cat:hover { color: var(--text); }
.new-section { display: flex; margin: 0 auto 1rem; }
.cat-dialog select { width: 100%; }
.vote-box { display: inline-flex; flex-direction: column; align-items: center; gap: 0; min-width: 2.4rem; flex: none; }
.vote-box .vote { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .95rem; line-height: 1; padding: .15rem .4rem;
  border-radius: 6px; }
.vote-box .vote:hover { background: var(--surface-2); color: var(--text); }
.vote-box .vote.up.on { color: var(--ok); }
.vote-box .vote.down.on { color: var(--danger); }
.vote-score { font-size: .95rem; }
.topic-head { flex-wrap: nowrap; align-items: center; gap: .6rem; }
.btn.cta { background: var(--accent); color: var(--accent-text); font-weight: 700; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.btn.cta:hover { filter: brightness(1.08); }
.topic-row.with-votes { grid-template-columns: auto 64px 1fr auto 80px 130px; }
@media (max-width: 900px) { .topic-row.with-votes { grid-template-columns: auto 48px 1fr auto; } }
.forum-cat { position: relative; }
.forum-cat .cat-tools { position: absolute; top: .4rem; right: .4rem; display: flex; gap: .1rem; opacity: 0; }
.forum-cat .cat-tools .icon-btn { color: var(--muted); }
.forum-cat:hover .cat-tools, .forum-cat .cat-tools:focus-within { opacity: 1; }
.forum-cat .cat-del:hover { color: var(--danger); }
@media (hover: none) { .forum-cat .cat-tools { opacity: .7; } }
.color-sample { padding: .3rem .8rem; border-radius: 99px; border: 3px solid var(--c); color: var(--c); font-weight: 700; }

/* ---- Albums : couleur de chaque membre, encart des auteurs, tri ---------------------------------------- */
.g-item { box-shadow: inset 0 0 0 3px var(--c, transparent); }
.g-item img { border-radius: 10px; padding: 3px; box-sizing: border-box; }
.g-item.sel { box-shadow: inset 0 0 0 3px var(--c, transparent), 0 0 0 3px var(--accent); outline: none; }
.g-sort { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.g-sort select { width: auto; padding: .25rem .5rem; }
.g-original { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-weight: 400; white-space: nowrap; }
.g-original[hidden] { display: none; }
.g-original input { width: auto; margin: 0; }
.gallery-body { display: grid; grid-template-columns: 1fr; gap: .8rem; }
.g-uploaders { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; padding: .6rem .8rem; border-radius: 10px;
  background: var(--surface-2); }
.g-up-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.g-up { display: inline-flex; align-items: center; gap: .35rem; }
.g-up b { color: var(--c); }
.g-up-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
@media (min-width: 1100px) {
  .gallery-body { grid-template-columns: minmax(0, 1fr) 190px; }
  .g-uploaders { order: 2; flex-direction: column; align-items: stretch; align-self: start; }
}

/* ---- Galerie : albums en icônes de dossier ------------------------------------------------------------- */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.2rem .8rem; margin-bottom: 1rem; }
.album-icon { display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--text); text-align: center; padding: .4rem; border-radius: 12px; }
.album-icon:hover { text-decoration: none; background: var(--surface-2); }
.album-cover { position: relative; width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; display: grid; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: 0 6px 16px rgba(0,0,0,.25);
  transition: transform .15s; }
.album-icon:hover .album-cover { transform: translateY(-3px) rotate(-1deg); }
.album-cover.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; min-width: 0; min-height: 0; }
.album-empty { display: grid; place-items: center; font-size: 3.2rem; opacity: .6; }
.album-cover .unread-dot { position: absolute; top: 8px; right: 8px; }
.album-name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Shout : un message sur deux légèrement éclairci (calque blanc 1 %, noir 1 % en thème clair) ---------- */
:root { --msg-alt: rgb(0 0 0 / 1%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --msg-alt: rgb(255 255 255 / 1%); } }
:root[data-theme="dark"] { --msg-alt: rgb(255 255 255 / 1%); }
.msg:where(:nth-child(even of .msg)) { background: var(--msg-alt); }
.messages .msg { border-radius: 0; margin-left: 0; margin-right: 0; }

/* ---- « Vu » à droite des messages (admin), en bas de la ligne ------------------------------------------- */
.msg-seen { align-self: end; padding-left: .6rem; font-size: .7rem; opacity: .45;
  white-space: nowrap; cursor: default; user-select: none; }
.msg-seen:hover { opacity: .8; }
.messages .msg:not(.cont) { margin-top: 0; padding-top: .55rem; }
.messages .msg { padding-bottom: .3rem; }

@media (max-width: 520px) { .spell-dialog .spell-picks { grid-template-columns: repeat(2, 1fr); } }
.spell-amour { border-color: #e0457b; }

/* Déluge d'amour : fenêtres qui ondulent, cœurs */
body.spell-love main .card, body.spell-love .chat-main { animation: spellLove 1.2s ease-in-out 3; transform-origin: 50% 50%; }
@keyframes spellLove { 0%, 100% { transform: none; } 25% { transform: skewX(2deg) scaleY(1.01); } 50% { transform: skewX(-2deg) translateY(-3px); }
  75% { transform: skewY(.6deg) scaleX(1.01); } }
.spell-particle.heart { animation: spellHeart 3.4s ease-in-out forwards; }
@keyframes spellHeart { 10% { opacity: 1; } 55% { transform: translateY(-70vh) rotate(-15deg) scale(1.2); opacity: 1; }
  to { transform: translateY(-20vh) rotate(20deg) scale(.8); opacity: 0; } }

/* Tsunami : eau qui ruisselle du haut vers le bas, pellicule sur les fenêtres, assèchement en fondu */
.spell-flood { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(40 140 200 / .32), rgb(30 110 170 / .18) 60%, transparent);
  clip-path: inset(0 0 100% 0); animation: spellFlood 4.8s ease-in forwards; }
.spell-flood.soft { animation-duration: 3s; }
@keyframes spellFlood { 30% { clip-path: inset(0 0 0 0); opacity: 1; } 75% { clip-path: inset(0 0 0 0); opacity: .8; } to { clip-path: inset(0 0 0 0); opacity: 0; } }
.spell-stream { position: absolute; top: -10%; height: 0; border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, rgb(160 220 255 / .15), rgb(90 180 235 / .55) 80%, rgb(220 245 255 / .8));
  animation-name: spellStream; animation-timing-function: cubic-bezier(.4, 0, .9, .6); animation-fill-mode: forwards;
  filter: drop-shadow(0 2px 2px rgb(0 60 100 / .3)); }
@keyframes spellStream { 0% { height: 0; opacity: .9; } 70% { height: 115%; opacity: .9; } to { height: 115%; opacity: 0; } }
.spell-wet { position: relative; }
.spell-wet::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 5;
  background: linear-gradient(180deg, rgb(120 200 245 / .35), rgb(60 150 210 / .2) 45%, rgb(255 255 255 / .12) 50%, transparent 70%);
  background-size: 100% 220%; animation: spellWet 4.4s ease-in forwards; }
@keyframes spellWet { from { background-position: 0 100%; opacity: 0; } 15% { opacity: 1; } 70% { background-position: 0 0; opacity: 1; }
  to { background-position: 0 0; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { body.spell-love main .card { animation: none; } .spell-stream { display: none; } }

/* ---- Admin : glisser-déposer, IP bloquées, application installée ----------------------------------------- */
/* glisser-déposer (dragsort.js) */
.dragging { opacity: .55; outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: 8px; }
body.is-sorting, body.is-sorting * { cursor: grabbing !important; user-select: none; }
.blocks { display: flex; flex-direction: column; gap: .3rem; margin: .4rem 0 .8rem; padding: .6rem .8rem; border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 12%, var(--surface-2)); }
.blocks .row { gap: .6rem; align-items: center; }

/* ---- Albums : barre de sélection, colonne des commentaires masquable ------------------------------------ */
.g-select { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.g-select .row { gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.lb.no-side { grid-template-columns: 1fr; }
.lb.no-side .lb-side { display: none; }
.lb.no-side .lb-media img, .lb.no-side .lb-media video { max-width: 100vw; }
@media (max-width: 800px) { .lb.no-side { grid-template-rows: 1fr; } .g-select { align-items: stretch; } }

/* ---- Accueil : titre collé à gauche, phrase du moment ---------------------------------------------------- */
/* même largeur que le chat qui suit (sinon, limité à 1200 px et centré, il se décalait sur grand écran) */
.home-title { text-align: left; max-width: none; }
.home-title h2 { margin-bottom: .2rem; }
.home-greeting { margin: 0 0 1rem; color: var(--muted); font-style: italic; }
.casino-tag { cursor: pointer; border: 1px solid var(--warn); color: var(--warn); background: none; font: inherit; font-size: .75rem; }
.p-edit-row { display: flex; flex-wrap: wrap; gap: .4rem; width: 100%; margin-top: .2rem; }
.p-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.p-cards > .card { margin: 0; }
.p-cards + * { margin-top: 1rem; }
.card + .p-cards { margin-top: 1rem; }        /* même écart qu'entre deux cartes du profil */

/* ---- Échecs : pièces prises ---------------------------------------------------------------------------- */
.captured { display: inline-flex; align-items: center; margin-left: .5rem; font-size: 1.1rem; letter-spacing: -.25em; vertical-align: middle; }
.captured .piece { font-size: 1.1rem; }
.captured .lead { letter-spacing: 0; font-size: .8rem; font-weight: 700; color: var(--muted); margin-left: .45rem; }

/* ---- Bataille navale : flotte en silhouettes ------------------------------------------------------------ */
.bs-fleet { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .7rem; justify-content: center; }
.bs-ship { display: inline-flex; align-items: center; gap: 2px; opacity: .55; }
.bs-ship small { margin-left: .35rem; font-size: .7rem; color: var(--muted); }
.bs-ship .seg { width: 14px; height: 14px; border-radius: 3px; background: color-mix(in srgb, #8a5a2e 45%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #6b4423 60%, transparent); }
.bs-ship .seg.hit { background: #d9542f; box-shadow: inset 0 0 0 1px #7a1f16; }
.bs-ship:has(.seg.hit) { opacity: .85; }
.bs-ship.sunk { opacity: 1; }
.bs-ship.sunk .seg { background: #3a1a12; box-shadow: inset 0 0 0 1px #d9542f; }
.bs-ship.sunk small { text-decoration: line-through; }

/* ---- Envoi de photos : file d'attente ------------------------------------------------------------------- */
.up-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .5rem .7rem; border-radius: 10px;
  background: var(--surface-2); font-size: .9rem; }
.up-head progress { flex: 1; min-width: 120px; accent-color: var(--accent); }
.up-fail { color: var(--danger); font-weight: 700; }
.up-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Albums : téléchargement complet, journal ------------------------------------------------------------ */
.album-icon { position: relative; }
.album-dl { position: absolute; top: .9rem; right: .9rem; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(0 0 0 / .55); color: #fff; opacity: 0; transition: opacity .15s; cursor: pointer; z-index: 2; }
.album-icon:hover .album-dl, .album-dl:focus { opacity: 1; }
.album-dl:hover { background: var(--accent); color: var(--accent-text); }
@media (hover: none) { .album-dl { opacity: .85; } }
.dl-pop { position: absolute; width: min(460px, calc(100vw - 16px)); max-height: 60vh; overflow-y: auto; }

/* ---- Profil : cadre et effet du pseudo équipables sur place -------------------------------------------- */
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; margin-bottom: .7rem; }
.coll-item { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .7rem .4rem; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; }
.coll-item:hover { border-color: var(--muted); }
.coll-item.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); }
.coll-prev { min-height: 100px; display: grid; place-items: center; }
.coll-prev.name { min-height: 3rem; font-size: 1.1rem; font-weight: 700; }
.coll-item small { text-align: center; color: var(--muted); }
.coll-opt { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .4rem 0; }
.coll-opt label { margin: 0; min-width: 9em; }
.coll-opt input[type=color] { width: 48px; height: 36px; padding: 2px; }
.coll-opt input:not([type=color]) { width: 220px; }

/* ---- Bandeau d'annonce de l'admin ------------------------------------------------------------------------ */
:root { --announce-h: 0px; }
main { margin-top: calc(var(--topbar-h) + var(--announce-h)); }
.announce-bar { position: fixed; top: var(--topbar-h); left: var(--sidebar-w); right: 0; z-index: 28; display: flex; align-items: center;
  gap: .55rem; padding: .25rem .9rem; overflow: hidden; color: var(--accent-text); font-size: .92rem;
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 85%, var(--bg)); border-left: 0; border-right: 0; }
.announce-bar::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .16) 50%, transparent 70%);
  transform: translateX(-100%); animation: announceShine 6s ease-in-out infinite; }
@keyframes announceShine { 0%, 60% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }
.announce-ico { flex: none; display: grid; place-items: center; }
.announce-ico svg { width: 17px; height: 17px; }
.announce-text { flex: 1; min-width: 0; font-weight: 600; line-height: 1.3; }
.announce-text a { color: inherit; text-decoration: underline; }
.announce-text p { margin: 0; }
.announce-close { flex: none; border: 0; background: none; color: inherit; width: 24px; height: 24px; border-radius: 50%; opacity: .75;
  cursor: pointer; display: grid; place-items: center; padding: 0; }
.announce-close:hover { opacity: 1; background: rgb(0 0 0 / .12); }
.announce-close svg { width: 15px; height: 15px; }
.announce-bar.preview { position: relative; top: auto; left: auto; right: auto; margin-top: .8rem; border-radius: 10px;
  border-left: 1px solid color-mix(in srgb, var(--accent) 85%, var(--bg)); border-right: 1px solid color-mix(in srgb, var(--accent) 85%, var(--bg)); }
.announce-dialog { width: min(640px, calc(100vw - 32px)); }
@media (max-width: 700px) {
  .announce-bar { left: 0; padding: .25rem .6rem; gap: .45rem; font-size: .86rem; }
  main.page-chat .chat-layout { height: calc(100dvh - var(--topbar-h) - var(--announce-h) - 60px); }
}
@media (prefers-reduced-motion: reduce) { .announce-bar::before { animation: none; } }
.chat-layout:not(.compact) { height: calc(100vh - var(--topbar-h) - var(--announce-h) - 2.6rem); }
@media (max-width: 900px) { .chat-layout:not(.compact) { height: auto; } }

/* ---- Salon vocal : journal des entrées et sorties ---------------------------------------------------- */
.vlog { margin-top: .8rem; font-size: .85rem; }
.vlog summary { cursor: pointer; color: var(--muted); font-weight: 600; display: flex; gap: .6rem; align-items: center; }
/* la barre de défilement a sa place réservée : les ✕ restent à sa gauche au lieu de passer dessous */
.vlog ul { list-style: none; padding: 0 .5rem 0 0; margin: .4rem 0 0; max-height: 220px; overflow-y: auto; scrollbar-gutter: stable; }
.vlog-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.vlog-dot.in { background: var(--ok); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 25%, transparent); }
.vlog-dot.out { background: #fff; border: 1px solid color-mix(in srgb, var(--muted) 60%, transparent); }
.vlog li { display: flex; align-items: center; gap: .45rem; padding: .15rem 0; }
.vlog li .icon-btn { margin-left: auto; padding: 0 .3rem; opacity: .5; }
.vlog li .icon-btn:hover { opacity: 1; color: var(--danger); }
.notif-prefs td:not(:first-child), .notif-prefs th:not(:first-child) { text-align: center; width: 70px; }
.notif-prefs input { width: auto; margin: 0; }

/* ---- Jukebox ------------------------------------------------------------------------------------------- */
.home-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 1.1fr); gap: 1rem; align-items: stretch; margin-bottom: 1rem; }
.home-row > .card { margin: 0; }
.shortcuts.stacked { grid-template-columns: 1fr; margin-bottom: 0; }
@media (max-width: 860px) { .home-row { grid-template-columns: 1fr; } }
.jukebox { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: .9rem; align-items: center; padding: .8rem; }
.jb-cover { width: 112px; height: 112px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center;
  color: var(--muted); box-shadow: 0 4px 14px rgb(0 0 0 / .25); }
.jb-cover img { width: 100%; height: 100%; object-fit: cover; }
.jb-main { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.jb-head { display: flex; align-items: center; gap: .5rem; }
.jb-title { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--accent); }
.jb-song { font-size: 1rem; }
.jb-btn { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 99px; padding: .2rem .65rem;
  font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.jb-btn:hover { border-color: var(--accent); color: var(--accent); }
.jb-btn.small { padding: .1rem .5rem; font-size: .75rem; }
.jb-bar { height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: .25rem; }
.jb-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width 1s linear; }
.jb-time { font-variant-numeric: tabular-nums; }
.jb-empty { margin: .2rem 0; }
.jb-controls { display: flex; align-items: center; gap: .35rem; margin-top: .35rem; flex-wrap: wrap; }
.jb-ctl { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 44px; height: 42px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 1.05rem;
  cursor: pointer; padding: 0 .4rem; line-height: 1; }
.jb-ctl small { font-size: .62rem; font-weight: 700; color: var(--muted); margin-top: .15rem; }
.jb-ctl:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.jb-ctl:disabled { opacity: .45; cursor: not-allowed; }
.jb-ctl.add { background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); }
.jb-controls input[type=range] { width: 80px; margin-left: auto; accent-color: var(--accent); }
.jb-playlist { position: fixed; width: min(380px, calc(100vw - 16px)); max-height: 60vh; overflow-y: auto; z-index: 70; }
.jb-queue { margin: .3rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .4rem; counter-reset: q; }
.jb-queue li { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto auto; gap: .5rem; align-items: center; font-size: .86rem; }
.jb-queue li img { width: 54px; height: 32px; object-fit: cover; border-radius: 5px; }
.jb-q-text { display: flex; flex-direction: column; min-width: 0; }
/* Lecteur YouTube invisible : on n'entend que la musique */
.jb-video { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.jb-video iframe { width: 200px; height: 113px; border: 0; }
.jb-pill { display: inline-flex; align-items: center; gap: .35rem; max-width: 220px; padding: .3rem .7rem; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: .8rem; }
.jb-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Casque de la barre du haut : jukebox écouté (couleur d'accent) ou non (estompé) */
.top-right .icon-btn.jb-listen:not(.on) { color: var(--muted); }
.top-right .jb-listen.blocked { opacity: .5; }
@media (max-width: 1000px) { .jb-pill { display: none !important; } }
@media (max-width: 480px) { .jukebox { grid-template-columns: 80px minmax(0, 1fr); } .jb-cover { width: 80px; height: 80px; } }
.jb-dialog input[name=q] { width: 100%; }
.jb-results { display: flex; flex-direction: column; gap: .3rem; margin-top: .6rem; max-height: 50vh; overflow-y: auto; }
.jb-result { display: grid; grid-template-columns: 96px 1fr; gap: .7rem; align-items: center; padding: .4rem; border-radius: 10px; border: 1px solid transparent;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.jb-result:hover { border-color: var(--accent); background: var(--surface-2); }
.jb-result img { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; }
.jb-result span { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }

/* ---- Menu ✉ : conversations privées ------------------------------------------------------------------------ */
.dm-pop { width: 340px; padding: .7rem; }
.dm-item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem; border: 0; border-radius: 8px; background: none;
  color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.dm-item:hover { background: var(--surface-2); }
.dm-item .avatar { width: 34px; height: 34px; }
.dm-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.dm-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.dm-last { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-item.unread .dm-last { color: var(--text); font-weight: 600; }
.dm-item .badge { position: static; flex: none; }

/* Téléphone : pas de liste des membres à côté du chat (accueil compris) */
@media (max-width: 700px) { .chat-layout .chat-side { display: none; } }

/* Séparateur du premier message privé non lu */
.unread-sep { display: flex; align-items: center; gap: .6rem; margin: .4rem .8rem; color: var(--danger); font-size: .75rem; font-weight: 700; }
.unread-sep::before, .unread-sep::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--danger) 55%, transparent); }

/* ---- Forum : réorganisation en place (admin) ----------------------------------------------------------------- */
.drag-grip { display: grid; place-items: center; color: var(--muted); cursor: grab; touch-action: none; border-radius: 6px; }
.drag-grip:hover { color: var(--text); background: var(--surface-2); }
.sec-grip { margin-left: -.6rem; padding: .15rem; }
.forum-cat .cat-grip { position: absolute; left: .15rem; top: 50%; translate: 0 -50%; padding: .25rem .05rem; opacity: 0; }
.forum-cat:hover .cat-grip { opacity: 1; }
@media (hover: none) { .forum-cat .cat-grip { opacity: .6; } }
.sec-tools { display: flex; gap: .1rem; }
.sec-tools .icon-btn { color: var(--muted); }
.sec-tools .cat-del:hover { color: var(--danger); }
.cat-list { min-height: 2.6rem; }
.cat-list:has(.forum-cat) > .cat-empty { display: none; }
.forum-section.dragging, .forum-cat.dragging { outline-offset: -2px; }
.cat-list > a.forum-cat:last-of-type { border-bottom: 0; }

/* ---- Sujet « Playlist du jukebox » ---------------------------------------------------------------------------- */
.playlist-card .pl-wrap { overflow-x: auto; margin-top: .8rem; }
.playlist { width: 100%; border-collapse: collapse; font-size: .92rem; }
.playlist th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  padding: .4rem .6rem; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; white-space: nowrap; }
.playlist th::after { content: attr(data-dir); margin-left: .3rem; }
.playlist td { padding: .45rem .6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.playlist td.num { text-align: center; }
.pl-track { display: flex; align-items: center; gap: .6rem; color: var(--text); min-width: 220px; }
.pl-track img { width: 64px; height: 36px; object-fit: cover; border-radius: 5px; flex: none; }
.pl-track span { display: flex; flex-direction: column; min-width: 0; }

/* ---- Album : barre d'outils, filtre, pastille commentaire ------------------------------------------------- */
.g-filter-btn.on { color: var(--accent); border-color: var(--accent); }
.g-filter-pop { width: 240px; }
.g-filter-pop .check { display: flex; align-items: center; gap: .45rem; margin: .25rem 0; font-weight: 400; cursor: pointer; }
.g-filter-pop .check input { width: auto; margin: 0; }
.g-filter-pop .link-btn { margin-top: .6rem; }
.g-item .g-comments { top: .4rem; right: .4rem; bottom: auto; display: inline-flex; align-items: center; gap: .2rem;
  padding: .15rem .4rem; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: .72rem; }
.g-item .g-comments svg { stroke-width: 2.2; }

/* ---- Visionneuse : languette qui replie ou rouvre la colonne des commentaires ------------------------------ */
/* Collée au bord de la colonne, petite et sans fond rond : rien à voir avec les flèches ‹ › de défilement */
.lb-fold { position: absolute; right: 0; top: 50%; translate: 0 -50%; z-index: 2; width: 22px; height: 64px; padding: 0;
  display: grid; place-items: center; border: 1px solid var(--border); border-right: 0; border-radius: 10px 0 0 10px;
  background: var(--surface); color: var(--muted); cursor: pointer; }
.lb-fold:hover { color: var(--text); background: var(--surface-2); }
.lb .lb-nav.next { right: 2rem; }
@media (max-width: 800px) {
  .lb-fold { top: auto; bottom: 0; right: 50%; translate: 50% 0; width: 64px; height: 22px; border: 1px solid var(--border);
    border-bottom: 0; border-radius: 10px 10px 0 0; }
  .lb-fold svg { rotate: 90deg; }
  .lb .lb-nav.next { right: .6rem; }
}

/* ---- Page Membres ---------------------------------------------------------------------------------------- */
.tap-activity .member-card { cursor: pointer; }
.members-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.members-tools input[type=search] { flex: 1 1 12rem; width: auto; }
.members-tools select { width: auto; flex: 0 1 auto; }
.members-tools .m-check { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; cursor: pointer; }
.members-tools .m-check input { width: auto; margin: 0; }
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: .8rem; margin-top: 1rem; }
.member-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 10px); padding: .8rem;
  display: flex; flex-direction: column; gap: .45rem; position: relative; min-width: 0; }
.member-card .mc-head { display: flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; min-width: 0; }
.member-card .mc-id { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.member-card .mc-av { position: relative; flex: none; }
.avatar.mc { width: 52px; height: 52px; font-size: 1.3rem; }
.member-card .mc-dot { position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--surface); }
.member-card.online .mc-dot { background: var(--ok); }
.mc-infos { display: flex; flex-wrap: wrap; gap: .3rem .7rem; font-size: .85rem; }
.mc-skills { display: flex; flex-wrap: wrap; gap: .3rem; }
.skill { font: inherit; font-size: .78rem; padding: .1rem .55rem; border-radius: 99px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); }
.skill:hover { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.mc-actions { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-top: auto; }
.friend-requests .row { padding: .3rem 0; gap: .5rem; }
.members-all { display: block; margin-top: .6rem; }

/* ---- Profil : savoir-faire et infos ----------------------------------------------------------------------- */
.p-skills { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .7rem; }
.p-skills b { margin-right: .2rem; }
a.skill { text-decoration: none; }
.p-infos { margin-top: .5rem; }
.skills-editor { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; padding: .35rem; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface-2); }
.skills-editor .skills-list { display: contents; }
.skills-editor input { flex: 1 1 10rem; border: 0; background: transparent; margin: 0; min-width: 8rem; }
.skill-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 0 0 .15rem; font-size: 1rem; line-height: 1; }
.skill-x:hover { color: var(--danger, #d0384b); }
.private-grid { display: grid; grid-template-columns: auto 1fr auto; gap: .45rem .6rem; align-items: center; }
.private-grid label { margin: 0; white-space: nowrap; }
.private-grid input, .private-grid select { margin: 0; }
@media (max-width: 600px) { .private-grid { grid-template-columns: 1fr; } .private-grid select { margin-bottom: .4rem; } }

/* ---- Admin d'un membre (menu ⋯) et infobulle d'activité -------------------------------------------------- */
.mc-more { font-size: 1.2rem; line-height: 1; padding: .1rem .45rem; }
.member-menu { position: absolute; z-index: 60; width: min(300px, calc(100vw - 16px)); padding: .5rem; display: flex; flex-direction: column; gap: .25rem; }
.member-menu .mm-head { padding: .2rem .3rem .4rem; border-bottom: 1px solid var(--border); margin-bottom: .2rem; }
.member-menu .mm-row { display: flex; align-items: center; gap: .4rem; padding: .2rem .3rem; margin: 0; }
.member-menu .mm-row input, .member-menu .mm-row select { margin: 0; flex: 1; min-width: 0; }
.member-menu .mm-item { display: flex; align-items: center; gap: .5rem; padding: .4rem .45rem; border: 0; background: none; color: var(--text);
  font: inherit; text-align: left; border-radius: 6px; cursor: pointer; text-decoration: none; }
.member-menu .mm-item:hover { background: var(--surface-2); }
.member-menu .mm-item.warn { color: var(--warn); } .member-menu .mm-item.danger { color: var(--danger, #d0384b); }
.activity-tip { position: absolute; z-index: 55; width: min(360px, calc(100vw - 16px)); background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: .6rem .75rem; box-shadow: 0 10px 28px rgb(0 0 0 / .35); font-size: .88rem; }
.activity-tip ul { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.activity-tip li { display: flex; gap: .5rem; align-items: baseline; }
.activity-tip li .muted { flex: none; min-width: 6.5rem; }

/* ---- Carte collaborative --------------------------------------------------------------------------------- */
.carte { display: grid; grid-template-columns: 1fr minmax(280px, 340px); gap: .8rem; margin: .8rem 0 1rem; }
.carte-map { height: min(72vh, 720px); min-height: 360px; border-radius: var(--radius, 10px); border: 1px solid var(--border); z-index: 0; }
.carte-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 10px); display: flex;
  flex-direction: column; max-height: min(72vh, 720px); min-height: 360px; overflow: hidden; }
.carte-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.carte-tabs button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: .25rem; padding: .45rem .3rem;
  border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; border-bottom: 2px solid transparent; }
.carte-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.carte-body { padding: .7rem; overflow-y: auto; flex: 1; }
.carte-body h3 { margin: .2rem 0 .5rem; }
.carte-layer { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.carte-layer .dot { width: 11px; height: 11px; }
.carte-check { display: inline-flex; align-items: center; gap: .35rem; margin: 0; cursor: pointer; }
.carte-check input { width: auto; margin: 0; }
.carte-form label { margin-top: .5rem; display: block; }
.carte-form fieldset { border: 1px solid var(--border); border-radius: 8px; margin: .7rem 0 0; padding: .4rem .6rem .6rem; }
.carte-form legend { font-size: .85rem; color: var(--muted); padding: 0 .3rem; }
.carte-pair { gap: .4rem; align-items: center; flex-wrap: nowrap; margin-top: .3rem; }
.carte-pair input:not([type=color]) { flex: 1; min-width: 0; margin: 0; }
.carte-pair input[type=number] { max-width: 6rem; }
.carte-pair input[name=icon] { flex: 0 0 3.6rem; text-align: center; }
.carte-form input[type=color] { width: 2.6rem; height: 2rem; padding: 0 .1rem; margin: 0; }
.carte-photos { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0; align-items: center; }
.carte-photos img { width: 74px; height: 74px; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.carte-photo { position: relative; }
.carte-photo button { position: absolute; top: 2px; right: 2px; border: 0; border-radius: 50%; width: 20px; height: 20px; line-height: 18px;
  background: rgb(0 0 0 / .6); color: #fff; cursor: pointer; padding: 0; }
.carte-log { padding: .3rem 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.carte-log[data-goto] { cursor: pointer; } .carte-log[data-goto]:hover { background: var(--surface-2); }
.carte-log .muted { margin-right: .3rem; }
.carte-zone { padding: .25rem 0; }
.carte-pin { background: none; border: 0; }
.carte-pin span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); background: var(--c, #dc9729); box-shadow: 0 2px 6px rgb(0 0 0 / .4); }
.carte-pin span i { transform: rotate(45deg); font-style: normal; line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.carte-pin.carte-blink span, path.carte-blink { animation: carte-blink 1s ease-in-out infinite; }
@keyframes carte-blink { 50% { opacity: .25; } }
.leaflet-container { font: inherit; background: var(--surface-2); }
.leaflet-popup-content-wrapper, .leaflet-tooltip { background: var(--surface); color: var(--text); }
@media (max-width: 900px) {
  .carte { grid-template-columns: 1fr; }
  .carte-map { height: 58vh; }
  .carte-panel { max-height: none; min-height: 0; }
}

/* ---- Documents partagés ---------------------------------------------------------------------------------- */
.doc-list { padding: .3rem .6rem; }
.doc-list.drag { outline: 2px dashed var(--accent); outline-offset: -6px; }
.doc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: .8rem; align-items: center; padding: .45rem .2rem;
  border-bottom: 1px solid var(--border); }
.doc-row:last-child { border-bottom: 0; }
.doc-name { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; min-width: 0; }
.doc-name b { overflow-wrap: anywhere; }
.doc-ico { font-size: 1.5rem; flex: none; }
.doc-meta { white-space: nowrap; }
.doc-head { gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.doc-frame { width: 100%; height: calc(100vh - 190px); min-height: 480px; border: 1px solid var(--border); border-radius: var(--radius, 10px); background: #fff; }
.doc-dialog input, .doc-dialog select { width: 100%; }
@media (max-width: 700px) {
  .doc-row { grid-template-columns: minmax(0, 1fr) auto; }
  .doc-row .doc-meta { display: none; }
  .doc-frame { height: calc(100vh - 150px); }
}

/* ---- Calendrier (FullCalendar suit le thème du site) ---------------------------------------------------------- */
.agenda { display: grid; grid-template-columns: minmax(220px, 260px) 1fr; gap: .8rem; align-items: start; }
.agenda-side h2 { display: flex; align-items: center; gap: .4rem; margin-top: 0; }
.agenda-cal { display: flex; align-items: center; gap: .4rem; padding: .3rem 0; border-bottom: 1px solid var(--border); }
.agenda-cal .carte-check { flex: 1; min-width: 0; }
.agenda-journal { margin-top: .8rem; } .agenda-journal summary { cursor: pointer; font-size: .9rem; }
.agenda-log div { padding: .2rem 0; border-bottom: 1px solid var(--border); }
.agenda-main { padding: .6rem; overflow-x: auto; }
.agenda-fc {
  --fc-border-color: var(--border); --fc-page-bg-color: var(--surface); --fc-neutral-bg-color: var(--surface-2);
  --fc-neutral-text-color: var(--muted); --fc-list-event-hover-bg-color: var(--surface-2);
  --fc-today-bg-color: color-mix(in srgb, var(--accent) 14%, transparent);
  --fc-button-bg-color: var(--surface-2); --fc-button-border-color: var(--border); --fc-button-text-color: var(--text);
  --fc-button-hover-bg-color: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); --fc-button-hover-border-color: var(--accent);
  --fc-button-active-bg-color: var(--accent); --fc-button-active-border-color: var(--accent);
  --fc-event-border-color: transparent; --fc-now-indicator-color: var(--danger, #e74c3c);
  --fc-highlight-color: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text); font-size: .92rem;
}
.agenda-fc .fc-button-primary:not(:disabled).fc-button-active { color: var(--accent-text, #111); }
.agenda-fc .fc-toolbar-title { font-size: 1.25rem; text-transform: capitalize; }
.agenda-fc .fc-col-header-cell-cushion, .agenda-fc .fc-daygrid-day-number, .agenda-fc .fc-list-day-text,
.agenda-fc .fc-list-day-side-text { color: var(--text); text-decoration: none; }
.agenda-fc .fc-list-day-cushion { background: var(--surface-2); }
.agenda-fc .fc-list-event:hover td { background: var(--surface-2); }
.agenda-fc .fc-daygrid-event { border-radius: 4px; }
.agenda-fc .fc-popover { background: var(--surface); border-color: var(--border); }
.agenda-fc .fc-popover-header { background: var(--surface-2); color: var(--text); }
.agenda-dialog { width: min(560px, calc(100vw - 24px)); }
.agenda-form input:not([type=checkbox]):not([type=color]), .agenda-form select { width: 100%; }
.agenda-dates { gap: .6rem; flex-wrap: wrap; margin-top: .4rem; } .agenda-dates label { flex: 1 1 12rem; margin: 0; }
.agenda-rsvp { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
.agenda-who { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; margin-top: .4rem; }
.agenda-who .avatar { width: 28px; height: 28px; }
.agenda-next { gap: .5rem; padding: .35rem 0; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); flex-wrap: nowrap; }
.agenda-next b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 800px) { .agenda { grid-template-columns: 1fr; } }

/* ---- Délibération (propositions, débats, consultations) -------------------------------------------------- */
.kind-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .5rem; margin-bottom: .8rem; }
.kind-card { display: flex; flex-direction: column; gap: .25rem; padding: .6rem .7rem; border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; background: var(--surface-2); margin: 0; }
.kind-card input { position: absolute; opacity: 0; pointer-events: none; }
.kind-card small { color: var(--muted); font-size: .78rem; line-height: 1.35; font-weight: normal; }
.kind-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.kind-opts { margin-bottom: .6rem; } .kind-opts textarea { width: 100%; }
.delib-tag { font-size: .7rem; vertical-align: 1px; }
.delib { margin-bottom: 1rem; }
.delib-head { gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .7rem; }
.delib-kind { font-weight: 700; }
.delib-steer { gap: .4rem; flex-wrap: wrap; margin-top: .8rem; border-top: 1px solid var(--border); padding-top: .7rem; }
.delib-dialog textarea, .delib-dialog input { width: 100%; }
/* Proposition */
.prop-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.prop-bar span { transition: width .3s; }
.pb-accord { background: #27ae60; } .pb-abstention { background: #95a5a6; } .pb-desaccord { background: #e67e22; } .pb-objection { background: #c0392b; }
.prop-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .85rem; margin: .45rem 0 .8rem; }
.prop-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .3rem; vertical-align: -1px; }
.prop-objections { border-left: 3px solid #c0392b; background: color-mix(in srgb, #c0392b 9%, transparent); padding: .5rem .7rem; border-radius: 6px; margin-bottom: .8rem; }
.prop-obj { margin-top: .3rem; font-size: .9rem; }
.prop-choose { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.prop-pos { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .55rem .3rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; }
.prop-pos span { font-size: 1.4rem; }
.prop-pos:hover { border-color: var(--accent); }
.prop-pos.on.pos-accord { border-color: #27ae60; background: color-mix(in srgb, #27ae60 18%, var(--surface-2)); }
.prop-pos.on.pos-abstention { border-color: #95a5a6; background: color-mix(in srgb, #95a5a6 22%, var(--surface-2)); }
.prop-pos.on.pos-desaccord { border-color: #e67e22; background: color-mix(in srgb, #e67e22 18%, var(--surface-2)); }
.prop-pos.on.pos-objection { border-color: #c0392b; background: color-mix(in srgb, #c0392b 18%, var(--surface-2)); }
.prop-help { margin: .5rem 0 0; }
.prop-views, .prop-versions { margin-top: .8rem; } .prop-views summary, .prop-versions summary { cursor: pointer; }
.prop-group { margin-top: .5rem; } .prop-view { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .2rem 0 .2rem .8rem; font-size: .9rem; }
.prop-view .avatar.sm, .prop-obj .avatar.sm { width: 20px; height: 20px; vertical-align: -5px; }
.prop-version { margin-top: .6rem; } .prop-diff { white-space: pre-wrap; background: var(--surface-2); border-radius: 6px; padding: .5rem; margin-top: .3rem; font-size: .9rem; }
.prop-diff ins { background: color-mix(in srgb, #27ae60 30%, transparent); text-decoration: none; }
.prop-diff del { background: color-mix(in srgb, #c0392b 30%, transparent); }
.prop-outcome { margin-top: .8rem; padding: .6rem .8rem; border-radius: 8px; background: var(--surface-2); }
.prop-outcome h3 { margin-top: 0; }
@media (max-width: 560px) { .prop-choose { grid-template-columns: repeat(2, 1fr); } }
/* Débat */
.debate-path { font-size: .85rem; margin-bottom: .5rem; } .debate-path .side-pour { color: #27ae60; } .debate-path .side-contre { color: #c0392b; }
.debate-focus { padding: .7rem .9rem; border-radius: 10px; background: var(--surface-2); font-size: 1.02rem; margin-bottom: .8rem; border-left: 4px solid var(--accent); }
.debate-focus.side-pour { border-left-color: #27ae60; } .debate-focus.side-contre { border-left-color: #c0392b; }
.debate-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.debate-col h3 { margin: 0 0 .5rem; } .col-pour h3 { color: #27ae60; } .col-contre h3 { color: #c0392b; }
.arg { border: 1px solid var(--border); border-left: 4px solid; border-radius: 8px; padding: .55rem .65rem; margin-bottom: .5rem; background: var(--surface); }
.arg-pour { border-left-color: #27ae60; } .arg-contre { border-left-color: #c0392b; } .arg.gone { opacity: .6; }
.arg-text { cursor: pointer; } .arg-text:hover { color: var(--accent); }
.arg-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; font-size: .8rem; }
.arg-impact { display: inline-flex; align-items: center; gap: .3rem; }
.arg-impact .meter { width: 54px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: inline-block; }
.arg-impact .meter i { display: block; height: 100%; background: var(--accent); }
.arg-rate button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 .1rem; font-size: .8rem; }
.arg-rate button.on { color: var(--accent); }
.arg-new { display: flex; flex-direction: column; gap: .3rem; margin-top: .4rem; } .arg-new textarea { width: 100%; margin: 0; }
.arg-new .btn { align-self: flex-end; }
@media (max-width: 700px) { .debate-cols { grid-template-columns: 1fr; } }
/* Consultation */
.consult-tabs { display: flex; width: fit-content; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: 0 0 .8rem; }
.consult-tabs button { border: 0; background: none; color: var(--muted); padding: .3rem .7rem; font: inherit; font-size: .85rem; cursor: pointer; }
.consult-tabs button.on { background: var(--accent); color: var(--accent-text, #111); }
.consult-progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; } .consult-progress i { display: block; height: 100%; background: var(--accent); }
.consult-card { margin: .8rem auto; max-width: 560px; padding: 1.4rem 1.2rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 1.15rem; text-align: center; box-shadow: 0 8px 22px rgb(0 0 0 / .15); transition: transform .18s, opacity .18s; }
.consult-card p { margin: 0; }
.consult-card.go-right { transform: translateX(60px) rotate(4deg); opacity: 0; } .consult-card.go-left { transform: translateX(-60px) rotate(-4deg); opacity: 0; }
.consult-card.go-down { transform: translateY(30px); opacity: 0; }
.consult-buttons { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; }
.consult-yes { background: #27ae60; border-color: #27ae60; color: #fff; } .consult-no { background: #c0392b; border-color: #c0392b; color: #fff; }
.consult-new { gap: .4rem; margin-top: 1rem; flex-wrap: nowrap; } .consult-new input { flex: 1; margin: 0; }
.consult-pending { margin-top: .8rem; padding: .5rem .7rem; border: 1px dashed var(--border); border-radius: 8px; }
.consult-pending .row { gap: .4rem; padding: .25rem 0; }
.consult-map { width: 100%; max-width: 560px; display: block; margin: .4rem auto; background: var(--surface-2); border-radius: 12px; }
.consult-me { font-size: 12px; font-weight: 700; fill: var(--text); }
.consult-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; margin: .6rem 0; }
.consult-group { border-left: 4px solid var(--g); background: var(--surface-2); border-radius: 8px; padding: .5rem .7rem; }
.consult-group ul { margin: .4rem 0 0; padding-left: 1rem; font-size: .88rem; }
.consult-list { list-style: none; padding: 0; margin: .3rem 0 .8rem; }
.consult-list li { display: flex; gap: .8rem; align-items: center; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.consult-bars { display: inline-flex; flex-direction: column; gap: 2px; min-width: 90px; }
.consult-bars span { display: block; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.consult-bars i { display: block; height: 100%; }
/* Page Délibérations */
.decision-row { display: flex; justify-content: space-between; gap: .8rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--border);
  color: var(--text); text-decoration: none; }
.decision-row > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.decision-side { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; flex: none; }
.danger-text { color: #c0392b; } .decision-outcome { margin-top: .2rem; }
.decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem auto; }
.decision-grid > .card { margin: 0; }
@media (max-width: 860px) { .decision-grid { grid-template-columns: 1fr; } }
/* Accueil : « Aujourd'hui » collé à droite du titre, aussi haut que lui (défile à l'intérieur) */
.home-top { display: flex; gap: 1rem; align-items: stretch; }
.home-top .home-title { flex: 1; min-width: 0; }
.home-today { position: relative; flex: 0 0 min(320px, 40%); padding: 0; margin: 0 0 1rem; color: inherit; text-decoration: none; min-height: 3.5rem; }
.home-today-in { position: absolute; inset: 0; overflow-y: auto; padding: .45rem .7rem; display: flex; flex-direction: column; gap: .2rem; }
.home-today-head { font-size: .85rem; display: flex; align-items: center; gap: .3rem; }
.home-today-ev { display: flex; align-items: center; gap: .4rem; font-size: .88rem; min-width: 0; }
.home-today-ev .ellipsis { flex: 1; min-width: 0; }
@media (max-width: 700px) {
  .home-top { flex-direction: column; gap: 0; }
  .home-today { flex: none; height: 5.5rem; }
}
.member-card.banned .mc-dot { background: #e74c3c; }
.member-card.banned { opacity: .75; }
/* Barre de saisie du chat : sur ordinateur, outils en ligne ; sur téléphone, un « + » à gauche les range */
.composer-more { display: none; }
.composer-extra { display: contents; }
@media (max-width: 700px) {
  .composer { flex-wrap: nowrap; align-items: flex-end; padding-left: .4rem; }
  .composer textarea { flex: 1 1 auto; flex-basis: auto; }
  .composer-more { display: inline-flex; flex: none; }
  .composer-extra { display: none; }
  .composer.tools-open .composer-extra { display: flex; gap: .35rem; position: absolute; left: .4rem; bottom: calc(100% - .2rem); z-index: 20;
    background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: .35rem; box-shadow: var(--shadow); }
  .composer.tools-open .composer-more { color: var(--text); transform: rotate(45deg); }
  .composer-more { transition: transform .15s; }
}
/* Téléphone : barre du bas allégée (Boutique et Thème restent dans le menu de l'avatar ; Bugs et Idées dans le forum) */
@media (max-width: 700px) {
  .sidebar [data-nav="shop"], .sidebar [data-nav="bugs"], .sidebar [data-nav="suggestions"], .sidebar #palette-btn { display: none !important; }
  /* iPhone : un champ en dessous de 16 px fait zoomer toute la page quand on touche la saisie */
  input, textarea, select { font-size: 16px !important; }
}
