/* ==========================================================================
   Shared section CSS. Sections are self-contained, so keep this for the few
   things truly shared across sections. Use tokens only; never style bare tags
   (the site base below is the one exception).
   ========================================================================== */

/* Site base: ivory page, cocoa ink, Inter Tight (overrides Hello's reset.css body). */
body {
	background-color: var(--c-ivoire-100);
	color: var(--c-cacao-900);
	font-family: var(--f-sans);
}

/* Anchor links land below the sticky header. */
html {
	scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* --------------------------------------------------------------------------
   Button (shared component, printed by hec_button() in functions.php).
   A pill with a round icon badge on the right. On hover or keyboard focus, the
   badge's colour spreads from the badge over the whole button, the label and
   the badge swap colours, and the arrow turns from diagonal to straight.
   Each variant only sets the eight --hb-* colours.
   Selectors are written a.hec-btn.hec-btn on purpose: Elementor's ".elementor a" rules load after this
   file and would otherwise win (they reset box-shadow, and a kit can set link colours).
   -------------------------------------------------------------------------- */
a.hec-btn.hec-btn {
	--hb-h: 3.5rem;                          /* button height: 56px, as in the canvas (2026-11-26) */
	--hb-badge: 2.625rem;                    /* badge diameter: 42px */
	--hb-bg: var(--c-btn);
	--hb-fg: var(--c-on-brand);
	--hb-border: transparent;
	--hb-badge-bg: var(--c-ambre-500);
	--hb-badge-fg: var(--c-on-accent);
	--hb-fill: var(--c-ambre-500);           /* colour that spreads on hover */
	--hb-fg-hover: var(--c-on-accent);
	--hb-badge-bg-hover: var(--c-btn);
	--hb-badge-fg-hover: var(--c-on-brand);
	--hb-g: url(#hec3-g2) var(--c-brun-500);       /* 3D glyph of the badge: face and thickness, */
	--hb-gs: url(#hec3-g2s) var(--c-cacao-900);    /* cacao on mustard or ivory */
	--hb-g-hover: url(#hec3-c1) var(--c-ivoire-100); /* cream on brown or dark */
	--hb-gs-hover: url(#hec3-c1s) var(--c-lin-300);
	position: relative;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.875rem;
	height: var(--hb-h);
	padding: 0 calc((var(--hb-h) - var(--hb-badge)) / 2) 0 1.625rem;
	overflow: hidden;
	border-radius: var(--radius-pill);
	background: var(--hb-bg);
	box-shadow: inset 0 0 0 1.5px var(--hb-border);
	color: var(--hb-fg);
	font-family: var(--f-sans);
	font-size: var(--fs-ui);
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.005em;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.35s;
}
a.hec-btn.hec-btn::before { /* the disc that grows from behind the badge */
	content: "";
	position: absolute;
	top: 50%;
	right: calc((var(--hb-h) - var(--hb-badge)) / 2);
	z-index: -1;
	width: var(--hb-badge);
	height: var(--hb-badge);
	margin-top: calc(var(--hb-badge) / -2);
	border-radius: 50%;
	background: var(--hb-fill);
	transform: scale(0);
	transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
a.hec-btn.hec-btn:hover,
a.hec-btn.hec-btn:focus-visible {
	color: var(--hb-fg-hover);
}
a.hec-btn.hec-btn:hover::before,
a.hec-btn.hec-btn:focus-visible::before {
	transform: scale(20);
}
a.hec-btn.hec-btn:focus-visible {
	outline: 2px solid var(--c-focus);
	outline-offset: 3px;
}
.hec-btn-label {
	position: relative;
}
.hec-btn-badge {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: var(--hb-badge);
	height: var(--hb-badge);
	border-radius: 50%;
	background: var(--hb-badge-bg);
	color: var(--hb-badge-fg);
	transition: background-color 0.35s, color 0.35s;
}
a.hec-btn.hec-btn:hover .hec-btn-badge,
a.hec-btn.hec-btn:focus-visible .hec-btn-badge {
	background: var(--hb-badge-bg-hover);
	color: var(--hb-badge-fg-hover);
}
.hec-btn-icon {
	width: 1.0625rem;
	height: 1.0625rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.35s;
}
.hec-btn-icon--arrow { /* diagonal at rest, straight on hover */
	transform: rotate(-45deg);
}
a.hec-btn.hec-btn:hover .hec-btn-icon--arrow,
a.hec-btn.hec-btn:focus-visible .hec-btn-icon--arrow {
	transform: rotate(0deg);
}
a.hec-btn.hec-btn:hover .hec-btn-icon:not(.hec-btn-icon--arrow),
a.hec-btn.hec-btn:focus-visible .hec-btn-icon:not(.hec-btn-icon--arrow) {
	transform: scale(1.12);
}
/* The badge glyph is a 3D pictogram (hec_icon "btn-*", client 2026-11-27: the line icons looked
   foreign next to the 3D pictograms). Its volume takes the --hb-g colours of the variant, its
   holes the badge colour; both swap with the badge on hover. */
.hec3.hec-btn-icon {
	width: 1.3125rem;
	height: 1.3125rem;
	stroke: none;
	filter: drop-shadow(0 1px 1px color-mix(in srgb, var(--c-cacao-900) 30%, transparent));
}
.hec-btn-badge .hec3-p2 { fill: var(--hb-g); stroke: var(--hb-g); }
.hec-btn-badge .hec3-s2 { fill: var(--hb-gs); stroke: var(--hb-gs); }
.hec-btn-badge .hec3-h { fill: var(--hb-badge-bg); transition: fill 0.35s; }
a.hec-btn.hec-btn:hover .hec-btn-badge .hec3-p2,
a.hec-btn.hec-btn:focus-visible .hec-btn-badge .hec3-p2 { fill: var(--hb-g-hover); stroke: var(--hb-g-hover); }
a.hec-btn.hec-btn:hover .hec-btn-badge .hec3-s2,
a.hec-btn.hec-btn:focus-visible .hec-btn-badge .hec3-s2 { fill: var(--hb-gs-hover); stroke: var(--hb-gs-hover); }
a.hec-btn.hec-btn:hover .hec-btn-badge .hec3-h,
a.hec-btn.hec-btn:focus-visible .hec-btn-badge .hec3-h { fill: var(--hb-badge-bg-hover); }

/* Variants */
a.hec-btn.hec-btn.hec-btn--secondary { /* outline, on light backgrounds */
	--hb-bg: transparent;
	--hb-fg: var(--c-btn);
	--hb-border: var(--c-btn);
	--hb-badge-bg: var(--c-btn);
	--hb-badge-fg: var(--c-on-brand);
	--hb-fill: var(--c-btn);
	--hb-fg-hover: var(--c-on-brand);
	--hb-badge-bg-hover: var(--c-ambre-500);
	--hb-badge-fg-hover: var(--c-on-accent);
	--hb-g: url(#hec3-c1) var(--c-ivoire-100);
	--hb-gs: url(#hec3-c1s) var(--c-lin-300);
	--hb-g-hover: url(#hec3-g2) var(--c-brun-500);
	--hb-gs-hover: url(#hec3-g2s) var(--c-cacao-900);
}
a.hec-btn.hec-btn.hec-btn--accent { /* mustard: reserved for "Appeler le cabinet" */
	--hb-bg: var(--c-ambre-500);
	--hb-fg: var(--c-on-accent);
	--hb-badge-bg: var(--c-dark);
	--hb-badge-fg: var(--c-ambre-500);
	--hb-fill: var(--c-btn);
	--hb-fg-hover: var(--c-on-brand);
	--hb-badge-bg-hover: var(--c-ambre-500);
	--hb-badge-fg-hover: var(--c-on-accent);
	--hb-g: url(#hec3-g1) var(--c-ambre-500);      /* mustard glyph on the dark badge */
	--hb-gs: url(#hec3-g1s) var(--c-ambre-700);
	--hb-g-hover: url(#hec3-g2) var(--c-brun-500);
	--hb-gs-hover: url(#hec3-g2s) var(--c-cacao-900);
}
a.hec-btn.hec-btn.hec-btn--light { /* ivory: main action on dark backgrounds */
	--hb-bg: var(--c-ivoire-100);
	--hb-fg: var(--c-dark);
	--hb-badge-bg: var(--c-ambre-500);
	--hb-badge-fg: var(--c-on-accent);
	--hb-fill: var(--c-ambre-500);
	--hb-fg-hover: var(--c-on-accent);
	--hb-badge-bg-hover: var(--c-dark);
	--hb-badge-fg-hover: var(--c-ivoire-100);
}
a.hec-btn.hec-btn.hec-btn--ghost { /* outline, on dark backgrounds */
	--hb-bg: transparent;
	--hb-fg: var(--c-ivoire-100);
	--hb-border: var(--c-on-dark-muted);
	--hb-badge-bg: var(--c-ivoire-100);
	--hb-badge-fg: var(--c-dark);
	--hb-fill: var(--c-ivoire-100);
	--hb-fg-hover: var(--c-dark);
	--hb-badge-bg-hover: var(--c-ambre-500);
	--hb-badge-fg-hover: var(--c-on-accent);
	--hb-g-hover: url(#hec3-g2) var(--c-brun-500); /* the badge stays light: cacao glyph */
	--hb-gs-hover: url(#hec3-g2s) var(--c-cacao-900);
}

/* Links of the canvas, printed by hec_button() too, so every action keeps one component.
   text: label with a 1px underline and a small arrow (secondary actions: "Découvrir le centre").
   link: label followed by a round brown badge (card links: "En savoir plus"). */
a.hec-btn.hec-btn.hec-btn--text,
a.hec-btn.hec-btn.hec-btn--link {
	--hb-fg: var(--c-cacao-900);
	--hb-fg-hover: var(--c-btn);
	height: auto;
	overflow: visible;
	border-radius: 0;
	background: none;
	box-shadow: none;
}
a.hec-btn.hec-btn.hec-btn--text { /* 48px touch target; the underline sits 4px under the label */
	gap: 0.625rem;
	padding: 1rem 0;
}
a.hec-btn.hec-btn.hec-btn--text::before,
a.hec-btn.hec-btn.hec-btn--text::after { /* the underline, and a mustard one that draws over it on hover */
	content: "";
	position: absolute;
	top: auto;
	right: 0;
	bottom: 0.75rem;
	left: 0;
	z-index: 0;
	width: auto;
	height: 1px;
	margin: 0;
	border-radius: 0;
	background: currentColor;
	transform: none;
	transition: none;
}
a.hec-btn.hec-btn.hec-btn--text::after {
	height: 2px;
	background: var(--c-ambre-500);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.5s var(--ease-doux);
}
a.hec-btn.hec-btn.hec-btn--text:hover::after,
a.hec-btn.hec-btn.hec-btn--text:focus-visible::after {
	transform: scaleX(1);
}
a.hec-btn.hec-btn.hec-btn--text .hec-btn-badge {
	width: auto;
	height: auto;
	background: none;
	color: inherit;
}
a.hec-btn.hec-btn.hec-btn--text .hec-btn-icon {
	width: 1rem;
	height: 1rem;
}
a.hec-btn.hec-btn.hec-btn--link {
	--hb-badge: 2.5rem;
	--hb-badge-bg: var(--c-btn);
	--hb-badge-fg: var(--c-on-brand);
	--hb-badge-bg-hover: var(--c-ambre-500);
	--hb-badge-fg-hover: var(--c-on-accent);
	--hb-g: url(#hec3-c1) var(--c-ivoire-100);
	--hb-gs: url(#hec3-c1s) var(--c-lin-300);
	--hb-g-hover: url(#hec3-g2) var(--c-brun-500);
	--hb-gs-hover: url(#hec3-g2s) var(--c-cacao-900);
	gap: 0.75rem;
	padding: 0.25rem 0; /* 48px touch target */
}
a.hec-btn.hec-btn.hec-btn--link::before {
	display: none;
}
a.hec-btn.hec-btn.hec-btn--link .hec-btn-icon {
	width: 0.875rem;
	height: 0.875rem;
}
a.hec-btn.hec-btn.hec-btn--link .hec3.hec-btn-icon,
a.hec-btn.hec-btn.hec-btn--sm .hec3.hec-btn-icon {
	width: 1.125rem;
	height: 1.125rem;
}

/* Sizes. Every label has the same size, a phone number too (client, 2026-11-27: the larger
   "tel" size made the digits bigger than the button beside it; removed). */
a.hec-btn.hec-btn.hec-btn--sm { /* header bar: 48px, as in the canvas */
	--hb-h: 3rem;
	--hb-badge: 2.25rem;
	padding-left: 1.375rem;
}

@media (prefers-reduced-motion: reduce) {
	a.hec-btn.hec-btn,
	a.hec-btn.hec-btn::before,
	a.hec-btn.hec-btn::after,
	.hec-btn-badge,
	.hec-btn-icon {
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   3D pictograms (shared, printed by hec_icon() in functions.php; client 2026-11-27).
   Each volume (p1 mustard, p2 cacao) is drawn twice: a darker copy shifted down (its
   thickness), then the face shaded from the top left. The gradients are printed once per
   page by hec_icon_defs(). No chip or frame around them (client, 2026-11-27).
   Tone "dark" (on a dark band): the cacao volumes turn cream so they stay visible.
   The stroke of p1/p2 is 0 by default; a shape with style="stroke-width" gets rounded corners.
   -------------------------------------------------------------------------- */
.hec3 {
	flex-shrink: 0;
	overflow: visible;
	filter: drop-shadow(0 2px 2px color-mix(in srgb, var(--c-cacao-900) 30%, transparent));
	transition: transform 0.5s var(--ease-doux);
}
.hec3 g { stroke-linecap: round; stroke-linejoin: round; }
.hec3-p1 { fill: url(#hec3-g1); stroke: url(#hec3-g1); stroke-width: 0; }
.hec3-s1 { fill: url(#hec3-g1s); stroke: url(#hec3-g1s); stroke-width: 0; }
.hec3-p2 { fill: url(#hec3-g2); stroke: url(#hec3-g2); stroke-width: 0; }
.hec3-s2 { fill: url(#hec3-g2s); stroke: url(#hec3-g2s); stroke-width: 0; }
.hec3-v { fill: url(#hec3-gv); }
.hec3-i { fill: url(#hec3-gi); }
.hec3-d { fill: var(--c-cacao-900); }
.hec3-k { fill: none; stroke: var(--c-cacao-900); stroke-width: 1.6; }
.hec3-kw { fill: none; stroke: var(--c-ivoire-50); stroke-width: 1.6; }
.hec3-f { fill: var(--c-cacao-900); opacity: 0.14; }
.hec3-a { fill: var(--c-ivoire-50); }
.hec3-c { fill: var(--c-brun-500); opacity: 0.35; }
.hec3-hl { fill: url(#hec3-gl); }
.hec3-h { fill: var(--c-ivoire-50); } /* holes; in a button badge: the badge colour */
.hec3--dark .hec3-p2 { fill: url(#hec3-c1); stroke: url(#hec3-c1); }
.hec3--dark .hec3-s2 { fill: url(#hec3-c1s); stroke: url(#hec3-c1s); }
.hec3--dark .hec3-kw { stroke: var(--c-cacao-900); }

/* A card with class hec-pop lifts its pictogram on hover. */
.hec-pop:hover .hec3,
.hec-pop:focus-visible .hec3 {
	transform: translateY(-2px) rotate(-6deg) scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
	.hec3 { transition: none; }
	.hec-pop:hover .hec3,
	.hec-pop:focus-visible .hec3 { transform: none; }
}

/* --------------------------------------------------------------------------
   Photo viewer (shared, printed by hec_lightbox() in functions.php, script in
   assets/js/lightbox.js): full screen on the dark colour, counter and zoom buttons on
   top, the photo in the middle, arrows on the sides (under the photo on phones), the
   caption below.
   -------------------------------------------------------------------------- */
html[data-hec-lb-open] { overflow: hidden; }
.hec-lb {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: color-mix(in srgb, var(--c-dark) 97%, transparent);
	color: var(--c-ivoire-100);
	font-family: var(--f-sans);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}
.hec-lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.hec-lb::backdrop { background: rgb(31 18 11 / 0.6); } /* --c-dark; ::backdrop does not see the tokens in older browsers */
.hec-lb-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) var(--space-gutter); }
.hec-lb .hec-lb-count { margin: 0; color: var(--c-on-dark-muted); font-size: var(--fs-index); font-weight: 600; letter-spacing: 0.16em; font-variant-numeric: tabular-nums; }
.hec-lb-tools { display: flex; gap: var(--space-2); }
.hec-lb .hec-lb-btn {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--c-ivoire-100) 25%, transparent);
	border-radius: 50%;
	background: color-mix(in srgb, var(--c-dark) 60%, transparent);
	color: var(--c-ivoire-100);
	cursor: pointer;
	transition: background-color 0.3s, border-color 0.3s, color 0.3s, opacity 0.3s;
}
.hec-lb .hec-lb-btn[hidden] { display: none; }
.hec-lb .hec-lb-btn:hover:not(:disabled) { border-color: var(--c-ambre-500); background: var(--c-ambre-500); color: var(--c-on-accent); }
.hec-lb .hec-lb-btn:disabled { opacity: 0.35; cursor: default; }
.hec-lb .hec-lb-btn:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.hec-lb-stage {
	position: relative;
	display: grid;
	grid-template: minmax(0, 1fr) / minmax(0, 1fr); /* a definite cell: the photo's max-height: 100% fits it */
	place-items: center;
	min-height: 0;
	overflow: hidden;
	padding: 0 var(--space-gutter);
	cursor: zoom-out; /* a click beside the photo closes the viewer */
	touch-action: none; /* the viewer handles pinch, drag and swipe itself */
	user-select: none;
	-webkit-user-select: none;
}
.hec-lb .hec-lb-img { /* .hec-lb needed: Elementor's ".elementor img" rules */
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border-radius: var(--radius-md);
	box-shadow: 0 2rem 4rem -1.5rem rgb(0 0 0 / 0.6);
	cursor: zoom-in;
	transform-origin: center;
	transition: transform 0.3s var(--ease-doux), opacity 0.35s;
	-webkit-user-drag: none;
}
.hec-lb-stage[data-zoomed] .hec-lb-img { cursor: grab; }
.hec-lb-stage[data-dragging] .hec-lb-img { cursor: grabbing; transition: opacity 0.35s; }
.hec-lb .hec-lb-img[data-loading] { opacity: 0; }
.hec-lb .hec-lb-nav { position: absolute; top: 50%; z-index: 1; width: 3.25rem; height: 3.25rem; translate: 0 -50%; }
.hec-lb .hec-lb-prev { left: var(--space-4); }
.hec-lb .hec-lb-next { right: var(--space-4); }
.hec-lb-caption { padding: var(--space-4) var(--space-gutter) var(--space-5); text-align: center; }
.hec-lb .hec-lb-title { margin: 0; color: var(--c-ivoire-100); font-family: var(--f-serif); font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); font-weight: 400; line-height: 1.3; }
.hec-lb .hec-lb-text { max-width: 44em; margin: var(--space-2) auto 0; color: var(--c-on-dark-text); font-size: var(--fs-body-sm); }
.hec-lb .hec-lb-help { margin: var(--space-2) 0 0; color: var(--c-on-dark-muted); font-size: var(--fs-caption); }
@media (max-width: 767px) {
	.hec-lb .hec-lb-nav { top: auto; bottom: var(--space-3); translate: none; } /* phones: under the photo, swipe works too */
	.hec-lb-caption { padding-inline: 4.5rem; }
}
@media (prefers-reduced-motion: reduce) {
	.hec-lb .hec-lb-img,
	.hec-lb .hec-lb-btn { transition: none; }
}

/* --------------------------------------------------------------------------
   Section index label (client canvas, 2026-11-26): "01 ——— NOS EXPERTISES".
   The number counts the labels of the page in order (CSS counter), followed by a
   1px ink rule and the label in small capitals. The label text itself is unchanged.
   Printed with hec_eyebrow(); add 'dark' => true on dark sections.
   -------------------------------------------------------------------------- */
body {
	counter-reset: hec-index;
}
p.hec-eyebrow.hec-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	margin: 0 0 var(--space-5);
	color: var(--c-cacao-600);
	font-family: var(--f-sans);
	font-size: var(--fs-index);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	counter-increment: hec-index;
}
p.hec-eyebrow.hec-eyebrow::before { /* the number; decorative, so not read aloud where "/ ''" is supported */
	content: counter(hec-index, decimal-leading-zero);
	content: counter(hec-index, decimal-leading-zero) / "";
	order: -2;
	flex: none;
	color: var(--c-cacao-900);
}
p.hec-eyebrow.hec-eyebrow::after { /* the rule */
	content: "";
	order: -1;
	flex: 0 0 2.5rem;
	height: 1px;
	background: var(--c-cacao-900);
}
p.hec-eyebrow.hec-eyebrow--dark {
	color: var(--c-on-dark-muted);
}
p.hec-eyebrow.hec-eyebrow--dark::before {
	color: var(--c-ivoire-100);
}
p.hec-eyebrow.hec-eyebrow--dark::after {
	background: var(--c-ivoire-100);
}
@media (min-width: 768px) {
	p.hec-eyebrow.hec-eyebrow {
		gap: 1rem;
		margin-bottom: 1.75rem;
	}
	p.hec-eyebrow.hec-eyebrow::after {
		flex-basis: 4rem;
	}
}

/* --------------------------------------------------------------------------
   Soft mustard halo (canvas): a round light behind a section's content.
   <span class="hec-halo xx-halo" aria-hidden="true"></span>; the section sets its
   place and size (width only, it stays round) and must be position: relative,
   isolation: isolate and overflow: clip. It breathes very slowly.
   -------------------------------------------------------------------------- */
.hec-halo {
	position: absolute;
	z-index: -1;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--gradient-halo-doux);
	pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
	.hec-halo {
		animation: hec-breathe 14s ease-in-out infinite alternate;
	}
}
@keyframes hec-breathe {
	to { scale: 1.12; }
}

/* --------------------------------------------------------------------------
   Soft entrances: elements marked data-rv fade and rise once, when they come
   into view (assets/js/sections.js). data-rv="img" opens a photo in a circle,
   data-rv="line" draws a rule. Only elements below the fold at load time are
   hidden first, and nothing moves under reduced motion.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	.hec-rv-wait {
		opacity: 0;
	}
}
@media print {
	.hec-rv-wait {
		opacity: 1;
	}
}