/* Page de liens beta_vid — épurée, sa photo en grand, les dégradés de Motion and Skill (cyan, bleu, magenta),
   et des boutons élastiques qu'on peut attraper et secouer. Aucune ressource extérieure. */

@font-face {
  font-family: "Manrope";
  src: url("/assets/police/manrope-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --encre: #0f0f12;
  --gris: #72727a;
  --surface: #f3f3f6;
  --cyan: #13d2fd;
  --bleu: #2a7bff;
  --magenta: #de1dfc;
  --degrade: linear-gradient(90deg, var(--cyan), var(--bleu) 50%, var(--magenta));
  --rebond: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sortie: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: #2a7bff; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(135deg, #13d2fd 0%, #2a7bff 45%, #8b3dff 72%, #de1dfc 100%) fixed;
  color: var(--encre);
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.lecteur-ecran {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.degrade-texte {
  background: var(--degrade);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ================= Lumières de couleur ================= */

.aurore {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.halo {
  position: absolute;
  width: 90vmax;
  height: 90vmax;
  border-radius: 50%;
  opacity: 1;
  will-change: transform;
}
.h1 { left: -40vmax; top: -38vmax; background: radial-gradient(closest-side, rgba(19, 210, 253, 0.95), transparent); animation: derive-1 18s ease-in-out infinite alternate; }
.h2 { right: -45vmax; top: -20vmax; background: radial-gradient(closest-side, rgba(222, 29, 252, 0.9), transparent); animation: derive-2 22s ease-in-out infinite alternate; }
.h3 { left: -10vmax; top: 40vh; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.28), transparent); animation: derive-3 26s ease-in-out infinite alternate; }
.h4 { right: -35vmax; bottom: -50vmax; background: radial-gradient(closest-side, rgba(139, 61, 255, 0.85), transparent); animation: derive-1 20s ease-in-out infinite alternate-reverse; }

@keyframes derive-1 { to { translate: 14vmax 10vmax; } }
@keyframes derive-2 { to { translate: -16vmax 14vmax; } }
@keyframes derive-3 { to { translate: 20vmax -12vmax; } }

/* ================= Mise en page ================= */

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 16px calc(34px + env(safe-area-inset-bottom));
}

/* ================= Carte photo ================= */

.profil { position: relative; perspective: 900px; }

/* contour en dégradé qui tourne lentement autour de la photo */
.cadre {
  position: relative;
  padding: 4px;
  border-radius: 35px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 34px 80px -20px rgba(25, 8, 70, 0.6), 0 0 60px -8px rgba(255, 255, 255, 0.45);
  will-change: transform;
}
.cadre::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  background: conic-gradient(from 0deg, #fff, var(--cyan), #fff, var(--magenta), #fff);
  animation: tourne 8s linear infinite;
}
@keyframes tourne { to { rotate: 360deg; } }

.carte-photo {
  position: relative;
  height: min(64svh, 560px);
  min-height: 420px;
  border-radius: 31px;
  overflow: hidden;
  background: #9fc0d8;
  transform-style: preserve-3d;
  will-change: transform;
}

.portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  scale: 1.04;
}

/* reflet de lumière qui suit l'inclinaison de la carte */
.reflet {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--rx, 30%) var(--ry, 20%), rgba(255, 255, 255, 0.35), transparent 45%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.carte-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 52%, rgba(10, 14, 30, 0.72));
  pointer-events: none;
}

.identite {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
  bottom: 20px;
  color: #fff;
}
.identite h1 { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.identite h1::after { content: ""; display: block; width: 64px; height: 4px; margin: 10px 0 2px; border-radius: 4px; background: var(--degrade); }
.identite p { margin: 6px 0 0; font-size: 15.5px; font-weight: 600; opacity: 0.92; }

/* ================= Liens ================= */

.liens { display: grid; gap: 14px; margin-top: 18px; }

.chiffres {
  display: flex;
  justify-content: center;
  gap: 44px;
  margin: 26px 0 8px;
}

/* chiffres en texte blanc, avec une ombre douce pour ressortir sur le dégradé */
.chiffre {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 6px 10px;
  color: #fff;
  text-decoration: none;
  touch-action: pan-y;
}
.chiffre b {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(20, 6, 60, 0.35), 0 6px 22px rgba(20, 6, 60, 0.45);
}
.chiffre-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(20, 6, 60, 0.4), 0 4px 14px rgba(20, 6, 60, 0.35);
}
.chiffre-label svg { width: 15px; height: 15px; fill: currentColor; filter: drop-shadow(0 1px 3px rgba(20, 6, 60, 0.4)); }

.compteur { font-variant-numeric: tabular-nums; }

.bloc { position: relative; }

/* Code promo */

.bloc-code { margin-top: 2px; }

.code {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 12px;
  border-radius: 22px;
  background: var(--encre);
  color: #fff;
  touch-action: pan-y;
  isolation: isolate;
  overflow: hidden;
}
/* liseré en dégradé qui balaie le bouton du code */
.code::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1.5px;
  border-radius: inherit;
  background: var(--degrade);
  -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);
}
.code::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.16) 50%, transparent 60%);
  translate: -110% 0;
  pointer-events: none;
  animation: balaye 5s var(--sortie) 2.2s infinite;
}
@keyframes balaye { 0% { translate: -110% 0; } 30%, 100% { translate: 110% 0; } }

.code > img { flex: none; width: 48px; height: 48px; border-radius: 13px; }
.code-texte { flex: 1; min-width: 0; }
.code-titre { margin: 0; font-size: 16px; font-weight: 700; }
.code-titre strong { font-weight: 800; letter-spacing: 0.04em; }
.code-titre .degrade-texte { font-weight: 800; }
.code-sous { margin: 2px 0 0; font-size: 12px; color: rgba(255, 255, 255, 0.6); }

.copier {
  flex: none;
  padding: 11px 15px;
  border: 0;
  border-radius: 13px;
  background: var(--degrade);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: scale 160ms var(--sortie), filter 200ms ease;
}
.copier:active { scale: 0.94; }
.copier.copie { background: #16a34a; }

.code-lien {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.code-lien svg { width: 18px; height: 18px; }

/* Cagnotte */


.cagnotte {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  position: relative;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 34px -16px rgba(25, 8, 70, 0.5);
  color: inherit;
  text-decoration: none;
  touch-action: pan-y;
  isolation: isolate;
}
.cagnotte::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 2px;
  border-radius: inherit;
  background: var(--degrade);
  -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);
}
.cagnotte img { flex: none; width: 64px; height: 64px; border-radius: 15px; object-fit: cover; object-position: 50% 30%; }
.cagnotte-texte { flex: 1; display: grid; gap: 2px; font-size: 15.5px; font-weight: 800; line-height: 1.2; }
.cagnotte-texte small { font-size: 12px; font-weight: 600; color: var(--gris); }
.donner {
  flex: none;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--degrade);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
}

/* Réseaux */

.bloc-reseaux { margin-top: 8px; }

.reseaux { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.reseau {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  padding: 9px 14px 9px 9px;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 16px 34px -16px rgba(25, 8, 70, 0.5);
  color: inherit;
  text-decoration: none;
  touch-action: pan-y;
  isolation: isolate;
}
/* au survol, un liseré en dégradé apparaît */
.reseau::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 2px;
  border-radius: inherit;
  background: var(--degrade);
  -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);
  opacity: 1;
  transition: opacity 250ms ease;
}

.reseau-icone {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--marque);
  color: #fff;
}
.reseau-icone svg { width: 21px; height: 21px; fill: currentColor; }
.reseau-nom { font-size: 16.5px; font-weight: 800; }
.reseau-info { font-size: 13px; color: var(--gris); font-weight: 600; }
.chevron { width: 18px; height: 18px; color: var(--bleu); transition: translate 300ms var(--rebond), color 200ms ease; }

.youtube { --marque: #ff0033; }
.discord { --marque: #5865f2; }
.instagram { --marque: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.tiktok { --marque: #111114; }
.tiktok .reseau-icone svg { filter: drop-shadow(-1.2px -1px 0 #25f4ee) drop-shadow(1.2px 1px 0 #fe2c55); }
.twitch { --marque: #9146ff; }

@media (hover: hover) and (pointer: fine) {
  .reseau:hover::before { opacity: 1; }
  .reseau:hover .chevron { translate: 3px 0; color: var(--bleu); }
  .copier:hover { filter: brightness(1.08) saturate(1.1); }
}

/* Pied */

.pied { padding-top: 22px; text-align: center; }
.pied p { margin: 0; font-size: 12.5px; font-weight: 700; color: rgba(255, 255, 255, 0.9); }

/* ================= Pop-up Holy ================= */

.pop-holy {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 24px));
  translate: -50% 24px;
  scale: 0.96;
  opacity: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 44px -14px rgba(25, 8, 70, 0.55);
  overflow: hidden;
  isolation: isolate;
  transition: opacity 260ms ease, translate 500ms var(--rebond), scale 500ms var(--rebond);
}
.pop-holy.visible { opacity: 1; translate: -50% 0; scale: 1; }
/* liseré en dégradé, comme les boutons */
.pop-holy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 2px;
  border-radius: inherit;
  background: var(--degrade);
  -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);
}

.pop-lien {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 44px 13px 11px;
  color: var(--encre);
  text-decoration: none;
}
.pop-lien img { flex: none; width: 46px; height: 46px; border-radius: 13px; }
.pop-texte { flex: 1; display: grid; gap: 2px; min-width: 0; }
.pop-message { font-size: 14.5px; font-weight: 800; line-height: 1.25; }
.pop-texte small { font-size: 11px; font-weight: 600; color: var(--gris); }
.pop-fleche {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--degrade);
  color: #fff;
}
.pop-fleche svg { width: 16px; height: 16px; }

.pop-fermer {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9a9aa3;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.pop-fermer:hover { background: var(--surface); color: var(--encre); }
.pop-lien { padding-right: 54px; }
.pop-fleche { margin-right: -12px; }

/* barre en dégradé qui se vide pendant que le pop-up est affiché */
.pop-barre {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--degrade);
  transform-origin: left center;
}
.pop-holy.visible .pop-barre { animation: se-vide var(--duree-pop, 6s) linear forwards; }
@keyframes se-vide { to { transform: scaleX(0); } }

@media (min-width: 960px) {
  .pop-holy { left: auto; right: 24px; bottom: 24px; translate: 0 24px; }
  .pop-holy.visible { translate: 0 0; }
}

/* confettis du bouton « Copier » */
.confetti {
  position: fixed;
  z-index: 50;
  width: 8px;
  height: 13px;
  border-radius: 2px;
  pointer-events: none;
}

/* secousse : quand on secoue le téléphone */
@keyframes secousse {
  20% { rotate: -2.5deg; translate: -6px 0; }
  40% { rotate: 2deg; translate: 5px 0; }
  60% { rotate: -1.4deg; translate: -3px 0; }
  80% { rotate: 0.8deg; translate: 2px 0; }
}
.secoue { animation: secousse 0.6s var(--sortie); }

/* ================= Ordinateur ================= */

@media (min-width: 960px) {
  .page {
    max-width: 1040px;
    display: grid;
    grid-template-columns: 440px minmax(0, 1fr);
    column-gap: 72px;
    align-items: center;
    align-content: center;
    min-height: 100vh;
    padding: 48px 40px 48px;
  }
  .carte-photo { height: min(78vh, 640px); }
  .identite h1 { font-size: 46px; }
  .liens { margin-top: 0; }
  .chiffres { margin-top: 0; }
  .chiffre b { font-size: 38px; }
}

/* ================= Arrivée ================= */

@keyframes apparait { from { opacity: 0; } }
@keyframes monte { from { opacity: 0; translate: 0 22px; } }
@keyframes carte-arrive {
  from { opacity: 0; scale: 0.94; filter: blur(10px); }
  to { opacity: 1; scale: 1; filter: blur(0); }
}

.js .aurore { animation: apparait 1.6s ease backwards; }
.js .cadre { animation: carte-arrive 1.1s var(--sortie) 0.1s backwards; }
.js .identite h1 { animation: monte 0.8s var(--sortie) 0.55s backwards; }
.js .identite p { animation: monte 0.8s var(--sortie) 0.65s backwards; }

.js:not(.pret) .profil,
.js:not(.pret) .profil *,
.js:not(.pret) .aurore { animation-play-state: paused !important; }

/* blocs révélés au défilement (--attente est réglée par le script) */
.js .revele > *, .js .revele.chiffres > * {
  opacity: 0;
  translate: 0 26px;
  transition: opacity 0.6s var(--sortie) var(--attente, 0ms), translate 0.8s var(--rebond) var(--attente, 0ms), background-color 200ms ease;
}
.js .revele.vu > *, .js .revele.vu.chiffres > * { opacity: 1; translate: none; }
.js .revele.vu.chiffres > :nth-child(2) { transition-delay: calc(var(--attente, 0ms) + 110ms); }
.js .revele .reseaux li { opacity: 0; translate: 0 18px; transition: opacity 0.5s var(--sortie), translate 0.7s var(--rebond); }
.js .revele.vu .reseaux li { opacity: 1; translate: none; }
.js .revele.vu .reseaux li:nth-child(1) { transition-delay: calc(var(--attente, 0ms) + 60ms); }
.js .revele.vu .reseaux li:nth-child(2) { transition-delay: calc(var(--attente, 0ms) + 120ms); }
.js .revele.vu .reseaux li:nth-child(3) { transition-delay: calc(var(--attente, 0ms) + 180ms); }
.js .revele.vu .reseaux li:nth-child(4) { transition-delay: calc(var(--attente, 0ms) + 240ms); }
.js .revele.vu .reseaux li:nth-child(5) { transition-delay: calc(var(--attente, 0ms) + 300ms); }
.js .revele.pose > *, .js .revele.pose .reseaux li { transition-delay: 0ms !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ================= Page 404 ================= */

.introuvable {
  min-height: 100svh;
  display: grid;
  place-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}
.introuvable h1 { margin: 0; font-size: 26vw; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.introuvable p { margin: 0; color: var(--gris); }
.introuvable a { color: var(--bleu); font-weight: 800; }
