/*
 * Full reproduction of the Penpot "Page de connexion" design (two-panel
 * split: navy visual panel + white login card) - see
 * src/Portal/templates/login.php, assigned via the "Portail cadeaux —
 * Connexion" page template (LoginPageController). Distinct from login.css,
 * which only re-skins native wp-login.php (structurally incapable of a
 * two-panel layout) - kept as the fallback entry point for admins/
 * coordinators who still need real wp-admin access.
 */

:root {
	--gp-color-navy: #0e2a47;
	--gp-color-red: #c8102e;
	--gp-color-gold: #e5b85c;
	--gp-color-icon: #c8964a;
	--gp-color-text-muted: #6e6e6e;
	--gp-color-text-checkbox: #3a3a3a;
	--gp-color-border: #dddddd;
	--gp-color-bg-cream: #fbf7f0;
	--gp-font-heading: "Playfair Display", Georgia, serif;
	--gp-font-body: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

body.gp-login-page {
	margin: 0;
	font-family: var(--gp-font-body);
	background: var(--gp-color-bg-cream);
}

/*
 * Logo lockup (star-in-circle + site name) - Penpot only shows this on the
 * mobile login layout ("Visuel haut"), not desktop's Panneau visuel, so it's
 * hidden here and only revealed at the mobile breakpoint below.
 */
.gp-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	position: relative;
	z-index: 1;
}

.gp-logo--mobile-only {
	display: none;
}

.gp-logo__mark {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--gp-color-red);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 700;
	flex-shrink: 0;
}

.gp-logo__title {
	font-family: var(--gp-font-heading);
	font-size: 14px;
	font-weight: 700;
	color: var(--gp-color-navy);
	margin: 0;
	line-height: 1.2;
}

.gp-logo__subtitle {
	font-family: var(--gp-font-body);
	font-size: 9px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--gp-color-text-muted);
	margin: 0;
}

.gp-login {
	display: flex;
	min-height: 100vh;
}

.gp-login__visual {
	position: relative;
	flex: 0 0 44%;
	max-width: 640px;
	background: var(--gp-color-navy);
	color: #ffffff;
	padding: 48px 64px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	overflow: hidden;
	box-sizing: border-box;
}

.gp-login__star {
	position: absolute;
	border-radius: 50%;
	background: var(--gp-color-gold);
	opacity: 0.6;
}

.gp-login__tagline {
	position: relative;
	z-index: 1;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--gp-color-gold);
	margin: 0;
}

.gp-login__title {
	position: relative;
	z-index: 1;
	font-family: var(--gp-font-heading);
	font-size: 52px;
	font-weight: 700;
	line-height: 1.2;
	margin: 16px 0 0;
}

.gp-login__title span {
	display: block;
	font-style: italic;
	color: var(--gp-color-gold);
}

.gp-login__description {
	position: relative;
	z-index: 1;
	font-size: 17px;
	line-height: 1.6;
	margin-top: 24px;
	max-width: 460px;
}

.gp-login__credit {
	position: relative;
	z-index: 1;
	font-size: 12px;
	color: var(--gp-color-gold);
	margin: 0;
}

.gp-login__form-panel {
	flex: 1;
	background: var(--gp-color-bg-cream);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	box-sizing: border-box;
}

.gp-login__card {
	width: 100%;
	max-width: 480px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(14, 42, 71, 0.1);
	border-top: 5px solid var(--gp-color-red);
	padding: 40px;
	box-sizing: border-box;
}

.gp-login__eyebrow {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--gp-color-red);
	margin: 0 0 12px;
}

.gp-login__subtitle {
	font-size: 14px;
	line-height: 1.5;
	color: var(--gp-color-text-muted);
	margin: 0 0 28px;
}

.gp-login__error {
	background: #fdecee;
	border: 1px solid var(--gp-color-red);
	color: var(--gp-color-red);
	border-radius: 6px;
	padding: 12px 16px;
	font-size: 13px;
	margin: 0 0 20px;
}

.gp-login__field {
	margin-bottom: 20px;
}

.gp-login__label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--gp-color-navy);
	margin-bottom: 8px;
}

.gp-login__label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.gp-login__forgot {
	font-size: 12px;
	font-weight: 600;
	color: var(--gp-color-red);
	text-decoration: none;
}

.gp-login__input-wrap {
	position: relative;
}

.gp-login__input-icon {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 13px;
	font-weight: 700;
	color: var(--gp-color-icon);
	pointer-events: none;
}

.gp-login__input {
	width: 100%;
	height: 50px;
	padding: 0 44px 0 40px;
	border: 1.5px solid var(--gp-color-border);
	border-radius: 4px;
	font-size: 15px;
	font-family: var(--gp-font-body);
	box-sizing: border-box;
}

.gp-login__input:focus {
	outline: none;
	border-color: var(--gp-color-navy);
}

.gp-login__toggle-password {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	color: var(--gp-color-text-muted);
	padding: 4px;
}

.gp-login__remember {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: var(--gp-color-text-checkbox);
	margin-bottom: 28px;
	cursor: pointer;
}

.gp-login__remember input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	margin: 0;
	border-radius: 3px;
	border: 1.5px solid var(--gp-color-border);
	background: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
}

.gp-login__remember input[type="checkbox"]:checked {
	background: var(--gp-color-red);
	border-color: var(--gp-color-red);
}

.gp-login__remember input[type="checkbox"]:checked::after {
	content: "";
	width: 5px;
	height: 9px;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) translate(-1px, -1px);
}

.gp-login__submit {
	width: 100%;
	height: 54px;
	background: var(--gp-color-red);
	color: #ffffff;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	cursor: pointer;
}

.gp-login__submit:hover,
.gp-login__submit:focus {
	background: var(--gp-color-navy);
}

@media (max-width: 900px) {
	.gp-login {
		flex-direction: column;
	}

	.gp-login__visual {
		flex: 0 0 auto;
		max-width: none;
		padding: 32px 24px;
		gap: 16px;
		justify-content: flex-start;
	}

	/*
	 * Penpot's mobile "Visuel haut" is a condensed banner (a logo mark
	 * instead of the description/credit text desktop shows) - not just a
	 * smaller version of the same content.
	 */
	.gp-logo--mobile-only {
		display: flex;
	}

	.gp-login__description,
	.gp-login__credit {
		display: none;
	}

	.gp-login__title {
		font-size: 28px;
	}

	.gp-login__form-panel {
		padding: 24px;
	}

	.gp-login__card {
		padding: 24px;
	}
}
