/* ==========================================================================
   Catalogue Matériel POS — caisses.tn (Prix sur Devis)
   Architecture CSS Grid + Subgrid, Zéro Scroll Horizontal (320px–1440px)
   ========================================================================== */

.hw-catalog-section {
	position: relative;
}

.hw-section-header {
	margin-bottom: 32px;
}

/* Bandeau réassurance devis */
.hw-trust-strip {
	display: flex;
	flex-wrap: wrap;
	flex-wrap: balance;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 32px;
}

.hw-trust-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-inline-size: 0;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 9999px;
	padding: 0.5rem 1rem;
	font-size: 0.85rem;
	color: #334155;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.hw-trust-pill i {
	color: #0284c7;
	font-size: 0.95rem;
	flex-shrink: 0;
}

.hw-trust-pill strong {
	color: #0f172a;
}

/* Barre de filtres par catégorie */
.hw-filter-toolbar {
	margin-bottom: 30px;
	text-align: center;
}

.hw-filter-bar {
	display: flex;
	flex-wrap: wrap;
	flex-wrap: balance;
	justify-content: center;
	gap: 0.55rem;
	margin-bottom: 14px;
}

.hw-filter-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	min-inline-size: 0;
	padding: 0.55rem 0.95rem;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	background: #ffffff;
	color: #334155;
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.25;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.hw-filter-btn:hover {
	border-color: #0284c7;
	color: #0369a1;
	background: #f0f9ff;
}

.hw-filter-btn:focus-visible {
	outline: 2px solid #0284c7;
	outline-offset: 2px;
}

.hw-filter-btn[aria-pressed="true"],
.hw-filter-btn.is-active {
	background: #0f172a;
	border-color: #0f172a;
	color: #ffffff;
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

/* Indicateur actif non basé uniquement sur la couleur (WCAG 1.4.1 / Forced Colors) */
.hw-filter-btn[aria-pressed="true"]::after,
.hw-filter-btn.is-active::after {
	content: "";
	position: absolute;
	inset: auto 10px -1.5px 10px;
	border-block-end: 3px solid #f59e0b;
	border-radius: 2px;
}

.hw-filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-inline-size: 1.35rem;
	padding: 0.1rem 0.4rem;
	border-radius: 9999px;
	background: #e2e8f0;
	color: #0f172a;
	font-size: 0.74rem;
	font-weight: 700;
}

.hw-filter-btn[aria-pressed="true"] .hw-filter-count,
.hw-filter-btn.is-active .hw-filter-count {
	background: #f59e0b;
	color: #0f172a;
}

.hw-results-status {
	font-size: 0.88rem;
	color: #64748b;
	margin: 0;
}

.hw-results-status strong {
	color: #0f172a;
}

/* Grille Catalogue Responsive (CSS Grid + Subgrid) */
.hw-catalog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
	gap: 1.5rem;
	align-items: stretch;
}

@media (min-width: 992px) {
	.hw-catalog-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Fiche Produit (<article class="hw-card">) */
.hw-card {
	background: #ffffff;
	border: 1.5px solid #e2e8f0;
	border-radius: 18px;
	overflow: clip;
	display: grid;
	/* Fallback même cascade avant subgrid */
	grid-template-rows: auto auto 1fr auto;
	grid-row: span 4;
	grid-template-rows: subgrid;
	row-gap: 0;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.hw-card[hidden] {
	display: none !important;
}

.hw-card:hover {
	transform: translateY(-4px);
	border-color: #38bdf8;
	box-shadow: 0 16px 34px rgba(15, 23, 42, 0.09);
}

.hw-card.is-selected {
	border-color: #f59e0b;
	box-shadow: 0 12px 28px rgba(245, 158, 11, 0.18);
}

/* Région 1 : Média direct (<img>) */
.hw-card-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: #f1f5f9;
	border-bottom: 1px solid #e2e8f0;
}

/* Région 2 : En-tête fiche */
.hw-card-header {
	padding: 1.15rem 1.25rem 0.6rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.hw-card-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.15rem;
}

.hw-badge-cat {
	display: inline-block;
	background: #e0f2fe;
	color: #0369a1;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 0.24rem 0.6rem;
	border-radius: 6px;
}

.hw-badge-software {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	background: #dcfce7;
	color: #166534;
	font-size: 0.72rem;
	font-weight: 700;
	padding: 0.24rem 0.6rem;
	border-radius: 6px;
}

.hw-card-title {
	font-size: 1.12rem;
	font-weight: 800;
	line-height: 1.3;
	color: #0f172a;
	margin: 0;
}

.hw-card-title-link {
	color: inherit !important;
	text-decoration: none !important;
	transition: color 0.18s ease;
}

.hw-card-title-link:hover {
	color: #0284c7 !important;
}

.hw-card-subtitle {
	font-size: 0.84rem;
	font-weight: 600;
	color: #0284c7;
	margin: 0;
	line-height: 1.4;
}

/* Région 3 : Corps, Description SEO & Bandeau Tarif "Sur devis" */
.hw-card-body {
	padding: 0.4rem 1.25rem 1rem 1.25rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 0.75rem;
}

.hw-card-desc {
	font-size: 0.84rem;
	line-height: 1.5;
	color: #334155;
	margin: 0;
}

.hw-card-bottom-meta {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin-top: auto;
}

.hw-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.4rem 0.65rem;
	padding-top: 0.55rem;
	border-top: 1px solid #f1f5f9;
	font-size: 0.74rem;
	font-weight: 600;
	color: #64748b;
}

.hw-stock-dot {
	color: #15803d;
	font-weight: 700;
}

.hw-stock-dot::before {
	content: "● ";
	font-size: 0.65rem;
}

.hw-card-detail-link {
	color: #0284c7 !important;
	font-weight: 700;
	text-decoration: none !important;
}

.hw-card-detail-link:hover {
	text-decoration: underline !important;
}

.hw-card-features {
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 0.85rem;
	color: #475569;
	line-height: 1.5;
}

.hw-card-features li {
	position: relative;
	padding-left: 1.2rem;
	margin-bottom: 0.45rem;
}

.hw-card-features li:last-child {
	margin-bottom: 0;
}

.hw-card-features li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: #10b981;
	font-weight: 800;
}

.hw-price-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.7rem 0.9rem;
	background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
	border: 1px solid #fcd34d;
	border-radius: 12px;
}

.hw-price-main {
	display: flex;
	flex-direction: column;
	min-inline-size: 0;
}

.hw-price-caption {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #92400e;
}

.hw-price-value {
	font-size: 1.15rem;
	font-weight: 900;
	color: #b45309;
	line-height: 1.2;
}

.hw-price-hint {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.74rem;
	font-weight: 700;
	color: #0f172a;
	background: rgba(255, 255, 255, 0.78);
	padding: 0.25rem 0.55rem;
	border-radius: 9999px;
	white-space: nowrap;
}

.hw-price-hint i {
	color: #d97706;
}

/* Région 4 : Actions pied de carte */
.hw-card-footer {
	padding: 0 1.25rem 1.25rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.hw-btn-quote {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.7rem 1rem;
	border: none;
	border-radius: 10px;
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	color: #ffffff;
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hw-btn-quote:hover {
	background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
	box-shadow: 0 6px 16px rgba(2, 132, 199, 0.28);
}

.hw-btn-quote:focus-visible,
.hw-btn-select:focus-visible,
.hw-btn-wa:focus-visible {
	outline: 2px solid #0284c7;
	outline-offset: 2px;
}

.hw-card-secondary-actions {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.5rem;
}

.hw-btn-select {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.5rem 0.75rem;
	border: 1.5px solid #cbd5e1;
	border-radius: 9px;
	background: #f8fafc;
	color: #334155;
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hw-btn-select:hover {
	border-color: #f59e0b;
	background: #fffbeb;
	color: #92400e;
}

.hw-btn-select[aria-pressed="true"] {
	border-color: #d97706;
	background: #fef3c7;
	color: #92400e;
}

.hw-btn-wa {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.5rem 0.8rem;
	border: 1.5px solid #bbf7d0;
	border-radius: 9px;
	background: #f0fdf4;
	color: #15803d !important;
	font-size: 0.8rem;
	font-weight: 700;
	text-decoration: none !important;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hw-btn-wa:hover {
	background: #16a34a;
	border-color: #16a34a;
	color: #ffffff !important;
}

/* Bannière Devis Groupé */
.hw-custom-banner {
	margin-top: 40px;
	padding: 28px 32px;
	border-radius: 20px;
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	border: 1px solid rgba(56, 189, 248, 0.28);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	color: #ffffff;
}

.hw-custom-banner-copy {
	flex: 1 1 320px;
	min-inline-size: 0;
}

.hw-custom-banner-copy h3 {
	font-size: 1.28rem;
	font-weight: 800;
	color: #ffffff;
	margin: 0 0 0.45rem 0;
}

.hw-custom-banner-copy p {
	font-size: 0.92rem;
	color: #cbd5e1;
	margin: 0;
	line-height: 1.55;
}

.hw-custom-banner-actions {
	flex-shrink: 0;
}

/* Bloc SEO Couverture Nationale Tunisie */
.hw-seo-coverage {
	margin-top: 28px;
	padding: 24px 28px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
}

.hw-seo-coverage h3 {
	font-size: 1.05rem;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 0.5rem 0;
}

.hw-seo-coverage p {
	font-size: 0.86rem;
	line-height: 1.65;
	color: #475569;
	margin: 0;
}

/* Barre flottante Sélection Devis Multi-Matériels */
.hw-quote-tray {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1030;
	width: min(680px, calc(100% - 160px));
	background: #0f172a;
	color: #ffffff;
	border: 1.5px solid #f59e0b;
	border-radius: 16px;
	padding: 0.75rem 1rem;
	box-shadow: 0 18px 42px rgba(9, 13, 22, 0.45);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.85rem;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

body.modal-open .hw-quote-tray {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.hw-quote-tray[hidden] {
	display: none !important;
}

.hw-quote-tray-info {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-inline-size: 0;
}

.hw-quote-tray-badge {
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 50%;
	background: #f59e0b;
	color: #0f172a;
	font-weight: 900;
	font-size: 0.95rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.hw-quote-tray-text {
	display: flex;
	flex-direction: column;
	min-inline-size: 0;
}

.hw-quote-tray-text strong {
	font-size: 0.92rem;
	color: #ffffff;
	line-height: 1.2;
}

.hw-quote-tray-text span {
	font-size: 0.75rem;
	color: #94a3b8;
}

.hw-quote-tray-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

.hw-tray-btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 0.95rem;
	border: none;
	border-radius: 10px;
	background: linear-gradient(135deg, #f59e0b, #d97706);
	color: #0f172a;
	font-size: 0.84rem;
	font-weight: 800;
	cursor: pointer;
	white-space: nowrap;
}

.hw-tray-btn-wa {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.55rem 0.85rem;
	border-radius: 10px;
	background: #16a34a;
	color: #ffffff !important;
	font-size: 0.84rem;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
}

.hw-tray-btn-clear {
	width: 34px;
	height: 34px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	background: transparent;
	color: #cbd5e1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.hw-tray-btn-clear:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
}

/* Responsive Mobile & Tablette */
@media (max-width: 991px) {
	.hw-quote-tray {
		width: calc(100% - 24px);
		bottom: 92px;
		flex-wrap: wrap;
	}
}

@media (max-width: 575px) {
	.hw-custom-banner {
		padding: 22px 18px;
	}
	.hw-banner-cta {
		width: 100%;
	}
	.hw-filter-btn {
		padding: 0.45rem 0.72rem;
		font-size: 0.8rem;
	}
	.hw-quote-tray {
		padding: 0.7rem 0.8rem;
	}
	.hw-quote-tray-actions {
		width: 100%;
		justify-content: stretch;
	}
	.hw-tray-btn-primary,
	.hw-tray-btn-wa {
		flex: 1 1 auto;
		justify-content: center;
	}
}

/* ==========================================================================
   Pages SEO Dédiées (/materiel/, /materiel/<slug>/), Fil d'Ariane & Blog
   ========================================================================== */
.hw-breadcrumb ol {
	list-style: none;
	padding: 0;
	margin: 0 0 1.25rem 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.85rem;
	color: #64748b;
}

.hw-breadcrumb li:not(:last-child)::after {
	content: "›";
	margin-inline-start: 0.45rem;
	color: #94a3b8;
}

.hw-breadcrumb a {
	color: #0284c7 !important;
	font-weight: 600;
	text-decoration: none !important;
}

.hw-breadcrumb a:hover {
	text-decoration: underline !important;
}

.hw-archive-hero {
	background: linear-gradient(135deg, #090d16 0%, #0f172a 60%, #1e293b 100%);
	color: #ffffff;
	padding: 48px 0;
}

.hw-archive-h1 {
	font-size: clamp(1.65rem, 3vw, 2.35rem);
	font-weight: 800;
	color: #ffffff;
	margin: 0 0 0.75rem 0;
}

.hw-archive-lead {
	font-size: 1.02rem;
	color: #cbd5e1;
	max-width: 760px;
	margin: 0 auto 1.25rem auto;
}

.hw-archive-cta-row {
	display: inline-flex;
	justify-content: center;
}

.hw-single-page {
	background: #f8fafc;
}

.hw-single-hero {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	padding: 28px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	gap: 2rem;
	align-items: start;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.hw-single-img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 14px;
	border: 1px solid #e2e8f0;
	display: block;
}

.hw-single-title {
	font-size: clamp(1.5rem, 2.6vw, 2.05rem);
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 0.4rem 0;
}

.hw-single-subtitle {
	font-size: 1rem;
	font-weight: 700;
	color: #0284c7;
	margin: 0 0 0.75rem 0;
}

.hw-single-desc {
	font-size: 0.94rem;
	line-height: 1.6;
	color: #334155;
	margin: 0 0 1rem 0;
}

.hw-single-h2 {
	font-size: 1.02rem;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 0.65rem 0;
}

.hw-single-actions {
	display: grid;
	gap: 0.65rem;
}

.hw-single-quote-box {
	margin-top: 2.25rem;
	background: #ffffff;
	border: 1.5px solid #e2e8f0;
	border-top: 4px solid #f59e0b;
	border-radius: 20px;
	padding: 28px 30px;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.hw-single-quote-box h2 {
	font-size: 1.35rem;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 0.4rem 0;
}

.hw-single-quote-lead {
	font-size: 0.9rem;
	color: #64748b;
	margin: 0 0 1.25rem 0;
}

.hw-related-section {
	margin-top: 2.75rem;
}

.hw-related-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}

.hw-related-head h2 {
	font-size: 1.3rem;
	font-weight: 800;
	color: #0f172a;
	margin: 0;
}

.hw-related-all {
	color: #0284c7 !important;
	font-weight: 700;
	font-size: 0.92rem;
	text-decoration: none !important;
}

/* Section Derniers Articles de Blog & Encart Maillage Interne */
.hw-blog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
	gap: 1.5rem;
}

.hw-blog-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	overflow: clip;
	display: flex;
	flex-direction: column;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hw-blog-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.hw-blog-thumb {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
}

.hw-blog-card-body {
	padding: 1.2rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.55rem;
}

.hw-blog-date {
	font-size: 0.78rem;
	font-weight: 600;
	color: #64748b;
}

.hw-blog-card-title {
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.35;
	margin: 0;
}

.hw-blog-card-title a {
	color: #0f172a !important;
	text-decoration: none !important;
}

.hw-blog-card-title a:hover {
	color: #0284c7 !important;
}

.hw-blog-card-excerpt {
	font-size: 0.86rem;
	line-height: 1.55;
	color: #475569;
	margin: 0;
	flex: 1;
}

.hw-blog-readmore {
	font-size: 0.86rem;
	font-weight: 700;
	color: #0284c7 !important;
	text-decoration: none !important;
}

.hw-blog-cta-box {
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	color: #ffffff;
	border: 1.5px solid #f59e0b;
	border-radius: 18px;
	padding: 26px 28px;
}

.hw-blog-cta-box h2 {
	font-size: 1.25rem;
	font-weight: 800;
	color: #ffffff;
	margin: 0 0 0.6rem 0;
}

.hw-blog-cta-box p {
	font-size: 0.92rem;
	line-height: 1.6;
	color: #cbd5e1;
	margin: 0 0 1.15rem 0;
}

.hw-blog-cta-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.75rem;
}

.hw-blog-h1 {
	font-size: clamp(1.55rem, 2.8vw, 2.15rem) !important;
	font-weight: 800 !important;
	color: #0f172a !important;
	line-height: 1.25 !important;
	margin-bottom: 1rem !important;
}

@media (max-width: 991px) {
	.hw-single-hero {
		grid-template-columns: 1fr;
		padding: 20px;
	}
	.hw-single-quote-box {
		padding: 22px 18px;
	}
}
