/**
 * Mon compte, visiteur non connecté : connexion et création de compte
 * (woocommerce/myaccount/form-login.php, inc/woocommerce/account.php).
 * Fichier autonome chargé sur cette page seulement ; les champs, cases et boutons gardent
 * le style commun des pages WooCommerce (forms.css, cart-checkout.css).
 *
 * Ordinateur : carte du formulaire à gauche, panneau « Club KidShow » à droite.
 * Mobile : formulaire d'abord, avantages ensuite.
 */
.ks-auth {
	--ks-a-ink: #2a2230;
	--ks-a-soft: #5d5463;
	--ks-a-muted: #8c8391;
	--ks-a-line: #eee4d8;
	--ks-a-cream: #fff8f0;
	--ks-a-peach: #fff0e0;
	--ks-a-mint: #e5f6f2;
	--ks-a-orange: #ff8000;
	--ks-a-orange-dark: #e56f00;
	--ks-a-purple: #a2257c;
	--ks-a-display: "Fraunces", Georgia, "Times New Roman", serif;
	--ks-a-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

	display: grid;
	gap: 1.5rem;
	width: 100%;
	color: var(--ks-a-ink);
}

@media (width >= 64rem) {
	.ks-auth {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 2rem;
		align-items: stretch;
	}
}

/* Le conteneur des pages WooCommerce est en flex : la grille prend toute la largeur. */
.ks-woo-page .woocommerce > .ks-auth {
	flex: 1 1 100%;
}

/* Carte du formulaire */
.ks-auth__card {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 1.25rem 1rem;
	border: 1.5px solid var(--ks-a-line);
	border-radius: 24px;
	background: #fff;
}

@media (width >= 48rem) {
	.ks-auth__card {
		padding: 2.25rem 2.5rem 2rem;
	}
}

/* Onglets (contrôle segmenté) */
.ks-auth__tabs {
	display: none;
}

.ks-auth.is-tabbed .ks-auth__tabs {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	padding: 0.3125rem;
	border-radius: 999px;
	background: var(--ks-a-cream);
	box-shadow: inset 0 0 0 1.5px var(--ks-a-line);
}

.ks-auth__tabs-thumb {
	position: absolute;
	top: 0.3125rem;
	bottom: 0.3125rem;
	left: 0.3125rem;
	width: calc(50% - 0.3125rem);
	border-radius: 999px;
	background: #fff;
	box-shadow:
		0 6px 14px -8px rgba(42, 34, 48, 0.35),
		0 0 0 1.5px var(--ks-a-line);
	transition: transform 0.3s var(--ks-a-ease);
}

.ks-auth[data-tab="register"] .ks-auth__tabs-thumb {
	transform: translateX(100%);
}

.ks-auth__tabs [role="tab"] {
	position: relative;
	z-index: 1;
	min-height: 2.75rem;
	border-radius: 999px;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--ks-a-muted);
	transition: color 0.2s;
}

.ks-auth__tabs [role="tab"][aria-selected="true"] {
	color: var(--ks-a-ink);
}

.ks-auth__tabs [role="tab"]:hover {
	color: var(--ks-a-ink);
}

.ks-auth__tabs [role="tab"]:focus-visible {
	outline: 2px solid var(--ks-a-orange);
	outline-offset: 2px;
}

/* Panneaux : sans JavaScript, les deux formulaires s'affichent l'un sous l'autre. */
.ks-auth__panel {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.ks-auth:not(.is-tabbed) .ks-auth__panel + .ks-auth__panel {
	padding-top: 1.75rem;
	border-top: 1.5px dashed var(--ks-a-line);
}

.ks-auth.is-tabbed .ks-auth__panel[data-inactive] {
	display: none;
}

.ks-auth.is-tabbed .ks-auth__panel {
	animation: ks-auth-in 0.3s var(--ks-a-ease);
}

@keyframes ks-auth-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
}

.ks-auth__head {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.ks-woo-page .ks-auth .ks-auth__title {
	margin: 0;
	font-family: var(--ks-a-display);
	font-size: 1.625rem;
	font-weight: 600;
	line-height: 1.15;
	color: var(--ks-a-ink);
}

@media (width >= 48rem) {
	.ks-woo-page .ks-auth .ks-auth__title {
		font-size: 2rem;
	}
}

.ks-auth__hint {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--ks-a-soft);
}

/* Arrivée depuis le panier */
.ks-auth__context {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	margin: 0;
	padding: 0.75rem 1rem;
	border-radius: 14px;
	background: var(--ks-a-mint);
	font-size: 0.875rem;
	font-weight: 600;
	color: #12695f;
}

.ks-auth__context svg {
	flex: none;
}

/* Formulaires */
.ks-woo-page .woocommerce .ks-auth form.login,
.ks-woo-page .woocommerce .ks-auth form.register {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
}

.ks-woo-page .woocommerce .ks-auth form::before,
.ks-woo-page .woocommerce .ks-auth form::after {
	display: none;
}

/* Icône dans les champs (identifiant, e-mail, mot de passe) */
#customer_login
	.form-row
	:is(#username, #reg_username, #reg_email, #password, #reg_password, #user_login, #password_1, #password_2) {
	padding-left: 2.875rem;
	background-position: 1rem center;
	background-repeat: no-repeat;
	background-size: 1.125rem;
}

#customer_login .form-row :is(#username, #reg_username, #user_login) {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8391' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c1.5-3.5 4.5-5 8-5s6.5 1.5 8 5'/%3E%3C/svg%3E");
}

#customer_login .form-row #reg_email {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8391' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}

#customer_login .form-row :is(#password, #reg_password, #password_1, #password_2) {
	padding-right: 3.25rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8391' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='3'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

/* Bouton « afficher le mot de passe » ajouté par WooCommerce : centré dans le champ */
#customer_login .password-input {
	position: relative;
	display: block;
}

#customer_login .show-password-input {
	position: absolute;
	top: 50%;
	right: 0.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: none;
	transform: translateY(-50%);
	cursor: pointer;
}

/* WooCommerce dessine son propre œil en ::before : remplacé par celui ci-dessous. */
#customer_login .show-password-input::before {
	content: none;
}

#customer_login .show-password-input::after {
	content: "";
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	background: var(--ks-a-muted);
	font-family: inherit;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E")
		center / contain no-repeat;
}

#customer_login .show-password-input.display-password::after {
	background: var(--ks-a-purple);
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.6 5.6A10 10 0 0 1 12 5.5c6 0 9.5 6.5 9.5 6.5a17 17 0 0 1-2.8 3.6M6.5 6.9C3.9 8.6 2.5 12 2.5 12s3.5 6.5 9.5 6.5c1.9 0 3.5-.6 4.9-1.5'/%3E%3Cpath d='M9.9 9.9a3 3 0 0 0 4.2 4.2M3 3l18 18'/%3E%3C/svg%3E");
}

#customer_login .show-password-input:hover {
	background: var(--ks-a-cream);
}

#customer_login .show-password-input:focus-visible {
	outline: 2px solid var(--ks-a-orange);
	outline-offset: 0;
}

/* « Se souvenir de moi » + « Mot de passe perdu ? » sur une ligne */
.ks-auth__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 0.5rem;
}

@media (width < 30rem) {
	.ks-auth__row .ks-auth__link {
		font-size: 0.8125rem;
	}
}

.ks-auth__link,
.ks-auth__switch a {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--ks-a-purple);
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
	transition: text-decoration-color 0.15s;
}

.ks-auth__link:hover,
.ks-auth__switch a:hover {
	text-decoration-color: currentColor;
}

/* Bouton principal (orange, pleine largeur : .button.alt de cart-checkout.css) */
.ks-woo-page .woocommerce .ks-auth .ks-auth__submit {
	margin-top: 0.25rem;
}

/* Inscription : WooCommerce désactive le bouton tant que le mot de passe est trop faible. */
.ks-woo-page .woocommerce .ks-auth .button.alt:disabled,
.ks-woo-page .woocommerce .ks-auth .button.alt.disabled {
	border-color: var(--ks-a-orange);
	background: var(--ks-a-orange);
	box-shadow: none;
	color: #fff;
	opacity: 0.45;
	cursor: not-allowed;
}

/* Textes ajoutés par WooCommerce et les extensions (confidentialité, newsletter…) */
.ks-woo-page .woocommerce .ks-auth .woocommerce-privacy-policy-text,
.ks-auth__note {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--ks-a-muted);
}

.ks-woo-page .woocommerce .ks-auth .woocommerce-privacy-policy-text p {
	margin: 0;
}

.ks-woo-page .woocommerce .ks-auth .woocommerce-privacy-policy-text a {
	color: var(--ks-a-purple);
	font-weight: 600;
}

/* Robustesse du mot de passe (inscription) */
.ks-woo-page .woocommerce .ks-auth .woocommerce-password-strength {
	margin-top: 0.5rem;
	padding: 0.375rem 0.75rem;
	border-radius: 10px;
	font-size: 0.8125rem;
	font-weight: 700;
	text-align: left;
}

.ks-woo-page .woocommerce .ks-auth .woocommerce-password-strength.short,
.ks-woo-page .woocommerce .ks-auth .woocommerce-password-strength.bad {
	background: #fff0f4;
	color: #c4204f;
}

.ks-woo-page .woocommerce .ks-auth .woocommerce-password-strength.good {
	background: #fff6d6;
	color: #8a6200;
}

.ks-woo-page .woocommerce .ks-auth .woocommerce-password-strength.strong {
	background: var(--ks-a-mint);
	color: #12695f;
}

.ks-woo-page .woocommerce .ks-auth .woocommerce-password-hint {
	display: block;
	margin-top: 0.375rem;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--ks-a-muted);
}

/* Bascule « Pas encore de compte ? » */
.ks-auth__switch {
	margin: 0;
	padding-top: 1.25rem;
	border-top: 1.5px solid var(--ks-a-line);
	font-size: 0.875rem;
	color: var(--ks-a-soft);
	text-align: center;
}

/* Sans onglets (JavaScript absent), les liens de bascule n'ont pas d'objet ;
   le lien « Retour à la connexion » des écrans de mot de passe perdu reste. */
.ks-auth:not(.is-tabbed, .ks-auth--recovery) .ks-auth__switch {
	display: none;
}

/* Panneau « Club KidShow » : l'image panoramique en entier comme bandeau, la carte des
   avantages la chevauche ; le fond reprend la couleur de l'image. */
.ks-auth__club {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	overflow: hidden;
	border-radius: 24px;
	background: linear-gradient(180deg, #fdd3ab 0%, #fde2c6 100%);
	isolation: isolate;
}

#page .ks-auth__club-bg {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1400 / 594;
	object-fit: cover;
	-webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
	mask-image: linear-gradient(180deg, #000 70%, transparent);
}

.ks-auth__club-inner {
	position: relative;
	width: calc(100% - 2rem);
	max-width: 27rem;
	margin: -3.5rem auto 1rem;
	padding: 1.5rem 1.25rem;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 30px 60px -36px rgba(42, 34, 48, 0.55);
}

@media (width >= 48rem) {
	.ks-auth__club-inner {
		padding: 2rem;
	}
}

@media (width >= 64rem) {
	.ks-auth__club {
		justify-content: flex-start;
	}

	.ks-auth__club-inner {
		width: calc(100% - 4rem);
		margin: -4.5rem auto 2rem;
	}
}

.ks-auth__eyebrow {
	display: inline-flex;
	margin: 0 0 0.75rem;
	padding: 0.3125rem 0.75rem;
	border-radius: 999px;
	background: var(--ks-a-peach);
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--ks-a-orange-dark);
}

.ks-woo-page .ks-auth .ks-auth__club-title {
	margin: 0 0 1.25rem;
	font-family: var(--ks-a-display);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.15;
	color: var(--ks-a-ink);
}

@media (width >= 48rem) {
	.ks-woo-page .ks-auth .ks-auth__club-title {
		font-size: 1.875rem;
	}
}

.ks-auth__perks {
	display: grid;
	gap: 0.875rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Tablette : avantages sur deux colonnes */
@media (width >= 40rem) and (width < 64rem) {
	.ks-auth__club-inner {
		max-width: 44rem;
	}

	.ks-auth__perks {
		grid-template-columns: 1fr 1fr;
	}
}

.ks-auth__perk {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	margin: 0;
}

.ks-auth__perk-icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 999px;
	background: var(--ks-a-cream);
	box-shadow: inset 0 0 0 1.5px var(--ks-a-line);
}

.ks-auth__perk-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--ks-a-soft);
}

.ks-auth__perk-text strong {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--ks-a-ink);
}

@media (prefers-reduced-motion: reduce) {
	.ks-auth__tabs-thumb,
	.ks-auth.is-tabbed .ks-auth__panel {
		transition: none;
		animation: none;
	}
}

/*
 * Mot de passe perdu (3 écrans) : même grille, carte à en-tête illustré, panneau d'aide.
 */
.ks-woo-page .woocommerce .ks-auth form.lost_reset_password {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 0;
	padding: 0;
	border: 0;
}

.ks-woo-page .woocommerce .ks-auth form.lost_reset_password .form-row {
	float: none;
	width: 100%;
}

.ks-woo-page .woocommerce .ks-auth form.lost_reset_password .clear {
	display: none;
}

.ks-auth__head--icon {
	align-items: flex-start;
}

.ks-auth__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.75rem;
	height: 3.75rem;
	margin-bottom: 0.5rem;
	border-radius: 999px;
	background: var(--ks-a-cream);
	box-shadow: inset 0 0 0 1.5px var(--ks-a-line);
}

.ks-auth__step {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--ks-a-orange-dark);
}

/* Lien envoyé */
.ks-auth__context--sent {
	align-items: flex-start;
	padding: 1rem 1.125rem;
	font-weight: 500;
	line-height: 1.5;
}

.ks-auth__context--sent svg {
	margin-top: 0.125rem;
}

.ks-auth__note--center {
	text-align: center;
}

/* Retour à la connexion, avec flèche */
.ks-auth__switch--back a {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
}

.ks-auth__switch--back a::before {
	content: "";
	width: 1rem;
	height: 1rem;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E")
		center / contain no-repeat;
	transition: transform 0.2s var(--ks-a-ease);
}

.ks-auth__switch--back a:hover::before {
	transform: translateX(-3px);
}

/* Les 3 étapes du panneau d'aide */
.ks-auth__steps {
	display: grid;
	gap: 0.875rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ks-auth__steps-item {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	margin: 0;
	opacity: 0.6;
}

.ks-auth__steps-item.is-current,
.ks-auth__steps-item.is-done {
	opacity: 1;
}

.ks-auth__steps-num {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	background: var(--ks-a-cream);
	box-shadow: inset 0 0 0 1.5px var(--ks-a-line);
	font-family: var(--ks-a-display);
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--ks-a-soft);
}

.ks-auth__steps-item.is-current .ks-auth__steps-num {
	background: var(--ks-a-orange);
	box-shadow: 0 8px 16px -8px rgba(255, 128, 0, 0.8);
	color: #fff;
}

/* Étape franchie : coche */
.ks-auth__steps-item.is-done .ks-auth__steps-num {
	background: #20b2a6
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E")
		center / 1.125rem no-repeat;
	box-shadow: none;
	color: transparent;
}

/* Service client */
.ks-auth__help {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1.5px dashed var(--ks-a-line);
}

.ks-auth__help-title {
	margin: 0 0 0.25rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--ks-a-ink);
}

.ks-auth__help-link {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	width: fit-content;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--ks-a-purple);
}

.ks-auth__help-link svg {
	width: 1.25rem;
	height: 1.25rem;
	flex: none;
}

.ks-auth__help-link:hover {
	color: var(--ks-a-orange-dark);
}

.ks-auth__help-hours {
	text-wrap: balance;
	margin: 0.25rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--ks-a-muted);
}

