/* MobiTrack section rhythm. Decoration never adds children to content modules. */
:root {
  --mt-rule: #d0dce8;
  --mt-section-space: 48px;
  --mt-guide-offset: max(calc(var(--site-gutter) / 2), calc((100% - var(--site-shell-width)) / 2 + var(--site-gutter) / 2));
}

/* Subtle separators against the analysis page's dark background. */
#page-mobilhome { --mt-rule: rgba(208, 220, 232, .14); }

/* Quiet outer guides, clear of cards, controls and reading columns. */
.page:is(#page-home, #page-recherche, #page-transport, #page-equipements, #page-pro, #page-pieces, #page-mobilhome, #page-compte, #page-achat-vente) {
  position: relative;
}
/* Guides stay inside page content, clear of the shared footer. */
.page.active:is(#page-home, #page-recherche, #page-transport, #page-equipements, #page-pro, #page-pieces, #page-mobilhome, #page-compte, #page-achat-vente)::after {
  content: '';
  position: absolute;
  top: 64px;
  bottom: 0;
  left: var(--mt-guide-offset);
  right: var(--mt-guide-offset);
  border-inline: 1px solid var(--mt-rule);
  opacity: .8;
  pointer-events: none;
  z-index: 2;
}
#page-equipements { overflow-x:clip; }
/* Keep both straight guides continuous beside the sell tile's outer curve. */
@media(min-width:681px){
  #page-home.page.active::after{
    left:var(--home-guide-inset,var(--mt-guide-offset));
    right:var(--home-guide-inset,var(--mt-guide-offset));
  }
}
/* Opaque homepage end sections cover the decorative guides. */
#page-home > :is(.home-powered-band, .home-footer) {
  position: relative;
  z-index: 3;
}

/* The outer arc echoes the sell tile while staying clear of the straight guide. */
#page-home > .hm-curve-guide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  overflow: hidden;
  clip-path: inset(64px 0 0);
  opacity: .8;
}
#page-home > .hm-curve-guide path {
  stroke: var(--mt-rule);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
@media(max-width:680px) {
  #page-home > .hm-curve-guide { display:none; }
}

/* Homepage: one distance between content and the surrounding guide lines. */
#page-home {
  --home-section-gap: 32px;
  --site-guide-gap: var(--home-section-gap);
  --site-content-gutter: calc(var(--site-gutter) / 2 + var(--site-guide-gap));
}
@media(max-width:680px) {
  #page-home { --home-section-gap: 24px; }
}
#page-home :is(#homeVision, #homeAnalyses, #hmTrend, #homeLatest, #homeProCta) {
  position: relative;
  margin-block: 0 !important;
  padding-top: var(--home-section-gap) !important;
  padding-bottom: var(--home-section-gap) !important;
}
#page-home #homeMosaic { padding-bottom: var(--home-section-gap) !important; }
#page-home :is(#homeVision, #homeAnalyses, #hmTrend, #homeLatest, #homeProCta)::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(var(--site-gutter) / 2);
  right: calc(var(--site-gutter) / 2);
  height: 1px;
  background: var(--mt-rule);
  pointer-events: none;
}
#page-home #homeVision > div,
#page-home #hmTrend > .tr242-shell,
#page-home #homeLatest > .lt89-shell {
  max-width: none !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: visible;
}
#page-home #hmTrend .tr242-header { margin-bottom: 20px; }
#page-home #hmTrend .tr242-toolbar { border-top: 0; padding-top: 0; }
#page-home #homeLatest .lt89-heading { margin-bottom: 26px; }

/* Trends and latest listings remain one group, sharing a single inner gap. */
#page-home #hmTrend { padding-bottom: calc(var(--home-section-gap) / 2) !important; }
#page-home #homeLatest { padding-top: calc(var(--home-section-gap) / 2) !important; }
#page-home #homeLatest::before { content: none; display: none; }

/* Inner sections share a line reaching the same outer guides. */
#page-pro :is(#ppCatalogue, #ppOffer),
#page-pieces :is(.pe-categories, .pe-catalog),
#page-recherche #mtSearchStart {
  position: relative;
}
#page-pro :is(#ppCatalogue, #ppOffer)::before,
#page-pieces :is(.pe-categories, .pe-catalog)::before,
#page-recherche #mtSearchStart::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(var(--site-gutter) / -2);
  right: calc(var(--site-gutter) / -2);
  height: 1px;
  background: var(--mt-rule);
  pointer-events: none;
}
#page-pro #ppCatalogue { margin-top: 12px; padding-top: 32px; }
#page-pro #ppOffer { margin-top: var(--mt-section-space); padding-block: var(--mt-section-space) !important; }
#page-pro #ppOffer .pp-offer-grid { margin-top: 0; }
#page-pieces .pe-categories { padding-block: 28px; }
#page-pieces .pe-catalog { margin-top: 0; padding-top: 36px; }
#page-recherche #mtSearchStart { margin-top: 32px; }
#page-recherche #mtSearchStart::before { top: -16px; }

/* Service headers share the homepage's one-pixel section rule. */
#page-transport .tx-shell > .tx-hero { padding-bottom: 48px; margin-bottom: 32px; }
#page-transport .tx-shell > .tx-hero::after {
  content: '';
  position: absolute;
  bottom: calc(var(--site-guide-gap) - 32px);
  left: calc(var(--site-gutter) / -2);
  right: calc(var(--site-gutter) / -2);
  height: 1px;
  background: var(--mt-rule);
  pointer-events: none;
}
#page-equipements .te-hero { margin-bottom:32px; }
#page-equipements .te-hero::after {
  content:'';
  position:absolute;
  left:0;
  right:0;
  height:1px;
  background:var(--mt-rule);
  box-shadow:0 0 0 100vmax var(--mt-rule);
  clip-path:inset(0 -100vmax);
  pointer-events:none;
}
#page-equipements .te-hero::after { bottom:0; }
#page-mobilhome .am62-hero { padding-bottom: 36px; }
#page-mobilhome :is(#anaSecCote, #anaSecComp) { position: relative; padding-top: 36px !important; }
#page-mobilhome :is(#anaSecCote, #anaSecComp)::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(var(--site-gutter) / 2);
  right: calc(var(--site-gutter) / 2);
  height: 1px;
  background: var(--mt-rule);
  pointer-events: none;
}

/* Extend only the one-pixel ink, never the layout width. */
#page-home :is(#homeVision, #homeAnalyses, #hmTrend, #homeLatest, #homeProCta)::before,
#page-pro :is(#ppCatalogue, #ppOffer)::before,
#page-pieces :is(.pe-categories, .pe-catalog)::before,
#page-recherche #mtSearchStart::before,
#page-transport .tx-shell > .tx-hero::after,
#page-mobilhome :is(#anaSecCote, #anaSecComp)::before {
  box-shadow: 0 0 0 100vmax var(--mt-rule);
  clip-path: inset(0 -100vmax);
}

@media(max-width:680px) {
  :root { --mt-section-space: 32px; }
  .page.active:is(#page-home, #page-recherche, #page-transport, #page-equipements, #page-pro, #page-pieces, #page-mobilhome, #page-compte, #page-achat-vente)::after { opacity:.75; }
  #page-home :is(#homeVision, #homeAnalyses, #hmTrend, #homeLatest, #homeProCta)::before,
  #page-mobilhome :is(#anaSecCote, #anaSecComp)::before {
    left: var(--site-gutter);
    right: var(--site-gutter);
  }
  #page-pro :is(#ppCatalogue, #ppOffer)::before,
  #page-pieces :is(.pe-categories, .pe-catalog)::before,
  #page-recherche #mtSearchStart::before,
  #page-transport .tx-shell > .tx-hero::after { left:0; right:0; }
  #page-transport .tx-shell > .tx-hero { padding-bottom:32px; margin-bottom:24px; }
  #page-equipements .te-hero { margin-bottom:24px; }
  #page-transport .tx-shell > .tx-hero::after { bottom:calc(var(--site-guide-gap) - 24px); }
  #page-pro #ppCatalogue { margin-top:0; padding-top:26px; }
  #page-pieces .pe-categories { padding-block:24px; }
}



/* Account cards use the same guide gap on each side of their section. */
#page-compte #compteLoggedIn .cp2-bar {
  position: relative;
  margin-block: calc(2 * var(--site-guide-gap));
}
#page-compte #compteLoggedIn .cp2-bar::after {
  content: '';
  position: absolute;
  left: calc(-1 * var(--site-guide-gap));
  right: calc(-1 * var(--site-guide-gap));
  height: 1px;
  background: var(--mt-rule);
  box-shadow: 0 0 0 100vmax var(--mt-rule);
  clip-path: inset(0 -100vmax);
  pointer-events: none;
}
#page-compte #compteLoggedIn .cp2-bar::after { bottom: calc(-1 * var(--site-guide-gap)); }

/* Consistent introduction bands across the four service pages. */
#page-pro .pp-hero,
#page-pieces .pe-hero,
#page-equipements .te-hero,
#page-transport .tx-shell > .tx-hero {
  box-sizing:border-box; min-height:360px; padding:32px 0;
  margin-bottom:24px; align-items:center; gap:32px;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
}
#page-pro .pp-hero h1,
#page-pieces .pe-hero h1,
#page-equipements .te-hero h1,
#page-transport .tx-hero h1 {
  font-size:clamp(34px,3.5vw,46px); line-height:1.08;
}
#page-pro .pp-visual,
#page-pieces .pe-visual,
#page-equipements .te-visual,
#page-transport .tx-hero .tx-visual {height:260px; min-height:0;}
@media(max-width:760px){
  #page-pro .pp-hero,#page-pieces .pe-hero,#page-equipements .te-hero,#page-transport .tx-shell > .tx-hero {
    min-height:0; padding:24px 0; margin-bottom:20px;
    grid-template-columns:minmax(0,1fr); gap:28px;
  }
  #page-pro .pp-visual,#page-pieces .pe-visual,#page-equipements .te-visual,#page-transport .tx-hero .tx-visual {height:210px; width:100%; margin:0 auto;}
  #page-pro .pp-hero h1,#page-pieces .pe-hero h1,#page-equipements .te-hero h1,#page-transport .tx-hero h1 {font-size:clamp(32px,7vw,40px);}
}
