/* ==========================================================================
   Suoa — feuille de style principale
   Mobile-first : par défaut 1 colonne, multi-colonnes à partir de 768px.
   ========================================================================== */

:root {
    --brand: #6C5CE7;
    --brand-2: #00B894;
    --brand-soft: rgba(108, 92, 231, .1);
    --bg: #F4F5FB;
    --surface: #FFFFFF;
    --surface-2: #FAFAFE;
    --text: #17172B;
    --muted: #6E7191;
    --line: #E6E7F2;
    --danger: #E5484D;
    --danger-soft: rgba(229, 72, 77, .1);
    --warn: #F2A93B;
    --radius: 16px;
    --radius-sm: 11px;
    --radius-lg: 24px;
    --shadow: 0 2px 6px rgba(23, 23, 43, .04), 0 12px 28px -18px rgba(23, 23, 43, .28);
    --shadow-lg: 0 18px 50px -22px rgba(23, 23, 43, .45);
    --nav-h: 64px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    min-height: 100vh;
}

body.no-nav { padding-bottom: 0; }

img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; color: var(--muted); }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 15px; }
[hidden] { display: none !important; }
svg { flex: none; }

/* ---------------------------------------------------------------- Layout */

.wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

.page { padding: 18px 0 40px; }

.section { margin-bottom: 26px; }
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.section-head h2 { margin: 0; font-size: 1.15rem; }
.section-head .more { font-size: .85rem; font-weight: 600; color: var(--brand); white-space: nowrap; }

/* ---------------------------------------------------------------- Topbar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
    width: 36px; height: 36px; border-radius: 11px;
    background: linear-gradient(140deg, var(--brand), var(--brand-2));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 1rem; flex: none;
}
.brand-text { min-width: 0; }
.brand-name { font-weight: 800; font-size: 1.02rem; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: .7rem; color: var(--muted); margin-top: -3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
    width: 40px; height: 40px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--surface);
    display: flex; align-items: center; justify-content: center;
    color: var(--text); cursor: pointer; position: relative; transition: .18s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn .dot {
    position: absolute; top: 6px; right: 6px;
    min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: var(--danger); color: #fff;
    font-size: .62rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface);
}

/* ---------------------------------------------------------------- Bottom nav */

.bottomnav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottomnav-inner {
    display: flex; align-items: stretch; height: var(--nav-h);
    max-width: 620px; margin: 0 auto;
}
.navitem {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--muted); font-size: .66rem; font-weight: 600;
    position: relative; transition: color .18s;
    padding-top: 4px;
}
.navitem span { white-space: nowrap; }
.navitem.active { color: var(--brand); }
.navitem.active::before {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand);
}
.navitem .dot {
    position: absolute; top: 6px; left: 50%; margin-left: 4px;
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
    background: var(--danger); color: #fff; font-size: .6rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

/* ---------------------------------------------------------------- Buttons */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 18px; border-radius: var(--radius-sm);
    border: 1px solid transparent; font-weight: 650; font-size: .92rem;
    cursor: pointer; transition: .18s; text-align: center; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px var(--brand); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: .84rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------------------------------- Cards */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}
.card-tight { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.card-head h3 { margin: 0; }

.hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: #fff;
    padding: 34px 20px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    margin-bottom: 22px;
    box-shadow: var(--shadow-lg);
}
.hero-img {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: .34;
}
.hero::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(23,23,43,.72), rgba(23,23,43,.28));
}
.hero-body { position: relative; z-index: 2; }
.hero h1 { color: #fff; font-size: 1.65rem; margin-bottom: 8px; max-width: 22ch; }
.hero p { color: rgba(255,255,255,.88); max-width: 46ch; margin-bottom: 16px; }
.hero .btn-ghost { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); color: #fff; }
.hero .btn-ghost:hover { background: #fff; color: var(--brand); }

/* Stats : 2 colonnes max sur mobile, 4 sur grand écran */
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}
.stat {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px; text-align: center;
    box-shadow: var(--shadow);
}
.stat-num { font-size: 1.35rem; font-weight: 800; color: var(--brand); letter-spacing: -.03em; }
.stat-label { font-size: .74rem; color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- Topic list */

.topic-list { display: grid; grid-template-columns: 1fr; gap: 12px; }

.topic {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 15px; display: flex; flex-direction: column; gap: 10px;
    transition: transform .18s, border-color .18s;
}
.topic:hover { transform: translateY(-2px); border-color: rgba(108,92,231,.35); }
.topic-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-title { font-size: 1rem; font-weight: 700; letter-spacing: -.015em; margin: 0; color: var(--text); }
.topic-title a { color: inherit; }
.topic-excerpt { font-size: .875rem; color: var(--muted); margin: 0; }
.topic-thumb {
    width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-sm);
    object-fit: cover; background: var(--surface-2);
}
.topic-foot {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px;
}
.topic-foot .grow { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.metric { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    font-size: .72rem; font-weight: 700;
    background: var(--brand-soft); color: var(--brand);
}
.pill-green { background: rgba(0,184,148,.12); color: #00876c; }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-muted { background: #EFF0F7; color: var(--muted); }

/* ---------------------------------------------------------------- Avatars */

.avatar {
    border-radius: 50%; object-fit: cover; flex: none; display: block;
    border: 2px solid var(--surface); background: var(--surface-2);
}
.avatar-letter {
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; border: none;
}
.avatar-sm { width: 30px !important; height: 30px !important; }

.userline { display: flex; align-items: center; gap: 9px; min-width: 0; }
.userline-name { font-weight: 650; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userline-meta { font-size: .72rem; color: var(--muted); }

/* ---------------------------------------------------------------- Forms */

.field { margin-bottom: 14px; }
.field label { display: block; font-size: .82rem; font-weight: 650; margin-bottom: 6px; color: var(--text); }
.field .hint { font-size: .74rem; color: var(--muted); margin-top: 5px; }
.input, .textarea, .select {
    width: 100%; padding: 12px 14px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); transition: .18s;
}
.input:focus, .textarea:focus, .select:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.searchbar { position: relative; }
.searchbar .input { padding-left: 40px; }
.searchbar svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--surface); color: var(--muted); font-size: .82rem; font-weight: 600;
    white-space: nowrap; cursor: pointer; transition: .18s;
}
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------------------------------------------------------------- Category grid */
/* 1 colonne sur mobile, 2 dès 640px, 3 dès 900px */

.cat-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cat {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
    transition: transform .18s, border-color .18s;
}
.cat:hover { transform: translateY(-2px); border-color: rgba(108,92,231,.35); }
.cat-ico {
    width: 44px; height: 44px; border-radius: 13px; flex: none;
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.cat-body { min-width: 0; flex: 1; }
.cat-name { font-weight: 700; font-size: .95rem; color: var(--text); }
.cat-desc { font-size: .8rem; color: var(--muted); margin: 2px 0 6px; }
.cat-meta { font-size: .72rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Members */

.member-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.member {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 13px; box-shadow: var(--shadow);
}
.member-body { min-width: 0; flex: 1; }
.member-name { font-weight: 700; font-size: .9rem; display: flex; align-items: center; gap: 7px; }
.member-meta { font-size: .75rem; color: var(--muted); }
.online {
    width: 8px; height: 8px; border-radius: 50%; background: #22C55E;
    box-shadow: 0 0 0 3px rgba(34,197,94,.18); flex: none;
}

/* ---------------------------------------------------------------- Topic detail */

.post-main { padding: 18px; }
.post-main h1 { font-size: 1.3rem; }
.post-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-sm); margin: 12px 0; }
.post-content { white-space: pre-line; color: var(--text); font-size: .95rem; }

.reply {
    display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line);
}
.reply:last-child { border-bottom: none; }
.reply-body { min-width: 0; flex: 1; }
.reply-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.reply-text { white-space: pre-line; font-size: .92rem; color: var(--text); }
.reply-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

.like-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); background: var(--surface);
    border-radius: 999px; padding: 6px 13px; font-size: .8rem; font-weight: 650;
    color: var(--muted); cursor: pointer; transition: .18s;
}
.like-btn:hover { border-color: var(--brand); color: var(--brand); }
.like-btn.on { background: var(--brand-soft); border-color: transparent; color: var(--brand); }

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

.chat-shell { display: flex; flex-direction: column; }
.thread-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.thread {
    display: flex; gap: 12px; align-items: center; padding: 12px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow); transition: .18s;
}
.thread:hover { border-color: rgba(108,92,231,.35); }
.thread-body { min-width: 0; flex: 1; }
.thread-name { font-weight: 700; font-size: .88rem; }
.thread-last { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.thread-time { font-size: .7rem; color: var(--muted); }
.badge-count {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    background: var(--brand); color: #fff; font-size: .68rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}

.chat-window {
    display: flex; flex-direction: column;
    height: calc(100vh - 190px);
    min-height: 340px;
}
.chat-head {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-bottom: 1px solid var(--line); flex: none;
}
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.bubble {
    max-width: 82%; padding: 10px 14px; border-radius: 16px;
    font-size: .9rem; line-height: 1.45; word-break: break-word;
}
.bubble.them { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; align-self: flex-start; }
.bubble.me { background: var(--brand); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.bubble-time { font-size: .64rem; opacity: .7; display: block; margin-top: 3px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); flex: none; }
.chat-form .input { border-radius: 999px; }
.chat-form .btn { border-radius: 50%; width: 46px; padding: 0; flex: none; }

/* ---------------------------------------------------------------- Auth */

.auth-wrap { max-width: 470px; margin: 0 auto; padding: 24px 16px 40px; }
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-logo {
    width: 62px; height: 62px; border-radius: 19px; margin: 0 auto 12px;
    background: linear-gradient(140deg, var(--brand), var(--brand-2));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.5rem; font-weight: 800;
    box-shadow: 0 16px 34px -16px var(--brand);
}
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-lg); }

/* ---------------------------------------------------------------- Table (admin) */

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 620px; }
th {
    text-align: left; padding: 11px 14px; font-size: .72rem; text-transform: uppercase;
    letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line);
    background: var(--surface-2); white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

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

.admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.admin-stat {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.admin-stat .n { font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; }
.admin-stat .l { font-size: .75rem; color: var(--muted); font-weight: 600; }

.chart-box { position: relative; height: 260px; width: 100%; }

.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: .82rem; }
.bar-row .who { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .n { font-weight: 700; color: var(--muted); flex: none; }

.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.feed-item:last-child { border-bottom: none; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 7px; flex: none; }
.feed-text { flex: 1; min-width: 0; }
.feed-date { font-size: .72rem; color: var(--muted); flex: none; }

/* ---------------------------------------------------------------- Misc */

.tabs { display: flex; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.tab {
    flex: 1; text-align: center; padding: 9px 8px; border-radius: 999px;
    font-size: .82rem; font-weight: 650; color: var(--muted); cursor: pointer;
    border: none; background: transparent; white-space: nowrap; transition: .18s;
}
.tab.active { background: var(--brand); color: #fff; }

.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty svg { margin: 0 auto 12px; opacity: .5; }

.alert { border-radius: var(--radius-sm); padding: 12px 14px; font-size: .85rem; margin-bottom: 14px; }
.alert-danger { background: var(--danger-soft); color: #a3242a; }
.alert-info { background: var(--brand-soft); color: var(--brand); }
.alert-success { background: rgba(0,184,148,.12); color: #00795f; }

.toast-wrap {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 14px);
    z-index: 200; width: calc(100% - 32px); max-width: 420px;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    background: #17172B; color: #fff; border-radius: var(--radius-sm);
    padding: 12px 15px; font-size: .85rem; font-weight: 600;
    box-shadow: var(--shadow-lg); animation: toastin .28s ease;
}
.toast.err { background: var(--danger); }
.toast.ok { background: #0E9F6E; }
@keyframes toastin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.modal-bg {
    position: fixed; inset: 0; background: rgba(23,23,43,.55); z-index: 300;
    display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.modal {
    background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    width: 100%; max-width: 540px; box-shadow: var(--shadow-lg);
    animation: sheetup .26s ease;
}
@keyframes sheetup { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.install-band {
    display: flex; gap: 12px; align-items: flex-start;
    background: linear-gradient(135deg, rgba(108,92,231,.1), rgba(0,184,148,.1));
    border: 1px solid rgba(108,92,231,.25);
    border-radius: var(--radius); padding: 14px; margin-bottom: 20px;
}
.install-band .txt { flex: 1; font-size: .84rem; color: var(--text); }
.install-band .txt strong { display: block; margin-bottom: 3px; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

.footer {
    border-top: 1px solid var(--line); margin-top: 30px; padding: 22px 0 10px;
    font-size: .78rem; color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }

.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 1.25rem; }

.skel { background: linear-gradient(90deg, #EEF0F7 25%, #F7F8FC 50%, #EEF0F7 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius-sm); height: 90px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- Responsive */

@media (min-width: 640px) {
    .stats { grid-template-columns: repeat(4, 1fr); }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .member-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-stats { grid-template-columns: repeat(3, 1fr); }
    .hero { padding: 46px 34px; }
    .hero h1 { font-size: 2rem; }
}

@media (min-width: 900px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .topic-list { grid-template-columns: repeat(2, 1fr); }
    .member-grid { grid-template-columns: repeat(3, 1fr); }
    .admin-stats { grid-template-columns: repeat(4, 1fr); }
    .split { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: start; }
}

@media (max-width: 767px) {
    .split { display: block; }
    .split > * { margin-bottom: 18px; }
}

@media (min-width: 1024px) {
    /* Sur grand écran la barre basse disparaît : le contenu descend jusqu'au bord. */
    body { padding-bottom: 0; }
    .bottomnav { display: none; }
    .toast-wrap { bottom: 20px; }
}
