:root {
    --bg: #313338;
    --card: #2b2d31;
    --input: #1e1f22;
    --text: #dbdee1;
    --muted: #949ba4;
    --strong: #f2f3f5;
    --brand: #5865f2;
    --danger: #f23f42;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth {
    width: min(92vw, 440px);
    margin: 24px 0;
    padding: 32px;
    background: var(--card);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

.auth h1 { margin: 0 0 8px; color: var(--strong); font-size: 24px; }
.auth-intro { color: var(--muted); font-size: 14px; }

.auth form > div { margin-bottom: 16px; }
.auth label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.auth input {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: 4px;
    background: var(--input);
    color: var(--text);
    font: inherit;
    outline: none;
}
.auth input:focus { box-shadow: 0 0 0 2px var(--brand); }

.btn {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 4px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.btn:hover { background: #4752c4; }

.auth ul { margin: 6px 0 0; padding: 0; list-style: none; color: #ff7b7d; font-size: 14px; }
.alert { margin: 12px 0; padding: 10px 12px; border-radius: 4px; background: rgba(242, 63, 66, .15); color: #ff7b7d; font-size: 14px; }
.auth a { color: #00a8fc; }

.auth-links { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.auth p { line-height: 1.4; }

/* Aperçu des salons sur les pages de connexion / inscription */
.preview-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 240px;
    display: flex; flex-direction: column;
    background: #2b2d31; user-select: none;
}
.preview-head { height: 48px; flex: none; display: flex; align-items: center; padding: 0 16px; font-weight: 700; color: var(--strong); box-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.preview-category { padding: 16px 8px 4px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.preview-list { flex: 1; overflow-y: auto; margin: 0; padding: 0 8px; list-style: none; }
.preview-list { scrollbar-width: none; display: flex; flex-direction: column; overflow: hidden; }
.preview-list::-webkit-scrollbar { display: none; }
body.with-preview { padding-left: 240px; }


.auth-hint { margin: 16px 0; font-weight: 600; color: var(--strong); font-size: 15px; }

/* Les 25 salons tiennent toujours à l'écran : chaque ligne se réduit selon la hauteur de la fenêtre */
.preview-list li { flex: 0 1 34px; min-height: 0; display: flex; align-items: center; padding: 0 8px; border-radius: 4px; color: var(--muted); font-size: clamp(11px, 2vh, 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-list .hash { margin-right: 6px; font-size: 1.25em; }

/* Petits écrans : la liste passe au-dessus du formulaire, en pastilles qui retournent à la ligne */
@media (max-width: 800px) {
    body.with-preview { padding-left: 0; flex-direction: column; justify-content: flex-start; }
    .preview-sidebar { position: static; width: min(92vw, 440px); margin: 16px 0 0; border-radius: 8px; overflow: hidden; }
    .preview-head { height: 40px; }
    .preview-category { padding-top: 12px; }
    .preview-list { flex: none; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 8px 12px 14px; overflow: visible; }
    .preview-list li { flex: 0 0 auto; padding: 4px 10px; background: var(--input); font-size: 13px; }
    .preview-list .hash { margin-right: 4px; }
    .auth { margin: 16px 0 24px; padding: 24px 20px; }
}
