/* ==========================================================================
   Page de connexion (wp-login.php) aux couleurs du site.
   Chargée après style.css (variables --ch-*, police, focus) et le CSS de connexion de WordPress,
   que l'on surcharge ici : sélecteurs « body.login » pour l'emporter sans !important.
   ========================================================================== */

body.login {
	background-color: var(--ch-fond-doux);
	color: var(--ch-texte);
	font-size: 1.125rem;
	line-height: 1.6;
}

body.login #login {
	width: auto;
	max-width: 28rem;
	padding: 5vh 16px 2rem;
}

/* Logo du site (image servie depuis le thème : voir functions.php) */
body.login h1 a {
	width: 120px;
	height: 120px;
	margin-bottom: 0.75rem;
	border-radius: 16px;
	background-color: var(--ch-fond); /* le logo a un fond blanc : vignette arrondie */
	background-size: 88%;
	background-position: center;
	box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
}

/* Message d'accueil = slogan du site (Réglages › Général) */
.connexion-accueil {
	margin: 0 0 1.25rem;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-wrap: balance;
}

/* Formulaire en carte, comme les cartes de l'accueil */
body.login form {
	margin-top: 0;
	padding: 1.5rem;
	border: 1px solid var(--ch-bordure);
	border-top: 4px solid var(--ch-vert); /* filet décoratif */
	border-radius: 16px;
	background-color: var(--ch-fond);
	box-shadow: 0 1px 3px rgb(0 0 0 / 0.08), 0 4px 12px rgb(0 0 0 / 0.06);
}

body.login label {
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.4;
}

body.login form .input,
body.login input[type="text"],
body.login input[type="email"],
body.login input[type="password"] {
	min-height: 48px;
	margin: 0.375rem 0 1.25rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--ch-bordure-forte); /* 3,51:1 sur blanc */
	border-radius: 8px;
	box-shadow: none;
	font-size: 1.125rem;
}
body.login form .input:focus,
body.login input:focus {
	border-color: var(--ch-vert-fonce);
	box-shadow: none;
	outline: 3px solid var(--ch-vert-fonce);
	outline-offset: 2px;
}

/* Bouton « Afficher le mot de passe » : icône seule, cible de 48 px */
body.login .wp-pwd input.password-input { padding-right: 3.25rem; }
body.login .button.wp-hide-pw {
	top: 0.375rem;
	width: 48px;
	height: 48px;
	min-width: 48px;
	min-height: 48px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	box-shadow: none;
	color: var(--ch-vert-fonce);
}
body.login .button.wp-hide-pw:hover,
body.login .button.wp-hide-pw:focus { background: transparent; color: var(--ch-texte); box-shadow: none; }
body.login .button.wp-hide-pw .dashicons {
	top: 0;
	width: 24px;
	height: 24px;
	font-size: 24px;
}

/* « Se souvenir de moi » et sa bulle d'aide */
body.login .forgetmenot {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	float: none;
	margin-bottom: 1.25rem;
}
body.login .forgetmenot label { font-weight: 400; }
body.login input[type="checkbox"] {
	width: 1.5rem;
	height: 1.5rem;
	margin: 0;
	border: 2px solid var(--ch-bordure-forte);
	border-radius: 4px;
}
body.login input[type="checkbox"]:checked::before {
	width: 1.75rem;
	height: 1.75rem;
	margin: -0.25rem 0 0 -0.25rem;
}
body.login .wp-tooltip__toggle {
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--ch-vert-fonce);
}
body.login .wp-tooltip__toggle:hover,
body.login .wp-tooltip__toggle:focus { background: transparent; box-shadow: none; color: var(--ch-texte); }

/* Bouton principal : jaune, texte noir (11,53:1), pleine largeur */
body.login p.submit { clear: both; margin: 0; }
body.login.wp-core-ui .button-primary {
	float: none;
	width: 100%;
	height: auto;
	min-height: 48px;
	padding: 0.625rem 1rem;
	border: 2px solid var(--ch-texte);
	border-radius: var(--ch-rayon);
	background: var(--ch-jaune);
	line-height: 1.3;
	box-shadow: none;
	color: var(--ch-texte);
	font-size: 1.125rem;
	font-weight: 700;
	text-shadow: none;
}
body.login.wp-core-ui .button-primary:hover,
body.login.wp-core-ui .button-primary:focus,
body.login.wp-core-ui .button-primary:active {
	border-color: var(--ch-texte);
	background: var(--ch-jaune-survol); /* 10,09:1 */
	box-shadow: 0 2px 8px rgb(0 0 0 / 0.18);
	color: var(--ch-texte);
}

/* Bouton secondaire (« Générer un mot de passe » à la réinitialisation) */
body.login.wp-core-ui .button-secondary:not(.wp-hide-pw) {
	min-height: 44px;
	padding: 0.25rem 1rem;
	border: 2px solid var(--ch-texte);
	border-radius: var(--ch-rayon);
	background: var(--ch-fond);
	color: var(--ch-texte);
	font-size: 1.125rem;
}

/* Messages : texte agrandi (WordPress le fixe à 13 px sur le paragraphe).
   Erreur : filet rouge de WordPress + texte « Erreur : » ; information : filet vert foncé. */
body.login .message,
body.login .notice,
body.login .success,
body.login #login_error {
	margin-bottom: 1.25rem;
	padding: 0.75rem 1rem;
	border-radius: 8px;
}
body.login .message p,
body.login .notice p,
body.login .success p,
body.login #login_error p {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.5;
}
body.login #login_error { font-size: 1.125rem; line-height: 1.5; } /* texte d'erreur parfois hors paragraphe */
body.login .notice-info,
body.login .message:not(.notice-error) { border-left-color: var(--ch-vert-fonce); }
body.login .message a,
body.login .notice a,
body.login #login_error a { color: var(--ch-vert-fonce); } /* 5,34:1 sur le rose des erreurs */
body.login .description,
body.login .indicator-hint,
body.login #pass-strength-result { font-size: 1.125rem; }

/* Liens sous le formulaire : soulignés, vert foncé (5,52:1 sur le fond), cibles de 44 px */
body.login #nav,
body.login .privacy-policy-page-link {
	margin: 1.25rem 0 0;
	padding: 0;
	font-size: 1.125rem;
	text-align: center;
}
body.login #nav a,
body.login .privacy-policy-page-link a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--ch-vert-fonce);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
body.login #nav a:hover,
body.login .privacy-policy-page-link a:hover { color: var(--ch-texte); text-decoration-thickness: 2px; }

/* « Aller sur le site » ramènerait ici (site réservé aux connectés) */
body.login #backtoblog { display: none; }
