/* ==========================================================================
   Connexion - page /connexion/ (page-id-95322, template Bricks login-2) + page mot-de-passe-perdu (95563)
   Maquette : maquettes/connexion-maquette.html.
   Overrides scopés sous body.lmec-auth uniquement — le DOM Bricks est
   conservé (formulaire login natif, actions redirect+login).
   ========================================================================== */

/* ---------- Layout : carte centrée verticalement ---------- */
body.lmec-auth .login-2.brxe-section {
	min-height: 100vh;
	padding: 40px 20px;
	/* safe : sans quoi le centrage du conteneur clippe le logo quand
	   le contenu dépasse la hauteur du viewport. */
	justify-content: safe center;
}

body.lmec-auth .login-2__container {
	flex-shrink: 0;
	min-height: calc(100vh - 80px);
	display: flex;
	flex-direction: column;
	/* Le wrap Bricks passe les items en 2e colonne quand la hauteur
	   ne suffit pas (mobile) — la page est un empilement simple. */
	flex-wrap: nowrap;
	align-items: center;
	/* safe : sans quoi le centrage vertical clippe le logo quand le
	   contenu dépasse la hauteur du viewport. */
	justify-content: safe center;
	gap: 20px;
}

/* ---------- Logo : masqué (l'eyebrow « La Mariée en Colère » fait office
   d'identité en haut de carte) ---------- */
body.lmec-auth .login-2__logo {
	display: none;
}

/* ---------- Carte ---------- */
body.lmec-auth .login-2__form-container {
	width: 100%;
	max-width: 460px;
	background: var(--lmec-bg-surface, #fff);
	border: 1px solid var(--lmec-border);
	border-radius: var(--lmec-radius-card, 16px);
	box-shadow: var(--lmec-shadow-card);
	padding: 24px 34px 20px;
	margin-left: auto;
	margin-right: auto;
}

body.lmec-auth .login-2__heading {
	font-family: var(--font-heading, 'Playfair Display', serif);
	font-size: 30px;
	font-weight: 600;
	color: var(--lmec-text-title, #3C2E21);
	text-align: center;
	line-height: 1.2;
	width: 100%;
	margin: 0;
}

/* Vague décorative sous le titre (signature des heroes LMEC). */
body.lmec-auth .login-2__heading::after {
	content: '';
	display: block;
	width: 96px;
	height: 14px;
	margin: 8px auto 12px;
	background: var(--lmec-secondary, #F8BCA9);
	-webkit-mask: url("../img/vague-lmec.svg") center / contain no-repeat;
	mask: url("../img/vague-lmec.svg") center / contain no-repeat;
}

/* ---------- Champs ---------- */
body.lmec-auth .login-2__form label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--lmec-text-title, #3C2E21);
	margin-bottom: 5px;
}
body.lmec-auth .login-2__form label.required::after {
	content: ' *';
	color: var(--lmec-primary);
}
body.lmec-auth .login-2__form input[type="text"],
body.lmec-auth .login-2__form input[type="password"] {
	display: block;
	width: 100%;
	height: 46px;
	padding: 0 14px;
	font-size: 14.5px;
	color: var(--lmec-text-title, #3C2E21);
	background: var(--lmec-bg-surface, #fff);
	border: 1px solid var(--lmec-border);
	border-radius: var(--lmec-radius-field, 10px);
	box-shadow: none;
	transition: border-color .18s, box-shadow .18s;
}
body.lmec-auth .login-2__form input:focus {
	outline: none;
	border-color: var(--lmec-primary);
	box-shadow: var(--lmec-focus-ring);
}

/* ---------- Options : remember + forgot ---------- */
body.lmec-auth .login-2__form .options-wrapper {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
}
body.lmec-auth .login-2__form .options-wrapper li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
body.lmec-auth .login-2__form .options-wrapper label {
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--lmec-text-light, #8A7A6B);
	margin: 0;
	cursor: pointer;
}
body.lmec-auth .login-2__form .options-wrapper input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	/* !important : le CSS custom du template force 100% sur les inputs. */
	width: 16px !important;
	height: 16px !important;
	max-width: 16px !important;
	max-height: 16px !important;
	padding: 0 !important;
	margin: 0;
	border: 1.5px solid var(--lmec-border);
	border-radius: 5px;
	background: var(--lmec-bg-surface, #fff);
	cursor: pointer;
	position: relative;
	flex-shrink: 0;
	transition: all .18s;
}
body.lmec-auth .login-2__form .options-wrapper input[type="checkbox"]:checked {
	background: var(--lmec-primary);
	border-color: var(--lmec-primary);
}
body.lmec-auth .login-2__form .options-wrapper input[type="checkbox"]:checked::after {
	content: '';
	position: absolute;
	left: 4px;
	top: 1px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
body.lmec-auth .login-2__form .options-wrapper input[type="checkbox"]:focus-visible {
	outline: none;
	box-shadow: var(--lmec-focus-ring);
	border-color: var(--lmec-primary);
}

body.lmec-auth .login-2__form-forgot-password {
	font-size: 13px;
	font-weight: 600;
	color: var(--lmec-primary);
	text-decoration: none;
}
body.lmec-auth .login-2__form-forgot-password:hover {
	text-decoration: underline;
}

/* Les deux groupes (remember + forgot) partagent une ligne. */
body.lmec-auth .login-2__form .form-group:has(.login-2__form-forgot-password) {
	/* row : le défaut Bricks est column, ce qui centrait le lien. */
	display: flex;
	flex-direction: row;
	align-items: center;
}
body.lmec-auth .login-2__form .form-group:has(.login-2__form-forgot-password) {
	justify-content: flex-end;
	margin-bottom: 10px;
}
body.lmec-auth .login-2__form .form-group:has(.options-wrapper) {
	margin-bottom: 10px;
}

/* ---------- Submit : bouton plein commun, pleine largeur ---------- */
body.lmec-auth .login-2__form .submit-button-wrapper {
	width: 100%;
	margin-bottom: 0;
}
/* [type=submit] requis pour battre la règle custom du template
   (button[type=submit].bricks-button { border-radius: 0 }). */
body.lmec-auth .login-2__form .submit-button-wrapper button[type="submit"].bricks-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 50px;
	border-radius: var(--lmec-radius-pill, 100px);
	background: var(--lmec-primary);
	color: #fff;
	font-size: 14.5px;
	font-weight: 600;
	padding: 0;
	transition: background .2s, transform .2s;
}
body.lmec-auth .login-2__form .submit-button-wrapper button[type="submit"].bricks-button:hover {
	background: var(--lmec-primary-hover);
	color: #fff;
	transform: translateY(-1px);
}
body.lmec-auth .login-2__form .submit-button-wrapper button[type="submit"].bricks-button:focus-visible {
	outline: none;
	box-shadow: var(--lmec-focus-ring);
}

/* ---------- Pied de carte : inscription ---------- */
body.lmec-auth .login-2__signup {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--lmec-border);
	font-size: 13.5px;
	color: var(--lmec-text-light, #8A7A6B);
}
/* Texte d'accroche du pied de carte : diffère selon la page. */
body.page-id-95322 .login-2__signup::before {
	content: 'Pas encore de compte ?';
}
body.page-id-95563 .login-2__signup::before {
	content: 'Vous vous souvenez ?';
}
body.lmec-auth .login-2__signup .brxe-icon {
	display: none; /* flèche retour sans objet ici */
}
body.lmec-auth .login-2__signup .brxe-text-link {
	color: var(--lmec-primary);
	font-weight: 600;
	font-size: 13.5px;
	text-decoration: none;
}
body.lmec-auth .login-2__signup .brxe-text-link:hover {
	text-decoration: underline;
}

/* ---------- Page mot de passe perdu ---------- */
/* Intro sous le titre, hors de la carte (element texte Bricks). */
body.lmec-auth .lmec-lp-intro {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--lmec-text-light, #8A7A6B);
	text-align: center;
	max-width: 380px;
}
/* Masquée sur l'écran de confirmation (?envoye=1). */
body.lmec-auth.lmec-lp-sent .lmec-lp-intro {
	display: none;
}
body.lmec-auth .lmec-lp-confirm p {
	margin: 0 0 10px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--lmec-text-body, #6E5D4D);
	text-align: center;
}
body.lmec-auth .lmec-lp-confirm p:last-child {
	margin-bottom: 0;
}

/* ---------- Retour au site (sous la carte) ---------- */
body.lmec-auth #brxe-lmecbk,
body.lmec-auth #brxe-lpdbak {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--lmec-text-light, #8A7A6B);
	text-decoration: none;
	transition: color .2s;
}
body.lmec-auth #brxe-lmecbk::before,
body.lmec-auth #brxe-lpdbak::before {
	content: '←';
	font-weight: 400;
}
body.lmec-auth #brxe-lmecbk:hover,
body.lmec-auth #brxe-lpdbak:hover {
	color: var(--lmec-primary);
}
body.lmec-auth #brxe-lmecbk .brxe-text-link,
body.lmec-auth #brxe-lpdbak .brxe-text-link {
	color: inherit;
	font: inherit;
	text-decoration: none;
}
body.lmec-auth .login-2__container > .brxe-div:last-child {
	align-self: center;
	margin-bottom: 12px;
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
	body.lmec-auth .login-2.brxe-section { padding: 36px 16px; }
	body.lmec-auth .login-2__logo img { width: 150px; }
	body.lmec-auth .login-2__form-container { padding: 30px 22px 24px; }
	body.lmec-auth .login-2__heading { font-size: 26px; }
}
