/* ==========================================================================
   Pages légales (CGV, Livraison, Retours, Mentions, Confidentialité, Conditions de location)
   + carte de contenu des pages génériques (page.php).
   Maquette : design/CGV.dc.html, section « 02 Contenu ».
   ========================================================================== */

.te-legal {
	background: var(--sand);
	padding-top: 40px;
	padding-bottom: var(--section-y);
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}

/* ---------- Menu latéral ---------- */
.te-legal__nav {
	position: sticky;
	top: 130px;
	padding: 10px;
	border-radius: 20px;
	background: var(--sand-2);
}
.admin-bar .te-legal__nav { top: 162px; }
.te-legal__list {
	position: relative;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.te-legal__link {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0; /* comme la maquette : « Conditions Générales de Vente ● » tient sur une ligne */
	padding: 12px 16px;
	border-radius: 12px;
	color: var(--ink);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.65;
	transition: background .2s, color .2s;
}
.te-legal__link:hover { background: var(--white); color: var(--ink); }
.te-legal__link.is-current,
.te-legal__link.is-current:hover {
	background: var(--ink);
	color: var(--white);
	font-weight: 700;
}
.te-legal__dot { color: var(--brown); flex: none; font-size: 12px; }

/* ---------- Carte de contenu ---------- */
.te-legal__card {
	min-width: 0;
	padding: 44px 48px;
	border-radius: 24px;
	background: var(--white);
	border: 1px solid var(--line-2);
	font-size: 16.5px;
	line-height: 1.7;
	color: var(--ink-3);
	gap: 16px;
	overflow-wrap: break-word;
}
.te-legal__card--solo { max-width: 960px; margin: 0 auto; }
.te-legal__card > :first-child { margin-top: 0; }
.te-legal__card p { margin: 0; }
.te-legal__card h2 { margin: 24px 0 0; font: 400 30px/1.2 var(--marker); color: var(--ink); }
.te-legal__card h3 { margin: 12px 0 0; font: 700 19px/1.3 var(--font); color: var(--ink); }
.te-legal__card strong { color: var(--ink); }
.te-legal__card a {
	color: var(--brown-dark);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: rgba(126, 91, 57, .35);
	text-underline-offset: 3px;
}
.te-legal__card a:hover { color: var(--ink); text-decoration-color: currentColor; }
.te-legal__card ul, .te-legal__card ol { margin: 0; }
.te-legal__card img { border-radius: 12px; }

/* Encadrés (note, formulaire type) */
.te-legal__card aside,
.te-legal__card blockquote {
	margin: 0;
	padding: 20px 24px;
	border: 0;
	border-radius: 16px;
	background: var(--sand);
	color: var(--ink);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Tableau (Livraison) */
.te-legal__card table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--line-2);
	border-radius: 16px;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.55;
}
.te-legal__card th {
	text-align: left;
	padding: 14px 16px;
	background: var(--ink);
	color: var(--white);
	font-weight: 700;
	border: 0;
}
.te-legal__card td {
	padding: 14px 16px;
	border: 0;
	border-top: 1px solid var(--line);
	vertical-align: top;
}
.te-legal__card th:nth-child(2) { white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.te-legal { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
	.te-legal__nav { top: 100px; }
	.admin-bar .te-legal__nav { top: 132px; }
	.te-legal__card { padding: 36px 36px; }
}

@media (max-width: 900px) {
	.te-legal { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 28px; }
	/* Menu : rangée de pastilles défilante au-dessus du texte. */
	.te-legal__nav {
		position: static;
		padding: 6px;
		border-radius: 16px;
		min-width: 0;
	}
	.te-legal__list {
		flex-direction: row;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.te-legal__list::-webkit-scrollbar { display: none; }
	.te-legal__list > li { flex: none; scroll-snap-align: start; }
	.te-legal__link { padding: 10px 16px; border-radius: 999px; white-space: nowrap; font-size: 14.5px; gap: 8px; }
	.te-legal__card h2 { font-size: 26px; }
}

@media (max-width: 700px) {
	.te-legal__card { padding: 28px 22px; font-size: 16px; border-radius: 18px; }
	.te-legal__card h2 { font-size: 24px; }
	.te-legal__card h3 { font-size: 18px; }
	.te-legal__card aside, .te-legal__card blockquote { padding: 16px 18px; }
	/* Tableau : défilement horizontal plutôt que débordement de page. */
	.te-legal__card table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.te-legal__card th, .te-legal__card td { min-width: 140px; }
	.te-legal__card th:first-child, .te-legal__card td:first-child { min-width: 200px; }
}

@media (max-width: 480px) {
	.te-legal__card { padding: 22px 16px; }
	.te-legal__card h2 { font-size: 22px; }
}

@media print {
	.te-legal { display: block; padding: 0; background: none; }
	.te-legal__nav { display: none; }
	.te-legal__card { border: 0; padding: 0; }
}
