/* ═══════════════════════════════════════════════════════════════════════════
   GLOBAL REFRESH 2026 - Universal polish across all bffr.fr pages
   Loaded on every HTML page. Non-intrusive: only sets body bg, scrollbar,
   text selection, and subtle footer/nav tweaks. Does NOT touch section/card
   classes that differ per page (those live in scoped stylesheets).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --gr-accent-1: #5865F2;
  --gr-accent-2: #a29bfe;
  --gr-accent-3: #ff6b6b;
  --gr-bg-base: #0a0c14;
  --gr-glass: rgba(24, 26, 38, 0.72);
  --gr-glass-border: rgba(255, 255, 255, 0.08);
  --gr-text-main: #e8eaf6;
  --gr-text-dim: rgba(180, 188, 208, 0.82);
}

/* ── Body background ── */
html,
body {
  background:
    radial-gradient(ellipse 1200px 700px at 15% -5%, rgba(88, 101, 242, 0.1), transparent 60%),
    radial-gradient(ellipse 1000px 600px at 85% 10%, rgba(162, 155, 254, 0.06), transparent 60%),
    radial-gradient(ellipse 900px 500px at 50% 95%, rgba(255, 107, 107, 0.05), transparent 60%),
    #0a0c14;
  background-attachment: fixed;
}

/* Ultra pages use a custom .u-bg layer (z-index:-2) for uploaded backgrounds.
   The opaque body background above would paint over it, so reset both. */
body[data-ultra-page] { background: transparent !important; }
html:has(body[data-ultra-page]) { background: transparent !important; }

/* ── Scrollbar polish ── */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(88, 101, 242, 0.4) rgba(16, 18, 28, 0.3);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(16, 18, 28, 0.3);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(88, 101, 242, 0.5), rgba(162, 155, 254, 0.3));
  border-radius: 10px;
  border: 2px solid rgba(16, 18, 28, 0.3);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(88, 101, 242, 0.7), rgba(162, 155, 254, 0.5));
}

/* ── Selection polish ── */
::selection {
  background: rgba(162, 155, 254, 0.35);
  color: #ffffff;
}

::-moz-selection {
  background: rgba(162, 155, 254, 0.35);
  color: #ffffff;
}

/* ── Footer universal polish ── */
footer {
  position: relative;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 12, 20, 0.9) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 36px 20px 28px;
  margin-top: 40px;
  text-align: center;
  color: rgba(180, 188, 208, 0.82);
  font-size: 0.88rem;
  line-height: 1.7;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(88, 101, 242, 0.5) 25%,
      rgba(162, 155, 254, 0.5) 50%,
      rgba(255, 107, 107, 0.4) 75%,
      transparent 100%);
  pointer-events: none;
}

footer a {
  color: #a29bfe;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #ffffff;
}

/* ── Focus-visible ring for accessibility ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(162, 155, 254, 0.7);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Smooth global transitions on buttons ── */
.btn,
button.btn {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.btn:hover:not(:disabled),
button.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

/* ── Nav universal polish (additive - respects per-page nav styles) ── */
nav[class=""],
nav:not([class]) {
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
}
