/* Adaptation du bouton Uiverse.io de Navarog21 fourni pour ce site.
   Les découpes affectent le contour seul : le fond reste transparent. */
:root {
  --button-accent: #087bbf;
  --button-glow: rgb(20 121 234 / 65%);
}

.home-page,
.site-footer {
  --button-accent: #149cea;
}

a.action-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  min-width: 10em;
  max-width: 100%;
  min-height: 3.5em;
  padding: 12px 20px;
  border: 3px solid transparent;
  border-radius: 0.3em;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  transition: box-shadow 1s, color 180ms, background-color 180ms, transform 120ms;
}

.action-button::before,
.action-button::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 3px ridge var(--button-accent);
  border-radius: inherit;
  pointer-events: none;
  transition: clip-path 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.action-button::before { clip-path: inset(0 94% 0 0); }
.action-button::after { clip-path: inset(0 0 0 94%); }

.action-button:focus-visible {
  outline: 2px solid var(--button-accent);
  outline-offset: 5px;
  box-shadow: inset 0 0 25px var(--button-glow);
}

.action-button:focus-visible::before { clip-path: inset(0 49% 0 0); }
.action-button:focus-visible::after { clip-path: inset(0 0 0 49%); }

@media (hover: hover) {
  a.action-button:hover {
    color: var(--ink);
    background: transparent;
    border-color: transparent;
    box-shadow: inset 0 0 25px var(--button-glow);
    text-decoration: none;
  }

  .action-button:hover::before {
    clip-path: inset(0 49% 0 0);
  }
  .action-button:hover::after {
    clip-path: inset(0 0 0 49%);
  }
}

a.action-button:active {
  opacity: 1;
  color: var(--ink);
  background: rgb(20 156 234 / 14%);
  box-shadow: inset 0 0 25px var(--button-glow);
  transform: translateY(1px);
  transition-duration: 100ms;
}

.action-button:active::before { clip-path: inset(0 49% 0 0); }
.action-button:active::after { clip-path: inset(0 0 0 49%); }



@media (prefers-reduced-motion: reduce) {
  .action-button {
    transform: none !important;
    transition: color 150ms, background-color 150ms, box-shadow 150ms !important;
  }
  .action-button::before,
  .action-button::after { transition: none !important; }
}

@media (forced-colors: active) {
  a.action-button { border-color: ButtonText !important; }
  .action-button::before,
  .action-button::after { display: none; }
}
