/* Dock du bas, verre liquide façon Apple (demande de Denez, 2026-12-03).
   Couches : réfraction du fond (filtre SVG #cc-liquide, Chromium seulement, sinon flou), teinte, reflets spéculaires,
   lumière qui suit le pointeur. Clair sur le jour, sombre sur la nuit (classe .is-dark posée par dock.js). */
.cc-dock {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 90;
  transform: translate(-50%, 140%); opacity: 0;
  transition: transform .7s cubic-bezier(.32, .72, 0, 1), opacity .25s linear;
  --mx: 30%; --my: 0%;
}
.cc-dock.is-on { transform: translate(-50%, 0); opacity: 1; }

.cc-dock-verre {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 4px; padding: 6px;
  border-radius: 999px; color: #0D0D0D;
  background: rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(14px) saturate(190%) brightness(1.06);
  backdrop-filter: blur(14px) saturate(190%) brightness(1.06);
  box-shadow:
    0 18px 50px -12px rgba(8, 10, 20, .32),
    0 4px 14px -4px rgba(8, 10, 20, .18),
    inset 0 1px 1px rgba(255, 255, 255, .85),
    inset 0 -1px 1px rgba(255, 255, 255, .25),
    inset 0 0 0 .5px rgba(255, 255, 255, .45);
  transition: background .4s ease, color .4s ease, box-shadow .4s ease;
}
/* Réfraction réelle (Chromium) : le fond est tordu sur les bords, avec dispersion des couleurs. */
html.cc-liquide .cc-dock-verre {
  -webkit-backdrop-filter: url(#cc-liquide) saturate(190%) brightness(1.06);
  backdrop-filter: url(#cc-liquide) saturate(190%) brightness(1.06);
}
/* Reflets spéculaires : arête lumineuse en haut à gauche et en bas à droite, comme une lentille. */
.cc-dock-verre::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  padding: 1.2px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .15) 22%, rgba(255, 255, 255, 0) 45%,
      rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, .2) 82%, rgba(255, 255, 255, .75) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* Lumière qui suit le pointeur + léger arc-en-ciel de diffraction sur le bord haut. */
.cc-dock-verre::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background:
    radial-gradient(120px 60px at var(--mx) var(--my), rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 70%),
    linear-gradient(90deg, rgba(255, 120, 160, 0) 10%, rgba(255, 140, 120, .16) 25%, rgba(255, 220, 120, .14) 38%,
      rgba(120, 230, 170, .14) 52%, rgba(110, 170, 255, .16) 66%, rgba(180, 130, 255, .14) 78%, rgba(180, 130, 255, 0) 92%) top / 100% 38% no-repeat;
  mix-blend-mode: soft-light; opacity: .9;
}
.cc-dock.is-dark .cc-dock-verre {
  color: #fff;
  background: rgba(22, 24, 34, .28);
  box-shadow:
    0 18px 50px -12px rgba(0, 0, 0, .6),
    inset 0 1px 1px rgba(255, 255, 255, .35),
    inset 0 -1px 1px rgba(255, 255, 255, .1),
    inset 0 0 0 .5px rgba(255, 255, 255, .18);
}
.cc-dock.is-dark .cc-dock-verre::before { opacity: .6; }
.cc-dock.is-dark .cc-dock-verre::after { opacity: .55; mix-blend-mode: screen; }

.cc-dock a { position: relative; z-index: 3; display: inline-flex; align-items: center; justify-content: center;
  height: 44px; color: inherit; text-decoration: none; border-radius: 999px;
  transition: background .2s ease, transform .5s cubic-bezier(.22, 1.2, .36, 1); }
.cc-dock .cc-rond { width: 44px; }
.cc-dock .cc-rond svg { width: 17px; height: 17px; }
.cc-dock .cc-rond img { width: 20px; height: 20px; border-radius: 5px; }
.cc-dock .cc-rond:hover { background: rgba(255, 255, 255, .3); }
.cc-dock.is-dark .cc-rond:hover { background: rgba(255, 255, 255, .12); }
.cc-dock a:active { transform: scale(.92); }
.cc-dock .cc-go { padding: 0 22px; font: 500 15px/1 inherit; font-family: inherit; letter-spacing: -.01em;
  background: #0D0D0D; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.cc-dock.is-dark .cc-go { background: #fff; color: #0D0D0D; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .08); }
.cc-dock a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

@media (max-width: 640px) {
  .cc-dock { left: 12px; right: 12px; transform: translateY(140%); }
  .cc-dock.is-on { transform: none; }
  .cc-dock-verre { justify-content: space-between; }
  .cc-dock .cc-go { flex: 1; margin: 0 2px; }
}
@media (prefers-reduced-motion: reduce) { .cc-dock { transition: opacity .2s linear; } }
@media (prefers-reduced-transparency: reduce) {
  .cc-dock-verre, html.cc-liquide .cc-dock-verre { -webkit-backdrop-filter: none; backdrop-filter: none; background: #F4F4F5; }
  .cc-dock.is-dark .cc-dock-verre { background: #1A1B20; }
}
