/**
 * « Mon compte » sans être connecté : connexion, création de compte, mot de
 * passe oublié (17/10/2026). Même langage visuel que l'espace client.
 *
 * Les champs de renov-inscription (type de compte, coordonnées, entreprise,
 * club, téléphone) et de renov-anniversaires (date de naissance) sont
 * seulement habillés ici : leur balisage et leurs contrôles ne changent pas.
 */

.rn-auth {
	--a-encre: #1A1D3E;
	--a-encre-2: #3A4059;
	--a-doux: #5B6178;
	--a-trait: #E3E6ED;
	--a-trait-2: #DADDE5;
	--a-fond: #F6F4F1;
	--a-teinte: #F7F5F2;
	--a-orange: #C63F10;
	--a-orange-h: #A9350D;
	--a-orange-50: #FFF1EE;
	--a-orange-txt: #9A3412;
	--a-vert: #0E7C4A;
	--a-vert-50: #E8F6EF;
	--a-rouge: #B42318;
	--a-rouge-50: #FDECEA;
	--a-ambre: #8A5209;
	--a-ambre-50: #FDF3E4;

	margin: 8px 0 48px;
	padding: clamp(14px, 3vw, 40px);
	border-radius: 24px;
	background: var(--a-fond);
	color: var(--a-encre);
	font-size: 15px;
	line-height: 1.5;
}

.rn-auth *,
.rn-auth *::before,
.rn-auth *::after { box-sizing: border-box; }

.rn-auth-grille {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 24px;
	align-items: start;
	max-width: 1180px;
	margin: 0 auto;
}

.rn-auth--seul .rn-auth-grille { grid-template-columns: minmax(0, 560px); justify-content: center; }

.rn-auth-carte {
	min-width: 0;
	padding: clamp(20px, 3vw, 36px);
	border: 1px solid var(--a-trait);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(26, 29, 62, .04), 0 10px 28px -18px rgba(26, 29, 62, .22);
}

@media (min-width: 961px) {
	.rn-auth-carte--connexion { position: sticky; top: 24px; }
	body.admin-bar .rn-auth-carte--connexion { top: 56px; }
}

.rn-auth .rn-auth-sur {
	margin: 0 0 4px;
	color: var(--a-orange-txt);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

.rn-auth .rn-auth-titre {
	margin: 0 0 22px !important;
	padding: 0;
	color: var(--a-encre);
	font-family: inherit;
	font-size: clamp(24px, 2.4vw, 30px) !important;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -.01em;
	text-transform: none;
}

.rn-auth .rn-auth-titre:focus { outline: none; }

/* -------------------------------------------------------------------------
 * Champs
 * ---------------------------------------------------------------------- */
.rn-auth form { margin: 0; padding: 0; border: 0; }

.rn-auth .form-row,
.rn-auth .rni-champ,
.rn-auth .rn-an-champ {
	float: none !important;
	width: 100% !important;
	margin: 0 0 16px !important;
	padding: 0 !important;
}

.rn-auth label,
.rn-auth .rni-champ label,
.rn-auth .rn-an-champ label {
	display: block;
	margin: 0 0 6px !important;
	padding: 0;
	color: var(--a-encre-2);
	font-size: 14.5px !important;
	font-weight: 600 !important;
	line-height: 1.35;
	text-transform: none;
}

.rn-auth .required { color: var(--a-orange); text-decoration: none; border: 0; }
.rn-auth .rn-an-format { color: var(--a-doux); font-weight: 400; }

.rn-auth input[type="text"],
.rn-auth input[type="email"],
.rn-auth input[type="password"],
.rn-auth input[type="tel"],
.rn-auth input[type="date"],
.rn-auth input[type="number"],
.rn-auth select {
	display: block;
	width: 100% !important;
	max-width: none !important;
	height: 48px !important;
	margin: 0 !important;
	padding: 0 14px !important;
	border: 1.5px solid var(--a-trait-2) !important;
	border-radius: 12px !important;
	background: #fff !important;
	box-shadow: none !important;
	color: var(--a-encre) !important;
	font-family: inherit;
	font-size: 16px !important; /* pas de zoom automatique sur iPhone */
	line-height: 1.2;
	transition: border-color 140ms ease, box-shadow 140ms ease;
}

.rn-auth input::placeholder { color: #6B7089; opacity: 1; }

.rn-auth input:hover,
.rn-auth select:hover { border-color: #B9BECB !important; }

.rn-auth input:focus,
.rn-auth select:focus {
	border-color: var(--a-encre) !important;
	box-shadow: 0 0 0 3px rgba(26, 29, 62, .14) !important;
	outline: none;
}

/* Le rouge n'apparaît qu'après une saisie, pas à l'ouverture de la page. */
.rn-auth input:invalid,
.rn-auth .rni-champ--tel input:invalid:not(:placeholder-shown):not(:focus) { border-color: var(--a-trait-2) !important; }
.rn-auth input:user-invalid:not(:focus) { border-color: var(--a-rouge) !important; }

/* Champ signalé par le script d'envoi du thème (bordure posée en ligne). */
.rn-auth input[style*="border-color: red"] { border-color: var(--a-rouge) !important; }

.rn-auth .rni-aide,
.rn-auth .rn-auth-note,
.rn-auth .rn-an-champ ~ p,
.rn-auth .rn-an-champ small,
.rn-auth .description {
	display: block;
	margin: 6px 0 0;
	color: var(--a-doux);
	font-size: 13.5px;
	line-height: 1.5;
}

.rn-auth .rn-auth-note { margin: 0 0 16px; font-size: 14.5px; }

/* Afficher le mot de passe : le bouton de WooCommerce, discret. */
.rn-auth .password-input { position: relative; display: block; width: 100%; }
.rn-auth .password-input input { padding-right: 52px !important; }
.rn-auth .password-input .show-password-input {
	position: absolute !important;
	top: 4px !important;
	right: 4px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	height: 40px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 9px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--a-doux) !important;
	transform: none !important;
}
.rn-auth .password-input .show-password-input::after { color: inherit !important; margin: 0 !important; }
.rn-auth .password-input .show-password-input:hover,
.rn-auth .password-input .show-password-input.display-password { background: var(--a-teinte) !important; color: var(--a-encre) !important; }

/* Force du mot de passe (WooCommerce). */
.rn-auth .woocommerce-password-strength {
	margin: 8px 0 0;
	padding: 8px 12px;
	border: 0;
	border-radius: 10px;
	font-size: 13.5px;
	font-weight: 600;
	text-align: left;
}
.rn-auth .woocommerce-password-strength.short,
.rn-auth .woocommerce-password-strength.bad { background: var(--a-rouge-50); color: var(--a-rouge); }
.rn-auth .woocommerce-password-strength.good { background: var(--a-ambre-50); color: var(--a-ambre); }
.rn-auth .woocommerce-password-strength.strong { background: var(--a-vert-50); color: var(--a-vert); }
.rn-auth .woocommerce-password-hint { display: block; margin-top: 6px; color: var(--a-doux); font-size: 13px; }

/* -------------------------------------------------------------------------
 * Options, boutons, liens
 * ---------------------------------------------------------------------- */
.rn-auth-options {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 4px 0 20px;
}

.rn-auth .rn-auth-case {
	display: inline-flex !important;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin: 0 !important;
	color: var(--a-encre-2);
	font-size: 15px !important;
	font-weight: 500 !important;
	cursor: pointer;
}

.rn-auth .rn-auth-case input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--a-orange);
}

.rn-auth .rn-auth-lien,
.rn-auth-renvoi a,
.rn-auth .rn-auth-mention a {
	color: var(--a-orange-txt) !important;
	font-weight: 600;
	text-decoration: underline !important;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.rn-auth .rn-auth-lien { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
.rn-auth .rn-auth-lien:hover,
.rn-auth-renvoi a:hover { color: var(--a-orange-h) !important; }

.rn-auth .rn-auth-envoi { display: block !important; height: auto !important; margin: 8px 0 0 !important; }

.rn-auth .rn-auth-btn {
	display: flex !important;
	align-items: center;
	justify-content: center;
	float: none !important;
	position: static !important;
	width: 100%;
	min-height: 52px;
	margin: 0 !important;
	padding: 0 20px !important;
	border: 0 !important;
	border-radius: 12px !important;
	background: var(--a-orange) !important;
	box-shadow: none !important;
	color: #fff !important;
	font-family: inherit;
	font-size: 16px !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
	line-height: 1.2;
	text-transform: none !important;
	cursor: pointer;
	transition: background-color 140ms ease;
}

.rn-auth .rn-auth-btn:hover { background: var(--a-orange-h) !important; }
.rn-auth .rn-auth-btn:focus-visible,
.rn-auth a:focus-visible,
.rn-auth button:focus-visible { outline: 3px solid var(--a-encre) !important; outline-offset: 2px; }

/* Messages de l'envoi en AJAX (extension du thème). */
.rn-auth .login_msg,
.rn-auth .register_msg {
	margin: 12px 0 0;
	padding: 12px 14px;
	border: 0;
	border-radius: 12px;
	font-size: 14.5px;
	line-height: 1.45;
}

.rn-auth .login_msg.fail,
.rn-auth .register_msg.fail { background: var(--a-rouge-50); color: var(--a-rouge); }
.rn-auth .login_msg.success,
.rn-auth .register_msg.success { background: var(--a-vert-50); color: var(--a-vert); }

.rn-auth .login_loader,
.rn-auth .register_loader {
	align-items: center;
	gap: 8px;
	margin: 12px 0 0;
	color: var(--a-doux);
	font-size: 14.5px;
}

.rn-auth .login_loader[style*="block"],
.rn-auth .register_loader[style*="block"] { display: flex !important; }
.rn-auth .login_loader img,
.rn-auth .register_loader img { width: 16px; height: 16px; }

/* Le script du thème pose ses messages après chaque bouton du formulaire,
   y compris celui qui affiche le mot de passe : on garde ceux du bas. */
.rn-auth .password-input .login_msg,
.rn-auth .password-input .login_loader,
.rn-auth .password-input .register_msg,
.rn-auth .password-input .register_loader { display: none !important; }

/* Ce que l'on retrouve dans l'espace client. */
.rn-auth-plus {
	margin: 24px 0 0;
	padding: 16px 18px;
	border-radius: 14px;
	background: var(--a-teinte);
}

.rn-auth .rn-auth-plus-titre { margin: 0 0 8px; color: var(--a-encre); font-size: 14.5px; font-weight: 600; }

.rn-auth-plus ul { margin: 0 !important; padding: 0 !important; list-style: none !important; }

.rn-auth-plus li {
	position: relative;
	margin: 0;
	padding: 4px 0 4px 26px;
	color: var(--a-encre-2);
	font-size: 14.5px;
	line-height: 1.45;
	list-style: none;
}

.rn-auth-plus li::before {
	content: "";
	position: absolute;
	top: 7px;
	left: 0;
	width: 16px;
	height: 16px;
	background: var(--a-vert);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rn-auth-renvoi { display: none; margin: 20px 0 0 !important; color: var(--a-doux); font-size: 15px; text-align: center; }
.rn-auth--seul .rn-auth-renvoi { display: block; }

/* Intertitres du formulaire d'inscription. */
.rn-auth .rn-auth-groupe {
	margin: 24px 0 14px !important;
	padding: 20px 0 0;
	border-top: 1px solid #ECEDF2;
	color: var(--a-encre);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.rn-auth .rn-auth-mention {
	margin: 8px 0 16px;
	color: var(--a-doux);
	font-size: 13.5px;
	line-height: 1.55;
}

.rn-auth .rn-auth-mention p,
.rn-auth .rn-auth-mention .woocommerce-privacy-policy-text { margin: 0; color: var(--a-doux) !important; font-size: 13.5px !important; line-height: 1.55; }

/* -------------------------------------------------------------------------
 * Type de compte (renov-inscription)
 * ---------------------------------------------------------------------- */
.rn-auth .rni-choix { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }

.rn-auth .rni-choix__legende {
	float: none;
	width: 100%;
	margin: 0 0 4px !important;
	padding: 0;
	color: var(--a-encre);
	font-size: 16px !important;
	font-weight: 600 !important;
	text-transform: none;
}

.rn-auth .rni-choix__aide { margin: 0 0 12px !important; color: var(--a-doux); font-size: 13.5px; line-height: 1.5; }

.rn-auth .rni-cartes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }

.rn-auth .rni-carte {
	position: relative;
	display: flex !important;
	flex-direction: column;
	gap: 4px;
	min-height: 0;
	margin: 0 !important;
	padding: 14px 14px 14px !important;
	border: 1.5px solid var(--a-trait-2) !important;
	border-radius: 14px !important;
	background: #fff !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: border-color 140ms ease, background-color 140ms ease;
}

.rn-auth .rni-carte:hover { border-color: #B9BECB !important; }

.rn-auth .rni-carte.is-choisi,
.rn-auth .rni-carte:has(input:checked) {
	border-color: var(--a-orange) !important;
	background: #FFF7F4 !important;
	box-shadow: 0 0 0 1px var(--a-orange) !important;
}

/* Coche dans l'angle de la carte choisie. */
.rn-auth .rni-carte.is-choisi::after,
.rn-auth .rni-carte:has(input:checked)::after {
	content: "";
	position: absolute;
	top: 10px;
	right: 10px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--a-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.rn-auth .rni-carte:focus-within { outline: none; }
.rn-auth .rni-carte:has(input:focus-visible) { outline: 3px solid var(--a-encre); outline-offset: 2px; }

.rn-auth .rni-carte__picto { width: 22px; height: 22px; margin: 0 0 4px; fill: var(--a-doux); }
.rn-auth .rni-carte.is-choisi .rni-carte__picto,
.rn-auth .rni-carte:has(input:checked) .rni-carte__picto { fill: var(--a-orange); }
.rn-auth .rni-carte__titre { color: var(--a-encre); font-size: 15.5px; font-weight: 600; line-height: 1.3; padding-right: 22px; }
.rn-auth .rni-carte__resume { color: var(--a-doux); font-size: 13.5px; font-weight: 400; line-height: 1.45; }
.rn-auth .rni-carte__detail { margin-top: 6px; color: var(--a-encre-2); font-size: 13px; font-weight: 400; line-height: 1.45; }

/* -------------------------------------------------------------------------
 * Blocs de champs (renov-inscription)
 * ---------------------------------------------------------------------- */
.rn-auth .rni-bloc { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }

.rn-auth .rni-bloc--commun {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 14px;
}

.rn-auth .rni-bloc--commun > .rni-champ--tel,
.rn-auth .rni-bloc--commun > :only-child,
.rn-auth .rni-bloc--commun > :not(.rni-champ) { grid-column: 1 / -1; }

.rn-auth .rni-bloc[data-rni-pour] {
	margin: 4px 0 18px !important;
	padding: 18px 18px 2px !important;
	border-radius: 16px !important;
	background: var(--a-teinte) !important;
}

.rn-auth .rni-bloc__titre {
	margin: 0 0 14px !important;
	padding: 0;
	border: 0;
	color: var(--a-encre);
	font-size: 16px !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}

/* Information, sans liseré latéral. */
.rn-auth .rni-avis {
	margin: 0 0 16px !important;
	padding: 12px 14px !important;
	border: 0 !important;
	border-radius: 12px !important;
	background: var(--a-ambre-50) !important;
	box-shadow: none !important;
	color: var(--a-ambre) !important;
	font-size: 14px;
	line-height: 1.5;
}

.rn-auth .rni-avis::before { display: none !important; }

/* -------------------------------------------------------------------------
 * Bascule « Se connecter / Créer un compte » (téléphone et tablette)
 * ---------------------------------------------------------------------- */
.rn-auth-bascule[hidden] { display: none !important; }

.rn-auth-bascule {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	max-width: 560px;
	margin: 0 auto 14px;
	padding: 4px;
	border: 1px solid var(--a-trait);
	border-radius: 14px;
	background: #fff;
}

.rn-auth .rn-auth-onglet {
	min-height: 48px;
	margin: 0 !important;
	padding: 0 10px !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--a-encre-2) !important;
	font-family: inherit;
	font-size: 15.5px !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
	line-height: 1.2;
	text-transform: none !important;
	cursor: pointer;
}

.rn-auth .rn-auth-onglet:hover { background: var(--a-teinte) !important; }
.rn-auth .rn-auth-onglet[aria-pressed="true"] { background: var(--a-orange-50) !important; color: var(--a-orange-txt) !important; }

@media (max-width: 960px) {
	.rn-auth-grille { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
	.rn-auth.is-onglets [data-rn-auth-volet]:not(.is-actif) { display: none; }
	.rn-auth.is-onglets .rn-auth-renvoi { display: block; }
}

@media (max-width: 600px) {
	.rn-auth { margin: 0 -4px 32px; border-radius: 18px; }
	.rn-auth-carte { padding: 22px 16px; border-radius: 16px; }
	.rn-auth .rni-cartes { grid-template-columns: minmax(0, 1fr); }
	.rn-auth .rni-carte { padding: 12px 14px 12px 50px !important; }
	.rn-auth .rni-carte__picto { position: absolute; top: 14px; left: 14px; }
	.rn-auth .rni-bloc--commun { grid-template-columns: minmax(0, 1fr); }
	.rn-auth-options { flex-direction: column; align-items: flex-start; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.rn-auth * { transition: none !important; }
}
