/* Tableau Excel → tableau HTML accessible : zone de collage, options, aperçu, code */
.pdx-th.survol { border-color: var(--orange-texte); box-shadow: 0 0 0 0.2em var(--peche); }

/* Zone de collage : défile dans sa boîte, jamais la page */
.pdx-th-source {
	display: block;
	width: 100%;
	min-height: 10em;
	padding: 0.85em 1em;
	border: 1px solid transparent;
	border-radius: 0.7em;
	background: var(--brume);
	color: var(--encre);
	font: 400 0.9em/1.5 var(--mono);
	tab-size: 4;
	white-space: pre;
	overflow: auto;
	resize: vertical;
}
.pdx-th-source:focus { outline: 0; border-color: var(--encre); background: #fff; }

.pdx-th-actions { display: flex; flex-wrap: wrap; gap: 0.5em; margin-top: 0.7em; }
.pdx-th-ouvrir { display: inline-block; }
.pdx-th-actions .copier, .pdx-th-ouvrir { padding: 0.5em 1em; }

/* Groupes d'options */
.pdx-th-options { margin: 1.4em 0 0; padding: 1.1em 0 0; border: 0; border-top: 1px solid var(--trait); min-width: 0; }
.pdx-th-options legend { padding: 0; font: 500 0.78em/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris); }
.pdx-th-options .pv-cases { margin: 0.8em 0 0; }
.pdx-th-options .pv-choix { margin: 0.8em 0 0; }
.pdx-th-options .outil-etiquette { margin-top: 0.9em; }
.pdx-th-facultatif { font-weight: 400; color: var(--gris); }
.pdx-th-champ {
	width: 100%;
	max-width: 36em;
	padding: 0.85em 1em;
	border: 1px solid transparent;
	border-radius: 0.7em;
	background: var(--brume);
	color: var(--encre);
	font: 500 1em/1.3 var(--texte);
}
.pdx-th-champ:focus { outline: 0; border-color: var(--encre); background: #fff; }
select.pdx-th-champ { text-overflow: ellipsis; }

/* Résultat */
.pdx-th-res { margin-top: 0.5em; }
.pdx-th-res .res-bloc:first-child { margin-top: 2em; }
.pdx-th-apercu {
	overflow-x: auto;
	padding: 1.2em;
	border: 1px solid var(--trait);
	border-radius: 0.9em;
	background: #fff;
	color: #1f2933;
	font: 400 1em/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* Aperçu « Pour WordPress » : rendu neutre, proche d'un thème par défaut */
.pdx-th-apercu-wp figure { margin: 0; }
.pdx-th-apercu-wp table { border-collapse: collapse; width: 100%; }
.pdx-th-apercu-wp caption { padding: 0 0 0.6em; text-align: left; font-weight: 700; }
.pdx-th-apercu-wp th, .pdx-th-apercu-wp td { padding: 0.5em 0.75em; border: 1px solid #d5dbe1; text-align: left; vertical-align: top; }
.pdx-th-apercu-wp thead th { border-bottom-width: 2px; }
.pdx-th-apercu [role="region"]:focus-visible { outline: 0.15em solid var(--orange); outline-offset: 0.2em; }

.pdx-th-enreg code { max-height: 24em; overflow: auto; white-space: pre; overflow-wrap: normal; tab-size: 2; }

@media (max-width: 40em) {
	.pdx-th-actions .copier, .pdx-th-ouvrir { flex: 1 1 auto; text-align: center; }
	.pdx-th-apercu { padding: 0.8em; }
}
