/* Avalue Design System — global entry point. Consumers link this one file. */
@import "./tokens/fonts.css";
@import "./tokens/colors.css";
@import "./tokens/typography.css";
@import "./tokens/layout.css";
@import "./tokens/base.css";
@import "./tokens/fig-tokens.css";


/* ─── Boutons Avalue 2026 ─── */
/* Avalue — boutons. Bordure fine 1px, lumière en orbite sur le contour,
   fond teinté 20%, balayage de verre au survol.
   Orange = Scanvalue / diagnostic. Bleu = tout le reste. */

@property --av-a {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes av-orbit {
  to { --av-a: 360deg; }
}

@keyframes av-sheen {
  0%   { transform: translateX(-130%) skewX(-18deg); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translateX(130%) skewX(-18deg); opacity: 0; }
}

.av-btn {
  --c: #3D729D;
  --c-hi: #84A9C1;
  --c-lo: rgba(61, 114, 157, 0.32);
  --c-fill: rgba(61, 114, 157, 0.2);
  --av-txt: #0C1012;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: 5px;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
  color: var(--av-txt);
  font-family: 'Helvetica Now Display', Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: color 300ms cubic-bezier(0.25, 0, 0, 1),
              background-color 300ms cubic-bezier(0.25, 0, 0, 1);
}

/* le contour : 1px, teinte constante + arc lumineux qui tourne */
.av-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background:
    conic-gradient(from var(--av-a),
      transparent 0 8%,
      var(--c-hi) 21%,
      transparent 36%,
      transparent 58%,
      var(--c-hi) 71%,
      transparent 86%),
    linear-gradient(var(--c-lo), var(--c-lo));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: av-orbit 7s linear infinite;
  transition: opacity 300ms ease;
}

/* le balayage de verre, au survol seulement */
.av-btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  width: 60%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  opacity: 0;
  pointer-events: none;
}

.av-btn:hover::before { animation-duration: 2.4s; }
.av-btn:hover::after { animation: av-sheen 900ms cubic-bezier(0.25, 0, 0, 1); }
.av-btn:hover { background-color: var(--c-fill); }

.av-btn:focus-visible {
  outline: 1px solid var(--c);
  outline-offset: 3px;
}

/* variantes de teinte */
.av-btn--orange {
  --c: #F97942;
  --c-hi: #F97942;
  --c-lo: rgba(249, 121, 66, 0.4);
  --c-fill: rgba(249, 121, 66, 0.2);
}

/* fond teinté permanent, pour les appels principaux */
.av-btn--fill { background-color: var(--c-fill); }

/* sur encre : le texte passe au blanc, la teinte s'éclaircit */
[data-dark] .av-btn,
footer .av-btn {
  --av-txt: #FFFFFF;
  --c-lo: rgba(132, 169, 193, 0.4);
}

[data-dark] .av-btn--orange,
footer .av-btn--orange {
  --c-lo: rgba(249, 121, 66, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .av-btn::before { animation: none; }
  .av-btn:hover::after { animation: none; }
}
