/*
 * WATERBALLS · barre de navigation « goutte d'eau »
 * Adaptée de « Liquid Navbar — Waterline » (Nimbus UI, guglielmogiannattasio.it).
 * Les couleurs viennent de la page : --wl-ink, --wl-paper, --wl-brand, --wl-font
 * sont posées sur la balise <nav data-waterline> par Main.dc.html.
 * Sans JavaScript, la barre reste une pilule lisible avec ses 4 liens.
 */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Les ancres ne passent pas sous la barre flottante. */
#pourquoi, #gamme, #avis, #offre { scroll-margin-top: 100px; }

.wl-nav {
  --wl-ink: #111111;
  --wl-paper: #F5EFE4;
  --wl-brand: #F26B1D;
  --wl-font: 'Manrope', system-ui, sans-serif;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  isolation: isolate;
  font-family: var(--wl-font);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Le verre : fond de la page à 72 %, flou, et le trait 2 px encre de la charte. */
.wl-glass {
  position: absolute; inset: 0; z-index: -2; border-radius: inherit; overflow: hidden;
  background: color-mix(in srgb, var(--wl-paper) 72%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: inset 0 0 0 2px var(--wl-ink), inset 0 3px 2px -1px rgba(255,255,255,.75), 0 14px 30px -16px rgba(0,0,0,.45);
}
.wl-nav[data-refract="on"] .wl-glass {
  -webkit-backdrop-filter: url(#wl-refract) blur(3px) saturate(1.3);
  backdrop-filter: url(#wl-refract) blur(3px) saturate(1.3);
}

.wl-water { position: absolute; left: -14px; top: -14px; z-index: -1; pointer-events: none; }
.wl-nav[data-gl="off"] .wl-water { display: none; }

/* Goutte de secours (navigateur sans WebGL) : une pilule teintée à la couleur du parfum. */
.wl-drop {
  display: none; position: absolute; top: 5px; bottom: 5px; left: 0; z-index: -1; border-radius: 999px;
  pointer-events: none; will-change: transform, width; transition: opacity .3s ease;
  background: radial-gradient(120% 140% at 30% 0%, rgba(255,255,255,.8), rgba(255,255,255,0) 55%),
              color-mix(in srgb, var(--wl-brand) 42%, transparent);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.95), inset 0 0 0 1.5px color-mix(in srgb, var(--wl-brand) 70%, transparent);
}
.wl-nav[data-gl="off"] .wl-drop { display: block; }

.wl-nav .wl-item {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px;
  color: var(--wl-ink); opacity: .78;
  font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: opacity .25s ease, color .5s ease;
}
.wl-nav .wl-item:hover, .wl-nav .wl-item[aria-current="location"] { opacity: 1; }
.wl-nav .wl-item:focus-visible { outline: 3px solid var(--wl-brand); outline-offset: 2px; }

/* En-tête collé en haut de l'écran : il s'affine et reçoit un bandeau de verre
   sur toute la largeur de la fenêtre, fermé par le trait encre de la charte. */
.wl-header { transition: padding .35s ease; }
.wl-header::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: color-mix(in srgb, var(--wl-paper-h, #F5EFE4) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 2px solid var(--wl-ink-h, #111111);
  opacity: 0; transform: translateY(-100%);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.wl-header.wl-stuck { padding-top: 10px !important; padding-bottom: 10px !important; }
.wl-header.wl-stuck::before { opacity: 1; transform: none; }

/* Icônes et leurs petites scènes au clic */
.wl-ico { position: relative; display: inline-flex; flex: none; }
.wl-ico svg { transition: transform .45s cubic-bezier(.3,1.6,.5,1); }
.wl-item[aria-current="location"] .wl-ico svg { transform: translateY(-1px) scale(1.08); }

.wl-ico[data-fx="pop"] svg { animation: wlPop .5s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes wlPop { 0% { transform: scale(.72); } 60% { transform: scale(1.22); } 100% { transform: translateY(-1px) scale(1.08); } }
.wl-ico[data-fx="pop"] .wl-fill { animation: wlFill 1.2s ease both; }
@keyframes wlFill { 0% { fill: transparent; } 30% { fill: #FFE14D; } 100% { fill: color-mix(in srgb, var(--wl-brand) 55%, transparent); } }

.wl-ico[data-fx="drop"] svg { animation: wlDropFx .95s cubic-bezier(.4,0,.3,1) both; transform-origin: 50% 100%; }
@keyframes wlDropFx { 0% { transform: translateY(-1px); } 26% { transform: translateY(-13px) scale(.88,1.12); } 46% { transform: translateY(3px) scale(1.3,.68); } 62% { transform: translateY(-3px) scale(.92,1.08); } 80% { transform: translateY(0) scale(1.04,.97); } 100% { transform: translateY(-1px) scale(1.08); } }
.wl-ico[data-fx="drop"]::before, .wl-ico[data-fx="drop"]::after {
  content: ""; position: absolute; bottom: 0; left: 50%; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--wl-brand); opacity: 0; pointer-events: none;
}
.wl-ico[data-fx="drop"]::before { animation: wlSplashL .95s ease-out both; }
.wl-ico[data-fx="drop"]::after { animation: wlSplashR .95s ease-out both; }
@keyframes wlSplashL { 0%, 44% { opacity: 0; transform: none; } 50% { opacity: .9; transform: translate(-5px,-6px); } 75%, 100% { opacity: 0; transform: translate(-11px,1px) scale(.4); } }
@keyframes wlSplashR { 0%, 44% { opacity: 0; transform: none; } 50% { opacity: .9; transform: translate(5px,-7px); } 75%, 100% { opacity: 0; transform: translate(12px,1px) scale(.4); } }

.wl-ico[data-fx="spin"] svg { animation: wlSpin 1s cubic-bezier(.2,.75,.25,1) both; }
@keyframes wlSpin { 0% { transform: perspective(80px) rotateY(0); } 100% { transform: perspective(80px) rotateY(360deg) translateY(-1px) scale(1.08); } }

.wl-ico[data-fx="hop"] svg { animation: wlHop .8s cubic-bezier(.3,1.4,.5,1) both; transform-origin: 50% 100%; }
@keyframes wlHop { 0% { transform: none; } 30% { transform: translateY(-5px) scale(1.04,.96); } 55% { transform: translateY(0) scale(1.12,.88); } 75% { transform: translateY(-2px) scale(.98,1.04); } 100% { transform: translateY(-1px) scale(1.08); } }

/* Tablette et téléphone : icônes seules (le texte reste lu par les lecteurs d'écran). */
@media (max-width: 900px) {
  .wl-nav .wl-item { padding: 0 14px; }
  .wl-nav .wl-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .wl-ico svg, .wl-ico::before, .wl-ico::after, .wl-fill { animation: none !important; transition: none; }
  .wl-header, .wl-header::before { transition: none; }
}
