/*
 * Row Carte de fidélité (module loyalty) : le même style sur le site (PWA) et dans l'éditeur (aperçu de la row).
 * HTML : helper loyalty (loyalty_*_html). Comportement : loyalty-row.js (connexion, inscription, carte). Couleurs du thème du projet (--theme-*).
 * Contient aussi les éléments de formulaire communs avec la page Mon compte (account-row.css : profil, commandes, adresses).
 */
.loyalty-row {
	width: 100%;
	max-width: 26rem;
	margin: 0 auto;
}

.lr-body {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.lr-body.is-busy {
	opacity: .55;
	pointer-events: none;
}

/* La carte (format d'une carte Google Wallet) */
.lr-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.25rem 1.25rem 0;
	overflow: hidden;
	border-radius: 1rem;
	box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .18);
}

.lr-card-head {
	display: flex;
	align-items: center;
	gap: .75rem;
}

.lr-card-logo {
	width: 2.25rem;
	height: 2.25rem;
	flex: none;
	border-radius: 50%;
	object-fit: cover;
}

.lr-card-logo.is-empty {
	border: 2px dashed;
	opacity: .6;
}

.lr-card-title {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.lr-card-balance {
	display: flex;
	flex-direction: column;
}

.lr-card-value {
	font-size: 2.25rem;
	font-weight: 700;
	line-height: 1.1;
}

.lr-card-label {
	font-size: .8rem;
	opacity: .75;
}

.lr-stamps {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.lr-stamp {
	width: 1.75rem;
	height: 1.75rem;
	border: 2px solid;
	border-radius: 50%;
}

.lr-card-code {
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	width: 9rem;
	height: 9rem;
	padding: .4rem;
	border-radius: .6rem;
	background: #fff;
	color: #1f1f1f;
	font-size: 5rem;
}

.lr-card-code img {
	display: block;
	width: 100%;
	height: 100%;
}

.lr-card-number {
	align-self: center;
	font-size: .8rem;
	letter-spacing: .06em;
	opacity: .8;
}

.lr-card-hero {
	display: block;
	width: calc(100% + 2.5rem);
	max-width: none;
	margin: 0 -1.25rem;
	aspect-ratio: 3 / 1;
	object-fit: cover;
}

.lr-card > :last-child:not(.lr-card-hero) {
	margin-bottom: 1.25rem;
}

.lr-account-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.lr-full {
	text-align: center;
	font-weight: 700;
	color: var(--theme-primary, currentColor);
}

/* Récompenses */
.lr-title {
	margin: .5rem 0 0;
	font-size: 1.1rem;
}

.lr-rewards {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lr-reward {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: .75rem .9rem;
	border: 1px solid rgba(127, 127, 127, .3);
	border-radius: .6rem;
}

.lr-reward.is-ok {
	border-color: var(--theme-primary, currentColor);
}

.lr-reward-cost {
	flex: none;
	text-align: right;
	font-weight: 600;
}

.lr-help {
	font-size: .8rem;
	font-weight: 400;
	opacity: .7;
}

.lr-terms {
	font-size: .85rem;
}

.lr-notice {
	margin: 0;
	text-align: center;
	opacity: .8;
}

/* Connexion et inscription */
.lr-tabs {
	display: flex;
	gap: .5rem;
}

.lr-tab {
	flex: 1;
	padding: .6rem .5rem;
	border: 0;
	border-bottom: 2px solid rgba(127, 127, 127, .3);
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.lr-tab.is-active {
	border-bottom-color: var(--theme-primary, currentColor);
	color: var(--theme-primary, inherit);
}

.lr-form {
	display: flex;
	flex-direction: column;
	gap: .85rem;
}

.lr-form[hidden] {
	display: none;
}

.lr-field {
	display: flex;
	flex-direction: column;
	gap: .3rem;
}

.lr-label {
	font-size: .85rem;
	font-weight: var(--theme-form-label-weight, 600);
}

.lr-input {
	width: 100%;
	padding: .65rem .8rem;
	border: var(--theme-form-border-width, 1px) solid var(--theme-form-border-color, rgba(127, 127, 127, .45));
	border-radius: var(--theme-form-border-radius, .5rem);
	background: var(--theme-form-background, transparent);
	color: var(--theme-form-text, inherit);
	font: inherit;
}

.lr-input:focus {
	outline: var(--theme-form-focus-width, 1px) solid var(--theme-form-focus-color, var(--theme-primary, currentColor));
	outline-offset: var(--theme-form-focus-offset, 1px);
}

.lr-check {
	display: flex;
	align-items: flex-start;
	gap: .5rem;
	font-size: .9rem;
}

.lr-check input {
	margin-top: .25rem;
	accent-color: var(--theme-primary, currentColor);
}

.lr-submit,
.lr-wallet {
	width: 100%;
	cursor: pointer;
}

.lr-link {
	align-self: center;
	padding: .25rem;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: .85rem;
	opacity: .7;
	text-decoration: underline;
	cursor: pointer;
}

.lr-error {
	margin: 0;
	padding: .6rem .8rem;
	border-radius: .5rem;
	background: color-mix(in srgb, var(--theme-form-error-color, #d93025) 12%, transparent);
	color: var(--theme-form-error-color, #d93025);
	font-size: .9rem;
}

/* Mot de passe : œil pour l'afficher ou le masquer */
.lr-password {
	position: relative;
}

.lr-password .lr-input {
	padding-right: 2.9rem;
}

.lr-eye {
	position: absolute;
	top: 50%;
	right: .35rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	opacity: .6;
	cursor: pointer;
	transform: translateY(-50%);
}

.lr-eye:hover,
.lr-eye:focus-visible {
	opacity: 1;
}

/* Force du nouveau mot de passe : barre en 4 niveaux et 4 règles, comme à la création de compte du manager */
.lr-strength {
	--lr-strength-color: rgba(127, 127, 127, .45);
	margin-top: .6rem;
	font-size: .85rem;
}

.lr-strength[data-level="1"] { --lr-strength-color: #dc3545; }
.lr-strength[data-level="2"] { --lr-strength-color: #f08c00; }
.lr-strength[data-level="3"] { --lr-strength-color: #7cb342; }
.lr-strength[data-level="4"] { --lr-strength-color: #2e9d6a; }

.lr-strength-head {
	display: flex;
	align-items: center;
	gap: .75rem;
}

.lr-strength-bar {
	display: flex;
	flex: 1;
	gap: .3rem;
}

.lr-strength-bar span {
	flex: 1;
	height: 6px;
	border-radius: 3px;
	background: rgba(127, 127, 127, .25);
	transition: background-color .2s;
}

.lr-strength[data-level="1"] .lr-strength-bar span:nth-child(-n+1),
.lr-strength[data-level="2"] .lr-strength-bar span:nth-child(-n+2),
.lr-strength[data-level="3"] .lr-strength-bar span:nth-child(-n+3),
.lr-strength[data-level="4"] .lr-strength-bar span:nth-child(-n+4) {
	background: var(--lr-strength-color);
}

.lr-strength-label {
	min-width: 5.5rem;
	text-align: right;
	font-weight: 600;
	color: var(--lr-strength-color);
}

.lr-strength-rules {
	margin: .6rem 0 0;
	padding: 0;
	list-style: none;
}

.lr-strength-rules li {
	line-height: 1.6;
	opacity: .65;
}

.lr-strength-rules li::before {
	content: '\25CB';
	display: inline-block;
	width: 1.4rem;
}

.lr-strength-rules li.is-valid {
	color: #2e9d6a;
	opacity: 1;
}

.lr-strength-rules li.is-valid::before {
	content: '\2713';
	font-weight: 700;
}

/* Champ téléphone (intl-tel-input) : pleine largeur, couleurs du formulaire et du thème */
.lr-form .iti {
	display: block;
	width: 100%;
	--iti-border-color: var(--theme-form-border-color, rgba(127, 127, 127, .45));
	--iti-dropdown-bg: var(--theme-background, #fff);
	--iti-hover-color: rgba(127, 127, 127, .15);
	--iti-arrow-color: currentColor;
}

.lr-form .iti__dropdown-content {
	color: var(--theme-text, inherit);
	background: var(--theme-background, #fff);
	border-radius: var(--theme-form-border-radius, .5rem);
}

.lr-form .iti__selected-dial-code {
	color: inherit;
}

.lr-check {
	display: flex;
	align-items: center;
	gap: .5rem;
}

/* Connexion Google : bouton « Continuer avec Google » au-dessus des formulaires, séparé d'eux par « ou » */
.lr-google {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: .75rem;
	margin-bottom: 1rem;
}

.lr-google-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	width: 100%;
	background: #fff;
	color: #1f1f1f;
	border: 1px solid #dadce0;
	text-decoration: none;
}

.lr-google-or {
	text-align: center;
	font-size: .85rem;
	opacity: .7;
}
