/* ==========================================================================
   HEADER CUSTOM — Valiseofilms Child Theme
   v1.0.2
   ========================================================================== */

/* ── Reset ciblé : UNIQUEMENT le bouton déclencheur mega menu ────────────
   Astra applique background:orange sur TOUS les <button> globalement.
   On neutralise SEULEMENT le fond/bordure/ombre du trigger.
   On ne touche PAS aux dimensions, padding, ni à la typo —
   ceux-ci sont gérés par .vs-nav__link qui s'applique à la fois
   aux <a> et au <button> du trigger.
──────────────────────────────────────────────────────────────────────── */
.vs-header .vs-nav__link--trigger,
.vs-header .vs-nav__link--trigger:hover,
.vs-header .vs-nav__link--trigger:focus,
.vs-header .vs-nav__link--trigger:focus-visible,
.vs-header .vs-nav__link--trigger:active {
	background:        transparent !important;
	background-color:  transparent !important;
	background-image:  none !important;
	border-color:      transparent !important;
	box-shadow:        none !important;
	text-shadow:       none !important;
	outline:           none !important;
}

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
	--vs-header-h: 72px;       /* mis à jour par header.js */
	--vs-header-bg: #ffffff;
	--vs-header-z: 1000;
}

/* ── Offset contenu (évite le chevauchement header fixe) ──────────────── */
body {
	padding-top: var(--vs-header-h) !important;
}

/* ── Skip link accessibilité ──────────────────────────────────────────── */
.vs-skip-link {
	position: absolute;
	top: -100%;
	left: 16px;
	z-index: 9999;
	background: #fb8500;
	color: #ffffff;
	font-family: 'Lato', sans-serif;
	font-size: 0.875rem;
	font-weight: 700;
	padding: 8px 16px;
	border-radius: 0 0 6px 6px;
	text-decoration: none;
	transition: top 0.2s;
}
.vs-skip-link:focus {
	top: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   HEADER — BASE
═══════════════════════════════════════════════════════════════════════ */

.vs-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: var(--vs-header-z);
	background: var(--vs-header-bg);
	border-bottom: 1px solid #f0f0f0;
	transition: box-shadow 0.25s ease;
}

.vs-header.is-scrolled {
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.vs-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--vs-header-h);
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 32px;
	gap: 24px;
}

/* ═══════════════════════════════════════════════════════════════════════
   LOGO
═══════════════════════════════════════════════════════════════════════ */

.vs-header__logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
}

.vs-header__logo-img {
	display: block;
	height: 36px;
	width: auto;
	max-width: 180px;
	object-fit: contain;
}

/* Logo texte (fallback si pas d'image) */
.vs-header__logo-text {
	font-family: 'Oswald', sans-serif;
	font-size: 1.35rem;
	font-weight: 700;
	color: #1a1a1a;
	letter-spacing: -0.01em;
	text-transform: lowercase;
}
.vs-header__logo-text em {
	font-style: normal;
	font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════════════════
   NAVIGATION DESKTOP
═══════════════════════════════════════════════════════════════════════ */

.vs-header__nav {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.vs-nav__list {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0;
}

.vs-nav__item {
	position: relative;
}

/* Lien nav */
.vs-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: 'Lato', sans-serif;
	font-size: 0.9375rem;   /* 15px */
	font-weight: 600;
	color: #1a1a1a;
	text-decoration: none;
	padding: 0 14px;
	height: var(--vs-header-h);
	background: none;
	border: none;
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.18s ease;
	outline: none;
	letter-spacing: 0.01em;
}

.vs-nav__link:hover,
.vs-nav__link:focus-visible,
.vs-nav__link--active {
	color: #fb8500;
}

/* Item highlight (Blog) */
.vs-nav__item--highlight .vs-nav__link {
	color: #fb8500;
}
.vs-nav__item--highlight .vs-nav__link:hover {
	color: #e07600;
}

/* Chevron */
.vs-nav__chevron {
	transition: transform 0.22s ease;
	flex-shrink: 0;
}

.vs-nav__item--mega.is-mega-open .vs-nav__chevron {
	transform: rotate(180deg);
}

/* Indicateur actif — barre orange sous le lien */
.vs-nav__item--active > .vs-nav__link::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 14px;
	right: 14px;
	height: 2px;
	background: #fb8500;
	border-radius: 2px 2px 0 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   MEGA MENU — DESKTOP
═══════════════════════════════════════════════════════════════════════ */

.vs-megamenu {
	/* Desktop : panneau absolu */
	position: absolute;
	top: calc(100% + 0px);
	left: 50%;
	transform: translateX(-50%) translateY(-6px);
	min-width: 480px;
	background: #1a1a1a;
	border-radius: 0 0 10px 10px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
	z-index: calc(var(--vs-header-z) + 1);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

/* État ouvert — DESKTOP uniquement (transform centré) */
@media (min-width: 1024px) {
	.vs-nav__item--mega.is-mega-open .vs-megamenu {
		opacity: 1;
		pointer-events: all;
		transform: translateX(-50%) translateY(0);
	}
}

.vs-megamenu__inner {
	display: flex;
	gap: 0;
	padding: 32px 36px 28px;
}

.vs-megamenu__col {
	flex: 1;
	min-width: 0;
}

.vs-megamenu__col + .vs-megamenu__col {
	padding-left: 32px;
	border-left: 1px solid #2e2e2e;
	margin-left: 32px;
}

/* Label de colonne */
.vs-megamenu__col-label {
	font-family: 'Oswald', sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: #fb8500;
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid #2e2e2e;
}

.vs-megamenu__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.vs-megamenu__link {
	display: block;
	font-family: 'Lato', sans-serif;
	font-size: 0.9375rem;
	font-weight: 400;
	color: #d4d4d4;
	text-decoration: none;
	padding: 7px 0;
	transition: color 0.15s ease, padding-left 0.15s ease;
}

.vs-megamenu__link:hover {
	color: #fb8500;
	padding-left: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════
   RÉSEAUX SOCIAUX + HAMBURGER
═══════════════════════════════════════════════════════════════════════ */

.vs-header__right {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}

.vs-header__socials {
	display: flex;
	align-items: center;
	gap: 12px;
}

.vs-header__social {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	text-decoration: none;
	transition: color 0.18s ease;
	line-height: 0;
}

.vs-header__social:hover {
	color: #1a1a1a;
}

/* Hamburger */
.vs-header__burger {
	display: none;   /* affiché en mobile */
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 36px;
	height: 36px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

.vs-header__burger-line {
	display: block;
	width: 22px;
	height: 2px;
	background: #1a1a1a;
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
	transform-origin: center;
}

/* Transformation en croix */
.vs-header.is-nav-open .vs-header__burger-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.vs-header.is-nav-open .vs-header__burger-line:nth-child(2) {
	opacity: 0;
	width: 0;
}
.vs-header.is-nav-open .vs-header__burger-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════════════════════════
   OVERLAY MOBILE
═══════════════════════════════════════════════════════════════════════ */

.vs-nav-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: calc(var(--vs-header-z) - 2);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.vs-header.is-nav-open ~ .vs-nav-overlay {
	opacity: 1;
	pointer-events: all;
}

/* ═══════════════════════════════════════════════════════════════════════
   RÉSEAUX SOCIAUX dans le nav (mobile uniquement)
═══════════════════════════════════════════════════════════════════════ */

.vs-header__nav-socials {
	display: none; /* caché sur desktop */
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (< 1024px)
═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 1023px) {

	:root {
		--vs-header-h: 62px;
	}

	.vs-header__inner {
		padding: 0 20px;
	}

	/* Hamburger visible */
	.vs-header__burger {
		display: flex;
	}

	/* Icônes sociales desktop cachées */
	.vs-header__socials {
		display: none;
	}

	/* Nav : panneau latéral depuis la droite */
	.vs-header__nav {
		position: fixed;
		top: 0;
		right: -100%;
		width: min(340px, 88vw);
		height: 100%;
		background: #ffffff;
		z-index: calc(var(--vs-header-z) + 1);
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		padding: calc(var(--vs-header-h) + 24px) 24px 32px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		box-shadow: -4px 0 28px rgba(0, 0, 0, 0.14);
		transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	}

	.vs-header.is-nav-open .vs-header__nav {
		right: 0;
	}

	/* Liste nav mobile */
	.vs-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
	}

	.vs-nav__item {
		border-bottom: 1px solid #f0f0f0;
	}

	.vs-nav__link {
		width: 100%;
		height: auto;
		padding: 14px 0;
		font-size: 1rem;
		justify-content: space-between;
	}

	/* Indicateur actif en mobile : pas de barre absolue */
	.vs-nav__item--active > .vs-nav__link::after {
		display: none;
	}
	.vs-nav__item--active > .vs-nav__link {
		color: #fb8500;
	}

	/* Mega menu mobile : panneau inline, accordéon */
	.vs-megamenu {
		position: static;
		transform: none;
		opacity: 1;
		pointer-events: none;
		max-height: 0;
		overflow: hidden;
		background: #f8f8f8;
		border-radius: 8px;
		box-shadow: none;
		transition: max-height 0.35s ease, margin 0.25s ease;
		min-width: 0;
		margin: 0;
	}

	.vs-nav__item--mega.is-mega-open .vs-megamenu {
		pointer-events: all;
		max-height: 700px;
		margin: 0 0 8px;
		transform: none;   /* annule le translateX(-50%) du sélecteur desktop */
	}

	.vs-megamenu__inner {
		flex-direction: column;
		padding: 20px 16px 16px;
		gap: 20px;
	}

	.vs-megamenu__col + .vs-megamenu__col {
		padding-left: 0;
		margin-left: 0;
		border-left: none;
		border-top: 1px solid #e8e8e8;
		padding-top: 20px;
	}

	.vs-megamenu__col-label {
		color: #fb8500;
	}

	.vs-megamenu__link {
		color: #444;
		font-size: 0.9rem;
		padding: 6px 0;
	}
	.vs-megamenu__link:hover {
		color: #fb8500;
		padding-left: 4px;
	}

	/* Réseaux sociaux en bas du panneau mobile */
	.vs-header__nav-socials {
		display: flex;
		align-items: center;
		gap: 20px;
		margin-top: auto;
		padding-top: 28px;
	}

	.vs-header__nav-socials .vs-header__social {
		color: #888;
		font-size: 1.1rem;
	}
	.vs-header__nav-socials .vs-header__social:hover {
		color: #1a1a1a;
	}
}

/* ── Très petits écrans ────────────────────────────────────────────── */
@media (max-width: 400px) {
	.vs-header__inner {
		padding: 0 16px;
	}
}

/* ── Desktop large : espacement logo/nav ───────────────────────────── */
@media (min-width: 1280px) {
	.vs-header__inner {
		padding: 0 48px;
	}
}
