/*
 * Listing des chaussures d'haltérophilie d'occasion — thème sombre.
 *
 * Charte halterophiliefrance.fr :
 *   - fond        dégradé bleu #0053C5 vers noir bleuté #00122B, comme les
 *                 grandes sections et la barre de navigation du site
 *   - titres      Oswald 500 majuscule
 *   - CTA         rouge #E63946, texte blanc, pilule 30px
 *   - cartes      rayon 5px + ombre portée
 *
 * Le dégradé du site va de #0053C5 à #00122B en deux arrêts sur des sections
 * de 500 à 1000px. Ce bloc étant beaucoup plus haut, un arrêt intermédiaire a
 * été ajouté à 20 % : le bleu vif reste un halo en tête, comme sur la barre de
 * navigation, et les filtres puis les cartes se posent sur le bleu nuit. Sans
 * cet arrêt, la moitié supérieure du listing serait illisible sur bleu franc.
 * Les couleurs de départ et d'arrivée sont celles du site.
 *
 * Tout est scopé sous .hco-app. Les variables suffisent à recaler le bloc.
 */

.hco-app {
	--hco-blue: #0053c5;
	--hco-deep: #00122b;
	--hco-red: #e63946;

	--hco-surface: rgba(255, 255, 255, 0.06);
	--hco-surface-solid: #04162e;
	--hco-line: rgba(255, 255, 255, 0.14);
	--hco-text: #ffffff;
	--hco-muted: #a8bad4;

	--hco-radius: 5px;
	--hco-pill: 30px;
	--hco-shadow: 0 0 10px rgba(0, 0, 0, 0.45);
	--hco-shadow-hover: 0 0 18px rgba(0, 0, 0, 0.65);

	--hco-font-h1: Poppins, "Segoe UI", -apple-system, sans-serif;
	--hco-font-title: Oswald, "Arial Narrow", "Segoe UI", sans-serif;

	background: linear-gradient(165deg, var(--hco-blue) 0%, #001738 20%, var(--hco-deep) 100%);
	border-radius: var(--hco-radius);
	padding: 40px 28px 48px;
	color: var(--hco-text);
	font-size: 16px;
	line-height: 1.5;
}

@media (max-width: 782px) {
	.hco-app {
		padding: 28px 16px 36px;
	}
}

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

/*
 * Le bloc est souvent posé dans un conteneur Elementor pleine largeur : le
 * dégradé s'étend alors d'un bord à l'autre, mais le contenu doit rester dans
 * une colonne lisible, alignée sur la largeur de contenu du site.
 */
.hco-app__inner {
	max-width: 1240px;
	margin: 0 auto;
}

/* H1 en Poppins 700, sur le halo bleu du dégradé. */
.hco-app__title {
	font-family: var(--hco-font-h1);
	font-weight: 700;
	font-size: 40px;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	color: var(--hco-text);
	text-align: center;
	margin: 0 0 16px;
}

@media (max-width: 782px) {
	.hco-app__title {
		font-size: 28px;
	}
}

.hco-app__intro {
	max-width: 760px;
	margin: 0 auto 20px;
	text-align: center;
	font-size: 16px;
	line-height: 1.6;
	color: #dbe6f5;
}

/* Bandeau de chiffres : la preuve visuelle que la page est un outil vivant. */
.hco-stats {
	list-style: none;
	margin: 0 0 30px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 28px;
	font-size: 14px;
	color: var(--hco-muted);
}

.hco-stats li {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
}

.hco-stats li + li::before {
	content: "";
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.5;
	margin-right: 22px;
	align-self: center;
}

@media (max-width: 600px) {
	.hco-stats li + li::before {
		display: none;
	}
}

.hco-stats strong {
	font-family: var(--hco-font-title);
	font-weight: 500;
	font-size: 17px;
	color: var(--hco-text);
}

/* ---------- Filtres ---------- */

.hco-filters {
	background: var(--hco-surface);
	border: 1px solid var(--hco-line);
	border-radius: var(--hco-radius);
	padding: 22px;
	margin-bottom: 32px;
}

.hco-filters__bar {
	display: grid;
	grid-template-columns: 2fr 1.2fr 0.8fr 0.8fr;
	gap: 14px;
	margin-bottom: 20px;
}

@media (max-width: 782px) {
	.hco-filters__bar {
		grid-template-columns: 1fr 1fr;
	}

	.hco-field--search {
		grid-column: 1 / -1;
	}
}

.hco-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.hco-field__label,
.hco-facet__legend {
	font-family: var(--hco-font-title);
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--hco-text);
}

.hco-field input,
.hco-field select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--hco-line);
	border-radius: var(--hco-radius);
	background: rgba(0, 0, 0, 0.35);
	color: var(--hco-text);
	font-size: 15px;
	line-height: 1.3;
}

.hco-field input::placeholder {
	color: rgba(255, 255, 255, 0.45);
}

/* Les options du <select> sont rendues par le système : sans couleur explicite
   elles héritent du blanc sur fond blanc dans certains navigateurs. */
.hco-field select option {
	background: var(--hco-deep);
	color: var(--hco-text);
}

.hco-field input:focus,
.hco-field select:focus {
	outline: 2px solid var(--hco-red);
	outline-offset: 1px;
	border-color: transparent;
}

/*
 * Les facettes sont des <details> : ouvertes par défaut (donc utilisables sans
 * JavaScript), refermées au chargement sur petit écran par listing.js pour que
 * les résultats restent atteignables sans scroller une page de filtres.
 */
.hco-facet {
	border: 0;
	padding: 0;
	margin: 0 0 18px;
}

.hco-facet__legend {
	padding: 0;
	margin-bottom: 9px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 9px;
	list-style: none;
}

.hco-facet__legend::-webkit-details-marker {
	display: none;
}

.hco-facet__legend::after {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.15s ease;
}

.hco-facet[open] > .hco-facet__legend::after {
	transform: translateY(1px) rotate(-135deg);
}

.hco-facet__legend:focus-visible {
	outline: 2px solid var(--hco-red);
	outline-offset: 2px;
}

.hco-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hco-chip {
	position: relative;
	display: inline-flex;
	cursor: pointer;
}

.hco-chip input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.hco-chip span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border: 1px solid var(--hco-line);
	border-radius: var(--hco-pill);
	background: rgba(0, 0, 0, 0.28);
	color: var(--hco-text);
	font-size: 14px;
	white-space: nowrap;
	transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.hco-chip small {
	font-size: 11px;
	color: var(--hco-muted);
	background: rgba(255, 255, 255, 0.1);
	border-radius: var(--hco-pill);
	padding: 1px 6px;
}

.hco-chip:hover span {
	border-color: #ffffff;
}

.hco-chip input:checked + span {
	background: var(--hco-blue);
	border-color: var(--hco-blue);
	color: #ffffff;
}

.hco-chip input:checked + span small {
	background: rgba(255, 255, 255, 0.25);
	color: #ffffff;
}

.hco-chip input:focus-visible + span {
	outline: 2px solid var(--hco-red);
	outline-offset: 2px;
}

.hco-filters__actions {
	display: flex;
	gap: 10px;
	align-items: center;
}

/* ---------- Boutons ---------- */

.hco-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border: 1px solid transparent;
	border-radius: var(--hco-pill);
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.hco-btn--primary {
	background: var(--hco-red);
	color: #ffffff;
}

.hco-btn--primary:hover,
.hco-btn--primary:focus {
	background: #f2515d;
	color: #ffffff;
}

.hco-btn--ghost {
	background: transparent;
	border-color: var(--hco-line);
	color: var(--hco-text);
}

.hco-btn--ghost:hover {
	border-color: #ffffff;
	color: #ffffff;
}

/* ---------- Résultats ---------- */

.hco-results {
	position: relative;
	min-height: 120px;
	transition: opacity 0.15s ease;
}

.hco-results.is-loading {
	opacity: 0.45;
	pointer-events: none;
}

.hco-count {
	font-family: var(--hco-font-title);
	font-weight: 500;
	font-size: 15px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--hco-muted);
	margin: 0 0 14px;
}

.hco-empty {
	background: var(--hco-surface);
	border: 1px solid var(--hco-line);
	border-radius: var(--hco-radius);
	padding: 32px;
	text-align: center;
	color: var(--hco-muted);
}

.hco-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	/* 260px + 24px de gouttière : 4 cartes par ligne sur 1240px, 3 sur tablette. */
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

.hco-card {
	display: flex;
	flex-direction: column;
	background: var(--hco-surface-solid);
	border: 1px solid var(--hco-line);
	border-radius: var(--hco-radius);
	box-shadow: var(--hco-shadow);
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.hco-card:hover {
	transform: translateY(-2px);
	border-color: rgba(255, 255, 255, 0.32);
	box-shadow: var(--hco-shadow-hover);
}

.hco-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: #0a2242;
	overflow: hidden;
}

.hco-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hco-card__noimage {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	color: var(--hco-muted);
}

/*
 * Les couleurs de plateforme sont conservées volontairement : le badge est une
 * information utile au visiteur (savoir où il atterrit), pas un élément de
 * décoration.
 */
.hco-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 10px;
	border-radius: var(--hco-pill);
	font-family: var(--hco-font-title);
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #ffffff;
	background: var(--hco-blue);
}

.hco-badge--vinted {
	background: #007c82;
}

.hco-badge--leboncoin {
	background: #d95400;
}

.hco-badge--ebay {
	background: #0064d2;
}

.hco-badge--marketplace {
	background: #1877f2;
}

.hco-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px;
	flex: 1;
}

.hco-card__title {
	font-family: var(--hco-font-title);
	font-weight: 500;
	font-size: 18px;
	line-height: 1.25;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: var(--hco-text);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hco-card__title a {
	color: inherit;
	text-decoration: none;
}

.hco-card__title a:hover {
	color: var(--hco-red);
}

.hco-card__name {
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--hco-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hco-card__meta {
	margin: 0;
	font-size: 13px;
	color: #d5e0f0;
}

.hco-card__footer {
	margin-top: auto;
	padding-top: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.hco-card__price {
	font-family: var(--hco-font-title);
	font-weight: 500;
	font-size: 22px;
	line-height: 1;
	color: #ffffff;
	white-space: nowrap;
}

.hco-card__cta {
	padding: 8px 16px;
	font-size: 13px;
}

/* ---------- Pagination ---------- */

.hco-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 32px;
}

.hco-page {
	padding: 10px 20px;
	border: 1px solid var(--hco-line);
	border-radius: var(--hco-pill);
	text-decoration: none;
	color: var(--hco-text);
	font-family: var(--hco-font-title);
	font-weight: 500;
	font-size: 14px;
	text-transform: uppercase;
}

.hco-page:hover {
	background: var(--hco-blue);
	border-color: var(--hco-blue);
	color: #ffffff;
}

.hco-page-info {
	font-size: 14px;
	color: var(--hco-muted);
}

.hco-legal {
	margin-top: 32px;
	font-size: 12px;
	line-height: 1.6;
	color: var(--hco-muted);
}

/* ---------- Contenu éditorial (SEO) ---------- */

.hco-seo {
	margin-top: 48px;
	padding-top: 40px;
	border-top: 1px solid var(--hco-line);
	max-width: 860px;
	margin-left: auto;
	margin-right: auto;
	font-size: 16px;
	line-height: 1.7;
	color: #dbe6f5;
}

.hco-seo h2 {
	font-family: var(--hco-font-title);
	font-weight: 500;
	font-size: 26px;
	line-height: 1.25;
	text-transform: uppercase;
	color: var(--hco-text);
	margin: 40px 0 14px;
	scroll-margin-top: 90px;
}

.hco-seo h2:first-of-type {
	margin-top: 24px;
}

.hco-seo p {
	margin: 0 0 16px;
}

/* Seul le mot-clé principal est en gras dans le corps de texte. Les amorces de
   liste sont simplement mises en couleur, sans graisse. */
.hco-seo strong {
	color: var(--hco-text);
}

.hco-seo__term {
	color: var(--hco-text);
}

.hco-seo a {
	color: #7fb0ff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hco-seo a:hover {
	color: #ffffff;
}

.hco-seo ul,
.hco-seo ol {
	margin: 0 0 18px;
	padding-left: 22px;
}

.hco-seo li {
	margin-bottom: 8px;
}

.hco-seo__toc {
	background: var(--hco-surface);
	border: 1px solid var(--hco-line);
	border-radius: var(--hco-radius);
	padding: 18px 22px;
}

.hco-seo__toc-title {
	font-family: var(--hco-font-title);
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--hco-text);
	margin: 0 0 8px;
}

.hco-seo__toc ul {
	margin: 0;
	padding-left: 18px;
	font-size: 15px;
}

/* Les tableaux doivent défiler dans leur propre boîte sur petit écran. */
.hco-seo table {
	display: block;
	overflow-x: auto;
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 20px;
	font-size: 15px;
}

.hco-seo th,
.hco-seo td {
	border: 1px solid var(--hco-line);
	padding: 10px 12px;
	text-align: left;
	vertical-align: top;
	white-space: nowrap;
}

.hco-seo th {
	background: var(--hco-surface);
	font-family: var(--hco-font-title);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--hco-text);
}

.hco-faq__item {
	border: 1px solid var(--hco-line);
	border-radius: var(--hco-radius);
	background: var(--hco-surface);
	margin-bottom: 10px;
	padding: 0 18px;
}

.hco-faq__item summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 14px 0;
	font-weight: 600;
	color: var(--hco-text);
}

.hco-faq__item summary::-webkit-details-marker {
	display: none;
}

.hco-faq__item summary::after {
	content: "";
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-3px) rotate(45deg);
	transition: transform 0.15s ease;
}

.hco-faq__item[open] summary::after {
	transform: translateY(1px) rotate(-135deg);
}

.hco-faq__item p {
	margin: 0 0 16px;
	font-size: 15px;
}

.hco-seo__more {
	margin-top: 32px;
	padding-top: 20px;
	border-top: 1px solid var(--hco-line);
	font-size: 15px;
}
