/* Composant navbar (components/navbar.php) : en-tete de la maquette Accueil. */

.navbar {
	/* pleine largeur malgre les marges du body */
	margin: 0 calc(-1 * var(--espace-m));
	background: var(--chr-primary-dark);
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.navbar_inner {
	display: flex;
	align-items: center;
	gap: var(--space-6);
	max-width: var(--container-max);
	min-height: 140px;
	margin: 0 auto;
	padding: var(--space-3) var(--gutter);
	box-sizing: border-box;
}

.navbar_logo {
	display: flex;
	flex-shrink: 0;
}

.navbar_logo img {
	display: block;
	width: 116px;
	height: 116px;
}

.navbar_baseline {
	display: flex;
	align-items: center;
	flex: 1;
	gap: var(--space-6);
}

.navbar_baseline p {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 22px;
	font-weight: var(--fw-semibold);
	line-height: 1.35;
	color: var(--chr-blanc);
}

.navbar_separateur {
	width: 1px;
	height: 64px;
	background: rgba(255, 255, 255, 0.35);
}

.navbar_separateur_court {
	height: 48px;
}

.navbar_compte {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	margin-left: auto;
}

.navbar_bouton {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 88px;
	min-height: var(--tap-target);
	font-family: var(--font-sans);
	font-size: 15px;
	font-weight: var(--fw-semibold);
	color: var(--chr-blanc);
	text-decoration: none;
}

/* general.css force une couleur sur tous les elements (*) : l'icone doit heriter du lien */
.navbar_bouton svg,
.navbar_bouton svg * {
	color: inherit;
}

.navbar_bouton:hover {
	color: var(--chr-secondary-light);
	text-decoration: none;
}

/* Page courante (Favoris) : texte ambre et soulignement */
.navbar_bouton_actif {
	color: var(--chr-secondary-light);
}

.navbar_bouton_actif::after {
	content: "";
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: -14px;
	height: 3px;
	border-radius: 2px;
	background: var(--chr-secondary);
}

/* Pastille du nombre de favoris */
.navbar_compteur {
	position: absolute;
	top: -6px;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	box-sizing: border-box;
	background: var(--chr-secondary);
	border-radius: var(--radius-pill);
	font-family: var(--font-sans);
	font-size: var(--fs-caption-s);
	font-weight: var(--fw-extrabold);
	color: var(--chr-encre);
}

.navbar_compteur[hidden] {
	display: none;
}

.navbar_logo:focus-visible,
.navbar_bouton:focus-visible {
	outline: var(--focus-ring);
	outline-offset: var(--focus-offset);
}

@media (max-width: 860px) {
	.navbar_baseline {
		display: none;
	}
}

@media (max-width: 560px) {
	.navbar_inner {
		min-height: 88px;
		padding: var(--space-3) var(--gutter-mobile);
		gap: var(--space-3);
	}

	.navbar_logo img {
		width: 72px;
		height: 72px;
	}

	.navbar_compte {
		gap: var(--space-2);
	}

	.navbar_bouton {
		min-width: 64px;
		gap: var(--space-1);
		font-size: var(--fs-caption-s);
	}

	.navbar_bouton svg {
		width: 24px;
		height: 24px;
	}

	.navbar_separateur_court {
		height: 36px;
	}
}
