/* Bachmara — theme neutralisation + preloader v3 (robot). Loaded after bachmara.css. */

/* 1. Take the page away from the theme chrome.
   NOTE: never target bare `article` here — the service tiles are <article>. */
body.bachmara-page #masthead,
body.bachmara-page .site-header,
body.bachmara-page .ast-above-header,
body.bachmara-page .ast-below-header,
body.bachmara-page .ast-mobile-header-wrap,
body.bachmara-page #colophon,
body.bachmara-page .site-footer,
body.bachmara-page .ast-scroll-top,
body.bachmara-page .entry-header,
body.bachmara-page .page-title,
body.bachmara-page .ast-breadcrumbs-wrapper{display:none!important}

body.bachmara-page{background:var(--ox)!important;padding:0!important;margin:0!important}
body.bachmara-page #page,
body.bachmara-page #content,
body.bachmara-page .site-content,
body.bachmara-page .ast-container,
body.bachmara-page .ast-row,
body.bachmara-page .site-main,
body.bachmara-page #primary,
body.bachmara-page .ast-article-single,
body.bachmara-page .ast-article-post,
body.bachmara-page .entry-content{max-width:none!important;width:100%!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;display:block!important}
body.bachmara-page .entry-content>*{margin-block:0!important}

/* 2. Stop theme typography and link colours leaking in */
#bach a,#bach a:hover,#bach a:focus,#bach a:visited{color:inherit;text-decoration:none;box-shadow:none}
#bach h1,#bach h2,#bach h3,#bach h4{color:inherit;font-family:var(--disp)!important;margin:0}
#bach p,#bach small,#bach li{font-family:var(--body)}
#bach .ar,#bach .glyph,#bach .kar{font-family:var(--ar)!important}
#bach .rail .mark b{color:var(--bone)}
#bach .rail .mark>span>span{color:var(--gold)}
#bach input,#bach select,#bach textarea,#bach button{font-family:var(--body);box-shadow:none}
#bach button{border-radius:999px}

/* 3. Re-assert the service tiles (theme resets had flattened them) */
#bach .mosaic{display:grid!important;grid-template-columns:repeat(4,1fr);gap:14px;align-items:stretch}
#bach .mosaic .tile{position:relative!important;display:flex!important;flex-direction:column!important;justify-content:flex-end!important;
  background:var(--deep)!important;border:1px solid rgba(217,174,82,.22)!important;
  padding:56px 22px 26px!important;margin:0!important;min-height:280px!important;max-width:none!important;
  overflow:hidden!important;border-radius:0!important}
#bach .mosaic .tile.big{grid-column:span 2;min-height:330px!important}
#bach .mosaic .tile .frame{top:18px;height:46%;max-height:150px}
#bach .mosaic .tile:hover .frame{height:52%}
#bach .mosaic .tile h3{max-width:18ch}
@media(max-width:980px){#bach .mosaic{grid-template-columns:repeat(2,1fr)}#bach .mosaic .tile.big{grid-column:span 2}}
@media(max-width:600px){#bach .mosaic{grid-template-columns:1fr}#bach .mosaic .tile.big{grid-column:span 1}#bach .mosaic .tile{min-height:230px!important}}

/* 4. Logo lockup */
#bach .rail .mark img,#bach footer.site img{filter:none}
#bach .rail .mark img{height:44px;width:auto}
#bach footer.site img{height:96px;width:auto;opacity:.95}

/* 5. PRELOADER v3 — a cleaning robot sweeping the floor */
#bach-pre{position:fixed;inset:0;z-index:200;background:var(--teal-d);overflow:hidden;display:block;transition:opacity .55s ease,visibility .55s}
#bach-pre.done{opacity:0;visibility:hidden}
#bach-pre .floor{position:absolute;inset:0;background:
  repeating-linear-gradient(90deg,rgba(242,234,224,.045) 0 1px,transparent 1px 64px),
  repeating-linear-gradient(0deg,rgba(242,234,224,.045) 0 1px,transparent 1px 64px),
  linear-gradient(160deg,#06322E,#062F2C)}
#bach-pre .dirt{position:absolute;inset:0;clip-path:inset(0 0 0 0);background:
  radial-gradient(circle at 18% 22%,rgba(176,152,116,.42),transparent 12%),
  radial-gradient(circle at 63% 15%,rgba(176,152,116,.34),transparent 10%),
  radial-gradient(circle at 84% 34%,rgba(176,152,116,.40),transparent 13%),
  radial-gradient(circle at 32% 47%,rgba(176,152,116,.36),transparent 11%),
  radial-gradient(circle at 72% 58%,rgba(176,152,116,.42),transparent 12%),
  radial-gradient(circle at 12% 68%,rgba(176,152,116,.32),transparent 10%),
  radial-gradient(circle at 48% 78%,rgba(176,152,116,.40),transparent 12%),
  radial-gradient(circle at 88% 84%,rgba(176,152,116,.34),transparent 11%),
  repeating-linear-gradient(112deg,rgba(160,138,104,.16) 0 2px,transparent 2px 9px),
  rgba(150,128,96,.30)}
#bach-pre .trail{position:absolute;left:0;right:0;top:0;height:0;background:linear-gradient(180deg,transparent,rgba(18,114,106,.35));pointer-events:none}
#bach-pre .bot{position:absolute;left:0;top:0;width:92px;height:92px;margin:-46px 0 0 -46px;will-change:transform}
#bach-pre .bot .body{position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 34% 30%,#A8121D,#78050C 62%,#4A0207);border:2px solid var(--gold);box-shadow:0 14px 30px rgba(0,0,0,.45),inset 0 -8px 18px rgba(0,0,0,.35)}
#bach-pre .bot .ring{position:absolute;inset:14px;border-radius:50%;border:1px dashed rgba(217,174,82,.55);animation:bachspin 3.4s linear infinite}
#bach-pre .bot .eye{position:absolute;top:32%;width:12px;height:12px;border-radius:50%;background:var(--gold);box-shadow:0 0 12px rgba(217,174,82,.9)}
#bach-pre .bot .eye.l{left:26%}
#bach-pre .bot .eye.r{right:26%}
#bach-pre .bot .mouth{position:absolute;left:50%;top:56%;width:34px;height:6px;margin-left:-17px;border-radius:4px;background:rgba(242,234,224,.75)}
#bach-pre .bot .brush{position:absolute;left:50%;bottom:-13px;width:74px;height:22px;margin-left:-37px;border-radius:0 0 40px 40px;background:conic-gradient(from 0deg,rgba(217,174,82,.9),rgba(242,234,224,.35),rgba(217,174,82,.9),rgba(242,234,224,.35),rgba(217,174,82,.9));animation:bachspin .55s linear infinite;opacity:.9}
#bach-pre .bot .sensor{position:absolute;left:50%;top:-16px;width:2px;height:16px;margin-left:-1px;background:var(--gold)}
#bach-pre .bot .sensor::after{content:"";position:absolute;top:-7px;left:-4px;width:10px;height:10px;border-radius:50%;background:var(--gold);animation:bachblink 1.4s ease-in-out infinite}
@keyframes bachspin{to{transform:rotate(360deg)}}
@keyframes bachblink{0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(217,174,82,.6)}50%{opacity:.5;box-shadow:0 0 0 10px rgba(217,174,82,0)}}
#bach-pre .box{position:absolute;left:0;right:0;bottom:clamp(26px,7vh,60px);text-align:center;padding:0 24px}
#bach-pre .n{font-family:var(--disp);font-weight:900;font-size:clamp(54px,12vw,112px);line-height:.86;color:var(--gold);letter-spacing:-.05em;font-variant-numeric:tabular-nums}
#bach-pre .t{font-family:var(--body);font-size:11px;letter-spacing:.32em;text-transform:uppercase;color:rgba(242,234,224,.62);margin-top:14px}
#bach-pre .t b{display:block;font-family:var(--ar);font-size:15px;letter-spacing:0;color:var(--gold);margin-top:8px;direction:rtl;font-weight:400}
#bach-pre .rule{position:absolute;left:0;bottom:0;height:3px;background:var(--gold);width:0%}
@media(max-width:600px){#bach-pre .bot{width:68px;height:68px;margin:-34px 0 0 -34px}#bach-pre .bot .brush{width:54px;margin-left:-27px}}
@media(prefers-reduced-motion:reduce){#bach-pre{display:none!important}}

/* 6. Centre the header nav; logo stays left, WhatsApp button right */
#bach .rail nav{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin:0!important;gap:30px;white-space:nowrap}
#bach .rail .mark{margin-right:auto}
#bach .rail>.btn{margin-left:auto}
@media(max-width:1080px){#bach .rail nav{gap:20px;font-size:13px}}
@media(max-width:900px){#bach .rail nav{display:none}}

/* 7. Preloader counter + label centred in the viewport */
#bach-pre .box{top:50%;bottom:auto;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none;z-index:3}
#bach-pre .n{text-shadow:0 6px 26px rgba(6,47,44,.75)}
#bach-pre .t{text-shadow:0 3px 14px rgba(6,47,44,.8)}

/* 8. Footer in deep green instead of oxblood */
#bach footer.site{background:var(--teal-d)!important;border-top:1px solid rgba(217,174,82,.28)}
#bach footer.site a:hover{color:var(--gold)}
#bach .legal{border-top-color:rgba(255,255,255,.18)}

/* 10. Kill the scroll-to-top button (it sat on the WhatsApp button) */
#ast-scroll-top,.ast-scroll-top,#ast-scroll-top-icon,.ast-scroll-to-top-right,.ast-scroll-to-top-left,body.bachmara-page #ast-scroll-top{display:none!important;opacity:0!important;pointer-events:none!important}

/* 11. Hero: use the full width on large screens, text further left */
@media(min-width:1400px){#bach .hero .wrap{max-width:1660px}}
@media(min-width:1800px){#bach .hero .wrap{max-width:1800px}}

/* 12. Button labels must never inherit the page colour on hover */
#bach .btn-gold,#bach .btn-gold:hover,#bach .btn-gold:focus{color:#3D0106!important}
#bach .btn-teal,#bach .btn-teal:hover,#bach .btn-teal:focus{color:var(--bone)!important}
#bach .btn-line{color:var(--bone)!important}
#bach .btn-line:hover,#bach .btn-line:focus{color:var(--gold)!important;border-color:var(--gold)}
#bach .contact .btn-gold,#bach .contact .btn-gold:hover{color:#3D0106!important}

/* 13. Service tiles: real photography behind the copy */
#bach .mosaic .tile[data-img]{background-size:cover;background-position:center 32%;background-repeat:no-repeat}
#bach .mosaic .tile[data-img]::before{content:"";position:absolute;inset:0;z-index:0;
  background:linear-gradient(180deg,rgba(61,1,6,.42) 0%,rgba(61,1,6,.62) 42%,rgba(61,1,6,.93) 100%);transition:.55s var(--e)}
#bach .mosaic .tile[data-img]:hover::before{background:linear-gradient(180deg,rgba(6,47,44,.55) 0%,rgba(6,47,44,.78) 45%,rgba(6,47,44,.95) 100%)}
#bach .mosaic .tile[data-img]::after{opacity:0}
#bach .mosaic .tile[data-img] .frame{opacity:.55}
#bach .mosaic .tile[data-img] p{color:rgba(242,234,224,.82)}
#bach .mosaic .tile[data-img="canapes"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/canapes.jpg')}
#bach .mosaic .tile[data-img="tapis"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/tapis.jpg')}
#bach .mosaic .tile[data-img="rideaux"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/rideaux.jpg')}
#bach .mosaic .tile[data-img="vitres"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/vitres.jpg')}
#bach .mosaic .tile[data-img="grand-menage"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/grand-menage.jpg')}
#bach .mosaic .tile[data-img="bureaux"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/bureaux.jpg')}
#bach .mosaic .tile[data-img="chantier"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/chantier.jpg')}
#bach .mosaic .tile[data-img="airbnb"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/airbnb.jpg')}

/* 14. Fix: rule 3 sets `background:var(--deep)!important` which was killing the photos */
#bach .mosaic .tile[data-img]{background-color:var(--deep)!important;background-size:cover!important;background-position:center 32%!important;background-repeat:no-repeat!important}
#bach .mosaic .tile[data-img="canapes"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/canapes.jpg')!important}
#bach .mosaic .tile[data-img="tapis"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/tapis.jpg')!important}
#bach .mosaic .tile[data-img="rideaux"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/rideaux.jpg')!important}
#bach .mosaic .tile[data-img="vitres"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/vitres.jpg')!important}
#bach .mosaic .tile[data-img="grand-menage"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/grand-menage.jpg')!important}
#bach .mosaic .tile[data-img="bureaux"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/bureaux.jpg')!important}
#bach .mosaic .tile[data-img="chantier"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/chantier.jpg')!important}
#bach .mosaic .tile[data-img="airbnb"]{background-image:url('https://bachmaracleaning.com/wp-content/uploads/bachmara/services/airbnb.jpg')!important}

/* 15. Avant / Apres — curseur comparatif */
#bach .ba-wrap{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
#bach .ba{position:relative;margin:0;overflow:hidden;border:1px solid rgba(217,174,82,.3);background:var(--deep);
  aspect-ratio:3/2;cursor:ew-resize;touch-action:pan-y;user-select:none;-webkit-user-select:none}
#bach .ba img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
#bach .ba .ba-before{position:absolute;inset:0;width:var(--ba,50%);overflow:hidden;will-change:width}
#bach .ba .ba-before img{width:auto;height:100%;max-width:none;left:0;top:0}
#bach .ba .ba-tag{position:absolute;top:14px;z-index:4;font-family:var(--body);font-size:10px;letter-spacing:.22em;
  text-transform:uppercase;font-weight:700;padding:6px 11px;border:1px solid rgba(242,234,224,.3);
  background:rgba(61,1,6,.62);color:var(--bone);pointer-events:none;backdrop-filter:blur(3px)}
#bach .ba .ba-tag.left{left:14px}
#bach .ba .ba-tag.right{right:14px;background:var(--gold);color:#3D0106;border-color:var(--gold)}
#bach .ba .ba-handle{position:absolute;top:0;bottom:0;left:var(--ba,50%);width:3px;margin-left:-1.5px;
  background:var(--gold);z-index:5;pointer-events:none;box-shadow:0 0 18px rgba(217,174,82,.5)}
#bach .ba .ba-handle i{position:absolute;left:50%;top:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;
  background:var(--gold);box-shadow:0 8px 22px rgba(0,0,0,.4)}
#bach .ba .ba-handle i::before,#bach .ba .ba-handle i::after{content:"";position:absolute;top:50%;width:0;height:0;
  border-top:6px solid transparent;border-bottom:6px solid transparent;margin-top:-6px}
#bach .ba .ba-handle i::before{left:11px;border-right:7px solid #3D0106}
#bach .ba .ba-handle i::after{right:11px;border-left:7px solid #3D0106}
#bach .ba figcaption{position:absolute;left:0;right:0;bottom:0;z-index:4;padding:38px 18px 16px;pointer-events:none;
  background:linear-gradient(180deg,transparent,rgba(61,1,6,.92));display:flex;justify-content:space-between;align-items:baseline;gap:12px}
#bach .ba figcaption b{font-family:var(--disp);font-weight:800;font-size:17px;text-transform:uppercase;letter-spacing:-.01em;color:var(--bone)}
#bach .ba figcaption span{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--gold)}
#bach .ba:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
@media(max-width:980px){#bach .ba-wrap{grid-template-columns:1fr;gap:14px}#bach .ba{aspect-ratio:16/11}}