.tpd {
	--tpd-accent: #c2185b;
	--tpd-accent-text: #ffffff;
	--tpd-border: rgba(128, 128, 128, 0.4);
	--tpd-soft: rgba(128, 128, 128, 0.1);
	max-width: 760px;
	margin: 1.5em auto;
	padding: 1.25em;
	border: 1px solid var(--tpd-border);
	border-radius: 12px;
	box-sizing: border-box;
}

.tpd *,
.tpd *::before,
.tpd *::after {
	box-sizing: border-box;
}

.tpd-title {
	margin: 0 0 0.75em;
	font-size: 1.4em;
	line-height: 1.25;
}

.tpd-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.9em;
}

@media (min-width: 640px) {
	.tpd-grid {
		grid-template-columns: 1fr 1fr;
	}
	.tpd-wide {
		grid-column: 1 / -1;
	}
}

.tpd-field label {
	display: block;
	margin-bottom: 0.3em;
	font-weight: 600;
	font-size: 0.95em;
}

.tpd-field select,
.tpd-field input[type="text"],
.tpd-field textarea {
	width: 100%;
	padding: 0.6em 0.7em;
	font: inherit;
	color: inherit;
	background: transparent;
	border: 1px solid var(--tpd-border);
	border-radius: 8px;
}

.tpd-field select option {
	color: #111;
	background: #fff;
}

.tpd-field textarea {
	resize: vertical;
}

.tpd-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tpd-btn {
	display: block;
	width: 100%;
	margin-top: 1.1em;
	padding: 0.85em 1em;
	font: inherit;
	font-weight: 700;
	color: var(--tpd-accent-text);
	background: var(--tpd-accent);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}

.tpd-btn:hover {
	filter: brightness(1.08);
}

.tpd-btn:disabled {
	opacity: 0.65;
	cursor: wait;
}

.tpd-result {
	margin-top: 1em;
}

.tpd-text {
	padding: 1em;
	background: var(--tpd-soft);
	border-left: 4px solid var(--tpd-accent);
	border-radius: 8px;
	white-space: pre-line;
	line-height: 1.6;
}

.tpd-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 0.75em;
}

.tpd-small {
	padding: 0.5em 0.9em;
	font: inherit;
	font-size: 0.92em;
	color: inherit;
	text-decoration: none;
	background: transparent;
	border: 1px solid var(--tpd-border);
	border-radius: 8px;
	cursor: pointer;
}

.tpd-small:hover {
	background: var(--tpd-soft);
}

.tpd-note,
.tpd-left {
	margin: 0.5em 0;
	font-size: 0.9em;
	opacity: 0.85;
}

.tpd-error {
	margin: 0;
	padding: 0.8em 1em;
	border: 1px solid #c62828;
	border-radius: 8px;
	color: #c62828;
}


.tpd-related {
	margin-top: 1.25em;
	padding-top: 1em;
	border-top: 1px solid var(--tpd-border);
}

.tpd-related-title {
	margin: 0 0 0.5em;
	font-size: 1.05em;
}

.tpd-related-list {
	margin: 0;
	padding-left: 1.2em;
}

.tpd-related-list li {
	margin: 0.35em 0;
}

@media (prefers-color-scheme: dark) {
	.tpd-error {
		color: #ff8a80;
		border-color: #ff8a80;
	}
}

/* Liste des occasions */
.tpd-occasions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin: 1em 0;
	padding: 0;
	list-style: none;
}

.tpd-occasions li {
	margin: 0;
}

.tpd-occasions a {
	display: inline-block;
	padding: 0.45em 0.95em;
	color: inherit;
	text-decoration: none;
	border: 1px solid rgba(128, 128, 128, 0.4);
	border-radius: 999px;
}

.tpd-occasions a:hover {
	background: rgba(128, 128, 128, 0.12);
}

/* Articles */
.tpd-articles {
	margin: 1.75em 0;
}

.tpd-articles-list {
	margin: 0;
	padding-left: 1.2em;
}

.tpd-articles-list li {
	margin: 0.6em 0;
}

.tpd-articles-list p {
	margin: 0.2em 0 0;
	font-size: 0.92em;
	opacity: 0.8;
}

.tpd-articles-more {
	margin-top: 0.75em;
}

/* Exemples à copier */
.tpd-sample {
	margin: 1em 0;
}

.tpd-sample-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 0.6em;
}
