/* TC Pages Langues — mise en forme des pages virtuelles */

.tc-pl-page {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	padding: 40px 20px 60px;
}

.tc-pl-article h1 {
	font-size: 2.1rem;
	line-height: 1.2;
	margin-bottom: .4em;
}

/* Titre + drapeau de la langue */
.tc-pl-title {
	display: flex;
	align-items: center;
	gap: .55em;
}

.tc-pl-flag {
	flex: 0 0 auto;
	width: auto;
	height: 1.15em;
	border-radius: 3px;
}

.tc-pl-subtitle {
	font-size: 1.15rem;
	color: #444;
	margin-bottom: 1.2em;
}

.tc-pl-native {
	color: #888;
	font-style: italic;
}

.tc-pl-section {
	margin-top: 2.4em;
}

.tc-pl-section h2 {
	font-size: 1.5rem;
	margin-bottom: .6em;
}

.tc-pl-btn {
	display: inline-block;
	background: #6878d6;
	color: #fff !important;
	padding: 12px 26px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	transition: background .15s ease;
}

.tc-pl-btn:hover {
	background: #6878d6;
}

.tc-pl-cta-inline {
	margin-top: 1.4em;
}

.tc-pl-docs,
.tc-pl-steps {
	padding-left: 1.3em;
	line-height: 1.8;
}

.tc-pl-docs li {
	margin-bottom: .2em;
}

.tc-pl-form {
	background: #f6f9ff;
	border: 1px solid #e1ebfb;
	border-radius: 10px;
	padding: 28px 26px;
}

.tc-pl-faq-item {
	border-bottom: 1px solid #e6e6e6;
	padding: 14px 0;
}

.tc-pl-faq-item summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 1.05rem;
}

.tc-pl-faq-item p {
	margin-top: .8em;
	color: #444;
}

.tc-pl-langs {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 8px 18px;
}

.tc-pl-langs a {
	text-decoration: none;
}

.tc-pl-langs a:hover {
	text-decoration: underline;
}

/* ── Galerie d'exemples de documents ─────────────────────────────── */

.tc-pl-samples {
	margin: 1.6em 0 1.4em;
}

.tc-pl-samples-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: 1000px;
	display: grid;
	/* auto-fit : les colonnes vides sont supprimées, les 3-4 vignettes occupent la largeur. */
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 20px;
}

.tc-pl-sample {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: .5em;
}

.tc-pl-sample-btn {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 1px solid #e1ebfb;
	border-radius: 8px;
	background: #fff;
	cursor: zoom-in;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
	transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.tc-pl-sample-btn img {
	display: block;
	width: 100%;
	height: 260px; /* Repli si aspect-ratio n'est pas géré. */
	object-fit: cover;
	object-position: top center;
	transition: transform .35s ease;
}

@supports (aspect-ratio: 3 / 4) {
	.tc-pl-sample-btn img {
		height: auto;
		aspect-ratio: 3 / 4;
	}
}

.tc-pl-sample-btn:hover,
.tc-pl-sample-btn:focus-visible {
	border-color: #6878d6;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
	transform: translateY(-2px);
	outline: none;
}

.tc-pl-sample-btn:hover img,
.tc-pl-sample-btn:focus-visible img {
	transform: scale(1.08);
}

/* Pastille loupe au survol */
.tc-pl-sample-zoom {
	position: absolute;
	right: 8px;
	bottom: 8px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(104, 120, 214, .92);
	opacity: 0;
	transition: opacity .18s ease;
}

.tc-pl-sample-zoom::before,
.tc-pl-sample-zoom::after {
	content: "";
	position: absolute;
	background: #fff;
}

/* Manche de la loupe */
.tc-pl-sample-zoom::before {
	width: 2px;
	height: 8px;
	right: 8px;
	bottom: 6px;
	transform: rotate(-45deg);
	border-radius: 1px;
}

/* Lentille de la loupe */
.tc-pl-sample-zoom::after {
	width: 12px;
	height: 12px;
	left: 6px;
	top: 6px;
	border-radius: 50%;
	background: none;
	border: 2px solid #fff;
}

.tc-pl-sample-btn:hover .tc-pl-sample-zoom,
.tc-pl-sample-btn:focus-visible .tc-pl-sample-zoom {
	opacity: 1;
}

.tc-pl-sample-caption {
	font-size: .88rem;
	line-height: 1.35;
	color: #555;
}

.tc-pl-samples-legend {
	margin-top: 1em;
	font-size: .9rem;
	color: #777;
	font-style: italic;
}

/* ── Visionneuse (zoom plein écran) ──────────────────────────────── */

body.tc-pl-lb-open {
	overflow: hidden;
}

.tc-pl-lightbox {
	position: fixed;
	inset: 0;
	/* Doit passer au-dessus de l'en-tête collant du thème et du bandeau cookies (z-index 8000). */
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 60px;
	background: rgba(13, 16, 26, .95);
}

.tc-pl-lightbox[hidden] {
	display: none;
}

.tc-pl-lb-figure {
	margin: 0;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.tc-pl-lb-img {
	max-width: 100%;
	max-height: calc(100vh - 140px);
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
	cursor: zoom-in;
	transition: transform .25s ease;
}

.tc-pl-lb-img.is-zoomed {
	transform: scale(2);
	cursor: zoom-out;
}

.tc-pl-lb-caption {
	display: flex;
	align-items: baseline;
	gap: 12px;
	color: #fff;
	font-size: .95rem;
	text-align: center;
}

.tc-pl-lb-counter {
	color: #b9c0d8;
	font-size: .85rem;
}

.tc-pl-lb-close,
.tc-pl-lb-nav {
	position: absolute;
	/* Le thème ajoute du padding aux <button> : sans ce reset la boîte n'est pas carrée
	   et border-radius: 50% donne une ellipse au lieu d'un cercle. */
	box-sizing: border-box;
	padding: 0;
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
	line-height: 1;
	border-radius: 50%;
	transition: background .15s ease;
}

.tc-pl-lb-close:hover,
.tc-pl-lb-nav:hover {
	background: rgba(255, 255, 255, .28);
}

.tc-pl-lb-close {
	top: 18px;
	right: 18px;
	width: 42px;
	height: 42px;
	font-size: 1.8rem;
}

.tc-pl-lb-nav {
	top: 50%;
	transform: translateY(-50%);
	width: 46px;
	height: 46px;
	font-size: 1.2rem;
}

.tc-pl-lb-nav[hidden] {
	display: none;
}

.tc-pl-lb-prev {
	left: 14px;
}

.tc-pl-lb-next {
	right: 14px;
}

@media (max-width: 600px) {
	.tc-pl-article h1 {
		font-size: 1.6rem;
	}

	.tc-pl-samples-grid {
		grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
		gap: 12px;
	}

	.tc-pl-sample-btn img {
		height: 190px;
	}

	.tc-pl-lightbox {
		padding: 60px 12px 24px;
	}

	.tc-pl-lb-nav {
		width: 38px;
		height: 38px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tc-pl-sample-btn,
	.tc-pl-sample-btn img,
	.tc-pl-lb-img,
	.tc-pl-sample-zoom {
		transition: none;
	}
}
