/* ==========================================================================
   layout.css — container, header, footer, section rhythm, page hero.
   Structure follows brand/layout.md (Kleno): 1320 px container, 120/60 px sections.
   ========================================================================== */

main { overflow-x: clip; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.section--flush-top { padding-top: 0; }
/* After a tinted band the flush section needs its own top space, or the box sits on the band's edge. */
.is-tint + .section--flush-top { padding-top: var(--section-y); }

/* Section heading: centred, or left with an action on the right ----------- */
.section-head { display: grid; gap: var(--space-4); margin-bottom: clamp(2.25rem, 1.5rem + 2.5vw, 4rem); }
.section-head--center { text-align: center; justify-items: center; }
.section-head--center h2 { max-width: 20ch; }
.section-head--split { grid-template-columns: 1fr; align-items: end; }
.section-head p { color: var(--muted); max-width: 58ch; }
.section-head .btn { justify-self: start; }
.section-head--center .btn { justify-self: center; }
@media (min-width: 48rem) {
  .section-head--split { grid-template-columns: minmax(0, 1fr) auto; }
  .section-head--split h2 { max-width: 18ch; }
}

/* Header ------------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  color: var(--c-paper);
  transition: background-color var(--dur-hover) ease, box-shadow var(--dur-hover) ease;
}
.site-header.is-scrolled { background: var(--c-ink); box-shadow: 0 1px 0 color-mix(in srgb, var(--c-paper) 12%, transparent); }
.site-header__inner {
  height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-6);
}
.site-header__brand { grid-column: 1; justify-self: start; display: block; }
.site-header__brand img { width: 92px; height: auto; transform-origin: left center; transition: transform var(--dur-hover) var(--ease-out); }
.site-header.is-scrolled .site-header__brand img { transform: scale(.8); }
.site-header__actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: var(--space-4); }
.site-header__phone { display: none; align-items: center; gap: var(--space-2); font-weight: 600; font-size: var(--fs-sm); color: var(--c-accent); text-decoration: none; white-space: nowrap; }
.site-header__phone svg { width: 18px; height: 18px; flex: none; }
.site-header__phone:hover { text-decoration: underline; }
.site-header__actions .site-header__cta { display: none; }
.site-header .btn { --btn-bg: var(--c-accent); --btn-fg: var(--on-accent); }

.nav-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius);
  background: transparent; border: 1px solid color-mix(in srgb, var(--c-paper) 30%, transparent); color: var(--c-paper);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Mobile nav: white rounded panel under the header (Kleno) */
.site-nav {
  position: fixed; top: calc(var(--header-h) + var(--space-2)); left: var(--gutter); right: var(--gutter);
  background: var(--c-paper); color: var(--c-ink); border-radius: var(--radius);
  padding: var(--space-4) var(--space-6) var(--space-6);
  box-shadow: 0 24px 60px -20px color-mix(in srgb, var(--c-ink) 55%, transparent);
  /* Dropdown from the toggle (top right): 200ms ease-out, scale from 0.97, origin at the trigger */
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.97); transform-origin: top right;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
  max-height: calc(100dvh - var(--header-h) - 2rem); overflow-y: auto;
}
.site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.site-nav__list { display: grid; }
.site-nav__list a {
  display: block; padding: var(--space-3) 0; font-weight: 600; font-size: 1.0625rem; text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--c-ink) 10%, var(--c-paper));
}
.site-nav__list a[aria-current="page"] { color: var(--c-primary); }
.site-nav__extra { display: grid; gap: var(--space-3); margin-top: var(--space-6); }
.site-nav__extra .btn { justify-content: center; --btn-bg: var(--c-primary); --btn-fg: var(--on-primary); }
.site-nav__extra .link-arrow { color: var(--c-primary); }

@media (min-width: 72rem) {
  .site-header__inner { grid-template-columns: 1fr auto 1fr; }
  .site-header__brand { grid-column: 2; justify-self: center; }
  .site-header__brand img { width: 104px; transform-origin: center; }
  .nav-toggle { display: none; }
  .site-header__phone, .site-header__actions .site-header__cta { display: inline-flex; }
  .site-nav {
    grid-column: 1; grid-row: 1; justify-self: start;
    position: static; opacity: 1; visibility: visible; transform: none; background: none; color: inherit;
    padding: 0; box-shadow: none; max-height: none; overflow: visible; border-radius: 0;
  }
  .site-nav__list { display: flex; gap: var(--space-6); }
  .site-nav__list a { border: 0; padding: var(--space-2) 0; font-size: 0.9375rem; position: relative; }
  .site-nav__list a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--c-accent);
    transform: scaleX(0); transform-origin: left; transition: transform var(--dur-hover) var(--ease-out);
  }
  .site-nav__list a[aria-current="page"]::after { transform: scaleX(1); }
  .site-nav__list a[aria-current="page"] { color: var(--c-accent); }
  .site-nav__extra { display: none; }
}

/* Page hero (inner pages) --------------------------------------------------- */
.page-hero { padding: calc(var(--header-h) + clamp(3rem, 2rem + 4vw, 6rem)) 0 clamp(3rem, 2rem + 3vw, 5.5rem); position: relative; overflow: hidden; }
.page-hero h1 { max-width: 18ch; margin-top: var(--space-4); }
.page-hero .lead { margin-top: var(--space-6); color: var(--muted); }
.page-hero__motif { position: absolute; right: -6rem; top: 50%; width: clamp(18rem, 30vw, 30rem); translate: 0 -46%; color: var(--c-accent); opacity: .14; pointer-events: none; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--fs-sm); color: var(--muted); list-style: none; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: var(--space-2); opacity: .6; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--c-accent); }

/* Footer -------------------------------------------------------------------- */
.site-footer { position: relative; overflow: hidden; padding-top: clamp(3.5rem, 2.5rem + 4vw, 6rem); }
.site-footer__grid { display: grid; gap: var(--space-12); grid-template-columns: 1fr; position: relative; z-index: 1; }
.site-footer__brand img { width: 150px; height: auto; }
.site-footer__brand p { color: var(--muted); margin-top: var(--space-6); max-width: 34ch; font-size: 0.9375rem; }
.site-footer h2 { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; margin-bottom: var(--space-6); }
.site-footer__links { display: grid; gap: var(--space-3); font-size: 0.9375rem; }
.site-footer__links a { color: var(--muted); text-decoration: none; }
.site-footer__links a:hover { color: var(--c-accent); }
.site-footer__contact { display: grid; gap: var(--space-4); font-size: 0.9375rem; color: var(--muted); }
.site-footer__contact a:not(.btn) { color: inherit; text-decoration: none; display: inline-flex; gap: var(--space-3); align-items: center; }
.site-footer__contact a:not(.btn):hover { color: var(--c-accent); }
.site-footer__contact .btn { justify-self: start; }
.site-footer__contact a:not(.btn) svg { width: 18px; height: 18px; flex: none; color: var(--c-accent); }
.site-footer__bottom {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem); padding-block: var(--space-6);
  border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8);
  justify-content: space-between; align-items: center; font-size: var(--fs-sm); color: var(--muted); position: relative; z-index: 1;
}
.site-footer__bottom a { color: var(--c-accent); text-decoration: none; }
.site-footer__bottom a:hover { text-decoration: underline; }
.site-footer__motif { position: absolute; right: -8rem; bottom: -10rem; width: 34rem; color: var(--c-paper); opacity: .05; pointer-events: none; }
@media (min-width: 48rem) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .site-footer__grid { grid-template-columns: 1.5fr .9fr 1.2fr 1.3fr; gap: var(--space-8); } }

/* Main offset when the page has no dark hero at the top (none today, kept for WP pages) */
.main--offset { padding-top: var(--header-h); }
