/*
 * ADH — Artisans de l'habitat — main stylesheet.
 * Loaded on the front end and inside the block editor (inc/assets.php, inc/setup.php).
 * Design tokens come from theme.json (--wp--preset--*, --wp--custom--*) with hex fallbacks.
 * Class vocabulary: docs/SPEC-TECHNIQUE.md §3. Breakpoints: 640 / 1024 / 1200 px. No dependency.
 * Sections: 1 Tokens · 2 Base · 3 Buttons and block styles · 4 Layout · 5 Components
 *           6 Header, navigation, footer, mobile bar · 7 Motion · 8 Responsive · 9 Print
 */

/* ==========================================================================
   1. Tokens (aliases of theme.json variables + inline SVG assets)
   ========================================================================== */
:root {
  --adh-white: var(--wp--preset--color--white, #ffffff);
  --adh-cream: var(--wp--preset--color--cream, #f7f3ea);
  --adh-sand: var(--wp--preset--color--sand, #e9e2d2);
  --adh-navy: var(--wp--preset--color--navy, #1d3553);
  --adh-navy-dark: var(--wp--preset--color--navy-dark, #15283f);
  --adh-gold: var(--wp--preset--color--gold, #b88b2b);
  --adh-gold-deep: var(--wp--preset--color--gold-deep, #8a6519);
  --adh-ink: var(--wp--preset--color--ink, #22314a);
  --adh-gray: var(--wp--preset--color--gray, #475569);
  --adh-gray-light: var(--wp--preset--color--gray-light, #e2e8f0);
  --adh-font-head: var(--wp--preset--font-family--manrope, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  --adh-font-body: var(--wp--preset--font-family--inter, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  --adh-radius-s: var(--wp--custom--radius--s, 8px);
  --adh-radius-m: var(--wp--custom--radius--m, 14px);
  --adh-radius-l: var(--wp--custom--radius--l, 22px);
  --adh-radius-pill: var(--wp--custom--radius--pill, 999px);
  --adh-shadow-card: var(--wp--custom--shadow--card, 0 1px 2px rgb(29 53 83 / .06), 0 14px 34px -14px rgb(29 53 83 / .18));
  --adh-shadow-hover: var(--wp--custom--shadow--hover, 0 2px 4px rgb(29 53 83 / .06), 0 22px 44px -16px rgb(29 53 83 / .26));
  --adh-fast: var(--wp--custom--motion--fast, 180ms);
  --adh-base: var(--wp--custom--motion--base, 320ms);
  --adh-reveal: var(--wp--custom--motion--reveal, 520ms);
  --adh-ease: var(--wp--custom--motion--ease, cubic-bezier(.2, .7, .2, 1));
  --adh-space-50: var(--wp--preset--spacing--50, 2rem);
  --adh-space-60: var(--wp--preset--spacing--60, 3rem);
  --adh-space-70: var(--wp--preset--spacing--70, clamp(3.5rem, 2.5rem + 3vw, 5.5rem));
  --adh-space-80: var(--wp--preset--spacing--80, clamp(5rem, 3.5rem + 5vw, 8rem));
  --adh-content: var(--wp--style--global--content-size, 1240px);
  --adh-pad: var(--wp--style--root--padding-left, clamp(1rem, 4vw, 2.5rem));
  --adh-focus: var(--adh-gold-deep); /* solid 5.3:1 on white, 4.8:1 on cream (WCAG 1.4.11) */
  --adh-header-height: 96px;
  --adh-mobile-bar-height: 76px;
  /* Two-pitch roof lines (banner and CTA decoration), gold check (checklist), gold plus (details). */
  --adh-roof-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60'%3E%3Cpath d='M0 46 30 16 60 46 90 16 120 46M0 30 30 0 60 30 90 0 120 30' fill='none' stroke='%23B88B2B' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
  --adh-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B88B2B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --adh-icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B88B2B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

/* ==========================================================================
   2. Base: document, text, links, focus, images, utilities
   ========================================================================== */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--adh-white); color: var(--adh-ink); font-family: var(--adh-font-body); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3, h4, h5, h6 { font-family: var(--adh-font-head); font-weight: 700; letter-spacing: -.02em; color: var(--adh-navy); margin-block: 0 .6em; text-wrap: balance; }
h1 { line-height: 1.12; }
h2 { line-height: 1.2; }
h3 { line-height: 1.3; }
p { margin-block: 0 1.1rem; }
p:last-child { margin-bottom: 0; }
::selection { background: var(--adh-navy); color: var(--adh-white); }
:where([id]) { scroll-margin-top: calc(var(--adh-header-height) + 1.5rem); }
.adh-main { overflow-x: clip; }

/* Links inside running text (navigation, buttons and component links override this). */
a { color: var(--adh-navy); text-decoration: underline; text-decoration-color: var(--adh-gold); text-decoration-thickness: 2px; text-underline-offset: .16em; transition: color var(--adh-fast) var(--adh-ease), text-decoration-color var(--adh-fast) var(--adh-ease); }
a:hover { color: var(--adh-gold-deep); text-decoration-color: var(--adh-gold-deep); }

/* Navy surfaces: white text, cream hover on links; cards keep their own colours. */
.has-navy-background-color, .has-navy-dark-background-color { color: var(--adh-white); }
.has-navy-background-color :is(h1, h2, h3, h4, p, li, figcaption) { color: inherit; }
.has-navy-background-color a:not(.wp-block-button__link) { color: var(--adh-white); text-decoration-color: var(--adh-gold); }
.has-navy-background-color a:not(.wp-block-button__link):hover { color: var(--adh-cream); }
.has-navy-background-color .adh-eyebrow { color: var(--adh-white); }
.has-navy-background-color .adh-lead { color: rgb(255 255 255 / .84); }
.has-navy-background-color .adh-card { color: var(--adh-ink); }
.has-navy-background-color .adh-card :is(h2, h3, h4) { color: var(--adh-navy); }
.has-navy-background-color .adh-card .adh-card__text { color: var(--adh-gray); }

/* Visible keyboard focus everywhere: 3 px gold ring at 40 %. */
:focus-visible { outline: 3px solid var(--adh-focus); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* Images */
img { max-width: 100%; height: auto; vertical-align: middle; }
.wp-block-image img, .wp-block-gallery img, .wp-block-post-featured-image img { border-radius: var(--adh-radius-m); }
.wp-block-image figcaption, .wp-block-gallery .blocks-gallery-caption { color: var(--adh-gray); font-size: .9375rem; margin-top: .6rem; text-align: left; }

/* Utilities */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; word-wrap: normal !important; }
.screen-reader-text:focus { clip: auto; clip-path: none; height: auto; width: auto; left: 1rem; top: 1rem; z-index: 100000; padding: .75rem 1rem; background: var(--adh-white); color: var(--adh-navy); font-weight: 600; box-shadow: var(--adh-shadow-card); border-radius: var(--adh-radius-s); text-decoration: none; }

/* ==========================================================================
   3. Buttons and registered block styles
   ========================================================================== */
.wp-block-button__link, .wp-element-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .9rem 1.5rem; font-family: var(--adh-font-head); font-weight: 600; font-size: 1rem; line-height: 1.25; color: var(--adh-white); background: var(--adh-navy); border: 2px solid var(--adh-navy); border-radius: var(--adh-radius-m); text-decoration: none; cursor: pointer; transition: background-color var(--adh-fast) var(--adh-ease), border-color var(--adh-fast) var(--adh-ease), color var(--adh-fast) var(--adh-ease), transform var(--adh-fast) var(--adh-ease), box-shadow var(--adh-fast) var(--adh-ease); }
:is(.wp-block-button__link, .wp-element-button):hover { color: var(--adh-white); background: var(--adh-navy-dark); border-color: var(--adh-navy-dark); transform: translateY(-1px); box-shadow: 0 10px 20px -10px rgb(29 53 83 / .45); }
:is(.wp-block-button__link, .wp-element-button):active { transform: translateY(0); box-shadow: none; transition-duration: 80ms; }
.wp-block-buttons { gap: .75rem 1rem; }
.wp-block-buttons > .wp-block-button { margin: 0; }
/* Registered styles: these selectors outrank the theme.json variation output whatever its wrapper. */
.wp-block-button.is-style-outline .wp-block-button__link { padding: .9rem 1.5rem; background: var(--adh-white); color: var(--adh-navy); border-color: var(--adh-navy); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--adh-navy); color: var(--adh-white); }
.wp-block-button.is-style-adh-gold .wp-block-button__link { background: var(--adh-white); color: var(--adh-navy); border-color: var(--adh-gold); }
.wp-block-button.is-style-adh-gold .wp-block-button__link:hover { background: var(--adh-navy); color: var(--adh-white); border-color: var(--adh-navy); }
.wp-block-button.is-style-adh-white .wp-block-button__link { background: var(--adh-white); color: var(--adh-navy); border-color: var(--adh-white); }
.wp-block-button.is-style-adh-white .wp-block-button__link:hover { background: var(--adh-cream); color: var(--adh-navy); border-color: var(--adh-cream); }
.has-navy-background-color .wp-block-button.is-style-adh-gold .wp-block-button__link { background: transparent; color: var(--adh-white); }
.has-navy-background-color .wp-block-button.is-style-adh-gold .wp-block-button__link:hover { background: var(--adh-white); color: var(--adh-navy); border-color: var(--adh-white); }

/* core/list styles: gold check bullets, cream chips */
.wp-block-list.is-style-adh-checklist { list-style: none; padding-left: 0; margin: 0; display: grid; gap: .65rem; }
.is-style-adh-checklist > li { position: relative; padding-left: 2rem; }
.is-style-adh-checklist > li::before { content: ""; position: absolute; left: 0; top: .12em; width: 1.35em; height: 1.35em; background: var(--adh-icon-check) center / contain no-repeat; }
.adh-chips, .wp-block-list.is-style-adh-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
:is(.adh-chips, .is-style-adh-chips) > li { display: inline-flex; align-items: center; min-height: 2.25rem; padding: .35rem .95rem; background: var(--adh-cream); border: 1px solid var(--adh-sand); border-radius: var(--adh-radius-pill); font-size: .9375rem; font-weight: 500; color: var(--adh-navy); }
.has-cream-background-color :is(.adh-chips, .is-style-adh-chips) > li { background: var(--adh-white); }

/* core/separator: short gold rule, left-aligned unless centred */
.wp-block-separator.is-style-adh-gold-rule:not(.is-style-wide):not(.is-style-dots) { width: 56px; height: 3px; border: 0; background: var(--adh-gold); border-radius: var(--adh-radius-pill); opacity: 1; margin-block: 1.25rem; }
.wp-block-separator.is-style-adh-gold-rule:not(.aligncenter) { margin-left: 0 !important; margin-right: auto !important; }

/* core/details: Manrope summary, gold plus icon rotating to a cross, sand bottom border */
.wp-block-details { border-bottom: 1px solid var(--adh-sand); padding: 0 0 .25rem; }
.wp-block-details > summary { list-style: none; position: relative; display: block; padding: 1.1rem 2.75rem 1.1rem 0; font-family: var(--adh-font-head); font-weight: 600; font-size: 1.0625rem; line-height: 1.4; color: var(--adh-navy); cursor: pointer; transition: color var(--adh-fast) var(--adh-ease); }
.wp-block-details > summary::-webkit-details-marker { display: none; }
.wp-block-details > summary::after { content: ""; position: absolute; right: .25rem; top: 50%; width: 1.5rem; height: 1.5rem; margin-top: -.75rem; background: var(--adh-icon-plus) center / contain no-repeat; transition: transform var(--adh-base) var(--adh-ease); }
.wp-block-details > summary:hover { color: var(--adh-gold-deep); }
.wp-block-details[open] > summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { color: var(--adh-gray); margin: 0 0 1.1rem; }
.wp-block-details[open] > :not(summary) { animation: adh-reveal var(--adh-base) var(--adh-ease) both; }
.adh-faq > .wp-block-details + .wp-block-details { margin-block-start: 0; }

/* core/gallery: rounded tiles, light zoom */
.adh-gallery.wp-block-gallery figure.wp-block-image { overflow: hidden; border-radius: var(--adh-radius-m); }
.adh-gallery .wp-block-image img { transition: transform var(--adh-base) var(--adh-ease); }
.adh-gallery .wp-block-image:hover img { transform: scale(1.03); }
.adh-gallery .blocks-gallery-caption { width: 100%; font-size: .875rem; }

/* ==========================================================================
   4. Layout: sections, section heads, eyebrow, lead, grids
   ========================================================================== */
.adh-section { padding-block: var(--adh-space-70); }
.adh-section--tight { padding-block: var(--adh-space-60); }
/* Section heads stay left-aligned in the content column (the constrained layout would centre a narrow block). */
.adh-section__head > :not(.alignfull) { max-width: 44rem; margin-left: 0 !important; margin-right: 0 !important; }
.adh-section__head + :not(.alignfull) { margin-block-start: 2.5rem; }
.adh-section__head--center { text-align: center; }
.adh-section__head--center > :not(.alignfull) { margin-left: auto !important; margin-right: auto !important; }
:is(.adh-section__head, .adh-hero__content) > .adh-eyebrow + * { margin-block-start: 1rem; }
.adh-eyebrow { display: flex; align-items: center; gap: .75rem; margin: 0; font-family: var(--adh-font-head); font-weight: 700; font-size: .8125rem; line-height: 1.3; text-transform: uppercase; letter-spacing: .12em; color: var(--adh-navy); }
.adh-eyebrow::before { content: ""; flex: none; width: 28px; height: 2px; border-radius: var(--adh-radius-pill); background: var(--adh-gold); }
.adh-eyebrow--center, .adh-eyebrow.has-text-align-center { justify-content: center; }
.adh-lead { font-size: 1.25rem; line-height: 1.55; color: var(--adh-gray); }
/* Grids: the doubled class outranks the inline rule WordPress prints for columnCount / minimumColumnWidth. */
:is(.adh-grid-2, .adh-grid-3, .adh-grid-4) { display: grid; gap: 1.5rem; }
.adh-grid-2.adh-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adh-grid-3.adh-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adh-grid-4.adh-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wp-block-columns:is(.adh-grid-2, .adh-grid-3, .adh-grid-4) { display: grid; }
.wp-block-columns:is(.adh-grid-2, .adh-grid-3, .adh-grid-4) > .wp-block-column { flex-basis: auto !important; }
:is(.adh-grid-2, .adh-grid-3, .adh-grid-4) > * { margin: 0 !important; min-width: 0; }

/* ==========================================================================
   5. Components
   ========================================================================== */
/* Cards */
.adh-card { background: var(--adh-white); border: 1px solid var(--adh-sand); border-radius: var(--adh-radius-m); padding: 2rem; box-shadow: var(--adh-shadow-card); transition: box-shadow var(--adh-base) var(--adh-ease), transform var(--adh-base) var(--adh-ease); }
.adh-card:hover { box-shadow: var(--adh-shadow-hover); transform: translateY(-3px); }
.adh-card--cream { background: var(--adh-cream); }
.adh-card.is-layout-flex { gap: .75rem; }
.adh-card.is-layout-constrained > * + * { margin-block-start: .75rem; }
.wp-block-image.adh-card__icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin: 0 0 .5rem !important; border-radius: 50%; background: var(--adh-cream); }
.wp-block-image.adh-card__icon img { width: 48px; height: 48px; border-radius: 0; }
.adh-card--cream .adh-card__icon { background: var(--adh-white); }
.adh-card__title { margin: 0; }
.adh-card__text { color: var(--adh-gray); margin: 0; }
.adh-card .wp-block-buttons { margin-top: .5rem; }

/* Trade cards: photo on top, gold icon in a white disc overlapping the photo */
.adh-metier-card { position: relative; display: flex; flex-direction: column; background: var(--adh-white); border: 1px solid var(--adh-sand); border-radius: var(--adh-radius-m); overflow: hidden; box-shadow: var(--adh-shadow-card); transition: box-shadow var(--adh-base) var(--adh-ease), transform var(--adh-base) var(--adh-ease); }
.adh-metier-card:hover { box-shadow: var(--adh-shadow-hover); transform: translateY(-3px); }
.adh-metier-card > .adh-metier-card__media { width: 100%; max-width: none; margin-block: 0; aspect-ratio: 3 / 2; overflow: hidden; }
.adh-metier-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform var(--adh-base) var(--adh-ease); }
.adh-metier-card:hover .adh-metier-card__media img { transform: scale(1.03); }
.adh-metier-card__body { position: relative; flex: 1; padding: 3rem 1.75rem 2rem; }
.adh-metier-card__body > * { margin-left: 0 !important; margin-right: 0 !important; }
.adh-metier-card__body.is-layout-constrained > * + * { margin-block-start: .75rem; }
.wp-block-image.adh-metier-card__icon { position: absolute; top: -36px; left: 1.75rem; display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin: 0 !important; border-radius: 50%; background: var(--adh-white); box-shadow: var(--adh-shadow-card); }
.wp-block-image.adh-metier-card__icon img { width: 40px; height: 40px; border-radius: 0; }
.adh-metier-card__body :is(h2, h3) { margin: 0; }
.adh-metier-card__body p { color: var(--adh-gray); }

/* Text links with an arrow, phone links */
.adh-link-arrow { display: inline-flex; align-items: center; gap: .4rem; padding-bottom: 2px; font-family: var(--adh-font-head); font-weight: 600; color: var(--adh-navy); text-decoration: none; background: linear-gradient(var(--adh-gold), var(--adh-gold)) left bottom / 0 2px no-repeat; transition: background-size var(--adh-base) var(--adh-ease), color var(--adh-fast) var(--adh-ease); }
.adh-link-arrow::after { content: "\2192"; transition: transform var(--adh-fast) var(--adh-ease); }
.adh-link-arrow:hover, .adh-link-arrow:focus-visible { color: var(--adh-navy); background-size: 100% 2px; }
.adh-link-arrow:hover::after, .adh-link-arrow:focus-visible::after { transform: translateX(4px); }
.adh-phone-link { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--adh-font-head); font-weight: 600; color: var(--adh-navy); text-decoration: none; white-space: nowrap; }
.adh-phone-link:hover { color: var(--adh-gold-deep); text-decoration: underline; text-decoration-color: var(--adh-gold); }
.adh-phone-link .adh-icon { width: 20px; height: 20px; flex: none; color: var(--adh-gold); }

/* Hero: first screen. Cream roof-pitch panel behind the photo, offset gold frame behind the picture. */
.adh-hero { position: relative; isolation: isolate; padding-block: var(--adh-space-70); }
.adh-hero::before { content: ""; position: absolute; z-index: -1; inset: 0 0 0 52%; background: var(--adh-cream); clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%); pointer-events: none; }
.adh-hero--compact { padding-block: var(--adh-space-60); }
.adh-hero--compact::before { inset: 0 0 0 58%; }
.adh-hero--simple { padding-block: var(--adh-space-60) var(--adh-space-50); }
.adh-hero--simple::before { inset: 0 0 0 68%; clip-path: polygon(24% 0, 100% 0, 100% 100%, 0 100%); }
.adh-hero__content > :not(.alignfull) { max-width: 46rem; margin-left: 0 !important; margin-right: 0 !important; }
.adh-hero__content > .wp-block-buttons { margin-block-start: 1.9rem; }
.adh-hero__content > .wp-block-buttons + .wp-block-list { margin-block-start: 1.75rem; }
.adh-hero__visual { position: relative; }
.adh-hero__media, .adh-media-frame { position: relative; z-index: 0; width: 100%; max-width: none; margin-block: 0; border-radius: var(--adh-radius-l); }
:is(.adh-hero__media, .adh-media-frame)::before { content: ""; position: absolute; z-index: -1; inset: 14px -14px -14px 14px; border: 2px solid var(--adh-gold); border-radius: var(--adh-radius-l); pointer-events: none; }
:is(.adh-hero__media, .adh-media-frame) img { display: block; width: 100%; height: auto; object-fit: cover; border-radius: var(--adh-radius-l); }
.adh-hero__media img, .adh-media-frame img { aspect-ratio: 4 / 5; }
.adh-hero--compact .adh-hero__media img { aspect-ratio: 3 / 2; }
.adh-hero__note { position: absolute; z-index: 2; left: 1rem; bottom: 1.25rem; gap: .15rem; max-width: 15.5rem; padding: .9rem 1.1rem; background: var(--adh-white); border: 1px solid var(--adh-sand); border-radius: var(--adh-radius-m); box-shadow: var(--adh-shadow-hover); font-size: .9375rem; }
.adh-hero__note p { margin: 0; }
.adh-hero__note strong { font-family: var(--adh-font-head); color: var(--adh-navy); }

/* Emergency banner (navy, full width, faint gold roof pattern) */
.adh-banner { position: relative; isolation: isolate; overflow: clip; }
.adh-banner:not(.adh-section) { padding-block: var(--adh-space-60); }
.adh-banner::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--adh-roof-pattern) center / 120px 60px repeat; opacity: .12; pointer-events: none; }
.adh-banner .wp-block-columns { align-items: center; }
.adh-banner :is(h2, h3) { margin: 0; color: var(--adh-white); }
.adh-banner p { color: rgb(255 255 255 / .86); }

/* Steps: large gold number, sand connector from 1024 px (see §8) */
.adh-steps { display: grid; gap: 2rem 1.5rem; }
.adh-steps:not(.is-layout-grid) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adh-steps > * { margin: 0 !important; min-width: 0; }
.adh-step { position: relative; }
.adh-step.is-layout-constrained > * + * { margin-block-start: .5rem; }
.adh-step > .adh-step__num + * { margin-block-start: .75rem; }
.adh-step__num { margin: 0; font-family: var(--adh-font-head); font-weight: 800; font-size: 2.5rem; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--adh-gold); }
.adh-step :is(h3, h4) { margin: 0; font-size: var(--wp--preset--font-size--large, 1.25rem); }
.adh-step p:not(.adh-step__num) { color: var(--adh-gray); }

/* Contact CTA card (cream, roof pattern fading in from the right) */
.adh-cta { position: relative; isolation: isolate; overflow: clip; padding: 3rem; background: var(--adh-cream); border: 1px solid var(--adh-sand); border-radius: var(--adh-radius-l); }
.adh-cta::after { content: ""; position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; width: min(42%, 440px); background: var(--adh-roof-pattern) right top / 120px 60px repeat; opacity: .16; pointer-events: none; -webkit-mask-image: linear-gradient(to left, #000 30%, transparent); mask-image: linear-gradient(to left, #000 30%, transparent); }
.adh-cta > :not(.alignfull) { max-width: 40rem; margin-left: 0 !important; margin-right: 0 !important; }
.adh-cta :is(h2, h3) { margin: 0; }
.adh-cta p { color: var(--adh-gray); }
.adh-cta > .wp-block-buttons { margin-block-start: 1.75rem; }
.adh-cta > .wp-block-buttons + p { margin-block-start: 1.25rem; font-size: .9375rem; }

/* Contact page */
.adh-contact-channels .adh-card { height: 100%; }
.adh-contact-aside address { font-style: normal; }
.adh-contact-aside .adh-card .wp-block-buttons { margin-top: .25rem; }

/* Informative note: cream box with a gold left rule */
.adh-note { padding: 1rem 1.25rem; background: var(--adh-cream); border-left: 3px solid var(--adh-gold); border-radius: 0 var(--adh-radius-m) var(--adh-radius-m) 0; color: var(--adh-ink); }
.has-cream-background-color .adh-note { background: var(--adh-white); }
.adh-note.is-layout-constrained > * + * { margin-block-start: .5rem; }
.adh-note p { margin: 0; }

/* 404 */
.adh-404 { padding-block: var(--adh-space-80); text-align: center; }
.adh-404 .adh-eyebrow { justify-content: center; }
.adh-404 .adh-lead { margin-inline: auto; }
.adh-404__phone { font-size: 1.125rem; }

/* Long-form content (legal pages, Réalisations) */
.adh-prose { max-width: 46rem; }
.adh-prose h2:not(:first-child) { margin-block-start: 2.5rem; font-size: var(--wp--preset--font-size--x-large, 1.5rem); }
.adh-prose h3:not(:first-child) { margin-block-start: 1.75rem; font-size: var(--wp--preset--font-size--large, 1.25rem); }
.adh-prose :is(ul, ol) { padding-left: 1.25rem; display: grid; gap: .5rem; }
.adh-prose li::marker { color: var(--adh-gold); }

/* Logo: never distorted; 72 px tall on desktop, 56 px on mobile and when the header is scrolled */
.adh-logo { margin: 0 !important; line-height: 0; }
.adh-logo a { display: inline-block; line-height: 0; }
img.adh-logo, .adh-logo img, .wp-block-site-logo img { width: auto; height: 72px; max-width: none; border-radius: 0; transition: height var(--adh-fast) var(--adh-ease); }
.adh-footer :is(img.adh-logo, .adh-logo img, .wp-block-site-logo img) { height: 64px; }

/* ==========================================================================
   6. Header, navigation, footer, mobile bar
   ========================================================================== */
/* The template-part wrapper must not become the sticky containing block. */
.wp-block-template-part:has(> .adh-header) { display: contents; }
.adh-header { position: sticky; top: 0; z-index: 50; background: var(--adh-white); border-bottom: 1px solid var(--adh-sand); transition: box-shadow var(--adh-fast) var(--adh-ease); }
.adh-header.is-scrolled { box-shadow: var(--adh-shadow-card); }
body.admin-bar .adh-header { top: var(--wp-admin--admin-bar--height, 32px); }
.adh-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: .75rem; }
.adh-header__actions { display: flex; align-items: center; gap: 1.25rem; flex: none; }
.adh-header__phone-wrap { margin: 0; }
.adh-header__phone { font-size: 1rem; }
.adh-header__cta .wp-block-button__link { padding: .7rem 1.25rem; }

/* Navigation (core/navigation; overlay menu below 1024 px, see §8) */
.adh-nav { font-family: var(--adh-font-head); font-weight: 600; font-size: .9rem; flex: 1 1 auto; min-width: 0; }
.adh-nav.wp-block-navigation, .adh-nav .wp-block-navigation__container { gap: 1.1rem; }
/* Seven menu entries: stay on one line next to the logo and the header actions. */
@media (min-width: 1024px) and (max-width: 1199.98px) { .adh-nav { font-size: .78rem; } .adh-nav.wp-block-navigation, .adh-nav .wp-block-navigation__container { gap: .55rem; flex-wrap: nowrap; } .adh-nav .wp-block-navigation-item__content { white-space: nowrap; } }
@media (min-width: 1200px) and (max-width: 1359.98px) { .adh-nav { font-size: .8125rem; } .adh-nav.wp-block-navigation, .adh-nav .wp-block-navigation__container { gap: .7rem; flex-wrap: nowrap; } .adh-nav .wp-block-navigation-item__content { white-space: nowrap; } }
@media (min-width: 1360px) { .adh-nav { font-size: .875rem; } .adh-nav.wp-block-navigation, .adh-nav .wp-block-navigation__container { gap: .9rem; flex-wrap: nowrap; } .adh-nav .wp-block-navigation-item__content { white-space: nowrap; } }
.adh-nav .wp-block-navigation-item__content { position: relative; display: inline-block; padding: .4rem 0; color: var(--adh-navy); text-decoration: none; transition: color var(--adh-fast) var(--adh-ease); }
.adh-nav .wp-block-navigation-item__content::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: var(--adh-radius-pill); background: var(--adh-gold); transform: scaleX(0); transform-origin: left center; transition: transform var(--adh-base) var(--adh-ease); }
.adh-nav .wp-block-navigation-item__content:hover { color: var(--adh-navy-dark); }
.adh-nav :is(.wp-block-navigation-item__content:hover, .wp-block-navigation-item__content:focus-visible, .current-menu-item > .wp-block-navigation-item__content)::after { transform: scaleX(1); }
.adh-nav :is(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close) { min-width: 44px; min-height: 44px; padding: .5rem; align-items: center; justify-content: center; color: var(--adh-navy); background: transparent; border: 0; border-radius: var(--adh-radius-s); cursor: pointer; }
.adh-nav :is(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close) svg { width: 28px; height: 28px; }
.adh-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--adh-white); color: var(--adh-navy); padding: 1.25rem clamp(1.25rem, 6vw, 3rem) 3rem; }
.adh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 3.5rem; }
.adh-nav .wp-block-navigation__responsive-container-close { top: 1rem; right: 1rem; }
.adh-nav .is-menu-open .wp-block-navigation__container { gap: .25rem; }
.adh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { display: inline-block; font-size: 1.25rem; line-height: 1.3; padding: .75rem 0; min-height: 44px; }
html.js .adh-nav .wp-block-navigation__responsive-container.is-menu-open { animation: adh-fade var(--adh-base) var(--adh-ease); }

/* Footer: cream columns, navy bottom bar */
.adh-footer { padding-top: var(--adh-space-70); }
.adh-footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2.5rem; }
.wp-block-columns.adh-footer__grid > .wp-block-column { flex-basis: auto !important; }
.adh-footer__grid > * { margin: 0 !important; min-width: 0; }
.adh-footer__grid :is(h2, h3, h4), .adh-footer__title { position: relative; margin: 0; padding-bottom: 1.1rem; font-size: .9375rem; line-height: 1.3; text-transform: uppercase; letter-spacing: .08em; color: var(--adh-navy); }
:is(.adh-footer__grid :is(h2, h3, h4), .adh-footer__title)::after { content: ""; position: absolute; left: 0; bottom: .4rem; width: 28px; height: 2px; border-radius: var(--adh-radius-pill); background: var(--adh-gold); }
.adh-footer__grid :is(h2, h3, h4):not(.alignfull) + * { margin-block-start: .85rem; }
.adh-footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.adh-footer__grid p, .adh-footer__grid li { color: var(--adh-gray); font-size: .9375rem; }
.adh-footer__grid a:not(.wp-block-button__link) { color: var(--adh-navy); text-decoration: none; }
.adh-footer__grid a:not(.wp-block-button__link):hover { color: var(--adh-gold-deep); text-decoration: underline; text-decoration-color: var(--adh-gold); }
.adh-footer .wp-block-navigation { font-size: .9375rem; }
.adh-footer__bottom { padding-block: 1.1rem; font-size: .875rem; }
.adh-footer__bottom-inner { gap: .5rem 2rem; }
.adh-footer__copyright, .adh-footer__legal { margin: 0; }
.adh-legal-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.adh-legal-links a { color: var(--adh-white); text-decoration: none; }
.adh-legal-links a:hover { color: var(--adh-cream); text-decoration: underline; text-decoration-color: var(--adh-gold); }

/* Mobile bar: fixed "Appeler" / "Demander un devis", hidden from 1024 px (see §8) */
.adh-mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: center; padding: .75rem var(--adh-pad) calc(.75rem + env(safe-area-inset-bottom, 0px)); background: var(--adh-white); border-top: 1px solid var(--adh-sand); box-shadow: 0 -6px 24px -12px rgb(29 53 83 / .25); }
.adh-mobile-bar .wp-block-buttons { display: flex; flex-wrap: nowrap; gap: .75rem; width: 100%; max-width: 40rem; margin: 0; }
.adh-mobile-bar .wp-block-button { flex: 1 1 0; }
.adh-mobile-bar .wp-block-button__link { width: 100%; min-height: 52px; padding: .5rem .75rem; font-size: .9375rem; white-space: nowrap; }
.adh-mobile-bar .wp-block-button__link:hover { transform: none; box-shadow: none; }

/* ==========================================================================
   7. Motion: scroll reveal (once), fades, page transitions, reduced motion
   ========================================================================== */
@keyframes adh-reveal { from { opacity: 0; translate: 0 20px; } to { opacity: 1; translate: none; } }
@keyframes adh-fade { from { opacity: 0; } to { opacity: 1; } }
/* Hidden only when JS runs (html.js) and shown once by adh.js; `translate` keeps hover transforms intact. */
/* Hidden until adh.js adds .is-visible; if the deferred script never runs, the fallback reveals everything after 2.5 s. */
html.js .adh-reveal:not(.is-visible), html.js .adh-stagger:not(.is-visible) > * { opacity: 0; animation: adh-reveal-fallback 1ms linear 2.5s forwards; }
@keyframes adh-reveal-fallback { to { opacity: 1; translate: none; } }
html.js .adh-reveal.is-visible, html.js .adh-stagger.is-visible > * { animation: adh-reveal var(--adh-reveal) var(--adh-ease) both; }
html.js .adh-stagger.is-visible > :nth-child(2) { animation-delay: 90ms; }
html.js .adh-stagger.is-visible > :nth-child(3) { animation-delay: 180ms; }
html.js .adh-stagger.is-visible > :nth-child(4) { animation-delay: 270ms; }
html.js .adh-stagger.is-visible > :nth-child(5) { animation-delay: 360ms; }
html.js .adh-stagger.is-visible > :nth-child(n+6) { animation-delay: 450ms; }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation-duration: 160ms; }
  ::view-transition-new(root) { animation-duration: 220ms; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, ::before, ::after { transition-duration: .01ms !important; transition-delay: 0ms !important; animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
  html.js .adh-reveal, html.js .adh-stagger > * { opacity: 1; animation: none; translate: none; }
  .adh-card:hover, .adh-metier-card:hover, :is(.wp-block-button__link, .wp-element-button):hover, .adh-link-arrow:hover::after, .adh-link-arrow:focus-visible::after, .adh-metier-card:hover .adh-metier-card__media img, .adh-gallery .wp-block-image:hover img { transform: none; }
}

/* ==========================================================================
   8. Responsive (640 / 1024 / 1200 px)
   ========================================================================== */
@media (min-width: 1024px) {
  body .adh-mobile-bar { display: none; }
  /* Two-column heroes built with core/columns */
  .wp-block-columns:is(.adh-hero__columns, .adh-hero__inner) { gap: clamp(2.5rem, 5vw, 5rem); }
  .wp-block-columns.adh-hero__columns > .wp-block-column:not([style*="flex-basis"]) { flex: .95 1 0; }
  .wp-block-columns.adh-hero__columns > .wp-block-column.adh-hero__content:not([style*="flex-basis"]) { flex: 1.05 1 0; }
  /* Compact hero whose content and photo are direct children: 4-track grid aligned on the content column */
  .adh-hero--compact:has(> .adh-hero__content) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, calc(var(--adh-content) * .55)) minmax(0, calc(var(--adh-content) * .45)) minmax(0, 1fr); align-items: center; }
  .adh-hero--compact > .adh-hero__content { grid-column: 2; width: 100%; max-width: none; margin-block: 0; padding-right: clamp(2rem, 4vw, 4rem); }
  .adh-hero--compact > .adh-hero__media { grid-column: 3; margin-block: 0; }
  .adh-hero__note { left: -1.75rem; bottom: 2rem; }
  /* Sand connector between steps */
  .adh-step:not(:last-child)::before { content: ""; position: absolute; top: 1.2rem; left: 3.4rem; right: -.75rem; height: 2px; background: var(--adh-sand); }
  .adh-contact-aside .adh-card { position: sticky; top: calc(var(--adh-header-height) + 1.5rem); }
}
@media (max-width: 1199.98px) {
  .adh-header .adh-header__phone-wrap, .adh-header__phone-wrap, .adh-header__phone { display: none; }
}
@media (max-width: 1023.98px) {
  :root { --adh-header-height: 80px; }
  body { padding-bottom: var(--adh-mobile-bar-height); }
  .adh-header .wp-block-buttons > .adh-header__cta, .adh-header__cta { display: none; }
  .adh-header__inner { gap: 1rem; }
  img.adh-logo, .adh-logo img, .wp-block-site-logo img { height: 56px; }
  /* Overlay navigation up to 1023 px (core switches at 600 px) */
  .adh-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
  .adh-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
  .wp-block-columns:is(.adh-hero__columns, .adh-hero__inner) { flex-wrap: wrap !important; gap: 2.5rem; }
  .wp-block-columns:is(.adh-hero__columns, .adh-hero__inner) > .wp-block-column { flex-basis: 100% !important; }
  .adh-hero::before { inset: auto 0 0 0; height: 46%; clip-path: polygon(0 14%, 100% 0, 100% 100%, 0 100%); }
  .adh-hero--simple::before { inset: 0 0 0 70%; clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%); }
  .adh-grid-3.adh-grid-3, .adh-grid-4.adh-grid-4, .adh-steps.adh-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adh-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
  .adh-cta { padding: 2.25rem; }
  .adh-cta::after { width: 55%; }
}
@media (max-width: 639.98px) {
  .adh-section__head + :not(.alignfull) { margin-block-start: 2rem; }
  .adh-grid-2.adh-grid-2, .adh-grid-3.adh-grid-3, .adh-grid-4.adh-grid-4, .adh-steps.adh-steps, .adh-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .adh-lead { font-size: 1.125rem; }
  .adh-card { padding: 1.5rem; }
  .adh-metier-card__body { padding: 2.75rem 1.5rem 1.75rem; }
  .wp-block-image.adh-metier-card__icon { left: 1.5rem; }
  .adh-cta { padding: 1.75rem 1.5rem; }
  .adh-hero__note { position: static; max-width: none; margin-top: 1rem !important; }
  .wp-block-buttons:not(.is-layout-flex) > .wp-block-button, .adh-hero__content .wp-block-button, .adh-cta .wp-block-button { width: 100%; }
  :is(.adh-hero__content, .adh-cta) .wp-block-button__link { width: 100%; }
  .adh-mobile-bar .wp-block-button__link { font-size: .875rem; padding-inline: .5rem; }
}

/* ==========================================================================
   9. Print (minimal)
   ========================================================================== */
@media print {
  .adh-header { position: static; box-shadow: none; }
  .adh-nav, .adh-header__cta, .adh-mobile-bar, .adh-cta, .adh-footer__bottom, .wp-block-buttons { display: none !important; }
  html.js .adh-reveal, html.js .adh-stagger > * { opacity: 1 !important; animation: none !important; }
  .adh-section, .adh-hero { padding-block: 1.5rem; }
  .adh-hero::before, .adh-banner::before, .adh-cta::after { display: none; }
  .adh-card, .adh-metier-card { box-shadow: none; break-inside: avoid; }
  body { padding-bottom: 0 !important; }
  a { color: inherit; text-decoration: none; }
}
