/**
 * Bloc communauté crew + newsletter — calque style-newsletter 2026.
 */

:root {
	--h2-size: clamp(1.8rem, 5vw, 3.5rem);
	--lead-size: clamp(1rem, 2vw, 1.125rem);
	--section-padding: clamp(3rem, 10vh, 8rem);
	--color-error: #ff6a3d;
}

/* Ancien cluster NL footer (titre + texte + shortcode Brevo) */
#block-22.widget_block,
#block-40.widget_block,
#block-23.widget_block,
#block-31.widget_block,
.footer1 #block-22,
.footer1 #block-40,
.footer1 #block-23,
.footer1 #block-31 {
	display: none !important;
}

/* Legacy Gutenberg « Une communauté… » + grille produits (filet CSS) — home + /comparer/ */
#h-une-communaute-qui-s-eclate-en-onewheel,
#h-une-communaute-qui-s-eclate-en-onewheel + .wp-block-spacer,
#h-une-communaute-qui-s-eclate-en-onewheel + .wp-block-spacer + p.reduce-width,
#h-la-communaute-ride-on-experience-s-eclate-en-onewheel,
#h-la-communaute-ride-on-experience-s-eclate-en-onewheel + .wp-block-spacer,
#h-la-communaute-ride-on-experience-s-eclate-en-onewheel + .wp-block-spacer + p.reduce-width,
body.home .wp-block-group.communaute ul.featured-products,
body.home .wp-block-group.communaute section.wp-block-group:has(> ul.featured-products),
body.front-page .wp-block-group.communaute ul.featured-products,
body.front-page .wp-block-group.communaute section.wp-block-group:has(> ul.featured-products),
body.page-comparer .wp-block-group.communaute ul.featured-products,
body.page-comparer .wp-block-group.communaute section.wp-block-group:has(> ul.featured-products),
body.page-id-26397 .wp-block-group.communaute ul.featured-products,
body.page-id-26397 .wp-block-group.communaute section.wp-block-group:has(> ul.featured-products),
/* Spacer + paragraphe vides après le bloc crew → bande blanche avant newsletter */
body.home .wp-block-group.communaute ~ .wp-block-spacer,
body.home .wp-block-group.communaute ~ .wp-block-group:empty,
body.home .wp-block-group.communaute ~ p,
body.front-page .wp-block-group.communaute ~ .wp-block-spacer,
body.front-page .wp-block-group.communaute ~ .wp-block-group:empty,
body.front-page .wp-block-group.communaute ~ p,
body.page-comparer .wp-block-group.communaute ~ .wp-block-spacer,
body.page-comparer .wp-block-group.communaute ~ .wp-block-group:empty,
body.page-comparer .wp-block-group.communaute ~ p,
body.page-id-26397 .wp-block-group.communaute ~ .wp-block-spacer,
body.page-id-26397 .wp-block-group.communaute ~ .wp-block-group:empty,
body.page-id-26397 .wp-block-group.communaute ~ p {
	display: none !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* /comparer/ : le groupe .communaute ne doit plus porter le chrome legacy (bleu, etc.) */
body.page-comparer .wp-block-group.communaute,
body.page-id-26397 .wp-block-group.communaute {
	background: transparent !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
}

/* --- Crew / Instagram — titre + lead centrés, grille pleine largeur --- */
.rideon-crew {
	position: relative;
	z-index: 1;
	isolation: isolate;
	padding: var(--section-padding) 0 0;
	background: var(--black-pure, #000);
	color: var(--white-pure, #fff);
	overflow-x: clip;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.rideon-crew .container {
	width: 100%;
	max-width: var(--container-width, 1440px);
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

.rideon-crew__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 1rem;
	margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
	max-width: 42rem;
	margin-left: auto;
	margin-right: auto;
	position: relative;
	z-index: 1;
	/* Legacy theme : `header { height:130px }` → IG chevauchait la mosaïque */
	height: auto;
	min-height: 0;
}

.rideon-crew__header h2 {
	margin: 0;
	max-width: 22ch;
	text-wrap: balance;
	color: var(--white-pure, #fff);
	/* Calque h1–h3 2026 — !important pour battre legacy theme
	   (word-spacing:-0.225em + line-height:inherit !important) */
	font-family: var(--font-headline, "mono45-headline", Impact, sans-serif);
	font-size: var(--h2-size);
	font-weight: 700;
	line-height: 0.95 !important;
	letter-spacing: normal;
	word-spacing: var(--headline-word-spacing, 0) !important;
	text-transform: uppercase;
}

@media (min-width: 900px) {
	.rideon-crew__header {
		max-width: min(100%, 56rem);
	}

	.rideon-crew__header h2 {
		max-width: none;
		white-space: nowrap;
	}
}

.rideon-crew__lead {
	margin: 0;
	font-family: var(--font-main, "Space Grotesk", system-ui, sans-serif);
	font-size: var(--lead-size);
	line-height: 1.45;
	color: var(--white-pure, #fff);
	max-width: 36rem;
	position: relative;
	z-index: 1;
}

.rideon-crew__ig-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--font-main, "Space Grotesk", system-ui, sans-serif);
	color: var(--electric-lime, #e9ff00);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.25s ease, opacity 0.25s ease;
}

.rideon-crew__ig-link:hover {
	border-bottom-color: var(--electric-lime, #e9ff00);
}

/* Full-bleed sans 100vw (évite overflow / texte sous le header sticky) */
.rideon-crew__feed {
	position: relative;
	z-index: 0;
	width: 100%;
	max-width: 100%;
	margin: 0;
}

.rideon-crew__mosaic {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(3, auto);
	gap: 3px;
	width: 100%;
}

.rideon-crew__tile:nth-child(n + 7) {
	display: none;
}

@media (min-width: 600px) {
	.rideon-crew__mosaic {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		grid-template-rows: repeat(2, auto);
		gap: 4px;
	}
}

@media (min-width: 900px) {
	.rideon-crew__mosaic {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		grid-template-rows: repeat(2, auto);
		gap: 4px;
	}

	.rideon-crew__tile:nth-child(n + 7) {
		display: block;
	}
}

.rideon-crew__tile {
	position: relative;
	display: block;
	overflow: hidden;
	background: #141414;
	text-decoration: none;
	color: inherit;
	min-height: 0;
	aspect-ratio: 1;
	transition: background 0.3s ease;
}

.rideon-crew__tile img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.55s cubic-bezier(0.23, 1, 0.32, 1);
}

.rideon-crew__tile:hover,
.rideon-crew__tile:focus-visible {
	background: #1c1c1c;
}

.rideon-crew__tile:hover img,
.rideon-crew__tile:focus-visible img {
	transform: scale(1.05);
}

.rideon-crew__tile:focus-visible {
	outline: 2px solid var(--electric-lime, #e9ff00);
	outline-offset: 2px;
}

.rideon-community .container {
	width: 100%;
	max-width: var(--container-width, 1440px);
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

.rideon-community {
	position: relative;
	padding: calc(var(--section-padding) * 0.75) 0 var(--section-padding);
	background: var(--black-pure, #000);
	color: var(--white-pure, #fff);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rideon-community__inner {
	display: grid;
	gap: clamp(1.5rem, 3.5vw, 2.5rem);
	align-items: center;
	justify-items: stretch;
}

@media (min-width: 900px) {
	.rideon-community__inner {
		grid-template-columns: minmax(7rem, 0.7fr) minmax(0, 1.2fr) minmax(0, 0.95fr);
		gap: clamp(1.75rem, 3vw, 2.75rem);
		align-items: center;
	}
}

.rideon-community__illu {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.rideon-community__illu img {
	display: block;
	width: 100%;
	max-width: 220px;
	height: auto;
	object-fit: contain;
}

@media (min-width: 900px) {
	.rideon-community__illu {
		justify-content: flex-start;
	}

	.rideon-community__illu img {
		max-width: 260px;
	}
}

.rideon-community__copy h2 {
	margin: 0 0 1rem;
	max-width: 16ch;
	font-family: var(--font-headline, "mono45-headline", Impact, sans-serif);
	font-size: var(--h2-size);
	font-weight: 700;
	line-height: 0.95 !important;
	letter-spacing: -0.02em;
	word-spacing: var(--headline-word-spacing, 0) !important;
	text-transform: uppercase;
	color: inherit;
}

.rideon-community__lead {
	margin: 0;
	max-width: 36ch;
	font-family: var(--font-main, "Space Grotesk", system-ui, sans-serif);
	font-size: var(--lead-size);
	line-height: 1.45;
	color: var(--white-pure, #fff);
}

.rideon-community__form {
	display: grid;
	gap: 0.75rem;
	width: 100%;
	max-width: 28rem;
	justify-self: stretch;
	position: relative;
}

@media (min-width: 900px) {
	.rideon-community__form {
		justify-self: end;
	}
}

.rideon-community__hp {
	position: absolute;
	left: -9999px;
	opacity: 0;
	height: 0;
	width: 0;
	overflow: hidden;
}

.rideon-community__field input {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(0, 0, 0, 0.45);
	color: var(--white-pure, #fff);
	border-radius: var(--pill-radius, 100px);
	padding: 0.95rem 1.25rem;
	font-family: var(--font-main, "Space Grotesk", system-ui, sans-serif);
	font-size: 1rem;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.rideon-community__field input::placeholder {
	color: rgba(255, 255, 255, 0.45);
}

.rideon-community__field input:focus {
	border-color: rgba(233, 255, 0, 0.65);
	box-shadow: 0 0 0 3px rgba(233, 255, 0, 0.15);
}

.rideon-community__submit {
	width: 100%;
	justify-content: center;
	margin-top: 0.25rem;
	border: 0;
	cursor: pointer;
}

.rideon-community__submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.rideon-community__feedback {
	margin: 0.35rem 0 0;
	padding: 0;
	border: 0;
	background: none;
	border-radius: 0;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.35;
}

.rideon-community__feedback.is-hidden {
	display: none;
}

.rideon-community__feedback.is-success {
	color: var(--electric-lime, #e9ff00);
}

.rideon-community__feedback.is-error {
	color: var(--color-error, #ff6a3d);
}

.rideon-community__legal {
	margin: 0.15rem 0 0;
	font-size: 0.75rem;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.4);
}

.rideon-community .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Mobile : colonne centrée, rythme serré */
@media (max-width: 899px) {
	.rideon-community {
		padding: clamp(2.1rem, 6.5vw, 2.85rem) 0 clamp(2.35rem, 7.5vw, 3.25rem);
		text-align: center;
	}

	.rideon-community__inner {
		gap: 1.15rem;
		justify-items: center;
		padding-inline: 0.25rem;
	}

	.rideon-community__illu {
		order: -1;
		justify-self: center;
		width: min(100%, 11rem);
		display: flex;
		justify-content: center;
	}

	.rideon-community__illu img {
		max-width: 132px;
		margin-inline: auto;
		/* SVG asymétrique (rider à droite) : recentrage optique */
		transform: translateX(-6%);
	}

	.rideon-community__copy {
		width: 100%;
		max-width: 22rem;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.rideon-community__copy h2 {
		max-width: 11.5em;
		margin: 0 auto 0.7rem;
		text-align: center;
		text-wrap: balance;
		line-height: 0.98 !important;
	}

	.rideon-community__lead {
		max-width: 28ch;
		margin-left: auto;
		margin-right: auto;
		text-align: center;
		text-wrap: pretty;
		line-height: 1.4;
	}

	.rideon-community__form {
		width: min(100%, 20rem);
		max-width: 20rem;
		margin-inline: auto;
		justify-self: center;
		gap: 0.6rem;
	}

	.rideon-community__legal {
		text-align: center;
		max-width: 26ch;
		margin-inline: auto;
	}
}
