/* ===== Base ===== */
.membre-body{
	min-height: 100%;
}
.app-body{
	height: 100%;
	height: 100dvh;
	max-height: 100dvh;
	overflow: hidden;
}
.app-body #app,
.app{
	height: 100%;
	max-height: 100%;
	min-height: 0;
	overflow: hidden;
}

/* ===== Login ===== */
.login-wrap{
	min-height: 100%;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 20px;
	padding: 28px 16px 40px;
}
.login-card{
	width: min(440px, 100%);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
	backdrop-filter: blur(14px);
	box-shadow: var(--shadow);
	padding: 24px 20px;
}
.login-info{
	width: min(440px, 100%);
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.login-info-section h2{
	margin: 0 0 8px;
	font-size: .78rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted, rgba(255,255,255,.65));
	font-weight: 800;
}
.login-info-section p{
	margin: 0 0 8px;
	line-height: 1.45;
	font-size: .9rem;
	color: rgba(255,255,255,.82);
}
.login-info-section p:last-child{ margin-bottom: 0; }
.login-info-section .info-list{
	margin-bottom: 8px;
	color: rgba(255,255,255,.82);
}
.login-kicker{
	margin: 0 0 6px;
	letter-spacing: .12em;
	text-transform: uppercase;
	font-size: .75rem;
	color: var(--accent);
	font-weight: 800;
}
.login-card h1{
	margin: 0 0 8px;
	font-size: 1.65rem;
}
.stack{
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 16px;
}
.stack label{
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-weight: 700;
	font-size: .9rem;
}
input, textarea, select, button{
	font: inherit;
	color: var(--text);
}
input:not([type]),
input[type="text"],
input[type="password"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="number"],
textarea,
select{
	background: rgba(0,0,0,.28);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 12px 14px;
	width: 100%;
	color: var(--text);
	box-sizing: border-box;
	min-height: 44px;
	max-height: none;
}
textarea{ resize: vertical; min-height: 72px; }
.btn{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1px solid rgba(167,243,255,.42);
	background: rgba(167,243,255,.12);
	color: var(--text);
	font-weight: 800;
	border-radius: 999px;
	padding: 11px 16px;
	cursor: pointer;
	text-decoration: none;
	min-height: 44px;
}
.btn:hover{ text-decoration: none; background: rgba(247,179,255,.12); border-color: rgba(247,179,255,.42); }
.btn-ghost{
	background: transparent;
	border-color: var(--border);
}
.btn-danger{
	border-color: rgba(255,120,120,.5);
	background: rgba(255,80,80,.12);
}
.btn-small{ padding: 8px 12px; font-size: .85rem; font-weight: 700; min-height: 40px; }
.btn-icon{
	width: 44px;
	min-width: 44px;
	padding: 0;
	border-radius: 12px;
}
.form-error{ color: #fecaca; font-weight: 700; margin: 8px 0 0; }
.login-or{
	text-align: center;
	color: var(--muted2);
	margin: 16px 0 10px;
}
#scan-box{ margin-top: 12px; }
#scan-video{
	width: 100%;
	border-radius: 12px;
	background: #000;
}
.creds-box{
	white-space: pre-wrap;
	background: rgba(0,0,0,.35);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 12px;
	font-size: .85rem;
	color: var(--text);
	user-select: text;
	-webkit-user-select: text;
	overflow: auto;
	max-height: 40vh;
	margin: 0;
	line-height: 1.45;
}
.identity-fallback-card h2{ margin: 0; }
.identity-fallback-card .row-actions{ margin-top: 4px; }
.copy-status{
	margin: 0;
	font-size: .85rem;
	color: var(--accent);
	font-weight: 600;
}

/* ===== App shell — mobile first ===== */
.app{
	display: flex;
	flex-direction: column;
	background: rgba(7,10,18,.72);
}
.app-shell{
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	/* pas de max-height: 100% : avec un bandeau install/push, ça déborde et coupe .app-user */
	overflow: hidden;
}

/* Full-screen panes on mobile */
.app-sidebar,
.app-main{
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: 100%;
	overflow: hidden;
	background: var(--bg0, #070a12);
}
.app-sidebar{
	z-index: 1;
	transform: translateX(0);
}
.app-main{
	z-index: 2;
	transform: translateX(100%);
}
.app[data-pane="list"] .app-sidebar{ transform: translateX(0); }
.app[data-pane="list"] .app-main{
	transform: translateX(100%);
	pointer-events: none;
}
.app[data-pane="detail"] .app-sidebar{ transform: translateX(0); }
.app[data-pane="detail"] .app-main{
	transform: translateX(0);
	pointer-events: auto;
}
.app.app-animating .app-sidebar,
.app.app-animating .app-main{
	transition: transform .22s ease;
}

/* ===== Sidebar / list ===== */
.app-brand{
	padding: 14px 16px 10px;
	border-bottom: 1px solid var(--border);
	flex: 0 0 auto;
	position: sticky;
	top: 0;
	z-index: 2;
	background: inherit;
}
.app-brand h1{
	margin: 0;
	font-size: 1.1rem;
}
.app-brand .mutedLine{
	margin: 4px 0 0;
	font-size: .85rem;
}
.nav-list{
	overflow: auto;
	overscroll-behavior: contain;
	flex: 1 1 auto;
	min-height: 0;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	-webkit-overflow-scrolling: touch;
}
.nav-section{
	font-size: .68rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted2);
	padding: 14px 12px 6px;
	font-weight: 800;
}
.nav-section-row{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-right: 4px;
}
.nav-section-label{
	min-width: 0;
}
.btn-nav-action{
	flex: 0 0 auto;
	margin: 0;
	padding: 4px 8px;
	border-radius: 999px;
	border: 1px solid rgba(255,255,255,.16);
	background: rgba(255,255,255,.05);
	color: var(--muted);
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .01em;
	text-transform: none;
	cursor: pointer;
	line-height: 1.2;
	white-space: nowrap;
}
.btn-nav-action:hover{
	color: var(--text);
	border-color: rgba(167,243,255,.35);
	background: rgba(167,243,255,.1);
}
.btn-nav-action.is-active{
	color: var(--text);
	border-color: rgba(167,243,255,.42);
	background: rgba(167,243,255,.14);
}
.nav-empty{
	padding: 4px 12px 8px;
	margin: 0;
	font-size: .85rem;
}
.nav-item{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 12px;
	border-radius: 14px;
	cursor: pointer;
	border: 1px solid transparent;
	background: transparent;
	text-align: left;
	width: 100%;
	min-height: 48px;
}
.nav-item:hover{ background: rgba(255,255,255,.06); }
.nav-item.is-active{
	border-color: rgba(167,243,255,.35);
	background: rgba(167,243,255,.1);
}
.nav-item-label{
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.nav-item-title{
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.nav-item .meta{
	color: var(--muted2);
	font-size: .75rem;
	font-weight: 500;
}
.badge-unread{
	min-width: 22px;
	height: 22px;
	border-radius: 999px;
	background: var(--accent2);
	color: #1a0a1e;
	font-size: .72rem;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 7px;
	flex: 0 0 auto;
}
.app-user{
	padding: 10px 12px;
	padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--border);
	flex: 0 0 auto;
	position: relative;
	z-index: 3;
	background: inherit;
}
.account-menu{
	position: relative;
}
.account-menu-toggle{
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: rgba(255,255,255,.04);
	color: var(--text);
	font: inherit;
	font-weight: 650;
	cursor: pointer;
	text-align: left;
}
.account-menu-name{
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.account-menu-caret{
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--muted);
	border-bottom: 2px solid var(--muted);
	transform: rotate(45deg);
	margin-top: -4px;
	transition: transform .18s ease;
}
.account-menu.is-open .account-menu-caret{
	transform: rotate(-135deg);
	margin-top: 4px;
}
.account-menu-panel{
	position: fixed;
	display: none;
	flex-direction: column;
	gap: 2px;
	padding: 6px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: #101526;
	box-shadow: 0 8px 28px rgba(0,0,0,.4);
	z-index: 30;
	max-height: min(60vh, 360px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.account-menu.is-open .account-menu-panel{
	display: flex;
}
.account-menu-panel[hidden]{
	display: none !important;
}
.account-menu-item{
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 42px;
	padding: 8px 12px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--text);
	font: inherit;
	font-weight: 600;
	font-size: .9rem;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}
.account-menu-item:hover{
	background: rgba(255,255,255,.06);
	text-decoration: none;
}
.account-info-card h2{ margin: 0; }
.account-info-card p{ margin: 0 0 8px; line-height: 1.4; font-size: .92rem; }
.info-list{
	margin: 0 0 8px;
	padding-left: 1.15rem;
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: .9rem;
}

/* ===== Main / detail ===== */
.app-topbar{
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-bottom: 1px solid var(--border);
	flex: 0 0 auto;
	min-height: 52px;
	position: sticky;
	top: 0;
	z-index: 2;
	background: var(--bg0, #070a12);
}
.app-topbar-rich,
.app-topbar-chat{
	align-items: flex-start;
	flex-wrap: wrap;
	row-gap: 6px;
	padding-top: 10px;
	padding-bottom: 10px;
}
.app-topbar-heading{
	flex: 1 1 160px;
	min-width: 0;
}
.app-topbar-title{
	flex: 1;
	min-width: 0;
	font-weight: 800;
	font-size: 1rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.app-topbar-heading .app-topbar-title{
	flex: none;
	width: 100%;
	white-space: normal;
}
.app-topbar-sub{
	margin: 2px 0 0;
	font-size: .82rem;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	white-space: normal;
}
.app-topbar-tools{
	flex: 0 0 auto;
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
}
.app-topbar-rich .app-back,
.app-topbar-chat .app-back{
	margin-top: 2px;
}
.app-back.has-unread{
	color: #1a0a1e;
	background: var(--accent2);
	border-color: transparent;
	box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}
.app-topbar-extra{
	flex: 1 0 100%;
	min-width: 0;
}
.app-topbar-filters{
	margin: 0;
	width: 100%;
}
.mute-label{
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: .78rem;
	color: var(--muted);
	font-weight: 600;
	cursor: pointer;
	user-select: none;
}
.mute-label input{ margin: 0; }
.app-main-body{
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.chat-header, .panel-header{
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	flex: 0 0 auto;
}
.panel-header{
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
}
.panel-header-stack{
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
}
.panel-header-row{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.panel-header:has(.panel-lead){
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
}
.status-filters{
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.status-filter{
	appearance: none;
	border: 1px solid var(--border);
	background: transparent;
	color: var(--muted);
	border-radius: 10px;
	padding: 8px 12px;
	min-height: 40px;
	font-weight: 650;
	font-size: .82rem;
	cursor: pointer;
}
.status-filter.is-active{
	color: var(--text);
	border-color: rgba(167,243,255,.42);
	background: rgba(167,243,255,.1);
}
.status-filter-count{
	opacity: .75;
	font-weight: 700;
}
.empty-filter{
	color: var(--muted);
	text-align: center;
	padding: 28px 12px !important;
}
.printer-picker-card h2{ margin: 0; }
.printer-picker-card select{
	width: 100%;
}
.printer-status{
	margin: 0;
	font-size: .88rem;
	font-weight: 650;
}
.printer-status.is-online{ color: #8dffb0; }
.printer-status.is-offline{ color: #ffb4b4; }
.printer-status.is-unknown{ color: var(--muted); }
.member-groups-card{
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.member-groups-card h2{ margin: 0; }
.member-groups-card .mutedLine{ margin: 0; }
.member-groups-card .check-list-groups{
	max-height: min(42vh, 340px);
	margin: 0;
	padding: 4px 0;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}
.check-row{
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 6px 4px;
	font-weight: 600;
	font-size: .92rem;
	cursor: pointer;
}
.check-row input[type="checkbox"]{
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: #7fd7e6;
}
.check-row-label{
	flex: 1;
	min-width: 0;
	line-height: 1.3;
	color: var(--text);
}
.chat-header h2, .panel-header h2{
	margin: 0;
	font-size: 1.05rem;
}
.chat-header p{ margin: 4px 0 0; }
.chat-tools{
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.chat-tools label{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: .85rem;
	color: var(--muted);
}
.messages{
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: contain;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	-webkit-overflow-scrolling: touch;
}
.messages-load-older{
	align-self: stretch;
	flex: 0 0 auto;
	text-align: center;
	font-size: .78rem;
	color: var(--muted2);
	padding: 6px 8px 2px;
	min-height: 8px;
}
.msg{
	max-width: min(640px, 92%);
	border: 1px solid var(--border);
	background: rgba(255,255,255,.05);
	border-radius: 16px;
	padding: 10px 12px;
}
.msg.is-mine{
	align-self: flex-end;
	background: rgba(167,243,255,.1);
}
.msg.is-deleted{
	background: transparent;
	border-style: dashed;
	border-color: rgba(255,255,255,.14);
	opacity: .78;
	max-width: min(360px, 80%);
}
.msg.is-deleted.is-mine{
	background: transparent;
}
.msg-deleted-body{
	font-size: .88rem;
	font-style: italic;
	color: var(--muted);
}
.msg-author-row{
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
	min-width: 0;
}
.msg-author{
	font-weight: 800;
	font-size: .85rem;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.avatar{
	flex: 0 0 auto;
	object-fit: cover;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: rgba(255,255,255,.08);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	font-weight: 800;
	line-height: 1;
	overflow: hidden;
}
.avatar-sm{
	width: 24px;
	height: 24px;
	font-size: .68rem;
}
.avatar-lg{
	width: 48px;
	height: 48px;
	font-size: 1rem;
}
.avatar.is-empty{
	background: rgba(167,243,255,.12);
	color: var(--accent, #a7f3ff);
}
.member-row-main{
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1;
}
.member-row-text{
	min-width: 0;
}
.member-row-text b{
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.msg-body{ white-space: pre-wrap; word-break: break-word; color: var(--text); }
.msg-body a{ color: var(--accent); }
.msg-photo{
	max-width: 100%;
	border-radius: 10px;
	margin-top: 6px;
	cursor: zoom-in;
	display: block;
}
.name-badges{
	display: inline;
	margin-left: .2em;
	white-space: nowrap;
}
.name-badge{
	display: inline;
	font-style: normal;
	font-weight: 400;
}
.group-emoji{
	font-style: normal;
	font-weight: 400;
}
.msg.is-interactive{
	cursor: pointer;
}
.msg.is-interactive:focus-visible{
	outline: 2px solid rgba(167,243,255,.55);
	outline-offset: 2px;
}
.msg.is-target{
	animation: msg-target-flash 2.2s ease;
	border-color: rgba(167,243,255,.72);
	box-shadow: 0 0 0 2px rgba(167,243,255,.28);
}
@keyframes msg-target-flash{
	0%, 100%{ background: rgba(255,255,255,.05); }
	20%, 55%{ background: rgba(167,243,255,.22); }
}
.msg.is-mine.is-target{
	animation-name: msg-target-flash-mine;
}
@keyframes msg-target-flash-mine{
	0%, 100%{ background: rgba(167,243,255,.1); }
	20%, 55%{ background: rgba(167,243,255,.28); }
}
.msg-receipt{
	font-weight: 650;
	color: var(--muted);
}
.msg-receipt-strong{
	margin: 0;
	font-weight: 750;
	font-size: .95rem;
}
.receipt-list{
	margin: 0;
	padding-left: 1.1rem;
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: .9rem;
}
.receipt-list .mutedLine{ font-size: .78rem; }
.message-details-card h2{ margin: 0; }
.msg-meta{
	margin-top: 6px;
	font-size: .72rem;
	color: var(--muted2);
	display: flex;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}
.composer{
	border-top: 1px solid var(--border);
	padding: 10px;
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 8px;
	align-items: end;
	flex: 0 0 auto;
	position: sticky;
	bottom: 0;
	z-index: 2;
	background: rgba(7,10,18,.95);
}
.composer-readonly{
	display: block;
	padding: 14px 16px;
}
.composer-readonly p{
	margin: 0 0 6px;
	font-size: .9rem;
	line-height: 1.4;
	color: var(--text);
}
.composer-readonly p:last-child{ margin-bottom: 0; }
.composer textarea{
	grid-column: 1 / -1;
	min-height: 48px;
	max-height: 140px;
}
.panel{
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: contain;
	padding: 12px;
	-webkit-overflow-scrolling: touch;
}
.panel-lead{
	margin: 6px 0 0;
	font-size: .82rem;
	color: var(--muted);
	font-weight: 500;
	line-height: 1.35;
}
.card{
	border: 1px solid var(--border);
	border-radius: var(--radiusSm);
	background: rgba(255,255,255,.04);
	padding: 14px;
	margin-bottom: 12px;
}
.card h3{ margin: 0 0 8px; }
.fold-list{
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
}
.fold{
	border: 1px solid var(--border);
	border-radius: var(--radiusSm);
	background: rgba(255,255,255,.04);
	overflow: hidden;
}
.fold + .fold-list{ margin-top: 10px; }
.fold-summary{
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 14px 14px 12px;
	cursor: pointer;
	list-style: none;
	user-select: none;
	min-height: 48px;
}
.fold-summary::-webkit-details-marker{ display: none; }
.fold-summary::marker{ content: ''; }
.fold-summary::before{
	content: '';
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	margin-top: 6px;
	border-right: 2px solid var(--muted);
	border-bottom: 2px solid var(--muted);
	transform: rotate(-45deg);
	transition: transform .18s ease;
}
.fold[open] > .fold-summary::before{
	transform: rotate(45deg);
	margin-top: 4px;
}
.fold-title{
	flex: 1;
	min-width: 0;
	font-weight: 650;
	font-size: .95rem;
	line-height: 1.3;
}
.fold-meta{
	flex: 0 1 42%;
	text-align: right;
	font-size: .78rem;
	color: var(--muted);
	line-height: 1.35;
	font-weight: 500;
}
.fold-badge{
	display: inline-block;
	margin-left: 6px;
	padding: 2px 7px;
	border-radius: 999px;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .02em;
	vertical-align: middle;
	color: #d8e4ff;
	background: rgba(120,150,255,.18);
	border: 1px solid rgba(140,170,255,.28);
}
.fold-body{
	padding: 0 14px 14px;
	border-top: 1px solid var(--border);
}
.fold-section{
	padding-top: 12px;
}
.fold-section + .fold-section{
	margin-top: 4px;
	padding-top: 14px;
	border-top: 1px solid rgba(255,255,255,.06);
}
.fold-section h4{
	margin: 0 0 8px;
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--muted);
	font-weight: 700;
}
.field{
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: .82rem;
	color: var(--muted);
	font-weight: 600;
}
.field input,
.field textarea{
	font-weight: 500;
	color: var(--text);
}
.row-form{
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-top: 0;
}
.row-form input{
	flex: 1 1 180px;
	width: auto;
	min-width: 0;
	min-height: 44px;
	height: 44px;
}
.row-actions{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.table-scroll{ overflow: auto; -webkit-overflow-scrolling: touch; }
table.data{
	width: 100%;
	border-collapse: collapse;
	font-size: .85rem;
}
table.data th, table.data td{
	text-align: left;
	padding: 10px 8px;
	border-bottom: 1px solid var(--border);
	vertical-align: middle;
}
.member-row{
	display: flex;
	justify-content: space-between;
	gap: 10px;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid var(--border);
}
.identity-list{
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
}
.identity-row{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	text-align: left;
	padding: 12px 12px;
	border-radius: 14px;
	border: 1px solid var(--border);
	background: rgba(255,255,255,.04);
	color: inherit;
	cursor: pointer;
}
.identity-row .avatar{
	margin-right: 2px;
}
.identity-row:hover{
	background: rgba(167,243,255,.08);
	border-color: rgba(167,243,255,.28);
}
.identity-row-main{
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	flex: 1;
}
.identity-row-name{
	font-weight: 800;
	font-size: .98rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.identity-member-id{
	font-weight: 650;
	font-size: .82rem;
	margin-left: .25em;
}
.identity-row-meta,
.identity-row-groups{
	font-size: .78rem;
	color: var(--muted2);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.identity-row-sep{ margin: 0 4px; opacity: .6; }
.identity-push-icon{
	display: inline-flex;
	align-items: center;
	margin-left: 5px;
	margin-right: 4px;
	vertical-align: -2px;
	line-height: 1;
}
.identity-push-icon.is-on{ color: #6ee7b7; }
.identity-push-icon.is-off{ color: var(--muted2); opacity: .75; }
.identity-status{
	font-weight: 700;
	color: var(--muted);
}
.identity-status-active{ color: #6ee7b7; }
.identity-status-blocked{ color: #f87171; }
.identity-status-replaced{ color: var(--muted2); }
.identity-row-chevron{
	flex: 0 0 auto;
	font-size: 1.25rem;
	color: var(--muted2);
	line-height: 1;
}
.identity-details-card .identity-login{
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .92em;
	font-weight: 600;
	letter-spacing: .02em;
}
.identity-actions{
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.identity-actions .btn{
	width: 100%;
	justify-content: center;
}
@media (min-width: 640px){
	.identity-actions{
		flex-direction: row;
		flex-wrap: wrap;
	}
	.identity-actions .btn{
		width: auto;
	}
}
.check-list{
	display: flex;
	flex-direction: column;
	gap: 2px;
	max-height: 280px;
	overflow: auto;
	margin: 8px 0;
}
.check-list > label,
.check-list label{
	font-weight: 500;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
	min-height: 40px;
}
.locked-channel{
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px 20px;
	color: var(--muted);
	text-align: center;
}
.app-loading{
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--muted);
}
.overlay{
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.55);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	z-index: 40;
	padding: 0;
}
.photo-viewer{
	position: fixed;
	inset: 0;
	z-index: 70;
	background: rgba(0,0,0,.96);
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: none;
	overscroll-behavior: none;
}
body.photo-viewer-open{
	overflow: hidden;
}
.photo-viewer-close{
	position: absolute;
	top: max(10px, env(safe-area-inset-top, 0px));
	right: max(10px, env(safe-area-inset-right, 0px));
	z-index: 2;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 999px;
	background: rgba(255,255,255,.12);
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}
.photo-viewer-close:hover{
	background: rgba(255,255,255,.2);
}
.photo-viewer-stage{
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	cursor: zoom-in;
}
.photo-viewer-stage.is-zoomed{
	cursor: grab;
}
.photo-viewer-stage.is-zoomed:active{
	cursor: grabbing;
}
.photo-viewer-img{
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	transform-origin: center center;
	user-select: none;
	-webkit-user-drag: none;
	will-change: transform;
	pointer-events: none;
}
.overlay-card{
	width: 100%;
	max-width: 480px;
	background: #101526;
	border: 1px solid var(--border);
	border-radius: 18px 18px 0 0;
	padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
}
.install-banner{
	flex: 0 0 auto;
	z-index: 5;
	padding: 10px 12px;
	background: rgba(12, 16, 30, .96);
	border-bottom: 1px solid rgba(167,243,255,.28);
}
.install-banner-row{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}
.install-banner-text{
	margin: 0;
	font-size: .88rem;
	color: var(--muted);
	flex: 1;
	min-width: 160px;
}
.install-banner-text b{ color: var(--text); }
.install-banner-actions{
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.install-howto{
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid rgba(255,255,255,.08);
	font-size: .88rem;
	color: var(--muted);
}
.install-howto p{ margin: 6px 0; }
.install-howto ol{ margin: 6px 0 0; padding-left: 18px; }
.ws-dot{
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fbbf24;
	display: inline-block;
	margin-left: 4px;
	vertical-align: middle;
}
.ws-dot.on{ background: #6ee7b7; }
.ws-dot.off{ background: #f87171; }
.label-print{
	width: 89mm;
	height: 36mm;
	background: #fff;
	color: #111;
	display: flex;
	gap: 3.5mm;
	padding: 2mm 2.5mm;
	box-sizing: border-box;
	font-family: Helvetica, Arial, sans-serif;
	overflow: hidden;
}
.label-print .qr{
	width: 30mm;
	height: 30mm;
	flex: 0 0 30mm;
	align-self: center;
}
.label-print .qr canvas,
.label-print .qr img{
	width: 100% !important;
	height: 100% !important;
}
.label-print .txt{
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 0.6mm;
	font-size: 11px;
	line-height: 1.15;
	overflow: hidden;
}
.label-print .label-url{
	font-weight: 700;
	font-size: 10.5px;
	line-height: 1.2;
	word-break: break-word;
	overflow-wrap: anywhere;
	hyphens: auto;
}
.label-print .label-field{
	min-width: 0;
}
.label-print .label-k{
	font-weight: 800;
	font-size: 9px;
	line-height: 1.1;
	text-transform: none;
}
.label-print .label-v{
	font-weight: 600;
	font-size: 12px;
	line-height: 1.15;
	word-break: break-word;
	overflow-wrap: anywhere;
}
.label-print .label-id{
	font-weight: 600;
	font-size: 10px;
	line-height: 1.1;
	margin-top: 0.2mm;
}
.dymo-status{ font-size: .8rem; color: var(--muted2); }

.slider-wrap{
	--slider-cols: 5;
	--slider-max: 4;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 180px;
}
.slider-wrap .slider-input{
	width: calc(var(--slider-max) / var(--slider-cols) * 100%);
	margin-left: calc(0.5 / var(--slider-cols) * 100%);
	margin-right: 0;
	padding: 0;
	cursor: pointer;
	accent-color: #a7f3ff;
}
.slider-wrap .slider-labels{
	display: grid;
	grid-template-columns: repeat(var(--slider-cols), 1fr);
	font-size: .62rem;
	color: var(--muted2);
	pointer-events: none;
}
.slider-wrap .slider-labels span{ text-align: center; }

/* ===== Profile / présence / trombinoscope ===== */
.profile-form{ max-width: 520px; }
.profile-photo-row{
	display: flex;
	align-items: center;
	gap: 14px;
}
.profile-photo,
.trombi-photo{
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--border);
	background: rgba(255,255,255,.06);
	flex: 0 0 auto;
}
.profile-photo.is-empty,
.trombi-photo.is-empty{
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .72rem;
	color: var(--muted2);
	text-align: center;
	padding: 6px;
}
.photo-crop-overlay{
	z-index: 80;
	align-items: center;
	justify-content: center;
	padding: 16px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
body.photo-crop-open{
	overflow: hidden;
}
.photo-crop-card{
	width: min(420px, 100%);
	max-width: 480px;
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	border-radius: var(--radius);
	padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0px));
	margin: auto;
	position: relative;
	z-index: 1;
}
.photo-crop-stage{
	display: flex;
	justify-content: center;
	padding: 12px 0;
	overflow: hidden;
}
.photo-crop-viewport{
	position: relative;
	width: min(260px, 70vw);
	height: min(260px, 70vw);
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid rgba(167,243,255,.55);
	background: #05070e;
	touch-action: none;
	cursor: grab;
	user-select: none;
	/* pas de box-shadow géant : bloquait les clics sur les boutons */
	isolation: isolate;
}
.photo-crop-viewport.is-dragging{ cursor: grabbing; }
.photo-crop-img{
	position: absolute;
	top: 50%;
	left: 50%;
	max-width: none;
	max-height: none;
	transform-origin: center center;
	pointer-events: none;
	-webkit-user-drag: none;
}
.photo-crop-zoom input[type=range]{
	width: 100%;
}
.interest-checks{ margin-top: 8px; }
.check-inline{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 650;
}
.fold-hint{ margin: 6px 0 0; font-size: .8rem; }
.presence-table-wrap{
	margin-top: 4px;
	max-height: 100%;
	position: relative;
}
.presence-table{
	border-collapse: separate;
	border-spacing: 0;
}
.presence-table th,
.presence-table td{
	vertical-align: middle;
	white-space: nowrap;
	background: var(--bg0, #070a12);
}
.presence-table thead th{
	position: sticky;
	top: 0;
	z-index: 2;
	box-shadow: 0 1px 0 var(--border);
}
.presence-table .presence-date-col{
	position: relative;
	z-index: 1;
}
.presence-table .sticky-1{
	position: sticky;
	left: 0;
	z-index: 4;
	min-width: 6.2rem;
	max-width: 8rem;
	box-shadow: 1px 0 0 var(--border);
}
.presence-table thead .sticky-1{
	z-index: 6;
}
.presence-table .sticky-2,
.presence-table .sticky-3{
	min-width: 5.2rem;
}
.presence-table .presence-date-col.is-nearest-date{
	box-shadow: inset 0 0 0 1px rgba(167,243,255,.28);
	/* rester sous les colonnes figées au scroll horizontal */
	z-index: 1;
}
.presence-table tbody .presence-row:hover > td{
	background: rgba(167,243,255,.08);
}
.presence-table tbody .presence-row:hover > .presence-sticky{
	background: color-mix(in srgb, var(--bg0, #070a12) 88%, rgba(167,243,255,.35));
}
.presence-table tbody .presence-row:hover > .presence-cell.is-forecast,
.presence-table tbody .presence-row:hover > .presence-cell.is-forecast-absent,
.presence-table tbody .presence-row:hover > .presence-cell.is-absent,
.presence-table tbody .presence-row:hover > .presence-cell.is-present,
.presence-table tbody .presence-row:hover > .presence-cell.is-left{
	/* pas de filter : crée un stacking context qui passe devant les sticky */
	background-image: linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,.08));
}
@media (min-width: 640px){
	.presence-table .sticky-2{
		position: sticky;
		left: 6.2rem;
		z-index: 4;
		min-width: 6.2rem;
		max-width: 8rem;
		box-shadow: 1px 0 0 var(--border);
	}
	.presence-table thead .sticky-2{ z-index: 6; }
}
@media (min-width: 820px){
	.presence-table .sticky-3{
		position: sticky;
		left: 12.4rem;
		z-index: 4;
		min-width: 5.2rem;
		max-width: 6.5rem;
		box-shadow: 1px 0 0 var(--border);
	}
	.presence-table thead .sticky-3{ z-index: 6; }
}
.presence-cell{
	min-width: 132px;
}
.presence-select{
	width: 100%;
	min-height: 36px;
	border-radius: 10px;
	border: 1px solid transparent;
	padding: 6px 8px;
	font-size: .78rem;
	font-weight: 700;
	background: transparent;
	color: inherit;
}
.presence-pill{
	display: inline-block;
	padding: 6px 8px;
	border-radius: 10px;
	font-size: .78rem;
	font-weight: 700;
}
.presence-cell.is-forecast,
.presence-cell.is-forecast .presence-select,
.presence-cell.is-forecast .presence-pill,
.presence-pill.is-forecast,
.presence-select.is-forecast{
	background: rgba(148,163,184,.18);
	color: #cbd5e1;
	border-color: rgba(148,163,184,.28);
}
.presence-cell.is-forecast-absent,
.presence-cell.is-forecast-absent .presence-select,
.presence-cell.is-forecast-absent .presence-pill,
.presence-pill.is-forecast-absent,
.presence-select.is-forecast-absent{
	background: rgba(239,68,68,.18);
	color: #fecaca;
	border-color: rgba(239,68,68,.35);
}
.presence-cell.is-absent,
.presence-cell.is-absent .presence-select,
.presence-cell.is-absent .presence-pill,
.presence-pill.is-absent,
.presence-select.is-absent{
	background: rgba(127,29,29,.45);
	color: #fca5a5;
	border-color: rgba(127,29,29,.65);
}
.presence-cell.is-present,
.presence-cell.is-present .presence-select,
.presence-cell.is-present .presence-pill,
.presence-pill.is-present,
.presence-select.is-present{
	background: rgba(34,197,94,.18);
	color: #bbf7d0;
	border-color: rgba(34,197,94,.35);
}
.presence-cell.is-left,
.presence-cell.is-left .presence-select,
.presence-cell.is-left .presence-pill,
.presence-pill.is-left,
.presence-select.is-left{
	background: rgba(21,128,61,.35);
	color: #86efac;
	border-color: rgba(21,128,61,.5);
}
.presence-total{
	font-weight: 800;
	text-align: center;
}
.trombi-filters{
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: end;
}
.trombi-filters .field{ min-width: 160px; flex: 1; }
.trombi-grid{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}
.trombi-card{
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 12px;
	background: rgba(255,255,255,.04);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-align: center;
}
.trombi-card .trombi-photo{
	width: 120px;
	height: 120px;
	border-radius: 50%;
}
.trombi-body{
	width: 100%;
}
.trombi-body h3{
	margin: 0;
	font-size: 1rem;
}
.trombi-meta{
	margin: 4px 0 0;
	font-size: .82rem;
	color: var(--muted);
}
.trombi-remark{
	white-space: pre-wrap;
	word-break: break-word;
}
.trombi-presence{
	margin-top: 8px;
	background: transparent;
	border: none;
	padding: 0;
}
.trombi-view-toggle{
	display: inline-flex;
	gap: 6px;
	flex-wrap: wrap;
}
.panel:has(> .trombi-table-wrap){
	display: flex;
	flex-direction: column;
	padding-bottom: 0;
}
.trombi-table-wrap{
	margin-top: 0;
	flex: 1 1 auto;
	min-height: 0;
	max-height: none;
	position: relative;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: rgba(255,255,255,.28) transparent;
}
.trombi-table-wrap::-webkit-scrollbar{
	width: 8px;
	height: 8px;
}
.trombi-table-wrap::-webkit-scrollbar-track{
	background: transparent;
}
.trombi-table-wrap::-webkit-scrollbar-thumb{
	background: rgba(255,255,255,.28);
	border-radius: 999px;
}
.trombi-table-wrap::-webkit-scrollbar-thumb:hover{
	background: rgba(255,255,255,.4);
}
.trombi-table{
	border-collapse: separate;
	border-spacing: 0;
	width: max-content;
	min-width: 100%;
	font-size: .9rem;
}
.trombi-table th,
.trombi-table td{
	padding: 8px 10px;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
	vertical-align: middle;
	background: var(--bg0, #070a12);
}
.trombi-table thead th{
	position: sticky;
	top: 0;
	z-index: 2;
	font-weight: 700;
	text-align: left;
	box-shadow: 0 1px 0 var(--border);
}
.trombi-table tfoot td{
	position: sticky;
	bottom: 0;
	z-index: 2;
	font-weight: 800;
	border-bottom: none;
	box-shadow: 0 -1px 0 var(--border);
}
.trombi-sort-btn{
	appearance: none;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	color: inherit;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	text-align: left;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}
.trombi-th.is-sorted .trombi-sort-btn{
	color: var(--accent, #fbbf24);
}
.trombi-table-photo{
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	background: rgba(255,255,255,.06);
}
.trombi-table-photo.is-empty{
	border: 1px dashed var(--border);
}
.trombi-cell-text{
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}
.trombi-td-photo{
	width: 3.5rem;
	min-width: 3.5rem;
	max-width: 3.5rem;
}
.trombi-td-interest,
.trombi-td-group,
.trombi-count{
	text-align: center;
}
.trombi-flag.is-yes{
	color: #86efac;
	font-weight: 800;
}
.trombi-table .trombi-sticky{
	position: sticky;
	z-index: 4;
	box-shadow: 1px 0 0 var(--border);
}
.trombi-table thead .trombi-sticky{ z-index: 6; }
.trombi-table tfoot .trombi-sticky{ z-index: 5; }
.trombi-table .sticky-1{ left: 0; }
/* Avec photo : largeurs figées pour coller aux left */
.trombi-table.has-photo .sticky-1{
	width: 3.5rem;
	min-width: 3.5rem;
	max-width: 3.5rem;
	padding-left: 8px;
	padding-right: 8px;
}
.trombi-table.has-photo .sticky-2{
	left: 3.5rem;
	width: 6.5rem;
	min-width: 6.5rem;
	max-width: 6.5rem;
}
.trombi-table.has-photo .sticky-3{
	left: 10rem;
	width: 8rem;
	min-width: 8rem;
	max-width: 8rem;
}
/* Sans photo */
.trombi-table:not(.has-photo) .sticky-1{
	width: 6.5rem;
	min-width: 6.5rem;
	max-width: 6.5rem;
}
.trombi-table:not(.has-photo) .sticky-2{
	left: 6.5rem;
	width: 8rem;
	min-width: 8rem;
	max-width: 8rem;
}
.trombi-table tbody .trombi-row:hover > td{
	background: rgba(167,243,255,.08);
}
.trombi-table tbody .trombi-row:hover > .trombi-sticky{
	background: color-mix(in srgb, var(--bg0, #070a12) 88%, rgba(167,243,255,.35));
}
@media (max-width: 720px){
	.trombi-table .sticky-2,
	.trombi-table .sticky-3{
		position: static;
		left: auto;
		box-shadow: none;
		width: auto;
		min-width: 5rem;
		max-width: none;
	}
}

/* Desktop: side by side */
@media (min-width: 900px){
	.app-shell{
		display: grid;
		grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
		grid-template-rows: minmax(0, 1fr);
		align-items: stretch;
		position: relative;
		height: 100%;
	}
	.app-sidebar,
	.app-main{
		position: relative;
		inset: auto;
		transform: none !important;
		pointer-events: auto !important;
		transition: none;
		height: 100%;
		min-height: 0;
		max-height: 100%;
		overflow: hidden;
	}
	.app-sidebar{
		border-right: 1px solid var(--border);
		background: rgba(7,10,18,.55);
	}
	.app-main{
		background: transparent;
	}
	.app-back{ display: none !important; }
	.app-topbar-chat{
		align-items: center;
		flex-wrap: nowrap;
	}
	.app-topbar-rich{
		align-items: flex-start;
		flex-wrap: wrap;
	}
	.app-topbar-rich .app-topbar-heading,
	.app-topbar-chat .app-topbar-heading{
		flex: 1 1 auto;
	}
	.app-topbar-sub{
		-webkit-line-clamp: 2;
	}
	.composer{
		grid-template-columns: 1fr auto auto;
	}
	.composer textarea{
		grid-column: auto;
		min-height: 44px;
	}
	.overlay{
		align-items: center;
		padding: 16px;
	}
	.overlay-card{
		border-radius: var(--radius);
		padding: 22px;
	}
}
