/* SoutienSchool — menu utilisateur header */

.ss-header-user-menu {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.ss-header-user-menu__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.28rem;
	border: 0;
	background: transparent;
	padding: 0;
	margin: 0;
	cursor: pointer;
	line-height: 1;
	color: inherit;
	font-size: inherit;
}

.ss-header-user-menu__toggle:focus-visible {
	outline: 2px solid #235af3;
	outline-offset: 3px;
	border-radius: 4px;
}

.ss-header-user-menu__icon {
	display: inline-block;
	transition: transform 0.25s ease, color 0.25s ease;
}

/* Flèche : indique le menu déroulant (utilisateurs connectés uniquement) */
.ss-header-user-menu__caret {
	display: inline-block;
	width: 0.42em;
	height: 0.42em;
	margin-top: -0.08em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	opacity: 0.72;
	transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}

.ss-header-user-menu__toggle:hover .ss-header-user-menu__icon,
.ss-header-user-menu.is-open .ss-header-user-menu__icon {
	color: #235af3;
	transform: scale(1.08);
}

.ss-header-user-menu__toggle:hover .ss-header-user-menu__caret,
.ss-header-user-menu.is-open .ss-header-user-menu__caret {
	color: #235af3;
	opacity: 1;
}

.ss-header-user-menu.is-open .ss-header-user-menu__caret {
	transform: rotate(-135deg);
	margin-top: 0.18em;
}

.ss-header-user-menu.is-open .ss-header-user-menu__icon {
	animation: ss-header-user-ring 1.6s ease-in-out infinite;
}

@keyframes ss-header-user-ring {
	0%,
	100% {
		transform: scale(1.08);
	}
	50% {
		transform: scale(1.14);
	}
}

.ss-header-user-menu__panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 10040;
	min-width: 220px;
	padding: 0.55rem 0;
	border-radius: 12px;
	background: #fff;
	border: 1px solid #e8edf5;
	box-shadow: 0 14px 34px rgba(16, 24, 40, 0.14);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px) scale(0.98);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.ss-header-user-menu.is-open .ss-header-user-menu__panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.ss-header-user-menu__head {
	padding: 0.55rem 0.95rem 0.65rem;
	border-bottom: 1px solid #eef2f6;
}

.ss-header-user-menu__name {
	display: block;
	font-size: 0.92rem;
	font-weight: 700;
	color: #1a2233;
	line-height: 1.3;
}

.ss-header-user-menu__role {
	display: inline-block;
	margin-top: 0.2rem;
	padding: 0.12rem 0.45rem;
	border-radius: 999px;
	background: #eef3ff;
	color: #235af3;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ss-header-user-menu__role--instructor {
	background: #ecfdf3;
	color: #027a48;
}

.ss-header-user-menu__list {
	list-style: none;
	margin: 0;
	padding: 0.35rem 0;
}

.ss-header-user-menu__link {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.55rem 0.95rem;
	color: #344054 !important;
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.15s ease, color 0.15s ease;
}

.ss-header-user-menu__link i {
	width: 1rem;
	text-align: center;
	color: #667085;
}

.ss-header-user-menu__link:hover,
.ss-header-user-menu__link:focus {
	background: #f8faff;
	color: #235af3 !important;
}

.ss-header-user-menu__link:hover i,
.ss-header-user-menu__link:focus i {
	color: #235af3;
}

.ss-header-user-menu__link--danger {
	color: #b42318 !important;
}

.ss-header-user-menu__link--danger i {
	color: #f04438;
}

.ss-header-user-menu__link--danger:hover {
	background: #fef3f2;
	color: #912018 !important;
}

#header .ss-header-user-menu__guest.my-account {
	text-decoration: none;
}

#header .ss-header-user-menu__guest.my-account .ss-header-user-menu__icon {
	animation: ss-header-user-ring 2.4s ease-in-out infinite;
}

/* Ancien lien Inscription (cache navigateur / Rocket) */
#header .ss-header-auth__signup,
.porto-sticky-navbar .ss-header-auth__signup,
.ss-header-auth__signup {
	display: none !important;
}

#header .ss-header-auth {
	display: inline-flex;
	align-items: center;
}

@media (max-width: 991px) {
	.ss-header-user-menu__toggle {
		min-width: 44px;
		min-height: 44px;
		padding: 0.2rem 0.15rem;
		box-sizing: border-box;
	}

	.ss-header-user-menu__caret {
		width: 0.48em;
		height: 0.48em;
		flex-shrink: 0;
	}

	.ss-header-user-menu__panel {
		right: -8px;
		left: auto;
		min-width: 220px;
		max-width: calc(100vw - 20px);
	}

	.ss-header-user-menu__link {
		min-height: 44px;
		padding: 0.7rem 1rem;
	}
}

/* Sticky mobile (barre du bas) : menu vers le haut, hors clipping */
.porto-sticky-navbar,
.porto-sticky-navbar .sticky-icon,
.porto-sticky-navbar .link-account {
	overflow: visible !important;
}

.porto-sticky-navbar .ss-header-user-menu {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	gap: 0.05rem;
	position: relative;
	z-index: 2;
}

.porto-sticky-navbar .ss-header-user-menu > .label {
	display: block;
	font-size: 0.65rem;
	line-height: 1.1;
	text-transform: lowercase;
}

.porto-sticky-navbar .ss-header-user-menu__toggle {
	min-width: 44px;
	min-height: 36px;
	flex-direction: row;
	gap: 0.2rem;
	color: inherit;
	font-size: 1.15rem;
}

.porto-sticky-navbar .ss-header-user-menu__caret {
	width: 0.38em;
	height: 0.38em;
	margin-top: 0;
}

.porto-sticky-navbar .ss-header-user-menu.is-open .ss-header-user-menu__caret {
	margin-top: 0.05em;
}

.porto-sticky-navbar .ss-header-user-menu__panel {
	top: auto;
	bottom: calc(100% + 12px);
	right: 0;
	left: auto;
	z-index: 100060;
	min-width: 220px;
	max-width: min(280px, calc(100vw - 16px));
	background: #fff !important;
	color: #1a2233 !important;
	box-shadow: 0 14px 34px rgba(16, 24, 40, 0.22);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px) scale(0.98);
}

.porto-sticky-navbar .ss-header-user-menu.is-open .ss-header-user-menu__panel {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0) scale(1);
}

.porto-sticky-navbar .ss-header-user-menu__name {
	color: #1a2233 !important;
}

.porto-sticky-navbar .ss-header-user-menu__link {
	color: #344054 !important;
}

.porto-sticky-navbar .ss-header-user-menu__link i {
	color: #667085 !important;
}

.porto-sticky-navbar .ss-header-user-menu__link:hover,
.porto-sticky-navbar .ss-header-user-menu__link:focus {
	color: #235af3 !important;
}

.porto-sticky-navbar .ss-header-user-menu__link--danger,
.porto-sticky-navbar .ss-header-user-menu__link--danger:hover {
	color: #b42318 !important;
}
