/*
 * Site5 – membership page (Figma "Adhérer — Proposition 02 · Desktop", node 606:6533).
 * 1280 px grid with 80 px side margins at 1440 px. Hero variant and process steps: sections.css.
 */

.adhesion-container {
	width: min(1280px, 100% - 2 * var(--gutter-wide));
	margin-inline: auto;
}

/* Serif section title with a red accent underneath. */
.adhesion-title {
	color: #0b1421;
	font-family: var(--font-serif);
	font-size: 46px;
	font-weight: 700;
	line-height: 56px;
}

.adhesion-title::after {
	content: "";
	display: block;
	width: 96px;
	height: 4px;
	margin-top: 18px;
	border-radius: 2px;
	background: var(--red-bright);
}

.adhesion-button {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	min-width: 235px;
	height: 52px;
	padding: 0 22px;
	border-radius: 8px;
	background: var(--red-bright);
	color: var(--white);
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	transition: background-color 0.2s;
}

.adhesion-button:hover {
	background: #c70511;
}

/* Benefits --------------------------------------------------------------- */

.adhesion-benefits {
	padding: 73px 0 77px;
	background: var(--white);
}

.adhesion-benefits__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 9px;
	margin-top: 54px;
}

.benefit-card {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-height: 365px;
	padding: 22px 20px 24px;
	border: 1px solid #e3e5e8;
	border-radius: 18px;
	background: var(--white);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

.benefit-card::before {
	content: "";
	width: 100%;
	height: 4px;
	border-radius: 2px;
	background: var(--red-bright);
}

.benefit-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.benefit-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: #f8f9fa;
}

.benefit-card__number {
	color: var(--red-bright);
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
}

.benefit-card__title {
	color: #0b1421;
	font-size: 19px;
	font-weight: 600;
	line-height: 26px;
}

.benefit-card__text {
	color: #3d454f;
	font-size: 14.5px;
	line-height: 22px;
}

/* Steps ------------------------------------------------------------------ */

.adhesion-steps {
	padding: 81px 0 57px;
	background: #f8f8f7;
}

.adhesion-steps__head {
	display: flex;
	align-items: flex-end;
	gap: 48px;
}

.adhesion-steps .adhesion-title::after {
	margin-top: 22px;
}

.adhesion-steps .adhesion-title {
	flex: 0 1 950px;
	font-size: 48px;
	line-height: 65px;
	letter-spacing: 1.15px;
}

.adhesion-steps .process-steps {
	grid-template-columns: minmax(0, 250px) minmax(0, 341px) minmax(0, 337px);
	column-gap: 136px;
	margin-top: 75px;
	padding-left: 40px;
}

.adhesion-steps .process-steps::before {
	right: 55px;
	left: 65px;
}

/* Form ------------------------------------------------------------------- */

.adhesion-form {
	padding: 66px 0 72px;
	background: var(--white);
}

.adhesion-form__kicker {
	color: var(--red-bright);
	font-size: 11px;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: 1.1px;
	text-transform: uppercase;
}

.adhesion-form__title {
	margin-top: 10px;
	color: #0b1421;
	font-family: var(--font-serif);
	font-size: 38px;
	font-weight: 700;
	line-height: 47px;
}

.adhesion-form__text {
	max-width: 1138px;
	margin-top: 10px;
	color: #3d454f;
	font-size: 18px;
	line-height: 21px;
}

.adhesion-form__body {
	display: grid;
	grid-template-columns: 360px minmax(0, 1fr);
	gap: 24px;
	min-height: 981px;
	margin-top: 30px;
}

/* Information panel */

.adhesion-panel {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 30px 28px;
	border-radius: 16px;
	background: #0b1421;
	color: #c7cfd9;
}

.adhesion-panel__kicker {
	color: var(--red-bright);
	font-size: 10px;
	font-weight: 700;
	line-height: 15px;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.adhesion-panel__title {
	color: var(--white);
	font-family: var(--font-serif);
	font-size: 27px;
	font-weight: 700;
	line-height: 35px;
}

.adhesion-panel__text {
	font-size: 16px;
	line-height: 23px;
}

.adhesion-panel__steps {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 20px 0;
	border-top: 1px solid #2e3b4d;
	border-bottom: 1px solid #2e3b4d;
}

.adhesion-panel__step {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 46px;
}

.adhesion-panel__check {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	transition: background-color 0.2s;
}

.adhesion-panel__step.is-active .adhesion-panel__check {
	background: var(--red-bright);
}

.adhesion-panel__step-copy {
	display: flex;
	flex-direction: column;
	gap: 3px;
	color: #a8b2c2;
	font-size: 11px;
	line-height: 13px;
}

.adhesion-panel__step-copy strong {
	color: var(--white);
	font-size: 13px;
	font-weight: 600;
	line-height: 16px;
}

.adhesion-panel__help-label {
	color: var(--red-bright);
	font-size: 13px;
	font-weight: 700;
	line-height: 13px;
	letter-spacing: 0.9px;
	text-transform: uppercase;
}

.adhesion-panel__help-text {
	margin-top: 20px;
	font-size: 13px;
	line-height: 20px;
}

/* Form card (markup: template-parts/sections/adhesion-fields.php) */

.adhesion-form__card {
	padding: 28px 30px;
	border: 1px solid #e3e5e8;
	border-radius: 16px;
	background: var(--white);
}

.adhesion-fields {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Field that only robots fill in. */
.adhesion-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.adhesion-group {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

.adhesion-group + .adhesion-group {
	padding-top: 20px;
	border-top: 1px solid #e3e5e8;
}

/* Consent and button follow the message without a separator. */
.adhesion-group + .adhesion-group--submit {
	padding-top: 0;
	border-top: 0;
}

.adhesion-group__title {
	color: #0b1421;
	font-size: 16px;
	font-weight: 700;
	line-height: 18px;
}

.adhesion-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: end;
	gap: 14px;
}

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

.adhesion-field__label {
	color: #0b1421;
	font-size: 13px;
	font-weight: 600;
	line-height: 15px;
}

.adhesion-control {
	position: relative;
	display: block;
}

.adhesion-fields input[type="text"],
.adhesion-fields input[type="email"],
.adhesion-fields input[type="tel"],
.adhesion-fields select,
.adhesion-fields textarea {
	width: 100%;
	height: 46px;
	padding: 0 13px;
	border: 1px solid #e3e5e8;
	border-radius: 8px;
	background: var(--white);
	color: #0b1421;
	font: inherit;
	font-size: 13px;
	line-height: 17px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.adhesion-fields textarea {
	display: block;
	height: 94px;
	padding: 12px 13px;
	resize: vertical;
}

.adhesion-fields select {
	padding-right: 36px;
	background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2387909a' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px;
	appearance: none;
}

/* Placeholders, including the first option of the selects (class set by adhesion.js). */
.adhesion-fields select.is-placeholder {
	color: #87909a;
}

.adhesion-fields ::placeholder {
	color: #87909a;
	opacity: 1;
}

.adhesion-fields select:disabled {
	background-color: #f8f9fa;
	cursor: not-allowed;
}

.adhesion-fields input:focus-visible,
.adhesion-fields select:focus-visible,
.adhesion-fields textarea:focus-visible {
	border-color: #0b1421;
	outline: none;
	box-shadow: 0 0 0 3px rgba(11, 20, 33, 0.08);
}

.adhesion-fields .adhesion-control [aria-invalid="true"] {
	border-color: var(--red-bright);
}

/* Errors sit in the 20 px gap under the field, so they do not move the layout. */
.adhesion-error {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 3px;
	color: var(--red-bright);
	font-size: 11px;
	font-weight: 400;
	line-height: 14px;
}

.adhesion-field > .adhesion-error {
	position: static;
	margin-top: -3px;
}

/* Member type: two options shown as a segmented control. */
.adhesion-choices {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.adhesion-choice {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 38px;
	padding: 0 10px;
	border: 1px solid #e3e5e8;
	border-radius: 8px;
	background: var(--white);
	color: #0b1421;
	font-size: 13px;
	font-weight: 600;
	line-height: 15px;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.adhesion-choice input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.adhesion-choice:has(input:checked) {
	border-color: #0b1421;
	background: #0b1421;
	color: var(--white);
}

.adhesion-choice:has(input:focus-visible) {
	box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.25);
}

/* Consent checkbox */
.adhesion-consent-field .adhesion-error {
	position: static;
	display: block;
	margin-top: 6px;
	font-size: 12px;
}

.adhesion-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: #87909a;
	font-size: 13px;
	line-height: 15px;
	cursor: pointer;
}

.adhesion-consent input {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin: -1.5px 0 0;
	border: 1px solid #e3e5e8;
	border-radius: 4px;
	background: var(--white);
	appearance: none;
	cursor: pointer;
}

.adhesion-consent input:checked {
	border-color: var(--red-bright);
	background: var(--red-bright) url("../icons/check-white.svg") no-repeat center / 13px;
}

.adhesion-consent input:focus-visible {
	outline: 2px solid #0b1421;
	outline-offset: 2px;
}

.adhesion-turnstile .adhesion-error {
	position: static;
	display: block;
	margin-top: 6px;
}

.adhesion-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 230px;
	height: 48px;
	padding: 0 14px;
	border: 0;
	border-radius: 8px;
	background: var(--red-bright);
	color: var(--white);
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	line-height: 17px;
	cursor: pointer;
	transition: background-color 0.2s;
}

.adhesion-submit:hover {
	background: #c70511;
}

.adhesion-notice {
	margin-bottom: 20px;
	padding: 12px 16px;
	border: 1px solid rgba(227, 6, 19, 0.35);
	border-radius: 8px;
	background: var(--red-soft);
	color: #0b1421;
	font-size: 13px;
	line-height: 19px;
}

/* Confirmation once the application is sent. */
.adhesion-sent {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding: 24px 0;
}

.adhesion-sent__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--red-bright);
}

.adhesion-sent__title {
	color: #0b1421;
	font-family: var(--font-serif);
	font-size: 27px;
	font-weight: 700;
	line-height: 35px;
}

.adhesion-sent__text {
	max-width: 640px;
	color: #3d454f;
	font-size: 15px;
	line-height: 24px;
}

/* Responsive ------------------------------------------------------------ */

/* Desktop: Figma card copy is 200 px wide (210 px for the fourth text). */
@media (min-width: 1280px) {
	.benefit-card__title,
	.benefit-card__text {
		max-width: 200px;
	}

	.benefit-card:nth-child(4) .benefit-card__text {
		max-width: 210px;
	}
}

@media (max-width: 1279px) {
	.adhesion-benefits__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
	}

	.benefit-card {
		min-height: 0;
	}

	.adhesion-steps .process-steps {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: 48px;
		padding-left: 0;
	}

	.adhesion-steps .process-steps::before {
		right: 0;
		left: 25px;
	}

	.adhesion-form__body {
		grid-template-columns: 300px minmax(0, 1fr);
		min-height: 0;
	}
}

@media (max-width: 1023px) {
	.page-hero--adhesion .page-hero__title {
		font-size: 40px;
		line-height: 50px;
	}

	.adhesion-title,
	.adhesion-steps .adhesion-title {
		font-size: 38px;
		line-height: 48px;
		letter-spacing: 0;
	}

	.adhesion-benefits__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.adhesion-steps__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 32px;
	}

	.adhesion-steps .adhesion-title {
		flex: none;
	}

	.adhesion-steps .process-steps {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 40px;
		margin-top: 56px;
	}

	/* Stacked steps: the line runs down through the numbers. */
	.adhesion-steps .process-steps::before {
		display: block;
		top: 25px;
		bottom: 25px;
		left: 24px;
		width: 2px;
		height: auto;
	}

	.adhesion-steps .process-step {
		display: grid;
		grid-template-columns: 50px minmax(0, 1fr);
		column-gap: 24px;
	}

	.adhesion-steps .process-step__number {
		grid-row: span 2;
	}

	.adhesion-steps .process-step__title {
		margin-top: 9px;
	}

	.adhesion-form__body {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 767px) {
	.page-hero--adhesion {
		min-height: 0;
		padding: 64px var(--gutter);
	}

	.page-hero--adhesion .page-hero__title {
		margin-top: 20px;
		font-size: 32px;
		line-height: 40px;
	}

	.page-hero--adhesion .page-hero__text {
		margin-top: 20px;
		font-size: 16px;
		line-height: 26px;
	}

	.adhesion-title,
	.adhesion-steps .adhesion-title {
		font-size: 32px;
		line-height: 40px;
	}

	.adhesion-benefits {
		padding: 56px 0;
	}

	.adhesion-benefits__grid {
		grid-template-columns: minmax(0, 1fr);
		margin-top: 40px;
	}

	.adhesion-steps {
		padding: 56px 0;
	}

	.adhesion-form {
		padding: 56px 0 64px;
	}

	.adhesion-form__title {
		font-size: 30px;
		line-height: 38px;
	}

	.adhesion-form__text {
		font-size: 16px;
		line-height: 24px;
	}

	.adhesion-panel,
	.adhesion-form__card {
		padding: 24px 20px;
	}

	.adhesion-row {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.adhesion-submit {
		width: 100%;
	}
}
