body.home {
	#grille-metiers {
		margin-top: -200px;
		grid-template-columns: repeat(2, 1fr) 1.2fr 2fr 4.5fr 2fr 3.4fr 1.9fr 2.5fr 3fr;
		grid-template-rows: 0.8fr 0.8fr 0.1fr 1.2fr 1.2fr;
		.div1 {
			grid-area: 1 / 1 / 2 / 4;
		}
		.div2 {
			grid-area: 2 / 1 / 3 / 4;
		}
		.div3 {
			grid-area: 1 / 4 / 4 / 6;
		}
		.div4 {
			grid-area: 1 / 6 / 3 / 8;
		}
		.div5 {
			grid-area: 2 / 8 / 3 / 11;
		}
		.div6 {
			grid-area: 4 / 3 / 5 / 6;
		}
		.div7 {
			grid-area: 3 / 6 / 5 / 9;
		}
		.div8 {
			grid-area: 4 / 9 / 5 / 11;
		}
		.div9 {
			grid-area: 5 / 2 / 6 / 5;
		}
		.div10 {
			grid-area: 5 / 5 / 6 / 7;
		}
		.div11 {
			grid-area: 5 / 7 / 6 / 8;
		}
		.div12 {
			grid-area: 5 / 8 / 6 / 11;
		}
	}
}

#grille-metiers {
	z-index: 10;
	position: relative;
	display: grid;
	grid-column-gap: 20px;
	grid-row-gap: 20px;
	margin-bottom: 50px;

	grid-template-columns: 1fr 0.5fr 1fr 2fr repeat(5, 1fr);
	grid-template-rows: repeat(3, 1fr) repeat(2, 2fr);

	.div1 {
		grid-area: 1 / 3 / 4 / 5;
	}
	.div2 {
		grid-area: 1 / 5 / 3 / 7;
	}
	.div3 {
		grid-area: 2 / 7 / 4 / 10;
	}
	.div4 {
		grid-area: 4 / 2 / 5 / 5;
	}
	.div5 {
		grid-area: 3 / 5 / 5 / 7;
	}
	.div6 {
		grid-area: 4 / 7 / 5 / 9;
	}
	.div7 {
		grid-area: 5 / 1 / 6 / 4;
	}
	.div8 {
		grid-area: 5 / 4 / 6 / 6;
	}
	.div9 {
		grid-area: 5 / 6 / 6 / 8;
	}
	.div10 {
		grid-area: 5 / 8 / 6 / 10;
	}
	.div11 {
		grid-area: 6 / 2 / 8 / 6;
	}
}

.grille-metiers__item {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	background-color: var(--wp--preset--color--blanc);
	border-radius: 30px;
	padding: 16px;
	transition: transform 0.3s ease;
	text-decoration: none;
	color: inherit;

	&.lastline {
		//height: 100px;
	}

	&.lastline .grille-metiers__item__content {
		//display: none;
	}
}

/* Style des éléments */

.grille-metiers__item.chiffre {
	background-color: var(--wp--preset--color--third);
	color: var(--wp--preset--color--blanc);
}

.grille-metiers__item.chiffre h2 {
	padding-right: 10px;
	padding-top: 0px;
	color: var(--wp--preset--color--blanc);
	&:before {
		display: none;
	}
}
.grille-metiers__item h2 {
	font-size: 20px;
	font-weight: 500;
	margin: 0;
	color: var(--wp--preset--color--primary);
	position: relative;
	padding-right: 20px;
	padding-top: 30px;
	line-height: normal;

	&::before {
		content: "";
		display: block;
		width: 28px;
		height: 28px;
		background-color: var(--wp--preset--color--secondary);
		background-image: url(../../assets/images/fleche_blanche.svg);
		background-position: center center;
		background-size: 11px;
		background-repeat: no-repeat;
		position: absolute;
		top: 0;
		right: 0;
		border-radius: 50%;
		transition: transform 0.3s ease;
	}
}

.grille-metiers__item__content {
	font-size: 14px;
	flex-grow: 1;
	font-weight: var(--wp--custom--font-weight--light);
}

/* Hover effect */
.grille-metiers__item:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
	cursor: pointer;

	h2:before {
		transform: rotate(90deg);
	}
}

/* Responsive */
@media (max-width: 1024px) {
	.grille-metiers {
		grid-template-columns: repeat(8, 1fr);
	}

	.grid-item--width3 {
		grid-column: span 4;
	}
	.grid-item--width2 {
		grid-column: span 4;
	}
	.grid-item--width1 {
		grid-column: span 4;
	}
}

@media (max-width: 768px) {
	body.home #grille-metiers {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto;
		gap: 15px;
		margin-top: 2rem;

		.div1 {
			grid-column: 1 / 2;
			grid-row: 1;
		}

		.div2 {
			grid-column: 2 / 3;
			grid-row: 1;
		}

		.div3,
		.div4,
		.div5,
		.div6,
		.div7,
		.div8,
		.div9,
		.div10,
		.div11,
		.div12 {
			grid-column: span 2;
			grid-row: auto;
		}

		.metier {
			&.lastline {
				height: initial;
			}

			h2 {
				padding-top: 0px;
			}
			.grille-metiers__item__content {
				display: none;
			}
		}
	}

	#grille-metiers {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		gap: 15px;
		margin-top: 2rem;

		.div1,
		.div2,
		.div3,
		.div4,
		.div5,
		.div6,
		.div7,
		.div8,
		.div9,
		.div10,
		.div11,
		.div12 {
			grid-column: span 2;
			grid-row: auto;
		}
	}
}

/* Style spécial pour les stats */
.grille-metiers__item.stat {
	background-color: var(--wp--preset--color--third);
	color: var(--wp--preset--color--blanc);
}

.grille-metiers__item.stat h2 {
	font-size: var(--wp--preset--font-size--xl);
	color: var(--wp--preset--color--blanc);
}

/* Alignements Gutenberg */
.wp-bloc-grille-metiers {
	margin-left: auto;
	margin-right: auto;
}

.wp-bloc-grille-metiers.alignwide {
	max-width: var(--wp--style--global--wide-size);
}

.wp-bloc-grille-metiers.alignfull {
	max-width: none;
	width: 100%;
}

/* Si le bloc n'a pas d'alignement spécifique */
.wp-bloc-grille-metiers:not(.alignwide):not(.alignfull) {
	max-width: var(--wp--style--global--content-size);
}
