/*
 * Pages légales et pages d'aide (FAQ, livraison, retours) : complète pages.css.
 * Chargée par les petites feuilles page-<slug>.css, ou par le widget Doku Sommaire de page ailleurs.
 */

/* Sommaire (widget Doku Sommaire de page) : carte collante sur grand écran, repliable sous 1100 px */
.e-con.dk-el-legal > .elementor-widget-doku-legal-toc {
	position: sticky;
	top: calc(20px + var(--wp-admin--admin-bar--height, 0px));
	z-index: 1;
}

.dk-lg-toc {
	margin: 0;
	padding: 18px 20px 12px;
	background: var(--dk-white);
	border: var(--dk-border);
	border-radius: var(--dk-radius);
	box-shadow: var(--dk-shadow);
}

.dk-lg-toc > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	list-style: none;
	pointer-events: none;
	color: var(--dk-violet);
	font-family: var(--dk-font-title);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.2;
}

.dk-lg-toc > summary::-webkit-details-marker {
	display: none;
}

.dk-lg-toc > summary svg {
	display: none;
	flex: 0 0 auto;
	transition: transform var(--dk-ease);
}

.dk-lg-toc ol {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.dk-lg-toc li {
	margin: 0;
}

.dk-lg-toc a {
	display: flex;
	align-items: center;
	min-height: 40px;
	padding: 6px 0;
	border-top: 1px solid rgba(110, 56, 124, .2);
	color: var(--dk-violet);
	font-size: 14px;
	line-height: 1.25;
	text-decoration: none;
}

.dk-lg-toc a:hover {
	color: var(--dk-violet);
	text-decoration: underline;
	text-decoration-color: var(--dk-pop);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.dk-lg-toc a:focus-visible,
.dk-lg-toc > summary:focus-visible {
	outline: 3px solid var(--dk-violet);
	outline-offset: 2px;
}

/* Fil d'Ariane souligné comme sur la maquette (le reset de Hello retire le soulignement) */
.dk-crumb a {
	text-decoration: underline;
}

/* Texte : liens soulignés malgré le reset de Hello, marges comme sur la maquette */
.dk-el-prose a:not(.elementor-button) {
	text-decoration: underline;
}

.dk-el-prose .elementor-widget-text-editor > :last-child,
.dk-el-prose .elementor-widget-container > :last-child {
	margin-bottom: 0;
}

.dk-el-prose p:first-child + h2 {
	margin-top: 28px;
}

/* Carte (widget à classe dk-el-card) suivie d'un texte qui commence par un titre : marges fondues */
.e-con.dk-el-prose > .elementor-widget + .elementor-widget-text-editor:has(> h2:first-child, > .elementor-widget-container > h2:first-child) {
	margin-top: 0;
}

.e-con.dk-el-prose > .elementor-widget.dk-el-card {
	margin-bottom: 0;
}

/* Tableaux : sans les bordures ni les rayures du reset de Hello */
.dk-el-prose table {
	background: transparent;
}

.dk-el-prose :is(th, td) {
	border-width: 0 0 1px;
	border-style: solid;
	border-color: rgba(110, 56, 124, .2);
	background: transparent;
	line-height: 1.35;
}

.dk-el-prose th {
	border-bottom: 2px solid var(--dk-violet);
	font-size: 14px;
}

.dk-el-prose table tbody > tr:nth-child(odd) > :is(td, th),
.dk-el-prose table tbody tr:hover > :is(td, th) {
	background: transparent;
}

.dk-lg-tw {
	overflow-x: auto;
	margin: 0 0 12px;
}

.dk-lg-tw table {
	margin: 0;
}

.dk-lg-n {
	min-width: 150px;
	overflow-wrap: anywhere;
}

/* Encarts dépliants dans le texte (Cookies placés) */
.dk-lg-acc {
	margin: 10px 0;
	background: var(--dk-white);
	border: 2px solid var(--dk-violet);
	border-radius: var(--dk-radius-sm);
}

.dk-lg-acc > summary {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 8px 16px;
	list-style: none;
	cursor: pointer;
}

.dk-lg-acc > summary::-webkit-details-marker {
	display: none;
}

.dk-lg-acc > summary:focus-visible {
	outline: 3px solid var(--dk-yellow);
	outline-offset: 2px;
}

.dk-lg-acc-t {
	color: var(--dk-violet);
	font-family: var(--dk-font-title);
	font-weight: 700;
	font-size: 17px;
	line-height: 1.2;
}

.dk-lg-badge {
	margin-left: auto;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--dk-el-c, var(--dk-yellow));
	box-shadow: var(--dk-el-c-ring, none);
	color: var(--dk-black);
	font-style: normal;
	font-size: 12px;
	line-height: 1.4;
	text-align: right;
}

.dk-lg-acc > :not(summary) {
	margin-left: 16px;
	margin-right: 16px;
}

.dk-el-prose .dk-lg-acc > :last-child {
	margin-bottom: 16px;
}

.dk-el-prose .dk-lg-acc h4 {
	margin: 16px 16px 4px;
}

/* Tablette : sommaire replié en tête de page */
@media (max-width: 1100px) {
	.e-con.dk-el-legal > .elementor-widget-doku-legal-toc {
		position: relative;
		top: auto;
	}

	.dk-lg-toc {
		padding: 4px 20px;
	}

	.dk-lg-toc > summary {
		min-height: 48px;
		pointer-events: auto;
		cursor: pointer;
	}

	.dk-lg-toc > summary svg {
		display: block;
	}

	.dk-lg-toc[open] > summary svg {
		transform: rotate(180deg);
	}

	.dk-lg-toc ol {
		margin-top: 0;
		padding-bottom: 6px;
	}
}

/* Mobile */
@media (max-width: 600px) {
	.dk-lg-toc {
		padding: 2px 14px;
		border-width: 2px;
		border-radius: var(--dk-radius-sm);
		box-shadow: 3px 3px 0 var(--dk-violet);
	}

	.dk-lg-toc > summary {
		font-size: 16px;
	}

	.dk-lg-acc > summary {
		padding: 8px 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dk-lg-toc > summary svg {
		transition: none;
	}
}
