/* ==========================================================================
   Apex Design : header
   Identité du site : graphite, orange Apex, Orbitron + Rajdhani, coins coupés.
   ========================================================================== */

.apxd-header {
	--o: #ff4d1c;
	--g: #ffb347;
	--t: #f5f5f5;
	--m: #a3a3ad;
	--bg: #0d0d0f;
	--p: #17171a;
	--line: rgba(255, 255, 255, 0.07);
	--display: 'Orbitron', 'Rajdhani', system-ui, sans-serif;
	--body: 'Rajdhani', system-ui, -apple-system, 'Segoe UI', sans-serif;

	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 999;
	margin: 0 !important;
	color: var(--t);
	font-family: var(--body);
	/* Pas de backdrop-filter : il enfermerait le menu mobile et le mini-panier dans le header. */
	background: rgba(13, 13, 15, 0.97);
	border-bottom: 1px solid var(--line);
	transition: box-shadow 0.25s ease;
}

.apxd-header *,
.apxd-header *::before,
.apxd-header *::after,
.apxd-drawer *,
.apxd-drawer *::before,
.apxd-drawer *::after {
	box-sizing: border-box;
}

.apxd-header.is-scrolled {
	box-shadow: 0 1px 0 rgba(255, 77, 28, 0.35), 0 12px 30px rgba(0, 0, 0, 0.35);
}

.apxd-header a,
.apxd-drawer a {
	color: inherit;
	text-decoration: none;
}

.apxd-header [hidden],
.apxd-drawer[hidden],
.apxd-drawer [hidden] {
	display: none !important;
}

.apxd-preview {
	margin: 0;
	padding: 4px 12px;
	background: rgba(255, 179, 71, 0.12);
	color: var(--g);
	font-size: 13px;
	font-weight: 700;
	text-align: center;
}

/* Barre principale */
.apxd-bar {
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 24px;
	padding: 16px clamp(16px, 3vw, 40px);
	transition: padding 0.25s ease;
}

.apxd-header.is-scrolled .apxd-bar {
	padding-top: 9px;
	padding-bottom: 9px;
}

.apxd-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.apxd-header .apxd-brand img,
.apxd-drawer .apxd-brand img {
	display: block;
	width: auto !important;
	max-width: none !important;
	height: 34px !important;
	margin: 0 !important;
	transition: transform 0.3s ease;
}

.apxd-brand:hover img {
	transform: rotate(-6deg) scale(1.06);
}

.apxd-brand span {
	font-family: var(--display);
	font-weight: 900;
	font-size: 18px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Menu */
.apxd-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	gap: 2px;
}

.apxd-nav a {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	color: #d6d6dc;
	font-weight: 600;
	font-size: 17px;
	white-space: nowrap;
	transition: color 0.15s ease;
}

.apxd-nav a::before {
	content: '';
	position: absolute;
	inset: 6px 4px;
	z-index: -1;
	background: linear-gradient(90deg, rgba(255, 77, 28, 0.18), rgba(255, 179, 71, 0.08));
	transform: skewX(-14deg) scaleX(0);
	transform-origin: left;
	transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.apxd-nav a:hover::before {
	transform: skewX(-14deg) scaleX(1);
}

.apxd-nav a > * ,
.apxd-nav a {
	transition: color 0.15s ease, transform 0.2s ease;
}

.apxd-nav a:hover {
	transform: translateY(-1px);
}

.apxd-nav li {
	position: relative;
	z-index: 0;
}

.apxd-nav a::after {
	content: '';
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 4px;
	height: 2px;
	background: var(--o);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.apxd-nav a:hover,
.apxd-nav a[aria-current="page"] {
	color: #fff;
}

.apxd-nav a:hover::after,
.apxd-nav a[aria-current="page"]::after {
	transform: scaleX(1);
}

.apxd-header a:focus-visible,
.apxd-header button:focus-visible,
.apxd-drawer a:focus-visible,
.apxd-drawer button:focus-visible,
.apxd-header input:focus-visible {
	outline: 2px solid var(--g);
	outline-offset: 2px;
}

/* Point « concours en cours » */
.apxd-live {
	position: relative;
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--o);
	box-shadow: 0 0 0 0 rgba(255, 77, 28, 0.7);
	animation: apxdPulse 1.8s ease-out infinite;
}

@keyframes apxdPulse {
	70% { box-shadow: 0 0 0 8px rgba(255, 77, 28, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 77, 28, 0); }
}

/* Icônes */
.apxd-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.apxd-icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	color: var(--t);
	border: 0;
	cursor: pointer;
	clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.apxd-icon svg {
	width: 22px;
	height: 22px;
}

.apxd-icon:hover,
.apxd-icon[aria-expanded="true"] {
	background: rgba(255, 255, 255, 0.07);
	color: var(--o);
}

.apxd-count {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	display: grid;
	place-items: center;
	background: var(--o);
	color: #fff;
	font-family: var(--display);
	font-weight: 700;
	font-size: 10px;
	line-height: 1;
	border-radius: 9px;
}

.apxd-count.is-bump {
	animation: apxdBump 0.4s ease;
}

@keyframes apxdBump {
	40% { transform: scale(1.35); }
}

.apxd-burger {
	display: none;
}

/* --------------------------------------------------------------------------
   Recherche
   -------------------------------------------------------------------------- */

.apxd-search {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
	animation: apxdDrop 0.2s ease;
}

@keyframes apxdDrop {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: none; }
}

.apxd-search__inner {
	max-width: 760px;
	margin: 0 auto;
	padding: 18px clamp(16px, 3vw, 24px) 20px;
	display: grid;
	gap: 12px;
}

.apxd-search__field {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 8px;
	padding-left: 16px;
	background: var(--p);
	box-shadow: inset 0 0 0 1px #34343c;
	clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.apxd-search__field:focus-within {
	box-shadow: inset 0 0 0 1px var(--o);
}

.apxd-search__field > svg {
	width: 22px;
	height: 22px;
	color: var(--o);
}

.apxd-search__field input {
	width: 100%;
	min-height: 56px;
	padding: 0;
	background: none;
	color: var(--t);
	border: 0;
	font: inherit;
	font-size: 19px;
}

.apxd-search__field input:focus {
	outline: none;
}

.apxd-search__field input::-webkit-search-cancel-button {
	display: none;
}

.apxd-results {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 4px;
	max-height: min(60vh, 460px);
	overflow-y: auto;
}

.apxd-results a {
	display: grid;
	grid-template-columns: 56px 1fr auto;
	gap: 14px;
	align-items: center;
	padding: 8px 10px;
	transition: background-color 0.12s ease;
}

.apxd-results a:hover,
.apxd-results a.is-active {
	background: var(--p);
	box-shadow: inset 3px 0 0 var(--o);
}

.apxd-results img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	background: #fff;
	clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.apxd-results b {
	font-weight: 700;
	font-size: 17px;
	line-height: 1.2;
}

.apxd-results small {
	display: block;
	color: var(--m);
	font-size: 13px;
	font-weight: 600;
}

.apxd-results .apxd-price {
	font-family: var(--display);
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
}

.apxd-results .is-out {
	opacity: 0.55;
}

.apxd-results mark {
	background: none;
	color: var(--o);
}

.apxd-results__title {
	padding: 4px 10px;
	color: var(--m);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.05em;
}

.apxd-search__empty {
	margin: 0;
	padding: 12px 10px;
	color: var(--m);
}

.apxd-search__all {
	justify-self: start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	color: var(--g) !important;
	font-weight: 700;
}

.apxd-search__all svg {
	width: 16px;
	height: 16px;
}

/* --------------------------------------------------------------------------
   Menu mobile plein écran
   -------------------------------------------------------------------------- */

.apxd-drawer {
	font-family: 'Rajdhani', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--o: #ff4d1c;
	--g: #ffb347;
	--t: #f5f5f5;
	--m: #a3a3ad;
	--bg: #0d0d0f;
	--p: #17171a;
	--line: rgba(255, 255, 255, 0.07);
	--display: 'Orbitron', 'Rajdhani', system-ui, sans-serif;
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 14px clamp(16px, 5vw, 32px) calc(24px + env(safe-area-inset-bottom, 0px));
	overflow-y: auto;
	color: var(--t);
	background:
		radial-gradient(600px 420px at 100% 0%, rgba(255, 77, 28, 0.2), transparent 60%),
		repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 48px),
		var(--bg);
	animation: apxdFade 0.2s ease;
}

@keyframes apxdFade {
	from { opacity: 0; }
	to { opacity: 1; }
}

.apxd-drawer__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.apxd-drawer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	border-top: 1px solid var(--line);
}

.apxd-drawer__links li {
	border-bottom: 1px solid var(--line);
	animation: apxdIn 0.35s ease both;
	animation-delay: calc(var(--i, 0) * 45ms + 60ms);
}

@keyframes apxdIn {
	from { opacity: 0; transform: translateX(-14px); }
	to { opacity: 1; transform: none; }
}

.apxd-drawer__links a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 2px;
}

.apxd-drawer__links small {
	min-width: 26px;
	color: var(--o);
	font-family: var(--display);
	font-weight: 700;
	font-size: 13px;
}

.apxd-drawer__links span:not(.apxd-live) {
	font-family: var(--display);
	font-weight: 900;
	font-size: clamp(22px, 6.5vw, 30px);
	line-height: 1.1;
}

.apxd-drawer__links a[aria-current="page"] span:not(.apxd-live) {
	color: var(--o);
}

.apxd-drawer__contest {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 14px;
	align-items: center;
	margin-top: auto;
	padding: 14px;
	background:
		radial-gradient(120% 140% at 100% 0%, rgba(255, 77, 28, 0.25) 0%, rgba(255, 77, 28, 0) 60%),
		var(--p);
	box-shadow: inset 0 0 0 1px rgba(255, 77, 28, 0.45), inset 3px 0 0 var(--o);
	clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.apxd-drawer__contest img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	background: #fff;
}

.apxd-drawer__contest > span {
	display: grid;
	gap: 2px;
}

.apxd-drawer__contest small {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--g);
	font-weight: 700;
	font-size: 14px;
}

.apxd-drawer__contest b {
	font-family: var(--display);
	font-weight: 900;
	font-size: 17px;
	line-height: 1.2;
}

.apxd-drawer__contest em {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--m);
	font-style: normal;
	font-weight: 600;
	font-size: 15px;
}

.apxd-drawer__contest em svg {
	width: 15px;
	height: 15px;
	color: var(--o);
}

/* Mobile : la barre d'admin WordPress n'est pas fixe sous 600 px, le header se colle donc tout en haut. */
@media (max-width: 600px) {
	.apxd-header {
		top: 0;
	}
}

html.apxd-lock,
html.apxd-lock body {
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
	.apxd-nav a {
		padding: 10px 9px;
		font-size: 16px;
	}
	.apxd-nav a::before {
	content: '';
	position: absolute;
	inset: 6px 4px;
	z-index: -1;
	background: linear-gradient(90deg, rgba(255, 77, 28, 0.18), rgba(255, 179, 71, 0.08));
	transform: skewX(-14deg) scaleX(0);
	transform-origin: left;
	transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.apxd-nav a:hover::before {
	transform: skewX(-14deg) scaleX(1);
}

.apxd-nav a > * ,
.apxd-nav a {
	transition: color 0.15s ease, transform 0.2s ease;
}

.apxd-nav a:hover {
	transform: translateY(-1px);
}

.apxd-nav li {
	position: relative;
	z-index: 0;
}

.apxd-nav a::after {
		left: 9px;
		right: 9px;
	}
}

@media (max-width: 980px) {
	.apxd-bar {
		grid-template-columns: 1fr auto;
		gap: 12px;
		padding-top: 12px;
		padding-bottom: 12px;
	}
	.apxd-nav {
		display: none;
	}
	.apxd-burger {
		display: grid;
	}
}

@media (max-width: 420px) {
	.apxd-header .apxd-brand img,
.apxd-drawer .apxd-brand img {
		height: 28px !important;
	}
	.apxd-brand span {
		font-size: 15px;
		letter-spacing: 0.04em;
	}
	.apxd-icon {
		width: 40px;
		height: 40px;
	}
}

/* Mini-panier WooCommerce aux couleurs du header */
.apxd-minicart .wc-block-mini-cart {
	display: flex;
}

.apxd-minicart .wc-block-mini-cart__button {
	position: relative;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0 !important;
	color: var(--t) !important;
	background: transparent !important;
	border: 0 !important;
	cursor: pointer;
	clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.apxd-minicart .wc-block-mini-cart__button:hover {
	background: rgba(255, 255, 255, 0.07) !important;
	color: var(--o) !important;
}

.apxd-minicart .wc-block-mini-cart__amount,
.apxd-minicart .wc-block-mini-cart__tax-label {
	display: none !important;
}

.apxd-minicart .wc-block-mini-cart__quantity-badge {
	display: grid;
	place-items: center;
}

.apxd-minicart .wc-block-mini-cart__icon {
	width: 24px;
	height: 24px;
	color: inherit;
}

.apxd-minicart .wc-block-mini-cart__badge {
	background: var(--o) !important;
	color: #fff !important;
	border: 0 !important;
	font-family: var(--display);
	font-weight: 700;
	font-size: 10px;
}

/* Panneau du mini-panier */
.wc-block-mini-cart__drawer .components-modal__content,
.wc-block-mini-cart__drawer .wc-block-mini-cart__template-part {
	background: #0d0d0f;
	color: #f5f5f5;
}

.wc-block-mini-cart__drawer .wc-block-mini-cart__title {
	font-family: 'Orbitron', 'Rajdhani', sans-serif;
	font-weight: 900;
}

.wc-block-mini-cart__drawer .wc-block-components-button:not(.is-link) {
	border-radius: 0 !important;
	font-family: 'Orbitron', 'Rajdhani', sans-serif;
	font-weight: 700;
}

.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-checkout {
	background: #ff4d1c !important;
	border-color: #ff4d1c !important;
	color: #fff !important;
}

@media (prefers-reduced-motion: reduce) {
	.apxd-nav a,
	.apxd-nav a::before,
	.apxd-live,
	.apxd-drawer,
	.apxd-drawer__links li,
	.apxd-search,
	.apxd-count.is-bump {
		animation: none;
	}
	.apxd-bar,
	.apxd-nav a::after,
	.apxd-brand img {
		transition: none;
	}
}
