/*
 * Naria 360 — parcours de connexion (wp-login.php) aux couleurs de la vitrine :
 * connexion, création de compte, mot de passe oublié, nouveau mot de passe,
 * double authentification et invitation.
 *
 * Une seule carte ivoire contient tout ; aucune ressource externe.
 * Contrastes : texte #001E38 et #4A5866 sur ivoire >= 7:1, bronze #86653A >= 5:1,
 * blanc sur #001E38 >= 15:1.
 *
 * 0.8.0 : la carte ne dépasse plus de l'écran sur téléphone (largeur
 * calculée bordure et marges comprises) ; boutons à la place des liens
 * texte, icône animée au survol comme dans le menu du site ; titres et
 * étapes de l'inscription.
 *
 * @package Naria360
 * @since   0.3.1
 */
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("../cockpit/fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("../cockpit/fonts/montserrat-latin-600-normal.woff2") format("woff2"); }

html { background: #011526; }
body.login {
	min-height: 100vh; overflow-x: hidden;
	background:
		radial-gradient(ellipse 65% 60% at 70% 20%, rgba(10, 47, 82, .95), transparent 72%),
		radial-gradient(ellipse 45% 35% at 10% 95%, rgba(185, 145, 100, .14), transparent 70%),
		linear-gradient(160deg, #001e38 0%, #011526 100%);
	font-family: "Montserrat", system-ui, sans-serif; color: #f7f4ee;
	-webkit-text-size-adjust: 100%;
	margin: 0; padding: clamp(20px, 7vh, 72px) 0 28px;
}
body.login *, body.login *::before, body.login *::after { box-sizing: border-box; }

/* ---------- Carte ---------- */
#login {
	width: min(420px, calc(100% - 24px)); margin: 0 auto; padding: 34px 30px 24px;
	border: 1px solid rgba(185, 145, 100, .35); border-radius: 20px;
	background: #f7f4ee; box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .65);
	color: #001e38;
}
@media (max-width: 480px) {
	#login { padding: 26px 18px 18px; border-radius: 16px; }
}

/* Logo et marque. */
.login h1 a, .login h1 a:hover, .login h1 a:focus, .login h1 a:visited {
	width: auto; height: auto; margin: 0 auto 2px; padding-top: 58px;
	background: url("logo-dark.svg") center top / 48px 48px no-repeat;
	text-indent: 0; overflow: visible;
	font: 600 19px/1.2 "Montserrat", sans-serif; color: #001e38; letter-spacing: .02em; text-decoration: none;
}
.login h1 a:focus-visible { box-shadow: 0 0 0 2px #b99164; border-radius: 8px; outline: none; }

/* Titre de l'étape. */
.n360-lhead { margin: 18px 0 6px; padding-top: 18px; border-top: 1px solid #e6e1d7; text-align: center; }
.n360-lhead h2 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.25; color: #001e38; }
.n360-lhead p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: #4a5866; }

/* Étapes de l'inscription : vos informations → lien par e-mail → mot de passe. */
.n360-steps { display: flex; margin: 16px 0 4px; padding: 0; list-style: none; counter-reset: none; }
.n360-steps li { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; line-height: 1.3; color: #5b6774; text-align: center; }
.n360-steps li + li::before { content: ""; position: absolute; top: 12px; right: calc(50% + 16px); left: calc(-50% + 16px); height: 2px; background: #ddd5c6; }
.n360-steps li.is-done + li::before, .n360-steps li.is-done + li.is-on::before { background: #b99164; }
.n360-steps-num { display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid #cfc6b5; border-radius: 50%; background: #fff; font-size: 12px; font-weight: 600; color: #5b6774; }
.n360-steps li.is-on { color: #001e38; font-weight: 600; }
.n360-steps li.is-on .n360-steps-num { border-color: #b99164; background: #b99164; color: #001e38; box-shadow: 0 0 0 4px rgba(185, 145, 100, .22); }
.n360-steps li.is-done .n360-steps-num { border-color: #001e38; background: #001e38; color: #fff; }

/* ---------- Formulaire ---------- */
.login form { margin-top: 18px; padding: 0; border: 0; background: transparent; box-shadow: none; overflow: visible; }
.login form::after { content: ""; display: table; clear: both; }
.login label { color: #001e38; font-size: 14px; font-weight: 600; }
.login form .input, .login input[type="text"], .login input[type="password"], .login input[type="email"] {
	width: 100%; min-height: 48px; margin: 4px 0 16px;
	border: 1px solid #d8d1c3; border-radius: 12px; background: #fff; color: #001e38;
	font-size: 16px; /* 16 px : pas de zoom automatique sur iPhone. */ padding: 8px 14px;
}
.login form .input:focus, .login input:focus { border-color: #b99164; box-shadow: 0 0 0 3px rgba(185, 145, 100, .35); outline: none; }
.login .wp-pwd { position: relative; }
.login .wp-pwd .input { padding-right: 48px; }
.login .button.wp-hide-pw { top: 4px; height: 48px; min-height: 48px; }
.login .button.wp-hide-pw .dashicons { color: #4a5866; }
.login .forgetmenot { float: none; display: flex; align-items: center; gap: 8px; margin: 0 0 18px; }
.login .forgetmenot label { font-weight: 400; color: #4a5866; }
.login input[type="checkbox"], .login input[type="radio"] { accent-color: #86653a; border-color: #8c8577; }
/* WordPress récent remplit le bouton radio coché en bleu (#3858e9) : fond blanc, cercle et point dorés (0.23.0). */
.login input[type="radio"]:checked { background: #fff; border-color: #86653a; }
.login input[type="radio"]:checked::before { background-color: #86653a; }
.login input[type="checkbox"]:checked { border-color: #001e38; background: #001e38; }
.login input[type="checkbox"]:checked::before { filter: brightness(0) invert(1); }
.login input[type="checkbox"]:focus, .login input[type="radio"]:focus { border-color: #b99164; box-shadow: 0 0 0 2px rgba(185, 145, 100, .45); }
.login .description, .login .indicator-hint { margin: -8px 0 14px; font-size: 12.5px; line-height: 1.45; color: #5b6774; }
#reg_passmail { display: none; } /* Remplacé par le texte de l'offre Découverte. */

/* Bouton principal : plein, pleine largeur, icône animée au survol. */
.login .submit, .login p.submit { position: relative; float: none; clear: both; margin: 0; padding: 0; }
.login p.submit::before {
	content: ""; position: absolute; z-index: 2; top: 50%; left: 22px; width: 17px; height: 17px; margin-top: -8.5px;
	background: #f7f4ee; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
	pointer-events: none; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.login p.submit:hover::before, .login p.submit:focus-within::before { transform: rotate(-12deg) scale(1.25); }
.wp-core-ui .button-primary, .login .button-primary {
	float: none; width: 100%; min-height: 52px; padding: 12px 48px;
	border: 2px solid #001e38; border-radius: 26px; background: #001e38; color: #f7f4ee;
	font-family: Montserrat, sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
	text-shadow: none; box-shadow: 0 10px 24px -14px rgba(0, 30, 56, .9);
	transition: background-color .3s ease-in-out, border-color .3s ease-in-out, box-shadow .3s ease-in-out;
}
.wp-core-ui .button-primary:hover, .wp-core-ui .button-primary:focus { background: #0a2f52; border-color: #0a2f52; color: #fff; box-shadow: 0 14px 28px -14px rgba(0, 30, 56, .95); }
.wp-core-ui .button-primary:focus-visible { outline: 2px solid #b99164; outline-offset: 3px; }

/* ---------- Boutons sous le formulaire (remplacent les liens texte) ---------- */
.login #nav { display: none; } /* Remplacé par les boutons de #backtoblog. */
.login #backtoblog { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; text-align: center; }
.n360-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 2px; font-size: 13px; color: #4a5866; }
.n360-or::before, .n360-or::after { content: ""; flex: 1 1 0; height: 1px; background: #e2dccf; }
.n360-lbtn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	font-family: Montserrat, sans-serif; font-weight: 600; text-decoration: none; line-height: 1.2;
	transition: background-color .3s ease-in-out, color .3s ease-in-out, border-color .3s ease-in-out;
}
.n360-lbtn:focus-visible { outline: 2px solid #b99164; outline-offset: 3px; }
.n360-li { width: 15px; height: 15px; flex: none; fill: currentColor; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.n360-lbtn:hover .n360-li, .n360-lbtn:focus-visible .n360-li { transform: rotate(-12deg) scale(1.25); }
.login #backtoblog a.n360-lbtn--alt {
	width: 100%; min-height: 50px; padding: 10px 24px; border: 2px solid #001e38; border-radius: 26px;
	background: transparent; color: #001e38; font-size: 12.5px; letter-spacing: 1px; text-transform: uppercase;
}
.login #backtoblog a.n360-lbtn--alt:hover, .login #backtoblog a.n360-lbtn--alt:focus { background: #001e38; color: #f7f4ee; }
.n360-lrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 2px; }
.login #backtoblog a.n360-lbtn--ghost {
	min-height: 40px; padding: 8px 14px; border-radius: 20px; color: #4a5866; font-size: 13px;
}
.login #backtoblog a.n360-lbtn--ghost .n360-li { width: 13px; height: 13px; color: #86653a; }
.login #backtoblog a.n360-lbtn--ghost:hover, .login #backtoblog a.n360-lbtn--ghost:focus { background: rgba(185, 145, 100, .14); color: #001e38; }

/* Lien vers la politique de confidentialité, sous la carte. */
.login .privacy-policy-page-link { margin: 18px 0 0; text-align: center; }
.login .privacy-policy-page-link a { color: #d9bd8f; font-size: 13px; }

/* Messages. */
.login .message, .login .notice, .login #login_error { margin: 14px 0 0; border-left: 4px solid #b99164; border-radius: 10px; background: #fff; color: #001e38; box-shadow: none; font-size: 14px; line-height: 1.5; }
.login #login_error { border-left-color: #b4572e; }
.language-switcher { display: none; }

/* ---------- Inscription, invitation, double authentification ---------- */
.login .n360-audience { margin: 0 0 16px; padding: 0; border: 0; }
.login .n360-audience legend { margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #001e38; }
.login .n360-audience { display: flex; flex-wrap: wrap; gap: 10px; }
.login .n360-audience legend { flex: 0 0 100%; }
.login .n360-audience label {
	flex: 1 1 0; display: flex; align-items: center; gap: 8px; min-height: 48px; margin: 0; padding: 10px 14px;
	border: 1px solid #d8d1c3; border-radius: 12px; background: #fff; font-weight: 600; cursor: pointer;
	transition: border-color .2s, box-shadow .2s;
}
.login .n360-audience label:has(input:checked) { border-color: #b99164; box-shadow: 0 0 0 3px rgba(185, 145, 100, .3); }
.login .n360-audience input { margin: 0; }
.login .n360-trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.login .n360-consent { margin: 2px 0 14px; }
.login .n360-consent label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13.5px; line-height: 1.45; color: #4a5866; }
.login .n360-consent input { flex: none; margin-top: 3px; }
.login .n360-consent a { color: #86653a; font-weight: 600; }
.login .n360-login-intro { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: rgba(185, 145, 100, .12); font-size: 13px; line-height: 1.5; color: #4a5866; }

@media (prefers-reduced-motion: reduce) {
	.n360-li, .login p.submit::before { transition: none; }
}

/* Code de double authentification (0.9.0) : grand, espacé, centré ; bascule vers un code de secours. */
.login input.n360-otp { text-align: center; font-size: 22px; font-weight: 600; letter-spacing: .3em; }
.n360-otp-switch { margin: -4px 0 16px; text-align: center; }
.n360-linkbtn { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 0; border-radius: 20px; background: transparent; color: #86653a; font: 600 13px/1.2 "Montserrat", sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.n360-linkbtn:hover, .n360-linkbtn:focus-visible { background: rgba(185, 145, 100, .14); color: #001e38; }
.n360-linkbtn[hidden] { display: none; }
.login .n360-disclaimer { background: transparent; padding: 0; font-size: 12.5px; }
.login .n360-disclaimer a { color: #86653a; font-weight: 600; }
