/* sofiaa.life — cyber glam.

   Nuit rose et violette, neon partout: des liseres qui tournent autour des
   cartes, un halo qui respire, un fond qui derive et pulse. Le mouvement est
   assume, mais tout passe par transform, opacity et filter -- ce que le GPU
   compose sans faire ramer un telephone.

   Aucune requete externe: polices du systeme, degrades et lumiere en CSS. */

@property --tour {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --nuit: #150b13;
  --nuit-2: #221030;

  --rose: #ff2d8e;
  --violet: #b14dff;
  --cyan: #23e0ff;

  --texte: #ffe9f2;
  --texte-doux: #d9aec8;
  --murmure: #b083a0;

  --verre: rgba(255, 255, 255, 0.05);
  --verre-fort: rgba(255, 255, 255, 0.09);
  --arete: rgba(255, 45, 142, 0.32);

  --neon: conic-gradient(from var(--tour),
    var(--rose), var(--violet), var(--cyan), var(--violet), var(--rose));

  /* Alias conserves pour l'admin, qui garde ses anciens noms. */
  --vif: var(--rose);
  --chaud: var(--violet);

  --corps: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --rond: 22px;
  --rond-l: 30px;
  --souple: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--nuit); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 34px 20px calc(34px + env(safe-area-inset-bottom));
  color: var(--texte);
  font-family: var(--corps);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background:
    radial-gradient(55vw 42vh at 12% -4%, rgba(255, 45, 142, 0.32), transparent 60%),
    radial-gradient(55vw 45vh at 92% 6%, rgba(177, 77, 255, 0.28), transparent 58%),
    radial-gradient(70vw 55vh at 50% 110%, rgba(35, 224, 255, 0.16), transparent 62%),
    linear-gradient(168deg, var(--nuit) 0%, var(--nuit-2) 100%);
  background-attachment: fixed;
}

::selection { background: var(--rose); color: #fff; }

/* --- fond: des halos qui derivent et respirent -------------------- */
.fond { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.fond__halo {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(70px);
}

.fond__halo--a {
  top: -28vmax; left: -18vmax;
  background: radial-gradient(circle, var(--rose), transparent 66%);
  animation: derive 16s var(--souple) infinite alternate,
             pulse 6s ease-in-out infinite;
}

.fond__halo--b {
  bottom: -30vmax; right: -20vmax;
  background: radial-gradient(circle, var(--violet), transparent 66%);
  animation: derive2 19s var(--souple) infinite alternate,
             pulse 7.5s ease-in-out infinite;
}

/* Un troisieme foyer cyan, ajoute au chargement, qui traverse lentement. */
body::before {
  content: "";
  position: fixed;
  z-index: 0;
  top: 30%; left: 50%;
  width: 55vmax; height: 55vmax;
  margin: -27vmax 0 0 -27vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 224, 255, 0.22), transparent 62%);
  filter: blur(70px);
  pointer-events: none;
  animation: traverse 22s ease-in-out infinite;
}

@keyframes derive  { to { transform: translate3d(7vmax, 5vmax, 0) scale(1.15); } }
@keyframes derive2 { to { transform: translate3d(-6vmax, -4vmax, 0) scale(1.18); } }
@keyframes pulse   { 50% { opacity: 0.5; } }
@keyframes traverse {
  0%, 100% { transform: translate3d(-22vmax, 8vmax, 0); }
  50%      { transform: translate3d(22vmax, -10vmax, 0); }
}

/* Le liseré neon: un cadre conique qui tourne, plus son halo flou. */
@keyframes tourne { to { --tour: 360deg; } }

/* --- carte --------------------------------------------------------- */
.carte {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: 32px 24px 28px;
  text-align: center;
  background: rgba(30, 16, 34, 0.55);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  border-radius: var(--rond-l);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
}

/* Le trait neon, net, sur le bord. */
.carte::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--neon);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: tourne 6s linear infinite;
  pointer-events: none;
}

/* Le meme, floute et deborde: c'est lui qui fait briller le contour. */
.carte::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--neon);
  filter: blur(16px);
  opacity: 0.5;
  z-index: -1;
  animation: tourne 6s linear infinite;
  pointer-events: none;
}

/* --- profil -------------------------------------------------------- */
.profil { margin-bottom: 24px; }

.profil__photo {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  display: inline-block;
  border: 3px solid var(--nuit-2);
  background: linear-gradient(var(--nuit-2), var(--nuit-2)) padding-box, var(--neon) border-box;
  box-shadow: 0 0 26px rgba(255, 45, 142, 0.5);
  animation: tourne 5s linear infinite, halo-photo 4s ease-in-out infinite;
}

@keyframes halo-photo {
  50% { box-shadow: 0 0 40px rgba(177, 77, 255, 0.65); }
}

.titre {
  margin: 0;
  font-size: clamp(1.6rem, 6.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, var(--rose), var(--violet) 60%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: lueur 3.5s ease-in-out infinite;
}

@keyframes lueur {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 45, 142, 0.5)); }
  50%      { filter: drop-shadow(0 0 16px rgba(177, 77, 255, 0.75)); }
}

.accroche { margin: 10px 0 0; font-size: 0.95rem; line-height: 1.55; color: var(--texte-doux); }
.accroche:empty { display: none; }

/* --- liens --------------------------------------------------------- */
.liens { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }

.lien {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 18px;
  border: 1.5px solid var(--arete);
  border-radius: var(--rond);
  background: var(--verre-fort);
  color: var(--texte);
  text-decoration: none;
  text-align: left;
  box-shadow: 0 4px 18px -10px rgba(255, 45, 142, 0.4);
  transition: transform 0.2s var(--souple), box-shadow 0.2s var(--souple), border-color 0.2s var(--souple);
}

.lien:hover, .lien:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 45, 142, 0.6);
  box-shadow: 0 0 22px rgba(255, 45, 142, 0.4);
}

.lien:active { transform: scale(0.96); transition-duration: 0.08s; }

.lien__marque {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: rgba(255, 45, 142, 0.16);
  color: var(--rose);
  font-size: 1.2rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 45, 142, 0.3);
}

.lien__logo { display: grid; place-items: center; }
.lien__logo svg { width: 26px; height: 26px; fill: currentColor;
                  filter: drop-shadow(0 0 4px rgba(255, 45, 142, 0.5)); }
.lien__icone { width: 44px; height: 44px; border-radius: 13px; object-fit: cover; }
.lien__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lien__titre { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.lien__note { font-size: 0.79rem; color: var(--texte-doux); overflow-wrap: anywhere; }
.vide { color: var(--murmure); font-size: 0.9rem; }

/* --- lien mis en avant: neon rotatif et glow qui bat -------------- */
.lien--vedette {
  min-height: 74px;
  border: 0;
  background: linear-gradient(135deg, rgba(255, 45, 142, 0.85), rgba(177, 77, 255, 0.85));
  color: #fff;
  box-shadow: 0 0 26px rgba(255, 45, 142, 0.55);
  animation: bat 3s ease-in-out infinite;
}

.lien--vedette::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--neon);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: tourne 4s linear infinite;
  pointer-events: none;
}

@keyframes bat {
  0%, 100% { box-shadow: 0 0 22px rgba(255, 45, 142, 0.45); }
  50%      { box-shadow: 0 0 40px rgba(177, 77, 255, 0.7); }
}

.lien--vedette .lien__titre { font-size: 1.12rem; }
.lien--vedette .lien__note { color: rgba(255, 255, 255, 0.9); }
.lien--vedette .lien__marque { background: rgba(255, 255, 255, 0.22); color: #fff; box-shadow: none; }
.lien--vedette:hover, .lien--vedette:focus-visible { transform: translateY(-2px); filter: brightness(1.08); }

/* --- lien verrouille ----------------------------------------------- */
.lien--verrouille { overflow: hidden; }
.lien--verrouille .lien__texte {
  filter: blur(5px);
  opacity: 0.55;
  transition: filter 0.25s var(--souple), opacity 0.25s var(--souple);
}
.lien--verrouille .lien__marque { filter: blur(1.5px); }

.lien__cadenas {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 600 0.86rem var(--corps);
  color: #fff;
  background: rgba(21, 11, 19, 0.4);
  backdrop-filter: blur(2px);
  text-shadow: 0 0 8px rgba(255, 45, 142, 0.8);
  transition: opacity 0.25s var(--souple);
}

.lien--ouvert .lien__texte { filter: blur(0); opacity: 1; }
.lien--ouvert .lien__marque { filter: blur(0); }
.lien--ouvert .lien__cadenas { opacity: 0; pointer-events: none; }

/* Un fond qui n'arrete jamais de bouger peut gener; on le calme si le
   systeme le demande, sans tout eteindre. */
@media (prefers-reduced-motion: reduce) {
  .fond__halo, body::before, .carte::before, .carte::after,
  .profil__photo, .titre, .lien--vedette, .lien--vedette::before { animation: none; }
}

/* --- banniere d'annonce -------------------------------------------- */
.annonce {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  margin-bottom: 14px;
  padding: 12px 18px;
  text-align: center;
  font: 600 0.88rem/1.4 var(--corps);
  color: #fff;
  border-radius: var(--rond);
  background: linear-gradient(135deg, rgba(255,45,142,.9), rgba(177,77,255,.9));
  box-shadow: 0 0 22px rgba(255,45,142,.5);
  animation: annonce-in .5s var(--souple), bat 3s ease-in-out infinite;
  overflow-wrap: anywhere;
}

@keyframes annonce-in { from { opacity: 0; transform: translateY(-8px); } }

/* --- compte a rebours --------------------------------------------- */
.minuteur {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: -6px 0 18px;
}

.minuteur__label {
  font: 600 0.72rem/1 var(--corps);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--texte-doux);
}

.minuteur__temps {
  font: 700 1.5rem/1 "SF Mono", "Menlo", ui-monospace, monospace;
  letter-spacing: .04em;
  background: linear-gradient(120deg, var(--rose), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(255,45,142,.6));
}
