/* =====================================================================
   Bulle V5 — styles des nouveaux modules (clair + sombre via les jetons
   existants de bulle.css). Couleurs Snap : rouge = photo, violet = vidéo.
   ===================================================================== */
:root { --snap-photo: #F0434F; --snap-video: #8A4DFF; --v5-ease: cubic-bezier(.2, .8, .2, 1); }
:root[data-theme="dark"] { --snap-photo: #FF5A66; --snap-video: #A47BFF; }
.v5-ic { display: inline-flex; flex: none; }
.v5-muted { color: var(--texte-2); font-size: .9rem; margin: 0 0 12px; }
.v5-x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }

/* ---------------- Barre d'écriture ---------------- */
.v5-composer form {
  border-radius: 26px !important; padding: 5px 5px 5px 6px !important; min-height: 50px; align-items: flex-end;
  transition: border-color .18s, box-shadow .18s, transform .18s var(--v5-ease);
}
.v5-composer form:focus-within { transform: translateY(-1px); }
.v5-composer .icon-btn { border-radius: 50% !important; color: var(--texte-2); transition: background-color .15s, color .15s, transform .15s var(--v5-ease); }
.v5-composer .icon-btn:hover { color: var(--texte); background: var(--surface-hover, color-mix(in srgb, var(--texte) 7%, transparent)); }
.v5-composer .icon-btn:active { transform: scale(.88); }
.v5-composer .composer-input { padding-top: 11px; padding-bottom: 11px; }
.v5-composer button[type="submit"] { border-radius: 50% !important; width: 40px; height: 40px; flex: none; padding: 0 !important; display: inline-grid; place-items: center; }
/* Envoi intelligent : micro + appareil photo quand c'est vide, flèche dès qu'on écrit */
.v5-composer form:not(.v5-has) button[type="submit"] { display: none; }
.v5-composer form.v5-has .mic-btn, .v5-composer form.v5-has .v5-cam-btn { display: none; }
.v5-composer form.v5-swap button[type="submit"], .v5-composer form.v5-swap .mic-btn { animation: v5-pop .22s var(--v5-ease); }
.v5-composer .mic-btn { color: var(--violet); }
.v5-composer .mic-btn.recording { background: var(--rouge) !important; color: #fff !important; animation: v5-pulse 1.2s infinite; }
@keyframes v5-pop { from { transform: scale(.4) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes v5-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rouge) 45%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.v5-composer .reply-bar { border-radius: 18px 18px 0 0; margin: 0 8px; }
.v5-composer .att-tray { border-radius: 18px; }
.att-doc-ic { color: var(--violet); gap: 2px; }
.att-doc-ic small { font-weight: 800; letter-spacing: .04em; font-size: 10px; }
@media (prefers-reduced-motion: reduce) { .v5-composer form, .v5-composer .icon-btn { transition: none; } .v5-composer form.v5-swap * { animation: none !important; } }

/* Suggestions # */
.v5-tag-av { background: color-mix(in srgb, var(--violet) 14%, var(--panneau)) !important; color: var(--violet) !important; font-weight: 800; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; }
.v5-sugg { z-index: 40; }
.comment-composer .v5-sugg, .modal .v5-sugg { left: 0; right: 0; bottom: calc(100% + 6px); }

/* ---------------- Conservation ---------------- */
.v5-retention {
  display: flex; align-items: center; gap: 8px; align-self: center; margin: 8px auto 0; padding: 5px 6px 5px 12px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--texte-2);
  background: color-mix(in srgb, var(--violet) 8%, var(--panneau)); border: 1px solid color-mix(in srgb, var(--violet) 18%, var(--ligne));
  max-width: calc(100% - 24px); width: max-content;
}
.v5-retention .v5-ic { color: var(--violet); }
.v5-retention.is-off { background: var(--panneau); border-color: var(--ligne); }
.v5-retention.is-off .v5-ic { color: var(--texte-3); }
.v5-ret-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v5-ret-txt small { font-weight: 500; color: var(--texte-3); }
.v5-ret-btn { border: 0; background: var(--panneau); color: var(--violet); font: inherit; font-weight: 700; padding: 3px 10px; border-radius: 999px; cursor: pointer; box-shadow: var(--e-1); }
.v5-ret-btn:hover { background: var(--violet); color: #fff; }
.v5-radio-list { display: grid; gap: 8px; margin: 4px 0 12px; }
.v5-radio { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--ligne); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.v5-radio:has(input:checked) { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 7%, transparent); }
.v5-radio input { margin-top: 3px; accent-color: var(--violet); }
.v5-radio span { display: grid; gap: 2px; }
.v5-radio small { color: var(--texte-2); }
.v5-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--texte-2); background: var(--panneau-2); border-radius: 12px; padding: 10px 12px; }
.v5-exp { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--texte-3); vertical-align: middle; }
.msg.cont .msg-body > .v5-exp { margin: 2px 0 0; }

/* ---------------- Messages enregistrés ---------------- */
.msg.v5-saved { background: color-mix(in srgb, var(--violet) 6%, transparent); box-shadow: inset 3px 0 0 color-mix(in srgb, var(--violet) 70%, transparent); }
@media (max-width: 760px) {
  .msg.v5-saved { background: none; box-shadow: none; }
  .messages.dm .msg.v5-saved .msg-text { outline: 2px solid color-mix(in srgb, var(--violet) 60%, transparent); outline-offset: 2px; }
}
.v5-saved-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--violet); margin-bottom: 2px; }
.msg-act.v5-save.on { color: var(--violet); }
.v5-saved-list { display: grid; gap: 6px; max-height: min(60vh, 520px); overflow: auto; margin: 0 -4px; padding: 0 4px; }
.v5-saved-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; border: 1px solid var(--ligne); }
.v5-saved-main { flex: 1; min-width: 0; text-align: left; border: 0; background: none; display: grid; gap: 1px; cursor: pointer; color: var(--texte); font: inherit; padding: 0; }
.v5-saved-where { font-size: 11.5px; color: var(--texte-3); font-weight: 600; }
.v5-saved-txt { color: var(--texte-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v5-empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 28px 12px; color: var(--texte-2); }
.v5-empty .v5-ic { color: var(--violet); }

/* ---------------- Snaps ---------------- */
.v5-snap {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px 10px 12px; border-radius: 16px; cursor: pointer; text-align: left;
  border: 1.5px solid color-mix(in srgb, var(--snap) 40%, var(--ligne)); background: color-mix(in srgb, var(--snap) 7%, var(--panneau)); color: var(--texte);
  font: inherit; min-width: 190px; transition: transform .15s var(--v5-ease), box-shadow .15s;
}
.v5-snap-photo { --snap: var(--snap-photo); }
.v5-snap-video { --snap: var(--snap-video); }
.v5-snap:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--snap) 22%, transparent); }
.v5-snap:disabled { cursor: default; }
.v5-snap-sq { width: 22px; height: 22px; border-radius: 6px; background: var(--snap); flex: none; display: inline-grid; place-items: center; color: #fff; }
.v5-snap.done .v5-snap-sq, .v5-snap.mine .v5-snap-sq { background: transparent; border: 2.5px solid var(--snap); color: var(--snap); }
.v5-snap.fresh .v5-snap-sq { animation: v5-snapglow 1.6s infinite; }
@keyframes v5-snapglow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--snap) 50%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.v5-snap-txt { display: grid; gap: 1px; }
.v5-snap-txt strong { color: var(--snap); font-size: 14px; }
.v5-snap.done .v5-snap-txt strong { color: var(--texte-2); }
.v5-snap-txt small { color: var(--texte-3); font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
.messages.dm .msg.mine .v5-snap { margin-left: auto; }
.v5-snapview { position: fixed; inset: 0; z-index: 3000; background: #000; display: grid; grid-template-rows: auto 1fr auto; color: #fff; animation: v5-fade .18s; outline: none; }
.v5-snapview.out { animation: v5-fade .18s reverse forwards; }
@keyframes v5-fade { from { opacity: 0; } }
.v5-snap-head { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: linear-gradient(#0009, transparent); position: relative; z-index: 2; }
.v5-snap-head > div:nth-child(2) { display: grid; flex: 1; }
.v5-snap-head small { opacity: .75; }
.v5-snap-ring { --p: 1; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(var(--snap-photo) calc(var(--p) * 360deg), #ffffff26 0); display: grid; place-items: center; position: relative; }
.v5-snap-ring.video { background: conic-gradient(var(--snap-video) 360deg, #0000 0); }
.v5-snap-ring::after { content: attr(data-s); position: absolute; inset: 3px; border-radius: 50%; background: #000; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.v5-snap-stage { display: grid; place-items: center; overflow: hidden; min-height: 0; }
.v5-snap-media { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.v5-snap-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); }
.v5-snap-foot small { opacity: .7; }

/* Feuille d'envoi après capture */
.v5-capture-prev { border-radius: 18px; overflow: hidden; background: #000; display: grid; place-items: center; max-height: 46vh; margin-bottom: 12px; border: 3px solid transparent; }
.v5-capture-prev img, .v5-capture-prev video { max-width: 100%; max-height: 46vh; object-fit: contain; }
.v5-snapopts { display: grid; gap: 10px; margin-bottom: 12px; }
.v5-snapopts label { display: block; font-size: 12px; font-weight: 700; color: var(--texte-2); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.v5-seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panneau-2); flex-wrap: wrap; }
.v5-seg button { flex: 1; min-height: 34px; border: 0; border-radius: 9px; background: none; font: inherit; font-weight: 600; color: var(--texte-2); cursor: pointer; padding: 0 10px; }
.v5-seg button[aria-checked="true"] { background: var(--panneau); color: var(--texte); box-shadow: var(--e-1); }
.v5-send-grid { display: grid; gap: 8px; }
.v5-send-grid button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ligne); background: var(--panneau); color: var(--texte); font: inherit; text-align: left; cursor: pointer; }
.v5-send-grid button span:last-child { display: grid; }
.v5-send-grid small { color: var(--texte-2); }
.v5-send-snap.photo { --snap: var(--snap-photo); border-color: color-mix(in srgb, var(--snap-photo) 45%, var(--ligne)) !important; }
.v5-send-snap.video { --snap: var(--snap-video); border-color: color-mix(in srgb, var(--snap-video) 45%, var(--ligne)) !important; }
.v5-send-snap strong { color: var(--snap); }

/* ---------------- Appareil photo ---------------- */
body.v5-cam-open { overflow: hidden; }
.v5-cam, .v5-edit { position: fixed; inset: 0; z-index: 3100; background: #050507; color: #fff; display: grid; grid-template-rows: auto 1fr auto; user-select: none; -webkit-user-select: none; }
.v5-cam-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; position: relative; z-index: 3; }
.v5-cam-topr { display: flex; gap: 6px; }
.v5-cam-ic { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: inline-grid; place-items: center; cursor: pointer; font-size: 26px; line-height: 1; position: relative; }
.v5-cam-ic.on { background: #fff; color: #111; }
.v5-cam-timer[data-t]:not([data-t=""])::after { content: attr(data-t); position: absolute; right: -4px; bottom: -4px; background: var(--violet); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 4px; border-radius: 6px; }
.v5-cam-stage { position: relative; overflow: hidden; margin: 0 8px; border-radius: 22px; background: #111; min-height: 0; }
.v5-cam-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.v5-cam-video.mirror { transform: scaleX(-1); }
.v5-cam-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.v5-cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .12s; }
.v5-cam-flash.on { opacity: 1; }
.v5-cam-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 96px; font-weight: 800; text-shadow: 0 4px 30px #0008; animation: v5-pop .4s; }
.v5-cam-err { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; padding: 24px; background: #111; }
.v5-cam-err p { max-width: 340px; opacity: .8; margin: 0 0 6px; }
.v5-cam-bottom { padding: 10px 0 calc(12px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.v5-cam-filters { display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.v5-cam-filters::-webkit-scrollbar { display: none; }
.v5-fchip { flex: none; display: grid; justify-items: center; gap: 4px; border: 0; background: none; color: #fff; cursor: pointer; scroll-snap-align: center; font: inherit; }
.v5-fchip small { font-size: 11px; font-weight: 600; opacity: .8; }
.v5-fchip-sw { width: 50px; height: 50px; border-radius: 50%; border: 2px solid transparent; background: linear-gradient(135deg, #f7c59f, #8a4dff 45%, #2ec4b6); box-shadow: inset 0 0 0 2px #0006; }
.v5-fchip.on .v5-fchip-sw { border-color: #fff; transform: scale(1.06); }
.v5-fchip.on small { opacity: 1; }
.v5-edit .v5-fchip { color: var(--texte, #fff); }
.v5-cam-ctrl { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; padding: 0 24px; }
.v5-cam-gal { width: 46px; height: 46px; border-radius: 14px; border: 2px solid #fff6; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.v5-shutter { --p: 0; width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: #fff3; cursor: pointer; position: relative; transition: transform .15s var(--v5-ease); }
.v5-shutter:active { transform: scale(.92); }
.v5-shutter::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #fff; transition: inset .2s, border-radius .2s, background .2s; }
.v5-shutter.video::after { background: var(--snap-photo); }
.v5-shutter.boomerang::after { background: var(--snap-video); }
.v5-shutter.rec::after { inset: 20px; border-radius: 8px; }
.v5-rec-ring { position: absolute; inset: -9px; border-radius: 50%; background: conic-gradient(var(--snap-photo) calc(var(--p, 0) * 360deg), transparent 0); -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%); mask: radial-gradient(circle, transparent 60%, #000 61%); pointer-events: none; }
.v5-cam-modes { display: flex; justify-content: center; gap: 4px; }
.v5-cam-modes button { border: 0; background: none; color: #fff9; font: inherit; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer; text-transform: uppercase; letter-spacing: .06em; }
.v5-cam-modes button.on { color: #111; background: #fff; }
.v5-cam-maker { position: absolute; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 5; background: #17171cf2; backdrop-filter: blur(14px); border-radius: 20px; padding: 12px 14px; display: grid; gap: 10px; max-height: 70vh; overflow: auto; }
.v5-maker-head { display: flex; align-items: center; justify-content: space-between; }
.v5-maker-sliders { display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.v5-maker-sliders label { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 8px; font-size: 13px; }
.v5-maker-sliders input[type=range] { accent-color: var(--violet); width: 100%; }
.v5-maker-sliders input[type=color] { width: 44px; height: 30px; border: 0; background: none; }
.v5-maker-foot { display: flex; gap: 8px; }
.v5-maker-foot .input { flex: 1; background: #fff1; color: #fff; border-color: #fff2; }
/* Éditeur */
.v5-edit-stage { display: grid; place-items: center; padding: 8px; min-height: 0; overflow: hidden; }
.v5-edit-canvas { max-width: 100%; max-height: 100%; border-radius: 14px; touch-action: none; cursor: grab; box-shadow: 0 10px 40px #0008; }
.v5-edit-tools { display: grid; gap: 10px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
.v5-edit .v5-seg { background: #ffffff14; }
.v5-edit .v5-seg button { color: #fffa; }
.v5-edit .v5-seg button[aria-checked="true"] { background: #fff; color: #111; }
.v5-zoom { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; font-size: 13px; }
.v5-zoom input { accent-color: var(--violet); }
.v5-edit-ok { justify-self: stretch; min-height: 46px; border-radius: 999px !important; }
@media (min-width: 900px) {
  .v5-cam, .v5-edit { inset: 24px; margin: auto; max-width: 520px; max-height: 900px; border-radius: 26px; box-shadow: 0 0 0 100vmax rgba(8, 6, 16, .62), 0 30px 100px #000a; }
}

/* Colonne Messages */
.v5-side-saved .v5-ic { color: var(--violet); }

/* ---------------- Groupes privés ---------------- */
.v5-gsec { display: flex; align-items: center; justify-content: space-between; }
.v5-gnew { width: 22px; height: 22px; border-radius: 7px; border: 0; background: color-mix(in srgb, var(--violet) 12%, transparent); color: var(--violet); font-weight: 800; cursor: pointer; line-height: 1; }
.v5-gnew:hover { background: var(--violet); color: #fff; }
.v5-grow .label, .v5-gempty .label { display: grid; min-width: 0; }
.v5-gname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v5-gsub { color: var(--texte-3); font-size: 12px; font-weight: 500; }
.v5-grow.unread .v5-gname { font-weight: 800; color: var(--texte); }
.v5-gplus { width: 36px; height: 36px; border-radius: 12px; border: 1.5px dashed var(--ligne-2); display: inline-grid; place-items: center; color: var(--texte-3); font-size: 20px; flex: none; }
.v5-gstack { position: relative; flex: none; display: inline-block; }
.v5-gstack .avatar { position: absolute; width: 68% !important; height: 68% !important; font-size: 12px; border: 2px solid var(--panneau); box-sizing: content-box; }
.v5-gstack .avatar:first-child { left: 0; top: 0; }
.v5-gstack .avatar:nth-child(2) { right: -2px; bottom: -2px; }
.v5-gstack .avatar:only-child { position: static; width: 100% !important; height: 100% !important; border: 0; }
.v5-gav { overflow: hidden; border-radius: 30%; flex: none; }
.v5-gav img { width: 100%; height: 100%; object-fit: cover; }
.v5-ghead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.v5-ghead .dm-head-id { display: grid; min-width: 0; }
.v5-ghead strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v5-gcall { display: none; }
.v5-gcall.on, .v5-gcall.live { display: block; animation: v5-fade .2s; }
.v5-gcall .empty { padding: 12px 0 4px; }
.v5-gcall .empty .big-bubble { width: 54px; height: 54px; }
.v5-gcall .empty h3 { font-size: 1rem; margin: 4px 0 0; }
.v5-gcall.on { border-bottom: 1px solid var(--ligne); }
.v5-gcall .voice-stage { min-height: 0; max-height: 38vh; }
.icon-btn.call.on { background: var(--rouge) !important; color: #fff !important; }
.v5-picker { display: grid; gap: 8px; }
.v5-pick-list { display: grid; gap: 4px; max-height: 42vh; overflow: auto; }
.v5-pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.v5-pick:hover { background: var(--panneau-2); }
.v5-pick.on { border-color: color-mix(in srgb, var(--violet) 45%, transparent); background: color-mix(in srgb, var(--violet) 7%, transparent); }
.v5-pick input { accent-color: var(--violet); width: 18px; height: 18px; }
.v5-pick-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 6px; }
.v5-ginfo-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.v5-gphoto { position: relative; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 30%; }
.v5-gphoto:disabled { cursor: default; }
.v5-gphoto-ed { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; border: 2px solid var(--panneau); }
.v5-ginfo-name { flex: 1; display: flex; gap: 8px; align-items: center; min-width: 0; }
.v5-ginfo-name .input { flex: 1; min-width: 0; font-weight: 700; }
.v5-gmembers { display: grid; gap: 4px; max-height: 40vh; overflow: auto; }
.v5-gm { display: flex; align-items: center; gap: 10px; padding: 6px 4px; flex-wrap: wrap; }
.v5-gm-name { font-weight: 600; flex: 1; min-width: 100px; }
.v5-gm-name small { color: var(--texte-3); font-weight: 500; }
.v5-gm-tag { font-size: 11px; font-weight: 800; color: var(--violet); background: color-mix(in srgb, var(--violet) 10%, transparent); padding: 2px 8px; border-radius: 999px; }
.v5-gm-acts { display: flex; gap: 6px; }
.v5-danger { color: var(--rouge) !important; }
.v5-ginfo-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; padding: 10px 12px; background: var(--panneau-2); border-radius: 12px; }
.v5-ginfo-row span:nth-child(2) { flex: 1; font-weight: 600; }

/* Correctif de mise en page (bureau) : une longue liste de conversations faisait défiler
   toute l'application au lieu de la seule colonne. La rangée de la grille est bornée. */
@media (min-width: 761px) { .app { grid-template-rows: minmax(0, 1fr); } .app > .side { min-height: 0; } }

/* ---------- M5 : Notes (rangée au-dessus des conversations) ---------- */
.v5-notes { display: flex; gap: 6px; overflow-x: auto; padding: 30px 8px 8px; margin: 0 -4px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.v5-notes::-webkit-scrollbar { display: none; }
.v5-note { position: relative; flex: 0 0 auto; width: 70px; display: grid; justify-items: center; gap: 4px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--texte); scroll-snap-align: start; }
.v5-note-av { position: relative; display: inline-flex; }
.v5-note-av .avatar { width: 52px; height: 52px; font-size: 1.1rem; }
.v5-note-plus { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; border: 2px solid var(--panneau); line-height: 1; }
.v5-note-bubble { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); max-width: 94px; padding: 5px 9px; border-radius: 14px; background: var(--panneau); box-shadow: var(--e-1); border: 1px solid var(--bord, rgba(127,127,127,.18)); font-size: .72rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 1; }
.v5-note-bubble::after { content: ''; position: absolute; left: 24px; bottom: -5px; width: 8px; height: 8px; border-radius: 50%; background: inherit; border: inherit; border-top: 0; border-left: 0; }
.v5-note.is-empty .v5-note-bubble { color: var(--texte-2); }
.v5-note.is-empty:not(.me) .v5-note-bubble { display: none; }
.v5-note-name { font-size: .72rem; color: var(--texte-2); max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v5-note:hover .v5-note-bubble, .v5-note:focus-visible .v5-note-bubble { border-color: var(--violet); }
.v5-note:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 12px; }
.v5-note-edit { position: relative; }
.v5-note-input { resize: none; font-size: 1.05rem; text-align: center; border-radius: 18px; }
.v5-note-cnt { position: absolute; right: 12px; bottom: 6px; margin: 0; font-size: .75rem; }
.v5-note-cur { font-size: .85rem; color: var(--violet); font-weight: 600; margin: 0 0 8px; }
.v5-field { display: grid; gap: 6px; margin: 12px 0 0; }
.v5-field > strong { font-size: .85rem; }
.v5-note-view { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 8px 0 4px; }
.v5-note-view .avatar { width: 72px; height: 72px; font-size: 1.5rem; }
.v5-note-big { position: relative; max-width: 100%; padding: 12px 18px; border-radius: 22px; background: var(--panneau-2); font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; margin-bottom: 8px; }
.v5-note-reply { display: flex; gap: 8px; margin-top: 14px; }
.v5-note-reply .input { flex: 1; min-width: 0; }

/* ---------- M5 : activité ---------- */
.v5-emos { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.v5-emo { width: 38px; height: 38px; border-radius: 12px; border: 1px solid transparent; background: var(--panneau-2); font-size: 1.15rem; cursor: pointer; }
.v5-emo[aria-checked="true"] { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 16%, transparent); }

/* ---------- M5 : audience des stories ---------- */
.v5-aud { display: grid; gap: 6px; margin: 10px 0 4px; }
.v5-aud-title { font-size: .85rem; }
.v5-aud-info { margin: 0; font-size: .82rem; }
.v5-aud-info.warn { color: var(--rouge, #E5484D); }
.v5-aud-custom .v5-pick-list { max-height: 180px; }

/* ---------- M5 : profil privé ---------- */
.v5-locked { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 26px 16px 30px; margin: 10px 16px 16px; border-radius: 18px; border: 1px dashed color-mix(in srgb, var(--texte-2) 40%, transparent); }
.v5-locked-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--texte); color: var(--texte); }
.v5-locked p { max-width: 320px; margin: 0; }
.v5-pmeta { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; }
.v5-pchip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: var(--panneau-2); font: inherit; font-size: .8rem; font-weight: 600; color: var(--texte); border: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v5-pchip.act { background: color-mix(in srgb, var(--violet) 14%, transparent); color: var(--violet); }
.v5-pchip.req { background: var(--violet); color: #fff; cursor: pointer; }
.v5-sub { margin: 14px 0 6px; font-size: .9rem; }
.v5-scroll { max-height: 320px; overflow-y: auto; }
.v5-priv .blocked-row .btn-sm, .card .blocked-row .btn-sm { flex: 0 0 auto; }

/* ---------- M5 : inscription « compte privé » ---------- */
.auth-private { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--panneau-2, rgba(127,127,127,.08)); cursor: pointer; text-align: left; }
.auth-private[hidden] { display: none; }
.auth-private input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--violet, #7A5AF8); flex: 0 0 auto; }
.auth-private span { display: grid; gap: 2px; }
.auth-private small { color: var(--texte-2, #667085); font-size: .8rem; line-height: 1.35; }
.v5-picker .v5-pick { flex-direction: row; font-weight: 600; font-size: .95rem; color: var(--texte); }
.v5-aud .v5-seg button { white-space: nowrap; padding: 0 6px; }
.blocked-row.v5-urow { grid-template-columns: 40px minmax(0, 1fr); }
.v5-urow-acts { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (min-width: 520px) { .blocked-row.v5-urow { grid-template-columns: 40px minmax(0, 1fr) auto; } .v5-urow-acts { grid-column: auto; } }
.v5-notes { gap: 10px; padding-left: 10px; padding-right: 10px; }
.v5-note { width: 76px; }
.v5-note-bubble { max-width: 76px; }
.v5-seg button { white-space: nowrap; }

/* ---------- M6 : formules ---------- */
.v5-tier { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .02em; line-height: 1.4; }
.v5-tier.t-plus { background: color-mix(in srgb, #F2B705 22%, transparent); color: #9A6B00; }
.v5-tier.t-premium { background: linear-gradient(135deg, #8A4DFF, #F0434F); color: #fff; }
.v5-tiers .v5-tier-now { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.v5-tiers .v5-tier-now span { color: var(--texte-2); font-weight: 600; }
.v5-tiers .v5-tier-now strong { font-size: 1.2rem; }
.v5-tiers .v5-tier-now strong.t-premium { background: linear-gradient(135deg, #8A4DFF, #F0434F); -webkit-background-clip: text; background-clip: text; color: transparent; }
.v5-tier-table { display: grid; gap: 2px; margin-bottom: 12px; font-size: .85rem; overflow-x: auto; }
.v5-tt-row { display: grid; grid-template-columns: minmax(120px, 1.6fr) repeat(3, minmax(64px, 1fr)); gap: 6px; padding: 7px 4px; border-bottom: 1px solid color-mix(in srgb, var(--texte-2) 15%, transparent); align-items: center; }
.v5-tt-row.head { font-weight: 800; border-bottom-width: 2px; }
.v5-tt-row > span:not(:first-child) { text-align: center; }
.v5-tt-row > span.cur { color: var(--violet); font-weight: 800; }

/* ---------- M6 : catalogue de sons ---------- */
.v5-cat-list { display: grid; gap: 4px; margin: 8px 0 12px; }
.v5-cat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 12px; border: 0; background: var(--panneau-2); font: inherit; color: var(--texte); cursor: pointer; text-align: left; }
.v5-cat-row:hover { outline: 1px solid color-mix(in srgb, var(--violet) 40%, transparent); }
.v5-cat-ev { font-weight: 600; }
.v5-cat-cur { display: inline-flex; align-items: center; gap: 4px; color: var(--violet); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.v5-snd-list { display: grid; gap: 4px; max-height: 52vh; overflow-y: auto; margin: 8px 0; }
.v5-snd { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 12px; border: 1px solid transparent; }
.v5-snd.on { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 8%, transparent); }
.v5-snd.locked .v5-snd-pick > span:first-child { opacity: .6; }
.v5-snd-play { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--panneau-2); color: var(--violet); cursor: pointer; font-size: .8rem; }
.v5-snd-pick { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 40px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--texte); cursor: pointer; text-align: left; padding: 0 6px; }
.v5-lock { margin-left: auto; }

/* ---------- M6 : soundboard ---------- */
.call-ctrl.v5-sb-btn .v5-ic { display: inline-flex; }
.v5-sb-head { display: flex; align-items: center; gap: 10px; }
.v5-sb-head h2 { margin: 0; }
.v5-sb-tabs { margin: 10px 0; }
.v5-sb-tabs button[aria-selected="true"] { background: var(--panneau); color: var(--texte); box-shadow: var(--e-1); }
.v5-sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 40vh; overflow-y: auto; padding: 2px; }
.v5-sb-cell { position: relative; }
.v5-sb-tile { width: 100%; min-height: 78px; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 8px 6px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--texte-2) 18%, transparent); background: var(--panneau-2); font: inherit; color: var(--texte); cursor: pointer; transition: transform .12s ease, border-color .12s; }
.v5-sb-tile:hover { border-color: var(--violet); }
.v5-sb-tile:active, .v5-sb-tile.hit { transform: scale(.94); border-color: var(--violet); background: color-mix(in srgb, var(--violet) 14%, var(--panneau-2)); }
.v5-sb-tile .e { font-size: 1.6rem; line-height: 1; }
.v5-sb-tile .n { font-size: .76rem; font-weight: 700; text-align: center; line-height: 1.2; overflow-wrap: anywhere; }
.v5-sb-tile .v5-tier { position: absolute; top: 5px; left: 5px; padding: 1px 5px; font-size: .62rem; }
.v5-sb-tile.locked { opacity: .55; }
.v5-sb-tile.add { border-style: dashed; color: var(--violet); }
.v5-sb-pv { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--panneau); color: var(--violet); font-size: .62rem; cursor: pointer; box-shadow: var(--e-1); }
.v5-sb-del { position: absolute; bottom: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #E5484D; color: #fff; font-weight: 800; cursor: pointer; line-height: 1; }
.v5-sb-import { display: grid; gap: 8px; padding: 12px; margin-bottom: 10px; border-radius: 14px; background: var(--panneau-2); }
.v5-sb-import-row { display: flex; gap: 8px; }
.v5-sb-import-row .input:last-child { flex: 1; min-width: 0; }
.v5-sb-emo { width: 64px; text-align: center; font-size: 1.2rem; }
.v5-sb-foot { display: grid; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--texte-2) 15%, transparent); }
.v5-sb-vol { display: flex; align-items: center; gap: 10px; }
.v5-sb-vol input { flex: 1; accent-color: var(--violet); }
.v5-sb-mute { display: grid; gap: 8px; }
.v5-sb-mute > strong { font-size: .9rem; }
.v5-sb-people { display: grid; gap: 4px; }
.v5-sb-person { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; border: 0; background: var(--panneau-2); font: inherit; color: var(--texte); cursor: pointer; }
.v5-sb-person .avatar { width: 30px; height: 30px; }
.v5-sb-person .st { margin-left: auto; font-size: .8rem; font-weight: 700; }
.v5-sb-person.off { opacity: .7; }
.v5-sb-person.off .st { color: #E5484D; }
.v5-sb-pill { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 9999; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(20, 16, 34, .88); color: #fff; font-size: .85rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: v5pill .25s ease; pointer-events: none; max-width: calc(100vw - 32px); }
.v5-sb-pill .e { font-size: 1.1rem; }
.v5-sb-pill.out { opacity: 0; transition: opacity .35s; }
@keyframes v5pill { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (prefers-reduced-motion: reduce) { .v5-sb-pill { animation: none; } .v5-sb-tile { transition: none; } }
.v5-tier-table { overflow-x: visible; }
.v5-tt-row { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 4px; }
.v5-tt-row > span:first-child { overflow-wrap: anywhere; }

/* ================= V5 M7 — jeux, carte, comptes ================= */
.v5-seg button[aria-selected="true"] { background: var(--panneau); color: var(--texte); box-shadow: var(--e-1); }
.v5-hub-body { margin-top: 12px; min-height: 200px; }
.v5-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.v5-hub-game { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--bord); background: var(--panneau-2); color: var(--texte); font: inherit; cursor: pointer; transition: transform .15s, border-color .15s; }
.v5-hub-game:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--violet); }
.v5-hub-game .e { font-size: 1.7rem; line-height: 1; }
.v5-hub-game small { color: var(--texte-2); font-size: .8rem; }
.v5-board { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.v5-board li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--panneau-2); min-width: 0; }
.v5-board li.me { outline: 2px solid var(--violet); }
.v5-board .rk { width: 28px; text-align: center; font-weight: 700; }
.v5-board .avatar { width: 30px; height: 30px; flex: none; }
.v5-board strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v5-board .st { color: var(--texte-2); font-size: .82rem; white-space: nowrap; }
.v5-hist { display: grid; gap: 6px; }
.v5-hist-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--panneau-2); }
.v5-hist-row > div { flex: 1; min-width: 0; display: grid; }
.v5-hist-row small { color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v5-hist-row .e { font-size: 1.4rem; }
.v5-hist-row .res { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.v5-hist-row .res.w { color: #30A46C; } .v5-hist-row .res.d { color: var(--texte-2); }

.v5-game { position: fixed; z-index: 900; right: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; background: var(--panneau); color: var(--texte); border: 1px solid var(--bord); border-radius: 20px; box-shadow: var(--e-3, 0 20px 60px rgba(0,0,0,.3)); display: flex; flex-direction: column; }
.v5-game[hidden] { display: none; }
.v5-game-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px 16px; position: sticky; top: 0; background: var(--panneau); z-index: 1; }
.v5-game-head .e { font-size: 1.5rem; }
.v5-game-head .tt { flex: 1; display: grid; min-width: 0; }
.v5-game-head small { color: var(--texte-2); }
.v5-game-players { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 8px; }
.v5-gp { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--panneau-2); font-size: .85rem; max-width: 100%; }
.v5-gp > span:not(.avatar) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.v5-gp .avatar { width: 24px; height: 24px; font-size: .7rem; }
.v5-gp.turn { outline: 2px solid var(--violet); }
.v5-gp b { color: var(--violet); }
.v5-game-body { padding: 4px 16px 16px; display: grid; gap: 12px; }
.v5-game-msg { text-align: center; color: var(--texte-2); margin: 0; }
.v5-lobby-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.v5-chip-info { margin: 0; font-size: .85rem; color: var(--texte-2); }
.v5-inv { display: grid; gap: 6px; max-height: 240px; overflow: auto; }
.v5-inv-row { display: flex; align-items: center; gap: 10px; }
.v5-inv-row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.v5-inv-row .avatar { width: 30px; height: 30px; }
.v5-timer { position: relative; height: 8px; border-radius: 99px; background: var(--panneau-2); overflow: visible; }
.v5-timer > i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--violet), #E5484D); transition: width .2s linear; }
.v5-timer-n { position: absolute; right: 0; top: 10px; font-size: .75rem; color: var(--texte-2); }
.v5-ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 300px); margin: 6px auto 0; }
.v5-ttt .cell { aspect-ratio: 1; border-radius: 14px; border: 0; background: var(--panneau-2); font-size: 2.4rem; font-weight: 800; color: var(--texte); cursor: pointer; }
.v5-ttt .cell:disabled { cursor: default; }
.v5-ttt .cell.p1 { color: var(--violet); } .v5-ttt .cell.p2 { color: #E5484D; }
.v5-ttt .cell.win { background: color-mix(in srgb, var(--violet) 25%, var(--panneau-2)); }
.v5-c4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 8px; border-radius: 14px; background: #3E63DD; width: min(100%, 360px); margin: 6px auto 0; }
.v5-c4 .col { display: grid; gap: 4px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 10px; }
.v5-c4 .col:hover:not(:disabled) { background: rgba(255,255,255,.15); }
.v5-c4 .col:disabled { cursor: default; }
.v5-c4 .disc, .disc-s { aspect-ratio: 1; border-radius: 50%; background: var(--panneau); display: block; }
.disc-s { display: inline-block; width: 14px; vertical-align: -2px; }
.v5-c4 .disc.p1, .disc-s.p1 { background: #E5484D; } .v5-c4 .disc.p2, .disc-s.p2 { background: #F5C524; }
.v5-c4 .disc.win { box-shadow: 0 0 0 3px #fff inset; }
.v5-mem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(100%, 320px); margin: 6px auto 0; }
.v5-mem .card { aspect-ratio: 1; border-radius: 12px; border: 0; background: linear-gradient(135deg, var(--violet), #3E63DD); font-size: 1.8rem; cursor: pointer; color: var(--texte); padding: 0; }
.v5-mem .card.up { background: var(--panneau-2); }
.v5-mem .card.found { opacity: .55; }
.v5-mem .card:disabled { cursor: default; }
.v5-q { font-size: 1.1rem; font-weight: 700; text-align: center; margin: 4px 0; }
.v5-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v5-choices .ch { min-height: 52px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--bord); background: var(--panneau-2); color: var(--texte); font: inherit; font-weight: 600; cursor: pointer; overflow-wrap: anywhere; }
.v5-choices .ch.mine { border-color: var(--violet); box-shadow: 0 0 0 2px var(--violet) inset; }
.v5-choices .ch.good { background: #30A46C; color: #fff; border-color: #30A46C; }
.v5-choices .ch.bad { background: #E5484D; color: #fff; border-color: #E5484D; }
.v5-choices .ch.dim { opacity: .5; }
.v5-choices .ch:disabled { cursor: default; }
.v5-replay { justify-self: center; }
.v5-tiles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.v5-tiles .tile { width: 34px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: var(--panneau-2); font-weight: 800; font-size: 1.1rem; }
.v5-tiles .tile.ok { background: #30A46C; color: #fff; }
.v5-guess { display: flex; gap: 8px; }
.v5-guess .input { flex: 1; min-width: 0; }
.input.shake { animation: v5shake .35s; border-color: #E5484D; }
@keyframes v5shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.v5-word { text-align: center; margin: 0; font-size: 1.05rem; }
.v5-word .mask { letter-spacing: .3em; font-weight: 800; font-family: ui-monospace, monospace; }
.v5-canvas { width: 100%; aspect-ratio: 4 / 3; height: auto; border-radius: 12px; background: #fff; border: 1px solid var(--bord); display: block; }
.v5-pal { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.v5-pal .sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--bord); cursor: pointer; padding: 0; }
.v5-pal .sw.on { outline: 3px solid var(--violet); outline-offset: 1px; }
.v5-feed { display: grid; gap: 2px; font-size: .88rem; max-height: 140px; overflow: auto; }
.v5-feed .sys { color: var(--texte-2); font-style: italic; } .v5-feed .sys.ok { color: #30A46C; font-weight: 600; font-style: normal; }
.v5-result { display: grid; justify-items: center; gap: 4px; text-align: center; }
.v5-result .big { font-size: 3rem; line-height: 1; }
.v5-game-mini { position: fixed; z-index: 900; right: 16px; bottom: 16px; padding: 10px 16px; border-radius: 999px; border: 0; background: var(--violet); color: #fff; font: inherit; font-weight: 700; box-shadow: var(--e-2, 0 8px 24px rgba(0,0,0,.25)); cursor: pointer; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v5-invite { position: fixed; z-index: 950; left: 50%; top: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; width: min(460px, calc(100vw - 32px)); border-radius: 16px; background: var(--panneau); color: var(--texte); border: 1px solid var(--bord); box-shadow: var(--e-3, 0 20px 60px rgba(0,0,0,.3)); animation: v5drop .25s ease-out; }
.v5-invite .e { font-size: 1.5rem; }
.v5-invite .t { flex: 1; min-width: 0; font-size: .9rem; }
.v5-invite .t strong { margin-right: 4px; }
@keyframes v5drop { from { transform: translate(-50%, -12px); opacity: 0; } }

.v5-map { position: fixed; inset: 0; z-index: 920; background: var(--fond, var(--panneau)); display: flex; flex-direction: column; }
.v5-map-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panneau); border-bottom: 1px solid var(--bord); }
.v5-map-head strong { flex: 1; font-size: 1.1rem; }
.v5-map-box { flex: 1; min-height: 0; position: relative; background: var(--panneau-2); }
.v5-map-load { padding: 40px 16px; text-align: center; }
.v5-map-banner > div { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panneau); border-top: 1px solid var(--bord); font-size: .9rem; }
.v5-map-banner > div > span:not(.dot) { flex: 1; min-width: 0; }
.v5-map-banner .dot { width: 10px; height: 10px; border-radius: 50%; background: #30A46C; box-shadow: 0 0 0 4px color-mix(in srgb, #30A46C 25%, transparent); flex: none; }
.v5-map-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--panneau); }
.v5-map-chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--bord); background: var(--panneau-2); color: var(--texte); font: inherit; cursor: pointer; flex: none; }
.v5-map-chip > span { display: grid; text-align: left; }
.v5-map-chip small { color: var(--texte-2); font-size: .75rem; }
.v5-map-chip .avatar { width: 28px; height: 28px; }
.v5-map-none { margin: 0; }
.v5-map-sheet { position: absolute; inset: auto 0 0 0; z-index: 1000; max-height: 85dvh; overflow: auto; background: var(--panneau); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
.v5-map-sheet[hidden] { display: none; }
.v5-sheet-in { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 12px; max-width: 560px; margin: 0 auto; }
.v5-sheet-in h3 { margin: 0; }
.v5-field { display: grid; gap: 6px; }
.v5-loc-pick[hidden] { display: none; }
.v5-loc-pick .avatar { width: 28px; height: 28px; }
.v5-consent { display: flex !important; flex-direction: row !important; gap: 10px; align-items: flex-start; font-size: .88rem; padding: 10px; border-radius: 12px; background: var(--panneau-2); }
.v5-consent input { margin-top: 3px; flex: none; }
.v5-pin-wrap { background: none; border: 0; }
.v5-pin { display: grid; justify-items: center; gap: 2px; }
.v5-pin .v5-pin-av { width: 30px; height: 30px; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.28); border-radius: 50%; }
.v5-pin.me .v5-pin-av { border-color: var(--violet); }
.v5-pin .nm { font-size: 10px; font-weight: 700; background: #fff; color: #111; padding: 1px 5px; border-radius: 99px; max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v5-acc-quick { display: grid; gap: 6px; margin-bottom: 14px; }
.v5-acc-quick small { color: var(--texte-2); }
.v5-acc-btn { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 12px; border: 1px solid var(--bord); background: var(--panneau-2); color: var(--texte); font: inherit; cursor: pointer; }
.v5-acc-btn > span:not(.avatar):not(.go) { flex: 1; text-align: left; font-weight: 600; }
.v5-acc-btn .avatar { width: 30px; height: 30px; }
.v5-acc-btn .go { color: var(--violet); }
@media (max-width: 600px) {
  .v5-game { right: 8px; left: 8px; bottom: 8px; width: auto; max-height: calc(100dvh - 16px); }
  .v5-choices { grid-template-columns: 1fr; }
  .v5-choices.two { grid-template-columns: 1fr 1fr; }
}
/* Barre d'appel mobile : défilement complet (plus de boutons coupés à gauche) */
@media (max-width: 760px) {
  .app .voice-actions { justify-content: flex-start; }
  .app .voice-actions > :first-child { margin-left: auto; }
  .app .voice-actions > :last-child { margin-right: auto; }
}
@media (max-width: 430px) {
  .app .voice-actions { gap: 5px; padding-left: 8px; padding-right: 8px; }
  .app .voice-actions .call-ctrl { width: 40px; height: 40px; min-width: 40px; }
  .app .voice-actions .call-ctrl svg { width: 18px; height: 18px; }
}

/* ================= V5 M8 — langue, e-mail ================= */
.v5-lang-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.v5-lang { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--bord); background: var(--panneau-2); color: var(--texte); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.v5-lang:hover { border-color: var(--violet); }
.v5-lang.on { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet) inset; }
.v5-lang .flag { font-size: 1.3rem; line-height: 1; }
.v5-lang .nm { flex: 1; }
.v5-lang .ok { color: var(--violet); font-weight: 800; }
.v5-email-card .row-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.v5-email-card .row-text strong { overflow-wrap: anywhere; }
.v5-badge { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.v5-badge.ok { background: color-mix(in srgb, #30A46C 16%, transparent); color: #1F8A55; }
.v5-badge.warn { background: color-mix(in srgb, #F5A524 18%, transparent); color: #A26205; }
:root[data-theme="dark"] .v5-badge.ok { color: #5BD196; } :root[data-theme="dark"] .v5-badge.warn { color: #F5C26B; }
.v5-email-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--panneau-2); font-size: .9rem; }
.v5-email-note > span { flex: 1 1 220px; overflow-wrap: anywhere; }
.v5-code { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.lang-pick-box { display: inline-flex; align-items: center; gap: 6px; }
.lang-pick { appearance: none; -webkit-appearance: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--texte); background: var(--panneau); border: 1px solid var(--bord); border-radius: 999px; padding: 6px 14px; min-height: 36px; cursor: pointer; }
.auth-lang { display: flex; justify-content: center; margin: 14px 0 0; }
.pc-body > .v5-pmeta { padding: 10px 0 0; }

/* =====================================================================
   16/11 — Fichiers en attente (bande de vignettes), envoi de Snap,
   Boomerang, miniatures de la visionneuse
   ===================================================================== */
.att-tray.v5-tray { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 8px; padding: 10px; margin: 0 0 8px; background: var(--panneau); border-radius: 20px; box-shadow: 0 6px 24px -14px rgba(20, 10, 60, .35); max-height: none; overflow: visible; }
.v5-tray .att-strip { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding: 6px 2px 4px; scroll-snap-type: x proximity; }
.v5-tray .att-chip { position: relative; flex: 0 0 auto; width: 78px; height: 78px; scroll-snap-align: start; }
.v5-tray .att-chip-main { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--panneau-2, #f0eef8); cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s, transform .15s; }
.v5-tray .att-chip-main:active { transform: scale(.96); }
.v5-tray .att-chip.sel .att-chip-main { outline-color: var(--violet); }
.v5-tray .att-chip.err .att-chip-main { outline-color: var(--rouge, #e5484d); }
.v5-tray .att-chip-main img, .v5-tray .att-chip-main video { width: 100%; height: 100%; object-fit: cover; display: block; }
.v5-tray .att-chip-main .att-audio-ic { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 2px; color: var(--violet); }
.v5-tray .att-chip-main .att-audio-ic small { font-size: 11px; font-weight: 700; color: var(--texte-2, #555); }
.v5-tray .att-play { position: absolute; left: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; color: #fff; background: rgba(0, 0, 0, .55); }
.v5-tray .att-ring { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15, 10, 35, .45); }
.v5-tray .att-ring::before { content: ''; position: absolute; width: 40px; height: 40px; border-radius: 50%; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .25) 0); -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px); mask: radial-gradient(circle, transparent 15px, #000 16px); }
.v5-tray .att-ring small { position: relative; color: #fff; font-size: 10px; font-weight: 800; }
.v5-tray .att-errb { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(229, 72, 77, .55); color: #fff; font-weight: 900; font-size: 24px; }
.v5-tray .att-chip .att-x { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--panneau); background: #1d1a2b; color: #fff; font-size: 15px; line-height: 1; display: grid; place-items: center; padding: 0; cursor: pointer; z-index: 2; }
.v5-tray .att-add { flex: 0 0 auto; width: 78px; height: 78px; border-radius: 16px; border: 2px dashed color-mix(in srgb, var(--violet) 45%, transparent); background: color-mix(in srgb, var(--violet) 6%, transparent); color: var(--violet); display: grid; place-items: center; cursor: pointer; }
.v5-tray .att-add:hover { background: color-mix(in srgb, var(--violet) 12%, transparent); }
.v5-tray .att-hint { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; padding: 0 4px; font-size: 13px; color: var(--texte-2, #555); }
.v5-tray .att-hint strong { color: var(--texte); }
.v5-tray .att-hint small { flex-basis: 100%; color: var(--texte-3, #888); font-size: 12px; }
.v5-tray .att-opts { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--panneau-2, #f4f2fb); }
.v5-tray .att-opts-t { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.v5-tray .att-opts-t strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-size: 14px; }
.v5-tray .att-opts-t small { flex: none; color: var(--texte-3, #888); font-size: 12px; }
.v5-tray .att-opts-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--texte-2, #555); font-weight: 600; }
.v5-tray .att-sizes { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 12px; background: var(--panneau); }
.v5-tray .att-sizes button { border: 0; background: transparent; padding: 6px 11px; border-radius: 9px; font: 650 12.5px/1 var(--font-ui, system-ui); color: var(--texte-2, #555); cursor: pointer; white-space: nowrap; }
.v5-tray .att-sizes button[aria-pressed="true"] { background: var(--violet); color: #fff; }
.v5-tray .att-opts-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.v5-tray .att-opts-acts .btn { display: inline-flex; align-items: center; gap: 4px; }

/* Envoi d'un Snap pris depuis le menu */
.v5-snapto { display: flex; flex-direction: column; gap: 12px; }
.v5-snapto .v5-capture-prev { margin: 0; max-height: 34vh; }
.v5-snapto .v5-capture-prev img, .v5-snapto .v5-capture-prev video { max-height: 34vh; }
.v5-snapto-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.v5-snapto-side .v5-snapopts { margin: 0; }
.v5-snapto-side .v5-pick-list { max-height: 28vh; overflow-y: auto; }
.v5-snapto .v5-pick-story { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--ligne, rgba(0,0,0,.08)); cursor: pointer; text-align: left; }
.v5-snapto .v5-pick-story.on { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 8%, transparent); }
.v5-snapto .v5-pick-story input { margin: 0; flex: none; width: 18px; height: 18px; accent-color: var(--violet); }
.v5-pick-story .v5-story-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #ff7ab6, var(--violet)); flex: none; }
.v5-pick-story strong { font-weight: 700; }
.v5-pick-story small { color: var(--texte-3, #888); }
.v5-snapto-acts { flex-wrap: wrap; }
.v5-snapto-acts .btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.v5-snapto-go { flex: 1 1 200px; justify-content: center; }

/* Boomerang : création en cours */
.v5-cam-busy { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 12px; background: rgba(12, 8, 30, .55); color: #fff; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); text-align: center; }
.v5-cam-busy[hidden] { display: none; }
.v5-cam-spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: v5spin .8s linear infinite; }
.v5-cam-busytrack { width: 160px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.v5-cam-busybar { display: block; height: 100%; width: 0; background: #fff; border-radius: 5px; transition: width .1s linear; }
@keyframes v5spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .v5-cam-spin { animation-duration: 2.4s; } }

/* Visionneuse : miniatures */
.lightbox .lb-bar { flex-direction: column; gap: 8px; }
.lb-thumbs { display: flex; gap: 6px; max-width: min(92vw, 640px); overflow-x: auto; padding: 4px 2px; scrollbar-width: none; }
.lb-thumbs::-webkit-scrollbar { display: none; }
.lb-th { flex: 0 0 auto; width: 48px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #222; opacity: .55; cursor: pointer; transition: opacity .15s, border-color .15s; }
.lb-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-th.on { opacity: 1; border-color: #fff; }
