/**
 * Pages de rubrique : liste des fiches [emtechnik_rubrique] (grille de cartes) et
 * tableau comparatif (.emt-comparatif, dans un texte Elementor).
 * Charte du site : Roboto, titres violet #94006b, texte noir.
 * Sélecteurs préfixés par .emt-rubrique : ils passent devant les styles globaux du kit Elementor.
 */

/* Titres du contenu des pages de rubrique en pleine largeur. Le thème enfant met les widgets
   en largeur automatique (.flex .elementor-widget-wrap > .elementor-element) : deux titres courts
   qui se suivent (titre de la FAQ et première question) s'affichaient sur la même ligne. */
[data-elementor-type="wp-page"] .elementor-widget-wrap > .elementor-element.elementor-widget-heading {
	width: 100%;
}

/* Tableau comparatif : charte des tableaux du 17/09 (en-têtes gris, 1re colonne violet pâle).
   Sur mobile, il défile en largeur dans son cadre au lieu d'élargir la page. */
.emt-comparatif {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0 0 1.25rem;
}

.emt-comparatif table {
	width: 100%;
	min-width: 560px;
	margin: 0;
	border-collapse: collapse;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #000;
}

.emt-comparatif caption {
	caption-side: bottom;
	padding-top: 0.5rem;
	font-size: 13px;
	text-align: left;
	color: #555;
}

.emt-comparatif th,
.emt-comparatif td {
	padding: 0.5em 0.6em;
	border: 1px solid #d6d6d6;
	text-align: left;
	vertical-align: top;
}

.emt-comparatif thead th {
	background: #DCDCDC;
	font-weight: bold;
}

/* 1re colonne fixe : le nom du tuyau reste visible quand le tableau défile sur mobile. */
.emt-comparatif thead th:first-child,
.emt-comparatif tbody th {
	position: sticky;
	left: 0;
	z-index: 1;
}

/* :nth-child(n) : passe devant le zèbre du thème Hello (tbody > tr:nth-child(odd) > th). */
.emt-comparatif table tbody > tr:nth-child(n) > th {
	background: #F2E0ED;
	font-weight: bold;
	white-space: nowrap;
}

.emt-rubrique {
	margin: 2rem 0;
}

.emt-rubrique .emt-rubrique__titre {
	font-family: "Roboto", sans-serif;
	font-size: 17px;
	font-weight: bold;
	color: #94006b;
	text-transform: none;
	line-height: 1.2;
	margin: 0 0 1rem;
}

.emt-rubrique .emt-rubrique__liste {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 1.25rem;
}

/* Carte entière cliquable : le lien du nom s'étend sur toute la carte. */
.emt-rubrique .emt-rubrique__carte {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0 0 1rem;
	background: #fff;
	border: 1px solid #e3e3e3;
	transition: border-color 200ms ease-in, box-shadow 200ms ease-in;
}

.emt-rubrique .emt-rubrique__carte:hover,
.emt-rubrique .emt-rubrique__carte:focus-within {
	border-color: #94006b;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.emt-rubrique .emt-rubrique__image {
	aspect-ratio: 4 / 3;
	background: #fff;
	border-bottom: 1px solid #f0f0f0;
	overflow: hidden;
}

/* Fiche sans aucune image (en attente de photo) : cadre gris clair. */
.emt-rubrique .emt-rubrique__image--vide {
	background: #f6f6f6;
}

/* Photo entière (contain) : les détails techniques du tuyau ne sont pas rognés. */
.emt-rubrique .emt-rubrique__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	margin: 0;
}

.emt-rubrique .emt-rubrique__nom {
	font-family: "Roboto", sans-serif;
	font-size: 16px;
	font-weight: bold;
	line-height: 1.25;
	text-transform: none;
	margin: 0.75rem 1rem 0.5rem;
}

.emt-rubrique .emt-rubrique__nom a {
	color: #94006b;
	text-decoration: none;
}

.emt-rubrique .emt-rubrique__nom a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.emt-rubrique .emt-rubrique__nom a:focus-visible {
	outline: none;
}

.emt-rubrique .emt-rubrique__carte:focus-within {
	outline: 2px solid #94006b;
	outline-offset: 2px;
}

.emt-rubrique .emt-rubrique__desc {
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	line-height: 1.45;
	color: #000;
	margin: 0 1rem 0.75rem;
}

/* Pied de carte (températures, normes, bouton), calé en bas : les boutons s'alignent d'une carte à l'autre. */
.emt-rubrique .emt-rubrique__pied {
	margin: auto 1rem 0;
}

.emt-rubrique .emt-rubrique__infos {
	font-family: "Roboto", sans-serif;
	font-size: 13px;
	line-height: 1.4;
	color: #000;
	margin: 0;
}

/* Bouton visuel : la carte entière est le lien. Chevron dessiné en CSS. */
.emt-rubrique .emt-rubrique__bouton {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin-top: 0.75rem;
	padding: 0.45em 0.9em;
	font-family: "Roboto", sans-serif;
	font-size: 13px;
	font-weight: bold;
	line-height: 1.2;
	color: #94006b;
	border: 1px solid #94006b;
	border-radius: 3px;
	transition: background-color 200ms ease-in, color 200ms ease-in;
}

.emt-rubrique .emt-rubrique__bouton::after {
	content: "";
	width: 0.4em;
	height: 0.4em;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
}

.emt-rubrique .emt-rubrique__carte:hover .emt-rubrique__bouton,
.emt-rubrique .emt-rubrique__carte:focus-within .emt-rubrique__bouton {
	background-color: #94006b;
	color: #fff;
}

/* Libellé et valeur sur la même ligne, la valeur continue à la ligne si elle est longue. */
.emt-rubrique .emt-rubrique__infos div {
	margin: 0;
}

.emt-rubrique .emt-rubrique__infos dt,
.emt-rubrique .emt-rubrique__infos dd {
	display: inline;
	margin: 0;
}

.emt-rubrique .emt-rubrique__infos dt {
	font-weight: bold;
	color: #94006b;
}

/* « : » après le libellé, espace insécable à la française. */
.emt-rubrique .emt-rubrique__infos dt::after {
	content: "\00a0: ";
}
