/*
Theme Name: Habitat Compare
Theme URI: https://habitat-compare.fr
Description: Thème enfant de Twenty Twenty-Five pour Habitat Compare.
Author: iKeros
Template: twentytwentyfive
Version: 0.4.7
Requires at least: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: habitat-compare
*/

/* Styles complémentaires uniquement : privilégier theme.json. */

/* ------------------------------------------------------------------
 * Page Artisans : tableau comparatif des offres (.hc-offer-comparison)
 * ------------------------------------------------------------------ */
.hc-section-soft {
	background-color: var(--wp--preset--color--accent-5);
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--60);
}

.hc-offer-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.hc-offer-comparison {
	width: 100%;
	min-width: 640px;
	border-collapse: collapse;
	background-color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.hc-offer-comparison th,
.hc-offer-comparison td {
	padding: 0.9rem 1rem;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 15%, transparent);
	text-align: left;
	vertical-align: top;
}

.hc-offer-comparison thead th {
	font-size: var(--wp--preset--font-size--medium);
	vertical-align: bottom;
}

.hc-offer-comparison .criteria,
.hc-offer-comparison tbody th {
	width: 22%;
	font-weight: 600;
}

/* Colonne mise en avant : offre avec site internet. */
.hc-offer-comparison th:nth-child(3),
.hc-offer-comparison td:nth-child(3) {
	background-color: color-mix(in srgb, var(--wp--preset--color--accent-1) 18%, var(--wp--preset--color--base));
}

.hc-offer-comparison .plan-name,
.hc-offer-comparison .site-addon,
.hc-offer-comparison .plan-price,
.hc-offer-comparison .plan-detail,
.hc-offer-comparison .agency-partner {
	display: block;
}

.hc-offer-comparison .site-addon {
	font-weight: 400;
}

.hc-offer-comparison .popular-badge {
	display: inline-block;
	margin-top: 0.5rem;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.hc-offer-comparison .plan-price {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
}

.hc-offer-comparison .plan-detail {
	margin-top: 0.25rem;
	opacity: 0.8;
}

.hc-offer-comparison .unavailable {
	opacity: 0.5;
}

.hc-offer-comparison .agency-partner {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 15%, transparent);
}

.hc-offer-comparison details summary {
	cursor: pointer;
	font-weight: 600;
}

.hc-offer-comparison details h3 {
	margin: 1rem 0 0.25rem;
	font-size: var(--wp--preset--font-size--medium);
}

.hc-offer-comparison details ol {
	padding-left: 1.25rem;
}

/* Boutons du tableau : même rendu que le bloc Bouton du thème. */
.hc-button {
	display: inline-block;
	padding: 0.7rem 1.2rem;
	border: 2px solid var(--wp--preset--color--contrast);
	border-radius: 9999px;
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-weight: 600;
	text-decoration: none;
}

.hc-button:hover,
.hc-button:focus-visible {
	background-color: color-mix(in srgb, var(--wp--preset--color--contrast) 85%, transparent);
	border-color: transparent;
}

.hc-button-outline {
	background-color: transparent;
	color: var(--wp--preset--color--contrast);
}

.hc-button-outline:hover,
.hc-button-outline:focus-visible {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.hc-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--contrast);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------
 * Base de la charte (compléments à theme.json)
 * ------------------------------------------------------------------ */

/* Focus clavier : anneau bleu de 3 px, décalé de 2 px, sur tout élément cliquable. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent-3);
	outline-offset: 2px;
}

/* Liens : soulignement discret, plus lisible. */
:where(.wp-site-blocks) a:where(:not(.wp-element-button)) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

/* Boutons : zone cliquable de 44 px minimum. */
.wp-element-button,
.wp-block-button__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

/* Titre d'accueil (taille « display »). */
.has-display-font-size {
	line-height: 1;
	letter-spacing: -0.035em;
}

/* Sur-titre : 14 px gras, majuscules, interlettrage 0.1em. */
.hc-surtitre {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-3);
}

/* Texte secondaire. */
.hc-discret {
	color: var(--wp--preset--color--accent-4);
}

/* ------------------------------------------------------------------
 * En-tête (B01, B30, variante artisans)
 * ------------------------------------------------------------------ */
.hc-header {
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
	padding-top: var(--wp--preset--spacing--40);
	padding-bottom: var(--wp--preset--spacing--40);
}

.hc-header__inner {
	gap: var(--wp--preset--spacing--50);
}

.hc-logo {
	display: inline-flex;
	flex-shrink: 0;
	line-height: 0;
}

.hc-logo img {
	width: 176px;
	height: auto;
}

.hc-header__nav .wp-block-navigation-item__content {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.hc-header__nav .wp-block-navigation-item__content:hover,
.hc-header__nav .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--accent-3);
}

.hc-mega-menu .wp-block-navigation-item > a.wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	min-height: 44px;
}

.hc-mega-menu .hc-mega-menu__icone {
	box-sizing: border-box;
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	padding: 7px;
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--accent-1);
}

.hc-mega-menu .hc-mega-menu__icone--depannage {
	background: var(--wp--preset--color--accent-2);
}

.hc-mega-menu .is-menu-open .wp-block-navigation__container {
	width: 100%;
	align-items: flex-start;
}

.hc-mega-menu .is-menu-open .wp-block-navigation-item {
	align-items: flex-start;
}

@media (max-width: 1099px) {
	.hc-mega-menu .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
	}

	.hc-mega-menu .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none;
	}
}

@media (min-width: 1100px) {
	.hc-header__inner:has(.hc-mega-menu) {
		position: relative;
	}

	.hc-header__inner .hc-mega-menu,
	.hc-mega-menu .wp-block-navigation__responsive-container:not(.is-menu-open),
	.hc-mega-menu .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-dialog,
	.hc-mega-menu .wp-block-navigation__container > .has-child {
		position: static;
	}

	.hc-mega-menu .wp-block-navigation__container > li > a .hc-mega-menu__icone {
		display: none;
	}

	.hc-mega-menu .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
		align-items: start;
		gap: 12px;
		top: 100%;
		left: 0;
		right: 0;
		height: auto;
		width: auto;
		max-height: min(60vh, 30rem);
		overflow: auto;
		padding: 20px;
		border: 1px solid var(--wp--preset--color--accent-6);
		border-top: 3px solid var(--wp--preset--color--accent-3);
		border-radius: 0 0 var(--wp--custom--radius--lg) var(--wp--custom--radius--lg);
		z-index: 10;
	}

	.hc-mega-menu .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container > li {
		display: block;
		padding: 8px;
		border-radius: var(--wp--custom--radius--md);
		background: var(--wp--preset--color--accent-5);
	}

	.hc-mega-menu .wp-block-navigation__submenu-container .wp-block-navigation-item > a {
		padding: 5px 8px;
		border-radius: var(--wp--custom--radius--sm);
	}

	.hc-mega-menu .wp-block-navigation__submenu-container .wp-block-navigation-item > a:hover {
		background: var(--wp--preset--color--base);
	}

	.hc-mega-menu .wp-block-navigation__submenu-container .has-child > a {
		font-weight: 700;
	}

	/* Le deuxième niveau reste visible dans chaque groupe du panneau ouvert. */
	.hc-mega-menu .wp-block-navigation__submenu-container .has-child > .wp-block-navigation__submenu-icon {
		display: none;
	}

	.hc-mega-menu .wp-block-navigation__submenu-container .has-child > .wp-block-navigation__submenu-container {
		position: static;
		height: auto;
		width: 100%;
		min-width: 0;
		visibility: inherit;
		opacity: 1;
		border: 0;
		background: transparent;
	}
}

.hc-header__actions {
	gap: var(--wp--preset--spacing--30);
	flex-shrink: 0;
}

.hc-header__actions p {
	margin: 0;
}

.hc-header__brand {
	gap: var(--wp--preset--spacing--30);
}

.hc-header__espace {
	margin: 0;
	padding-left: var(--wp--preset--spacing--30);
	border-left: 1px solid var(--wp--preset--color--accent-6);
	font-weight: 700;
	color: var(--wp--preset--color--accent-4);
}

.hc-header__reassurance {
	margin: 0;
}

/* En-tête fixe sur ordinateur (sur mobile, c'est la barre du bas qui reste visible). */
@media (min-width: 1024px) and (min-height: 600px) {
	.wp-site-blocks > header.wp-block-template-part {
		position: sticky;
		top: var(--wp-admin--admin-bar--height, 0px);
		z-index: 100;
	}

	/* Les ancres (#offres, sommaire des pages légales…) ne passent pas sous l'en-tête. */
	html {
		scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 88px);
	}
}

/* ------------------------------------------------------------------
 * Pied de page (B15, B34)
 * ------------------------------------------------------------------ */
.hc-footer {
	border-top: 1px solid var(--wp--preset--color--accent-6);
}

.hc-footer__title {
	margin-bottom: var(--wp--preset--spacing--30);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-4);
}

.hc-footer__nav {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	gap: var(--wp--preset--spacing--20);
}

.hc-footer__nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.hc-footer__nav .wp-block-navigation-item__content:hover {
	text-decoration: underline;
}

.hc-footer--minimal .hc-footer__nav {
	gap: var(--wp--preset--spacing--40);
}

.hc-footer__copyright {
	margin-top: var(--wp--preset--spacing--70);
	padding-top: var(--wp--preset--spacing--50);
	border-top: 1px solid var(--wp--preset--color--accent-6);
}

/* ------------------------------------------------------------------
 * Barre fixe en bas d'écran (B16) : mobile uniquement
 * ------------------------------------------------------------------ */
/* !important : la mise en page « flex » de WordPress (.is-layout-flex) l'emporterait sinon. */
@media (min-width: 769px) {
	.hc-sticky-bar {
		display: none !important;
	}
}

@media (max-width: 768px) {
	.hc-sticky-bar {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 50;
		margin: 0 !important; /* Annule l'écart entre blocs de premier niveau. */
		padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40) calc(var(--wp--preset--spacing--30) + env(safe-area-inset-bottom));
		background-color: var(--wp--preset--color--base);
		border-top: 1px solid var(--wp--preset--color--accent-6);
	}

	.hc-sticky-bar .wp-block-buttons {
		width: 100%;
		gap: var(--wp--preset--spacing--30);
	}

	.hc-sticky-bar .wp-block-button {
		flex: 1 1 0;
	}

	.hc-sticky-bar .wp-block-button__link {
		width: 100%;
	}

	/* Laisse la place à la barre sous le pied de page. */
	body:has(.hc-sticky-bar) {
		padding-bottom: 80px;
	}

	.hc-hide-mobile {
		display: none !important; /* Remplacé par la barre fixe sur mobile. */
	}

	.hc-logo img {
		width: 148px;
	}
}

/* ------------------------------------------------------------------
 * Bandeau temporaire « nouveau nom » (B39) et 404
 * ------------------------------------------------------------------ */
.hc-bandeau-nom p {
	margin: 0;
}

.hc-liste-metiers {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30);
	padding: 0;
	list-style: none;
}

.hc-liste-metiers a {
	display: inline-block;
	padding: 10px 16px;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--full);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
	text-decoration: none;
}

.hc-liste-metiers a:hover {
	border-color: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--accent-3);
}

/* ==================================================================
 * Blocs réutilisables des pages (générés dans content-sync/pages)
 * ================================================================== */

/* Sections pleine largeur collées les unes aux autres. */
.wp-block-post-content > .alignfull {
	margin-block: 0;
}

.hc-section,
.hc-urgence,
.hc-cta,
.hc-bandeau-artisans {
	padding-top: var(--wp--preset--spacing--80);
	padding-bottom: var(--wp--preset--spacing--80);
}

/* Longueur de ligne limitée, texte aligné à gauche avec les titres
   (la mise en page « contrainte » centre les blocs : on réduit par la droite). */
.hc-section > p,
.hc-section > ul,
.hc-section > ol,
.hc-urgence > p,
.hc-bandeau-artisans > p {
	box-sizing: border-box;
	/* Les % de padding se calculent sur la section (pas sur le bloc, limité
	   à la largeur large) : on prend donc la plus petite des deux. */
	padding-right: max(0px, calc(min(100%, var(--wp--style--global--wide-size, 1240px)) - 760px));
}

.hc-section > h2 {
	margin-bottom: var(--wp--preset--spacing--60);
}

.hc-section > h3 {
	margin-top: var(--wp--preset--spacing--70);
}

/* Textes clairs sur fonds sombres (encre, bleu). */
.has-base-color :where(h1, h2, h3, h4, a:not(.wp-element-button)) {
	color: inherit;
}

/* ---------------- Hero (B03) ---------------- */
.hc-hero {
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: var(--wp--preset--spacing--80);
}

.hc-hero__cols {
	gap: var(--wp--preset--spacing--70);
}

.hc-hero__image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--lg);
}

.hc-breadcrumb {
	margin-bottom: var(--wp--preset--spacing--50);
	color: var(--wp--preset--color--accent-4);
}

.hc-breadcrumb a {
	color: inherit;
}

.hc-hero--sombre .hc-breadcrumb {
	color: var(--wp--custom--logo--compare-sur-sombre);
}

.hc-hero.has-terracotta-background-color .hc-breadcrumb {
	color: var(--wp--preset--color--base);
}

.hc-hero--sombre .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--base);
}

.hc-hero.has-contrast-background-color .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
	background-color: var(--wp--preset--color--corail-texte);
}

.hc-hero.has-terracotta-background-color .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--terracotta);
}

.hc-hero--sombre .wp-block-button > .wp-block-button__link:hover {
	text-decoration: underline;
}

.hc-chips-label {
	margin-bottom: var(--wp--preset--spacing--20);
	font-weight: 700;
}

@media (max-width: 781px) {
	.hc-hero__image img {
		aspect-ratio: auto;
		height: 200px;
	}
}

/* ---------------- Pastilles de liens (travaux, symptômes, liens associés) ---------------- */
.hc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	margin: var(--wp--preset--spacing--40) 0;
	padding: 0;
	list-style: none;
}

.hc-chips li {
	margin: 0;
}

.hc-chips a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 16px;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--full);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.hc-chips a:hover {
	border-color: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--accent-3);
}

.has-base-color .hc-chips a {
	border-color: rgba(255, 255, 255, 0.35);
	background-color: transparent;
	color: var(--wp--preset--color--base);
}

.has-base-color .hc-chips a:hover {
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--base);
}

/* ---------------- Bloc « Quels travaux ? » du haut de page ----------------
 * Groupe .hc-choix-travaux : intitulé, pastilles et boutons dans un même encadré.
 * Icône de chaque pastille ajoutée par le thème (inc/hc-icones.php). */
.hc-choix-travaux {
	margin-top: var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50) var(--wp--preset--spacing--50);
	border: 1px solid #c9d6ff;
	border-radius: var(--wp--custom--radius--lg);
	background-color: var(--wp--preset--color--accent-1);
}

.hc-choix-travaux > * {
	margin-top: 0;
	margin-bottom: 0;
}

.hc-choix-travaux .hc-chips-label {
	margin-bottom: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--accent-3);
	font-size: var(--wp--preset--font-size--medium) !important;
	letter-spacing: -0.01em;
}

.hc-choix-travaux .hc-chips {
	margin: 0;
}

.hc-choix-travaux .hc-chips a {
	min-height: 48px;
	padding: 10px 16px 10px 14px;
	border-color: #c9d6ff;
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--base);
	box-shadow: 0 1px 2px rgba(14, 27, 51, 0.06);
	color: var(--wp--preset--color--contrast);
	font-size: 16px;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hc-choix-travaux .hc-chips a::after {
	content: "→";
	margin-left: 0.5em;
	color: var(--wp--preset--color--accent-3);
}

.hc-choix-travaux .hc-chips a.hc-ic::before {
	margin-right: 0.5em;
	color: var(--wp--preset--color--accent-3);
}

.hc-choix-travaux .hc-chips a:hover,
.hc-choix-travaux .hc-chips a:focus-visible {
	border-color: var(--wp--preset--color--accent-3);
	background-color: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--base);
}

.hc-choix-travaux .hc-chips a:hover::after,
.hc-choix-travaux .hc-chips a:hover::before,
.hc-choix-travaux .hc-chips a:focus-visible::after,
.hc-choix-travaux .hc-chips a:focus-visible::before {
	color: inherit;
}

/* Deuxième liste (accueil : « Une panne, une fuite ? ») : simple lien d'urgence. */
.hc-choix-travaux .hc-chips + .hc-chips {
	margin-top: var(--wp--preset--spacing--40);
}

.hc-choix-travaux .hc-chips + .hc-chips a {
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--wp--preset--color--corail-texte);
}

.hc-choix-travaux .hc-chips + .hc-chips a::after {
	color: inherit;
}

.hc-choix-travaux .hc-chips + .hc-chips a:hover,
.hc-choix-travaux .hc-chips + .hc-chips a:focus-visible {
	background: none;
	color: var(--wp--preset--color--corail-texte);
	text-decoration: underline;
}

/* Boutons d'action en pied d'encadré. */
.hc-choix-travaux .wp-block-buttons {
	margin-top: var(--wp--preset--spacing--40);
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid #c9d6ff;
}

/* Haut de page sombre : encadré translucide et pastilles claires. */
.hc-hero--sombre .hc-choix-travaux {
	border-color: rgba(255, 255, 255, 0.45);
	border-top: 3px solid var(--wp--preset--color--accent-1);
	background-color: rgba(255, 255, 255, 0.14);
}

.hc-hero--sombre .hc-choix-travaux .hc-chips-label {
	color: var(--wp--preset--color--base);
}

.hc-hero.has-terracotta-background-color .hc-choix-travaux {
	border-top-color: var(--wp--preset--color--accent-2);
}

.hc-hero--sombre .hc-choix-travaux .wp-block-buttons {
	border-top-color: rgba(255, 255, 255, 0.22);
}

.hc-hero--sombre .hc-choix-travaux .hc-chips a {
	border-color: transparent;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.hc-hero--sombre .hc-choix-travaux .hc-chips a::after,
.hc-hero--sombre .hc-choix-travaux .hc-chips a.hc-ic::before {
	color: var(--wp--preset--color--corail-texte);
}

.hc-hero--sombre .hc-choix-travaux .hc-chips a:hover,
.hc-hero--sombre .hc-choix-travaux .hc-chips a:focus-visible {
	background-color: var(--wp--preset--color--corail-texte);
	color: var(--wp--preset--color--base);
}

.hc-hero--sombre .hc-choix-travaux .hc-chips + .hc-chips a {
	background: transparent;
	color: var(--wp--preset--color--base);
	text-decoration: underline;
}

.hc-hero--sombre .hc-choix-travaux .hc-chips + .hc-chips a::after {
	color: inherit;
}

@media (max-width: 600px) {
	.hc-choix-travaux {
		padding-right: var(--wp--preset--spacing--40);
		padding-left: var(--wp--preset--spacing--40);
	}

	.hc-choix-travaux .hc-chips:first-of-type {
		flex-direction: column;
	}

	.hc-choix-travaux .hc-chips:first-of-type a {
		box-sizing: border-box;
		width: 100%;
	}

	.hc-choix-travaux .hc-chips:first-of-type a::after {
		margin-left: auto;
	}

	.hc-choix-travaux .wp-block-button,
	.hc-choix-travaux .wp-block-button__link {
		width: 100%;
	}
}

/* ---------------- Réassurance (B04) et listes cochées ---------------- */
.hc-reassurance-band {
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--50);
	border-top: 1px solid var(--wp--preset--color--accent-6);
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}

.hc-reassurance {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
	line-height: 1.45;
}

.hc-reassurance li,
.hc-checks li {
	position: relative;
	padding-left: 30px;
}

.hc-reassurance li::before,
.hc-checks li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.3em;
	width: 14px;
	height: 8px;
	border-left: 2px solid var(--wp--preset--color--vert-verifie);
	border-bottom: 2px solid var(--wp--preset--color--vert-verifie);
	transform: rotate(-45deg);
}

.hc-checks {
	padding: 0;
	list-style: none;
}

.hc-checks li + li {
	margin-top: var(--wp--preset--spacing--20);
}

.has-base-color .hc-checks li::before {
	border-color: var(--wp--custom--logo--compare-sur-sombre);
}

/* ---------------- Cartes (B06, B19, B20, B36…) ---------------- */
.hc-cards {
	gap: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--50);
}

.hc-card {
	padding: var(--wp--preset--spacing--50);
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--lg);
	background-color: var(--wp--preset--color--accent-5);
}

.hc-section:not(.has-background) .hc-card {
	background-color: var(--wp--preset--color--base);
}

.hc-card > :first-child {
	margin-top: 0;
}

.hc-card > :last-child {
	margin-bottom: 0;
}

.hc-card h3 {
	margin-bottom: var(--wp--preset--spacing--30);
}

.hc-card h3 a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.hc-card h3 a::after {
	content: " →";
	color: var(--wp--preset--color--accent-3);
}

.hc-card h3 a:hover {
	color: var(--wp--preset--color--accent-3);
}

.hc-card p {
	font-size: 16px;
}

.hc-card .hc-chips a {
	min-height: 36px;
	padding: 6px 12px;
	font-size: 14px;
}

/* ---------------- Étapes numérotées (B08, B25, B28, B42, B47) ---------------- */
.hc-steps {
	counter-reset: hc-step;
	padding: 0;
	list-style: none;
}

.hc-steps li {
	position: relative;
	min-height: 44px;
	padding-left: 64px;
	counter-increment: hc-step;
}

.hc-steps li + li {
	margin-top: var(--wp--preset--spacing--50);
}

.hc-steps li::before {
	content: counter(hc-step);
	position: absolute;
	left: 0;
	top: -0.2em;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--base);
	font-weight: 700;
}

.hc-steps li:last-child::before {
	background-color: var(--wp--preset--color--corail);
}

/* ---------------- Tableaux (prix, comparatifs, pannes) ---------------- */
.hc-table {
	overflow-x: auto;
	margin-top: var(--wp--preset--spacing--50);
	margin-bottom: var(--wp--preset--spacing--50);
}

.hc-table table {
	width: 100%;
	min-width: 520px;
	border-collapse: collapse;
	background-color: var(--wp--preset--color--base);
	font-size: 16px;
}

.hc-table th,
.hc-table td {
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
	text-align: left;
	vertical-align: top;
}

.hc-table thead th {
	background-color: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--accent-3);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.hc-table td:last-child {
	font-weight: 700;
	white-space: nowrap;
}

.hc-table tbody tr:last-child td {
	border-bottom: 0;
}

/* ---------------- FAQ (B12) ---------------- */
.hc-faq {
	border-top: 1px solid var(--wp--preset--color--accent-6);
}

.hc-faq details {
	padding: var(--wp--preset--spacing--40) 0;
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}

.hc-faq summary {
	position: relative;
	min-height: 32px;
	padding-right: 40px;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	list-style: none;
	cursor: pointer;
}

.hc-faq summary::-webkit-details-marker {
	display: none;
}

.hc-faq summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: -2px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: var(--wp--custom--radius--sm);
	background-color: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--accent-3);
	font-size: 22px;
}

.hc-faq details[open] summary::after {
	content: "−";
}

.hc-faq details > p {
	margin-top: var(--wp--preset--spacing--30);
	max-width: 760px;
}

/* ---------------- Urgence (B05), CTA final (B14), bandeau artisans (B40) ---------------- */
.hc-urgence h2,
.hc-cta h2,
.hc-bandeau-artisans h2 {
	margin-top: 0;
}

.hc-cta {
	text-align: center;
}

.hc-cta .wp-block-buttons {
	justify-content: center;
}

/* ---------------- Listes « libellé : valeur », liens de suite ---------------- */
.hc-kv {
	padding-left: 1.2em;
}

.hc-kv li + li {
	margin-top: var(--wp--preset--spacing--20);
}

.hc-lien-suite a {
	font-weight: 700;
}

/* ---------------- Pages légales ---------------- */
.hc-legal h2 {
	margin-top: var(--wp--preset--spacing--70);
	scroll-margin-top: 24px;
	font-size: 26px;
}

.hc-sommaire {
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--50) var(--wp--preset--spacing--50) 2.6em;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--lg);
	background-color: var(--wp--preset--color--base);
}

[id] {
	scroll-margin-top: 24px;
}

/* ==================================================================
 * Formulaires (Contact Form 7) : devis en étapes, inscription, contact
 * ================================================================== */
.wpcf7-form {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	max-width: 640px;
}

.wpcf7-form label,
.wpcf7-form legend {
	display: grid;
	gap: var(--wp--preset--spacing--20);
	font-weight: 700;
}

.wpcf7-form fieldset {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.wpcf7-form fieldset.hc-etape > legend {
	margin-bottom: var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--large);
	letter-spacing: -0.02em;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form select,
.wpcf7-form textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: 1.5px solid var(--wp--custom--field-border, #ddd6c9);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-weight: 400;
}

.wpcf7-form textarea {
	min-height: 120px;
	resize: vertical;
}

.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
	border-color: var(--wp--preset--color--accent-3);
}

.wpcf7-form [aria-invalid="true"] {
	border-color: var(--wp--preset--color--corail-texte);
}

/* Choix (boutons radio et cases) présentés en pastilles cliquables. */
.wpcf7-form .hc-choix .wpcf7-form-control {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30);
}

.wpcf7-form .hc-choix .wpcf7-list-item {
	margin: 0;
}

.wpcf7-form .hc-choix .wpcf7-list-item label {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	min-height: 44px;
	padding: 8px 16px;
	border: 1.5px solid var(--wp--custom--field-border, #ddd6c9);
	border-radius: var(--wp--custom--radius--full);
	background-color: var(--wp--preset--color--base);
	font-weight: 400;
	cursor: pointer;
}

.wpcf7-form .hc-choix .wpcf7-list-item label:has(input:checked) {
	border-color: var(--wp--preset--color--accent-3);
	background-color: var(--wp--preset--color--accent-1);
	font-weight: 700;
}

.wpcf7-form .hc-choix--nombre .wpcf7-list-item label {
	justify-content: center;
	min-width: 72px;
	font-size: var(--wp--preset--font-size--large);
}

.wpcf7-form .hc-choix legend {
	margin-bottom: var(--wp--preset--spacing--30);
}

/* Consentement. */
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item {
	margin: 0;
}

.wpcf7-form .wpcf7-acceptance label {
	display: flex;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
}

.wpcf7-form .wpcf7-acceptance input {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 2px;
}

/* Bouton d'envoi : mêmes réglages que les boutons du thème. */
.wpcf7-form .wpcf7-submit {
	justify-self: start;
	min-height: 48px;
	padding: 14px 22px;
	border: 0;
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--corail);
	color: var(--wp--preset--color--base);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.wpcf7-form .wpcf7-submit:hover {
	background-color: var(--wp--preset--color--corail-texte);
}

.wpcf7-form .wpcf7-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.wpcf7-form .hc-aide,
.wpcf7-form .hc-bascule {
	margin: 0;
	color: var(--wp--preset--color--accent-4);
	font-size: var(--wp--preset--font-size--small);
}

.wpcf7-form .hc-champ-fort {
	font-size: var(--wp--preset--font-size--lead);
}

/* Erreurs (script du thème et Contact Form 7). */
.wpcf7-form .hc-erreur,
.wpcf7-form .wpcf7-not-valid-tip {
	display: block;
	margin-top: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--corail-texte);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

.wpcf7-form .hc-erreur + .wpcf7-not-valid-tip {
	display: none;
}

.wpcf7 form .wpcf7-response-output {
	margin: 0;
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--wp--custom--radius--md);
}

/* Étapes (actives seulement avec le script). */
.hc-etapes-actif fieldset.hc-etape[hidden],
.wpcf7-form .hc-q[hidden] {
	display: none;
}

.hc-progression {
	position: relative;
	margin: 0;
	padding-bottom: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--accent-4);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

.hc-progression::before,
.hc-progression::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	height: 6px;
	border-radius: var(--wp--custom--radius--full);
}

.hc-progression::before {
	right: 0;
	background-color: var(--wp--preset--color--accent-6);
}

.hc-progression::after {
	width: var(--hc-avancement, 0%);
	background-color: var(--wp--preset--color--accent-3);
	transition: width 0.2s ease;
}

.hc-etape__nav {
	display: flex;
	flex-wrap: wrap-reverse;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
}

.hc-etape__continuer {
	min-height: 48px;
	margin-left: auto;
	border: 0;
	cursor: pointer;
}

.hc-etape__retour {
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--accent-3);
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

/* Page /devis/ et pages de confirmation. */
.hc-formulaire h1 {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--xx-large);
}

.hc-formulaire .hc-appel-seul {
	margin-bottom: var(--wp--preset--spacing--50);
}

.hc-recap {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	max-width: 640px;
	margin: var(--wp--preset--spacing--50) 0;
	padding: var(--wp--preset--spacing--50);
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--lg);
	background-color: var(--wp--preset--color--accent-5);
}

.hc-recap div {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--wp--preset--spacing--30);
}

.hc-recap dt {
	min-width: 160px;
	color: var(--wp--preset--color--accent-4);
}

.hc-recap dd {
	margin: 0;
	font-weight: 700;
}

/* Lien « Afficher le numéro » et bouton d'appel en attente de réponse. */
[aria-busy="true"] {
	cursor: progress;
	opacity: 0.7;
}

/* ==================================================================
 * Icônes (assets/icons, voir inc/hc-icones.php)
 * Classes « hc-ic hc-ic-<clé> » sur un bloc : icône devant le texte, couleur du texte.
 * Cartes : pastille ajoutée automatiquement (.hc-card__icone).
 * ================================================================== */
.hc-ic::before,
.hc-card__icone::before {
	content: "";
	display: inline-block;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: var(--hc-ic) center / contain no-repeat;
	mask: var(--hc-ic) center / contain no-repeat;
}

.hc-ic::before {
	width: 1.2em;
	height: 1.2em;
	margin-right: 0.4em;
	vertical-align: -0.22em;
}

.hc-card__icone {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin-bottom: var(--wp--preset--spacing--40);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--accent-3);
}

.hc-card__icone::before {
	width: 28px;
	height: 28px;
}

.hc-card__icone[class*="-depannage"],
.hc-card__icone.hc-ic-urgence {
	background-color: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--corail-texte);
}

.hc-icone {
	width: 1.5em;
	height: 1.5em;
	vertical-align: middle;
}

.hc-ic-couvreur { --hc-ic: url("assets/icons/couvreur.svg"); }
.hc-ic-facade { --hc-ic: url("assets/icons/facade.svg"); }
.hc-ic-menuisier { --hc-ic: url("assets/icons/menuisier.svg"); }
.hc-ic-isolation { --hc-ic: url("assets/icons/isolation.svg"); }
.hc-ic-chauffagiste { --hc-ic: url("assets/icons/chauffagiste.svg"); }
.hc-ic-climatisation { --hc-ic: url("assets/icons/climatisation.svg"); }
.hc-ic-refection-toiture { --hc-ic: url("assets/icons/refection-toiture.svg"); }
.hc-ic-reparation-fuite-toiture { --hc-ic: url("assets/icons/reparation-fuite-toiture.svg"); }
.hc-ic-nettoyage-demoussage-toiture { --hc-ic: url("assets/icons/nettoyage-demoussage-toiture.svg"); }
.hc-ic-gouttieres-zinguerie { --hc-ic: url("assets/icons/gouttieres-zinguerie.svg"); }
.hc-ic-fenetre-de-toit { --hc-ic: url("assets/icons/fenetre-de-toit.svg"); }
.hc-ic-ravalement-facade { --hc-ic: url("assets/icons/ravalement-facade.svg"); }
.hc-ic-nettoyage-demoussage-facade { --hc-ic: url("assets/icons/nettoyage-demoussage-facade.svg"); }
.hc-ic-fenetres { --hc-ic: url("assets/icons/fenetres.svg"); }
.hc-ic-porte-entree { --hc-ic: url("assets/icons/porte-entree.svg"); }
.hc-ic-porte-garage { --hc-ic: url("assets/icons/porte-garage.svg"); }
.hc-ic-volets-roulants { --hc-ic: url("assets/icons/volets-roulants.svg"); }
.hc-ic-isolation-combles { --hc-ic: url("assets/icons/isolation-combles.svg"); }
.hc-ic-isolation-par-lexterieur { --hc-ic: url("assets/icons/isolation-par-lexterieur.svg"); }
.hc-ic-isolation-murs-interieur { --hc-ic: url("assets/icons/isolation-murs-interieur.svg"); }
.hc-ic-chaudiere { --hc-ic: url("assets/icons/chaudiere.svg"); }
.hc-ic-chaudiere-granules-bois { --hc-ic: url("assets/icons/chaudiere-granules-bois.svg"); }
.hc-ic-pompe-a-chaleur { --hc-ic: url("assets/icons/pompe-a-chaleur.svg"); }
.hc-ic-poele-granules-bois { --hc-ic: url("assets/icons/poele-granules-bois.svg"); }
.hc-ic-ramonage { --hc-ic: url("assets/icons/ramonage.svg"); }
.hc-ic-climatisation-installation { --hc-ic: url("assets/icons/climatisation-installation.svg"); }
.hc-ic-chaudiere-entretien { --hc-ic: url("assets/icons/chaudiere-entretien.svg"); }
.hc-ic-chaudiere-depannage { --hc-ic: url("assets/icons/chaudiere-depannage.svg"); }
.hc-ic-pompe-a-chaleur-entretien { --hc-ic: url("assets/icons/pompe-a-chaleur-entretien.svg"); }
.hc-ic-pompe-a-chaleur-depannage { --hc-ic: url("assets/icons/pompe-a-chaleur-depannage.svg"); }
.hc-ic-climatisation-entretien { --hc-ic: url("assets/icons/climatisation-entretien.svg"); }
.hc-ic-climatisation-depannage { --hc-ic: url("assets/icons/climatisation-depannage.svg"); }
.hc-ic-volets-roulants-reparation { --hc-ic: url("assets/icons/volets-roulants-reparation.svg"); }
.hc-ic-urgence { --hc-ic: url("assets/icons/urgence.svg"); }
.hc-ic-telephone { --hc-ic: url("assets/icons/telephone.svg"); }
.hc-ic-verifie { --hc-ic: url("assets/icons/verifie.svg"); }
.hc-ic-devis { --hc-ic: url("assets/icons/devis.svg"); }
.hc-ic-comparer { --hc-ic: url("assets/icons/comparer.svg"); }
.hc-ic-artisan { --hc-ic: url("assets/icons/artisan.svg"); }
.hc-ic-lieu { --hc-ic: url("assets/icons/lieu.svg"); }
.hc-ic-prix { --hc-ic: url("assets/icons/prix.svg"); }
.hc-ic-delai { --hc-ic: url("assets/icons/delai.svg"); }
.hc-ic-avis { --hc-ic: url("assets/icons/avis.svg"); }
