/* VahiGo — mega menu (16 familles en 4 univers + destinations par région).
   Style : pictogrammes encadrés, titre + description, panneau image à droite. */

/* La barre reste au-dessus du voile (qui vit dans le même contexte d'empilement). */
.vg-header__inner { position: relative; z-index: 21; background: var(--vg-white); box-shadow: 0 0 0 100vmax var(--vg-white); clip-path: inset(0 -100vmax); }

/* ---------- Déclencheurs dans la barre ---------- */
.vg-nav__list { align-items: center; }
.vg-nav__trigger,
.vg-nav__link {
	display: inline-flex; align-items: center; gap: 6px;
	min-height: 44px; padding: 0;
	font: 500 15px/1 var(--vg-font-body); color: var(--vg-nuit);
	background: none; border: 0; cursor: pointer; text-decoration: none;
	position: relative;
}
.vg-nav__trigger::after,
.vg-nav__link::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px;
	background: var(--vg-terre); border-radius: 2px;
	transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.vg-nav__trigger:hover,
.vg-nav__link:hover { color: var(--vg-nuit); }
.vg-nav__trigger[aria-expanded="true"]::after,
.vg-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.vg-nav__link[aria-current="page"] { color: var(--vg-nuit); }
.vg-chev { transition: transform .2s ease; color: var(--vg-ardoise); }
.vg-nav__trigger[aria-expanded="true"] .vg-chev { transform: rotate(180deg); color: var(--vg-terre); }

/* ---------- Panneau (style : liste à pictogrammes encadrés + panneau image à droite) ---------- */
.vg-mega {
	--vg-mega-tint: #FAF6F0;      /* Sable très clair : survol + panneau image */
	--vg-mega-line: #EDE5D8;
	/* Même largeur que le contenu du header : du logo au bouton « Sign in ». */
	--vg-mega-x: max(var(--vg-gutter), calc((100% - var(--vg-wrap)) / 2 + var(--vg-gutter)));
	position: absolute; left: var(--vg-mega-x); right: var(--vg-mega-x); top: calc(100% + 8px); z-index: 20;
	background: var(--vg-white);
	border: 1px solid var(--vg-lin-clair); border-radius: 20px;
	box-shadow: 0 2px 4px rgba(20, 38, 46, .04), 0 28px 56px -20px rgba(20, 38, 46, .24);
	overflow: hidden;
	opacity: 0; transform: translateY(-6px);
	transition: opacity .18s ease, transform .22s cubic-bezier(.2, .7, .2, 1);
}
.vg-mega.is-open { opacity: 1; transform: none; }
.vg-mega[hidden] { display: none; }

.vg-scrim {
	position: fixed; inset: 0; z-index: 9;
	background: linear-gradient(to bottom, rgba(20, 38, 46, 0) 90px, rgba(20, 38, 46, .08) 150px, rgba(20, 38, 46, .2) 280px);
	opacity: 0; transition: opacity .18s ease;
}
.vg-scrim.is-open { opacity: 1; }
.vg-scrim[hidden] { display: none; }

/* Contenu à gauche, panneau image contenu dans la carte à droite. */
.vg-mega__inner {
	display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px;
	padding: 10px 10px 10px 28px;
}
.vg-mega__cols { display: grid; gap: 8px 24px; }
.vg-mega__cols[hidden], .vg-mega__region[hidden] { display: none; }
.vg-mega__cols--dest { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.vg-mega__lead { margin: 0 0 6px; font-size: 15px; line-height: 1.5; color: var(--vg-encre); }

.vg-mega__label {
	margin: 0 0 12px;
	font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	color: var(--vg-ardoise);
}
.vg-mega__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

/* Colonne principale : filtres, contenu filtré, actions en pied */
.vg-mega__main { padding: 22px 0 18px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Filtres : pastilles avec compteur ; l'active est pleine (Nuit). */
.vg-mega__tabs {
	display: flex; flex-wrap: wrap; gap: 8px;
	padding-bottom: 20px; border-bottom: 1px solid var(--vg-mega-line);
}
.vg-filter {
	display: inline-flex; align-items: center; gap: 8px;
	height: 38px; padding: 0 8px 0 16px; cursor: pointer;
	border-radius: var(--vg-r-pill); border: 1px solid var(--vg-lin-fonce);
	background: var(--vg-white); color: var(--vg-encre);
	font: 600 14px/1 var(--vg-font-body);
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.vg-filter:hover { border-color: var(--vg-nuit); color: var(--vg-nuit); }
.vg-filter__count {
	min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--vg-r-pill);
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--vg-sable); color: var(--vg-ardoise);
	font-size: 12px; font-weight: 600;
}
.vg-filter[aria-selected="true"] { background: var(--vg-nuit); border-color: var(--vg-nuit); color: var(--vg-white); }
.vg-filter[aria-selected="true"] .vg-filter__count { background: rgba(255, 255, 255, .16); color: var(--vg-white); }
.vg-mega__list--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; margin-left: -12px; }
.vg-mega__list--grid[hidden] { display: none; }
.vg-mega__all { font-size: 14px; font-weight: 600; color: var(--vg-nuit); text-underline-offset: 4px; }
/* Actions collées en bas : la colonne occupe toute la hauteur du panneau, sans vide. */
.vg-mega__actions {
	margin-top: auto; padding-top: 16px; border-top: 1px solid var(--vg-mega-line);
	display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.vg-mega__plan { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--vg-terre); text-decoration: none; }
.vg-mega__plan:hover { color: var(--vg-terre-dark); text-decoration: underline; text-underline-offset: 4px; }
.vg-mega__plan svg { width: 18px; height: 18px; }

.vg-mega__all:hover { color: var(--vg-terre); }
.vg-mega__cols--dest .vg-mega__list { margin-left: -12px; }

/* Entrée */
.vg-item {
	display: flex; align-items: flex-start; gap: 14px;
	padding: 12px; border-radius: 12px;
	text-decoration: none; color: var(--vg-nuit);
	transition: background-color .15s ease;
}
.vg-item:hover, .vg-item:focus-visible { background: var(--vg-mega-tint); color: var(--vg-nuit); }
.vg-item:focus-visible { outline-offset: 0; }
.vg-item__icon {
	flex: none; width: 40px; height: 40px; border-radius: 9px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--vg-white); color: var(--vg-encre);
	border: 1px solid var(--vg-mega-line);
	box-shadow: 0 1px 2px rgba(20, 38, 46, .06), inset 0 -2px 0 rgba(20, 38, 46, .04);
	transition: color .15s ease, border-color .15s ease;
}
.vg-item:hover .vg-item__icon { color: var(--vg-terre); border-color: var(--vg-lin-fonce); }
.vg-item:not(:has(.vg-item__desc)) { align-items: center; }
.vg-item__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 1px; }
.vg-item__title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.vg-item__desc { font-size: 13.5px; line-height: 1.5; color: var(--vg-ardoise); }

/* Panneau image : un par univers, fondu enchaîné au changement de filtre. */
.vg-mega__features { display: grid; }
.vg-mega__features .vg-mega__feature { margin: 0; }
.vg-mega__feature[hidden] { display: none; }
.vg-mega__feature.is-entering { animation: vg-feat-in .24s ease both; }
@keyframes vg-feat-in { from { opacity: 0; } to { opacity: 1; } }
.vg-mega__feature {
	margin: 0; padding: 22px;
	background: var(--vg-mega-tint);
	border: 1px solid var(--vg-mega-line);
	border-radius: 14px; /* 20 px (carte) − 10 px (marge) + bordure : coins concentriques */
	display: flex; flex-direction: column; align-self: stretch;
}
.vg-mega__feature-title { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--vg-nuit); }
.vg-mega__feature-text { margin: 0 0 18px; font-size: 14px; line-height: 1.55; color: var(--vg-ardoise); }
.vg-mega__feature img { display: block; width: 100%; flex: 1 1 auto; min-height: 150px; height: 0; object-fit: cover; border-radius: 10px; margin-bottom: 18px; } /* l'image remplit la hauteur disponible */
.vg-mega__feature-btn { margin-top: auto; }
.vg-mega__feature-btn {
	display: inline-flex; align-self: flex-start; align-items: center; justify-content: center; gap: 6px;
	min-height: 36px; padding: 0 16px; border-radius: 999px;
	background: var(--vg-terre); border: 0;
	font-size: 13.5px; font-weight: 600; color: var(--vg-white); text-decoration: none;
	transition: background-color .15s ease;
}
.vg-mega__feature-btn:hover { background: var(--vg-terre-dark); color: var(--vg-white); }
.vg-mega__empty { margin: 0; color: var(--vg-ardoise); }

@media (max-width: 1279px) {
	.vg-mega__inner { grid-template-columns: minmax(0, 1fr); padding-right: 28px; }
	.vg-mega__features, .vg-mega__inner > .vg-mega__feature { display: none; }
}
@media (max-width: 1099px) {
	.vg-item__desc { font-size: 13px; }
	.vg-mega__cols--dest { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Mobile : accordéons ---------- */
.vg-mobile-menu { max-height: calc(100vh - 77px); overflow-y: auto; overscroll-behavior: contain; }
.vg-mnav summary {
	list-style: none; cursor: pointer;
	min-height: 52px; display: flex; align-items: center; justify-content: space-between;
	font-size: 17px; font-weight: 500; border-bottom: 1px solid #F0E8DC;
}
.vg-mnav summary::-webkit-details-marker { display: none; }
.vg-mnav details[open] > summary > .vg-chev { transform: rotate(180deg); color: var(--vg-terre); }
.vg-mnav__uni { padding-left: 4px; }
.vg-mnav__uni > summary { font-family: var(--vg-font-display); font-size: 22px; font-weight: 400; min-height: 50px; }
.vg-mobile-menu .vg-mnav__uni ul,
.vg-mobile-menu .vg-mnav__group > ul { padding: 4px 0 8px 12px; border-left: 2px solid var(--vg-lin); margin: 8px 0 8px 4px; }
.vg-mobile-menu .vg-mnav__uni a,
.vg-mobile-menu .vg-mnav__group > ul a { min-height: 40px; font-size: 15px; font-weight: 400; color: var(--vg-encre); border-bottom: 0; }
.vg-mobile-menu .vg-mnav__all { min-height: 48px; font-size: 15px; font-weight: 600; color: var(--vg-terre); border-bottom: 1px solid #F0E8DC; }
.vg-mnav__region { margin: 14px 0 0 4px; font-size: 13px; color: var(--vg-ardoise); }

/* Mobile : familles avec leur pictogramme */
.vg-mobile-menu .vg-mnav__uni a { gap: 12px; }
.vg-mnav .vg-item__icon { width: 32px; height: 32px; border-radius: 8px; }
.vg-mnav .vg-item__icon svg { width: 17px; height: 17px; }

@media (prefers-reduced-motion: reduce) {
	.vg-mega__feature.is-entering { animation: none; }
	.vg-mega, .vg-scrim, .vg-chev, .vg-item, .vg-item__icon,
	.vg-nav__trigger::after, .vg-nav__link::after { transition: none; }
}

/* Destinations : pictogramme sans carte, police réduite, noms sur une ligne. */
#vg-mega-destinations .vg-item { gap: 8px; padding: 8px 12px; }
#vg-mega-destinations .vg-item__icon { width: 20px; height: 20px; background: none; border: 0; box-shadow: none; border-radius: 0; color: var(--vg-ardoise); }
#vg-mega-destinations .vg-item__icon svg { width: 18px; height: 18px; }
#vg-mega-destinations .vg-item__title { font-size: 14px; white-space: nowrap; }

/* Expériences : même pictogramme sans carte, police réduite. */
#vg-mega-experiences .vg-item { gap: 10px; padding: 10px 12px; }
#vg-mega-experiences .vg-item__icon { width: 20px; height: 20px; background: none; border: 0; box-shadow: none; border-radius: 0; color: var(--vg-ardoise); margin-top: 1px; }
#vg-mega-experiences .vg-item__icon svg { width: 18px; height: 18px; }
#vg-mega-experiences .vg-item__title { font-size: 14px; }
#vg-mega-experiences .vg-item__desc { font-size: 13px; }
