/* ============================================================
   Weeb Admin — Page de connexion (refonte #34)
   Style appliqué au DOM natif de wp-login.php.
   ============================================================ */

:root {
	--bg:          #f6f4ee;
	--surface:     #ffffff;
	--surface-2:   #fafaf6;
	--surface-3:   #f1eee5;

	--ink:         #0e0e12;
	--ink-2:       #2b2c34;
	--ink-3:       #5c5d68;
	--ink-4:       #8a8b95;

	--border:      #e7e4dc;
	--border-2:    #d8d4c8;

	--accent-ring: rgba(14, 14, 18, 0.08);
	--success:     #0d8a4f;
	--danger:      #c2261d;

	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Roboto, sans-serif;

	--r-1: 8px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* ============================================================
   SHELL — split 50/50
   ============================================================ */
body.login {
	margin: 0;
	min-height: 100vh;
	background: var(--surface);
	font-family: var(--font);
	color: var(--ink);
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* Image de couverture : masquée par défaut, affichée en desktop via le
   média plus bas (le split n'a de sens que sur grand écran). */
.aw-login-image {
	display: none;
}

/* Zone formulaire — colonne centrée, contenu aligné sur un axe unique */
#login {
	position: relative;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	min-height: 100vh;
	padding: 48px 32px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background: var(--surface);
	box-sizing: border-box;
	z-index: 10;
}

/* Tous les blocs de contenu partagent la même colonne de 380px */
#login h1,
#login .aw-login-head,
#loginform,
#login #nav,
#login_error,
.login .message,
.login .notice {
	width: 100%;
	max-width: 380px;
	margin-left: 0;
	margin-right: 0;
}

/* ============================================================
   LOGO
   ============================================================ */
#login h1 {
	margin: 0 0 24px;
}
#login h1 a {
	width: 180px;
	height: 56px;
	max-width: 100%;
	margin: 0;
	background-size: contain;
	background-position: left center;
	background-repeat: no-repeat;
}

/* ============================================================
   TITRE + ACCROCHE
   ============================================================ */
.aw-login-head {
	margin-bottom: 24px;
}
.aw-login-title {
	font-size: 28px;
	font-weight: 600;
	letter-spacing: -.02em;
	line-height: 1.1;
	margin: 0 0 8px;
	color: var(--ink);
}
.aw-login-lede {
	margin: 0;
	color: var(--ink-3);
	font-size: 14px;
}

/* ============================================================
   FORMULAIRE
   ============================================================ */
#loginform {
	border: 0;
	box-shadow: none;
	background: transparent;
	padding: 0;
	overflow: visible;
}

#loginform label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--ink-2);
	margin-bottom: 8px;
}

#loginform p {
	margin: 0 0 20px;
}

/* Champs */
.login form .input,
.login input[type="text"],
.login input[type="password"],
#user_login,
#user_pass {
	width: 100%;
	background: var(--bg);
	border: 1.5px solid var(--border);
	border-radius: var(--r-1);
	padding: 11px 14px;
	font-size: 14px;
	line-height: normal;
	color: var(--ink);
	box-shadow: none;
	transition: border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}
.login form .input::placeholder,
#user_login::placeholder,
#user_pass::placeholder {
	color: var(--ink-4);
}
.login form .input:hover,
#user_login:hover,
#user_pass:hover {
	background: var(--surface-2);
	border-color: var(--border-2);
}
.login form .input:focus,
#user_login:focus,
#user_pass:focus {
	outline: none;
	background: var(--surface);
	border-color: var(--ink);
	box-shadow: 0 0 0 3px var(--accent-ring);
}

/* Champ mot de passe + bouton afficher/masquer natif */
.login .user-pass-wrap {
	margin-bottom: 20px;
}
/* Le wrapper ne contient QUE le champ pour la hauteur de référence ;
   l'avertissement caps-lock est sorti du flux pour ne pas décaler l'œil. */
.login .wp-pwd {
	position: relative;
	display: flex;
	align-items: center;
}
.login .wp-pwd input[type="text"],
.login .wp-pwd input[type="password"] {
	flex: 1;
	padding-right: 44px;
}
.login .wp-pwd .button.wp-hide-pw {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	height: 32px;
	width: 32px;
	min-width: 0;
	padding: 0;
	margin: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	color: var(--ink-4);
	border-radius: 6px;
	transition: color 160ms var(--ease), background 160ms var(--ease);
}
.login .wp-pwd .button.wp-hide-pw .dashicons {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}
.login .wp-pwd .button.wp-hide-pw:hover {
	color: var(--ink);
	background: var(--surface-3);
}
.login .wp-pwd .button.wp-hide-pw:focus,
.login .wp-pwd .button.wp-hide-pw:focus-visible {
	outline: none;
	box-shadow: none;
}
/* Avertissement « majuscules activées » : hors flux pour ne pas pousser le champ */
.login .wp-pwd .caps-warning,
.login #caps-warning {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	margin: 0;
}

/* ============================================================
   SE SOUVENIR DE MOI
   ============================================================ */
/* L'input et le label sont des frères dans wp-login.php : on aligne au niveau
   du conteneur .forgetmenot, pas du label. Le lien « mot de passe oublié »
   y est déplacé par JS et poussé à droite. !important pour passer au-dessus
   des styles natifs WordPress sur .forgetmenot. */
.login .forgetmenot {
	display: flex !important;
	align-items: center !important;
	gap: 8px;
	width: 100%;
	margin: 22px 0 0 !important;
}
.login .forgetmenot label {
	font-size: 13px;
	font-weight: 400;
	color: var(--ink-2);
	margin: 0 !important;
	line-height: 17px;
	cursor: pointer;
}
.login .forgetmenot input[type="checkbox"] {
	align-self: center;
}
/* Lien « mot de passe oublié » poussé au bord droit (cible la classe ajoutée
   par JS ET tout lien du conteneur, au cas où la classe manquerait). */
.login .forgetmenot .aw-forgot-link,
.login .forgetmenot a {
	margin-left: auto !important;
	font-size: 13px;
	font-weight: 500;
	line-height: 17px;
	color: var(--ink-2);
	white-space: nowrap;
	transition: color 160ms var(--ease);
}
.login .forgetmenot .aw-forgot-link:hover,
.login .forgetmenot a:hover {
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.login .forgetmenot input[type="checkbox"] {
	width: 17px;
	height: 17px;
	margin: 0;
	flex-shrink: 0;
	border: 1.5px solid var(--border-2);
	border-radius: 5px;
	background: var(--surface);
	accent-color: var(--ink);
}
.login .forgetmenot input[type="checkbox"]:checked {
	background: var(--ink);
	border-color: var(--ink);
}
.login .forgetmenot input[type="checkbox"]:focus {
	box-shadow: 0 0 0 3px var(--accent-ring);
	outline: none;
}

/* ============================================================
   BOUTON DE CONNEXION
   ============================================================ */
.login .submit,
#loginform .submit {
	margin: 12px 0 0 !important;
}
.wp-core-ui .button-primary,
#wp-submit {
	width: 100%;
	height: auto;
	padding: 12px 18px;
	background: var(--ink);
	border: 0;
	border-color: var(--ink);
	border-radius: var(--r-1);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
	transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
}
.wp-core-ui .button-primary:hover,
#wp-submit:hover {
	background: #1a1a22;
	transform: translateY(-1px);
	box-shadow: 0 10px 28px rgba(14, 14, 18, .18);
}
.wp-core-ui .button-primary:active,
#wp-submit:active {
	transform: translateY(0);
	box-shadow: none;
}
.wp-core-ui .button-primary:focus,
#wp-submit:focus {
	box-shadow: 0 0 0 3px var(--accent-ring);
	outline: none;
}

/* ============================================================
   LIENS — mot de passe oublié & retour au site
   ============================================================ */
#login #nav {
	margin: 20px auto 0;
	padding: 0;
	text-align: left;
	font-size: 13px;
}
#login #nav a {
	color: var(--ink-2);
	font-weight: 500;
	transition: color 160ms var(--ease);
}
#login #nav a:hover {
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Retour au site : positionné en haut à droite de la zone formulaire */
#backtoblog {
	position: absolute;
	top: 28px;
	right: 32px;
	margin: 0;
	padding: 0;
	text-align: right;
}
#backtoblog a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--ink-3);
	padding: 6px 10px;
	border-radius: 6px;
	transition: color 160ms var(--ease), background 160ms var(--ease);
}
#backtoblog a:hover {
	color: var(--ink);
	background: var(--surface-3);
}

/* ============================================================
   MESSAGES & ERREURS
   ============================================================ */
.login #login_error,
.login .message,
.login .notice {
	border-radius: var(--r-1);
	border-left-width: 4px;
	box-shadow: none;
	font-size: 13px;
	padding: 12px 14px;
	margin-bottom: 16px;
	background: var(--surface-2);
}
.login #login_error {
	border-left-color: var(--danger);
}
.login .message,
.login .notice {
	border-left-color: var(--ink);
}

/* ============================================================
   DESKTOP — split image (gauche) / formulaire (droite)
   S'appuie sur la classe aw-has-cover ajoutée au <body> par AW_Login
   quand une image de couverture est définie.
   ============================================================ */
@media screen and (min-width: 901px) {
	body.aw-has-cover .aw-login-image {
		display: block;
		position: fixed;
		top: 0;
		left: 0;
		width: 50%;
		height: 100%;
		background-size: cover;
		background-position: center;
		background-repeat: no-repeat;
		background-color: #1a1a1f;
		z-index: 1;
	}
	body.aw-has-cover #login {
		margin: 0 0 0 50%;
		width: 50%;
		max-width: none;
	}
}

/* ============================================================
   PETITS ÉCRANS
   ============================================================ */
@media screen and (max-width: 480px) {
	#login {
		padding: 32px 16px 16px;
	}
	.aw-login-title {
		font-size: 24px;
	}
	#backtoblog {
		position: static;
		text-align: left;
		margin-bottom: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}

input#wp-submit {
    margin-top: 25px !important;
}
.login .wp-pwd .button.wp-hide-pw .dashicons {
	padding-bottom: 23px !important;
}
button.button.button-secondary.wp-hide-pw.hide-if-no-js:hover {
    background: transparent !important;
}

/* Masque le sélecteur de langue sur la page de connexion. */
form#language-switcher {
    display: none;
}