/* Icône de connexion affichée dans le header du thème ISOE */

.oecd-login {
	position: relative;
	display: flex;
	align-items: center;
}

.oecd-login-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	background: none;
	border: 1px solid transparent;
	border-radius: 50%;
	color: #888888;
	cursor: pointer;
	transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.oecd-login-toggle:hover,
.oecd-login-toggle:focus-visible,
.oecd-login.is-open .oecd-login-toggle {
	color: #0073aa;
	border-color: #e5e5e5;
}

.oecd-login-popup {
	position: absolute;
	top: calc(100% + 0.75rem);
	right: 0;
	z-index: 100;
	width: 280px;
	max-width: 90vw;
	padding: 1.25rem;
	background: #ffffff;
	border-top: 3px solid #005293;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	font-family: "sourcesanspro", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	pointer-events: none;
	transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.oecd-login.is-open .oecd-login-popup {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.oecd-login-error {
	background: #fcebea;
	border-left: 4px solid #d63638;
	color: #d63638;
	padding: 10px 12px;
	margin-bottom: 15px;
	font-size: 0.85rem;
}

.oecd-login-form .oecd-login-field {
	margin: 0 0 1rem;
}

.oecd-login-form label {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: #222;
}

.oecd-login-form input[type="text"],
.oecd-login-form input[type="password"] {
	width: 100%;
	padding: 0.5rem 0.6rem;
	border: 1px solid #cecece;
	border-radius: 3px;
	box-sizing: border-box;
	font-family: inherit;
}

.oecd-login-form input[type="text"]:focus,
.oecd-login-form input[type="password"]:focus {
	outline: none;
	border-color: #005293;
}

.oecd-login-remember label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: normal;
	text-transform: none;
}

.oecd-login-submit {
	margin: 0;
	text-align: center;
	text-align-last: center;
}

.oecd-login-submit button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-align-last: center;
	width: 100%;
	padding: 0.6rem;
	background: #005293;
	color: #ffffff;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 700;
	text-transform: uppercase;
	transition: background-color 0.2s ease-in-out;
}

.oecd-login-submit button:hover {
	background: #003056;
}

.oecd-login-links-group {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-align-last: center;
	gap: 0.4rem;
	margin-top: 0.75rem;
	width: 100%;
}

.oecd-login-links {
	text-align: center;
	text-align-last: center;
	margin: 0;
	font-size: 0.85rem;
	width: 100%;
}

.oecd-login-links + .oecd-login-links {
	margin-top: 0.4rem;
}

.oecd-login-links a {
	display: inline-block;
	text-align: center;
	color: #005293;
}

.oecd-login-links a:hover {
	color: #888888;
}

.oecd-login-account {
	text-align: center;
	text-align-last: center;
}

.oecd-login-account-name {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	color: #222;
}

.oecd-login-logout {
	display: block;
	padding: 0.6rem;
	background: #005293;
	color: #ffffff;
	border-radius: 3px;
	font-size: 0.9rem;
	font-weight: 700;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease-in-out;
}

.oecd-login-logout:hover {
	background: #003056;
	color: #ffffff;
}

/* Avatar à initiales affiché quand l'utilisateur est connecté */

.oecd-login-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	color: #ffffff;
	font-family: "sourcesanspro", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	line-height: 1;
	user-select: none;
}

.oecd-login.is-logged-in .oecd-login-toggle:hover .oecd-login-avatar,
.oecd-login.is-logged-in .oecd-login-toggle:focus-visible .oecd-login-avatar,
.oecd-login.is-logged-in.is-open .oecd-login-avatar {
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #005293;
}

/* Lien "To request an account" : style forcé pour neutraliser celui du thème sur les liens de téléchargement */
.oecd-login-wrapper a.oecd-login-request,
.oecd-login-wrapper a.oecd-login-request:visited {
	display: inline !important;
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	color: #005293 !important;
	font-family: inherit !important;
	font-size: 0.85rem !important;
	font-weight: normal !important;
	line-height: inherit !important;
	text-transform: none !important;
	text-decoration: underline !important;
	letter-spacing: normal !important;
}

.oecd-login-wrapper a.oecd-login-request:hover,
.oecd-login-wrapper a.oecd-login-request:focus {
	color: #888888 !important;
	background: none !important;
}

.oecd-login-wrapper a.oecd-login-request::before,
.oecd-login-wrapper a.oecd-login-request::after {
	content: none !important;
	display: none !important;
}

/* Shortcode [oecd_login_required] : bulle d'information + formulaire intégré (version condensée) */

.oecd-login-required {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.75rem;
	margin: 1rem 0;
	font-family: "sourcesanspro", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
}

.oecd-login-required-info,
.oecd-login-required-form {
	width: 100%;
	flex: none;
	min-width: 0;
}

/* Bulle au style du thème ISOE (même rendu que le fil d'Ariane / la recherche) */
.oecd-login-bubble {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 8px 15px;
	background-color: #f5f5f5;
	border-radius: 4px;
	color: #888888;
	text-align: left;
}

.oecd-login-bubble-icon {
	display: inline-flex;
	flex: 0 0 auto;
	color: #222222;
}

/* Pointe de la bulle dirigée vers le formulaire situé en dessous */
.oecd-login-bubble::after {
	content: "";
	position: absolute;
	top: auto;
	right: auto;
	bottom: -6px;
	left: 2.5rem;
	width: 12px;
	height: 12px;
	background-color: #f5f5f5;
	transform: rotate(45deg);
}

.oecd-login-bubble-text {
	margin: 0;
	font-family: "sourcesanspro", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
	font-size: 17.5px;
	font-weight: 400;
	line-height: 1.4;
	color: #666666;
}

.oecd-login-required-form {
	padding: 0.75rem 1rem;
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Identifiant / mot de passe côte à côte, "Remember me" + bouton sur la même ligne */
.oecd-login-required-form .oecd-login-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 0.75rem;
	row-gap: 0.5rem;
	align-items: center;
}

.oecd-login-required-form .oecd-login-form .oecd-login-field,
.oecd-login-required-form .oecd-login-submit {
	margin: 0;
}

.oecd-login-required-form .oecd-login-form label {
	margin-bottom: 0.15rem;
	font-size: 0.8rem;
}

.oecd-login-required-form .oecd-login-form input[type="text"],
.oecd-login-required-form .oecd-login-form input[type="password"] {
	padding: 0.3rem 0.5rem;
}

.oecd-login-required-form .oecd-login-remember label {
	margin: 0;
}

.oecd-login-required-form .oecd-login-submit button {
	padding: 0.35rem;
	font-size: 0.85rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-align-last: center;
}

.oecd-login-required-form .oecd-login-error {
	padding: 0.4rem 0.6rem;
	margin-bottom: 0.5rem;
}

/* Liens centrés */
.oecd-login-required-form .oecd-login-links-group {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	text-align: center;
	text-align-last: center;
	flex-wrap: wrap;
	gap: 0.5rem 2rem;
	margin-top: 0.6rem;
	width: 100%;
}

.oecd-login-required-form .oecd-login-links,
.oecd-login-required-form .oecd-login-links + .oecd-login-links {
	margin: 0;
	text-align: center;
	text-align-last: center;
	width: auto;
}

@media (max-width: 768px) {
	.oecd-login-popup {
		right: -1rem;
	}

	.oecd-login-required {
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
	}

	/* Sur mobile, la pointe de la bulle descend vers le formulaire */
	.oecd-login-bubble::after {
		top: auto;
		right: auto;
		bottom: -6px;
		left: 50%;
		transform: translateX(-50%) rotate(45deg);
	}
}
