/* Unik Hero Flux */
.unik-hero-flux {
  position: relative;
  width: 100%;
  background: #151515; /* Encre : identique au fond de l'animation, aucun flash au chargement */
  overflow: hidden;
}
.unik-hero-flux canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Mode fond : couvre la section hôte, sous son contenu */
.unik-hero-flux.unik-hero-flux--fond {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.unik-hero-flux-host {
  position: relative;
  isolation: isolate;
  background-color: #151515;
}
.unik-hero-flux-host > :not(.unik-hero-flux) {
  position: relative;
  z-index: 1;
}

/* Panneau de réglages visiteurs */
.uhf-tune,
.unik-hero-flux-host > .uhf-tune.uhf-tune {
  position: absolute;
  z-index: 30;
  right: clamp(16px, 2.4vw, 32px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font: 400 14px/1.4 "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  color: #f9f8f5;
  pointer-events: auto;
}
.uhf-tune [hidden] { display: none !important; }
.uhf-tune button, .uhf-tune input, .uhf-tune label { cursor: pointer; }
.uhf-tune input[type="text"] { cursor: text; }
.uhf-toggle {
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1; letter-spacing: 0.08em; color: #f9f8f5;
  background: rgba(21, 21, 21, 0.86); border: 1px solid rgba(249, 248, 245, 0.14); border-radius: 2px;
  padding: 10px 14px; display: flex; gap: 10px; align-items: center;
}
.uhf-dot { width: 7px; height: 7px; border-radius: 50%; background: #ea5b0c; }
.uhf-panel {
  width: min(300px, calc(100vw - 32px)); max-height: min(70vh, calc(100svh - 110px)); overflow-y: auto;
  background: rgba(21, 21, 21, 0.88); border: 1px solid rgba(249, 248, 245, 0.14); border-radius: 4px;
  padding: 16px; display: grid; gap: 14px; box-sizing: border-box;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.uhf-row { display: grid; gap: 7px; min-width: 0; }
.uhf-row label, .uhf-lbl {
  display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(249, 248, 245, 0.62);
}
.uhf-row output { color: #f9f8f5; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.uhf-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid rgba(249, 248, 245, 0.14); border-radius: 2px; }
.uhf-seg button { font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1; color: rgba(249, 248, 245, 0.62); background: transparent; border: 0; padding: 9px; }
.uhf-seg button[aria-checked="true"] { background: #f9f8f5; color: #151515; }
.uhf-word {
  font: 600 18px/1.2 "Clash Display", "Helvetica Neue", Arial, sans-serif; letter-spacing: -0.02em; color: #f9f8f5;
  background: transparent; border: 1px solid rgba(249, 248, 245, 0.14); border-radius: 2px; padding: 8px 10px;
}
.uhf-seed { display: flex; gap: 8px; }
.uhf-seedin {
  flex: 1; min-width: 0; font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.2; color: #f9f8f5; background: transparent;
  border: 1px solid rgba(249, 248, 245, 0.14); border-radius: 2px; padding: 8px 10px;
}
.uhf-small, .uhf-reset {
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1; color: #f9f8f5; background: transparent;
  border: 1px solid rgba(249, 248, 245, 0.14); border-radius: 2px; padding: 9px 12px;
}
.uhf-small:hover, .uhf-reset:hover { border-color: #f9f8f5; }
.uhf-tune input[type="range"] { width: 100%; accent-color: #ea5b0c; margin: 0; }
.uhf-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #f9f8f5; }
.uhf-check input { accent-color: #ea5b0c; width: 16px; height: 16px; margin: 0; }
.uhf-tune button:focus-visible, .uhf-tune input:focus-visible { outline: 2px solid #ea5b0c; outline-offset: 2px; }
/* Protection contre les styles du thème */
.uhf-tune *, .uhf-tune *::before, .uhf-tune *::after { box-sizing: border-box; }
.uhf-tune button, .uhf-tune input { margin: 0; box-shadow: none; text-transform: none; min-height: 0; height: auto; text-shadow: none; }
.uhf-tune button { width: auto; white-space: nowrap; cursor: pointer; }
.uhf-tune .uhf-seed .uhf-small { flex: none; }
.uhf-tune input[type="text"] { width: 100%; max-width: 100%; }
.uhf-tune .uhf-seed input[type="text"] { width: 0; min-width: 0; flex: 1 1 0; }
.uhf-tune .uhf-seg button { width: 100%; }
.uhf-tune .uhf-reset { width: 100%; }
