/* MDJ Messenger — look « messagerie années 2000 » */
:root {
  --font: Tahoma, "Segoe UI", Verdana, Geneva, sans-serif;
  --title-a: #3d8cf5; --title-b: #0a55d6; --title-c: #0848b8;
  --title-text: #fff;
  --win-border: #0b47b0;
  --win-bg: #eef4fc;
  --panel-a: #ffffff; --panel-b: #dce9f8;
  --line: #a9c3e6;
  --text: #1b1b1b; --muted: #6b7a90; --link: #0b55c4;
  --hover: #d8e8fb; --select: #b9d5f7;
  --btn-a: #ffffff; --btn-b: #dfe7f1; --btn-border: #7a95bf;
  --orange: #f59a1b; --orange-b: #e07800;
  --taskbar-a: #3a80e8; --taskbar-b: #1a56c8;
  --green: #3cb043; --red: #e0352b; --amber: #f2a516; --grey: #9aa6b4;
  --desktop: radial-gradient(ellipse 140% 60% at 30% 115%, #6fbe3c 0 38%, transparent 38.5%),
             radial-gradient(ellipse 120% 55% at 85% 120%, #4ea52a 0 40%, transparent 40.5%),
             linear-gradient(180deg, #2f7fd9 0%, #6fb1f0 45%, #bfe2ff 75%, #dff1ff 100%);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font: 12px/1.35 var(--font); color: var(--text); background: var(--desktop); background-attachment: fixed; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.screen { position: fixed; inset: 0; }

/* ---------- logo ---------- */
.logo-mini { display: inline-block; width: 16px; height: 16px; flex: none; background: url(/icons/icon.svg) center/contain no-repeat; }

/* ---------- fenêtres ---------- */
.window {
  position: absolute; display: flex; flex-direction: column;
  background: var(--win-bg); border: 1px solid var(--win-border);
  border-radius: 8px 8px 3px 3px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 25, 80, .35), 0 1px 0 rgba(255,255,255,.6) inset;
}
.window.focused { box-shadow: 0 14px 40px rgba(0, 25, 80, .5); }
.titlebar {
  display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 8px; flex: none;
  background: linear-gradient(180deg, #6fb0ff 0%, var(--title-a) 12%, var(--title-b) 55%, var(--title-c) 100%);
  color: var(--title-text); font-weight: bold; text-shadow: 1px 1px 0 rgba(0,0,0,.35);
  user-select: none; touch-action: none;
}
.window:not(.focused) .titlebar { filter: saturate(.55) brightness(1.08); }
.drag-handle { cursor: default; }
.tb-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.tb-buttons { display: flex; gap: 2px; }
.tb-btn {
  width: 22px; height: 21px; border-radius: 3px; border: 1px solid #fff; padding: 0;
  background: linear-gradient(180deg, #5d9cf7, #2a6fe0); color: #fff; font-weight: bold; line-height: 1; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15) inset;
}
.tb-btn:hover { filter: brightness(1.15); }
.tb-close { background: linear-gradient(180deg, #f08a6a, #d2401c); }
.tb-back { display: none; }

/* ---------- boutons & champs ---------- */
.btn {
  padding: 4px 14px; min-height: 24px; border: 1px solid var(--btn-border); border-radius: 3px; cursor: pointer;
  background: linear-gradient(180deg, var(--btn-a), var(--btn-b));
}
.btn:hover { border-color: #e9a53c; box-shadow: 0 0 0 1px #f8cf7a inset; }
.btn:active { background: linear-gradient(180deg, var(--btn-b), var(--btn-a)); }
.btn-primary { font-weight: bold; }
.btn:disabled { opacity: .55; cursor: default; }
input[type=text], input:not([type]), input[type=password], input[type=search], select, textarea {
  border: 1px solid #7f9db9; background: #fff; padding: 3px 5px; border-radius: 0; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #3c7fe0; box-shadow: 0 0 0 1px #9cc3f5; }
.icon-btn { border: 1px solid transparent; background: transparent; border-radius: 3px; padding: 2px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { border-color: #9cbbe3; background: linear-gradient(180deg, #fff, #dde9f7); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- écran de connexion ---------- */
#login-screen { display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-window { position: relative; width: 340px; max-width: 100%; }
.login-body { padding: 18px 26px 22px; background: linear-gradient(180deg, #fff 0%, var(--win-bg) 60%); }
.login-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 10px; }
.logo-svg { width: 110px; height: 74px; overflow: visible; }
.login-brand { font: bold 26px/1 "Trebuchet MS", var(--font); color: #1a4fa8; letter-spacing: -.5px; text-shadow: 0 1px 0 #fff; margin-top: 4px; }
.login-tabs { display: flex; border-bottom: 1px solid var(--line); margin: 6px 0 12px; }
.tab { flex: 1; border: 0; background: none; padding: 6px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.active { color: var(--link); font-weight: bold; border-bottom-color: var(--orange); }
.login-form { display: flex; flex-direction: column; gap: 9px; }
.login-form label { display: flex; flex-direction: column; gap: 3px; }
.login-form label.check { flex-direction: row; align-items: center; gap: 6px; }
.login-form .btn-primary { margin-top: 4px; align-self: center; min-width: 120px; }
.form-error { color: #c0261c; min-height: 0; font-weight: bold; }
.form-error:empty { display: none; }
.signing-in { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 0 8px; color: var(--muted); }
.signin-anim { position: relative; width: 70px; height: 44px; }
.signin-anim span { position: absolute; width: 34px; height: 26px; border-radius: 8px; animation: hop 1s ease-in-out infinite; }
.signin-anim span:first-child { left: 4px; background: linear-gradient(#7cc4ff, #1f6fd6); }
.signin-anim span:last-child { right: 4px; top: 14px; background: linear-gradient(#ffd27a, #f08a12); animation-delay: .5s; }
@keyframes hop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.logo-svg .b1 { animation: bob 3s ease-in-out infinite; }
.logo-svg .b2 { animation: bob 3s ease-in-out infinite 1.5s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ---------- bureau & barre des tâches ---------- */
#desktop { position: absolute; inset: 0 0 34px 0; overflow: hidden; }
#taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 6px 0 0;
  background: linear-gradient(180deg, #5c9bf0 0%, var(--taskbar-a) 10%, var(--taskbar-b) 90%, #1449ad 100%);
  border-top: 1px solid #0d3f9c; z-index: 9000;
}
.start-btn {
  height: 100%; display: flex; align-items: center; gap: 6px; padding: 0 16px 0 10px; border: 0; cursor: pointer;
  color: #fff; font: bold italic 14px "Trebuchet MS", var(--font); text-shadow: 1px 1px 1px rgba(0,0,0,.4);
  background: linear-gradient(180deg, #5ec05a, #31932f 60%, #287d26); border-radius: 0 12px 12px 0;
}
.start-btn .logo-mini { width: 20px; height: 20px; }
.os-mini { display: inline-block; width: 20px; height: 20px; flex: none; border-radius: 5px; background: #000 url(/icons/icon.svg) center/86% no-repeat; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.task-item.main-task { flex: 0 0 auto; }
.task-items { flex: 1; display: flex; gap: 4px; overflow: hidden; }
.task-item {
  max-width: 180px; min-width: 60px; flex: 0 1 180px; height: 26px; display: flex; align-items: center; gap: 5px; padding: 0 8px;
  border: 1px solid #1747a6; border-radius: 3px; cursor: pointer; color: #fff; text-align: left;
  background: linear-gradient(180deg, #4f91f0, #2f6fe0); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.task-item span.t { overflow: hidden; text-overflow: ellipsis; }
.task-item.active { background: linear-gradient(180deg, #1c4fb4, #2860cc); box-shadow: inset 1px 1px 2px rgba(0,0,0,.4); }
.task-item.flash { animation: taskflash 1s steps(1) infinite; }
@keyframes taskflash { 0% { background: linear-gradient(180deg, #ffbf4a, var(--orange-b)); } 50% { background: linear-gradient(180deg, #4f91f0, #2f6fe0); } }
.tray { color: #fff; padding: 0 12px; height: 100%; display: flex; align-items: center; background: linear-gradient(180deg, #1aa0f0, #0d80dc); border-left: 1px solid #0a4fa8; }

/* ---------- fenêtre principale ---------- */
.main-window { left: 24px; top: 20px; width: 310px; height: calc(100% - 40px); min-height: 360px; max-height: 720px; z-index: 10; }
.menubar { display: flex; gap: 2px; padding: 1px 4px; background: linear-gradient(180deg, #f6f9fd, #e3ecf7); border-bottom: 1px solid var(--line); flex: none; }
.menu { padding: 2px 7px; cursor: default; border: 1px solid transparent; }
.menu:hover, .menu.open { background: var(--hover); border-color: #9cbbe3; }
.me-panel { display: flex; gap: 10px; padding: 10px; background: linear-gradient(180deg, #fff 0%, #e7f0fb 100%); border-bottom: 1px solid var(--line); flex: none; }
.avatar-frame {
  width: 64px; height: 64px; flex: none; padding: 3px; border-radius: 7px; cursor: pointer;
  border: 1px solid #8fb1dc; background: linear-gradient(180deg, #fff, #d4e4f7); box-shadow: 0 1px 3px rgba(0,40,100,.25);
}
.avatar-frame img, .avatar-frame .av { width: 100%; height: 100%; border-radius: 4px; display: block; object-fit: cover; }
.av { display: flex !important; align-items: center; justify-content: center; color: #fff; font: bold 22px/1 var(--font); text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.me-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.me-name { display: flex; align-items: center; gap: 5px; border: 1px solid transparent; background: none; padding: 2px 3px; cursor: pointer; text-align: left; max-width: 100%; border-radius: 2px; }
.me-name:hover { border-color: #9cbbe3; background: var(--hover); }
.me-display { font-weight: bold; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-status { color: var(--muted); white-space: nowrap; }
.caret { color: var(--muted); font-size: 10px; }
.me-psm, .me-np input { border: 1px solid transparent !important; background: transparent !important; box-shadow: none !important; padding: 2px 4px; width: 100%; color: #3b4b63; }
.me-psm:hover, .me-psm:focus, .me-np input:hover, .me-np input:focus { border-color: #7f9db9 !important; background: #fff !important; }
.me-psm::placeholder { color: #8a9ab0; }
.me-np { display: flex; align-items: center; gap: 2px; }
.np-note { color: #2f7fd9; font-size: 13px; padding-left: 4px; }
.me-np input { font-style: italic; }
.search-bar { display: flex; gap: 4px; padding: 6px 8px; background: #f2f7fd; border-bottom: 1px solid var(--line); flex: none; }
.search-bar input { flex: 1; min-width: 0; border-radius: 10px; padding-left: 9px; }
.contact-list { flex: 1; overflow-y: auto; background: #fff; padding: 4px 0 10px; overscroll-behavior: contain; }
.group-head { display: flex; align-items: center; gap: 4px; padding: 4px 8px; font-weight: bold; color: #1d4b8f; cursor: pointer; user-select: none; }
.group-head .tri { width: 10px; font-size: 9px; transition: transform .15s; }
.group-head.collapsed .tri { transform: rotate(-90deg); }
.group-head .cnt { font-weight: normal; color: var(--muted); }
.contact {
  display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 20px; cursor: default; user-select: none; border: 1px dotted transparent;
}
.contact:hover { background: var(--hover); }
.contact.sel { background: var(--select); border-color: #6b98d6; }
.contact .cname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.contact .cname b { font-weight: normal; }
.contact .psm { color: var(--muted); font-style: italic; }
.contact .np { color: #2f7fd9; }
.contact.offline .cname b { color: #74808f; }
.contact .badge, .group-head .badge { margin-left: auto; background: var(--orange); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; font-weight: bold; }
.contact .req-actions { margin-left: auto; display: flex; gap: 4px; flex: none; }
.contact .req-actions .btn { padding: 1px 8px; min-height: 20px; font-size: 11px; }
.contact.request .cname { white-space: normal; }
.empty-hint { padding: 16px 20px; color: var(--muted); text-align: center; }
.tip-bar { padding: 7px 10px; font-size: 11px; color: #405675; background: linear-gradient(180deg, #e8f1fc, #cfe0f5); border-top: 1px solid var(--line); flex: none; min-height: 30px; }
.tip-bar b { color: #1d4b8f; }

/* ---------- pastilles de statut ---------- */
.status-orb { width: 14px; height: 14px; flex: none; border-radius: 50%; position: relative; display: inline-block;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, transparent 30%), radial-gradient(circle at 50% 60%, #6bd36f, #1f8e25);
  box-shadow: 0 0 0 1px rgba(0,60,0,.45), 0 1px 1px rgba(0,0,0,.2); }
.status-orb.busy { background: radial-gradient(circle at 35% 30%, #fff 0 12%, transparent 30%), radial-gradient(circle at 50% 60%, #ff7a6b, #c6231a); box-shadow: 0 0 0 1px rgba(120,0,0,.45); }
.status-orb.busy::after { content: ""; position: absolute; left: 3px; width: 8px; top: 6px; height: 2px; background: #fff; border-radius: 1px; }
.status-orb.away, .status-orb.brb, .status-orb.phone, .status-orb.lunch { background: radial-gradient(circle at 35% 30%, #fff 0 12%, transparent 30%), radial-gradient(circle at 50% 60%, #ffd36b, #e48a00); box-shadow: 0 0 0 1px rgba(120,70,0,.45); }
.status-orb.away::after, .status-orb.brb::after, .status-orb.phone::after, .status-orb.lunch::after { content: ""; position: absolute; left: 6px; top: 3px; width: 3px; height: 4px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; }
.status-orb.offline, .status-orb.invisible { background: radial-gradient(circle at 35% 30%, #fff 0 12%, transparent 30%), radial-gradient(circle at 50% 60%, #d3d9e0, #8a96a3); box-shadow: 0 0 0 1px rgba(60,70,80,.4); }
.status-orb.pending { background: radial-gradient(circle at 50% 60%, #eef2f6, #b8c2cd); box-shadow: 0 0 0 1px rgba(60,70,80,.4); }
.status-orb.pending::after { content: "?"; position: absolute; inset: 0; font: bold 10px/14px var(--font); color: #5b6775; text-align: center; }
.status-orb.blocked::before { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid #d21; background: linear-gradient(45deg, transparent 44%, #d21 44% 56%, transparent 56%); }

/* ---------- menus contextuels ---------- */
.ctx-menu {
  position: fixed; z-index: 10000; min-width: 180px; background: #fff; border: 1px solid #7a95bf; padding: 2px;
  box-shadow: 3px 3px 8px rgba(0,0,0,.25);
}
.ctx-item { display: flex; align-items: center; gap: 8px; padding: 5px 20px 5px 8px; cursor: default; white-space: nowrap; }
.ctx-item:hover { background: #316ac5; color: #fff; }
.ctx-item.disabled { color: #9aa6b4; pointer-events: none; }
.ctx-item.checked::before { content: "•"; position: absolute; margin-left: -6px; }
.ctx-sep { height: 1px; background: #d0dae6; margin: 3px 2px; }

/* ---------- fenêtres de conversation ---------- */
.chat-window { width: 640px; height: 500px; min-width: 330px; min-height: 300px; }
.chat-window.minimized { display: none; }
.chat-toolbar { display: flex; gap: 2px; padding: 4px 6px; background: linear-gradient(180deg, #fbfdff, #dce8f6); border-bottom: 1px solid var(--line); flex: none; overflow-x: auto; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 52px; white-space: nowrap; flex: none; padding: 3px 6px; border: 1px solid transparent; border-radius: 3px; background: none; cursor: pointer; font-size: 11px; color: #213a5e; }
.tool:hover { border-color: #9cbbe3; background: linear-gradient(180deg, #fff, #d3e3f6); }
.tool svg { width: 26px; height: 26px; }
.chat-to { padding: 5px 10px; border-bottom: 1px solid var(--line); background: #f5f9fe; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-to .who { font-weight: bold; }
.chat-to .psm { color: var(--muted); font-style: italic; }
.chat-main { flex: 1; display: flex; min-height: 0; gap: 8px; padding: 8px; }
.chat-left { flex: 1; display: flex; flex-direction: column; min-width: 0; gap: 6px; }
.chat-log { flex: 1; overflow-y: auto; background: #fff; border: 1px solid #a5bfdf; padding: 6px 8px; overscroll-behavior: contain; user-select: text; -webkit-user-select: text; }
.chat-side { width: 104px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; flex: none; }
.chat-side .avatar-frame { width: 100px; height: 100px; cursor: default; }
.side-others { display: flex; flex-direction: column; gap: 6px; }
.side-others.multi .avatar-frame { width: 48px; height: 48px; }
.side-others.multi { flex-direction: row; flex-wrap: wrap; }
.msg-head { color: #5d6b7e; margin-top: 6px; }
.msg-head:first-child { margin-top: 0; }
.msg { padding: 1px 0 1px 14px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg .emo { font-size: 1.45em; line-height: 1; vertical-align: -3px; display: inline-block; }
.msg a { color: var(--link); }
.msg-sys { color: #7b8796; font-style: italic; margin: 6px 0; display: flex; align-items: center; gap: 6px; }
.msg-sys.nudge { color: #c05a00; font-style: normal; font-weight: bold; }
.msg-sys.err { color: #c0261c; }
.msg-sys .ic { font-size: 15px; }
.day-sep { text-align: center; color: #95a1b1; font-size: 11px; margin: 10px 0 4px; }
.file-card { margin: 4px 0 4px 14px; padding: 8px; border: 1px solid #c3d5ec; background: linear-gradient(180deg, #fbfdff, #e9f1fb); border-radius: 4px; display: inline-flex; flex-direction: column; gap: 6px; max-width: calc(100% - 14px); }
.file-card .fname { font-weight: bold; word-break: break-all; }
.file-card .fmeta { color: var(--muted); font-size: 11px; }
.file-card img { max-width: 240px; max-height: 200px; border: 1px solid #c3d5ec; display: block; cursor: zoom-in; }
.file-card .factions { display: flex; gap: 8px; }
.file-card .factions a { color: var(--link); }
.load-more { display: block; margin: 0 auto 6px; font-size: 11px; color: var(--link); background: none; border: 0; cursor: pointer; text-decoration: underline; }

.compose { display: flex; flex-direction: column; border: 1px solid #a5bfdf; background: #fff; flex: none; }
.fmt-bar { display: flex; align-items: center; gap: 2px; padding: 2px 4px; background: linear-gradient(180deg, #f8fbff, #e5eef9); border-bottom: 1px solid #c9d9ee; }
.fmt-bar .icon-btn { width: 28px; height: 26px; font-size: 16px; }
.fmt-bar .wizz-btn { font-size: 12px; width: auto; padding: 0 6px; font-weight: bold; color: #c05a00; }
.compose-row { display: flex; }
.compose textarea { flex: 1; border: 0 !important; box-shadow: none !important; resize: none; height: 62px; padding: 5px 7px; min-width: 0; }
.compose .send { margin: 6px; align-self: stretch; min-width: 72px; }
.typing-bar { height: 18px; color: var(--muted); font-size: 11px; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.drop-hint { position: absolute; inset: 28px 0 0; background: rgba(60,130,230,.18); border: 3px dashed #3c82e6; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #1d4b8f; font-size: 15px; pointer-events: none; }

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-12px, 6px); } 20% { transform: translate(10px, -8px); } 30% { transform: translate(-10px, -4px); }
  40% { transform: translate(12px, 8px); } 50% { transform: translate(-8px, 10px); } 60% { transform: translate(10px, -6px); }
  70% { transform: translate(-12px, -8px); } 80% { transform: translate(8px, 6px); } 90% { transform: translate(-6px, -4px); }
}
.shake { animation: shake .6s linear; }

/* ---------- popovers (émoticônes, police) ---------- */
.popover { position: fixed; z-index: 10001; background: #fff; border: 1px solid #7a95bf; box-shadow: 3px 3px 10px rgba(0,0,0,.25); padding: 6px; }
.emo-grid { display: grid; grid-template-columns: repeat(8, 32px); gap: 2px; }
.emo-grid button { width: 32px; height: 32px; font-size: 20px; border: 1px solid transparent; background: none; cursor: pointer; border-radius: 3px; padding: 0; }
.emo-grid button:hover { border-color: #9cbbe3; background: var(--hover); }
.font-pop { display: flex; flex-direction: column; gap: 8px; width: 240px; }
.font-pop .row { display: flex; gap: 6px; align-items: center; }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.swatches button { height: 20px; border: 1px solid #889; cursor: pointer; padding: 0; }
.swatches button.on { outline: 2px solid #316ac5; outline-offset: 1px; }
.font-preview { border: 1px solid #c9d9ee; padding: 6px; min-height: 32px; }

/* ---------- toasts ---------- */
#toasts { position: absolute; right: 10px; bottom: 44px; display: flex; flex-direction: column; gap: 8px; z-index: 9500; pointer-events: none; }
.toast {
  width: 230px; pointer-events: auto; cursor: pointer; border: 1px solid var(--win-border); border-radius: 6px 6px 2px 2px; overflow: hidden;
  background: linear-gradient(180deg, #fff, #dbe8f8); box-shadow: 0 6px 18px rgba(0,25,80,.35); animation: toastin .35s ease-out;
}
.toast .th { height: 20px; display: flex; align-items: center; gap: 5px; padding: 0 6px; color: #fff; font-weight: bold; font-size: 11px; background: linear-gradient(180deg, var(--title-a), var(--title-c)); }
.toast .tb { display: flex; gap: 8px; padding: 10px; align-items: center; min-height: 64px; }
.toast .tb .avatar-frame { width: 44px; height: 44px; padding: 2px; }
.toast .tt { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; color: #213a5e; }
.toast.out { animation: toastout .3s ease-in forwards; }
@keyframes toastin { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastout { to { transform: translateY(30px); opacity: 0; } }

/* ---------- boîtes de dialogue ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,30,70,.25); z-index: 11000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { position: relative; width: 400px; max-width: 100%; max-height: calc(100% - 20px); }
.modal .mbody { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, #fff, var(--win-bg)); }
.modal .mbody label { display: flex; flex-direction: column; gap: 3px; }
.modal .mbody label.check { flex-direction: row; align-items: center; gap: 6px; }
.modal .mfoot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); background: #e7eff9; }
.modal h3 { margin: 4px 0 0; font-size: 12px; color: #1d4b8f; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.avatar-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.avatar-picker button { aspect-ratio: 1; border: 2px solid transparent; border-radius: 6px; padding: 2px; cursor: pointer; background: none; }
.avatar-picker button:hover, .avatar-picker button.on { border-color: #316ac5; }
.avatar-picker img { width: 100%; height: 100%; border-radius: 4px; display: block; }
.muted { color: var(--muted); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 12000; display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 94vh; box-shadow: 0 10px 40px #000; }

/* ---------- mobile ---------- */
@media (max-width: 720px) {
  body { background: var(--win-bg); }
  #desktop { inset: 0; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
  #taskbar { display: none; }
  .window { border-radius: 0; border: 0; box-shadow: none; }
  .main-window, .chat-window { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; max-height: none; resize: none; }
  .main-window { padding-top: env(safe-area-inset-top); }
  .chat-window { z-index: 50 !important; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .titlebar { height: 44px; font-size: 15px; }
  .tb-title { font-size: 15px; }
  .tb-min, .chat-window .tb-close { display: none; }
  .tb-back { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 32px; font-size: 20px; }
  .chat-side { display: none; }
  .chat-main { padding: 6px; }
  .tool { min-width: 52px; }
  .contact { padding-top: 7px; padding-bottom: 7px; font-size: 14px; }
  .group-head { font-size: 13px; padding: 7px 8px; }
  .compose textarea { height: 48px; font-size: 16px; }
  #toasts { left: 8px; right: 8px; bottom: auto; top: calc(8px + env(safe-area-inset-top)); align-items: center; }
  .toast { width: 100%; max-width: 380px; }
  .main-window { z-index: 1 !important; }
  input, select, textarea { font-size: 16px !important; }
  .me-psm, .me-np input { font-size: 13px !important; }
}
@media (min-width: 721px) { .mobile-only { display: none !important; } }

/* ---------- pseudos en couleurs ---------- */
.rich-input { position: relative; }
.rich-input .rich-view { position: absolute; inset: 0; padding: 3px 5px; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #3b4b63; }
.rich-input input:not(:focus) { color: transparent !important; }
.rich-input input:focus + .rich-view, .rich-input .rich-view:empty { display: none; }
.rt { border-radius: 1px; }
.rich-editor { display: flex; flex-direction: column; gap: 8px; }
.rich-tools { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; padding: 4px; border: 1px solid #c9d9ee; background: linear-gradient(180deg, #fbfdff, #e5eef9); }
.rich-tools .btn { min-height: 22px; padding: 1px 8px; }
.rich-tools .btn.on { background: #c9dcf5; border-color: #316ac5; }
.rich-tools .sep { width: 1px; height: 20px; background: #b9cbe3; margin: 0 3px; }
.rich-swatches { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; }
.rich-swatches button { height: 18px; border: 1px solid #556; padding: 0; cursor: pointer; position: relative; }
.rich-swatches button span { position: absolute; inset: 0; font-size: 8px; line-height: 16px; color: #fff; text-shadow: 0 0 2px #000; }
.rich-swatches button.grad-a { outline: 2px solid #3cb043; outline-offset: 1px; }
.rich-preview { border: 1px solid #c9d9ee; background: #fff; padding: 6px 8px; min-height: 24px; overflow-wrap: anywhere; }
.rich-help code { background: #eef3fa; padding: 0 3px; }
.rich-emos { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 2px; padding: 4px; border: 1px solid #c9d9ee; background: #fff; max-height: 150px; overflow-y: auto; }
.rich-emos button { font-size: 18px; line-height: 26px; border: 1px solid transparent; background: none; cursor: pointer; border-radius: 3px; padding: 0; }
.rich-emos button:hover { border-color: #316ac5; background: #e5eef9; }
body.dark .rich-tools { background: #1a2130 !important; border-color: var(--line) !important; }
body.dark .rich-tools .btn.on { background: #2f4f86 !important; border-color: #5b8ee0 !important; color: #fff !important; }
body.dark .rich-tools .sep { background: #3d4b66; }
body.dark .rich-help code { background: #24304a; color: #d6e4ff; }
body.dark .rich-help, body.dark .rich-editor .hint { color: #b8c4d8; }
body.dark .rich-swatches button { border-color: #3d4b66; }
body.dark .rich-emos { background: #1a2130; border-color: var(--line); }
body.dark .rich-emos button:hover { background: #31446e; border-color: #4d6aa6; }

/* ---------- clins d'œil ---------- */
.wk-layer { position: absolute; inset: 28px 0 0 0; pointer-events: none; overflow: hidden; z-index: 30; }
.wk-sprite { position: absolute; line-height: 1; pointer-events: none; will-change: transform, opacity; user-select: none; }
.wink-grid { display: grid; grid-template-columns: repeat(4, 84px); gap: 4px; }
.wink-grid button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 1px solid transparent; border-radius: 4px; background: none; cursor: pointer; font-size: 10.5px; color: #213a5e; }
.wink-grid button span { font-size: 28px; line-height: 1.1; }
.wink-grid button:hover { border-color: #9cbbe3; background: var(--hover); }
.msg-sys.wink { color: #a0457a; font-style: normal; font-weight: bold; }
.msg-sys .replay { font-weight: normal; color: var(--link); background: none; border: 0; cursor: pointer; text-decoration: underline; padding: 0; font-size: 11px; }
@media (max-width: 720px) { .wk-layer { top: 44px; } .wink-grid { grid-template-columns: repeat(4, 1fr); width: calc(100vw - 30px); } }
.np-link { color: inherit; text-decoration: none; }
.np-link:hover { text-decoration: underline; }
.contact .np, .contact .np-link { color: #2f6db5; }

/* ---------- appels ---------- */
.call-banner { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e3b54f; border-radius: 4px; background: linear-gradient(180deg, #fff8e1, #ffe7a8); flex: none; flex-wrap: wrap; }
.call-banner.incoming { animation: callpulse 1.2s ease-in-out infinite; }
.call-banner .ic { font-size: 20px; }
.call-banner .txt { flex: 1; min-width: 140px; }
.call-banner .acts { display: flex; gap: 5px; flex-wrap: wrap; }
.call-banner .ok { background: linear-gradient(#7fe08a, #2fa83c); color: #fff; font-weight: bold; border-color: #1f7a2a; }
.call-banner .no { background: linear-gradient(#ff9d8a, #d9402a); color: #fff; font-weight: bold; border-color: #9a2a17; }
@keyframes callpulse { 50% { box-shadow: 0 0 0 3px rgba(245,154,27,.45); } }
.chat-window.in-call { min-width: 720px; }
.chat-window.in-call .chat-side { display: none; }
.call-pane { width: 280px; flex: none; display: flex; flex-direction: column; gap: 6px; }
.cp-remote { position: relative; aspect-ratio: 4 / 3; background: #0d1a2e; border: 1px solid #5a7fb5; border-radius: 6px; overflow: hidden; }
.cp-remote video, .cp-local video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0d1a2e; }
.cp-local video { transform: scaleX(-1); }
.cp-remote .cp-avatar, .cp-local .cp-avatar-me { position: absolute; inset: 0; margin: auto; display: none; }
.cp-remote .cp-avatar { width: 96px; height: 96px; }
.cp-remote.nocam video, .cp-local.nocam video { visibility: hidden; }
.cp-remote.nocam .cp-avatar, .cp-local.nocam .cp-avatar-me { display: block; }
.cp-remote.muted::after { content: "🔇"; position: absolute; top: 6px; left: 8px; font-size: 16px; }
.cp-status { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; color: #fff; text-shadow: 0 1px 3px #000; font-weight: bold; }
.cp-timer { position: absolute; top: 6px; right: 8px; color: #fff; font-size: 11px; text-shadow: 0 1px 2px #000; }
.cp-local { position: relative; width: 140px; aspect-ratio: 4 / 3; align-self: flex-end; margin-top: -60px; margin-right: 6px; border: 2px solid #fff; border-radius: 5px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.4); background: #0d1a2e; z-index: 1; }
.cp-local .cp-avatar-me { width: 60px; height: 60px; padding: 2px; }
.cp-controls { display: flex; justify-content: center; gap: 8px; }
.cp-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #7a95bf; background: linear-gradient(#fff, #dfe7f1); font-size: 19px; cursor: pointer; }
.cp-btn.off { background: linear-gradient(#ddd, #aaa); opacity: .7; text-decoration: line-through; }
.cp-btn.on { background: linear-gradient(#bfe3ff, #6fb1f0); }
.cp-btn.hang { background: linear-gradient(#ff8a7a, #d2401c); border-color: #9a2a17; }
.msg-sys.call { color: #2b6b2f; font-style: normal; }
.msg-sys.call.missed { color: #b03a1f; }

/* ---------- jeux ---------- */
.game-card { display: flex; gap: 10px; margin: 6px 0; padding: 9px 10px; border: 1px solid #b9cfee; border-radius: 6px; background: linear-gradient(180deg, #fbfdff, #e4eefb); align-items: flex-start; }
.game-card .gc-ic { font-size: 26px; line-height: 1; }
.game-card .gc-body { display: flex; flex-direction: column; gap: 4px; }
.game-card .gc-acts { display: flex; gap: 6px; margin-top: 2px; }
.msg-sys.game-result { color: #9a6a00; font-style: normal; font-weight: bold; }
.chat-window.in-game { min-width: 860px; }
.chat-window.in-game .chat-side { display: none; }
.game-pane { width: 400px; flex: none; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid #a5bfdf; border-radius: 4px; background: linear-gradient(180deg, #fff, #e9f1fb); overflow: auto; }
.gp-title { font: bold 15px "Trebuchet MS", var(--font); color: #1d4b8f; text-align: center; }
.gp-players { display: flex; align-items: center; justify-content: center; gap: 8px; }
.gp-player { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 6px; border-radius: 6px; border: 2px solid transparent; min-width: 100px; max-width: 150px; }
.gp-player.turn { border-color: #f59a1b; background: #fff6e0; }
.gp-player .avatar-frame { width: 44px; height: 44px; padding: 2px; cursor: default; }
.gp-pname { font-size: 11px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.gp-player.p0 .gp-sym { color: #2f6fe0; } .gp-player.p1 .gp-sym { color: #e0352b; }
.gp-chip { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; }
.gp-player.p0 .gp-chip { background: #e0352b; } .gp-player.p1 .gp-chip { background: #f5c518; }
.gp-score { font-size: 18px; color: #1d4b8f; }
.gp-vs { color: var(--muted); font-size: 11px; }
.gp-status { text-align: center; min-height: 18px; }
.gp-yourturn { color: #2b8a3e; } .gp-win { color: #c07a00; }
.gp-board { align-self: center; }
.gp-foot { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
/* morpion */
.gp-board.morpion { display: grid; grid-template-columns: repeat(3, 90px); grid-template-rows: repeat(3, 90px); gap: 5px; background: #1d4b8f; padding: 5px; border-radius: 6px; }
.morpion .cell { border: 0; background: #fff; border-radius: 4px; font: bold 52px/1 "Comic Sans MS", var(--font); cursor: pointer; padding: 0; }
.morpion.myturn .cell:not(:disabled):hover { background: #eaf3ff; }
.morpion .cell:disabled { cursor: default; color: inherit; }
.morpion .x { color: #2f6fe0; } .morpion .o { color: #e0352b; }
.morpion .cell.win { background: #fff1b8; }
.morpion .cell.last span { animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.2); } to { transform: scale(1); } }
/* puissance 4 */
.gp-board.puissance4 { display: flex; gap: 4px; padding: 6px; background: linear-gradient(#2f6fe0, #1d4bb0); border-radius: 8px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.puissance4 .col { display: flex; flex-direction: column; gap: 4px; padding: 2px; border-radius: 6px; cursor: pointer; }
.puissance4.myturn .col:hover { background: rgba(255,255,255,.18); }
.puissance4 .hole { width: 42px; height: 42px; border-radius: 50%; background: #dfe9f7; box-shadow: inset 0 3px 4px rgba(0,0,0,.35); overflow: hidden; }
.puissance4 .disc { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), inset 0 3px 3px rgba(255,255,255,.4); }
.puissance4 .disc.p0 { background: #e0352b; } .puissance4 .disc.p1 { background: #f5c518; }
.puissance4 .disc.drop { animation: drop .35s cubic-bezier(.5,0,1,1); }
.puissance4 .disc.win { outline: 3px solid #fff; outline-offset: -6px; }
@keyframes drop { from { transform: translateY(calc(var(--r) * -46px)); } to { transform: none; } }
/* démineur à deux */
.mf-grid { display: grid; gap: 1px; background: #7f8fa6; border: 2px solid #5b6b82; width: 308px; }
.mf { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font: bold 12px/1 var(--font); padding: 0; }
.mf.hidden-cell { border: 0; background: linear-gradient(135deg, #cfe0f5, #9ab7dd); box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #6f8bb3; cursor: pointer; }
.demineur.myturn .mf.hidden-cell:hover { background: linear-gradient(135deg, #e6f0fb, #b8cfec); }
.mf.open { background: #eef2f6; }
.mf.flag { font-size: 12px; } .mf.flag.p0 { background: #b9d2fb; } .mf.flag.p1 { background: #fbc2bb; }
.mf.flag.last { animation: pop .3s ease-out; }
.mf.mine { background: #ffe1a8; font-size: 12px; }
.mf.n1 { color: #1f5fd6; } .mf.n2 { color: #2b8a3e; } .mf.n3 { color: #d6223a; } .mf.n4 { color: #2a3f9e; }
.mf.n5 { color: #8a2b12; } .mf.n6 { color: #0b8a8a; } .mf.n7 { color: #222; } .mf.n8 { color: #777; }

@media (max-width: 720px) {
  .chat-window.in-call, .chat-window.in-game { min-width: 0; }
  .chat-window.in-call .chat-main { flex-direction: column; }
  .call-pane { position: absolute; inset: 44px 0 0 0; width: auto; z-index: 25; background: #0d1a2e; padding: 0 0 calc(14px + env(safe-area-inset-bottom)); justify-content: space-between; }
  .cp-remote { flex: 1; aspect-ratio: auto; border: 0; border-radius: 0; }
  .cp-local { position: absolute; top: 12px; right: 12px; width: 100px; margin: 0; }
  .cp-controls { padding-top: 12px; }
  .chat-window.in-game .chat-main { flex-direction: column; }
  .game-pane { width: auto; max-height: 62%; }
  .gp-board.morpion { grid-template-columns: repeat(3, 76px); grid-template-rows: repeat(3, 76px); }
  .puissance4 .hole { width: 36px; height: 36px; }
  .mf-grid { width: calc(100vw - 40px); max-width: 352px; }
  .mf { width: auto; height: auto; aspect-ratio: 1; font-size: 10px; }
}

/* ---------- réglages audio/vidéo ---------- */
.dev-settings { display: flex; flex-direction: column; gap: 7px; }
.dev-row { display: flex; gap: 6px; }
.dev-row select { flex: 1; min-width: 0; }
.dev-preview { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 220px; background: #0d1a2e; border: 1px solid #5a7fb5; border-radius: 6px; overflow: hidden; }
.dev-preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.dev-nocam { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: #c9d6e8; }
.dev-preview.nocam .dev-nocam { display: flex; }
.dev-meter { height: 12px; border: 1px solid #7f9db9; background: #fff; border-radius: 2px; overflow: hidden; }
.dev-level { height: 100%; width: 0; background: linear-gradient(90deg, #3cb043 0 60%, #f2a516 75%, #e0352b 100%); background-size: 260px 100%; transition: width .05s linear; }
.dev-hint { font-size: 11px; }

/* ---------- messages : actions, réponses, réactions, aperçus ---------- */
.msg-wrap { position: relative; border-radius: 4px; padding-right: 4px; }
.msg-wrap:hover { background: rgba(60,130,230,.06); }
.msg-tools { position: absolute; top: -12px; right: 4px; display: none; gap: 1px; background: #fff; border: 1px solid #b9cfee; border-radius: 12px; padding: 1px 3px; box-shadow: 0 2px 6px rgba(0,30,80,.18); z-index: 2; }
.msg-tools button { border: 0; background: none; cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 8px; }
.msg-tools button:hover { background: var(--hover); }
@media (hover: hover) { .msg-wrap:hover .msg-tools { display: flex; } }
.msg-wrap.show-tools .msg-tools { display: flex; }
.msg-wrap.flash-hl { animation: flashhl 2s ease-out; }
@keyframes flashhl { 0%, 40% { background: #fff1b8; } 100% { background: transparent; } }
.msg.deleted { color: var(--muted); font-style: italic; }
.edited { color: var(--muted); font-size: 10px; font-style: italic; font-weight: normal; }
.reply-quote { margin: 2px 0 1px 14px; padding: 2px 8px; border-left: 3px solid #7aa7e6; background: #eef4fc; color: #4a5a72; font-size: 11px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 0 3px 3px 0; }
.reacts { display: flex; flex-wrap: wrap; gap: 3px; margin: 2px 0 2px 14px; }
.react { border: 1px solid #c9d9ee; background: #f5f9fe; border-radius: 10px; padding: 0 6px; font-size: 12px; cursor: pointer; line-height: 18px; }
.react.me { border-color: #3c82e6; background: #dcebff; }
.react-pop { display: flex; gap: 2px; border-radius: 18px; padding: 3px 6px; }
.react-pop button { border: 0; background: none; font-size: 22px; cursor: pointer; padding: 2px; border-radius: 50%; transition: transform .1s; }
.react-pop button:hover { transform: scale(1.3); }
.seen-mark { text-align: right; color: var(--muted); font-size: 10.5px; margin: 1px 4px 3px; }
.compose-ctx { display: flex; align-items: center; gap: 6px; padding: 3px 6px; background: #eef4fc; border-bottom: 1px solid #c9d9ee; font-size: 11px; }
.compose-ctx span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-ctx .icon-btn { font-size: 12px; width: 22px; height: 20px; }
.fmt-spacer { flex: 1; }
.link-prev { display: flex; gap: 8px; margin: 4px 0 4px 14px; max-width: 420px; border: 1px solid #c9d9ee; border-left: 3px solid #3c82e6; border-radius: 4px; background: #fbfdff; text-decoration: none; color: inherit; overflow: hidden; }
.link-prev img { width: 90px; height: 70px; object-fit: cover; flex: none; }
.link-prev.img img { width: auto; max-width: 260px; height: auto; max-height: 200px; }
.lp-txt { display: flex; flex-direction: column; gap: 1px; padding: 5px 8px 5px 0; min-width: 0; }
.link-prev:not(:has(img)) .lp-txt { padding-left: 8px; }
.lp-txt small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .3px; }
.lp-txt b { color: var(--link); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lp-txt span { color: #4a5a72; font-size: 11px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cemo { height: 22px; width: auto; max-width: 48px; vertical-align: -5px; }
.load-more.newer { margin: 8px auto 0; }
.search-box { display: flex; flex-direction: column; gap: 8px; }
.search-box input { padding: 6px 8px; }
.search-results { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sr { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid transparent; background: none; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.sr:hover { background: var(--hover); border-color: #9cbbe3; }
.sr-meta { font-size: 11px; color: var(--muted); }
.sr mark { background: #ffe680; padding: 0 1px; }
.voice-msg { display: flex; align-items: center; gap: 6px; margin: 3px 0 3px 14px; }
.voice-msg audio { height: 34px; max-width: 260px; }
.vm-ic { font-size: 18px; }
.ink-msg { margin: 3px 0 3px 14px; }
.ink-msg img { max-width: 300px; max-height: 220px; border: 1px solid #c9d9ee; border-radius: 4px; background: #fff; cursor: zoom-in; }
.file-card audio, .file-card video { max-width: 280px; }

/* ---------- Ink, émoticônes perso, sons, vocaux ---------- */
.ink-editor { display: flex; flex-direction: column; gap: 8px; }
.ink-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ink-colors, .ink-sizes { display: flex; gap: 3px; }
.ink-colors button { width: 22px; height: 22px; border: 1px solid #667; border-radius: 4px; cursor: pointer; padding: 0; }
.ink-colors button.on { outline: 2px solid #316ac5; outline-offset: 1px; }
.ink-sizes button { width: 26px; height: 26px; border: 1px solid #b9cfee; border-radius: 4px; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.ink-sizes button span { background: #222; border-radius: 50%; display: block; }
.ink-sizes button.on, .ink-tools .btn.on { background: #c9dcf5; border-color: #316ac5; }
.ink-canvas { width: 100%; aspect-ratio: 16 / 10; border: 1px solid #a5bfdf; border-radius: 4px; background: #fff; touch-action: none; cursor: crosshair; }
.emo-manager { display: flex; flex-direction: column; gap: 8px; }
.em-add { display: flex; gap: 10px; align-items: center; }
.em-preview { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; cursor: default; }
.em-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.em-fields { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.em-fields label { display: flex; align-items: center; gap: 6px; }
.em-fields input { flex: 1; }
.em-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px; max-height: 240px; overflow-y: auto; }
.em-item { display: flex; align-items: center; gap: 6px; padding: 3px 5px; border: 1px solid #dbe6f4; border-radius: 4px; }
.em-item img { width: 28px; height: 28px; object-fit: contain; }
.em-item code { flex: 1; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.emo-mine-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 3px; font-weight: bold; color: #1d4b8f; font-size: 11px; }
.emo-mine-head .load-more { margin: 0; }
.sound-grid { grid-template-columns: repeat(4, 84px); }
.msg-sys.sound { color: #0b6b8a; font-style: normal; font-weight: normal; }
.msg-wrap.sys:hover { background: none; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e0352b; animation: recblink 1s steps(1) infinite; flex: none; }
.rec-time { font-weight: bold; font-variant-numeric: tabular-nums; }
.compose-ctx .btn { min-height: 20px; padding: 0 8px; font-size: 11px; }
[data-tool=voice].recording { background: #ffd6d0 !important; border-color: #e0352b !important; }
@keyframes recblink { 50% { opacity: .2; } }
.nick-real { font-weight: normal; }

/* ---------- fonds de conversation ---------- */
.bg-pop { width: 300px; }
.bg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.bg-grid button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px solid transparent; border-radius: 5px; background: none; cursor: pointer; font-size: 10px; padding: 3px; color: inherit; }
.bg-grid button.on, .bg-grid button:hover { border-color: #3c82e6; }
.bg-sw { width: 56px; height: 38px; border-radius: 3px; border: 1px solid #b9cfee; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.chat-log.bg-photo { background-size: cover; background-position: center; background-attachment: local; }
.bg-ciel { background: url("/img/bg/ciel.svg") center / cover no-repeat !important; }
.bg-prairie { background: url("/img/bg/prairie.svg") center / cover no-repeat !important; }
.bg-coucher { background: url("/img/bg/coucher.svg") center / cover no-repeat !important; }
.bg-nuit { background: url("/img/bg/nuit.svg") center / cover no-repeat !important; --msg-text: #e9eefc; color: #e9eefc; }
.bg-nuit .msg-head, .bg-nuit .day-sep, .bg-nuit .msg-sys { color: #b9c6e6; }
.bg-bulles { background: url("/img/bg/bulles.svg") center / cover no-repeat !important; }
.bg-coeurs { background: url("/img/bg/coeurs.svg") center / cover no-repeat !important; }
.bg-carreaux { background: url("/img/bg/carreaux.svg") center / cover no-repeat !important; }
.bg-plage { background: url("/img/bg/plage.svg") center / cover no-repeat !important; }
.bg-espace { background: url("/img/bg/espace.svg") center / cover no-repeat !important; --msg-text: #ece8ff; color: #ece8ff; }
.bg-espace .msg-head, .bg-espace .day-sep, .bg-espace .msg-sys { color: #c4bbe8; }

/* ---------- thèmes de couleur ---------- */
body[data-theme=vert] { --title-a: #4cc261; --title-b: #2f9e44; --title-c: #22803a; --win-border: #1f7a35; --taskbar-a: #3fb556; --taskbar-b: #237d36; --select: #c3ebc9; --hover: #e1f5e4; }
body[data-theme=rose] { --title-a: #f06fae; --title-b: #d6337f; --title-c: #b8246a; --win-border: #a51f5f; --taskbar-a: #e8559a; --taskbar-b: #b8246a; --select: #f8cfe2; --hover: #fde8f2; }
body[data-theme=orange] { --title-a: #ff9a4d; --title-b: #e8590c; --title-c: #c94a08; --win-border: #b54308; --taskbar-a: #f77f2e; --taskbar-b: #c94a08; --select: #ffd8bf; --hover: #fff0e6; }
body[data-theme=violet] { --title-a: #9775fa; --title-b: #7048e8; --title-c: #5f3dc4; --win-border: #5233b0; --taskbar-a: #845ef7; --taskbar-b: #5f3dc4; --select: #ddd2ff; --hover: #f0ebff; }
body[data-theme=ocean] { --title-a: #3bc9db; --title-b: #0c8599; --title-c: #0b7285; --win-border: #0a6475; --taskbar-a: #1ba4b8; --taskbar-b: #0b7285; --select: #c5f0f5; --hover: #e3f8fa; }
body[data-theme=graphite] { --title-a: #868e96; --title-b: #495057; --title-c: #343a40; --win-border: #343a40; --taskbar-a: #6c757d; --taskbar-b: #343a40; --select: #dee2e6; --hover: #f1f3f5; }
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.theme-grid button { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 2px solid transparent; border-radius: 6px; background: none; padding: 4px; cursor: pointer; font-size: 11px; color: inherit; }
.theme-grid button span { width: 60px; height: 26px; border-radius: 5px 5px 2px 2px; }
.theme-grid button.on, .theme-grid button:hover { border-color: #3c82e6; }
.appearance { display: flex; flex-direction: column; gap: 7px; }
:root { --msg-text: #1b1b1b; }

/* ---------- mode sombre ---------- */
body.dark {
  --win-bg: #1e2533; --text: #e4e9f2; --muted: #93a0b5; --line: #344055; --link: #7db3ff;
  --hover: #2a3550; --select: #31446e; --btn-a: #343f55; --btn-b: #2a3346; --btn-border: #4d5b78;
  --msg-text: #e6e9ef; color-scheme: dark; color: var(--text);
  --desktop: radial-gradient(ellipse 140% 60% at 30% 115%, #23421c 0 38%, transparent 38.5%), radial-gradient(ellipse 120% 55% at 85% 120%, #1d3a17 0 40%, transparent 40.5%), linear-gradient(180deg, #0c1a33 0%, #18304f 60%, #22406a 100%);
}
body.dark .login-body, body.dark .me-panel, body.dark .modal .mbody, body.dark .toast, body.dark .tip-bar,
body.dark .menubar, body.dark .search-bar, body.dark .chat-toolbar, body.dark .fmt-bar, body.dark .chat-to, body.dark .mfoot,
body.dark .game-pane, body.dark .game-card, body.dark .file-card, body.dark .link-prev, body.dark .compose-ctx, body.dark .call-banner:not(.incoming) { background: #252e40 !important; border-color: var(--line) !important; color: var(--text); }
body.dark .contact-list, body.dark .chat-log:not([class*="bg-"]), body.dark .compose, body.dark .popover, body.dark .ctx-menu, body.dark .msg-tools, body.dark .rich-preview, body.dark .dev-meter { background: #1a2130 !important; border-color: var(--line) !important; color: var(--text); }
body.dark input:where(:not([type=range], [type=checkbox], [type=radio])), body.dark select, body.dark textarea { background: #141a26 !important; border-color: #4d5b78 !important; color: var(--text) !important; }
body.dark .me-psm, body.dark .me-np input, body.dark #me-psm, body.dark #me-np { background: transparent !important; border-color: transparent !important; }
body.dark .rich-input .rich-view, body.dark .me-psm::placeholder { color: #a9b6cc; }
body.dark .group-head, body.dark .gp-title, body.dark .modal h3, body.dark .emo-mine-head, body.dark .tip-bar b, body.dark .login-brand { color: #9cc3ff; }
body.dark .tool, body.dark .wink-grid button, body.dark .gp-score { color: #cdd9ee; }
body.dark .tool:hover, body.dark .icon-btn:hover { background: #31446e; border-color: #4d6aa6; }
body.dark .ctx-item:hover { background: #3a64b8; }
body.dark .msg-head, body.dark .day-sep { color: #93a0b5; }
body.dark .reply-quote { background: #24304a; color: #b8c4d8; }
body.dark .react { background: #24304a; border-color: #3d4b66; color: var(--text); }
body.dark .react.me { background: #2f4f86; border-color: #5b8ee0; }
body.dark .avatar-frame { background: linear-gradient(180deg, #3a4560, #252e40); border-color: #4d5b78; }
body.dark .chat-log { border-color: var(--line); }
body.dark .btn:hover { border-color: #e9a53c; }
body.dark .morpion .cell { background: #e9eef6; }
body.dark .puissance4 .hole { background: #c8d4e6; }
body.dark .mf.open { background: #cfd8e3; }
body.dark .search-results .sr:hover { background: #2a3550; }
body.dark .msg-sys { color: #9aa7bc; }
body.dark .lp-txt span { color: #b0bccf; }
body.dark .sr mark { background: #8a6d00; color: #fff; }
@media (max-width: 720px) { body.dark { background: #1e2533; } }

/* ---------- bataille navale ---------- */
.nv-boards { display: flex; gap: 10px; justify-content: center; }
.nv-title { font-size: 11px; font-weight: bold; color: #1d4b8f; margin-bottom: 3px; display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.nv-fleet { display: flex; gap: 2px; }
.nv-ship { height: 6px; background: #5b6b82; border-radius: 3px; display: inline-block; }
.nv-grid { display: grid; grid-template-columns: repeat(10, 17px); gap: 1px; background: #5a87c0; border: 2px solid #3a6aa8; }
.nv { width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; font-size: 10px; padding: 0; border: 0; background: #bfe0ff; }
.nv.ship { background: #7d8fa8; }
.nv.hit { background: #ffb199; } .nv.sunk { background: #e0352b; } .nv.miss { color: #1d4b8f; font-weight: bold; } .nv.reveal { background: #b8c2cf; }
.nv-grid.enemy button.nv { cursor: crosshair; }
.myturn .nv-grid.enemy button.nv:not(:disabled):hover { background: #ffe680; }
.nv.last { outline: 2px solid #f59a1b; outline-offset: -2px; }
.nv-sunk { text-align: center; font-weight: bold; color: #c0392b; margin-top: 6px; }
/* ---------- dames ---------- */
.dm-grid { display: grid; grid-template-columns: repeat(10, 33px); border: 3px solid #6b4226; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.dm-c { width: 33px; height: 33px; background: #f3e0bf; display: flex; align-items: center; justify-content: center; }
.dm-c.dark { background: #8a5a35; }
.myturn .dm-c.can { cursor: pointer; }
.dm-c.sel { background: #3c8a3e !important; }
.dm-c.target { background: #6fbf73 !important; cursor: pointer; }
.dm-c.last { box-shadow: inset 0 0 0 2px #f5c518; }
.dm-p { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 -3px 0 rgba(0,0,0,.3), 0 2px 3px rgba(0,0,0,.4); position: relative; }
.dm-p.w { background: radial-gradient(circle at 35% 30%, #fff, #e3dccf); } .dm-p.b { background: radial-gradient(circle at 35% 30%, #555, #111); }
.dm-p.king::after { content: "♛"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; color: #d4a017; text-shadow: 0 1px 1px rgba(0,0,0,.6); }
/* ---------- pendu ---------- */
.gp-board.pendu { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; }
.pd-top { display: flex; gap: 12px; align-items: center; }
.pd-svg { width: 100px; height: 125px; stroke: #333; stroke-width: 3; fill: none; stroke-linecap: round; }
.pd-word { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pd-l { width: 20px; height: 26px; border-bottom: 3px solid #1d4b8f; font: bold 18px/26px "Trebuchet MS", var(--font); text-align: center; color: #1d4b8f; }
.pd-keys { display: grid; grid-template-columns: repeat(10, 30px); gap: 3px; }
.pd-k { height: 30px; border: 1px solid #7a95bf; border-radius: 4px; background: linear-gradient(#fff, #dfe7f1); font-weight: bold; cursor: pointer; padding: 0; }
.pd-k.good { background: #b2f2bb; } .pd-k.bad { background: #ffc9c9; color: #999; }
.pd-hist { font-size: 11px; text-align: center; }
/* ---------- quiz ---------- */
.gp-board.quiz { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.qz-head { text-align: center; color: var(--muted); }
.qz-timer { height: 6px; background: #dfe7f1; border-radius: 3px; overflow: hidden; }
.qz-timer span { display: block; height: 100%; background: linear-gradient(90deg, #3cb043, #f2a516, #e0352b); animation: qzbar linear forwards; }
.qz-timer span.reveal { background: #9aa6b4; }
@keyframes qzbar { from { width: 100%; } to { width: 0; } }
.qz-q { font: bold 14px "Trebuchet MS", var(--font); text-align: center; min-height: 40px; }
.qz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.qz-o { min-height: 46px; border: 1px solid #7a95bf; border-radius: 6px; background: linear-gradient(#fff, #e3ecf7); cursor: pointer; font-size: 12px; padding: 4px 6px; color: inherit; }
.qz-o:not(:disabled):hover { border-color: #e9a53c; }
.qz-o.picked { background: #c9dcf5; border-color: #316ac5; }
.qz-o.good { background: #b2f2bb; border-color: #2f9e44; font-weight: bold; }
.qz-o.bad { background: #ffc9c9; border-color: #e03131; }
.qz-o:disabled { cursor: default; color: inherit; }
.qz-gain { text-align: center; font-weight: bold; color: #2b8a3e; }
@media (max-width: 720px) {
  .nv-grid { grid-template-columns: repeat(10, 15px); } .nv { width: 15px; height: 15px; }
  .dm-grid { grid-template-columns: repeat(10, 30px); } .dm-c { width: 30px; height: 30px; } .dm-p { width: 23px; height: 23px; }
  .pd-keys { grid-template-columns: repeat(10, 28px); }
}
body.dark .dm-c { background: #e6d3b0; } body.dark .dm-c.dark { background: #7a4f2e; }
body.dark .pd-svg { stroke: #e6e9ef; } body.dark .pd-l { color: #9cc3ff; border-color: #9cc3ff; }
body.dark .qz-o, body.dark .pd-k { background: #2a3346; color: var(--text); } body.dark .qz-o.good, body.dark .pd-k.good { background: #2b6b3a; } body.dark .qz-o.bad, body.dark .pd-k.bad { background: #7a2b2b; }
.nv-actions { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }

/* ---------- appels de groupe ---------- */
.gcall-pane { width: 330px; flex: none; display: flex; flex-direction: column; gap: 6px; }
.gc-tiles { display: grid; gap: 4px; grid-template-columns: 1fr 1fr; flex: 1; align-content: start; }
.gc-tiles[data-n="1"] { grid-template-columns: 1fr; }
.gt { position: relative; aspect-ratio: 4 / 3; background: #0d1a2e; border: 1px solid #5a7fb5; border-radius: 6px; overflow: hidden; }
.gt video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gt.mine video { transform: scaleX(-1); }
.gt.nocam video { visibility: hidden; }
.gt-av { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; padding: 2px; display: none; cursor: default; }
.gt.nocam .gt-av { display: block; }
.gt-name { position: absolute; left: 4px; bottom: 3px; right: 4px; color: #fff; font-size: 11px; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-status { position: absolute; top: 4px; left: 0; right: 0; text-align: center; color: #ffd27a; font-size: 10.5px; text-shadow: 0 1px 2px #000; }
.call-banner.gcall-live { background: linear-gradient(180deg, #e6f7e9, #c9edd0); border-color: #6cc27a; }
@media (max-width: 720px) {
  .gcall-pane { position: absolute; inset: 44px 0 0 0; width: auto; z-index: 25; background: #0d1a2e; padding: 6px 6px calc(14px + env(safe-area-inset-bottom)); }
  .gc-tiles { grid-template-columns: 1fr 1fr; }
  .gc-tiles[data-n="2"] { grid-template-columns: 1fr; }
}

.link-btn { background: none; border: 0; color: var(--link); text-decoration: underline; cursor: pointer; font-size: 11px; align-self: center; padding: 0; }

/* ---------- groupes de discussion ---------- */
.contact.gchat .gc-icon { width: 16px; text-align: center; font-size: 14px; line-height: 1; flex: none; }
.gc-dialog { display: flex; flex-direction: column; gap: 8px; }
.gc-icons { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.gc-icons button { font-size: 20px; height: 34px; border: 1px solid transparent; border-radius: 4px; background: none; cursor: pointer; padding: 0; }
.gc-icons button:hover { background: var(--hover); border-color: #9cbbe3; }
.gc-icons button.on { background: #c9dcf5; border-color: #316ac5; }
.gc-pick { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); background: #fff; padding: 4px 6px; display: flex; flex-direction: column; gap: 2px; }
.gc-pick label.check { padding: 3px 2px; border-radius: 3px; }
.gc-pick label.check:hover { background: var(--hover); }
.gc-members { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow-y: auto; }
.gc-member { display: flex; align-items: center; gap: 8px; }
.gc-member .avatar-frame { width: 28px; height: 28px; padding: 1px; cursor: default; flex: none; }
.gc-member span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-member .btn { min-height: 20px; padding: 1px 8px; font-size: 11px; }
.gc-dialog .tag { display: inline-block; padding: 0 6px; border-radius: 8px; font-size: 10px; background: #fff1b8; color: #8a6400; }
body.dark .gc-pick { background: var(--panel-a, #1e2533); }
.login-brand span { font-weight: normal; font-style: italic; color: #f08a12; letter-spacing: 0; }
.start-btn { white-space: nowrap; }

/* ---------- Quoi de neuf ---------- */
.feed-panel { flex: none; border-top: 1px solid var(--line); background: linear-gradient(180deg, #f6f9fe, #e9f1fb); display: flex; flex-direction: column; }
.feed-head { padding: 5px 8px; font-weight: bold; color: #1d4b8f; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 4px; }
.feed-head .tri { width: 10px; font-size: 9px; transition: transform .15s; }
.feed-panel.collapsed .tri { transform: rotate(-90deg); }
.feed-panel.collapsed .feed-list { display: none; }
.feed-head .badge { margin-left: auto; background: var(--orange); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; }
.feed-list { max-height: 170px; overflow-y: auto; padding: 0 6px 6px; display: flex; flex-direction: column; gap: 4px; }
.feed-item { display: flex; gap: 7px; align-items: flex-start; padding: 4px; border-radius: 4px; cursor: pointer; }
.feed-item:hover { background: var(--hover); }
.feed-item .avatar-frame { width: 30px; height: 30px; padding: 1px; flex: none; cursor: pointer; }
.feed-txt { flex: 1; min-width: 0; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.feed-txt a { color: var(--link); }
.feed-when { color: var(--muted); font-size: 10px; margin-top: 1px; }
.feed-item.bday { background: #fff6e0; }
.feed-item.bday .btn { margin-top: 4px; min-height: 20px; padding: 1px 8px; font-size: 11px; }
.feed-empty { font-size: 11px; padding: 4px 2px 6px; }
.bday-cake { font-size: 13px; line-height: 1; flex: none; }
.bday-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
body.dark .feed-panel { background: var(--panel-b, #1b2230); }
body.dark .feed-item.bday { background: #3a3220; }
@media (max-width: 720px) { .feed-list { max-height: 30vh; } }

/* ---------- activités ensemble ---------- */
.chat-window.in-activity .chat-side { display: none; }
.act-pane { flex: 1.5; min-width: 0; display: flex; flex-direction: column; border: 1px solid #a5bfdf; border-radius: 4px; background: linear-gradient(180deg, #fff, #e9f1fb); overflow: hidden; }
.act-pane.board { flex: 2.2; }
.act-head { display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; background: linear-gradient(180deg, #f6f9fd, #dce8f6); border-bottom: 1px solid var(--line); color: #1d4b8f; }
.act-head .act-sub { color: var(--muted); }
.act-head .act-x { margin-left: auto; width: 20px; height: 19px; }
.act-body { flex: 1; min-height: 0; overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.act-foot { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.act-banner { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #9cc3f5; border-radius: 4px; background: linear-gradient(180deg, #f0f7ff, #d8e9fd); flex: none; flex-wrap: wrap; }
.act-banner span { flex: 1; min-width: 160px; }
.act-msg { color: #2d5aa0; font-style: normal; }
.act-thumbs { display: inline-flex; gap: 3px; vertical-align: middle; margin: 0 4px; }
.act-thumbs img { width: 34px; height: 34px; object-fit: cover; border-radius: 3px; border: 1px solid #c3d5ec; }
.act-form { display: flex; flex-direction: column; gap: 8px; }
/* YouTube */
.yt-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 4px; overflow: hidden; flex: none; }
.yt-wrap iframe, .yt-wrap .yt-player { position: absolute; inset: 0; width: 100%; height: 100%; }
.act-pane.listen .yt-wrap { width: 240px; align-self: center; }
.yt-now { line-height: 1.4; }
.yt-add { display: flex; gap: 5px; }
.yt-add input { flex: 1; min-width: 0; }
.yt-queue { display: flex; flex-direction: column; gap: 3px; }
.yt-item { display: flex; align-items: center; gap: 8px; padding: 3px; border-radius: 4px; cursor: pointer; border: 1px solid transparent; }
.yt-item:hover { background: var(--hover); }
.yt-item.on { background: #fff3d6; border-color: #f2c66d; font-weight: bold; }
.yt-item img { width: 60px; height: 45px; object-fit: cover; border-radius: 3px; flex: none; }
.yt-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-rm { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 6px; }
/* tableau blanc */
.bd-tools { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.bd-c { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #889; cursor: pointer; padding: 0; }
.bd-c.on { box-shadow: 0 0 0 2px #316ac5; }
.bd-s { width: 28px; height: 26px; border: 1px solid transparent; border-radius: 3px; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bd-s span { display: block; border-radius: 50%; background: #333; }
.bd-s.on, .bd-tools .btn.on { background: #c9dcf5; border-color: #316ac5; }
.bd-sep { width: 1px; height: 20px; background: #b9cbe3; margin: 0 4px; }
.bd-tools .btn { min-height: 24px; padding: 2px 8px; }
.bd-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.bd-wrap canvas { max-width: 100%; max-height: 100%; aspect-ratio: 3 / 2; background: #fff; border: 1px solid #a5bfdf; border-radius: 3px; box-shadow: 0 2px 6px rgba(0,30,80,.12); touch-action: none; cursor: crosshair; }
/* diaporama */
.sh-stage { position: relative; flex: 1; min-height: 200px; background: #10141c; border-radius: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sh-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sh-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 60px; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 30px; cursor: pointer; border-radius: 4px; }
.sh-nav:hover { background: rgba(255,255,255,.35); }
.sh-nav.prev { left: 6px; } .sh-nav.next { right: 6px; }
.sh-info { text-align: center; }
.sh-strip { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; flex: none; }
.sh-strip img { width: 56px; height: 42px; object-fit: cover; border-radius: 3px; border: 2px solid transparent; cursor: pointer; flex: none; opacity: .75; }
.sh-strip img.on { border-color: #f59a1b; opacity: 1; }
.act-foot .btn.on { background: #c9dcf5; border-color: #316ac5; }
a.btn { text-decoration: none; color: inherit; display: inline-flex; align-items: center; }
body.dark .act-pane { background: var(--panel-a, #1e2533); }
@media (max-width: 720px) {
  .chat-window.in-activity .chat-main { flex-direction: column; }
  .act-pane { flex: none; max-height: 62%; }
  .act-pane.board { max-height: 70%; }
}

/* ---------- GIF et autocollants ---------- */
.fmt-bar .gif-btn { font: bold 11px var(--font); width: auto; padding: 0 5px; border: 1px solid #9cbbe3; border-radius: 3px; height: 20px; align-self: center; color: #1d4b8f; }
.sched-btn[data-count]:not([data-count=""])::after { content: attr(data-count); position: absolute; margin: -14px 0 0 14px; background: var(--orange); color: #fff; border-radius: 8px; font-size: 9px; padding: 0 4px; font-weight: bold; }
.gif-pop { width: 360px; max-width: calc(100vw - 16px); padding: 0; }
.gif-tabs { display: flex; border-bottom: 1px solid var(--line); }
.gif-tabs button { flex: 1; border: 0; background: none; padding: 7px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; }
.gif-tabs button.on { color: var(--link); font-weight: bold; border-bottom-color: var(--orange); }
.gif-body { padding: 6px; max-height: 300px; overflow-y: auto; }
.st-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.st-grid button { border: 1px solid transparent; border-radius: 6px; background: none; cursor: pointer; padding: 2px; aspect-ratio: 1; }
.st-grid button:hover { background: var(--hover); border-color: #9cbbe3; }
.st-grid svg { width: 100%; height: 100%; }
.gif-panel { display: flex; flex-direction: column; gap: 6px; }
.gif-panel.hidden { display: none; }
.gif-q { width: 100%; }
.gif-grid { columns: 3; column-gap: 4px; }
.gif-grid button { display: block; width: 100%; border: 0; padding: 0; margin-bottom: 4px; cursor: pointer; background: #eee; border-radius: 3px; overflow: hidden; break-inside: avoid; }
.gif-grid img { width: 100%; display: block; }
.gif-credit { text-align: right; font-size: 10px; color: var(--muted); }
.sticker-msg { padding-left: 14px; }
.sticker-msg svg { width: 120px; height: 120px; display: block; }
.gif-msg { position: relative; display: inline-block; margin: 3px 0 3px 14px; border-radius: 6px; overflow: hidden; line-height: 0; }
.gif-msg video, .gif-msg img { display: block; max-width: 100%; height: auto; }
.gif-tag { position: absolute; left: 5px; bottom: 5px; background: rgba(0,0,0,.55); color: #fff; font: bold 9px/1 var(--font); padding: 2px 4px; border-radius: 3px; }

/* ---------- sondages ---------- */
.poll { margin: 4px 0 4px 14px; padding: 9px 10px; border: 1px solid #b9cfee; border-radius: 8px; background: linear-gradient(180deg, #fbfdff, #edf3fc); max-width: 360px; display: flex; flex-direction: column; gap: 5px; }
.poll-q { font-weight: bold; color: #1d4b8f; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid #c9d9ee; border-radius: 5px; background: #fff; cursor: pointer; text-align: left; overflow: hidden; }
.poll-opt:hover:not(:disabled) { border-color: #6b98d6; }
.poll-opt:disabled { cursor: default; }
.poll-opt.mine { border-color: #316ac5; }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #cfe2fb, #b9d5f7); transition: width .4s; z-index: 0; }
.poll-opt > span:not(.poll-bar) { position: relative; z-index: 1; }
.poll-check { color: #316ac5; width: 14px; }
.poll-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.poll-n { color: #405675; font-size: 11px; white-space: nowrap; }
.poll-foot { font-size: 11px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.poll-form, .sched-form { display: flex; flex-direction: column; gap: 8px; }
.poll-opts { display: flex; flex-direction: column; gap: 5px; }
.poll-form [data-more] { align-self: flex-start; }
.sched-form textarea { resize: vertical; font: inherit; }
.sched-quick { display: flex; gap: 5px; flex-wrap: wrap; }
.sched-list { display: flex; flex-direction: column; gap: 4px; }
.sched-item { display: flex; align-items: center; gap: 8px; }
.sched-item span { flex: 1; min-width: 0; }
.sched-item .btn { min-height: 20px; padding: 1px 8px; font-size: 11px; }
body.dark .poll, body.dark .poll-opt { background: var(--panel-a, #1e2533); }
body.dark .poll-bar { background: linear-gradient(90deg, #26406b, #2d4f86); }
.fmt-bar .sched-btn { position: relative; }

/* ---------- messages secrets, sécurité, signalements ---------- */
.fmt-bar .secret-btn.on { background: #e9f8ec; border-color: #8fd19e; }
.e2e-warn { cursor: help; }
.secret-dlg .sn-row { margin-top: 6px; }
.secret-dlg h3 { margin: 6px 0 2px; font-size: 13px; }
.msg.secret.locked, .msg.secret.pending { color: var(--muted) !important; }
.secret-dlg, .sec-dlg, .report-dlg { display: flex; flex-direction: column; gap: 8px; }
.secret-dlg ul { margin: 0; padding-left: 18px; }
.secret-dlg .row, .sec-dlg .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.secret-dlg .sn { font: bold 18px/1.5 'Courier New', monospace; letter-spacing: 2px; text-align: center; padding: 8px; background: #f3f7fc; border: 1px solid var(--line); border-radius: 6px; color: #1d4b8f; }
.tfa-setup { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-top: 6px; }
.tfa-setup img { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 4px; }
.codes-box { margin-top: 8px; padding: 8px; border: 1px dashed #e0a030; background: #fffaf0; border-radius: 6px; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 12px; margin-top: 6px; }
.codes code { font: bold 14px 'Courier New', monospace; letter-spacing: 1px; }
.report-dlg .reasons { display: flex; flex-direction: column; gap: 3px; }
.report-dlg textarea { resize: vertical; font: inherit; }
body.dark .fmt-bar .secret-btn.on { background: #1d2b22; border-color: #2b8a3e; }
body.dark .secret-dlg .sn { background: #1e2533; color: #9cc3ff; }
body.dark .codes-box { background: #2e2818; }

/* ---------- fenêtre de conversation séparée (appli de bureau) ---------- */
html.popout #main-window, html.popout #taskbar, html.popout #feed-panel { display: none !important; }
html.popout #desktop { inset: 0; }
html.popout body { background: var(--win-bg); }
html.popout .chat-window { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; resize: none; border-radius: 0; border: 0; box-shadow: none; min-width: 0 !important; }
html.popout .chat-window > .titlebar { display: none; }
html.popout #toasts { bottom: 10px; }
.fmt-bar .wizz-btn { white-space: nowrap; }
@media (max-width: 720px) { .fmt-bar { overflow-x: auto; scrollbar-width: none; } .fmt-bar .icon-btn { flex: none; } }

/* ---------------------------------------------------------------- fenêtre MDJ Radio */
.radio-window { width: 330px; }
.radio-window.minimized { display: none; }
.radio-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.radio-now { display: flex; gap: 12px; align-items: center; }
.radio-cover { width: 74px; height: 74px; flex: none; border-radius: 6px; background: linear-gradient(135deg, #8b5cf6, #2f7fd9) center/cover; display: grid; place-items: center; font-size: 34px; box-shadow: 0 2px 6px rgba(0, 25, 80, .3); }
.radio-meta { min-width: 0; }
.radio-badge { font-size: 10px; font-weight: bold; letter-spacing: 1px; color: #c0261c; }
.radio-title { font-weight: bold; font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-skip { margin-top: 6px; border: 1px solid #b9c6dc; background: transparent; color: inherit; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 11px; cursor: pointer; align-self: flex-start; }
.radio-skip:disabled { opacity: .6; cursor: default; }
.radio-skip[hidden] { display: none; }
.radio-artist { color: #5a6b85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-ctrl { display: flex; align-items: center; gap: 10px; }
.radio-play { width: 42px; height: 42px; border-radius: 50%; border: 1px solid #1d5bb5; cursor: pointer; font-size: 16px; color: #fff; background: radial-gradient(circle at 35% 30%, #7db8ff, #2f7fd9 60%, #1d5bb5); box-shadow: 0 2px 5px rgba(0, 25, 80, .35); }
.radio-window.on .radio-play { background: radial-gradient(circle at 35% 30%, #ff9b8f, #e0352b 60%, #a01c13); border-color: #a01c13; }
.radio-vol { flex: 0 1 140px; min-width: 70px; -webkit-appearance: none; appearance: none; height: 18px; padding: 0 !important; margin: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; cursor: pointer; }
.radio-vol::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #2f7fd9 var(--v, 80%), #c9d3e0 var(--v, 80%)); }
.radio-vol::-moz-range-track { height: 4px; border-radius: 2px; background: #c9d3e0; }
.radio-vol::-moz-range-progress { height: 4px; border-radius: 2px; background: #2f7fd9; }
.radio-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; border: 2px solid #2f7fd9; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.radio-vol::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #2f7fd9; }
.radio-vol-ic { font-size: 14px; opacity: .7; }
.radio-who { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.dark .radio-vol::-webkit-slider-runnable-track { background: linear-gradient(90deg, #5a9cf0 var(--v, 80%), #3a4558 var(--v, 80%)); }
body.dark .radio-vol::-moz-range-track { background: #3a4558; }
.radio-np { font-size: 11px; }
.radio-hist-head { font-weight: bold; color: #1a4fa8; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.radio-hist div { display: flex; gap: 8px; padding: 2px 0; font-size: 11px; }
.radio-hist time { color: #7a8aa3; flex: none; }
.radio-hist span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-foot { font-size: 11px; text-align: right; }
body.dark .radio-artist, body.dark .radio-hist time { color: #a9b6cc; }
body.dark .radio-hist-head { color: #9cc3ff; }
@media (max-width: 720px) { .radio-window { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; z-index: 60 !important; } }
.radio-back { display: none; margin-left: auto; background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 6px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
@media (max-width: 720px) { .radio-back { display: inline-block; } .radio-window .tb-buttons { display: none; } }
@media (pointer: coarse) { .radio-vol, .radio-vol-ic { display: none; } }   /* sur téléphone, le volume se règle avec les boutons du téléphone */
.radio-np.warn { color: #d9480f !important; }
/* thème sombre : panneaux restés clairs */
body.dark .feed-panel { background: #1f2738; }
body.dark .feed-head { color: #9cc3ff; }
body.dark .feed-item.bday { background: #3a3220; }
body.dark .toast .tt { color: var(--text); }

.radio-task .tp { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 5px; border-radius: 50%; font-size: 9px; color: #fff; background: radial-gradient(circle at 35% 30%, #7db8ff, #2f7fd9 60%, #1d5bb5); border: 1px solid rgba(255,255,255,.5); flex: none; }
.radio-task .tp:hover { filter: brightness(1.2); }
.radio-task.on .tp { background: radial-gradient(circle at 35% 30%, #ff9b8f, #e0352b 60%, #a01c13); }

/* ---------------------------------------------------------------- redimensionnement des fenêtres */
.rz { position: absolute; z-index: 5; }
.rz-n, .rz-s { left: 8px; right: 8px; height: 6px; cursor: ns-resize; }
.rz-n { top: -2px; } .rz-s { bottom: -2px; }
.rz-e, .rz-w { top: 8px; bottom: 8px; width: 6px; cursor: ew-resize; }
.rz-e { right: -2px; } .rz-w { left: -2px; }
.rz-ne, .rz-nw, .rz-se, .rz-sw { width: 12px; height: 12px; }
.rz-ne { top: -2px; right: -2px; cursor: nesw-resize; } .rz-sw { bottom: -2px; left: -2px; cursor: nesw-resize; }
.rz-nw { top: -2px; left: -2px; cursor: nwse-resize; } .rz-se { bottom: -2px; right: -2px; cursor: nwse-resize; }
.window.maxed { border-radius: 0; }
.window.maxed .rz { display: none; }
.radio-window { min-height: 0; }
.radio-window .radio-body { flex: 1; overflow-y: auto; }
.radio-window .radio-hist { flex: 1; }
@media (max-width: 720px) { .rz, .tb-max { display: none !important; } }

/* ---------- photo de profil avec la caméra ---------- */
.cam-box { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #000; }
.cam-box video { width: 100%; height: 100%; object-fit: cover; }
.cam-box video.cam-src { position: absolute; inset: 0; opacity: 0.01; pointer-events: none; }
.cam-box .cam-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cam-box video.mirror { transform: scaleX(-1); }
.cam-box .cam-tap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; }
.cam-tools .cam-native { margin-top: 4px; }
.cam-tools { flex-wrap: wrap; }
.cam-box::after { content: ''; position: absolute; inset: 12%; border: 2px dashed rgba(255,255,255,.6); border-radius: 50%; pointer-events: none; }
.cam-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: bold 90px/1 var(--font); color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.cam-tools { display: flex; align-items: center; gap: 8px; margin-top: 8px; }

/* appli mobile installée : pas de radio */
html.no-radio #radio-btn, html.no-radio .radio-window, html.no-radio .radio-task { display: none !important; }

/* ---------------------------------------------------------------- MDJ Radio : nouvelle DA (cyan / noir)
   La fenêtre garde sa barre de titre façon Messenger, l'intérieur prend les couleurs de la radio. */
.radio-window { width: 380px; --r-acc: #63E1F9; --r-ink: #0E0E0E; --r-bg: #0E0E0E; --r-card: #171717; --r-line: #262626; --r-txt: #F4F4F4; --r-mut: #9A9A9A; --r-red: #FF4D5E; }
.radio-tb-logo svg { width: 16px; height: 16px; display: block; }
.radio-window .radio-body { background: var(--r-bg); color: var(--r-txt); padding: 16px; gap: 14px; font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif; font-size: 13px; }
.radio-window .radio-now { gap: 14px; }
.radio-window .radio-cover { position: relative; width: 112px; height: 112px; border-radius: 22px; background: var(--r-acc) center/cover no-repeat; box-shadow: none; overflow: hidden; }
.radio-window .radio-cover > svg { width: 56%; height: 56%; }
.radio-window .radio-cover.img > svg { display: none; }
.radio-eq { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.radio-eq i { width: 4px; height: 100%; border-radius: 2px; background: var(--r-ink); transform-origin: bottom; transform: scaleY(.25); }
.radio-cover.img .radio-eq { padding: 4px; border-radius: 8px; background: var(--r-ink); height: 26px; } .radio-cover.img .radio-eq i { background: var(--r-acc); }
.radio-window.on .radio-eq i { animation: r-eq .9s ease-in-out infinite; }
.radio-eq i:nth-child(2) { animation-delay: .25s !important; } .radio-eq i:nth-child(3) { animation-delay: .5s !important; }
@keyframes r-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes r-pulse { 50% { opacity: .3; } }
.radio-window .radio-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 8px; border-radius: 999px; background: #1F1F1F; color: var(--r-txt); font-size: 12px; font-weight: 700; letter-spacing: 0; }
.radio-window .radio-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--r-red); animation: r-pulse 1.2s ease-in-out infinite; }
.radio-window .radio-badge.mic { background: var(--r-red); } .radio-window .radio-badge.mic i { background: #fff; }
.radio-window .radio-title { font-size: 20px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 8px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.radio-window .radio-artist { color: #B5B5B5; font-size: 14px; margin-top: 2px; }
.radio-window .radio-ctrl { gap: 12px; }
.radio-window .radio-play { position: relative; width: 56px; height: 56px; flex: none; border: 0; border-radius: 50%; background: var(--r-acc); box-shadow: none; display: grid; place-items: center; padding: 0; }
.radio-window .radio-play svg { width: 22px; height: 22px; }
.radio-window .radio-play .ic-pause { display: none; }
.radio-window.on .radio-play { background: var(--r-acc); border: 0; }
.radio-window.on .radio-play .ic-pause { display: block; } .radio-window.on .radio-play .ic-play { display: none; }
.radio-window.on .radio-play::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--r-acc); animation: r-ring 1.8s ease-out infinite; }
@keyframes r-ring { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.45); opacity: 0; } }
.radio-prog { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.radio-track { height: 5px; border-radius: 3px; background: var(--r-line); overflow: hidden; }
.radio-track i { display: block; height: 100%; width: 0; background: var(--r-acc); transition: width 1s linear; }
.radio-times { display: flex; justify-content: space-between; gap: 6px; font: 11px "JetBrains Mono", ui-monospace, Consolas, monospace; color: var(--r-mut); }
.radio-window .radio-who { flex: 0 1 auto; color: var(--r-mut); font-family: "Space Grotesk", system-ui, sans-serif; }
.radio-vol-wrap { display: flex; align-items: center; gap: 6px; color: var(--r-mut); }
.radio-window .radio-vol-ic { width: 16px; height: 16px; opacity: 1; font-size: 0; }
.radio-window .radio-vol { flex: none; width: 70px; min-width: 0; }
.radio-window .radio-vol::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--r-acc) var(--v, 80%), #333 var(--v, 80%)) !important; }
.radio-window .radio-vol::-moz-range-track { background: #333 !important; } .radio-window .radio-vol::-moz-range-progress { background: var(--r-acc) !important; }
.radio-window .radio-vol::-webkit-slider-thumb { background: var(--r-acc); border-color: var(--r-acc); box-shadow: none; }
.radio-window .radio-vol::-moz-range-thumb { background: var(--r-acc); border-color: var(--r-acc); }
.radio-share { display: flex; align-items: center; gap: 10px; background: var(--r-card); border-radius: 14px; padding: 10px 12px; cursor: pointer; font-size: 13px; }
.radio-share input { width: 17px; height: 17px; accent-color: var(--r-acc); margin: 0; }
.radio-share-ex { color: var(--r-mut); }
.radio-window .radio-np { font-size: 12px; color: var(--r-mut); min-height: 0; }
.radio-window .radio-np:empty { display: none; }
.radio-window .radio-np.warn { color: #FFC76A !important; }
.radio-card { background: var(--r-card); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.radio-card-head { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.radio-friends-n { color: var(--r-acc); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.radio-friends { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-friend { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 64px; padding: 0; border: 0; background: none; color: var(--r-txt); cursor: pointer; font: inherit; font-size: 11px; }
.radio-fav { width: 44px; height: 44px; border-radius: 14px; overflow: hidden; display: block; outline: 2px solid var(--r-acc); outline-offset: 2px; }
.radio-fav > * { width: 100% !important; height: 100% !important; }
.radio-fav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.radio-fn { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-window .radio-hist { display: flex; flex-direction: column; gap: 9px; }
.radio-window .radio-hist .radio-h { display: flex; align-items: center; gap: 10px; padding: 0; font-size: 13px; }
.radio-th { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--r-acc) center/cover; }
.radio-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.radio-ht b, .radio-ht span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-ht span { color: var(--r-mut); font-size: 12px; }
.radio-window .radio-hist time { color: var(--r-mut); font: 11px "JetBrains Mono", ui-monospace, Consolas, monospace; }
.radio-window .radio-foot a { color: var(--r-mut); } .radio-window .radio-foot a:hover { color: var(--r-acc); }
.radio-window .radio-hist-head { display: none; }
.radio-task .tp { background: #63E1F9; color: #0E0E0E; border-color: rgba(255,255,255,.6); }
.radio-task.on .tp { background: #FF4D5E; color: #fff; }
/* émoticônes perso : bien visibles (avant 22 px) */
.cemo { height: 40px; max-width: 90px; vertical-align: -12px; object-fit: contain; }
.msg .cemo:only-child { height: 72px; max-width: 160px; }
.emo-grid { grid-template-columns: repeat(7, 44px); }
.emo-grid button { width: 44px; height: 44px; }
.emo-grid button .cemo { height: 36px; max-width: 40px; vertical-align: middle; }
.emo-manager .cemo, .emo-mine .cemo { height: 44px; }

/* ---------- MDJ Radio : vidéo en direct ---------- */
.radio-vid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.radio-vscr { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; }
.radio-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.radio-vgo { position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; border-radius: 50%; border: 0; background: #63E1F9; cursor: pointer; display: grid; place-items: center; box-shadow: 0 8px 30px rgba(99,225,249,.35); }
.radio-vgo svg { width: 26px; height: 26px; margin-left: 3px; }
.radio-window.watching .radio-vgo { display: none; }
.radio-vbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.radio-vlive { display: inline-flex; align-items: center; gap: 6px; font: 600 11px "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: #FF4D5E; }
.radio-vlive i { width: 8px; height: 8px; border-radius: 50%; background: #FF4D5E; animation: radio-vpulse 1.4s infinite; }
.radio-vq { background: #1C1C1C; color: #F4F4F4; border: 1px solid #303030; border-radius: 8px; height: 28px; padding: 0 6px; font: 500 12px "JetBrains Mono", monospace; }
@keyframes radio-vpulse { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }

/* lien d'invitation d'un ami, sur l'écran d'inscription */
.friend-invite { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 8px; border: 1px solid #b9cfee; border-radius: 6px; background: #eef6ff; font-size: 13px; line-height: 1.35; }
.friend-invite img { width: 44px; height: 44px; border-radius: 5px; object-fit: cover; border: 1px solid #9ab8e0; }
