/* iManage — record_detail (MyQMa) */

/* Overlay plein écran caché par défaut */
#record_detail {
	display: none;
	position: fixed;
	top: 48px;
	left: 0; right: 0; bottom: 0;
	z-index: 1045;
}
#record_detail.open {
	display: block;
}

/* Backdrop */
#record_detail .form-backdrop {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.3s ease;
}
#record_detail.open .form-backdrop {
	opacity: 1;
}

/* Panneau centré — même style que form-panel-overlay */
.detail-panel {
	position: absolute;
	top: 10px; bottom: 10px;
	left: 50%; right: auto;
	width: 100%;
	max-width: 1320px;
	background: var(--bg-surface);
	border-radius: var(--radius-md);
	box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	transform: translateX(-50%) translateY(30px);
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
}
#record_detail.open .detail-panel {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

/* Mobile */
@media (max-width: 575.98px) {
	.detail-panel {
		top: 0; bottom: 0;
		left: 0; right: 0;
		max-width: none;
		border-radius: 0;
		transform: translateY(100%);
	}
	#record_detail.open .detail-panel {
		transform: translateY(0);
		opacity: 1;
	}
}

/* MyQMa layout override */
/* Panneau inline entre titre du contenu et footer — top/bottom ajustés aux dimensions navbar+footer */
#record_detail {
	display: none;
	position: fixed;
	left: 0; right: 0;
	top:    150px;                       /* après navbar + breadcrumb + titre du contenu */
	bottom: 56px;                        /* au-dessus du footer (48px + marge) */
	z-index: 1045;
}
#record_detail.open { display: block; }

#record_detail .form-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.18); /* assombrissement léger autour du panneau */
	opacity: 0;
	transition: opacity 0.25s ease;
}
#record_detail.open .form-backdrop { opacity: 1; }

#record_detail .detail-panel {
	position: absolute;
	top: 0; bottom: 0;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	width: calc(100% - 32px);
	max-width: 1320px;
	background: var(--paper, #ffffff);
	border: 1px solid var(--line);
	border-radius: 5px;                 /* rayon standard 5 px */
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transition: transform 0.25s ease, opacity 0.25s ease;
}
#record_detail.open .detail-panel {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

@media (max-width: 640px) {
    .record-detail { width: 100% !important; max-width: 100% !important; border-radius: 0 !important; }
}
