/* Piassan — Bar : application plein écran, responsive (ordinateur 3 colonnes ; tablette/mobile 1 panneau + barre d'onglets). */
:root {
	--v: var(--c-violet, #6B2FD0); --co: var(--c-coral, #FF6B57); --te: var(--c-teal, #1FB5AD); --ye: var(--c-yellow, #FFC23A);
	--cr: #FBF3E6; --cr2: #F4E4C9; --ink: #1E1636; --mu: #6C6480; --li: #EBDDC6;
	--top: 58px; --nav: 0px;
	--f: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
html, body.pb-body { height: 100%; }
body.pb-body { margin: 0; background: var(--cr); color: var(--ink); font: 400 15px/1.5 var(--f); overflow: hidden; -webkit-font-smoothing: antialiased; }
.pb-body *, .pb-body *::before, .pb-body *::after { box-sizing: border-box; }
.pb-body :where(button) { font: inherit; color: inherit; cursor: pointer; }
.pb-body button:disabled { cursor: not-allowed; }
.pb-body :focus-visible { outline: 3px solid var(--ye); outline-offset: 2px; }
.pb-c-violet { background: var(--v) !important; color: #fff; } .pb-c-coral { background: var(--co) !important; color: #fff; }
.pb-c-teal { background: var(--te) !important; color: #fff; } .pb-c-yellow { background: var(--ye) !important; color: var(--ink); }
.pb-muted { color: var(--mu); } .pb-small { font-size: 12.5px; }
.pb-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; color: var(--v); margin: 0 0 6px; }
.pb-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pb-row--col { flex-direction: column; align-items: stretch; }
.pb-row--danger { justify-content: space-between; border-top: 1px solid var(--li); padding-top: 12px; margin-top: 12px; }
.pb-link { background: none; border: 0; padding: 4px 0; color: var(--mu); text-decoration: underline; }

/* Boutons */
.pb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 14px; border: 2px solid var(--ink); background: #fff; text-decoration: none; color: var(--ink); line-height: 1.2; white-space: nowrap; }
.pb-btn:hover { background: var(--ink); color: #fff; }
.pb-btn--violet { background: var(--v); border-color: var(--v); color: #fff; } .pb-btn--coral { background: var(--co); border-color: var(--co); color: #fff; }
.pb-btn--teal { background: var(--te); border-color: var(--te); color: #fff; } .pb-btn--yellow { background: var(--ye); border-color: var(--ye); color: var(--ink); }
.pb-btn--violet:hover, .pb-btn--coral:hover, .pb-btn--teal:hover, .pb-btn--yellow:hover { filter: brightness(.92); background-color: inherit; }
.pb-btn--violet:hover { background: var(--v); color: #fff; } .pb-btn--coral:hover { background: var(--co); color: #fff; } .pb-btn--teal:hover { background: var(--te); color: #fff; } .pb-btn--yellow:hover { background: var(--ye); color: var(--ink); }
.pb-btn--off, .pb-btn:disabled { opacity: .5; background: #fff; color: var(--mu); border-color: var(--li); }
.pb-btn--sm { padding: 5px 10px; font-size: 12px; } .pb-btn--lg { padding: 13px 22px; font-size: 16px; }
.pb-icon { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--li); background: #fff; display: inline-grid; place-items: center; font-size: 16px; }
.pb-icon:hover { border-color: var(--ink); }
.pb-x { background: none; border: 0; font-size: 22px; line-height: 1; padding: 4px 8px; color: var(--mu); }

/* Écran d'attente / connexion */
.pb-loading, .pb-gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; gap: 10px; color: var(--mu); }
.pb-spinner { width: 28px; height: 28px; border: 3px solid var(--li); border-top-color: var(--v); border-radius: 50%; animation: pbspin .8s linear infinite; display: inline-block; vertical-align: middle; margin-right: 8px; }
@keyframes pbspin { to { transform: rotate(360deg); } }
.pb-card { background: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 14px 30px -18px rgba(30, 22, 54, .35); }
.pb-gate__card { max-width: 520px; text-align: center; color: var(--ink); }
.pb-gate__card h1 { font-size: 26px; margin: 0 0 10px; }
.pb-gate .pb-row { justify-content: center; }

/* Barre du haut */
.pb-app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.pb-top { height: var(--top); flex: 0 0 var(--top); background: var(--ink); color: #fff; display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.pb-brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; font-size: 19px; margin-right: auto; }
.pb-brand small { font-size: 10px; font-weight: 700; background: var(--ye); color: var(--ink); padding: 2px 8px; border-radius: 99px; }
.pb-timer { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .09); padding: 6px 12px; border-radius: 99px; font-size: 13px; }
.pb-timer b { font-variant-numeric: tabular-nums; color: var(--ye); font-size: 15px; }
.pb-timer.is-off { color: #CFC8E6; }
.pb-mode { display: flex; gap: 3px; background: rgba(255, 255, 255, .09); padding: 3px; border-radius: 99px; }
.pb-mode button { border: 0; background: none; color: #CFC8E6; padding: 5px 10px; border-radius: 99px; font-size: 12px; }
.pb-mode button.is-on { background: var(--te); color: #fff; }
.pb-rt { width: 10px; height: 10px; border-radius: 50%; background: #E5484D; flex: 0 0 auto; }
.pb-rt.is-on { background: #3DD68C; }
.pb-me { border: 0; background: none; padding: 0; }
.pb-av { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.pb-top .pb-av { border-color: #fff; }
.pb-av--s { width: 28px; height: 28px; font-size: 12px; } .pb-av--l { width: 64px; height: 64px; font-size: 26px; }
.pb-show-s { display: none; }

/* Mise en page */
.pb-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr) 380px; }
.pb-side { background: #fff; border-right: 1px solid var(--li); padding: 14px; overflow-y: auto; }
.pb-center { overflow-y: auto; padding: 22px 24px; min-width: 0; }
.pb-chat { background: #fff; border-left: 1px solid var(--li); display: flex; flex-direction: column; min-height: 0; }
.pb-nav { display: none; }

/* Colonne gauche */
.pb-side h4 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mu); margin: 16px 4px 6px; }
.pb-side h4:first-child { margin-top: 2px; }
.pb-lg { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; font-weight: 600; font-size: 14px; border: 0; background: none; text-align: left; line-height: 1.2; }
.pb-lg:hover { background: var(--cr); }
.pb-lg.is-on { background: var(--v); color: #fff; }
.pb-lg.is-on em { color: #E3D8FF; }
.pb-lg.is-lock { opacity: .5; }
.pb-lg i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--ink); font-style: normal; flex: 0 0 auto; }
.pb-lg > span:not(.pb-av) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pb-lg em { font-style: normal; font-size: 11px; color: var(--mu); font-weight: 500; white-space: nowrap; }
.pb-badge { background: var(--co); color: #fff !important; border-radius: 99px; padding: 1px 7px; font-weight: 700 !important; }
.pb-req { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 8px; align-items: center; padding: 8px; border-radius: 14px; background: var(--cr); margin-bottom: 6px; font-size: 13px; }
.pb-req > span:not(.pb-av) { font-weight: 600; grid-column: 2 / 4; }
.pb-req .pb-btn:first-of-type { grid-column: 1 / 3; }
.pb-side__foot { margin-top: 20px; font-size: 12px; color: var(--mu); }
.pb-side__foot a { color: var(--mu); }

/* Accueil */
.pb-welcome { background: var(--v); color: #fff; border-radius: 26px; padding: 26px; margin-bottom: 20px; }
.pb-welcome h1 { font-size: clamp(22px, 3vw, 32px); line-height: 1.1; margin: 0 0 6px; font-weight: 800; letter-spacing: -.02em; }
.pb-welcome h1 span { color: var(--ye); }
.pb-welcome p { margin: 0 0 6px; opacity: .92; }
.pb-bigtimer { font-size: clamp(32px, 5vw, 46px); font-weight: 800; color: var(--ye); font-variant-numeric: tabular-nums; margin: 6px 0; }
.pb-home h2 { font-size: 20px; margin: 4px 0 12px; }
.pb-lounges { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.pb-lc { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.pb-lc i { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; border: 2.5px solid var(--ink); font-style: normal; margin-bottom: 10px; }
.pb-lc h3 { margin: 0; font-size: 16px; } .pb-lc p { margin: 4px 0 14px; color: var(--mu); font-size: 13px; flex: 1; }
.pb-lc.is-lock { opacity: .6; }
.pb-live { position: absolute; right: 14px; top: 16px; font-size: 11px; font-weight: 600; color: #127A74; background: #E6F7F6; padding: 3px 9px; border-radius: 99px; }
.pb-rules { display: flex; gap: 14px; align-items: center; } .pb-rules > span { font-size: 28px; } .pb-rules p { margin: 2px 0 0; color: var(--mu); font-size: 13px; }
.pb-hero { max-width: 640px; } .pb-hero h1 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 10px; }

/* Formulaires */
.pb-form { display: grid; gap: 10px; }
.pb-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.pb-form input:not([type=checkbox]):not([type=radio]), .pb-form select, .pb-form textarea { width: 100%; border: 1.5px solid var(--li); border-radius: 12px; padding: 10px 12px; font: inherit; font-weight: 400; background: #fff; color: var(--ink); }
.pb-form input:focus, .pb-form select:focus, .pb-form textarea:focus { border-color: var(--v); outline: none; }
.pb-check { display: flex !important; grid-template-columns: none; gap: 8px; align-items: flex-start; font-weight: 400 !important; }
.pb-check input { margin-top: 3px; accent-color: var(--v); }
.pb-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pb-colors { display: flex; gap: 10px; }
.pb-colors button { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--li); }
.pb-colors button.is-on { box-shadow: 0 0 0 3px var(--ink); }
.pb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-chip { padding: 6px 12px; border-radius: 99px; border: 1.5px solid var(--li); font-size: 13px; font-weight: 600; background: #fff; }
.pb-chip.is-on { background: var(--v); border-color: var(--v); color: #fff; }
.pb-onb { max-width: 620px; } .pb-onb h1 { font-size: 26px; margin: 0 0 4px; } .pb-onb .pb-btn--lg { margin-top: 14px; }
.pb-quote { margin: 0; padding: 8px 12px; border-left: 4px solid var(--co); background: var(--cr); border-radius: 8px; font-size: 13px; }
.pb-reasons { display: grid; gap: 4px; }

/* Salle */
.pb-room__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pb-room__head h1 { margin: 0; font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; letter-spacing: -.02em; }
.pb-room__count { margin: 2px 0 0; color: var(--mu); font-size: 13px; }
.pb-floor { position: relative; border-radius: 26px; background: var(--cr2); border: 2px solid var(--li); overflow: hidden; background-image: radial-gradient(#E8D3AE 2px, transparent 2.4px); background-size: 26px 26px; }
.pb-counter { width: 100%; border: 0; background: var(--ink); color: #fff; padding: 16px; font-weight: 700; letter-spacing: .06em; font-size: 13px; }
.pb-counter span { color: var(--ye); }
.pb-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px 10px; padding: 26px 16px 22px; }
.pb-table { position: relative; border: 0; background: none; padding: 22px 18px; display: grid; place-items: center; }
.pb-table:disabled { opacity: .4; }
.pb-table__ring { position: relative; width: 118px; height: 118px; display: block; }
.pb-table__disc { position: absolute; inset: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); display: grid; place-content: center; text-align: center; padding: 6px; line-height: 1.15; transition: transform .15s; }
.pb-table:hover .pb-table__disc { transform: scale(1.05); }
.pb-table__disc b { font-size: 12px; overflow-wrap: anywhere; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pb-table__disc small { font-size: 10.5px; color: var(--mu); }
.pb-table.is-mine .pb-table__disc { background: var(--ye); }
.pb-table.is-priv .pb-table__disc { background: #EDE4FF; }
.pb-table.is-invited .pb-table__disc { background: #E6F7F6; border-style: dashed; }
.pb-seat { position: absolute; width: 34px; height: 34px; z-index: 1; }
.pb-seat .pb-av { width: 34px; height: 34px; }
.pb-seat--free { border: 2px dashed #C9B48F; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.pb-callbadge { position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: #E5484D; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; z-index: 2; }
.pb-empty { padding: 40px 20px; text-align: center; color: var(--mu); }
.pb-legend { font-size: 12px; color: var(--mu); margin: 10px 2px 0; }

/* Discussion */
.pb-chat__head { padding: 12px 14px; border-bottom: 1px solid var(--li); display: flex; gap: 10px; align-items: center; }
.pb-chat__head > div { min-width: 0; flex: 1; }
.pb-chat__head b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-chat__head small { display: block; color: var(--mu); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-chat__ico { width: 36px; height: 36px; border-radius: 50%; background: var(--cr); display: grid; place-items: center; flex: 0 0 auto; }
.pb-chat__acts { display: flex; gap: 6px; }
.pb-chat__empty { flex: 1; display: grid; place-content: center; text-align: center; color: var(--mu); padding: 30px; }
.pb-chat__empty span { font-size: 40px; }
.pb-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.pb-msgs > * { flex-shrink: 0; }
.pb-m { display: flex; gap: 6px; align-items: flex-end; max-width: 100%; }
.pb-m.is-mine { justify-content: flex-end; }
.pb-m__av { border: 0; background: none; padding: 0; }
.pb-bub { background: var(--cr); padding: 7px 11px 5px; border-radius: 16px 16px 16px 4px; max-width: min(82%, 300px); font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.pb-bub b { display: block; font-size: 11px; color: var(--v); white-space: normal; }
.pb-bub time { display: block; font-size: 10px; color: var(--mu); text-align: right; margin-top: 2px; }
.pb-m.is-mine .pb-bub { background: var(--v); color: #fff; border-radius: 16px 16px 4px 16px; }
.pb-m.is-mine .pb-bub time { color: #D9CCFF; }
.pb-bub__txt.is-del { font-style: italic; opacity: .6; }
.pb-m__more { border: 0; background: none; color: var(--mu); padding: 4px; font-size: 16px; opacity: .5; }
.pb-m:hover .pb-m__more, .pb-m__more:focus { opacity: 1; }
.pb-sys { align-self: center; font-size: 12px; background: #E6F7F6; color: #127A74; padding: 5px 12px; border-radius: 99px; text-align: center; }
.pb-sys--warn { background: #FFF3D3; color: #7A5600; border-radius: 12px; }
.pb-comp { border-top: 1px solid var(--li); padding: 10px; display: flex; gap: 8px; align-items: flex-end; }
.pb-comp textarea { flex: 1; min-width: 0; border: 1.5px solid var(--li); border-radius: 20px; padding: 10px 14px; font: inherit; background: var(--cr); resize: none; max-height: 120px; }
.pb-comp textarea:focus { outline: none; border-color: var(--v); background: #fff; }
.pb-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--v); color: #fff; font-size: 17px; flex: 0 0 auto; }
.pb-send:disabled { background: var(--li); }
.pb-chat__rules { margin: 0; padding: 0 14px 10px; font-size: 11px; color: var(--mu); }

/* Appel vidéo */
.pb-call { background: var(--ink); color: #fff; padding: 10px 12px 8px; flex: 0 0 auto; }
.pb-call__head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; }
.pb-vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 42vh; overflow-y: auto; }
.pb-vt { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.pb-vt video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; background: #000; }
.pb-vt.has-cam video { opacity: 1; }
.pb-vt__init { font-size: 28px; font-weight: 800; }
.pb-vt__name, .pb-vt__mic { position: absolute; font-size: 11px; background: rgba(0, 0, 0, .5); color: #fff; padding: 1px 8px; border-radius: 99px; z-index: 1; }
.pb-vt__name { left: 6px; bottom: 6px; } .pb-vt__mic { right: 6px; top: 6px; }
.pb-ctrl { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.pb-ctrl button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); font-size: 16px; }
.pb-ctrl button.is-on { background: var(--te); }
.pb-ctrl .pb-ctrl__end { width: auto; padding: 0 14px; border-radius: 99px; background: #E5484D; color: #fff; font-size: 13px; font-weight: 700; }
.pb-call__note { margin: 6px 0 0; font-size: 10.5px; text-align: center; color: #B9AEE0; }

/* Fenêtres, profils, notifications */
.pb-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(30, 22, 54, .55); display: grid; place-items: center; padding: 16px; }
.pb-modal__box { background: #fff; border-radius: 22px; width: min(520px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 30px 60px rgba(0, 0, 0, .3); }
.pb-modal__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--li); }
.pb-modal__head h2 { margin: 0; font-size: 18px; }
.pb-modal__body { padding: 16px 18px; overflow-y: auto; }
.pb-modal__foot { padding: 12px 18px; border-top: 1px solid var(--li); display: flex; justify-content: flex-end; gap: 8px; }
.pb-profile { text-align: center; display: grid; gap: 10px; justify-items: center; }
.pb-profile .pb-row { justify-content: center; }
.pb-members { display: grid; gap: 6px; margin-top: 12px; }
.pb-member { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--li); background: #fff; border-radius: 14px; padding: 8px 10px; }
.pb-member span { flex: 1; min-width: 0; } .pb-member b { display: block; } .pb-member small { color: var(--mu); }
.pb-member em { font-style: normal; font-size: 11px; color: var(--mu); }
.pb-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1100; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.pb-toast { display: flex; gap: 10px; align-items: center; background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 10px 10px 10px 14px; box-shadow: 6px 6px 0 var(--ye); animation: pbin .2s ease-out; }
.pb-toast__txt { flex: 1; min-width: 0; font-size: 13px; } .pb-toast__txt b { display: block; } .pb-toast__txt span { color: var(--mu); }
@keyframes pbin { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Tablette et mobile : un panneau à la fois + barre d'onglets ---------- */
@media (max-width: 1099px) {
	:root { --nav: 60px; }
	.pb-main { grid-template-columns: minmax(0, 1fr); }
	.pb-main > * { display: none; border: 0; }
	.pb-main[data-tab="side"] .pb-side, .pb-main[data-tab="center"] .pb-center { display: block; }
	.pb-main[data-tab="chat"] .pb-chat { display: flex; }
	.pb-nav { display: grid; grid-template-columns: repeat(3, 1fr); height: calc(var(--nav) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--li); flex: 0 0 auto; }
	.pb-nav button { border: 0; background: none; display: grid; place-content: center; justify-items: center; font-size: 11px; font-weight: 600; color: var(--mu); }
	.pb-nav button span { font-size: 19px; line-height: 1.1; }
	.pb-nav button.is-on { color: var(--v); }
	.pb-toasts { bottom: calc(var(--nav) + 12px); }
}
@media (max-width: 640px) {
	:root { --top: 54px; }
	.pb-top { gap: 8px; padding: 0 10px; }
	.pb-brand { font-size: 16px; } .pb-brand__mark, .pb-brand small, .pb-rt { display: none; }
	.pb-timer { padding: 5px 9px; }
	.pb-table__disc { inset: 14px; } .pb-table__disc b { font-size: 10.5px; }
	.pb-hide-s { display: none; } .pb-show-s { display: inline; }
	.pb-mode button { padding: 4px 8px; }
	.pb-center { padding: 14px 12px; }
	.pb-tables { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px 4px; gap: 10px 0; }
	.pb-table { padding: 18px 6px; }
	.pb-table__ring { width: 104px; height: 104px; }
	.pb-seat, .pb-seat .pb-av { width: 30px; height: 30px; font-size: 12px; }
	.pb-grid2 { grid-template-columns: 1fr; }
	.pb-welcome { padding: 20px; border-radius: 20px; }
	.pb-modal { align-items: end; padding: 0; }
	.pb-modal__box { border-radius: 22px 22px 0 0; max-height: 88vh; }
	.pb-vgrid { max-height: 34vh; }
}
@media (prefers-reduced-motion: reduce) { .pb-body * { animation: none !important; transition: none !important; } }
