/* =========================================
   GLOBAL
========================================= */

.lg-muted {
	color: #555;
	font-size: 12px;
}

.lg-title-serif {
	font-family: Georgia, "Times New Roman", Times, serif;
	color: #1f1f1f;
}

.lg-clear {
	clear: both;
}

/* =========================================
   DETAIL.PHP - bouton horodatage
========================================= */

.lg-stamp-inline-wrap {
	float: right;
	position: relative;
	top: 14px;
}

.lg-stamp-tooltip-box {
	position: relative;
	display: inline-block;
}

.lg-stamp-inline-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 10px;
	border: 1px solid #d6c6a3;
	background: #f7f2e7;
	border-radius: 4px;
	text-decoration: none;
	color: #7b4d00;
	font-size: 11px;
	font-weight: bold;
	transition: all 0.2s ease;
	cursor: pointer;
}

.lg-stamp-inline-link:hover {
	background: #f0e6d3;
	border-color: #c9b48a;
	box-shadow: 0 1px 3px rgba(0,0,0,0.15);
	transform: translateY(-1px);
}

.lg-stamp-inline-text {
	white-space: nowrap;
}

.lg-stamp-inline {
	height: 36px;
	width: auto;
	position: relative;
}

.lg-stamp-tooltip {
	position: absolute;
	right: 0;
	bottom: 100%;
	margin-bottom: 8px;
	padding: 6px 9px;
	background: #333;
	color: #fff;
	font-size: 11px;
	line-height: 1.2;
	white-space: nowrap;
	border-radius: 4px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
	z-index: 50;
	box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.lg-stamp-tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	right: 18px;
	border-width: 5px;
	border-style: solid;
	border-color: #333 transparent transparent transparent;
}

.lg-stamp-tooltip-box:hover .lg-stamp-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* =========================================
   COPYRIGHT.PHP
========================================= */

.lg-copy-box {
	background: #dcdcdc;
	border: 1px solid #bdbdbd;
	padding: 18px;
	margin-top: 10px;
}

.lg-copy-title {
	margin: 0 0 12px 0;
	font-size: 18px;
	font-family: Georgia, "Times New Roman", Times, serif;
	color: #1f1f1f;
}

.lg-copy-badge-wrap {
	text-align: center;
	margin-bottom: 12px;
}

.lg-copy-badge {
	display: inline-block;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: bold;
	border: 1px solid #999;
	background: #efefef;
	color: #333;
}

.lg-copy-badge.ok {
	background: #e6f5e6;
	border-color: #7fa77f;
	color: #1f5b1f;
}

.lg-copy-badge.pending {
	background: #fff5d9;
	border-color: #d0b45a;
	color: #7b5a00;
}

.lg-copy-intro {
	position: relative;
	margin: 12px auto 18px auto;
	padding: 12px 16px 12px 40px;
	max-width: 600px;
	text-align: left;
	font-size: 13px;
	line-height: 1.5;
	color: #2a2a2a;
	background: #f9f7f2;
	border: 1px solid #e0d6c2;
	border-radius: 3px;
}

.lg-copy-intro::before {
	content: "🔐";
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 16px;
	opacity: 0.75;
}

.lg-copy-grid {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 10px 16px;
	margin-bottom: 12px;
}

.lg-copy-label {
	font-weight: bold;
	color: #222;
}

.lg-copy-value {
	color: #111;
	line-height: 1.4;
}

.lg-copy-ref {
	font-size: 15px;
	font-weight: bold;
	color: #000;
}

.lg-copy-sep {
	border: none;
	border-top: 1px solid #b5b5b5;
	margin: 14px 0;
}

.lg-copy-link {
	text-align: center;
	margin: 18px 0 10px 0;
}

.lg-copy-link a {
	display: inline-block;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: bold;
	text-decoration: none;
	color: #7b4d00;
	background: linear-gradient(#f4e7cf, #e8d6b5);
	border: 1px solid #c9b48a;
	border-radius: 4px;
	box-shadow:
		0 1px 0 #fff inset,
		0 2px 3px rgba(0,0,0,0.1);
	transition: all 0.2s ease;
}

.lg-copy-link a:hover {
	background: linear-gradient(#f0e0c2, #dcc8a3);
	border-color: #bfa77a;
	transform: translateY(-1px);
	box-shadow:
		0 1px 0 #fff inset,
		0 3px 6px rgba(0,0,0,0.15);
}

.lg-copy-link a::before {
	content: "📜 ";
}

.lg-copy-legal {
	text-align: center;
	color: #d47a00;
	font-size: 12px;
	font-weight: bold;
	margin-top: 8px;
}

.lg-copy-back {
	text-align: center;
	margin-top: 14px;
	font-size: 13px;
}

/* =========================================
   CERTIF_HORODATAGE.PHP
========================================= */

.lg-cert-full {
	padding-bottom: 26px;
}

.lg-cert-page {
	position: relative;
	z-index: 1;
}

.lg-cert-page::before {
	content: "LIVEGALERIE";
	position: absolute;

	top: 50%;
	left: 50%;

	transform: translate(-50%, -50%) rotate(-18deg);

	font-family: Georgia, "Times New Roman", serif;
	font-size: 90px;
	font-weight: bold;
	letter-spacing: 6px;

	color: rgba(120, 90, 40, 0.06);

	white-space: nowrap;

	pointer-events: none;

	z-index: 0;

	/* 🔑 IMPORTANT */
	padding: 0 60px;   /* évite la coupe à gauche/droite */
	box-sizing: content-box;
}

.lg-cert-header {
	margin-bottom: 20px;
}

.lg-cert-header-top {
	display: grid;
	grid-template-columns: 180px 1fr 180px;
	align-items: center;
	column-gap: 10px;
}

.lg-cert-header-left {
	text-align: left;
}

.lg-cert-header-center {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
}

.lg-cert-header-right {
	text-align: right;
}

.lg-cert-logo-wrap {
	margin: 0;
	flex: 0 0 auto;
}

.lg-cert-logo-wrap img {
	height: 90px;
	width: auto;
	display: block;
}

.lg-cert-title-wrap {
	text-align: left;
}

.lg-cert-title-wrap h1 {
	margin: 0;
	font-size: 28px;
	font-family: Georgia, "Times New Roman", Times, serif;
	color: #1f1f1f;
}

.lg-cert-subtitle {
	font-size: 14px;
	color: #555;
	margin-top: 4px;
}

.lg-cert-badge-wrapper-top {
	text-align: left;
	margin-bottom: 0;
}

.lg-cert-thumb-badge-wrap {
	text-align: center;
	margin-top: 10px;
}

.lg-cert-print-wrap {
	text-align: right;
	margin-bottom: 0;
}

.lg-cert-notice {
	margin: 14px auto 18px auto;
	padding: 10px 14px;
	max-width: 680px;
	text-align: center;
	font-size: 13px;
	line-height: 1.5;
	color: #3a3a3a;
	background: #f2f2f2;
	border: 1px solid #d8d8d8;
	border-left: 4px solid #c9b48a;
	border-radius: 2px;
}

.lg-cert-badge-wrap,
.lg-cert-badge-wrapper {
	text-align: center;
	margin-bottom: 14px;
}

.lg-cert-badge {
	display: inline-block;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: bold;
	border: 1px solid #999;
	background: #efefef;
	color: #333;
	margin-bottom: 10px;
}

.lg-cert-badge.ok {
	background: #e6f5e6;
	border-color: #7fa77f;
	color: #1f5b1f;
}

.lg-cert-badge.pending {
	background: #fff5d9;
	border-color: #d0b45a;
	color: #7b5a00;
}

.lg-cert-print-btn {
	display: inline-block;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: bold;
	text-decoration: none;
	color: #555;
	background: #f3f3f3;
	border: 1px solid #cfcfcf;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.lg-cert-print-btn:hover {
	background: #e9e9e9;
	border-color: #bdbdbd;
	color: #222;
}

.lg-cert-oeuvre-head {
	display: flex;
	align-items: flex-start;
	gap: 22px;
	margin: 18px 0 20px 0;
}

.lg-cert-oeuvre-thumb {
	flex: 0 0 150px;
}

.lg-cert-oeuvre-thumb img {
	display: block;
	width: 150px;
	height: auto;
	background: #fff;
	border: 1px solid #cfc6b8;
	padding: 4px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.lg-cert-oeuvre-meta {
	flex: 1;
}

.lg-cert-error {
	background: #fff0f0;
	border: 1px solid #c99696;
	padding: 10px 12px;
	color: #8b1d1d;
	margin-bottom: 14px;
	font-size: 13px;
}

@media print {

	body {
		background: #fff !important;
		color: #000 !important;
	}

	/* Tout ce qui est navigation / entête / footer du site */
	#guide,
	#menu,
	#entete,
	#entete_small,
	#fildariane,
	#header,
	#top,
	#haut,
	#pied,
	footer,
	nav,
	.lg-cert-print-wrap {
		display: none !important;
	}

	/* Si l'entête_small injecte un wrapper spécifique */
	.entete,
	.entete_small,
	.menu,
	.pied,
	.header,
	.top,
	.footer {
		display: none !important;
	}

	/* Ne garder que le coeur de page */
	.lg-cert-full,
	.lg-cert-page,
	#corps,
	#conteneur_detail {
		margin: 0 !important;
		padding: 0 !important;
	}

	.lg-cert-page {
		padding: 10px 12px !important;
		border: none !important;
		box-shadow: none !important;
		background: #fff !important;
		background-image: none !important;
	}

    .lg-cert-page::before {
		font-size: 110px;
		color: rgba(120, 90, 40, 0.10);

		padding: 0 80px;  /* plus large pour impression */
	}

	.lg-cert-logo-wrap img {
		height: 54px;
	}

	.lg-cert-title-wrap h1 {
		font-size: 21px;
	}

	.lg-cert-subtitle,
	.lg-cert-notice {
		font-size: 12px;
	}

	.lg-cert-header-top {
		grid-template-columns: 150px 1fr 0;
		column-gap: 8px;
	}

	.lg-cert-header-right {
		display: none !important;
	}

	.lg-cert-oeuvre-head {
		gap: 14px;
		margin: 10px 0 12px 0;
	}

	.lg-cert-oeuvre-thumb {
		flex: 0 0 100px;
	}

	.lg-cert-oeuvre-thumb img {
		width: 100px;
		padding: 2px;
		box-shadow: none;
	}

	.lg-cert-grid {
		grid-template-columns: 155px 1fr;
		gap: 5px 10px;
	}

	.lg-cert-section {
		margin-top: 10px;
	}

	.lg-cert-hash,
	.lg-cert-verify {
		font-size: 10px;
		padding: 7px;
	}

	/* On garde le QR code à l'impression */
	.lg-cert-qr-wrap {
		display: block !important;
		margin: 10px 0 !important;
	}

    .lg-cert-back {
		display: none !important;
	}

	a {
		color: #000 !important;
		text-decoration: none !important;
	}
}

.lg-cert-grid {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 8px 14px;
	margin-top: 10px;
}

.lg-cert-label {
	font-weight: bold;
	text-align: right;
	color: #333;
}

.lg-cert-value {
	text-align: left;
	color: #111;
	line-height: 1.4;
}

.lg-cert-ref {
	font-size: 16px;
	font-weight: bold;
}

.lg-cert-qr-wrap {
	text-align: center;
	margin: 18px 0;
}

.lg-cert-qr img {
	width: 160px;
	height: 160px;
	border: 1px solid #bbb;
	background: #fff;
	padding: 4px;
}

.lg-cert-qr-txt {
	font-size: 12px;
	color: #444;
	margin-top: 6px;
}

.lg-cert-section {
	margin-top: 20px;
	text-align: center;
}

.lg-cert-section h4 {
	font-size: 16px;
	margin-bottom: 8px;
}

.lg-cert-hash {
	word-break: break-all;
	font-family: monospace;
	font-size: 12px;
	background: #f2f2f2;
	border: 1px solid #ccc;
	padding: 10px;
	margin-top: 8px;
}

.lg-cert-verify {
	background: #efefef;
	border: 1px solid #c6c6c6;
	padding: 10px;
	font-family: monospace;
	font-size: 12px;
	white-space: pre-wrap;
	margin-top: 10px;
}

.lg-cert-legal {
	color: #d47a00;
	font-size: 12px;
	font-weight: bold;
	margin-top: 18px;
	text-align: center;
}

.lg-cert-back {
	margin-top: 16px;
	text-align: center;
}

.lg-cert-print-btn {
	display: inline-block;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: bold;
	text-decoration: none;
	color: #555;
	background: #f3f3f3;
	border: 1px solid #cfcfcf;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.lg-cert-print-btn:hover {
	background: #e9e9e9;
	border-color: #bdbdbd;
	color: #222;
}

/* =========================================
   RESPONSIVE
========================================= */

@media screen and (max-width: 800px) {
	.lg-cert-header-top {
		grid-template-columns: 1fr;
		row-gap: 10px;
	}

	.lg-cert-header-center {
		flex-direction: column;
		gap: 10px;
	}

	.lg-cert-header-left,
	.lg-cert-header-right,
	.lg-cert-badge-wrapper-top,
	.lg-cert-print-wrap,
	.lg-cert-title-wrap {
		text-align: center;
	}
}