/* ---------------------------------------------------------------------------
 * Novatis — méga menu « Nos produits »
 * Couleurs et rayons repris du site (cf. devis.css) : rouge #E20613, encre
 * #1c2024, filets clairs, cartes arrondies et boutons en pilule.
 * ------------------------------------------------------------------------- */

.nv-mm {
	--nv-mm-rouge: #E20613;
	--nv-mm-rouge-fonce: #c00510;
	--nv-mm-rouge-voile: rgba(226, 6, 19, .07);
	--nv-mm-encre: #1c2024;
	--nv-mm-gris: #6b7178;
	--nv-mm-filet: #eceef0;
	--nv-mm-fond: #f6f6f7;
	--nv-mm-haut: 0px;

	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	z-index: 9990;
	background: #fff;
	border-top: 1px solid var(--nv-mm-filet);
	box-shadow: 0 40px 80px -40px rgba(17, 24, 39, .35), 0 1px 0 rgba(17, 24, 39, .04);
	font-family: inherit;
	color: var(--nv-mm-encre);
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity .18s ease, transform .18s ease;
	pointer-events: none;
}
.nv-mm[hidden] { display: none; }
.nv-mm.nv-mm-ouvert {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.nv-mm *,
.nv-mm *::before,
.nv-mm *::after { box-sizing: border-box; }

.nv-mm-cadre {
	max-height: calc(100vh - var(--nv-mm-haut) - 12px);
	overflow: hidden;
}

.nv-mm-interieur {
	display: grid;
	grid-template-columns: minmax(260px, 300px) 1fr;
	gap: 36px;
	padding: 28px 0 32px;
}

/* ---- Colonne de présentation ---- */
.nv-mm-intro {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-height: 300px;
	padding: 26px 26px 24px;
	border: 1px solid #f3e1e2;
	border-radius: 20px;
	background:
		radial-gradient(120% 70% at 100% 0%, rgba(226, 6, 19, .10) 0%, rgba(226, 6, 19, 0) 60%),
		linear-gradient(180deg, #fff 0%, #fbfbfb 100%);
	overflow: hidden;
}

.nv-mm-fil {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 4px;
	margin: 0 0 14px;
	font-size: 12px;
	line-height: 1.4;
}
.nv-mm-fil-lien {
	appearance: none;
	margin: 0;
	padding: 2px 4px;
	border: 0;
	border-radius: 6px;
	background: none;
	color: var(--nv-mm-gris);
	font: inherit;
	cursor: pointer;
	transition: color .15s ease, background-color .15s ease;
}
.nv-mm-fil-lien:hover { color: var(--nv-mm-rouge); background: var(--nv-mm-rouge-voile); }
.nv-mm-fil-lien[aria-current="true"] { color: var(--nv-mm-encre); font-weight: 600; cursor: default; background: none; }
.nv-mm-fil-sep { width: 12px; height: 12px; color: #b6bac0; flex: none; }

.nv-mm-sourcil {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	color: var(--nv-mm-rouge);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.nv-mm-sourcil::before {
	content: "";
	width: 22px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
}

.nv-mm-retour {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 12px;
	padding: 6px 12px 6px 8px;
	border: 1px solid var(--nv-mm-filet);
	border-radius: 999px;
	background: #fff;
	color: var(--nv-mm-encre);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.nv-mm-retour svg { width: 16px; height: 16px; transition: transform .15s ease; }
.nv-mm-retour:hover { border-color: rgba(226, 6, 19, .35); color: var(--nv-mm-rouge); }
.nv-mm-retour:hover svg { transform: translateX(-2px); }

.nv-mm-titre {
	margin: 0;
	color: var(--nv-mm-encre);
	font-family: inherit;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.02em;
}

.nv-mm-texte {
	margin: 10px 0 0;
	color: var(--nv-mm-gris);
	font-size: 14px;
	line-height: 1.6;
}

.nv-mm-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 16px;
}
.nv-mm-stat {
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--nv-mm-rouge-voile);
	color: var(--nv-mm-rouge);
	font-size: 12px;
	font-weight: 700;
}

/* Même style que le bouton « Demander un devis » du header :
   rounded-full bg-primary px-5 py-2.5 text-[14px] font-700
   text-primary-foreground hover:bg-primary/90 transition-colors shadow-sm. */
.nv-mm-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding: 10px 20px;
	border-radius: 9999px;
	background-color: var(--nv-mm-rouge);
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
	white-space: nowrap;
	text-decoration: none !important;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
	transition: color .15s cubic-bezier(.4, 0, .2, 1), background-color .15s cubic-bezier(.4, 0, .2, 1), border-color .15s cubic-bezier(.4, 0, .2, 1);
}
.nv-mm-intro .nv-mm-stats + .nv-mm-cta { margin-top: 24px; }
.nv-mm-cta svg { width: 16px; height: 16px; flex: none; }
.nv-mm-cta:hover { background-color: rgba(226, 6, 19, .9); }

/* ---- Grille des catégories ---- */
.nv-mm-zone {
	min-width: 0;
	max-height: calc(100vh - var(--nv-mm-haut) - 80px);
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 2px;
	scrollbar-width: thin;
}

.nv-mm-grille {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.nv-mm-grille--courte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nv-mm-item { margin: 0; padding: 0; list-style: none; }
.nv-mm-item::before, .nv-mm-item::marker { content: none; }

.nv-mm-carte {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 100%;
	padding: 12px 14px 12px 12px;
	border: 1px solid var(--nv-mm-filet);
	border-radius: 16px;
	background: #fff;
	color: var(--nv-mm-encre) !important;
	text-decoration: none !important;
	transition: border-color .2s ease, box-shadow .2s ease;
}
/* Survol sans zoom ni déplacement : seuls le filet, l'ombre et les couleurs changent. */
.nv-mm-carte:hover {
	border-color: rgba(226, 6, 19, .35);
	box-shadow: 0 16px 30px -24px rgba(226, 6, 19, .14);
}
.nv-mm-carte:focus-visible,
.nv-mm-retour:focus-visible,
.nv-mm-fil-lien:focus-visible,
.nv-mm-cta:focus-visible {
	outline: 2px solid var(--nv-mm-rouge);
	outline-offset: 2px;
}

.nv-mm-vignette {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 12px;
	background: var(--nv-mm-fond);
	overflow: hidden;
}
.nv-mm-vignette img {
	width: 100%;
	height: 100%;
	padding: 6px;
	object-fit: contain;
	mix-blend-mode: multiply;
}
.nv-mm-vignette--vide { background: var(--nv-mm-rouge-voile); color: var(--nv-mm-rouge); }
.nv-mm-vignette--vide svg { width: 26px; height: 26px; }

.nv-mm-corps {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.nv-mm-nom {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.3;
	transition: color .15s ease;
}
.nv-mm-carte:hover .nv-mm-nom { color: var(--nv-mm-rouge); }
.nv-mm-meta {
	color: var(--nv-mm-gris);
	font-size: 12.5px;
	line-height: 1.3;
}

.nv-mm-action {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	background: var(--nv-mm-fond);
	color: var(--nv-mm-encre);
	transition: background-color .2s ease, color .2s ease;
}
.nv-mm-action svg { width: 16px; height: 16px; }
.nv-mm-carte:hover .nv-mm-action {
	background: var(--nv-mm-rouge);
	color: #fff;
}

/* ---- Changement de niveau ---- */
@keyframes nv-mm-entree-avant {
	from { opacity: 0; transform: translateX(18px); }
	to   { opacity: 1; transform: none; }
}
@keyframes nv-mm-entree-arriere {
	from { opacity: 0; transform: translateX(-18px); }
	to   { opacity: 1; transform: none; }
}
.nv-mm-avant .nv-mm-grille,
.nv-mm-avant .nv-mm-titre,
.nv-mm-avant .nv-mm-texte { animation: nv-mm-entree-avant .26s cubic-bezier(.2, .7, .2, 1) both; }
.nv-mm-arriere .nv-mm-grille,
.nv-mm-arriere .nv-mm-titre,
.nv-mm-arriere .nv-mm-texte { animation: nv-mm-entree-arriere .26s cubic-bezier(.2, .7, .2, 1) both; }

/* ---- Lien « Nos produits » pendant l'ouverture ---- */
.nv-mm-lien-actif { color: #E20613 !important; }

/* ---- Écrans intermédiaires ---- */
@media (max-width: 1279px) {
	.nv-mm-interieur { grid-template-columns: 250px 1fr; gap: 24px; }
	.nv-mm-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nv-mm-titre { font-size: 22px; }
}

/* Le méga menu est réservé au bureau : sur mobile, le menu existant prend le relais. */
@media (max-width: 1023px) {
	.nv-mm { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.nv-mm,
	.nv-mm-carte,
	.nv-mm-vignette img,
	.nv-mm-action { transition: none; }
	.nv-mm-avant .nv-mm-grille, .nv-mm-avant .nv-mm-titre, .nv-mm-avant .nv-mm-texte,
	.nv-mm-arriere .nv-mm-grille, .nv-mm-arriere .nv-mm-titre, .nv-mm-arriere .nv-mm-texte { animation: none; }
}

/* ---- Premier niveau : cartes plus généreuses ---- */
.nv-mm-grille--racine { gap: 14px; }
.nv-mm-grille--racine .nv-mm-carte { padding: 16px 18px 16px 16px; gap: 16px; }
.nv-mm-grille--racine .nv-mm-vignette { width: 76px; height: 76px; border-radius: 14px; }
.nv-mm-grille--racine .nv-mm-nom { font-size: 15.5px; }

/* ---- Chevron ajouté au lien « Nos produits » ---- */
.nv-mm-chevron {
	flex: none;
	width: 16px;
	height: 16px;
	transition: transform .2s ease;
}
.nv-mm-lien-actif .nv-mm-chevron { transform: rotate(180deg); }

/* ---- Sans colonne latérale (demande client) ----
   Les cartes occupent toute la largeur. Dans une catégorie, une barre fine
   au-dessus des cartes porte Retour, le fil d'ariane et « Voir tous les produits ». */
.nv-mm .nv-mm-interieur { grid-template-columns: minmax(0, 1fr) !important; gap: 0 !important; }
.nv-mm .nv-mm-intro {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	min-height: 0;
	margin: 0 0 18px;
	padding: 0 0 14px;
	border: 0;
	border-bottom: 1px solid var(--nv-mm-filet);
	border-radius: 0;
	background: none;
	overflow: visible;
}
.nv-mm .nv-mm-intro[hidden] { display: none; }
.nv-mm .nv-mm-intro .nv-mm-retour { margin: 0; }
.nv-mm .nv-mm-intro .nv-mm-fil { margin: 0; font-size: 13px; }
.nv-mm-tout {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	color: var(--nv-mm-rouge) !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
}
.nv-mm-tout svg { width: 16px; height: 16px; }
.nv-mm-tout:hover { text-decoration: underline !important; }
.nv-mm-tout:focus-visible { outline: 2px solid var(--nv-mm-rouge); outline-offset: 2px; border-radius: 4px; }
.nv-mm .nv-mm-grille,
.nv-mm .nv-mm-grille--courte { grid-template-columns: repeat(3, minmax(0, 1fr)); }
