/**
 * Zerosix — Page fidélité publique.
 *
 * Portage 1:1 de PS:views/css/fidelitypage.css vers WooCommerce.
 * Scope : `#zsx-fidelity-page` (parité PS). `font-family` et fond des boutons
 * restent hérités du thème courant ; en revanche les tailles/line-heights et
 * marges des titres/paragraphes sont normalisées ici pour obtenir des
 * proportions équivalentes au front PrestaShop (les thèmes blocs WP ont des
 * H1/H2 par défaut bien plus gros que le thème Classic PS).
 * Toutes les couleurs (fonds / titres / illustrations) sont pilotées par des
 * styles inline générés côté PHP depuis les options `zerosix_fidelity_*`.
 */

:root {
	--zsx-base-radius: 8px;
	--zsx-base-bg-color: #fff;
	--zsx-base-text-color: #000;
	--zsx-base-info-bg-color: #f7f7f7;
}

#zsx-fidelity-page {
	font-family: inherit;
}

/* Le titre de la page (rendu par le thème) est masqué : la page porte déjà
   son propre heading dans le bloc de bienvenue. */
body.zsx-fidelity-page .wp-block-post-title,
body.zsx-fidelity-page .entry-title {
	display: none;
}

.zsx-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.zsx-section {
	position: relative;
}

/* ============ Section : Bienvenue ============ */

#zsx-fidelity-page .zsx-section.zsx-welcome {
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
	align-items: center;
	justify-content: center;
}

#zsx-fidelity-page .zsx-section.zsx-welcome .zsx-welcome-content {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 350px;
	background-size: cover;
	background-position: left;
	background-repeat: no-repeat;
}

#zsx-fidelity-page .zsx-section.zsx-welcome .zsx-welcome-content .zsx-welcome-texts {
	padding: 20px;
	text-align: left;
	min-width: 300px;
	max-width: 500px;
}

#zsx-fidelity-page .zsx-section.zsx-welcome .zsx-welcome-content .zsx-welcome-texts h1 {
	font-size: 1.65rem;
	line-height: 1.3;
	margin: 0 0 1rem;
}

#zsx-fidelity-page .zsx-section.zsx-welcome .zsx-welcome-content .zsx-welcome-texts .zsx-desc {
	font-size: 1.0625rem;
	line-height: 1.45;
	margin: 0 0 1.25rem;
}

#zsx-fidelity-page .zsx-section.zsx-welcome .zsx-welcome-content .zsx-welcome-texts .zsx-desc p {
	margin: 0 0 .75rem;
}

#zsx-fidelity-page .zsx-section.zsx-welcome .zsx-welcome-content .zsx-welcome-texts .zsx-desc p:last-child {
	margin-bottom: 0;
}

#zsx-fidelity-page .zsx-section.zsx-welcome .zsx-welcome-illustration {
	flex: 1 1 400px;
	height: 350px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* ============ Section : Fidélité ============ */

#zsx-fidelity-page .zsx-section.zsx-fidelity {
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
	align-items: flex-start;
	justify-content: center;
	padding: 2rem 2rem;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-step {
	text-align: center;
	padding: 2rem;
	flex: 1 1 300px;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-step .zsx-step-number {
	font-weight: 800;
	font-size: 1.8rem;
	line-height: 1.2;
	margin: 0 0 .5rem;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-step .zsx-step-title {
	font-weight: 600;
	font-size: 1.3rem;
	line-height: 1.3;
	margin: 0 0 .5rem;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-step .zsx-step-subtitle {
	font-weight: normal;
	font-size: 1.0625rem;
	line-height: 1.45;
	margin: 0;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-card {
	padding: 2rem;
	border-radius: var(--zsx-base-radius);
	background-color: var(--zsx-base-bg-color);
	color: var(--zsx-base-text-color);
	margin: 3rem auto;
	width: 750px;
	max-width: 100%;
	position: relative;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-card-infos {
	float: right;
	margin-left: 2rem;
	margin-bottom: 2rem;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-card-infos .zsx-fidelity-card-infos-info {
	background-color: var(--zsx-base-info-bg-color);
	padding: 0.5rem 1rem;
	border-radius: var(--zsx-base-radius);
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-card-texts h2 {
	font-size: 1.65rem;
	line-height: 1.3;
	margin: 0 0 1rem;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-card-texts p {
	font-size: 1.0625rem;
	line-height: 1.45;
	margin-top: 1rem;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-card-buttons {
	clear: both;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: .5rem;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-card-texts .zsx-card-statutory-info {
	line-height: 2rem;
	font-weight: bold;
	font-size: 1.125rem;
	background-color: var(--zsx-base-info-bg-color);
	padding: 0.6rem;
	color: var(--zsx-base-text-color);
	border-radius: var(--zsx-base-radius);
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-card-texts .zsx-card-statutory-info img {
	height: 2rem;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-card-buttons a.btn,
#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-card-buttons button.btn {
	font-size: .9rem;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-card-buttons .zsx-convert-form {
	display: inline-block;
}

#zsx-fidelity-page .zsx-section.zsx-fidelity .zsx-fidelity-card-buttons .zsx-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.2rem;
	height: 1.2rem;
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	font-size: .8rem;
}

/* ============ Section : Barre de progression statutaire ============ */

#zsx-fidelity-page .zsx-statutory-section {
	max-width: 600px;
	margin: 2rem auto;
	padding: 5rem 2rem;
}

#zsx-fidelity-page .zsx-statutory-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 0.5rem;
}

#zsx-fidelity-page .zsx-statutory-level {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

#zsx-fidelity-page .zsx-statutory-level-next {
	align-items: flex-end;
}

#zsx-fidelity-page .zsx-statutory-name {
	font-weight: 600;
	font-size: 1.125rem;
	color: #333;
}

#zsx-fidelity-page .zsx-statutory-points {
	font-size: 0.95rem;
	color: #666;
}

#zsx-fidelity-page .zsx-statutory-progress-container {
	position: relative;
	padding-bottom: 50px;
}

#zsx-fidelity-page .zsx-statutory-progress-bar {
	position: relative;
	height: 8px;
	background-color: #e0e0e0;
	border-radius: 4px;
}

#zsx-fidelity-page .zsx-statutory-progress-fill {
	height: 100%;
	background-color: #5dd8b1;
	border-radius: 4px;
	transition: width 0.5s ease-in-out;
}

#zsx-fidelity-page .zsx-statutory-indicator {
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	align-items: center;
}

#zsx-fidelity-page .zsx-statutory-indicator-dot {
	width: 16px;
	height: 16px;
	background-color: #1a1a1a;
	border-radius: 50%;
	flex-shrink: 0;
}

#zsx-fidelity-page .zsx-statutory-indicator-label {
	position: absolute;
	top: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	white-space: nowrap;
}

#zsx-fidelity-page .zsx-statutory-indicator-you {
	font-weight: 600;
	font-size: 1rem;
	color: #333;
}

#zsx-fidelity-page .zsx-statutory-indicator-points {
	font-size: 0.95rem;
	color: #666;
}

#zsx-fidelity-page .zsx-statutory-endpoint-dot {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	background-color: #1a1a1a;
	border-radius: 50%;
}

#zsx-fidelity-page .zsx-statutory-icon {
	width: 40px;
	height: 40px;
	object-fit: contain;
}

@media (max-width: 480px) {
	#zsx-fidelity-page .zsx-statutory-section {
		padding: 1rem;
	}
}

/* ============ Section : Statuts ============ */

#zsx-fidelity-page .zsx-section.zsx-status {
	text-align: center;
	padding: 5rem 1rem;
}

#zsx-fidelity-page .zsx-section.zsx-status h2 {
	margin: 0 0 1.5rem;
	font-size: 1.65rem;
	line-height: 1.3;
}

#zsx-fidelity-page .zsx-status-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
	max-width: 1200px;
	margin: 2rem auto 0;
	padding: 0 1rem;
}

#zsx-fidelity-page .zsx-status-card {
	flex: 1 1 280px;
	max-width: 350px;
	border-radius: var(--zsx-base-radius);
	border: 1px solid black;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	background-color: #fff;
	text-align: center;
}

#zsx-fidelity-page .zsx-status-card-header {
	padding: 1.5rem 1rem;
	background-color: #f5d0d0;
}

#zsx-fidelity-page .zsx-status-card-icon {
	width: 60px;
	height: 60px;
	margin: 0 auto 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

#zsx-fidelity-page .zsx-status-card-icon img {
	width: 50px;
	height: 50px;
	object-fit: contain;
}

#zsx-fidelity-page .zsx-status-card-name {
	font-size: 1.25rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 0 0 0.5rem;
	color: #fff;
}

#zsx-fidelity-page .zsx-status-card-points {
	font-size: 0.95rem;
	margin: 0;
	color: #fff;
	opacity: 0.9;
}

#zsx-fidelity-page .zsx-status-card-body {
	padding: 1.5rem 1rem;
	background-color: #fff;
	text-align: left;
}

#zsx-fidelity-page .zsx-status-card-desc {
	font-size: 1rem;
	line-height: 1.6;
	color: #333;
}

#zsx-fidelity-page .zsx-status-card-desc ul {
	list-style: disc;
	padding-left: 1.2rem;
	margin: 0;
}

#zsx-fidelity-page .zsx-status-card-desc li {
	margin-bottom: 0.4rem;
}

@media (max-width: 768px) {
	#zsx-fidelity-page .zsx-status-grid {
		flex-direction: column;
		align-items: center;
	}
	#zsx-fidelity-page .zsx-status-card {
		max-width: 100%;
		width: 100%;
	}
}

/* ============ Section : Parrainage ============ */

#zsx-fidelity-page .zsx-section.zsx-referral {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	padding: 5rem 0;
}

#zsx-fidelity-page .zsx-section.zsx-referral .zsx-referral-bloc {
	max-width: 400px;
	margin: 0 auto;
	padding: 2rem;
	border-radius: var(--zsx-base-radius);
	text-align: center;
}

#zsx-fidelity-page .zsx-section.zsx-referral .zsx-referral-bloc h5 {
	font-size: .9rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	margin: 0;
}

#zsx-fidelity-page .zsx-section.zsx-referral .zsx-referral-bloc .zsx-title {
	font-size: 1.4rem;
	line-height: 1.3;
	margin: .5rem 0 1.25rem;
}

#zsx-fidelity-page .zsx-section.zsx-referral .zsx-referral-bloc p {
	font-size: 1.0625rem;
	margin: 0 0 .75rem;
}

#zsx-fidelity-page .zsx-section.zsx-referral .zsx-referral-bloc .zsx-referral-code {
	cursor: pointer;
	font-weight: bold;
	font-size: 1.35rem;
	padding: 0.5rem 3rem;
	border-radius: 25px;
	display: inline-block;
	transition: all 0.1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#zsx-fidelity-page .zsx-section.zsx-referral .zsx-referral-bloc .zsx-referral-code:active {
	transform: scale(0.95);
}

/* ============ Section : Récompenses ============ */

#zsx-fidelity-page .zsx-section.zsx-rewards {
	padding: 2rem 0;
	text-align: center;
}

#zsx-fidelity-page .zsx-section.zsx-rewards .zsx-rewards-placeholder {
	max-width: 600px;
	margin: 0 auto;
	padding: 1rem;
}

#zsx-fidelity-page .zsx-section.zsx-rewards .zsx-rewards-vouchers {
	margin-top: 2rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

#zsx-fidelity-page .zsx-section.zsx-rewards .zsx-rewards-vouchers .zsx-rewards-voucher {
	flex-basis: 250px;
	overflow: hidden;
	border-radius: var(--zsx-base-radius);
	background-color: var(--zsx-base-bg-color);
	color: var(--zsx-base-text-color);
	border: 1px solid #ccc;
	text-align: left;
}

#zsx-fidelity-page .zsx-section.zsx-rewards .zsx-rewards-vouchers .zsx-rewards-voucher .zsx-rewards-img-container {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1rem;
}

#zsx-fidelity-page .zsx-section.zsx-rewards .zsx-rewards-vouchers .zsx-rewards-voucher .zsx-rewards-img-container img {
	max-width: 250px;
}

#zsx-fidelity-page .zsx-section.zsx-rewards .zsx-rewards-vouchers .zsx-rewards-voucher .zsx-rewards-icon-container {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1rem;
}

#zsx-fidelity-page .zsx-section.zsx-rewards .zsx-rewards-vouchers .zsx-rewards-voucher .zsx-rewards-icon-container img {
	height: 100%;
}

#zsx-fidelity-page .zsx-section.zsx-rewards .zsx-rewards-vouchers .zsx-rewards-voucher .zsx-rewards-content-container {
	padding: 1rem;
}

#zsx-fidelity-page .zsx-section.zsx-rewards .zsx-rewards-vouchers .zsx-rewards-voucher p {
	font-size: 1rem;
}

#zsx-fidelity-page .zsx-section.zsx-rewards .zsx-rewards-vouchers .zsx-rewards-voucher .zsx-reward-code {
	cursor: pointer;
	font-weight: bold;
	font-size: .9rem;
	padding: 0.5rem 0.5rem;
	border-radius: var(--zsx-base-radius);
	display: inline-block;
	transition: all 0.1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#zsx-fidelity-page .zsx-section.zsx-rewards .zsx-rewards-vouchers .zsx-rewards-voucher .zsx-reward-code:active {
	transform: scale(0.95);
}

