/**
 * The Sales Program : boutons du compte client dans l'en-tête du site. Visiteur : « Connexion » et, à côté,
 * « Créer un compte » ; client connecté : « Mon compte ».
 *
 * Couleurs réglables (Réglages → Comptes clients) : variables --tsp-acct-bg, --tsp-acct-fg (« Connexion »),
 * --tsp-acct-new-bg, --tsp-acct-new-fg (« Créer un compte »), --tsp-acct-on-bg, --tsp-acct-on-fg (client connecté),
 * écrites sur :root par le plugin. Les valeurs ci-dessous ne servent que si ces variables manquent. Propriétés
 * logiques (inline-start / inline-end) : sens de droite à gauche pris en charge sans règle à part.
 */

.tsp-acct {
	display: inline-flex;
	box-sizing: border-box;
	gap: 8px;
	align-items: center;
	height: 36px;
	padding-block: 0;
	padding-inline: 4px 14px;
	border-radius: 999px;
	background: var(--tsp-acct-bg, #eef1fc);
	color: var(--tsp-acct-fg, #44508f);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tsp-acct-on {
	background: var(--tsp-acct-on-bg, #e6f5ee);
	color: var(--tsp-acct-on-fg, #2f6a52);
}

.tsp-acct:hover,
.tsp-acct:focus,
.tsp-acct:visited {
	color: var(--tsp-acct-fg, #44508f);
	text-decoration: none;
}

.tsp-acct-on:hover,
.tsp-acct-on:focus,
.tsp-acct-on:visited {
	color: var(--tsp-acct-on-fg, #2f6a52);
}

/*
 * « Créer un compte » : même hauteur et même arrondi que « Connexion », en couleur pleine (c'est le bouton qui
 * invite à s'inscrire). Les deux boutons se suivent, séparés par un petit espace.
 */
.tsp-acct-new {
	background: var(--tsp-acct-new-bg, #44508f);
	color: var(--tsp-acct-new-fg, #fff);
}

.tsp-acct-new:hover,
.tsp-acct-new:focus,
.tsp-acct-new:visited {
	color: var(--tsp-acct-new-fg, #fff);
}

.tsp-acct + .tsp-acct-new {
	margin-inline-start: 8px;
}

/* Menu des téléphones : les deux boutons dans un même bloc, à la hauteur que le thème donne au bloc. */
.tsp-acct-pair {
	display: inline-flex;
	align-items: center;
}

.tsp-acct-pair .tsp-acct {
	height: 100%;
	min-height: 32px;
	padding-inline: 14px;
}

.tsp-acct:hover {
	box-shadow: 0 3px 10px rgba(68, 80, 143, 0.16);
	transform: translateY(-1px);
}

.tsp-acct:focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: 2px;
}

.tsp-acct-ico {
	display: inline-flex;
	flex: 0 0 28px;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #fff;
}

.tsp-acct-ico svg {
	display: block;
	width: 16px;
	height: 16px;
	fill: currentcolor;
}

.tsp-acct-initial {
	font-size: 14px;
	font-weight: 700;
}

.tsp-acct-new .tsp-acct-ico {
	background: rgba(255, 255, 255, 0.18);
}

/* Texte seul : les deux boutons tiennent dans la largeur du menu. */
.tsp-acct-pair .tsp-acct-ico {
	display: none;
}

/* Icône seule (réglage, ou petit écran) : le texte reste lu par les lecteurs d'écran. */
.tsp-acct-compact {
	padding-inline: 4px;
}

.tsp-acct-compact .tsp-acct-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (max-width: 600px) {

	.tsp-acct-header {
		padding-inline: 4px;
	}

	/* Téléphones : « Connexion » seul dans l'en-tête ; « Créer un compte » reste dans le menu et sur la page de connexion. */
	.tsp-acct-new.tsp-acct-header {
		display: none;
	}

	.tsp-acct-header .tsp-acct-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

@media (prefers-reduced-motion: reduce) {

	.tsp-acct {
		transition: none;
	}

	.tsp-acct:hover {
		transform: none;
	}
}
