/**
 * Mega Menu — Delta Trailers
 *
 * Structure :
 * .dt-mega-menu-parent — item parent avec mega menu
 *   .dt-mega-panel — panneau pleine largeur
 *     .dt-mega-inner — conteneur flex
 *       .dt-mega-title — titre parent (gauche)
 *       .dt-mega-links — colonnes de liens (centre)
 *       .dt-mega-product — produit aléatoire (droite)
 */

/* Panneau mega menu */
.dt-mega-menu-parent {
	position: static !important;
}

.dt-mega-panel {
	position: absolute;
	left: 0;
	right: 0;
	width: 100%;
	background-color: var(--dt-gris-fonce);
	z-index: 9999;
	padding: 60px 0 40px;
	min-height: 50vh;
	opacity: 0;
	visibility: hidden;
	-webkit-transform: translateY(-100%);
	transform: translateY(-100%);
	-webkit-transition: -webkit-transform 0.3s ease, opacity 0.15s ease, visibility 0s 0.3s;
	transition: transform 0.3s ease, opacity 0.15s ease, visibility 0s 0.3s;
	pointer-events: none;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

.dt-mega-menu-parent.dt-mega-open > .dt-mega-panel {
	-webkit-transform: translateY(0);
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	-webkit-transition: -webkit-transform 0.4s ease, opacity 0.3s ease, visibility 0s 0s;
	transition: transform 0.4s ease, opacity 0.3s ease, visibility 0s 0s;
}

/* Conteneur flex — aligné avec le container Divi */
.dt-mega-inner {
	display: flex;
	align-items: stretch;
	width: 100%;
	margin: 0;
	padding: 0;
	gap: 60px;
	min-height: inherit;
}

/* Titre parent */
.dt-mega-title {
	flex: 0 0 300px;
	display: flex;
	align-items: flex-start;
}

.dt-mega-title span {
	font-size: 22px;
	font-weight: 400;
	color: #ffffff;
	letter-spacing: 1px;
	text-transform: uppercase;
}

/* Colonnes de liens */
.dt-mega-links {
	flex: 1;
	display: flex;
	gap: 80px;
	padding-top: 10px;
}

.dt-mega-column {
	display: flex;
	align-items: flex-start;
	text-align: left;
	flex-direction: column;
	gap: 36px;
}

.dt-mega-column a {
	color: #d0d0d0 !important;
	text-decoration: none !important;
	font-size: 18px !important;
	font-weight: 400 !important;
	text-transform: none !important;
	transition: color 0.2s ease;
	white-space: nowrap;
}

.dt-mega-column a:hover {
	color: #ffffff !important;
}


/* Produit — collé à droite, colle haut et bas, cliquable */
a.dt-mega-product {
	flex: 0 0 330px;
	background-color: #ffffff;
	border-radius: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-self: stretch;
	margin: -60px 0 -40px;
	cursor: pointer;
	text-align: left;
	text-decoration: none;
	color: inherit;
}

.dt-mega-product-img {
	overflow: hidden;
}

.dt-mega-product-img img {
	width: 100%;
	height: 260px;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.dt-mega-product:hover .dt-mega-product-img img {
	transform: scale(1.1);
}

.dt-mega-product-content {
	padding: 30px 10px 5px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.dt-mega-product-info {
	padding: 0 30px 0 50px;
}

.dt-mega-product-info p.dt-mega-product-title {
	font-size: 18px;
	font-weight: 600;
	color: #333333;
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
	margin: 0 0 12px;
	text-transform: uppercase;
}

.dt-mega-product-info p {
	font-size: 14px;
	font-weight: 300;
	color: #666666;
	margin: 0;
	line-height: 1.5;
}

.dt-mega-product-link {
	display: block;
	margin-top: auto;
	color: var(--dt-rouge);
	line-height: 0;
}

.dt-mega-product-link svg {
	width: 101px;
	height: 101px;
	color: var(--dt-rouge);
	fill: var(--dt-rouge);
	transition: transform 0.3s ease;
}

.dt-mega-product:hover .dt-mega-product-link svg {
	transform: translateY(-20px);
}

/* Override Divi — forcer le mega panel en pleine largeur */
#main-header .dt-mega-panel,
#et-top-navigation .dt-mega-panel {
	position: absolute;
	left: 0;
	right: 0;
	width: 100vw;
	margin-left: calc(-50vw + 50%);
}

/* Cacher le sous-menu Divi par défaut sur les mega menus */
.dt-mega-menu-parent > .sub-menu {
	display: none !important;
}

/* Responsive — masquer le mega menu en mobile */
@media (max-width: 980px) {
	.dt-mega-panel {
		display: none !important;
	}

	.dt-mega-menu-parent > .sub-menu {
		display: block !important;
	}
}
