/* Widget : styles isolés du reste du site. */
.tdh-reader,
.tdh-reader * {
	box-sizing: border-box;
}

.tdh-reader {
	--tdh-ink: #20332e;
	--tdh-muted: #65736c;
	--tdh-accent: #38634e;
	--tdh-border: #e3e8df;

	padding: 0;
	overflow: hidden;
	border: 1px solid var(--tdh-border);
	border-radius: 20px;
	background: #fffef9;
	color: var(--tdh-ink);
	box-shadow: 0 12px 32px rgb(32 51 46 / 6%);
	font-family: system-ui, -apple-system, BlinkMacSystemFont,
		"Segoe UI", sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

.tdh-reader [hidden] {
	display: none !important;
}

.tdh-reader__header,
.tdh-reader__block {
	padding-right: 23px;
	padding-left: 23px;
	background: #fffef9;
}

.tdh-reader__header {
	padding-top: 23px;
}

.tdh-reader__block {
	padding-bottom: 20px;
}

.tdh-reader__eyebrow {
	display: block;
	margin-bottom: 5px;
	color: var(--tdh-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
}

.tdh-reader .tdh-reader__title {
	margin: 0 0 21px;
	color: var(--tdh-ink);
	font-size: 21px;
	font-weight: 750;
	line-height: 1.25;
	letter-spacing: -.025em;
}

.tdh-reader button,
.tdh-reader select {
	font: inherit;
}

.tdh-reader button {
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
}

.tdh-reader button:disabled,
.tdh-reader select:disabled {
	cursor: not-allowed;
	opacity: .5;
}

.tdh-reader :is(button, select, a, input):focus-visible {
	outline: 3px solid #ad811b;
	outline-offset: 4px;
}

.tdh-reader__label {
	margin: 0 0 10px;
	color: var(--tdh-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	line-height: 1.3;
	text-transform: uppercase;
}

.tdh-reader button.tdh-reader__switch {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	height: auto !important;
	padding: 14px;
	overflow: visible;
	border: 1px solid #e8d69f;
	border-radius: 12px;
	background: #fff5d8;
	color: #5c4311;
	text-align: left;
	white-space: normal !important;
	font-weight: 700 !important;
	transition: background .15s ease, border-color .15s ease;
}

.tdh-reader button.tdh-reader__switch:hover,
.tdh-reader button.tdh-reader__switch:focus-visible {
	border-color: #c6a24a;
	background: #f0d78a;
	color: #3f2e0c;
}

.tdh-reader__switch-copy {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	white-space: normal;
}

.tdh-reader__switch > span[aria-hidden] {
	flex: 0 0 auto;
}

.tdh-reader__switch-copy strong {
	font-size: 15px;
	font-weight: 750;
	line-height: 1.3;
}

.tdh-reader__switch-copy small {
	display: block;
	color: #6d5830;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 1.4;
	white-space: normal !important;
	overflow-wrap: anywhere;
}

.tdh-reader__toggle {
	position: relative;
	flex: 0 0 36px;
	width: 36px;
	height: 21px;
	border-radius: 20px;
	background: #cec9ba;
	transition: background .2s;
}

.tdh-reader__toggle::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgb(0 0 0 / 15%);
	transition: transform .2s;
}

.tdh-reader__switch[aria-pressed="true"] .tdh-reader__toggle {
	background: #ab7e19;
}

.tdh-reader__switch[aria-pressed="true"] .tdh-reader__toggle::after {
	transform: translateX(15px);
}

.tdh-reader .tdh-reader__hint {
	margin: 9px 2px 19px;
	color: var(--tdh-muted);
	font-size: 12px;
}

.tdh-reader__audio {
	margin-top: 0;
	padding: 20px 23px 18px;
	border-top: 0;
	background: #eceee8;
}

.tdh-reader__action {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	margin-bottom: 10px;
	padding: 14px;
	border: 1px solid var(--tdh-accent);
	border-radius: 12px;
	background: var(--tdh-accent);
	color: #fff;
	text-align: left;
	font-weight: 650 !important;
}

.tdh-reader__action small {
	flex-shrink: 0;
	font-size: 11px;
	font-weight: 500;
	opacity: .9;
}

.tdh-reader__action--light {
	border-color: #dce6dd;
	background: #edf3eb;
	color: #2e513d;
}

.tdh-reader__action[aria-pressed="true"] {
	outline: 2px solid #c29737;
	outline-offset: 2px;
}

.tdh-reader__settings {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	margin: 12px 0 0;
}

.tdh-reader__settings label {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 8px;
	min-width: 0;
	font-size: 12px;
}

.tdh-reader__settings label select {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0;
}

.tdh-reader__settings .tdh-reader__stop {
	flex: 0 0 auto;
	width: auto !important;
	min-width: 0;
	min-height: 35px;
	margin: 0 !important;
	float: none !important;
	position: static !important;
	text-align: center;
	line-height: 1.2;
	white-space: nowrap;
}

.tdh-reader select {
	max-width: 100%;
	min-height: 35px;
	padding: 6px 9px;
	border: 1px solid var(--tdh-border);
	border-radius: 7px;
	background: #fff;
	color: var(--tdh-ink);
	font-size: 12px;
}

.tdh-reader__stop {
	padding: 8px 10px;
	border: 1px solid var(--tdh-border);
	border-radius: 8px;
	background: #fff;
	color: #654b42;
	font-size: 12px !important;
}

.tdh-reader__voice {
	display: grid;
	gap: 5px;
	margin-top: 14px;
	color: var(--tdh-muted);
	font-size: 12px;
}

.tdh-reader__voice select {
	width: 100%;
}

.tdh-reader__follow {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	margin-top: 12px;
	color: var(--tdh-muted);
	font-size: 12px;
}

.tdh-reader__follow input {
	margin-top: 3px;
	accent-color: var(--tdh-accent);
}

.tdh-reader .tdh-reader__status {
	min-height: 0;
	margin: 13px 0 0;
	color: var(--tdh-muted);
	font-size: 12px;
}

.tdh-reader .tdh-reader__status:empty {
	display: none;
	margin: 0;
}

.tdh-reader a.tdh-reader__vote,
.tdh-reader a.tdh-reader__vote:visited {
	display: block;
	margin-top: 0;
	padding: 16px 23px;
	background: #e5f2e8 !important;
	color: #20332e !important;
	font-weight: 650;
	text-decoration: none !important;
	transition: background .15s ease, color .15s ease;
}

.tdh-reader a.tdh-reader__vote:hover,
.tdh-reader a.tdh-reader__vote:focus-visible {
	background: #38634e !important;
	color: #fff !important;
	text-decoration: none !important;
}

.tdh-reader a.tdh-reader__question,
.tdh-reader a.tdh-reader__question:visited {
	display: block;
	margin-top: 0;
	padding: 16px 23px;
	border-top: 0;
	background: #1c1c1c !important;
	color: #fff !important;
	font-weight: 650;
	text-decoration: none !important;
	transition: background .15s ease, color .15s ease;
}

.tdh-reader a.tdh-reader__question:hover,
.tdh-reader a.tdh-reader__question:focus-visible {
	background: #e5f2e8 !important;
	color: #20332e !important;
	text-decoration: none !important;
}

.tdh-reader .tdh-reader__sources {
	margin-top: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #f4f0e4;
	color: var(--tdh-ink);
	font-size: 14px;
	line-height: 1.55;
	overflow-wrap: anywhere;
}

.tdh-reader .tdh-reader__sources summary {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 16px 23px;
	list-style: none !important;
	cursor: pointer;
	color: var(--tdh-ink) !important;
	font-size: 16px !important;
	font-weight: 750;
	line-height: 1.3;
}

.tdh-reader .tdh-reader__sources summary::-webkit-details-marker {
	display: none;
}

.tdh-reader .tdh-reader__sources summary::marker {
	content: "";
}

.tdh-reader .tdh-reader__sources summary::after {
	content: "";
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.tdh-reader .tdh-reader__sources[open] summary::after {
	margin-top: 4px;
	transform: rotate(-135deg);
}

.tdh-reader .tdh-reader__sources summary:hover,
.tdh-reader .tdh-reader__sources summary:focus-visible {
	background: #efe8d4;
}

.tdh-reader .tdh-reader__sources-body {
	padding: 0 23px 14px;
}

.tdh-reader .tdh-reader__sources :is(p, ul, ol) {
	margin: 0 0 12px !important;
	padding: 0 !important;
	font-size: 14px !important;
	line-height: 1.55 !important;
}

.tdh-reader .tdh-reader__sources ul {
	padding-left: 1.2em !important;
	list-style: disc outside !important;
}

.tdh-reader .tdh-reader__sources ol {
	padding-left: 1.4em !important;
	list-style: decimal outside !important;
}

.tdh-reader .tdh-reader__sources li {
	display: list-item !important;
	margin: 0 0 10px !important;
	padding: 0 0 0 2px !important;
	list-style: inherit !important;
	font-size: 14px !important;
	line-height: 1.5 !important;
	color: var(--tdh-ink) !important;
}

.tdh-reader .tdh-reader__sources li::marker {
	color: var(--tdh-accent);
}

.tdh-reader .tdh-reader__sources li::before,
.tdh-reader .tdh-reader__sources li::after {
	content: none !important;
	display: none !important;
}

.tdh-reader .tdh-reader__sources a {
	display: inline !important;
	padding: 0 !important;
	color: var(--tdh-accent) !important;
	font-size: 14px !important;
	font-weight: 600;
	line-height: 1.5 !important;
	text-decoration: underline;
}

/* Réglages audio : vitesse et Arrêter sur la même ligne. */

/* Fenêtre Lecture Express. */
html.tdh-express-open {
	overflow: hidden;
}

dialog.tdh-express-dialog {
	box-sizing: border-box;
	width: min(780px, calc(100vw - 32px));
	max-width: 780px;
	max-height: calc(100dvh - 40px);
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 1px solid #e2e6de;
	border-radius: 20px;
	background: #fffef9;
	color: #23372e;
	box-shadow: 0 30px 100px rgb(0 0 0 / 25%);
	font-family: system-ui, -apple-system, BlinkMacSystemFont,
		"Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.7;
	text-align: left;
}

.tdh-express-dialog *,
.tdh-express-dialog *::before,
.tdh-express-dialog *::after {
	box-sizing: border-box;
}

.tdh-express-dialog::backdrop {
	background: rgb(15 26 22 / 65%);
}

.tdh-express-dialog[open] {
	display: flex;
	flex-direction: column;
}

.tdh-express-dialog__header {
	position: relative;
	flex-shrink: 0;
	padding: 25px 65px 20px 28px;
	border-bottom: 1px solid #e5e8df;
	background: #f5f7ef;
}

.tdh-express-dialog .tdh-express-dialog__title {
	margin: 0 0 7px !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: #23372e !important;
	font-size: 24px !important;
	font-weight: 750;
	line-height: 1.25;
	letter-spacing: -.025em;
	box-shadow: none !important;
}

.tdh-express-dialog .tdh-express-dialog__intro {
	margin: 0;
	color: #657267;
	font-size: 13px;
	line-height: 1.5;
}

.tdh-express-dialog__close {
	position: absolute;
	top: 17px;
	right: 17px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid #dce2d5;
	border-radius: 50%;
	background: #fff;
	color: #33483b;
	font: inherit;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.tdh-express-dialog__scroll {
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 25px 30px 30px;
}

.tdh-express-dialog .tdh-express-dialog__body {
	color: #33443a;
	font-size: 16px;
	line-height: 1.8;
	overflow-wrap: anywhere;
}

.tdh-express-dialog__body > :first-child {
	margin-top: 0 !important;
}

/* Neutralise les styles H2/H3 imposés par le thème. */
.tdh-express-dialog .tdh-express-dialog__body :is(h2, h3) {
	display: block;
	width: auto;
	height: auto;
	margin: 27px 0 12px !important;
	padding: 0 0 8px !important;
	border: 0 !important;
	border-bottom: 1px solid #e3e7db !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-image: none !important;
	color: #294c39 !important;
	font-family: inherit;
	font-size: 21px !important;
	font-weight: 750;
	line-height: 1.4;
	text-transform: none !important;
	letter-spacing: normal !important;
	box-shadow: none !important;
	text-shadow: none !important;
	-webkit-text-fill-color: #294c39 !important;
}

.tdh-express-dialog .tdh-express-dialog__body h3 {
	font-size: 18px !important;
	border-bottom: 0 !important;
	padding-bottom: 0 !important;
}

.tdh-express-dialog__body :is(h2, h3)::before,
.tdh-express-dialog__body :is(h2, h3)::after {
	content: none !important;
}

.tdh-express-dialog .tdh-express-dialog__body p {
	margin: 0 0 15px;
	color: #33443a;
	font-size: inherit;
	line-height: inherit;
}

.tdh-express-dialog .tdh-express-dialog__body :is(ul, ol) {
	margin: 0 0 18px;
	padding-left: 24px;
	color: #33443a;
}

.tdh-express-dialog .tdh-express-dialog__body li {
	margin: 0 0 10px;
	padding: 0;
	color: #33443a;
	font-size: inherit;
	line-height: inherit;
}

.tdh-express-dialog__footer {
	flex-shrink: 0;
	max-height: 40dvh;
	overflow-y: auto;
	padding: 17px 25px;
	border-top: 1px solid #e3e7db;
	background: #f5f7ef;
}

.tdh-express-dialog__actions,
.tdh-express-dialog__settings {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.tdh-express-dialog__settings {
	margin-top: 12px;
}

.tdh-express-dialog__settings label {
	display: flex;
	align-items: center;
	gap: 7px;
	color: #536354;
	font-size: 12px;
}

.tdh-express-dialog__settings select {
	max-width: 100%;
	min-height: 35px;
	padding: 6px 9px;
	border: 1px solid #dce2d5;
	border-radius: 7px;
	background: #fff;
	color: #263d2e;
	font: inherit;
	font-size: 12px;
}

.tdh-express-dialog__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 15px;
	border: 1px solid #38634e;
	border-radius: 9px;
	background: #38634e;
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 650;
	line-height: 1.5;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.tdh-express-dialog__button--secondary {
	border-color: #dce2d5;
	background: #fff;
	color: #36503f;
}

.tdh-express-dialog button:disabled,
.tdh-express-dialog select:disabled {
	cursor: not-allowed;
	opacity: .5;
}

.tdh-express-dialog [data-tdh-play][aria-pressed="true"] {
	outline: 2px solid #bb8c27;
	outline-offset: 2px;
}

.tdh-express-dialog .tdh-express-dialog__status {
	margin: 10px 0 0;
	color: #657267;
	font-size: 12px;
	line-height: 1.5;
}

.tdh-express-dialog :is(button, select):focus-visible {
	outline: 3px solid #ad811b;
	outline-offset: 3px;
}

/* Suivi de la lecture dans l'article et dans la fenêtre. */
.tdh-speaking {
	outline: 2px solid #bb8c27 !important;
	outline-offset: 5px;
	border-radius: 4px;
	scroll-margin-top: 110px;
}

/* Ne modifie plus les couleurs des titres dans l'article. */
.tdh-express-dialog .tdh-speaking {
	background-color: #fff1bd !important;
	color: #263d2e !important;
	scroll-margin-top: 20px;
}

@media (max-width: 600px) {
	dialog.tdh-express-dialog {
		width: calc(100vw - 16px);
		max-height: calc(100dvh - 16px);
		border-radius: 14px;
	}

	.tdh-express-dialog__header {
		padding: 20px 55px 16px 20px;
	}

	.tdh-express-dialog__scroll {
		padding: 20px;
	}

	.tdh-express-dialog__footer {
		padding: 14px 18px;
	}

	.tdh-express-dialog .tdh-express-dialog__title {
		font-size: 21px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tdh-reader * {
		transition: none !important;
	}
}

@media print {
	.tdh-reader,
	.tdh-express-dialog {
		display: none !important;
	}
}
