:root {
  --bg-dark: #1a1b26;
  --bg-card: #24283b;
  --bg-hover: #2d3047;
  --accent: #7aa2f7;
  --accent-dim: #565f89;
  --text: #c0caf5;
  --text-dim: #9aa5ce;
  --danger: #f7768e;
  --success: #9ece6a;
  --text-on-accent: #16161e;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font-app: 'Outfit', system-ui, sans-serif;
  --chat-composer-bg: #383a40;
  --chat-composer-inset: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
  --chat-composer-focus: inset 0 0 0 1px rgba(88, 101, 242, 0.45);
  --chat-chrome-icon: #b5bac1;
  --chat-chrome-icon-hover: #dbdee1;
  --chat-input-fg: #dbdee1;
  --chat-placeholder: #6d6f78;
  --chat-toolbar-color: #b5bac1;
  --chat-toolbar-hover-color: #dbdee1;
  --chat-gif-bg: rgba(0, 0, 0, 0.22);
  --scroll-thumb: #5c5f6a;
  --scroll-thumb-hover: #72767d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-app);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
}

/* ——— Page de connexion ——— */
.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(160deg, #16161e 0%, #1a1b26 50%, #24283b 100%);
}

/* Connexion type Discord (Corelith) */
.page-login-discord {
  background: #313338;
}

.page-login-discord .login-shell {
  width: 100%;
  max-width: 480px;
  padding: 1.5rem;
}

.page-login-discord .login-card {
  max-width: 100%;
  background: #2b2d31;
  border: 1px solid #1e1f22;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-login-discord .login-header h1 {
  color: #f2f3f5;
  font-size: 1.5rem;
}

.page-login-discord .login-header p {
  color: #b5bac1;
}

.label-caps {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b5bac1;
  margin-top: 1.1rem;
  margin-bottom: 0.45rem;
}

.label-caps:first-of-type {
  margin-top: 0;
}

.input-discord {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 4px;
  border: none;
  background: #1e1f22;
  color: #dbdee1;
  font: inherit;
  font-size: 1rem;
}

.input-discord:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.45);
}

.input-discord::placeholder {
  color: #6d6f78;
}

.btn-discord-primary {
  width: 100%;
  margin-top: 1.35rem;
  padding: 0.72rem 1rem;
  border: none;
  border-radius: 4px;
  background: #5865f2;
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn-discord-primary:hover:not(:disabled) {
  background: #4752c4;
}

.btn-discord-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.link-inline {
  display: inline;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  color: #00a8fc;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
}

.link-inline:hover {
  text-decoration: underline;
}

.forgot-row {
  margin-top: 0.35rem;
}

.signup-footer {
  margin-top: 1.1rem;
  font-size: 0.875rem;
  color: #b5bac1;
  text-align: left;
}

.guest-access {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #3f4147;
}

.guest-access summary {
  cursor: pointer;
  color: #949ba4;
  font-size: 0.8rem;
  list-style: none;
}

.guest-access summary::-webkit-details-marker {
  display: none;
}

.guest-access[open] summary {
  margin-bottom: 0.75rem;
}

.rooms-home-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: #f2f3f5;
}

.rooms-home-sub {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: #b5bac1;
}

.rooms-user-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #3f4147;
  font-size: 0.875rem;
  color: #b5bac1;
}

.rooms-user-bar strong {
  color: #9ece6a;
}

.home-room-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  max-height: min(50vh, 320px);
  overflow: visible;
}

.home-room-list li {
  margin-bottom: 0.5rem;
}

.home-room-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: #232428;
  border: 1px solid #3f4147;
}

.home-room-row .channel-row-info {
  flex: 1;
  min-width: 0;
}

.server-name-banner {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: #949ba4;
  text-align: center;
}

.server-name-banner strong {
  color: #f2f3f5;
  font-weight: 700;
}

/* Nom du canal + bouton Rejoindre (accueil + modal app) */
.channel-row-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.channel-name-display {
  font-weight: 600;
  font-size: 0.95rem;
  color: #dbdee1;
  word-break: break-word;
}

.page-app .channel-name-display {
  color: var(--text);
}

.btn-channel-join {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  background: #5865f2;
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-channel-join:hover {
  background: #4752c4;
}

.page-app .btn-channel-join {
  background: var(--accent);
  color: var(--text-on-accent);
}

.page-app .btn-channel-join:hover {
  filter: brightness(1.08);
  background: var(--accent);
}

.home-admin-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #3f4147;
}

.home-admin-form label {
  display: block;
  font-size: 0.75rem;
  color: #b5bac1;
  margin-bottom: 0.35rem;
}

.home-admin-form .row {
  display: flex;
  gap: 0.5rem;
}

.home-admin-form input {
  flex: 1;
  padding: 0.5rem 0.65rem;
  border-radius: 4px;
  border: 1px solid #3f4147;
  background: #1e1f22;
  color: #dbdee1;
  font: inherit;
}

.home-admin-form button[type='submit'] {
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  border: none;
  background: #5865f2;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-box {
  background: #2b2d31;
  border-radius: 8px;
  padding: 1.25rem;
  max-width: 400px;
  width: 100%;
  border: 1px solid #1e1f22;
  color: #dbdee1;
}

.modal-box h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: #f2f3f5;
}

.modal-box p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #b5bac1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.modal-actions button {
  padding: 0.45rem 0.85rem;
  border-radius: 4px;
  border: none;
  font: inherit;
  cursor: pointer;
}

.modal-actions .btn-close-modal {
  background: #5865f2;
  color: #fff;
  font-weight: 600;
}

.login-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 380px;
}

.login-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.login-header p {
  margin: 0.25rem 0 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.login-form label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.login-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  background: var(--bg-dark);
  color: var(--text);
  font: inherit;
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-form .error {
  margin-top: 0.75rem;
  color: var(--danger);
  font-size: 0.9rem;
}

.login-form button {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.85rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text-on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.login-form button:hover:not(:disabled) {
  filter: brightness(1.1);
}

.login-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.account-section {
  margin-bottom: 1rem;
}

.account-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0 0 0.75rem;
}

.account-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.account-tab {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  background: var(--bg-dark);
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
}

.account-tab:hover {
  color: var(--text);
  border-color: var(--accent);
}

.account-tab.active {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}

.account-form label,
.account-form input {
  display: block;
  width: 100%;
  margin-bottom: 0.35rem;
}

.account-form input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  background: var(--bg-dark);
  color: var(--text);
  font: inherit;
  margin-top: 0.25rem;
}

.account-form .error {
  margin: 0.5rem 0 0;
  color: var(--danger);
  font-size: 0.85rem;
}

.btn-account {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.6rem;
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  background: var(--bg-hover);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.btn-account:hover {
  background: var(--accent-dim);
  color: var(--text);
}

.btn-logout {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.account-logged-in {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.account-logged-in strong {
  color: var(--success);
}

.login-sep {
  border: none;
  border-top: 1px solid var(--accent-dim);
  margin: 1.25rem 0;
}

.room-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
}

.room-modal[hidden] {
  display: none !important;
}

.room-loading {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.room-modal-inner {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  width: 100%;
  max-width: 420px;
}

.room-modal-inner h2 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
}

.room-modal-sub {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.room-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  max-height: 220px;
  overflow-y: auto;
}

.room-list li {
  margin-bottom: 0.5rem;
}

.room-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  background: var(--bg-dark);
  border: 1px solid var(--accent-dim);
}

.room-list-item .channel-row-info {
  flex: 1;
  min-width: 0;
}

.room-modal-server {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.room-modal-server strong {
  color: var(--text);
}

.room-rename-btn {
  flex-shrink: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
}

.room-rename-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.room-delete-btn {
  flex-shrink: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(247, 118, 142, 0.45);
  background: var(--bg-dark);
  color: var(--danger);
  font: inherit;
  cursor: pointer;
}

.room-delete-btn:hover {
  border-color: var(--danger);
  color: #fca5a5;
}

.room-list .btn-channel-join {
  width: auto;
}

.create-room-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.create-room-row {
  display: flex;
  gap: 0.5rem;
}

.create-room-row input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--text);
  font: inherit;
}

.create-room-row button {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--text-on-accent);
  font: inherit;
  cursor: pointer;
}

.create-room-row button:hover {
  filter: brightness(1.1);
}

.room-error {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--danger);
}

.logged-in-enter {
  text-align: center;
  padding: 1rem 0;
}

.logged-in-enter-text {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text-dim);
}

.logged-in-enter-or {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.btn-enter-app {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-weight: 600;
  text-decoration: none;
}

.btn-enter-app:hover {
  filter: brightness(1.1);
}

/* ——— App salon vocal ——— */
/* Hauteur verrouillée sur la fenêtre : pas de scroll sur le body, sinon la barre de saisie part avec le chat */
.page-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--accent-dim);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--accent-dim);
}

.sidebar-header h2,
.sidebar-header .server-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.sidebar-server-hint {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.9;
}

.sidebar-channel-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.channel-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-dim);
}

.sidebar-channel-row .channel-name {
  display: inline;
  margin-top: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--success);
}

.channel-name {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.admin-rooms-wrap {
  margin-top: 0.5rem;
}

.btn-manage-rooms {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.btn-manage-rooms:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0 1rem;
  flex: 1;
  overflow-y: auto;
}

.participants-list {
  flex: 1;
  min-height: 0;
  overflow: visible;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.participants-list-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
}

.participants-list h3 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.participants-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.participants-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.participants-list li .pseudo {
  flex: 1;
  min-width: 0;
}

.participants-list .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.participants-list .talking .avatar {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--bg-dark);
  animation: pulse-avatar 0.6s ease-in-out infinite alternate;
}

.participants-list .talking .pseudo {
  color: var(--success);
  animation: glow-pseudo 0.6s ease-in-out infinite alternate;
}

.me.talking .avatar,
.me-row.talking .avatar,
.user-bar.talking .user-bar-avatar {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--bg-dark);
  animation: pulse-avatar 0.6s ease-in-out infinite alternate;
}

.me.talking .pseudo,
.me-row.talking .pseudo,
.user-bar.talking .user-bar-pseudo {
  color: var(--success);
  animation: glow-pseudo 0.6s ease-in-out infinite alternate;
}

@keyframes pulse-avatar {
  from { transform: scale(1); box-shadow: 0 0 0 2px var(--bg-dark); }
  to   { transform: scale(1.08); box-shadow: 0 0 12px var(--success); }
}

@keyframes glow-pseudo {
  from { text-shadow: 0 0 0 transparent; }
  to   { text-shadow: 0 0 8px var(--success); }
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--accent-dim);
}

.sidebar-footer-compact {
  padding: 0.65rem 0.75rem;
}

/* Barre utilisateur type Discord (bas de la liste participants) */
.user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  background: #1e1e22;
  border: 1px solid #2b2d31;
  font-size: 0.9rem;
}

.user-bar-identity {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.user-bar-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.user-bar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.user-bar-status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #23a559;
  border: 2px solid #1e1e22;
  box-sizing: border-box;
}

.user-bar-status-dot.mic-off {
  background: #ed4245;
}

.user-bar-status-dot.deafened {
  background: #ed4245;
}

.user-bar-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.05rem;
}

.user-bar-pseudo {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--success);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-status-line {
  font-size: 0.7rem;
  color: #949ba4;
  line-height: 1.2;
}

.user-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.user-bar-icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #b5bac1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
}

.user-bar-icon-btn:hover {
  background: #2b2d31;
  color: #dbdee1;
}

.user-bar-icon-btn[aria-pressed='true'],
.user-bar-icon-btn.muted,
.user-bar-icon-btn.deafened {
  background: rgba(237, 66, 69, 0.25);
  color: #ed4245;
}

.user-bar-icon-btn.user-bar-gear[aria-expanded='true'] {
  background: #2b2d31;
  color: var(--accent);
}

.icon-mic-sm {
  width: 18px;
  height: 18px;
}

.icon-headset {
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 18v-6a9 9 0 0 1 18 0v6'/%3E%3Cpath d='M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 18v-6a9 9 0 0 1 18 0v6'/%3E%3Cpath d='M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.icon-gear {
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/%3E%3C/svg%3E") center/contain no-repeat;
}

.user-bar-icon-btn.muted .icon-mic {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='1' y1='1' x2='23' y2='23' stroke='%23fff'/%3E%3Cpath d='M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6'/%3E%3Cpath d='M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23'/%3E%3Cline x1='12' y1='19' x2='12' y2='23'/%3E%3Cline x1='8' y1='23' x2='16' y2='23'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='1' y1='1' x2='23' y2='23' stroke='%23fff'/%3E%3Cpath d='M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6'/%3E%3Cpath d='M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23'/%3E%3Cline x1='12' y1='19' x2='12' y2='23'/%3E%3Cline x1='8' y1='23' x2='16' y2='23'/%3E%3C/svg%3E") center/contain no-repeat;
}

.user-bar-icon-btn.deafened .icon-headset {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3Cpath d='M3 18v-6a9 9 0 0 1 18 0v6'/%3E%3Cpath d='M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3Cpath d='M3 18v-6a9 9 0 0 1 18 0v6'/%3E%3Cpath d='M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Ancienne barre (rétrocompat si besoin) */
.me-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.me-row .btn-mic-inline {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--text-on-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.me-row .btn-mic-inline:hover {
  filter: brightness(1.1);
}

.me-row .btn-mic-inline.muted {
  background: var(--danger);
}

.me-row .icon-mic {
  width: 18px;
  height: 18px;
}

.me-row .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.me-row .pseudo {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.me-row .mute-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.participants-list .avatar {
  overflow: hidden;
}

.lol-profile-section {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--accent-dim);
}

.user-settings-body .lol-profile-section {
  border-top: none;
  padding: 0;
  margin: 0;
}

.lol-link-form label,
.lol-linked .lol-name {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.lol-input {
  display: block;
  width: 100%;
  margin-bottom: 0.35rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  background: var(--bg-dark);
  color: var(--text);
  font-size: 0.85rem;
}

.lol-link-btn {
  margin-top: 0.25rem;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.lol-link-btn:hover {
  filter: brightness(1.1);
}

.lol-error {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--danger);
  min-height: 1em;
}

.lol-linked {
  font-size: 0.8rem;
}

.lol-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.lol-linked .lol-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-dark);
}

.lol-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.lol-linked .lol-level {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.lol-linked .lol-rank {
  font-size: 0.75rem;
  color: var(--accent);
}

.lol-unlink-btn {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
}

.lol-unlink-btn:hover {
  background: var(--bg-hover);
}

.lol-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.25rem;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.lol-tier-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.lol-level-num {
  font-weight: 600;
  color: var(--accent);
}

.lol-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0;
}

.lol-stats-btn,
.lol-share-btn {
  flex: 1 1 48%;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
}

.lol-stats-btn:hover,
.lol-share-btn:hover {
  background: var(--bg-hover);
}

.lol-stats-panel {
  margin-top: 0.4rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-dark);
  border: 1px solid var(--accent-dim);
  font-size: 0.8rem;
}

.lol-stats-panel h4 {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: var(--accent);
}

.lol-stats-panel ul {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
}

.lol-stats-panel li {
  margin-bottom: 0.15rem;
}

.me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.me .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.btn-leave {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.6rem;
  border: 1px solid var(--danger);
  border-radius: 8px;
  background: transparent;
  color: var(--danger);
  font: inherit;
  cursor: pointer;
}

.btn-leave:hover {
  background: rgba(247, 118, 142, 0.15);
}

.btn-share-screen {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.6rem;
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  background: var(--bg-dark);
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.btn-share-screen:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.btn-share-screen.sharing {
  border-color: var(--success);
  color: var(--success);
}

.screen-share-controls-row {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.screen-share-audio-row {
  flex: 1;
  min-width: 120px;
}

.screen-quality-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.screen-quality-select {
  width: 100%;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--text);
  font: inherit;
}

.screen-quality-select:focus {
  outline: none;
  border-color: var(--accent);
}

.me-controls {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--accent-dim);
  border-bottom: 1px solid var(--accent-dim);
}

.me-controls-settings {
  border: none;
  padding: 0;
  margin: 0;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.control-row input[type="range"] {
  width: 100px;
  accent-color: var(--accent);
}

.control-row.checkbox-row {
  margin-top: 0.35rem;
}

.control-row.checkbox-row input {
  margin-right: 0.35rem;
}

.participant-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin-left: 2.25rem;
  margin-top: 0.15rem;
}

.participant-controls .peer-volume {
  width: 60px;
  height: 4px;
  accent-color: var(--accent);
}

.participant-controls .peer-mute-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.join-screen-wrap {
  margin-left: 2.25rem;
  margin-top: 0.25rem;
  display: none;
}

.join-screen-wrap.visible {
  display: block;
}

.btn-join-screen {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--accent);
  cursor: pointer;
  font: inherit;
}

.btn-join-screen:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

/* Panneau paramètres (flotte au-dessus du chat) */
.user-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 40;
  border-radius: inherit;
}

/* L’attribut hidden doit primer sur display:flex (sinon le panneau ne se ferme jamais) */
.user-settings-backdrop[hidden],
.user-settings-panel[hidden] {
  display: none !important;
}

.user-settings-panel {
  position: absolute;
  bottom: 72px;
  left: 12px;
  right: 12px;
  max-width: 380px;
  max-height: min(70vh, 520px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.user-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--accent-dim);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.user-settings-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.user-settings-close:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.user-settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.85rem;
}

.settings-section {
  margin-bottom: 1rem;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section-title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.theme-select-row {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.theme-select-row > span {
  flex: 1 1 140px;
  min-width: 0;
}

.settings-select {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.settings-select:hover,
.settings-select:focus {
  border-color: var(--accent);
  outline: none;
}

.settings-hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.user-settings-footer {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--accent-dim);
}

.btn-leave-settings {
  width: 100%;
  margin: 0;
}

/* En-tête chat + partage écran */
.chat-header-with-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.chat-header-titles {
  flex: 1;
  min-width: 0;
}

.chat-header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
}

.chat-share-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* Popover au-dessus du compositeur (bas de page) */
.chat-share-wrap-composer .screen-share-start-popover {
  top: auto;
  bottom: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 45;
}

.btn-share-screen-header {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-share-screen-header:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.btn-share-screen-header.sharing {
  border-color: var(--success);
  color: var(--success);
}

.screen-share-start-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(280px, calc(100vw - 2rem));
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 30;
}

.screen-share-popover-title {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.screen-share-popover-field {
  margin-bottom: 0.65rem;
  display: block;
}

.screen-share-popover-field .screen-quality-select {
  width: 100%;
  margin-top: 0.25rem;
}

.screen-share-popover-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.screen-share-popover-primary {
  flex: 1;
  min-width: 100px;
  padding: 0.45rem 0.65rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--text-on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.screen-share-popover-secondary {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
}

.screen-share-popover-secondary:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* Zone centrale : chat (prend la place) — pas de scroll ici : uniquement .chat-messages défile */
.chat-center {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-dark);
  border-right: 1px solid var(--accent-dim);
}

.presence-sidebar {
  position: relative;
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-card);
  padding: 0.65rem 0.6rem;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}

.presence-sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}

.presence-sidebar-scroll::-webkit-scrollbar {
  width: 8px;
}

.presence-sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.presence-sidebar-scroll::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.presence-sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background-color: var(--scroll-thumb-hover);
}

.presence-sidebar-scroll::-webkit-scrollbar-button {
  display: none;
}

.presence-sidebar-scroll::-webkit-scrollbar-corner {
  background: transparent;
}

.presence-sidebar::-webkit-scrollbar {
  width: 8px;
}

.presence-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.presence-sidebar::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.presence-sidebar::-webkit-scrollbar-thumb:hover {
  background-color: var(--scroll-thumb-hover);
}

.presence-sidebar::-webkit-scrollbar-button {
  display: none;
}

.presence-sidebar::-webkit-scrollbar-corner {
  background: transparent;
}

.presence-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.presence-sidebar-head h3 {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
}

.btn-dm-inbox {
  flex-shrink: 0;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--accent);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-dm-inbox:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.presence-sidebar-hint {
  margin: 0 0 0.5rem;
  font-size: 0.65rem;
  color: var(--accent-dim);
  line-height: 1.3;
}

.global-online-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-height: 2.5rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}

.global-online-list::-webkit-scrollbar {
  width: 8px;
}

.global-online-list::-webkit-scrollbar-track {
  background: transparent;
}

.global-online-list::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.global-online-list::-webkit-scrollbar-thumb:hover {
  background-color: var(--scroll-thumb-hover);
}

.global-online-list::-webkit-scrollbar-button {
  display: none;
}

.global-online-list::-webkit-scrollbar-corner {
  background: transparent;
}

.global-online-empty {
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0.35rem 0.25rem;
  line-height: 1.35;
  list-style: none;
}

.global-online-item {
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  background: var(--bg-dark);
  border: 1px solid rgba(86, 95, 137, 0.35);
  font-size: 0.78rem;
}

.global-online-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.global-online-name {
  color: var(--text);
  font-weight: 600;
  min-width: 0;
  word-break: break-word;
}

.global-online-room {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--success);
  font-weight: 600;
}

.global-online-dm-btn {
  margin-top: 0.35rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.65rem;
  border-radius: 4px;
  border: 1px solid var(--accent-dim);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
}

.global-online-dm-btn:hover {
  background: var(--bg-hover);
}

.global-online-no-dm {
  margin-top: 0.25rem;
  font-size: 0.65rem;
  color: var(--text-dim);
  opacity: 0.7;
}

.remote-streams-audio-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.mic-toggle-wrap {
  margin-bottom: 0.5rem;
}

.btn-mic {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--text-on-accent);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font: inherit;
  font-size: 0.75rem;
}

.btn-mic:hover {
  filter: brightness(1.1);
}

.btn-mic.muted {
  background: var(--danger);
}

.icon-mic {
  width: 28px;
  height: 28px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cline x1='12' y1='19' x2='12' y2='23'/%3E%3Cline x1='8' y1='23' x2='16' y2='23'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cline x1='12' y1='19' x2='12' y2='23'/%3E%3Cline x1='8' y1='23' x2='16' y2='23'/%3E%3C/svg%3E") center/contain no-repeat;
}

.hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.remote-streams {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

/* Panneau messages privés — hidden doit primer sur display:flex (sinon ne se ferme pas) */
.dm-overlay-backdrop[hidden],
.dm-overlay[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.dm-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 80;
}

/* Panneau ancré à droite (plus de modale centrée) */
.dm-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: min(400px, 100vw);
  z-index: 81;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  pointer-events: auto;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
}

.dm-overlay .dm-sheet {
  flex: 1;
  min-height: 0;
}

.dm-sheet {
  width: 100%;
  height: 100%;
  max-height: none;
  background: var(--bg-card);
  border: none;
  border-left: 1px solid var(--accent-dim);
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dm-sheet-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--accent-dim);
}

.dm-sheet-head h3 {
  margin: 0;
  flex: 1;
  font-size: 0.95rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-nav-back,
.dm-sheet-close {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
}

.dm-nav-back:hover,
.dm-sheet-close:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.dm-conv-list {
  padding: 0.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.dm-conv-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.55rem;
  margin-bottom: 0.35rem;
  border-radius: 8px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.dm-conv-row:hover {
  border-color: var(--accent);
}

.dm-conv-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.dm-conv-preview {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-empty {
  margin: 0.75rem 0.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.dm-thread {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.dm-thread-msgs {
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dm-bubble {
  align-self: flex-start;
  max-width: 92%;
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  background: var(--bg-dark);
  border: 1px solid var(--accent-dim);
  font-size: var(--chat-font-dm-body, 0.8rem);
}

.dm-bubble-mine {
  align-self: flex-start;
  border-color: var(--accent);
  background: rgba(122, 162, 247, 0.12);
}

.dm-bubble-meta {
  font-size: var(--chat-font-dm-meta, 0.65rem);
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}

.dm-bubble-body {
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.dm-thread-input-row {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem;
  border-top: 1px solid var(--accent-dim);
}

.dm-thread-input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
}

.dm-thread-send {
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--text-on-accent);
  font: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

.dm-thread-send:hover {
  filter: brightness(1.08);
}

.screen-shares-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--accent-dim);
  width: 100%;
}

.screen-shares-section.chat-screen-shares {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--accent-dim);
  min-height: 0;
  flex-shrink: 0;
}

/* Bloc « Partage d’écran » du chat : visible seulement si un partage (toi ou un autre) est actif */
.screen-shares-section.chat-screen-shares:not(.has-shares) {
  display: none;
}

.screen-shares-section.has-shares .screen-shares {
  min-height: 200px;
}

.screen-shares-section h3 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.screen-shares {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.screen-share-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--accent-dim);
}

.chat-screen-shares .screen-share-item {
  max-width: 100%;
}

/* Aperçu du propre partage (distinct des flux reçus) */
.screen-share-item.screen-share-local {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(122, 162, 247, 0.2);
}

.screen-share-video {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
  background: #000;
  min-height: 120px;
}

.chat-screen-shares .screen-share-video {
  max-height: 360px;
  min-height: 200px;
  width: 100%;
}

.screen-share-name {
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.screen-share-fs-btn {
  border-radius: 999px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--text-dim);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
}

.screen-share-fs-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.remote-peer {
  background: var(--bg-hover);
  border-radius: var(--radius);
  padding: 0.5rem;
  text-align: center;
}

.remote-peer audio {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
}

.remote-peer .name {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.remote-peer .muted-note {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ——— Chat (au centre) ——— */
.chat-center .chat-header {
  flex-shrink: 0;
}

/* Messages + saisie : colonne dédiée pour éviter chevauchement / sauts au focus (pas de margin-top: auto sur la saisie) */
.chat-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  --chat-font-room: 0.85rem;
  --chat-font-room-time: 0.7rem;
  --chat-font-dm-body: 0.8rem;
  --chat-font-dm-meta: 0.65rem;
  --chat-font-input: 0.95rem;
}

.chat-main.chat-text-scale-1 {
  --chat-font-room: 0.98rem;
  --chat-font-room-time: 0.8rem;
  --chat-font-dm-body: 0.95rem;
  --chat-font-dm-meta: 0.74rem;
  --chat-font-input: 1.08rem;
}

.chat-main.chat-text-scale-2 {
  --chat-font-room: 1.12rem;
  --chat-font-room-time: 0.88rem;
  --chat-font-dm-body: 1.08rem;
  --chat-font-dm-meta: 0.82rem;
  --chat-font-input: 1.22rem;
}

.chat-panels {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel.chat-panel-active {
  display: flex;
}

.chat-tabs {
  flex-shrink: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  padding: 0.35rem 0.5rem 0.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  background: rgba(0, 0, 0, 0.15);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}

.chat-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px 6px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 140px;
}

.chat-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.chat-tab.chat-tab-active {
  background: var(--bg-dark);
  color: var(--accent);
  border-color: var(--accent-dim);
}

.chat-tab.chat-tab-unread {
  animation: chat-tab-pulse 1.2s ease-in-out infinite;
}

@keyframes chat-tab-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(122, 162, 247, 0);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.55);
  }
}

.chat-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 0.1rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.chat-tab-close:hover {
  opacity: 1;
  background: rgba(247, 118, 142, 0.25);
  color: var(--danger);
}

.chat-notify-banner {
  flex-shrink: 0;
  padding: 0;
  border-top: 1px solid rgba(122, 162, 247, 0.35);
  background: linear-gradient(180deg, rgba(122, 162, 247, 0.12), rgba(122, 162, 247, 0.04));
}

.chat-notify-banner-btn {
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.chat-notify-banner-btn:hover {
  background: rgba(122, 162, 247, 0.1);
}

.chat-center .chat-input-wrap {
  flex-shrink: 0;
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--accent-dim);
}

.chat-header-titles {
  flex: 1;
  min-width: 0;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.btn-chat-text-size {
  flex-shrink: 0;
  min-width: 36px;
  height: 32px;
  padding: 0 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  line-height: 1;
}

.btn-chat-text-size:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.chat-main.chat-text-scale-1 .btn-chat-text-size {
  font-size: 0.95rem;
}

.chat-main.chat-text-scale-2 .btn-chat-text-size {
  font-size: 1.05rem;
}

.btn-toggle-presence {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--text-dim);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-toggle-presence:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.app-body.presence-sidebar-hidden .presence-sidebar {
  display: none;
}

.chat-tab-wrap {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-bottom: none;
}

.chat-tab-wrap:has(.chat-tab-active) {
  background: var(--bg-dark);
  border-color: var(--accent-dim);
}

.chat-tab-wrap .chat-tab {
  border-radius: 0;
  max-width: 118px;
}

.chat-tab-wrap .chat-tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-tab-wrap .chat-tab-close {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-channel-row.channel-unread-glow {
  animation: channel-glow 1.5s ease-in-out infinite;
  border-radius: 6px;
  padding: 0.2rem 0.35rem;
  margin: -0.2rem -0.35rem;
}

@keyframes channel-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(122, 162, 247, 0);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.65), 0 0 12px rgba(122, 162, 247, 0.25);
  }
}

.presence-unread-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  vertical-align: middle;
}

.presence-unread-badge[hidden] {
  display: none !important;
}

.dm-inbox-hint {
  margin: 0 0.65rem 0.5rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.dm-sheet-inbox-only .dm-conv-list {
  min-height: 180px;
}

.chat-header h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.chat-header .who-speaking {
  display: none;
}

/* MP (onglets) : même disposition que le salon — pleine largeur, aligné à gauche */
.chat-messages.chat-messages-dm .dm-bubble,
.chat-messages.chat-messages-dm .dm-bubble-mine {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: var(--chat-font-room, 0.85rem);
}

.chat-messages.chat-messages-dm .dm-bubble-meta {
  font-size: var(--chat-font-room-time, 0.7rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.chat-messages.chat-messages-dm .dm-bubble-meta .time {
  font-size: var(--chat-font-room-time, 0.7rem);
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 0.35rem;
}

.chat-messages.chat-messages-dm .dm-bubble-body {
  color: var(--text);
}

.chat-messages.chat-messages-dm .dm-bubble-body a {
  color: var(--accent);
  text-decoration: none;
}

.chat-messages.chat-messages-dm .dm-bubble-body a:hover {
  text-decoration: underline;
}

.chat-messages.chat-messages-dm .dm-bubble-body .empty-msg {
  color: var(--text-dim);
  font-style: italic;
}

.chat-messages.chat-messages-dm .dm-bubble-body img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  display: block;
  margin-top: 0.25rem;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-dark);
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}

/* WebKit / Chromium : piste invisible, curseur gris type Discord */
.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background-color: var(--scroll-thumb-hover);
}

.chat-messages::-webkit-scrollbar-button {
  display: none;
}

.chat-messages::-webkit-scrollbar-corner {
  background: transparent;
}

.chat-msg {
  font-size: var(--chat-font-room, 0.85rem);
  word-break: break-word;
}

.chat-msg .author {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.chat-msg .time {
  font-size: var(--chat-font-room-time, 0.7rem);
  color: var(--text-dim);
  margin-left: 0.35rem;
}

.chat-msg .body {
  color: var(--text);
  white-space: pre-wrap;
}

.chat-msg .body a {
  color: var(--accent);
  text-decoration: none;
}

.chat-msg .body a:hover {
  text-decoration: underline;
}

.chat-msg .body .empty-msg {
  color: var(--text-dim);
  font-style: italic;
}

.chat-msg .body img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  display: block;
  margin-top: 0.25rem;
  cursor: pointer;
}

/* Réponses de l’agent OpenClaw (Kor) dans le fil salon */
.chat-msg-kor-agent .author {
  color: #c4a8ff;
}

.chat-msg-kor-agent .body {
  border-left: 3px solid rgba(196, 168, 255, 0.55);
  padding-left: 0.5rem;
  margin-left: 0.1rem;
}

.kor-tts-actions {
  margin-top: 0.35rem;
}

.kor-tts-play {
  font: inherit;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(196, 168, 255, 0.45);
  background: rgba(196, 168, 255, 0.12);
  color: #e8ddff;
  cursor: pointer;
  transition: background 0.12s ease, opacity 0.12s ease;
}

.kor-tts-play:hover:not(:disabled) {
  background: rgba(196, 168, 255, 0.22);
}

.kor-tts-play:disabled,
.kor-tts-play.kor-tts-play-loading {
  opacity: 0.55;
  cursor: wait;
}

.chat-toolbar-kor {
  min-width: auto;
  padding: 0.2rem 0.45rem;
  margin-right: 0.1rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--chat-toolbar-color);
}

.chat-toolbar-kor:hover {
  background: rgba(196, 168, 255, 0.18);
  color: #e8ddff;
}

.chat-toolbar-kor.chat-toolbar-kor-active {
  background: rgba(196, 168, 255, 0.28);
  color: #f5f0ff;
  box-shadow: inset 0 0 0 1px rgba(196, 168, 255, 0.45);
}

.chat-composer-kor-active {
  box-shadow: 0 0 0 1px rgba(196, 168, 255, 0.35), var(--chat-composer-inset);
}

.chat-composer-kor-voice-ready {
  box-shadow: 0 0 0 1px rgba(120, 220, 180, 0.45), var(--chat-composer-inset);
}

.chat-toolbar-kor-voice {
  min-width: auto;
  padding: 0.18rem 0.4rem;
  margin-right: 0.1rem;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #a8e8cc;
  white-space: nowrap;
}

.chat-toolbar-kor-voice:hover {
  background: rgba(120, 220, 180, 0.15);
  color: #d4f5e8;
}

.chat-toolbar-kor-voice.chat-toolbar-kor-voice-active {
  background: rgba(120, 220, 180, 0.22);
  color: #f0fff8;
  box-shadow: inset 0 0 0 1px rgba(120, 220, 180, 0.45);
}

.chat-toolbar-kor-dictate {
  min-width: auto;
  padding: 0.2rem 0.45rem;
  margin-right: 0.1rem;
  border-radius: 4px;
  color: #c8b8ff;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.chat-toolbar-kor-dictate:hover:not(:disabled) {
  background: rgba(196, 168, 255, 0.18);
  color: #e8ddff;
}

.chat-toolbar-kor-dictate:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chat-toolbar-kor-dictate.kor-dictate-listening {
  background: rgba(255, 130, 110, 0.22);
  color: #ffe8e4;
  box-shadow: inset 0 0 0 1px rgba(255, 160, 140, 0.5);
  animation: kor-dictate-pulse 1.1s ease-in-out infinite;
}

@keyframes kor-dictate-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

.kor-dictate-icon {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'white'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M12%201a3%203%200%200%200-3%203v8a3%203%200%200%200%206%200V4a3%203%200%200%200-3-3z'%2F%3E%3Cpath%20d%3D'M19%2010v2a7%207%200%200%201-14%200v-2'%2F%3E%3Cline%20x1%3D'12'%20y1%3D'19'%20x2%3D'12'%20y2%3D'23'%2F%3E%3Cline%20x1%3D'8'%20y1%3D'23'%20x2%3D'16'%20y2%3D'23'%2F%3E%3C%2Fsvg%3E")
    center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'white'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M12%201a3%203%200%200%200-3%203v8a3%203%200%200%200%206%200V4a3%203%200%200%200-3-3z'%2F%3E%3Cpath%20d%3D'M19%2010v2a7%207%200%200%201-14%200v-2'%2F%3E%3Cline%20x1%3D'12'%20y1%3D'19'%20x2%3D'12'%20y2%3D'23'%2F%3E%3Cline%20x1%3D'8'%20y1%3D'23'%20x2%3D'16'%20y2%3D'23'%2F%3E%3C%2Fsvg%3E")
    center/contain no-repeat;
}

.participant-kor-badges {
  display: inline-flex;
  gap: 0.2rem;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.kor-badge-chat,
.kor-badge-voice {
  font-size: 0.65rem;
  line-height: 1;
  padding: 0.08rem 0.2rem;
  border-radius: 3px;
  background: rgba(196, 168, 255, 0.2);
  color: #e8ddff;
}

.kor-badge-voice {
  background: rgba(120, 220, 180, 0.2);
  color: #d4f5e8;
}

.participant-kor-virtual {
  opacity: 0.95;
  border-left: 2px solid rgba(196, 168, 255, 0.4);
  padding-left: 0.35rem;
}

.kor-virtual-avatar {
  background: linear-gradient(135deg, rgba(196, 168, 255, 0.35), rgba(120, 220, 180, 0.25)) !important;
  font-weight: 700;
  font-size: 0.75rem;
}

.kor-virtual-tag {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-left: 0.25rem;
}

/* Même retrait horizontal / bas que .sidebar-footer-compact (profil utilisateur) */
.chat-input-wrap {
  padding: 0.5rem 0.75rem 0.65rem;
  border-top: 1px solid rgba(0, 0, 0, 0.28);
  background: var(--bg-dark);
}

/* Barre type Discord : fond gris arrondi, + à gauche, champ au centre, actions à droite */
.chat-composer {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  min-height: 46px;
  padding: 0 0.3rem 0 0.45rem;
  border-radius: 8px;
  background: var(--chat-composer-bg);
  border: none;
  box-shadow: var(--chat-composer-inset);
}

.chat-composer:focus-within {
  box-shadow: var(--chat-composer-focus);
}

.chat-composer-attach {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  color: var(--chat-chrome-icon);
  transition: background 0.12s ease, color 0.12s ease;
}

.chat-composer-attach:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--chat-chrome-icon-hover);
}

.chat-composer-plus {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='11' y='5' width='2' height='14' fill='white' rx='0.5'/%3E%3Crect x='5' y='11' width='14' height='2' fill='white' rx='0.5'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='11' y='5' width='2' height='14' fill='white' rx='0.5'/%3E%3Crect x='5' y='11' width='14' height='2' fill='white' rx='0.5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.chat-composer-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.chat-input {
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.5rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--chat-input-fg);
  font: inherit;
  font-size: var(--chat-font-input, 0.95rem);
  line-height: 1.35;
}

.chat-input::placeholder {
  color: var(--chat-placeholder);
}

.chat-input:focus {
  outline: none;
}

.chat-composer-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding-right: 0.15rem;
}

.chat-toolbar-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.35rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--chat-toolbar-color);
  font: inherit;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.chat-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--chat-toolbar-hover-color);
}

.chat-toolbar-gif {
  min-width: auto;
  padding: 0.2rem 0.45rem;
  margin-right: 0.15rem;
  border-radius: 4px;
  background: var(--chat-gif-bg);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--chat-toolbar-color);
}

.chat-toolbar-gif:hover {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.chat-toolbar-emoji-icon {
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 14s1.5 2 4 2 4-2 4-2'/%3E%3Cline x1='9' y1='9' x2='9.01' y2='9'/%3E%3Cline x1='15' y1='9' x2='15.01' y2='9'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 14s1.5 2 4 2 4-2 4-2'/%3E%3Cline x1='9' y1='9' x2='9.01' y2='9'/%3E%3Cline x1='15' y1='9' x2='15.01' y2='9'/%3E%3C/svg%3E") center/contain no-repeat;
}

.chat-toolbar-send {
  color: #5865f2;
}

.chat-toolbar-send:hover {
  background: rgba(88, 101, 242, 0.2);
  color: #7289da;
}

.chat-toolbar-send-icon {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'/%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'/%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'/%3E%3C/svg%3E") center/contain no-repeat;
}

.chat-toolbar-screen-icon {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2' y='4' width='20' height='12' rx='2' fill='white'/%3E%3Crect x='6' y='18' width='12' height='2' rx='1' fill='white'/%3E%3Crect x='10' y='20' width='4' height='2' fill='white'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2' y='4' width='20' height='12' rx='2' fill='white'/%3E%3Crect x='6' y='18' width='12' height='2' rx='1' fill='white'/%3E%3Crect x='10' y='20' width='4' height='2' fill='white'/%3E%3C/svg%3E") center/contain no-repeat;
}

.chat-toolbar-screen.sharing {
  color: var(--success);
}

.chat-toolbar-screen.sharing:hover {
  background: rgba(158, 206, 106, 0.15);
  color: var(--success);
}

/* Rétrocompat si anciennes classes utilisées ailleurs */
.chat-btn-attach {
  flex-shrink: 0;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  border-radius: 6px;
  background: var(--bg-dark);
  display: inline-block;
}

.chat-btn-attach:hover {
  background: var(--accent-dim);
}

.chat-gif-btn {
  flex-shrink: 0;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
}

.chat-gif-btn:hover {
  background: var(--bg-hover);
}

.chat-send {
  padding: 0.4rem 0.7rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text-on-accent);
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.chat-send:hover {
  filter: brightness(1.1);
}

/* Aperçu image chat (zoom in-app, sans nouvel onglet) */
.chat-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  box-sizing: border-box;
}

.chat-image-lightbox[hidden] {
  display: none !important;
}

.chat-image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.chat-image-lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1600px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  pointer-events: none;
}

.chat-image-lightbox-close {
  pointer-events: auto;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(30, 31, 34, 0.95);
  color: #dbdee1;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-image-lightbox-close:hover {
  background: rgba(122, 162, 247, 0.25);
  border-color: var(--accent);
  color: var(--accent);
}

.chat-image-lightbox-img {
  pointer-events: auto;
  max-width: 100%;
  max-height: calc(92vh - 52px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.55);
}

.chat-image-lightbox:not([hidden]) .chat-image-lightbox-img {
  animation: chat-image-lightbox-in 0.22s ease-out;
}

@keyframes chat-image-lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

body.chat-image-lightbox-open {
  overflow: hidden;
}

.chat-msg .body img,
.chat-messages.chat-messages-dm .dm-bubble-body img {
  cursor: zoom-in;
}

.gif-panel {
  position: absolute;
  right: 0.75rem;
  bottom: 4.85rem;
  width: 320px;
  max-height: 360px;
  z-index: 30;
}

.gif-panel-inner {
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--accent-dim);
  box-shadow: var(--shadow);
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.gif-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.gif-close-btn {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
}

.gif-search-row {
  display: flex;
  gap: 0.3rem;
}

.gif-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-dark);
  color: var(--text);
  font-size: 0.8rem;
}

.gif-search-btn {
  flex-shrink: 0;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
}

.gif-search-btn:hover {
  background: var(--bg-hover);
}

.gif-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
  max-height: 220px;
  overflow-y: auto;
}

.gif-results img {
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
}

.gif-hint {
  margin: 0.1rem 0 0;
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ——— Page stats LoL ——— */
.page-lol-stats {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #1f2335 0%, #14151f 45%, #0f1017 100%);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
}

.lol-stats-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

.lol-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.lol-stats-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
  color: var(--accent);
}

.lol-stats-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.lol-stats-refresh {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.lol-stats-refresh:hover {
  background: rgba(122, 162, 247, 0.15);
}

.lol-stats-cards {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.lol-card-global {
  background: rgba(20, 22, 35, 0.95);
  border-radius: 14px;
  border: 1px solid var(--accent-dim);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
}

.lol-card-global h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--accent);
}

.lol-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem 0.8rem;
}

.lol-card-grid .metric .label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.lol-card-grid .metric .value {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.lol-topchamps {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  font-size: 0.85rem;
}

.lol-topchamps li {
  margin-bottom: 0.2rem;
}

.lol-stats-lastgames {
  margin-bottom: 1.5rem;
}

.lol-stats-lastgames h2 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: var(--accent);
}

.lol-section-hint {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.lol-lastgames-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.75rem;
}

.lol-lastgame-card {
  background: rgba(24, 27, 43, 0.98);
  border-radius: 12px;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--accent-dim);
  font-size: 0.8rem;
}

.lol-lastgame-card.win {
  border-color: var(--success);
}

.lol-lastgame-card.lose {
  border-color: var(--danger);
}

.lol-lastgame-card .lg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.lol-lastgame-card .lg-header .queue {
  font-weight: 600;
}

.lol-lastgame-card .lg-header .result {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.lol-lastgame-card .lg-line {
  margin-bottom: 0.1rem;
}

.lol-stats-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.lol-back-link {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}

.lol-back-link:hover {
  text-decoration: underline;
}

.lol-stats-page-link {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
}

.lol-stats-page-link:hover {
  text-decoration: underline;
}

/* ——— Mobile & tablettes (mise en page responsive, pas « récursive ») ———
   Colonne unique : participants → chat → présence serveur, zones tactiles confortables. */

@media (max-width: 960px) {
  .page-app {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .app-body {
    flex-direction: column;
    overflow: hidden;
  }

  .sidebar {
    width: 100%;
    max-width: none;
    flex-shrink: 0;
    max-height: min(220px, 32vh);
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--accent-dim);
    display: flex;
    flex-direction: column;
  }

  .sidebar-header {
    padding: 0.55rem 0.75rem;
    flex-shrink: 0;
  }

  .participants-list-scroll {
    padding: 0.5rem 0.75rem 0.35rem;
  }

  .participants-list h3 {
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
  }

  .sidebar-footer-compact {
    padding: 0.45rem 0.6rem;
    flex-shrink: 0;
  }

  .chat-center {
    flex: 1;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--accent-dim);
  }

  .presence-sidebar {
    width: 100%;
    max-width: none;
    flex-shrink: 0;
    max-height: min(200px, 26vh);
    min-height: 0;
    padding: 0.45rem 0.5rem;
    display: flex;
    flex-direction: column;
  }

  .presence-sidebar-scroll {
    flex: 1;
    min-height: 0;
  }

  .chat-header {
    padding: 0.35rem 0.5rem;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .chat-header-titles h3 {
    font-size: 0.95rem;
  }

  .btn-chat-text-size,
  .btn-toggle-presence {
    min-width: 44px;
    min-height: 44px;
    padding: 0.35rem;
  }

  .chat-composer {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.25rem;
    padding: 0.35rem 0.4rem;
  }

  .chat-composer-attach {
    min-width: 44px;
    min-height: 44px;
  }

  .chat-composer-field {
    flex: 1 1 100%;
    order: -1;
    min-width: 0;
  }

  .chat-input {
    font-size: 16px; /* évite le zoom iOS au focus */
    padding: 0.6rem 0.45rem;
  }

  .chat-composer-toolbar {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.2rem;
    flex: 1;
  }

  .chat-toolbar-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 0.35rem 0.4rem;
  }

  .chat-toolbar-kor,
  .chat-toolbar-kor-voice,
  .chat-toolbar-kor-dictate {
    min-height: 40px;
  }

  .chat-toolbar-gif {
    min-height: 40px;
  }

  .user-bar-icon-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0.35rem;
  }

  .user-settings-panel {
    left: max(8px, env(safe-area-inset-left, 0));
    right: max(8px, env(safe-area-inset-right, 0));
    max-width: none;
    bottom: max(12px, env(safe-area-inset-bottom, 0));
    max-height: min(75dvh, 560px);
  }

  .gif-panel {
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0));
    max-height: min(45dvh, 320px);
  }

  .gif-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .room-modal-inner {
    margin: 0 max(0.75rem, env(safe-area-inset-left, 0)) 0 max(0.75rem, env(safe-area-inset-right, 0));
    max-width: none;
    max-height: min(92dvh, 640px);
    overflow-y: auto;
  }

  .room-list {
    max-height: min(40dvh, 280px);
  }

  .dm-overlay {
    left: 0;
    right: 0;
    width: 100%;
    top: auto;
    bottom: 0;
    height: min(88dvh, 100%);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  }

  .dm-sheet {
    border-left: none;
    border-radius: 12px 12px 0 0;
  }

  .screen-shares-section.chat-screen-shares .screen-share-video {
    max-height: min(40dvh, 280px);
  }

  .chat-screen-shares h3 {
    font-size: 0.8rem;
  }
}

/* Très petits écrans : raccourcir libellés toolbar */
@media (max-width: 400px) {
  .chat-toolbar-kor-voice {
    font-size: 0.5rem;
    padding: 0.2rem 0.3rem;
  }

  .participants-list li {
    font-size: 0.82rem;
    padding: 0.35rem 0;
  }
}

/* Hauteur réduite (paysage mobile) */
@media (max-width: 960px) and (max-height: 480px) {
  .sidebar {
    max-height: min(140px, 28vh);
  }

  .presence-sidebar {
    max-height: min(120px, 22vh);
  }
}

/* Cibles tactiles : appareils principalement au doigt */
@media (pointer: coarse) {
  .btn-manage-rooms {
    min-height: 44px;
    padding: 0.5rem 0.65rem;
  }

  .room-list-item .btn-channel-join,
  .room-list-item button {
    min-height: 40px;
  }

  .chat-tab {
    padding: 0.45rem 0.6rem;
    min-height: 40px;
  }
}

@media (max-width: 640px) {
  .page-login {
    align-items: flex-start;
    padding: max(0.75rem, env(safe-area-inset-top, 0)) max(0.75rem, env(safe-area-inset-right, 0))
      max(1rem, env(safe-area-inset-bottom, 0)) max(0.75rem, env(safe-area-inset-left, 0));
  }

  .page-login-discord .login-shell {
    padding: 0.65rem;
  }

  .page-login a.hub-link {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin-bottom: 0.5rem;
  }

  .page-lol-stats .lol-stats-layout {
    padding: 0.75rem max(0.75rem, env(safe-area-inset-left, 0)) max(1rem, env(safe-area-inset-bottom, 0))
      max(0.75rem, env(safe-area-inset-right, 0));
  }
}
