/* Bouton « compte utilisateur » et message des pages protégées. */

nav.navbar .innerMenu .compte {
	display: inline-block;
	position: relative;
	vertical-align: top;
	margin-left: 8px;
}

.compte-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	max-width: 240px;
	padding: 0 12px;
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 20px;
	background: rgba(0, 0, 0, .25);
	color: #fff;
	font-size: .95rem;
	line-height: 1;
	cursor: pointer;
	transition: background .2s, border-color .2s;
}

.compte-toggle:hover,
.compte-toggle:focus-visible,
.compte--ouvert .compte-toggle {
	background: #f4794c;
	border-color: #f4794c;
	outline: none;
}

.compte-toggle .material-icons {
	flex: none;
	font-size: 22px;
}

.compte-label {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.compte-chevron {
	transition: transform .2s;
}

.compte--ouvert .compte-chevron {
	transform: rotate(180deg);
}

/* Pastille indiquant que le membre est connecté */
.compte--connecte .compte-toggle {
	position: relative;
}

.compte--connecte .compte-toggle::before {
	content: "";
	position: absolute;
	top: 6px;
	left: 28px;
	width: 10px;
	height: 10px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #57bc72;
}

/* Panneau déroulant */
.compte-panel {
	position: absolute;
	top: 50px;
	right: 0;
	width: 300px;
	padding: 20px;
	border-radius: 8px;
	background: #fff;
	color: #161616;
	font-size: .95rem;
	line-height: 1.4;
	text-align: left;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}

.compte-panel[hidden] {
	display: none;
}

.compte-titre {
	margin: 0 0 14px;
	font-size: 1.1rem;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.compte-form label {
	display: block;
	margin: 0 0 4px;
	color: #161616;
}

#compte-username,
#compte-password {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 42px;
	margin: 0 0 12px;
	padding: 0 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	color: #161616;
}

#compte-username:focus,
#compte-password:focus {
	border-color: #f4794c;
	outline: 2px solid rgba(244, 121, 76, .3);
}

.compte-form .compte-remember {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-size: .9rem;
}

/* Sélecteur long : les boutons de la barre de navigation sont transparents par défaut */
nav.navbar .innerMenu .compte-form .btn {
	display: block;
	width: 100%;
	margin: 0;
	background: #f4794c;
	color: #fff;
}

nav.navbar .innerMenu .compte-form .btn:hover {
	background: #57bc72;
}

.compte-aide,
.compte-liens {
	margin: 0;
	padding: 0;
	list-style: none;
}

.compte-aide {
	margin-top: 14px;
	font-size: .85rem;
}

.compte-aide li,
.compte-liens li {
	margin-left: 0;
	padding-left: 0;
}

.compte-aide li + li {
	margin-top: 4px;
}

.compte-panel .compte-aide a {
	color: #333a46;
	text-decoration: underline;
}

.compte-liens a,
.compte-deconnexion {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px;
	border: 0;
	border-radius: 4px;
	background: none;
	color: #161616;
	font: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

/* Sélecteur long : le thème impose un grand padding à tous les boutons d'envoi */
nav.navbar .innerMenu .compte-liens a {
	font-size: 1em;
}

nav.navbar .innerMenu button.compte-deconnexion {
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 10px;
	font-size: 1em;
	line-height: inherit;
	box-shadow: none;
}

.compte-liens a:hover,
nav.navbar .innerMenu button.compte-deconnexion:hover {
	background: #f6f6f6;
	color: #161616;
}

.compte-liens .actif a {
	font-weight: 700;
}

.compte-liens .material-icons,
.compte-deconnexion .material-icons {
	flex: none;
	color: #f4794c;
	font-size: 20px;
}

.compte-logout {
	margin: 10px 0 0;
	padding-top: 10px;
	border-top: 1px solid #e3e3e3;
}

/* Tablette et mobile : le panneau reste visible même si la barre se replie au défilement */
@media (max-width: 991.98px) {
	.compte-toggle {
		width: 40px;
		padding: 0;
		justify-content: center;
	}

	.compte-label,
	.compte-chevron {
		display: none;
	}

	.compte--connecte .compte-toggle::before {
		top: 5px;
		left: 24px;
	}

	.compte-panel {
		position: fixed;
		top: 70px;
		right: 16px;
		width: 320px;
		max-width: calc(100vw - 32px);
		max-height: calc(100vh - 86px);
		overflow-y: auto;
	}
}

/* Message des pages protégées (page de connexion) */
.login-reservee {
	display: flex;
	gap: 16px;
	margin-bottom: 30px;
	padding: 20px;
	border-left: 4px solid #f4794c;
	border-radius: 4px;
	background: #fdf1ec;
}

.login-reservee > .material-icons {
	flex: none;
	color: #f4794c;
	font-size: 36px;
}

.login-reservee h2 {
	margin: 0 0 6px;
	font-size: 1.4rem;
}

.login-reservee p {
	margin: 0;
}

/* Espace membre, une fois connecté */
.compte-page-liens {
	margin: 0 0 30px;
	padding: 0;
	list-style: none;
}

.compte-page-liens li {
	margin-bottom: 8px;
}
