/* ==========================================================================
   Section « Comment ça fonctionne »
   Tout est préfixé .hiw- pour ne jamais entrer en conflit avec le thème.
   ========================================================================== */

.hiw {
	--hiw-red: #E80000;
	--hiw-ink: #0B0D14;
	--hiw-text: #404452;
	--hiw-bg: #FBFAFB;
	--hiw-radius: 20px;
	--hiw-max: 1800px;
	--hiw-weight: 800;

	--hiw-dark: #0B0D14;
	--hiw-on-dark: #FFFFFF;
	--hiw-ring: #EDECEF;
	--hiw-rule: #0B0D14;
	--hiw-badge-size: 58px;
	--hiw-badge-bg: #CC1818;
	--hiw-badge-ink: #FFFFFF;
	--hiw-card-shadow: 0 14px 44px rgba(19, 21, 34, .06);

	position: relative;
	background: var(--hiw-bg);
	padding: clamp(52px, 6vw, 96px) clamp(20px, 3.5vw, 56px) clamp(56px, 6.5vw, 104px);
	color: var(--hiw-text);
	overflow: hidden;
}

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

/* Halo rouge diffus dans le coin supérieur droit, comme sur la maquette */
.hiw::before {
	content: "";
	position: absolute;
	top: -26%;
	right: -8%;
	width: 42%;
	height: 130%;
	background: radial-gradient(closest-side, rgba(11, 13, 20, .045), transparent 72%);
	pointer-events: none;
}

/* Courbes claires et arcs pointillés : un seul SVG, aucune image à charger */
.hiw-decor {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.hiw-inner {
	position: relative;
	max-width: var(--hiw-max);
	margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Pilule et titre
   -------------------------------------------------------------------------- */

.hiw-badge {
	display: flex;
	align-items: center;
	gap: 11px;
	width: fit-content;
	margin: 0 auto 24px;
	padding: 13px 26px;
	background: var(--hiw-badge-bg);
	border-radius: 999px;
	color: var(--hiw-badge-ink);
	font-size: 20px;
	font-weight: 300;
	line-height: 1;
	box-shadow: 0 6px 20px rgba(11, 13, 20, .06);
}

.hiw-badge-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 21px;
	height: 21px;
	flex: 0 0 auto;
}

.hiw-badge-icon i {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 17px;
	line-height: 1;
}

.hiw-badge svg,
.hiw-feature-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.hiw .hiw-title {
	margin: 0;
	text-align: center;
	color: var(--hiw-ink);
	font-size: 40px;
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -.025em;
}

.hiw-title-rule {
	display: block;
	width: 60px;
	height: 2px;
	margin: 20px auto 0;
	background: var(--hiw-rule);
	border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Étapes
   -------------------------------------------------------------------------- */

.hiw-steps {
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: 0;
	margin-top: clamp(52px, 5vw, 74px);
}

.hiw-step {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	display: block;
	padding: calc(var(--hiw-badge-size) * .62 + 18px) 32px 32px;
	background: #fff;
	border-radius: var(--hiw-radius);
	box-shadow: var(--hiw-card-shadow);
}

/* Pastille en débord : elle porte l'icône, ou le numéro si numbers="yes" */
.hiw-step-badge {
	position: absolute;
	top: calc(var(--hiw-badge-size) * -.4);
	left: 30px;
	width: var(--hiw-badge-size);
	height: var(--hiw-badge-size);
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, #23263A, #0B0D14);
	color: var(--hiw-on-dark);
	border-radius: 50%;
	font-size: calc(var(--hiw-badge-size) * .34);
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 0 0 9px var(--hiw-ring), 0 8px 18px rgba(11, 13, 20, .22);
}

/* Par défaut l'icône suit le diamètre de la pastille. --hiw-icon-size permet
   de la figer, pour garder la même taille d'icône d'une section à l'autre
   même si les pastilles diffèrent. */
.hiw-step-badge svg {
	width: var(--hiw-icon-size, calc(var(--hiw-badge-size) * .46));
	height: var(--hiw-icon-size, calc(var(--hiw-badge-size) * .46));
	display: block;
}

.hiw-step-badge i {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: var(--hiw-icon-size, calc(var(--hiw-badge-size) * .46));
	line-height: 1;
}

.hiw-step-body {
	min-width: 0;
}

/* Remise à zéro des marges ET du rembourrage que le thème pose sur les <p>
   et les <h3>. Le padding compte autant que la marge : il gonfle la boîte
   sans se voir. */
.hiw .hiw-step .hiw-step-body > *,
.hiw .hiw-feature .hiw-feature-body > * {
	margin: 0;
	padding: 0 !important;
}

.hiw .hiw-step .hiw-step-body h3 {
	margin: 0;
	color: var(--hiw-ink);
	font-size: 23px;
	font-weight: var(--hiw-weight);
	line-height: 1.3;
	letter-spacing: -.01em;
}

.hiw .hiw-step .hiw-rule {
	display: block;
	width: 34px;
	height: 2px;
	margin: 9px 0 4px;
	background: var(--hiw-rule);
	border-radius: 999px;
}

.hiw .hiw-step .hiw-step-body p {
	margin: 12px 0 0;
	font-size: 17px;
	line-height: 1.65;
	color: var(--hiw-text);
}

/* --------------------------------------------------------------------------
   Connecteur entre les étapes : une longue flèche, rien d'autre
   -------------------------------------------------------------------------- */

.hiw-connector {
	flex: 0 0 auto;
	align-self: center;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 clamp(12px, 1.6vw, 28px);
	color: var(--hiw-red);
	line-height: 1;
}

/* Icône Font Awesome */
.hiw-connector i {
	display: block;
	font-size: 30px;
}

/* Repli SVG, si Font Awesome n'est pas chargé sur la page */
.hiw-connector svg {
	display: block;
	width: 46px;
	height: auto;
}

/* --------------------------------------------------------------------------
   Avantages
   -------------------------------------------------------------------------- */

.hiw-features {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 26px;
	margin-top: clamp(34px, 3.4vw, 50px);
}

.hiw-features--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hiw-features--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hiw-features--1 { grid-template-columns: minmax(0, 1fr); }

.hiw-feature {
	position: relative;
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 30px 28px;
	background: #fff;
	border-radius: var(--hiw-radius);
	box-shadow: var(--hiw-card-shadow);
	overflow: hidden;
}

.hiw-feature-icon {
	flex: 0 0 auto;
	width: 68px;
	height: 68px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--hiw-dark);
	border-radius: 50%;
	color: var(--hiw-on-dark);
}

.hiw-feature-icon svg {
	width: 31px;
	height: 31px;
}

.hiw-feature-icon i {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 27px;
	line-height: 1;
}

.hiw-feature-body {
	min-width: 0;
}

.hiw .hiw-feature .hiw-feature-body h3 {
	margin: 0 0 3px;
	color: var(--hiw-ink);
	font-size: 18px;
	font-weight: var(--hiw-weight);
	line-height: 1.3;
	letter-spacing: -.01em;
}

.hiw .hiw-feature .hiw-feature-body p {
	margin: 12px 0 0;
	font-size: 15.5px;
	line-height: 1.6;
	color: var(--hiw-text);
}

/* --------------------------------------------------------------------------
   Adaptatif
   -------------------------------------------------------------------------- */

@media (max-width: 1240px) {
	.hiw-features {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 1080px) {
	/* Les cartes passent l'une sous l'autre : les connecteurs horizontaux
	   n'auraient plus de sens, on les retire plutôt que de les tordre. */
	.hiw-steps {
		flex-direction: column;
		gap: 34px;
	}

	.hiw-connector {
		display: none;
	}

	.hiw-step {
		padding-top: calc(var(--hiw-badge-size) * .62 + 22px);
	}
}

@media (max-width: 560px) {
	.hiw-features {
		grid-template-columns: minmax(0, 1fr);
	}

	.hiw-feature {
		align-items: flex-start;
		gap: 15px;
		padding: 24px 22px;
	}

	.hiw-badge {
		font-size: 16px;
		padding: 11px 20px;
	}

	.hiw .hiw-title {
		font-size: 32px;
	}

	.hiw .hiw-step .hiw-step-body p { font-size: 16px; }
}
