/* labo2.fozzy.me : page « en construction », version animée.
   Tout est dans des fichiers à part (la CSP du site interdit le style et le script dans la page). */

:root {
  --nuit: #07060f;
  --texte: #f3f0ff;
  --doux: #a9a3c7;
  --rose: #ff7ad9;
  --violet: #8f7bff;
  --cyan: #5ee7ff;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100%;
  overflow: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texte);
  background: var(--nuit);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Fond : aurore (trois nappes floues qui dérivent) ---------- */
.aurore { position: fixed; inset: -20%; filter: blur(70px) saturate(140%); opacity: .75; }
.nappe { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.n1 { width: 55vmax; height: 55vmax; left: 5%;  top: 0;   background: radial-gradient(circle, var(--violet), transparent 65%); animation: derive1 22s ease-in-out infinite alternate; }
.n2 { width: 45vmax; height: 45vmax; right: 0;  top: 25%; background: radial-gradient(circle, var(--rose), transparent 65%);   animation: derive2 26s ease-in-out infinite alternate; }
.n3 { width: 50vmax; height: 50vmax; left: 25%; bottom: -5%; background: radial-gradient(circle, var(--cyan), transparent 65%); animation: derive3 30s ease-in-out infinite alternate; opacity: .7; }

/* Constellation (ciel.js) et grain photographique par-dessus */
#ciel { position: fixed; inset: 0; width: 100%; height: 100%; }
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
}

/* ---------- Scène centrale ---------- */
.scene {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  pointer-events: none;
}

.orbite { width: min(280px, 62vw); margin-bottom: -18px; animation: entree 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.orbite svg { display: block; width: 100%; height: auto; overflow: visible; }
.anneau { transform-origin: 100px 100px; }
.a1 { animation: tourne1 9s linear infinite; }
.a2 { animation: tourne2 13s linear infinite; opacity: .8; }
.a3 { animation: tourne3 17s linear infinite; opacity: .6; }
.noyau { transform-origin: 100px 100px; animation: respire 4s ease-in-out infinite; }

.titre {
  margin: 0;
  font-size: clamp(4rem, 17vw, 8.5rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.055em;
  background: linear-gradient(100deg, #fff 0%, #fff 35%, var(--cyan) 45%, var(--rose) 55%, #fff 65%, #fff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: entree 1.2s .15s cubic-bezier(.2, .8, .2, 1) both, reflet 6s 1.5s ease-in-out infinite;
  filter: drop-shadow(0 10px 40px rgba(143, 123, 255, .35));
}
.titre span { font-size: .5em; vertical-align: super; letter-spacing: 0; }

.sous-titre {
  max-width: 30ch;
  margin: 18px 0 30px;
  color: var(--doux);
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  line-height: 1.5;
  animation: entree 1.2s .3s cubic-bezier(.2, .8, .2, 1) both;
}

.etat {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .04em;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 20px 50px -20px rgba(0, 0, 0, .6);
  animation: entree 1.2s .45s cubic-bezier(.2, .8, .2, 1) both;
}

.pastille {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--rose));
  animation: pouls 2s ease-out infinite;
}

.points { display: inline-flex; gap: 4px; }
.points i { width: 4px; height: 4px; border-radius: 50%; background: var(--texte); opacity: .25; animation: point 1.4s ease-in-out infinite; }
.points i:nth-child(2) { animation-delay: .2s; }
.points i:nth-child(3) { animation-delay: .4s; }

footer {
  position: relative;
  z-index: 1;
  padding: 0 0 22px;
  text-align: center;
  color: var(--doux);
  font-size: .75rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: .55;
}

/* ---------- Animations ---------- */
@keyframes entree  { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
@keyframes reflet  { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0% 0; } }
@keyframes tourne1 { from { transform: rotate(0deg); }   to { transform: rotate(360deg); } }
@keyframes tourne2 { from { transform: rotate(60deg); }  to { transform: rotate(-300deg); } }
@keyframes tourne3 { from { transform: rotate(120deg); } to { transform: rotate(480deg); } }
@keyframes respire { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes pouls   { 0% { box-shadow: 0 0 0 0 rgba(94, 231, 255, .6); } 100% { box-shadow: 0 0 0 14px rgba(94, 231, 255, 0); } }
@keyframes point   { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes derive1 { to { transform: translate(18%, 12%) scale(1.15); } }
@keyframes derive2 { to { transform: translate(-20%, -10%) scale(.9); } }
@keyframes derive3 { to { transform: translate(-10%, -18%) scale(1.2); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
