/* Section "doc-domaines" (sections/doc-domaines.php, prefix dd-). Loaded in the <head> by hec_enqueue_section_styles(), or inline by hec_section_style() (functions.php). */
.dd-root {
	position: relative;
	isolation: isolate;
	overflow: clip;
	padding-block: clamp(4.5rem, 2.6rem + 7.6vw, 8rem);
	background: var(--c-ivoire-100);
	color: var(--c-cacao-900);
	font-family: var(--f-sans);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}
.dd-root .dd-halo--a { top: -10rem; right: -13.75rem; width: min(42.5rem, 140vw); }
.dd-root .dd-halo--b { bottom: -13.75rem; left: -16.25rem; width: min(37.5rem, 130vw); opacity: 0.8; }
.dd-inner { max-width: var(--container); margin-inline: auto; padding-inline: var(--space-gutter); }

/* Head: label and title on the left, intro on the right (desktop) */
.dd-head {
	display: grid;
	gap: var(--space-5) var(--space-8);
	margin-bottom: clamp(3rem, 2rem + 3vw, 4.5rem);
}
.dd-root .dd-title {
	max-width: 13em;
	margin: 0;
	color: var(--c-cacao-900);
	font-family: var(--f-serif);
	font-size: var(--fs-title);
	font-weight: var(--fw-title);
	font-variation-settings: "opsz" 144, "SOFT" 100;
	line-height: var(--lh-title);
	letter-spacing: var(--ls-title);
	text-wrap: balance;
}
.dd-title-em { color: var(--c-brun-500); font-style: italic; font-weight: 400; }
.dd-intro { max-width: 42rem; margin: 0; color: var(--c-cacao-700); text-wrap: pretty; } /* wide, fewer lines (client, 2026-11-26; was 28em) */

/* Arch cards on paper */
.dd-root .dd-grid {
	display: grid;
	gap: 3.5rem 3rem;
	max-width: 26rem;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}
.dd-card {
	position: relative;
	isolation: isolate;
	overflow: hidden; /* keeps the watermark inside the card's rounded shape */
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 0;
	padding: 0.875rem 0.875rem 2.25rem;
	border-radius: 999px 999px 2rem 2rem;
	background: var(--c-lin-200);
	text-align: center;
	transition: translate 0.5s var(--ease-doux), box-shadow 0.5s var(--ease-doux);
}
.dd-card:hover {
	translate: 0 -6px;
	box-shadow: var(--shadow-md);
}
.dd-card::before { /* watermark (client, 2026-11-26): the logo's crescent in mustard, cut by the bottom corner, behind the text */
	content: "";
	position: absolute;
	z-index: -1;
	right: -30%;
	bottom: -18%;
	width: 95%;
	aspect-ratio: 732 / 788;
	background: var(--c-ambre-500);
	-webkit-mask: url("../../img/watermark-arc-mask.svg") center / contain no-repeat;
	mask: url("../../img/watermark-arc-mask.svg") center / contain no-repeat;
	opacity: 0.3;
	rotate: -14deg;
	transition: rotate 1.2s var(--ease-doux);
	pointer-events: none;
}
.dd-card:nth-child(2)::before { right: auto; left: -30%; scale: -1 1; rotate: 14deg; } /* mirrored on the middle card */
.dd-card:hover::before { rotate: -4deg; }
.dd-card:nth-child(2):hover::before { rotate: 4deg; }
.dd-media {
	position: relative;
	width: 100%;
}
.dd-frame { /* the photo in its arch; the photo grows a little inside on hover */
	overflow: hidden;
	border-radius: 999px 999px 1.375rem 1.375rem;
}
.dd-root .dd-img { /* .dd-root needed: Elementor's ".elementor img" forces height: auto */
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 5 / 6;
	object-fit: cover;
	border-radius: 0;
	transition: scale 0.9s var(--ease-doux);
}
.dd-card:hover .dd-img { scale: 1.05; }
.dd-line { /* thin mustard frame inside the photo (client, 2026-11-26; was ivory) */
	position: absolute;
	inset: 0.875rem;
	border: 1px solid var(--c-ambre-500);
	border-radius: 999px 999px 0.875rem 0.875rem;
	pointer-events: none;
}
.dd-num { /* dark disc with the roman numeral, sitting on the bottom edge of the photo */
	position: absolute;
	bottom: -2rem;
	left: 50%;
	display: grid;
	place-items: center;
	width: 4rem;
	height: 4rem;
	margin-left: -2rem;
	border-radius: 50%;
	background: var(--c-dark);
	box-shadow: 0 0 0 0.5rem var(--c-lin-200);
	color: var(--c-ambre-500);
	font-family: var(--f-serif);
	font-size: 1.375rem;
	font-style: italic;
	line-height: 1;
	transition: rotate 0.6s var(--ease-doux);
}
.dd-card:hover .dd-num { rotate: -12deg; }
.dd-root .dd-card-title {
	margin: 3.625rem 0 0;
	color: var(--c-cacao-900);
	font-family: var(--f-serif);
	font-size: clamp(1.625rem, 1.5rem + 0.5vw, 1.875rem);
	font-weight: 400;
	font-variation-settings: "opsz" 72, "SOFT" 100;
	line-height: 1.1;
	letter-spacing: -0.01em;
	text-wrap: balance;
}
.dd-card-em { color: var(--c-brun-500); font-style: italic; }
.dd-text { flex: 1; max-width: 21em; margin: var(--space-4) 0 var(--space-6); color: var(--c-cacao-700); }
.dd-root .dd-btn { margin-top: auto; }

@media (min-width: 1024px) {
	.dd-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: end; } /* the intro starts near the middle */
	.dd-head--solo { grid-template-columns: minmax(0, 1fr); }
	.dd-root .dd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
	.dd-card, .dd-card::before, .dd-img, .dd-num { transition: none; }
	.dd-card:hover { translate: none; }
	.dd-card:hover .dd-img { scale: none; }
	.dd-card:hover .dd-num { rotate: none; }
}
