/* ==========================================================================
   E-NETT — version moderne : mise en page commune à toutes les pages
   En-tête (navigation, sous-menu des secteurs, téléphone, « Estimer mon prix »), menu plein écran,
   barre d’accès rapide (téléphone), entrée de page intérieure (.page-hero), fil d’Ariane,
   bandeau d’appel final (.appel), pied de page, curseur.
   Points de rupture : navigation complète ≥ 1100 px ; menu plein écran en dessous ; barre « Estimer / Appeler » < 900 px.
   ========================================================================== */

/* ---------- En-tête (toujours visible : téléphone et estimation à portée de main) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center; gap: clamp(10px, 1.3vw, 24px);
  padding: 0 var(--gutter);
  color: var(--craie);
  transition: color .45s, background-color .45s, box-shadow .45s;
}
.site-header[data-theme="light"] { color: var(--marine); }
.site-header.is-solid { background: var(--marine); }
.site-header.is-solid[data-theme="light"] { background: var(--craie); box-shadow: 0 1px 0 var(--marine-10); }
.site-header.is-menu { background: transparent; box-shadow: none; color: var(--craie); }
html:not(.js) .site-header { background: var(--marine); color: var(--craie); --fg: var(--craie); --bg: var(--marine); } /* sans JavaScript : en-tête plein, lisible partout */
.brand { display: block; flex: none; width: clamp(100px, 8.4vw, 128px); color: inherit; text-decoration: none; }
.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: clamp(14px, 1.5vw, 30px); }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__link {
  position: relative; display: block; padding: 8px 0;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .07em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 2px; width: 100%; height: 2px; background: var(--vert);
  transform: scaleX(0); transform-origin: right center; transition: transform .55s var(--ease-sweep);
}
.nav__link:hover::after, .nav__link:focus-visible::after, .nav__link[aria-current]::after { transform: scaleX(1); transform-origin: left center; }
.nav__toggle { display: grid; place-items: center; width: 26px; height: 34px; margin-right: -6px; }
.nav__chev { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .35s var(--ease-out); }
.nav__toggle[aria-expanded="true"] .nav__chev { transform: translateY(2px) rotate(-135deg); }

/* Sous-menu des six secteurs : survol (souris) ou bouton (clavier, tactile) */
.subnav {
  --fg: var(--craie); --bg: var(--nuit); --muted: rgba(243, 244, 241, .74); --line: rgba(243, 244, 241, .18); --focus: var(--craie);
  position: absolute; left: -22px; top: calc(50% + var(--header-h) / 2); z-index: 2;
  width: min(480px, calc(100vw - 2 * var(--gutter)));
  padding: 10px 0 0; background: var(--nuit); color: var(--craie);
  box-shadow: 0 24px 60px rgba(5, 28, 49, .35), inset 0 0 0 1px rgba(243, 244, 241, .08);
  visibility: hidden; opacity: 0; transform: translate3d(0, -8px, 0);
  transition: opacity .22s, transform .4s var(--ease-out), visibility 0s linear .4s;
}
.subnav::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: calc(var(--header-h) / 2 - 18px); } /* pont de survol entre le lien (34 px, centré) et le panneau : ne recouvre pas le lien */
.has-sub.is-open > .subnav { visibility: visible; opacity: 1; transform: none; transition: opacity .22s, transform .4s var(--ease-out), visibility 0s; }
@media (hover: hover) and (pointer: fine) {
  .has-sub:hover > .subnav { visibility: visible; opacity: 1; transform: none; transition: opacity .22s, transform .4s var(--ease-out), visibility 0s; }
}
.subnav__list a {
  position: relative; display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline; gap: 12px;
  padding: 13px 22px; text-decoration: none; transition: background-color .25s;
}
.subnav__list a::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--vert); transform: scaleY(0); transition: transform .35s var(--ease-out); }
.subnav__list a:hover, .subnav__list a:focus-visible { background: rgba(243, 244, 241, .06); }
.subnav__list a:hover::before, .subnav__list a:focus-visible::before, .subnav__list a[aria-current]::before { transform: none; }
.subnav__list a:focus-visible { outline-offset: -3px; }
.subnav__n { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.subnav__t { font-size: 16px; line-height: 1.25; font-weight: 600; font-stretch: 106%; }
.subnav__d { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.subnav__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 6px; padding: 16px 22px 18px; border-top: 1px solid var(--line); }
.subnav__foot .link-arrow { font-size: 15px; }
.subnav__foot .mono { color: var(--muted); font-size: 10.5px; }

.btn--est { margin-left: clamp(4px, .8vw, 12px); }
.btn--call { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
.btn--call .btn__long { white-space: nowrap; }
.site-header .btn--call:hover { background: rgba(127, 140, 150, .14); }
.menu-btn { display: none; min-height: 44px; padding: 0 0 0 6px; letter-spacing: .08em; }
html.intro-on .site-header .brand { visibility: hidden; }
/* Barre du dossier de présentation (site/tools/build-presentation.mjs) : masquée pendant l’ouverture */
html.intro-on .pv-switch, html.intro-on .pv-tab { opacity: 0 !important; pointer-events: none; }
html.intro-on .site-header [data-intro-hide] { opacity: 0; }
@media (max-width: 1279px) {
  .site-header .btn__long { display: none; }
  .site-header .btn__short { display: inline; }
}
@media (max-width: 1099px) {
  .nav { display: none; }
  .btn--est { margin-left: auto; }
  .menu-btn { display: inline-flex; align-items: center; }
}
@media (max-width: 899px) {
  .btn--est { display: none; }
  .btn--call { margin-left: auto; }
}

/* ---------- Menu plein écran (sous 1100 px) ---------- */
.menu {
  --fg: var(--craie); --bg: var(--nuit); --muted: rgba(243, 244, 241, .72); --line: rgba(243, 244, 241, .2); --focus: var(--craie);
  position: fixed; inset: 0; z-index: 58;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: calc(var(--header-h) + 20px) var(--gutter) max(24px, env(safe-area-inset-bottom));
  background: var(--nuit); color: var(--craie);
  overflow-y: auto; overscroll-behavior: contain;
}
.menu[hidden] { display: none; }
.menu__list > li { overflow: hidden; }
.menu__list > li > a {
  display: flex; align-items: baseline; gap: 16px; padding: 6px 0;
  font-size: clamp(1.625rem, 1rem + 3.4vw, 2.5rem); line-height: 1.1; font-weight: 700; font-stretch: 112%; letter-spacing: -.025em;
  text-decoration: none;
}
.menu__list > li > a .mono { flex: none; width: 34px; color: var(--muted); }
.menu__list > li > a[aria-current]::after { content: ""; align-self: center; width: 22px; height: 3px; background: var(--vert); }
.menu__sub { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; max-width: 40rem; margin: 2px 0 12px 50px; padding-left: 0; } /* aligné sur le texte des liens (numéro 34 px + 16 px) */
.menu__sub a { display: block; padding: 7px 0; font-size: 15.5px; line-height: 1.3; color: var(--muted); text-decoration: none; }
.menu__sub a:hover, .menu__sub a[aria-current] { color: var(--craie); text-decoration: underline; text-decoration-color: var(--vert); text-underline-offset: 4px; }
.menu__foot { display: grid; gap: 14px; }
.menu__contact { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 18px; }
.menu__contact a { text-decoration: none; }
.menu__hours { color: var(--muted); text-transform: none; letter-spacing: .02em; }
@media (max-width: 480px) { .menu__sub { grid-template-columns: 1fr; } .menu__sub a { padding: 6px 0; font-size: 15px; } }
@media (max-width: 1099px) { .menu__foot .btn { max-width: 420px; } }

/* ---------- Barre d’accès rapide (petits écrans) ---------- */
.mbar { display: none; }
@media (max-width: 899px) {
  .mbar {
    --fg: var(--craie); --bg: var(--marine);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 57;
    display: grid; grid-template-columns: 1fr auto; gap: 8px;
    padding: 10px var(--gutter) max(10px, env(safe-area-inset-bottom));
    background: rgba(5, 28, 49, .97); color: var(--craie);
    box-shadow: 0 -1px 0 rgba(243, 244, 241, .16);
    transform: translate3d(0, 110%, 0); visibility: hidden;
    transition: transform .45s var(--ease-out), visibility 0s linear .45s;
  }
  .mbar.is-on { transform: none; visibility: visible; transition: transform .45s var(--ease-out), visibility 0s; }
  .mbar .btn { min-height: 48px; justify-content: center; }
  .mbar__call { padding: 0 20px; }
  .footer { padding-bottom: calc(max(28px, env(safe-area-inset-bottom)) + 70px) !important; }
  /* Dossier de présentation : la barre « Versions » remonte au-dessus de la barre d’accès rapide */
  html.mbar-on .pv-switch--low, html.mbar-on .pv-tab { bottom: calc(80px + env(safe-area-inset-bottom)); }
  /* Focus clavier (WCAG 2.4.11) et ancres : rien ne s’arrête sous la barre. Posé dès qu’elle peut apparaître (et pas
     seulement quand elle est affichée) : sinon un élément atteint depuis le haut de page passerait dessous juste après. */
  html { scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ---------- Fil d’Ariane ---------- */
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-family: var(--f-mono); font-size: 11.5px; line-height: 1.5; letter-spacing: .05em; text-transform: uppercase; }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin: 0 .7em; color: var(--muted); }
.breadcrumb a { text-decoration: none; color: var(--muted); }
.breadcrumb a:hover { color: var(--fg); text-decoration: underline; text-decoration-color: var(--vert); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.breadcrumb [aria-current] { color: var(--fg); }

/* ---------- Entrée de page intérieure ({{@ pageHero }}, piloté par le front-matter) ---------- */
.page-hero {
  padding: calc(var(--header-h) + clamp(24px, 4.5vh, 56px)) 0 clamp(44px, 7vh, 88px);
  background: var(--bg); color: var(--fg); overflow: hidden;
}
.page-hero .breadcrumb { margin-bottom: clamp(22px, 4vh, 44px); }
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 96px); align-items: end; }
.page-hero--text .page-hero__grid { grid-template-columns: minmax(0, 1fr); }
.page-hero__kicker { margin-bottom: clamp(14px, 2vw, 22px); }
.page-hero__title {
  font-size: var(--t-h1); line-height: 1.02; font-weight: 720; font-stretch: 114%; letter-spacing: -.03em;
  max-width: 15em; text-wrap: balance;
}
.page-hero__lede { margin-top: clamp(16px, 2.4vh, 26px); max-width: 38em; font-size: var(--t-lede); line-height: 1.5; }
.page-hero__lede a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.page-hero__lede a:hover { text-decoration-color: var(--vert); text-decoration-thickness: 2px; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(20px, 3vh, 30px); }
.page-hero__facts {
  display: flex; flex-wrap: wrap; gap: 12px clamp(20px, 2.6vw, 40px);
  margin-top: clamp(22px, 3.4vh, 34px); padding-top: 16px; border-top: 1px solid var(--line);
}
.page-hero__facts li { display: grid; gap: 2px; }
.page-hero__facts .mono { color: var(--muted); font-size: 11.5px; }
.page-hero__facts b { font-size: 16px; font-weight: 600; font-stretch: 106%; }
.page-hero__note { margin-top: 12px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.page-hero__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3.3; background: var(--line-soft); }
.page-hero__media picture, .page-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.page-hero__media img { object-fit: cover; }
.page-hero__cap { position: absolute; left: 12px; bottom: 12px; z-index: 2; padding: 4px 8px; background: rgba(5, 28, 49, .72); color: var(--craie); text-transform: none; letter-spacing: .02em; }
@media (max-width: 899px) {
  .page-hero__grid { grid-template-columns: 1fr; gap: 28px; }
  .page-hero__media { aspect-ratio: 16 / 10; max-height: 46vh; }
  .page-hero__actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 599px) {
  .page-hero__facts { display: grid; grid-template-columns: 1fr 1fr; }
  .page-hero__title { font-stretch: 108%; letter-spacing: -.026em; }
}
/* Entrée courte (js/motion.js) : états de départ, seulement tant que html.enter est posée (900 ms au plus) */
html.enter .page-hero__title, html.enter .page-hero__kicker, html.enter .page-hero [data-enter], html.enter .page-hero .breadcrumb { opacity: 0; }
/* Pendant l’entrée, les blocs animés des sections suivantes restent aussi masqués (utile quand l’entrée est courte et
   qu’une section apparaît dans le premier écran) : pas d’affichage puis disparition avant leur révélation.
   motion.js retire html.enter puis prépare les révélations (setupReveals) avant l’affichage suivant. */
html.enter main > .section:not(.page-hero) :is(.kicker, [data-split], [data-fade], [data-stagger] > *) { opacity: 0; }

/* Révélation par la raclette ([data-wipe]) : un voile de la couleur du fond, bordé du trait vert, glisse vers la droite */
[data-wipe] { position: relative; overflow: hidden; } /* le voile parti à droite ne doit pas élargir la page */
html.motion [data-wipe]::after {
  content: ""; position: absolute; inset: 0 -12px 0 0; z-index: 3; pointer-events: none;
  background: var(--bg); border-left: clamp(6px, .6vw, 10px) solid var(--vert);
  transform: translate3d(0, 0, 0); transition: transform 1.05s var(--ease-sweep);
}
html.motion [data-wipe].is-in::after, html.motion [data-wipe].is-shown::after { transform: translate3d(101%, 0, 0); }
/* Photo de l’entrée de page : voilée seulement pendant l’entrée (html.enter, puis .is-wait jusqu’au passage de la raclette).
   Si l’entrée n’a pas lieu (chargement lent), le voile part tout seul quand html.enter est retirée. */
html.motion .page-hero [data-wipe]:not(.is-wait)::after { transform: translate3d(101%, 0, 0); }
html.enter .page-hero [data-wipe]:not(.is-wait)::after { transform: none; }

/* ---------- Bandeau d’appel final ({{> cta }}) ---------- */
.appel { padding: clamp(100px, 15vh, 190px) 0 clamp(80px, 11vh, 140px); }
.appel__title {
  position: relative; overflow: hidden; padding-bottom: .06em;
  font-size: var(--t-call); line-height: .96; font-weight: 800; font-stretch: 120%; letter-spacing: -.04em;
  text-wrap: balance;
}
.appel__base { display: block; }
.appel__wipe { display: none; }
html.motion .appel__base { color: transparent; -webkit-text-stroke: 1.5px var(--muted); }
html.motion .appel__wipe { display: block; position: absolute; inset: 0; overflow: hidden; transform: translate3d(-100%, 0, 0); will-change: transform; }
.appel__fill { display: block; color: var(--fg); transform: translate3d(100%, 0, 0); will-change: transform; }
.appel__edge { position: absolute; right: 0; top: 4%; bottom: 10%; width: clamp(5px, .5vw, 9px); background: var(--vert); box-shadow: 0 0 30px rgba(26, 154, 75, .5); }
.appel__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(24px, 3vw, 56px); margin-top: clamp(44px, 5vw, 80px); border-top: 1px solid var(--line); }
.appel__item { display: grid; gap: 10px; padding-top: 22px; text-decoration: none; align-content: start; }
.appel__item .mono { color: var(--muted); }
.appel__big { font-size: clamp(1.375rem, 1rem + 1.2vw, 2.125rem); line-height: 1.15; font-weight: 650; font-stretch: 108%; letter-spacing: -.02em; overflow-wrap: anywhere; }
a.appel__item:hover .appel__big { text-decoration: underline; text-decoration-color: var(--vert); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.appel__small { font-size: 16px; line-height: 1.5; max-width: 30ch; }
.appel__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(36px, 4.5vw, 64px); }
@media (max-width: 899px) { .appel__grid { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Pied de page ---------- */
.footer {
  --fg: var(--craie); --bg: var(--nuit); --muted: rgba(243, 244, 241, .72); --line: rgba(243, 244, 241, .2); --focus: var(--craie);
  position: relative; overflow: hidden;
  padding: clamp(50px, 7vw, 90px) 0 max(28px, env(safe-area-inset-bottom));
  background: var(--nuit); color: var(--craie);
}
.footer__logo { width: min(100%, 40rem); margin-bottom: clamp(36px, 4.5vw, 64px); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)); gap: 36px clamp(24px, 3vw, 56px); padding-top: 26px; border-top: 1px solid var(--line); }
.footer__about p { max-width: 34ch; font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.footer__contact { display: grid; gap: 4px; margin-top: 18px; font-style: normal; font-size: 15.5px; }
.footer__contact a { text-decoration: none; }
.footer__tel { font-size: clamp(1.25rem, 1rem + .6vw, 1.5rem); font-weight: 650; font-stretch: 108%; letter-spacing: -.01em; }
.footer__contact .muted { color: var(--muted); }
.footer__title { margin-bottom: 12px; color: var(--muted); font-weight: 400; }
.footer__col li + li { margin-top: 6px; }
.footer__col a, .footer__contact a { text-decoration: none; }
.footer__col a:hover, .footer__contact a:hover, .footer__col a[aria-current] { text-decoration: underline; text-decoration-color: var(--vert); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.footer__col a { font-size: 15.5px; }
.footer__legal { margin-top: clamp(36px, 4vw, 56px); padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
@media (max-width: 1099px) { .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .footer__about { grid-column: 1 / -1; } }
@media (max-width: 599px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__col--legal { grid-column: 1 / -1; } }

/* ---------- Curseur personnalisé (pointeur fin seulement) ---------- */
.cursor { display: none; }
html.has-cursor .cursor { display: block; position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; opacity: 0; will-change: transform; }
.cursor__ring {
  position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid #fff; mix-blend-mode: difference;
  transition: transform .5s var(--ease-out), opacity .4s;
}
.cursor[data-mode="link"] .cursor__ring { transform: scale(1.55); }
.cursor__label {
  position: absolute; left: -34px; top: -34px; width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center; background: var(--craie); color: var(--marine);
  transform: scale(0); transition: transform .55s var(--ease-out);
}
.cursor[data-mode="voir"] .cursor__label { transform: scale(1); }
.cursor[data-mode="voir"] .cursor__ring { opacity: 0; }
