/* ============================================================
   BG PLOMBERIE CHAUFFAGE — Navigation unifiée (v18)
   Même menu sur toutes les pages :
   Accueil · Services ▾ · Réalisations ▾ · À propos · Zone · Devis
   - Desktop : sous-menus au survol (souris) ou au clic sur la flèche
   - Mobile  : panneau plein écran, groupes Services / Réalisations
   ============================================================ */

.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ─── Liens de premier niveau ─── */
.nlinks > li { position: relative; display: flex; align-items: center; }
.nlinks > li > a:not(.ncta) { position: relative; padding: 0.4rem 0; }
.nlinks > li > a:not(.ncta)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -0.15rem; height: 1px;
  background: linear-gradient(90deg, transparent, var(--c4), transparent);
  transform: scaleX(0); transition: transform 0.45s cubic-bezier(.2,.8,.2,1);
}
.nlinks > li > a:not(.ncta):hover::after,
.nlinks > li.is-current > a:not(.ncta)::after { transform: scaleX(1); }
.nlinks > li.is-current > a:not(.ncta) { color: var(--c4); }

/* Flèche des sous-menus */
.nsub-btn {
  display: inline-grid; place-items: center;
  width: 1.6rem; height: 1.6rem; margin-left: 0.25rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--white-40); border-radius: 50%;
  transition: color 0.3s, background 0.3s;
}
.nsub-btn svg { width: 0.62rem; height: 0.62rem; transition: transform 0.35s cubic-bezier(.2,.8,.2,1); }
.nsub-btn:hover, .nsub.is-open .nsub-btn, .nsub.is-current .nsub-btn { color: var(--c4); }
.nsub.is-open .nsub-btn svg { transform: rotate(180deg); }
.nsub-btn:focus-visible { outline: 1px solid var(--c4); outline-offset: 2px; }
.nsub.is-open > .nsub-link { color: var(--c4); }

/* ─── Panneau déroulant ─── */
.nsub-panel {
  position: absolute; top: calc(100% + 1.35rem); left: 50%;
  z-index: 5;
  transform: translate(-50%, 10px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.4s cubic-bezier(.2,.8,.2,1), visibility 0s linear 0.4s;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(184,115,51,0.10), transparent 60%),
    rgba(10,9,8,0.97);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  border: 1px solid rgba(184,115,51,0.22);
  box-shadow: 0 34px 90px rgba(0,0,0,0.65), 0 2px 0 rgba(0,0,0,0.4);
  padding: 1.1rem;
}
/* liseré cuivre en haut + « pont » invisible pour garder le survol */
.nsub-panel::before {
  content: ''; position: absolute; left: -1px; right: -1px; top: -1px; height: 1px;
  background: var(--grad-h);
}
.nsub-panel::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 1.6rem;
}
.nsub.is-open .nsub-panel {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translate(-50%, 0);
  transition: opacity 0.25s ease, transform 0.4s cubic-bezier(.2,.8,.2,1), visibility 0s;
}

/* Remise à zéro des styles des liens de premier niveau dans le panneau */
.nlinks .nsub-panel a {
  text-transform: none; letter-spacing: normal; font-size: 1rem; font-weight: 400;
  white-space: normal; color: inherit; text-decoration: none;
}
.nlinks .nsub-panel ul { list-style: none; }

/* Apparition en cascade des éléments */
.nsub-panel li {
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.45s cubic-bezier(.2,.8,.2,1);
}
.nsub.is-open .nsub-panel li { opacity: 1; transform: none; }
.nsub.is-open .nsub-panel li:nth-child(2) { transition-delay: 0.04s; }
.nsub.is-open .nsub-panel li:nth-child(3) { transition-delay: 0.08s; }
.nsub.is-open .nsub-panel li:nth-child(4) { transition-delay: 0.12s; }

/* Services : grille 2 × 2 */
.nsub-grid { display: grid; grid-template-columns: repeat(2, 17.5rem); gap: 0.3rem; }
.nsub-item {
  display: grid; grid-template-columns: 2.9rem 1fr; gap: 1rem; align-items: center;
  padding: 0.95rem 1rem; border: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nsub-ic {
  width: 2.9rem; height: 2.9rem; display: grid; place-items: center;
  border: 1px solid rgba(184,115,51,0.32); color: var(--c4);
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}
.nsub-ic svg { width: 1.7rem; height: 1.7rem; }
.nsub-t {
  display: block; font-family: var(--fs); font-size: 1.32rem; font-weight: 500;
  color: var(--white); line-height: 1.1; letter-spacing: 0.01em;
  transition: color 0.3s;
}
.nsub-d {
  display: block; margin-top: 0.3rem;
  font-family: var(--fb); font-size: 0.76rem; font-weight: 300; line-height: 1.45;
  color: var(--white-40); letter-spacing: 0.02em;
}
.nsub-item:hover, .nsub-item:focus-visible {
  background: rgba(184,115,51,0.07); border-color: rgba(184,115,51,0.2); outline: none;
}
.nsub-item:hover .nsub-ic, .nsub-item:focus-visible .nsub-ic { background: var(--c3); border-color: var(--c3); color: #120b06; }
.nsub-item:hover .nsub-t, .nsub-item:focus-visible .nsub-t { color: var(--c5); }
.nsub-panel a[aria-current="page"] .nsub-t { color: var(--c4); }
.nsub-panel a[aria-current="page"] .nsub-ic { border-color: var(--c4); background: rgba(184,115,51,0.14); }

/* Réalisations : 3 vignettes */
.nsub-real { display: grid; grid-template-columns: repeat(3, 11.5rem); gap: 0.8rem; }
.nsub-card { display: block; padding: 0.5rem; border: 1px solid transparent; transition: background 0.3s, border-color 0.3s; }
.nsub-thumb { display: block; position: relative; aspect-ratio: 3 / 2; overflow: hidden; border: 1px solid rgba(184,115,51,0.2); background: var(--d3); }
.nsub-thumb img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.85) brightness(0.88);
  transition: transform 0.8s cubic-bezier(.2,.8,.2,1), filter 0.4s;
}
.nsub-card .nsub-t { margin-top: 0.75rem; font-size: 1.18rem; }
.nsub-card .nsub-d { margin-top: 0.2rem; font-size: 0.72rem; }
.nsub-card:hover, .nsub-card:focus-visible { background: rgba(184,115,51,0.07); border-color: rgba(184,115,51,0.2); outline: none; }
.nsub-card:hover .nsub-thumb img, .nsub-card:focus-visible .nsub-thumb img { transform: scale(1.07); filter: none; }
.nsub-card:hover .nsub-t, .nsub-card:focus-visible .nsub-t { color: var(--c5); }

/* Pied du panneau */
.nsub-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 0.8rem; padding: 0.95rem 1rem 0.25rem;
  border-top: 1px solid rgba(184,115,51,0.14);
}
.nlinks .nsub-foot a {
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--c4); white-space: nowrap; transition: color 0.3s;
}
.nlinks .nsub-foot a:hover { color: var(--c6); }
.nlinks .nsub-foot a span { display: inline-block; transition: transform 0.35s cubic-bezier(.2,.8,.2,1); }
.nlinks .nsub-foot a:hover span { transform: translateX(4px); }
.nlinks .nsub-foot .nsub-foot-sub { color: var(--white-40); letter-spacing: 0.12em; }

/* ─── Burger → croix ─── */
.burger {
  width: 44px; height: 44px; padding: 10px; align-items: center; justify-content: center;
  position: relative; z-index: 2;
}
.burger span { transition: transform 0.45s cubic-bezier(.2,.8,.2,1), opacity 0.3s; transform-origin: center; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Menu ouvert : la barre reste au-dessus, compacte et transparente */
html.nav-open #nav {
  padding-top: 1.1rem; padding-bottom: 1.1rem;
  background: transparent; border-bottom-color: rgba(184,115,51,0.14);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
html.nav-open { overflow: hidden; }
html.nav-open #cookie-banner { visibility: hidden !important; }

/* ─── Panneau mobile ─── */
.nmobile {
  position: fixed; inset: 0; z-index: 190;
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 6.4rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom));
  background:
    radial-gradient(90% 50% at 85% 0%, rgba(184,115,51,0.12), transparent 60%),
    radial-gradient(70% 40% at 0% 100%, rgba(184,115,51,0.07), transparent 60%),
    #050404;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.nmobile.on { opacity: 1; visibility: visible; transition: opacity 0.35s ease, visibility 0s; }
.nm-body, .nm-foot { width: 100%; max-width: 34rem; margin: 0 auto; }

.nm-body > * {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.nmobile.on .nm-body > * { opacity: 1; transform: none; }
.nmobile.on .nm-body > *:nth-child(2) { transition-delay: 0.05s; }
.nmobile.on .nm-body > *:nth-child(3) { transition-delay: 0.10s; }
.nmobile.on .nm-body > *:nth-child(4) { transition-delay: 0.15s; }
.nmobile.on .nm-body > *:nth-child(5) { transition-delay: 0.20s; }
.nmobile.on .nm-body > *:nth-child(6) { transition-delay: 0.25s; }

.nmobile a { text-decoration: none; -webkit-tap-highlight-color: transparent; }
.nm-main {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.05rem 0; border-bottom: 1px solid rgba(184,115,51,0.13);
  font-family: var(--fs); font-size: 1.85rem; font-weight: 400; line-height: 1.1;
  color: var(--white); transition: color 0.3s;
}
.nm-main::after { content: '→'; font-family: var(--fb); font-size: 1rem; color: var(--c3); transition: transform 0.3s; }
.nm-main:hover, .nm-main:focus-visible { color: var(--c5); }
.nm-main:hover::after { transform: translateX(4px); }
.nm-main[aria-current="page"] { color: var(--c4); }

.nm-group { padding: 1.3rem 0 1.4rem; border-bottom: 1px solid rgba(184,115,51,0.13); }
.nm-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--fb); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--c4); margin-bottom: 0.95rem;
}
.nm-label a { font-size: 0.62rem; letter-spacing: 0.2em; color: var(--white-40); }
.nm-label a:hover { color: var(--c4); }

.nm-svc { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.nm-svc a {
  display: flex; align-items: center; gap: 0.7rem; min-height: 3.4rem;
  padding: 0.6rem 0.75rem; border: 1px solid rgba(184,115,51,0.2);
  background: rgba(255,255,255,0.015);
  font-family: var(--fb); font-size: 0.92rem; font-weight: 400; letter-spacing: 0.02em; line-height: 1.2;
  color: var(--white); transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.nm-svc a svg { width: 1.45rem; height: 1.45rem; flex-shrink: 0; color: var(--c4); }
.nm-svc a:hover, .nm-svc a:focus-visible { background: rgba(184,115,51,0.08); border-color: rgba(184,115,51,0.45); }
.nm-svc a[aria-current="page"] { border-color: var(--c4); background: rgba(184,115,51,0.12); color: var(--c5); }

.nm-real { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; }
.nm-real a { display: block; color: var(--white-60); font-family: var(--fb); font-size: 0.78rem; letter-spacing: 0.02em; line-height: 1.25; }
.nm-real img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid rgba(184,115,51,0.22); margin-bottom: 0.5rem; background: var(--d3); }
.nm-real a:hover, .nm-real a:focus-visible { color: var(--c5); }
.nm-real a[aria-current="page"] { color: var(--c4); }
.nm-real a[aria-current="page"] img { border-color: var(--c4); }

.nm-foot {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: auto; padding-top: 1.6rem;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.45s ease 0.28s, transform 0.6s cubic-bezier(.2,.8,.2,1) 0.28s;
}
.nmobile.on .nm-foot { opacity: 1; transform: none; }
.nm-foot a {
  display: flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 3.4rem; padding: 0.8rem;
  font-family: var(--fb); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; text-align: center;
}
.nm-foot svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.nm-call { border: 1px solid rgba(184,115,51,0.5); color: var(--c4); }
.nm-cta { background: linear-gradient(135deg, var(--c3), var(--c4) 55%, var(--c5)); color: #140c06; }
.nm-call:active, .nm-cta:active { transform: scale(0.98); }

@media (max-width: 380px) {
  .nm-svc { grid-template-columns: 1fr; }
  .nm-foot { grid-template-columns: 1fr; }
}
@media (min-width: 1151px) {
  .nmobile { display: none; }
}

/* ─── Bandeau « Continuer la visite » (pages services & galeries) ─── */
.more-links { border-top: 1px solid rgba(184,115,51,0.14); background: var(--d1); }
.more-head { text-align: center; max-width: 760px; margin: 0 auto 3.2rem; }
.more-head .shr { margin-left: auto; margin-right: auto; }
.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(184,115,51,0.14); border: 1px solid rgba(184,115,51,0.14); }
.more-card {
  position: relative; display: flex; flex-direction: column; gap: 0.6rem;
  padding: 2.2rem 1.8rem 2rem; background: var(--d1); text-decoration: none; color: var(--white);
  transition: background 0.4s;
  min-height: 15rem;
}
.more-card::before {
  content: ''; position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: var(--grad-h); transform: scaleX(0); transform-origin: left; transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.more-card:hover, .more-card:focus-visible { background: #15110e; outline: none; }
.more-card:hover::before, .more-card:focus-visible::before { transform: scaleX(1); }
.more-ic { width: 3rem; height: 3rem; display: grid; place-items: center; border: 1px solid rgba(184,115,51,0.32); color: var(--c4); margin-bottom: 0.6rem; transition: background 0.35s, color 0.35s; }
.more-ic svg { width: 1.75rem; height: 1.75rem; }
.more-card:hover .more-ic { background: var(--c3); color: #120b06; border-color: var(--c3); }
.more-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; margin: -0.4rem 0 0.6rem; border: 1px solid rgba(184,115,51,0.18); }
.more-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) brightness(0.85); transition: transform 0.9s cubic-bezier(.2,.8,.2,1), filter 0.4s; }
.more-card:hover .more-img img { transform: scale(1.05); filter: none; }
.more-k { font-size: 0.64rem; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: var(--c4); }
.more-t { font-family: var(--fs); font-size: 1.75rem; font-weight: 400; line-height: 1.1; }
.more-d { font-size: 0.92rem; font-weight: 300; line-height: 1.6; color: var(--white-40); }
.more-go { margin-top: auto; padding-top: 0.8rem; font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--c4); }
.more-go span { display: inline-block; transition: transform 0.35s cubic-bezier(.2,.8,.2,1); }
.more-card:hover .more-go span { transform: translateX(5px); }
/* Carte « réalisation » : la photo occupe toute la carte */
.more-card--img { overflow: hidden; }
.more-card--img .more-img { position: absolute; inset: 0; margin: 0; border: 0; aspect-ratio: auto; }
.more-card--img .more-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,6,5,0.2) 0%, rgba(8,6,5,0.62) 42%, rgba(8,6,5,0.96) 100%);
}
.more-card--img > :not(.more-img) { position: relative; z-index: 1; }
.more-card--img .more-k { margin-top: auto; }
.more-card--img .more-d { color: var(--white-60); }
.more-card--img .more-go { margin-top: 0.4rem; padding-top: 0.6rem; }
.more-card--img::before { z-index: 2; }
@media (max-width: 1100px) { .more-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .more-grid { grid-template-columns: 1fr; }
  .more-card { min-height: 0; padding: 1.6rem 1.4rem 1.5rem; gap: 0.45rem; }
  .more-card--img { min-height: 14rem; }
  .more-card:not(.more-card--img) .more-ic { position: absolute; top: 1.5rem; right: 1.4rem; margin: 0; width: 2.6rem; height: 2.6rem; }
  .more-card:not(.more-card--img) .more-ic svg { width: 1.45rem; height: 1.45rem; }
  .more-go { padding-top: 0.5rem; }
}

/* ─── Galeries : hero aligné sous la barre de navigation ─── */
.gallery-page .g-hero { padding: 10.5rem var(--gutter) 4rem; }
.gallery-page .g-hero .breadcrumb { justify-content: center; color: var(--white-40); opacity: 1; font-size: 0.72rem; letter-spacing: 0.28em; margin-bottom: 1.6rem; }
@media (max-width: 600px) { .gallery-page .g-hero { padding-top: 8rem; } }

@media (prefers-reduced-motion: reduce) {
  .nsub-panel, .nsub-panel li, .nmobile, .nm-body > *, .nm-foot, .more-card::before { transition: none !important; }
  .nsub-panel li, .nm-body > *, .nm-foot { transform: none !important; }
  .nsub-panel { transform: translate(-50%, 0) !important; }
}
