/* ============================================================
   Hydreau Services - En-tête, mega-menu, tiroir mobile, pied de page
   ============================================================ */

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 3000; padding: .7rem 1rem; background: #fff; color: var(--c-ink); border-radius: 0 0 10px 0; }
.skip-link:focus { left: 0; }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1200; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-aqua), var(--c-teal) 50%, var(--c-copper)); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- En-tête ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; color: #fff;
  transition: transform .55s var(--ease), background-color .35s ease, box-shadow .35s ease;
}
.site-header::before {
  content: ''; position: absolute; inset: 0 0 -48px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(4, 18, 31, .62), rgba(4, 18, 31, 0)); transition: opacity .35s ease;
}
.site-header.is-scrolled {
  background: rgba(4, 18, 31, .8); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 18px 40px -26px rgba(0, 0, 0, .7);
}
.site-header.is-scrolled::before { opacity: 0; }
.site-header.is-hidden { transform: translateY(-105%); }
.bar { display: flex; align-items: center; gap: .9rem; height: var(--header-h); max-width: 1380px; margin-inline: auto; padding-inline: clamp(1rem, 3vw, 2rem); }

/* Logo */
.brand { display: inline-flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; flex: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 6px 14px rgba(20, 184, 166, .35)); transition: transform .7s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 1.28rem; letter-spacing: -.02em; }
.brand-sub { margin-top: .24rem; font-size: .6rem; font-weight: 600; letter-spacing: .4em; text-transform: uppercase; color: var(--c-aqua); }

/* Navigation principale */
.main-nav { display: none; margin-left: auto; }
@media (min-width: 1080px) { .main-nav { display: block; } }
.nav { display: flex; align-items: center; gap: .1rem; }
.nav-item.has-mega { position: static; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .6rem .8rem; border-radius: 10px;
  font-size: .94rem; font-weight: 500; color: rgba(255, 255, 255, .86); text-decoration: none;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.nav-link:hover, .nav-item.open > .nav-link { color: #fff; background: rgba(255, 255, 255, .07); }
.nav-link[aria-current="page"], .nav-item.is-active > .nav-link { color: #fff; }
.nav-link[aria-current="page"]::after, .nav-item.is-active > .nav-link::after {
  content: ''; position: absolute; left: .8rem; right: .8rem; bottom: .22rem; height: 2px; border-radius: 2px; background: var(--grad-copper);
}
.caret { width: 7px; height: 7px; margin-top: -3px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); transition: transform var(--t-fast); opacity: .8; }
.nav-item.open .caret { transform: translateY(3px) rotate(225deg); }

/* Mega-menu */
.mega {
  position: absolute; left: 50%; top: calc(var(--header-h) - 10px); width: min(1180px, calc(100vw - 2rem));
  transform: translate(-50%, 12px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, transform .5s var(--ease), visibility .3s;
}
.nav-item.open .mega { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.mega-inner {
  display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)) 290px; gap: 1.4rem; padding: 1.5rem;
  border-radius: 26px; background: rgba(6, 24, 40, .97); border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.mega-title { margin-bottom: .55rem; padding-left: .75rem; font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--c-copper-l); }
.mega-col ul { display: grid; gap: .1rem; }
.mega-col a { display: block; padding: .6rem .75rem; border-radius: 12px; text-decoration: none; transition: background-color var(--t-fast); }
.mega-col a:hover, .mega-col a[aria-current="page"] { background: rgba(255, 255, 255, .07); }
.mega-label { display: block; font-weight: 600; font-size: .94rem; color: #fff; }
.mega-desc { display: block; margin-top: .15rem; font-size: .82rem; color: rgba(232, 244, 247, .56); line-height: 1.35; }
.mega-aside { position: relative; display: flex; align-items: flex-end; min-height: 250px; border-radius: 18px; overflow: hidden; text-decoration: none; isolation: isolate; }
.mega-aside img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s var(--ease); }
.mega-aside::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(4, 18, 31, .96) 12%, rgba(4, 18, 31, .12)); }
.mega-aside:hover img { transform: scale(1.06); }
.mega-aside-body { display: grid; gap: .35rem; padding: 1.2rem; }
.mega-aside-title { font-family: var(--f-display); font-weight: 600; color: #fff; font-size: 1.05rem; }
.mega-aside-text { font-size: .85rem; color: rgba(232, 244, 247, .76); line-height: 1.45; }
.mega-aside-cta { font-size: .85rem; font-weight: 600; color: var(--c-copper-l); }
.mega-aside-cta::after { content: ' →'; }

/* Actions */
.header-actions { display: flex; align-items: center; gap: .55rem; margin-left: auto; }
@media (min-width: 1080px) { .header-actions { margin-left: .4rem; } }
.header-phone { display: none; align-items: center; gap: .45rem; padding: .5rem .6rem; color: #fff; font-weight: 600; font-size: .92rem; text-decoration: none; border-radius: 10px; white-space: nowrap; }
.header-phone:hover { color: var(--c-aqua); }
@media (min-width: 1320px) { .header-phone { display: inline-flex; } }
.link-client { display: none; padding: .5rem .6rem; font-size: .9rem; font-weight: 500; color: rgba(255, 255, 255, .8); text-decoration: none; white-space: nowrap; }
.link-client:hover { color: #fff; }
@media (min-width: 1200px) { .link-client { display: inline-flex; } }
.header-actions .btn-sm { display: none; }
@media (min-width: 540px) { .header-actions .btn-sm { display: inline-flex; } }
.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 11px; flex: none;
  border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
}
.burger span { display: block; height: 2px; border-radius: 2px; background: #fff; transition: transform var(--t-base); }
.burger span:nth-child(2) { width: 68%; }
@media (min-width: 1080px) { .burger { display: none; } }

/* ---------- Tiroir mobile (s'ouvre à gauche) ---------- */
.drawer { position: fixed; inset: 0; z-index: 1300; visibility: hidden; transition: visibility 0s .55s; }
.drawer.open { visibility: visible; transition: none; }
.drawer-bg { position: absolute; inset: 0; background: rgba(2, 10, 18, .62); backdrop-filter: blur(4px); opacity: 0; transition: opacity .4s ease; }
.drawer.open .drawer-bg { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(88vw, 420px); display: flex; flex-direction: column; gap: 1.1rem;
  padding: 1rem 1.25rem max(1.5rem, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--grad-deep); color: #fff; transform: translateX(-100%); transition: transform .55s var(--ease);
  box-shadow: 30px 0 80px -30px rgba(0, 0, 0, .6);
}
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.drawer-close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-size: 1.8rem; line-height: 1; color: #fff; background: rgba(255, 255, 255, .08); }
.drawer nav { display: grid; }
.drawer-link, .drawer-group summary {
  display: flex; align-items: center; justify-content: space-between; padding: 1rem .15rem;
  font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .08); cursor: pointer; list-style: none;
}
.drawer-link:hover { color: var(--c-aqua); }
.drawer-group summary::-webkit-details-marker { display: none; }
.drawer-group summary::after { content: '+'; font-size: 1.4rem; font-weight: 400; color: var(--c-aqua); transition: transform var(--t-base); }
.drawer-group[open] summary::after { transform: rotate(45deg); }
.drawer-sub { display: grid; padding: .2rem 0 .9rem; }
.drawer-title { margin: .9rem 0 .2rem; font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--c-copper-l); }
.drawer-sub a { padding: .5rem 0; color: rgba(232, 244, 247, .84); text-decoration: none; }
.drawer-sub a:hover, .drawer-sub a[aria-current] { color: var(--c-aqua); }
.drawer-actions { display: grid; gap: .6rem; margin-top: auto; padding-top: 1rem; }
.drawer-actions .btn { width: 100%; }
.drawer-client { text-align: center; color: rgba(232, 244, 247, .75); font-size: .92rem; padding: .4rem; text-decoration: none; }

/* ---------- Pied de page ---------- */
.site-footer { position: relative; margin-top: 90px; padding-block: .5rem 2rem; background: var(--c-ink); color: var(--c-inv); isolation: isolate; }
.site-footer::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 60% at 0% 0%, rgba(20, 184, 166, .12), transparent 60%), radial-gradient(40% 50% at 100% 30%, rgba(208, 138, 78, .09), transparent 60%);
}
.footer-wave { position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 90px; line-height: 0; pointer-events: none; }
.footer-wave svg { width: 100%; height: 100%; }
.footer-wave path { fill: var(--c-ink); }
.footer-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.5rem 2.6rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer-cta-title { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: -.032em; line-height: 1.1; color: #fff; }
.footer-cta-title em { font-family: var(--f-serif); font-weight: 400; background: var(--grad-water); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.footer-top { display: grid; gap: 2.5rem; padding-block: 3rem 2.5rem; }
@media (min-width: 1024px) { .footer-top { grid-template-columns: minmax(0, 1.05fr) minmax(0, 2.4fr); gap: 4rem; } }
.footer-brand p { margin-top: 1.1rem; color: rgba(232, 244, 247, .64); font-size: .95rem; max-width: 42ch; }
.footer-brand .brand-mark { width: 44px; height: 44px; }
.footer-contact { display: grid; gap: .3rem; margin-top: 1.2rem; font-size: .93rem; color: rgba(232, 244, 247, .8); }
.footer-contact a { color: #fff; text-decoration: none; width: fit-content; }
.footer-contact a:hover { color: var(--c-aqua); }
.group-badge {
  display: inline-flex; align-items: center; gap: .55rem; margin-top: 1.4rem; padding: .5rem .95rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); color: #fff; font-size: .85rem; font-weight: 500; text-decoration: none;
}
.group-badge:hover { color: #fff; border-color: var(--c-aqua); }
.group-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-aqua); animation: pulse-dot 2.4s infinite; }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(94, 234, 212, .55); } 70% { box-shadow: 0 0 0 9px rgba(94, 234, 212, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); } }
.footer-cols { display: grid; gap: 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .footer-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.footer-title { margin-bottom: .9rem; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--c-copper-l); }
.footer-col ul { display: grid; gap: .05rem; }
.footer-col a { display: inline-block; padding: .28rem 0; font-size: .92rem; color: rgba(232, 244, 247, .68); text-decoration: none; transition: color var(--t-fast), transform var(--t-fast); }
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.footer-note { padding-block: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .76rem; line-height: 1.68; color: rgba(232, 244, 247, .52); }
.footer-note a { color: rgba(232, 244, 247, .78); text-decoration: underline; }
.footer-note:target { color: rgba(232, 244, 247, .9); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .82rem; color: rgba(232, 244, 247, .52); }
.legal-links { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }
.legal-links a { color: rgba(232, 244, 247, .72); text-decoration: none; }
.legal-links a:hover { color: #fff; }

/* ---------- CTA flottant ---------- */
.floating-cta {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 900;
  display: flex; gap: .6rem; align-items: center; transform: translateY(150%); opacity: 0; pointer-events: none;
  transition: transform .6s var(--ease), opacity .4s ease;
}
.floating-cta.is-visible { transform: none; opacity: 1; pointer-events: auto; }
.no-js .floating-cta { transform: none; opacity: 1; pointer-events: auto; }
.floating-cta-btn {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 52px; padding: .8rem 1.3rem; border-radius: 999px;
  background: var(--grad-copper); color: #1b0f05; font-weight: 600; text-decoration: none;
  box-shadow: 0 16px 40px -12px rgba(208, 138, 78, .75); transition: transform var(--t-base);
}
.floating-cta-btn:hover { color: #1b0f05; transform: translateY(-3px); }
.floating-cta-phone { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--c-ink); color: #fff; border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 16px 40px -12px rgba(4, 18, 31, .6); }
.floating-cta-phone:hover { color: var(--c-aqua); }
@media (min-width: 1024px) { .floating-cta-phone { display: none; } }
@media (max-width: 480px) { .floating-cta-btn span { display: none; } .floating-cta-btn { width: 52px; padding: 0; justify-content: center; } }

/* ---------- Bandeau cookies (si mesure d'audience activée) ---------- */
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1400; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; max-width: 760px; margin-inline: auto; padding: 1rem 1.2rem; border-radius: var(--r-md); background: var(--c-ink); color: var(--c-inv); box-shadow: var(--sh-lg); }
.cookie-banner p { color: var(--c-inv-muted); font-size: .9rem; }
.cookie-banner a { color: var(--c-aqua); }
.cookie-actions { display: flex; gap: .5rem; }
.cookie-reopen { position: fixed; left: 1rem; bottom: 1rem; z-index: 800; padding: .4rem .8rem; border-radius: 999px; background: var(--c-ink); color: var(--c-inv); font-size: .78rem; }
