/* ============================================================
   Vstudios — finition visuelle
   Couche ajoutée par-dessus le thème principal : reliefs, halos,
   hairlines, transitions plus douces, curseur personnalisé.
   Aucune règle de mise en page n'est modifiée ici.
   ============================================================ */

:root {
  --ease-out: cubic-bezier(0.22, 0.75, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ring: rgba(255, 107, 107, 0.5);
  --cursor: #ff9a9a;
  --hairline: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

[data-theme='light'] {
  --ring: rgba(179, 18, 18, 0.42);
  --cursor: #b31212;
  --hairline: linear-gradient(90deg, transparent, rgba(34, 15, 15, 0.22), transparent);
}

/* ------------------------------------------------ fond : grain + halos */
.ambient::after {
  content: '';
  position: absolute;
  inset: -40%;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

body {
  background-image:
    radial-gradient(1200px 620px at 50% -220px, rgba(224, 16, 16, 0.16), transparent 62%),
    radial-gradient(900px 520px at 100% 30%, rgba(255, 45, 45, 0.07), transparent 70%);
  background-attachment: fixed;
}

[data-theme='light'] body {
  background-image:
    radial-gradient(1200px 620px at 50% -220px, rgba(224, 16, 16, 0.1), transparent 62%),
    radial-gradient(900px 520px at 100% 30%, rgba(179, 18, 18, 0.05), transparent 70%);
}

/* ------------------------------------------------ barre de défilement */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 107, 107, 0.35) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(255, 107, 107, 0.35);
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 107, 0.6);
  background-clip: content-box;
}

/* ------------------------------------------------ focus accessible */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 10px;
}

/* ------------------------------------------------ texte en dégradé */
[data-theme='light'] .grad-text {
  background-image: linear-gradient(100deg, #d81f1f 0%, #c81414 38%, #a31010 74%, #7d0c0c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------------------------ entêtes de section */
.section-head .eyebrow {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px -22px rgba(224, 16, 16, 0.9);
}
.section-head h2::after {
  content: '';
  display: block;
  width: 54px;
  height: 2px;
  margin: 22px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.9), transparent);
  opacity: 0.8;
}

/* ------------------------------------------------ boutons */
.btn {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.22s var(--ease-out),
    box-shadow 0.3s var(--ease-out),
    border-color 0.22s var(--ease-out),
    background 0.22s var(--ease-out),
    color 0.22s var(--ease-out);
}
.btn:active {
  transform: translateY(0) scale(0.985);
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.34) 48%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 0.85s var(--ease-out);
  pointer-events: none;
}
.btn-primary:hover::after {
  transform: translateX(130%);
}
.btn-ghost {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
[data-theme='light'] .btn-ghost {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 22px -18px rgba(84, 12, 12, 0.5);
}

/* Aimantation douce des boutons principaux (pilotée par main.js) */
.btn.is-magnetic {
  transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) - 2px), 0);
  transition: transform 0.16s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.btn.is-magnetic:active {
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(0.985);
}
@media (hover: none), (prefers-reduced-motion: reduce) {
  .btn.is-magnetic {
    transform: none;
  }
}

/* ------------------------------------------------ cartes : relief + halo */
.price-card,
.compare-card,
.step-card,
.faq-item,
.pricing-note {
  position: relative;
  transition:
    transform 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    background 0.35s var(--ease-out);
}
.price-card::after,
.compare-card::after,
.step-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), transparent 40%, transparent 70%, rgba(224, 16, 16, 0.18));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  transition: opacity 0.35s var(--ease-out);
  pointer-events: none;
}
.price-card:hover::after,
.compare-card:hover::after,
.step-card:hover::after {
  opacity: 1;
}
.price-card:hover,
.compare-card:hover,
.step-card:hover {
  box-shadow:
    0 34px 80px -46px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 107, 107, 0.06),
    0 28px 60px -40px rgba(224, 16, 16, 0.55);
}
.price-card.featured {
  box-shadow:
    0 34px 90px -50px rgba(224, 16, 16, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.price-card.featured:hover {
  box-shadow:
    0 44px 110px -50px rgba(224, 16, 16, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.price-card:hover,
.step-card:hover {
  border-color: rgba(255, 122, 122, 0.34);
}
.faq-item {
  overflow: hidden;
}
.faq-item:hover {
  border-color: rgba(255, 122, 122, 0.24);
}
.faq-item[open] {
  border-color: rgba(224, 16, 16, 0.32);
  box-shadow: 0 26px 60px -42px rgba(224, 16, 16, 0.6);
}

/* ------------------------------------------------ header : verre plus net */
.site-header {
  background: color-mix(in srgb, var(--bg) 66%, transparent);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}
.site-header.is-scrolled {
  box-shadow: 0 18px 40px -34px rgba(0, 0, 0, 0.9);
}
.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--hairline);
  opacity: 0.55;
  pointer-events: none;
}
.nav-link {
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.nav-link:hover {
  transform: translateY(-1px);
}
.nav-link.is-active::after {
  box-shadow: 0 0 12px rgba(255, 45, 45, 0.85);
}

/* ------------------------------------------------ apparition au scroll */
.reveal {
  filter: blur(6px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out),
    filter 0.7s var(--ease-out);
}
.reveal.in {
  filter: blur(0);
}

/* ============================================================
   Curseur personnalisé
   La classe .has-cursor n'est posée que si le script a démarré
   (voir main.js), donc le curseur système reste intact sinon.
   ============================================================ */

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--cursor);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.85);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid var(--ring);
  background: radial-gradient(circle, rgba(224, 16, 16, 0.12), transparent 68%);
  transition:
    opacity 0.25s ease,
    width 0.28s var(--ease-spring),
    height 0.28s var(--ease-spring),
    margin 0.28s var(--ease-spring),
    border-color 0.28s var(--ease-out),
    background 0.28s var(--ease-out);
}

html.has-cursor.is-pointer-visible .cursor-dot,
html.has-cursor.is-pointer-visible .cursor-ring {
  opacity: 1;
}

.cursor-ring.is-hover {
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-color: rgba(255, 107, 107, 0.9);
  background: radial-gradient(circle, rgba(224, 16, 16, 0.2), transparent 70%);
}

.cursor-ring.is-down {
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-color: #ffffff;
}

html.has-cursor,
html.has-cursor * {
  cursor: none !important;
}
html.has-cursor input,
html.has-cursor textarea,
html.has-cursor select {
  cursor: text !important;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    filter: none;
  }
  .btn-primary::after {
    display: none;
  }
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}
