/* Tab bar, sticky header, footer — shared across every page. */

/* Wraps the tab bar + <header> (header.php) — the ONLY sticky element;
   the two bars inside are normal-flow children, so they stack with no
   gap and no hardcoded-offset guess to keep in sync with the tab bar's
   actual height (an earlier version made each bar independently
   sticky with the header offset by a guessed pixel value, which didn't
   exactly match and left a visible gap revealing page content
   scrolling underneath). */
.site-sticky-chrome {
	position: sticky;
	top: 0;
	z-index: 60;
}

/* Tab bar (template-parts/global-tab-bar.php) */
.tab-bar {
	background: var(--accent);
	display: flex;
}

.tab-bar__link {
	font-family: var(--font-heading);
	font-size: 13px;
	padding: 11px 26px;
	letter-spacing: 0.4px;
	background: var(--accent);
	color: oklch(0.14 0.01 45 / 0.6);
}

.tab-bar__link:hover {
	color: var(--bg);
}

.tab-bar__link.is-active {
	background: var(--text-heading);
	color: var(--bg);
}

/* Header */
.site-header {
	background: oklch(0.14 0.01 45 / 0.94);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--border);
}

.site-header__inner {
	max-width: var(--content-max);
	margin: 0 auto;
	padding: 18px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.site-header__logo {
	font-family: var(--font-heading);
	font-size: 22px;
	color: var(--text-heading);
	letter-spacing: 0.5px;
	display: inline-flex;
	align-items: center;
}

.site-header__logo span {
	color: var(--accent);
}

.site-footer__logo {
	font-family: var(--font-heading);
	font-size: 20px;
	color: var(--text-heading);
	letter-spacing: 0.5px;
	display: inline-flex;
	align-items: center;
	margin-bottom: 12px;
}

.site-footer__logo span {
	color: var(--accent);
}

/* Logo images (inc/customizer.php → revive_the_logo(): Customizer upload
   or the bundled assets/images/logo-light|dark.png). Sized by width: the
   wordmark is ~15× wider than tall, so a height-based size would be far
   too wide for a phone header. */
.site-logo__img {
	display: block;
	height: auto;
	max-width: 100%;
}

.site-header__logo .site-logo__img {
	width: 240px;
}

.site-footer__logo .site-logo__img {
	width: 200px;
}

/* Phones: the shop header row holds hamburger + logo + cart (~320px of
   room on a 360px-wide phone), the gym header holds logo + Menu. */
@media (max-width: 400px) {
	.site-header__logo .site-logo__img {
		width: 180px;
	}
}

.primary-nav {
	display: flex;
	gap: 22px;
	flex-wrap: wrap;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav a {
	color: var(--text-body-strong);
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	padding-bottom: 4px;
	border-bottom: 2px solid transparent;
}

.primary-nav a:hover {
	color: var(--accent);
}

.primary-nav li.current-menu-item > a,
.primary-nav li.current_page_item > a {
	color: var(--accent);
	font-weight: 800;
	border-bottom-color: var(--accent);
}

/* Separates "Mon Compte" (last item, see inc/seed-pages.php) from the rest
   of the nav — a small vertical accent bar, not just extra whitespace. */
.primary-nav li:last-child {
	padding-left: 22px;
	border-left: 2px solid var(--accent);
}

/* Mobile menu button (header.php → [data-nav-toggle], assets/js/nav.js).
   Hidden on desktop, where the nav is always shown inline. */
.site-header__menu-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 14px;
	background: transparent;
	border: 1px solid var(--border-outline);
	color: var(--text-heading);
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	cursor: pointer;
}

/* Three-line icon drawn with one span + two pseudo-elements; turns into
   an X while the menu is open. */
.site-header__menu-icon,
.site-header__menu-icon::before,
.site-header__menu-icon::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.site-header__menu-icon {
	position: relative;
}

.site-header__menu-icon::before,
.site-header__menu-icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.site-header__menu-icon::before {
	top: -6px;
}

.site-header__menu-icon::after {
	top: 6px;
}

.site-header.is-nav-open .site-header__menu-icon {
	background-color: transparent;
}

.site-header.is-nav-open .site-header__menu-icon::before {
	transform: translateY(6px) rotate(45deg);
}

.site-header.is-nav-open .site-header__menu-icon::after {
	transform: translateY(-6px) rotate(-45deg);
}

/* Under 900px the 8 gym links used to wrap into 4 rows (~270px of
   always-sticky header, a third of a phone screen). They now collapse
   behind the menu button and open as a full-width list. */
@media (max-width: 900px) {
	.site-header__inner {
		padding: 12px 20px;
		gap: 12px;
	}

	.site-header__menu-toggle {
		display: inline-flex;
		flex: none;
	}

	/* Logo takes the space left next to the Menu button (capped), so it
	   shrinks on a small phone instead of pushing the button to a new
	   row. Gym header only — the shop header has its own row layout. */
	.site-header:not(.site-header--shop) .site-header__inner > .site-header__logo {
		flex: 1 1 0;
		min-width: 0;
	}

	.site-header:not(.site-header--shop) .site-header__logo .site-logo__img {
		width: 100%;
		max-width: 220px;
	}

	.site-header__nav {
		display: none;
		flex: 1 1 100%;
	}

	.site-header.is-nav-open .site-header__nav {
		display: block;
		max-height: calc(100vh - 140px);
		overflow-y: auto;
	}

	.primary-nav {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding-bottom: 8px;
	}

	.primary-nav li {
		border-top: 1px solid var(--border);
	}

	.primary-nav a {
		display: flex;
		align-items: center;
		min-height: 48px;
		padding-bottom: 0;
		border-bottom: 0;
		font-size: 15px;
	}

	.primary-nav li.current-menu-item > a,
	.primary-nav li.current_page_item > a {
		border-bottom: 0;
	}

	.primary-nav li:last-child {
		padding-left: 0;
		border-left: 0;
	}
}

/* Footer */
.site-footer {
	margin-top: auto;
	background: var(--bg-alt);
	border-top: 1px solid var(--border);
	padding: 56px 32px 32px;
}

.site-footer__grid {
	max-width: var(--content-max);
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 40px;
}

.site-footer__col h4 {
	color: var(--text-heading);
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	margin-bottom: 14px;
}

.site-footer__col p,
.site-footer__col a {
	color: var(--text-muted);
	font-size: 14px;
}

.site-footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.site-footer__col a:hover {
	color: var(--accent);
}

.site-footer__bottom {
	max-width: var(--content-max);
	margin: 40px auto 0;
	padding-top: 24px;
	border-top: 1px solid var(--border-soft);
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	color: var(--text-legal);
	font-size: 13px;
}

.site-footer__bottom-links {
	display: flex;
	gap: 18px;
}

.site-footer__bottom-links a {
	color: var(--text-legal);
}

.site-footer__bottom-links a:hover {
	color: var(--accent);
}

/* Footer on phones: links were ~16px-tall tap targets. Kept after the
   base footer rules above so these win on source order. */
@media (max-width: 900px) {
	.site-footer {
		padding: 44px 20px 28px;
	}

	.site-footer__col ul {
		gap: 2px;
	}

	.site-footer__col ul a {
		display: inline-block;
		padding: 7px 0;
	}

	.site-footer__bottom-links a {
		display: inline-block;
		padding: 6px 0;
	}
}
