/**
 * Hosterwise — plan pages v2 "configurator" (templates/product-plan.php) and
 * the plan switch page (templates/product-switch.php).
 * Loaded after woocommerce.css (hw_op_styles()): every rule is scoped to
 * .hw-plan-v2 / .hw-wc--switch so the shop sheet keeps its own plan styles.
 * Tokens & components: main.css (STYLEGUIDE.md).
 */

/* =========================================================================
 * Hero (dark)
 * ====================================================================== */

.hw-plan-v2 .hw-plan-hero {
	position: relative;
	/* Compact: the configurator (durations + price) must show in the first screen. */
	padding-block: clamp(1rem, 0.25rem + 2vw, 2.25rem) calc(clamp(1rem, 0.5rem + 1.5vw, 2rem) + clamp(24px, 4vw, 48px));
	overflow: clip;
}

.hw-plan-v2 .hw-plan-hero__grid {
	position: relative;
	display: grid;
	gap: clamp(1.5rem, 0.5rem + 3vw, 3.5rem);
	align-items: center;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1000px) {
	.hw-plan-v2 .hw-plan-hero__grid {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	}
}

.hw-plan-v2 .hw-plan-hero__intro {
	position: relative;
	z-index: 1;
	min-width: 0;
}

.hw-plan-v2 .hw-plan-hero__intro .hw-breadcrumbs {
	margin-bottom: var(--hw-space-4);
}

/* Price chip + CTA on one row (compact hero, configurator in the first screen). */
.hw-plan-v2 .hw-plan-hero__buy {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--hw-space-4);
	margin-top: var(--hw-space-5);
}

.hw-plan-v2 .hw-plan-hero__buy .hw-actions {
	margin: 0;
}

.hw-plan-v2 .hw-plan-hero .hw-eyebrow--pill {
	margin-bottom: var(--hw-space-3);
}

.hw-plan-v2 .hw-plan-hero__title {
	margin-bottom: 0.3em;
	font-size: clamp(2rem, 1.45rem + 2.1vw, 3.25rem); /* 32 → 52 px, like the offer heroes. */
	font-weight: 800;
	line-height: 1.04;
	letter-spacing: -0.042em;
	text-wrap: balance;
	background: var(--hw-gradient-title);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hw-plan-v2 .hw-plan-hero__lead {
	max-width: 58ch;
	margin-bottom: 0;
}

.hw-plan-v2 .hw-plan-hero__price {
	margin: 0;
	flex-wrap: wrap;
}

.hw-plan-v2 .hw-plan-hero__visual {
	position: relative;
	display: grid;
	gap: var(--hw-space-5);
	justify-items: center;
}

.hw-plan-v2 .hw-plan-hero__visual .hw-illustration {
	--hw-illus-max: 220px;
}

@media (max-width: 999.98px) {
	.hw-plan-v2 .hw-plan-hero__visual .hw-illustration {
		--hw-illus-max: 260px;
	}
}

/* Spec chips under the render. */
.hw-plan-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	max-width: 560px;
	margin: calc(-1 * var(--hw-space-6)) 0 0;
	padding: 0;
	list-style: none;
}

.hw-plan-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.55rem 0.95rem 0.55rem 0.6rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--hw-radius-pill);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
		var(--hw-glass);
	box-shadow: var(--hw-inner-hl);
}

.hw-plan-chip__icon {
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: rgba(1, 200, 239, 0.14);
	color: var(--hw-cyan-bright);
}

.hw-plan-chip__icon .hw-icon {
	--hw-icon-size: 17px;
}

.hw-plan-chip__text {
	display: grid;
	line-height: 1.15;
}

.hw-plan-chip__label {
	font-size: var(--hw-fs-2xs);
	color: var(--hw-text-faint);
}

.hw-plan-chip strong {
	font-family: var(--hw-font-head);
	font-size: var(--hw-fs-sm);
	font-weight: 750;
	color: var(--hw-text);
}

/* =========================================================================
 * Light sheet: configurator
 * ====================================================================== */

.hw-plan-sheet {
	padding-top: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

.hw-plan-v2 .hw-plan-hero__notices:empty {
	display: none;
}

.hw-plan-v2 .hw-pconf {
	position: static;
	display: grid;
	gap: clamp(1.25rem, 0.75rem + 2vw, 2.5rem);
	align-items: start;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

@media (min-width: 1000px) {
	.hw-plan-v2 .hw-pconf {
		grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
	}
}

.hw-pconf__main {
	display: grid;
	gap: var(--hw-space-5);
	min-width: 0;
}

/* Progress: Durée → Commande → Mise en ligne. */
.hw-pconf__steps {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--hw-fs-xs);
	font-weight: 650;
	color: var(--hw-light-faint);
}

.hw-pconf__steps li {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.hw-pconf__steps li + li::before {
	content: "";
	width: 28px;
	height: 1px;
	margin-right: 0.5rem;
	background: var(--hw-light-border-strong);
}

.hw-pconf__steps span {
	display: grid;
	place-items: center;
	width: 1.6rem;
	height: 1.6rem;
	border: 1px solid var(--hw-light-border-strong);
	border-radius: 50%;
	font-family: var(--hw-font-head);
	font-weight: 800;
}

.hw-pconf__steps .is-current {
	color: var(--hw-light-text);
}

.hw-pconf__steps .is-current span {
	border-color: transparent;
	background: var(--hw-gradient-cta);
	color: #fff;
	box-shadow: 0 6px 14px -6px rgba(222, 44, 84, 0.7);
}

.hw-plan-v2 .hw-plan-order__title {
	margin: 0;
	font-size: var(--hw-fs-2xl);
	letter-spacing: -0.03em;
	color: var(--hw-light-text);
}

/* Period cards: 2 columns, the best price highlighted. */
.hw-plan-v2 .hw-terms {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
	gap: 0.85rem;
	margin: 0;
	padding: 0;
	border: 0;
}

.hw-plan-v2 .hw-term {
	position: relative;
	display: block;
	height: 100%;
	cursor: pointer;
}

.hw-plan-v2 .hw-term__box {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	height: 100%;
	padding: 1.15rem 1.25rem 1.2rem;
	border: 1.5px solid var(--hw-light-border);
	border-radius: var(--hw-radius-lg);
	background: #fff;
	box-shadow: var(--hw-light-shadow-sm);
	transition: border-color var(--hw-dur) var(--hw-ease), box-shadow var(--hw-dur) var(--hw-ease), transform var(--hw-dur-slow) var(--hw-ease);
}

/* Radio dot, top right. */
.hw-plan-v2 .hw-term__box::before {
	top: 1.15rem;
	left: auto;
	right: 1.15rem;
	width: 1.3rem;
	height: 1.3rem;
	border: 2px solid var(--hw-light-border-strong);
	background: #fff;
}

.hw-plan-v2 .hw-term:hover .hw-term__box {
	border-color: rgba(0, 116, 163, 0.45);
	transform: translateY(-2px);
	box-shadow: var(--hw-light-shadow);
}

.hw-plan-v2 .hw-term__input:checked + .hw-term__box {
	border-color: var(--hw-light-cyan);
	background:
		radial-gradient(360px 160px at 100% 0%, rgba(1, 200, 239, 0.1), transparent 70%),
		#fff;
	box-shadow: 0 0 0 3px rgba(1, 200, 239, 0.18), var(--hw-light-shadow);
}

.hw-plan-v2 .hw-term__input:checked + .hw-term__box::before {
	border-color: var(--hw-light-cyan);
	box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 10px var(--hw-light-cyan);
}

.hw-plan-v2 .hw-term__input:focus-visible + .hw-term__box {
	outline: 3px solid var(--hw-focus);
	outline-offset: 2px;
}

.hw-plan-v2 .hw-term--best .hw-term__box {
	border-color: rgba(207, 33, 73, 0.35);
}

.hw-plan-v2 .hw-term--best .hw-term__input:checked + .hw-term__box {
	border-color: var(--hw-light-accent);
	box-shadow: 0 0 0 3px rgba(243, 53, 91, 0.16), var(--hw-light-shadow);
}

.hw-plan-v2 .hw-term--best .hw-term__input:checked + .hw-term__box::before {
	border-color: var(--hw-light-accent);
	box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 10px var(--hw-light-accent);
}

.hw-plan-v2 .hw-term__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	padding-right: 2rem;
}

.hw-plan-v2 .hw-term__label {
	font-family: var(--hw-font-head);
	font-size: var(--hw-fs-md);
	font-weight: 750;
	color: var(--hw-light-text);
}

.hw-plan-v2 .hw-term__flag {
	padding: 0.15rem 0.55rem;
	border-radius: var(--hw-radius-pill);
	background: var(--hw-gradient-cta);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hw-plan-v2 .hw-term__pct {
	padding: 0.1rem 0.45rem;
	border-radius: 6px;
	background: rgba(55, 194, 103, 0.14);
	color: #157a3c;
	font-size: var(--hw-fs-xs);
	font-weight: 800;
}

.hw-plan-v2 .hw-term__price {
	align-self: flex-start;
	margin-top: 0.35rem;
	text-align: left;
	font-family: var(--hw-font-head);
	font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
	color: var(--hw-light-text);
	white-space: nowrap;
}

.hw-plan-v2 .hw-term__unit {
	display: inline;
	margin-left: 0.25rem;
	font-family: var(--hw-font-body);
	font-size: var(--hw-fs-xs);
	font-weight: 600;
	letter-spacing: 0;
	color: var(--hw-light-muted);
}

.hw-plan-v2 .hw-term__billed {
	color: var(--hw-light-muted);
	font-size: var(--hw-fs-xs);
}

.hw-plan-v2 .hw-term__save {
	align-self: flex-start;
	margin-top: auto;
	padding: 0.2rem 0.6rem;
	border-radius: var(--hw-radius-pill);
	background: rgba(55, 194, 103, 0.12);
	color: #157a3c;
	font-size: var(--hw-fs-xs);
	font-weight: 700;
}

.hw-plan-v2 .hw-term.is-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Sticky recap: dark island on the light sheet. */
.hw-pconf__recap {
	min-width: 0;
}

@media (min-width: 1000px) {
	.hw-pconf__recap {
		position: sticky;
		top: calc(var(--hw-header-h) + 20px);
	}
}

.hw-pconf__card {
	position: relative;
	display: grid;
	gap: 1rem;
	padding: clamp(1.4rem, 1rem + 1.2vw, 2rem);
	border-radius: var(--hw-radius-xl);
	isolation: isolate;
	overflow: hidden;
	background:
		radial-gradient(420px 220px at 100% 0%, rgba(1, 200, 239, 0.18), transparent 70%),
		radial-gradient(420px 260px at 0% 100%, rgba(243, 53, 91, 0.16), transparent 70%),
		linear-gradient(180deg, #171a5c, #0c0e42);
	box-shadow: 0 30px 60px -30px rgba(10, 12, 60, 0.7), var(--hw-inner-hl);
	color: #f4f6ff;
}

.hw-pconf__card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	padding: 1px;
	border-radius: inherit;
	background: linear-gradient(160deg, rgba(1, 200, 239, 0.8), rgba(255, 255, 255, 0.06) 45%, rgba(243, 53, 91, 0.6));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	pointer-events: none;
}

.hw-pconf__eyebrow {
	margin: 0;
	font-family: var(--hw-font-head);
	font-size: var(--hw-fs-2xs);
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #6fe3fa;
}

.hw-pconf__plan {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hw-pconf__plan-icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 14px;
	background: var(--hw-gradient-brand);
	color: #fff;
	box-shadow: 0 10px 22px -12px rgba(139, 108, 255, 0.9);
}

.hw-pconf__plan-icon .hw-icon {
	--hw-icon-size: 20px;
}

.hw-pconf__plan > span:last-child {
	display: grid;
	min-width: 0;
}

.hw-pconf__plan-name {
	font-family: var(--hw-font-head);
	font-size: var(--hw-fs-lg);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
}

.hw-pconf__plan-meta {
	font-size: var(--hw-fs-xs);
	color: #b9bfe6;
}

.hw-plan-v2 .hw-pconf__card .hw-plan-order__summary {
	display: grid;
	gap: 0.45rem;
	padding: 0;
	border: 0;
	background: none;
}

.hw-plan-v2 .hw-pconf__card .hw-plan-order__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	color: #b9bfe6;
	font-size: var(--hw-fs-sm);
}

.hw-plan-v2 .hw-pconf__card .hw-plan-order__total strong {
	font-family: var(--hw-font-head);
	font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
	color: #fff;
}

.hw-plan-v2 .hw-pconf__card .hw-plan-order__renew {
	margin: 0;
	font-size: var(--hw-fs-xs);
	line-height: 1.55;
	color: #b9bfe6;
}

.hw-plan-v2 .hw-pconf__card .hw-plan-order__submit {
	min-height: 58px;
}

.hw-plan-v2 .hw-pconf__card .hw-plan-order__trust {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 1rem 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	list-style: none;
	font-size: var(--hw-fs-xs);
	color: #d5d9f5;
}

.hw-plan-v2 .hw-pconf__card .hw-plan-order__trust li {
	display: flex;
	align-items: center;
	gap: 0.55rem;
}

.hw-plan-v2 .hw-pconf__card .hw-plan-order__trust .hw-icon {
	--hw-icon-size: 16px;
	color: #6be39a;
}

/* Domain step (inc/woocommerce.php) under the cards. */
.hw-pconf__after:empty {
	display: none;
}

.hw-pconf__after {
	margin-top: var(--hw-space-5);
}

@media (min-width: 1000px) {
	.hw-pconf__after {
		max-width: calc(100% - 400px - clamp(1.25rem, 0.75rem + 2vw, 2.5rem));
	}
}

/* =========================================================================
 * Light sheet: included, comparison, guarantee, FAQ
 * ====================================================================== */

.hw-plan-v2 .hw-plan-features,
.hw-plan-v2 .hw-plan-compare,
.hw-plan-v2 .hw-plan-guarantee,
.hw-plan-v2 .hw-plan-faq {
	padding-top: clamp(3.5rem, 2rem + 5vw, 7rem);
}

.hw-plan-v2 .hw-plan-features__grid {
	display: grid;
	gap: clamp(0.875rem, 0.6rem + 1vw, 1.25rem);
}

@media (min-width: 680px) {
	.hw-plan-v2 .hw-plan-features__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.hw-plan-v2 .hw-plan-features__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.hw-plan-v2 .hw-plan-feature {
	display: flex;
	flex-direction: column;
	gap: var(--hw-space-3);
	padding: clamp(1.4rem, 1rem + 1vw, 1.9rem);
	border: 1px solid var(--hw-light-border);
	border-radius: var(--hw-radius-xl);
	background: #fff;
	box-shadow: var(--hw-light-shadow-sm);
}

.hw-plan-v2 .hw-plan-feature .hw-card__title {
	margin: var(--hw-space-2) 0 0;
	font-size: var(--hw-fs-lg);
}

/* Comparison table: current plan column highlighted. */
.hw-plan-v2 .hw-plan-compare .hw-table-wrap {
	border-radius: var(--hw-radius-xl);
}

.hw-plan-v2 .hw-plan-compare__table {
	min-width: 560px;
}

.hw-plan-v2 .hw-plan-compare__table thead th,
.hw-plan-v2 .hw-plan-compare__table td {
	text-align: center;
}

.hw-plan-v2 .hw-plan-compare__table thead th:first-child,
.hw-plan-v2 .hw-plan-compare__table tbody th {
	text-align: left;
}

.hw-plan-v2 .hw-plan-compare__name {
	display: block;
	font-size: var(--hw-fs-lg);
	letter-spacing: -0.02em;
}

.hw-plan-v2 .hw-plan-compare__price {
	display: block;
	margin-top: 0.25em;
	font-family: var(--hw-font-body);
	font-size: var(--hw-fs-xs);
	font-weight: 500;
	color: var(--hw-light-muted);
}

.hw-plan-v2 .hw-plan-compare__table thead .hw-badge {
	margin-top: 0.5rem;
	border-color: rgba(0, 116, 163, 0.3);
	background: rgba(0, 116, 163, 0.08);
	color: var(--hw-light-cyan);
}

.hw-plan-v2 .hw-plan-compare__table .is-current {
	background: linear-gradient(180deg, rgba(1, 200, 239, 0.08), rgba(139, 108, 255, 0.05));
	font-weight: 700;
}

.hw-plan-v2 .hw-plan-compare__table thead th.is-current {
	box-shadow: inset 0 3px 0 var(--hw-light-cyan);
}

.hw-plan-v2 .hw-plan-compare__table tfoot td {
	padding-block: 1.2em;
	border-bottom: 0;
}

/* Guarantee band stays a dark island on the sheet. */
.hw-plan-v2 .hw-plan-guarantee .hw-guarantee {
	color: var(--hw-text);
}

/* FAQ: head on the left. */
.hw-plan-faq__grid {
	display: grid;
	gap: var(--hw-space-6);
	align-items: start;
}

@media (min-width: 960px) {
	.hw-plan-faq__grid {
		grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
		gap: clamp(2rem, 1rem + 4vw, 5rem);
	}
}

.hw-plan-faq__head .hw-section-head__title {
	margin: 0;
}

/* Mobile sticky bar keeps woocommerce.css; only the light-sheet colours change. */
@media (max-width: 999.98px) {
	.hw-plan-v2 .hw-pconf__recap {
		order: 2;
	}
}

/* =========================================================================
 * Plan switch page (templates/product-switch.php)
 * ====================================================================== */

.hw-wc--switch .hw-switch__plans {
	gap: clamp(0.875rem, 0.6rem + 1vw, 1.25rem);
}

.hw-wc--switch .hw-switch__plan {
	border-radius: var(--hw-radius-xl);
	transition: transform var(--hw-dur-slow) var(--hw-ease), box-shadow var(--hw-dur-slow) var(--hw-ease);
}

.hw-wc--switch .hw-switch__plan:hover {
	transform: translateY(-3px);
	box-shadow: var(--hw-light-shadow);
}

.hw-wc--switch .hw-switch__plan.is-current {
	box-shadow: 0 0 0 2px var(--hw-light-cyan), var(--hw-light-shadow);
}

.hw-wc--switch .hw-switch__name {
	font-size: var(--hw-fs-xl);
	letter-spacing: -0.02em;
}

/* Small screens: shorter hero, specs as a compact 2-column grid. */
@media (max-width: 999.98px) {
	.hw-plan-v2 .hw-plan-hero__visual .hw-illustration {
		--hw-illus-max: 200px;
	}

	.hw-plan-chips {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: 100%;
		margin-top: calc(-1 * var(--hw-space-4));
	}

	.hw-plan-chip {
		border-radius: var(--hw-radius);
		padding: 0.5rem 0.6rem;
	}

	.hw-plan-chip:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	.hw-pconf__steps li + li::before {
		width: 14px;
		margin-right: 0.25rem;
	}

	.hw-pconf__steps {
		gap: 0.5rem 0.75rem;
	}
}

@media (max-width: 699.98px) {
	.hw-plan-v2 .hw-plan-hero__illus {
		display: none;
	}

	.hw-plan-chips {
		margin-top: 0;
	}
}
