/* ============================================
   VIALET — Catalogue site
   Thème galaxie / multicolore
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-deep: #0a0a0f;
  --bg-primary: #12121a;
  --bg-secondary: #1a1a26;
  --accent: #a78bfa;
  --accent-dim: #7c3aed;
  --secondary: #c4b5fd;
  --accent-light: #c4b5fd;
  --secondary-light: #ddd6fe;
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg-hover: rgba(255, 255, 255, 0.07);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 2rem;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--glass-border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-blob-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #c8a2ff, #80deea, #ffb74d, #64b5f6, #ce93d8, #c8a2ff);
  animation: rainbowSpin 6s linear infinite;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.3);
}

.nav-blob-icon.small { width: 20px; height: 20px; }

@keyframes rainbowSpin {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.nav-links a:hover { color: var(--text-primary); }

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 2rem 4rem;
}

.hero-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.08) 0%, rgba(124, 58, 237, 0.04) 30%, rgba(128, 222, 234, 0.03) 50%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Galaxy Blob --- */
.blob-container {
  width: 260px; height: 260px;
  position: relative;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blob-shape {
  width: 180px; height: 180px;
  background: conic-gradient(from 0deg, #c8a2ff, #80deea, #ffb74d, #64b5f6, #ce93d8, #ef5350, #4caf50, #c8a2ff);
  border-radius: 50%;
  animation: galaxySpin 8s linear infinite;
  filter: drop-shadow(0 0 60px rgba(167, 139, 250, 0.4)) blur(0.5px);
}

@keyframes galaxySpin {
  0% { transform: rotate(0deg) scale(1); border-radius: 50% 45% 50% 48%; }
  25% { transform: rotate(90deg) scale(1.05); border-radius: 45% 50% 48% 52%; }
  50% { transform: rotate(180deg) scale(1); border-radius: 48% 52% 45% 50%; }
  75% { transform: rotate(270deg) scale(1.03); border-radius: 52% 48% 50% 45%; }
  100% { transform: rotate(360deg) scale(1); border-radius: 50% 45% 50% 48%; }
}

.blob-orbit {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.1);
  animation: orbitSpin 6s linear infinite;
}

.orbit-1 {
  width: 200px; height: 200px;
  margin-top: -100px; margin-left: -100px;
  animation-duration: 8s;
}

.orbit-2 {
  width: 240px; height: 240px;
  margin-top: -120px; margin-left: -120px;
  animation-duration: 12s;
  animation-direction: reverse;
}

.orbit-3 {
  width: 280px; height: 280px;
  margin-top: -140px; margin-left: -140px;
  animation-duration: 16s;
}

@keyframes orbitSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.orbit-dot {
  position: absolute;
  top: -4px; left: 50%;
  margin-left: -4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.6);
}

.orbit-2 .orbit-dot { background: #80deea; box-shadow: 0 0 12px rgba(128, 222, 234, 0.6); }
.orbit-3 .orbit-dot { background: #ffb74d; box-shadow: 0 0 12px rgba(255, 183, 77, 0.6); }

/* Title */
.hero-title {
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.title-gradient {
  background: linear-gradient(135deg, var(--accent-light), #80deea, var(--secondary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.tagline-highlight { color: var(--text-primary); font-weight: 600; }

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--accent-dim), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* --- Apps Section --- */
.apps {
  padding: 4rem 0 2rem;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

.category-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 2.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-icon { font-size: 1.1rem; }

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--accent)), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.app-card:hover::before { opacity: 1; }

.app-card:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 0 20px color-mix(in srgb, var(--card-accent, var(--accent)) 15%, transparent);
  border-color: color-mix(in srgb, var(--card-accent, var(--accent)) 25%, transparent);
}

.app-blob {
  width: 56px; height: 56px;
  border-radius: 50%;
  margin-bottom: 1rem;
  animation: blobFloat 3s ease-in-out infinite;
  box-shadow: 0 0 20px color-mix(in srgb, var(--card-accent, var(--accent)) 30%, transparent);
}

@keyframes blobFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.05); }
}

.app-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.app-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.app-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-badge.soon {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.app-badge.available {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

/* --- About --- */
.about {
  padding: 4rem 0;
}

.about-card {
  position: relative;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem 3rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.about-glow {
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(167, 139, 250, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.about-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  position: relative;
}

.about-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
  position: relative;
}

.about-text strong { color: var(--text-primary); }

.btn-about {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(124, 58, 237, 0.12));
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: var(--text-primary);
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.btn-about:hover {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.22), rgba(124, 58, 237, 0.22));
  border-color: rgba(167, 139, 250, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(167, 139, 250, 0.15);
}

/* --- Support --- */
.support { padding: 2rem 0 4rem; }

.support-card {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 3.5rem 2.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.support-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-dim), var(--accent), transparent);
}

.support-icon { font-size: 2.5rem; margin-bottom: 1.25rem; }

.support-title {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.support-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.btn-support {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(124, 58, 237, 0.12));
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: var(--text-primary);
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 0.95rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.btn-support:hover {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.22), rgba(124, 58, 237, 0.22));
  border-color: rgba(167, 139, 250, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(167, 139, 250, 0.15);
}

.btn-icon { width: 20px; height: 20px; }

/* --- Footer --- */
.footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--glass-border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
}

.footer-name {
  background: linear-gradient(135deg, var(--accent-light), #80deea, var(--secondary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-credit { font-size: 0.82rem; color: var(--text-muted); }
.footer-credit strong { color: var(--text-secondary); font-weight: 600; }
.footer-credit a { transition: color 0.3s ease; }
.footer-credit a:hover, .footer-credit a:hover strong { color: var(--accent); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .app-card { padding: 1.5rem 1rem; }
}

@media (max-width: 480px) {
  .nav-links a:not(:last-child) { display: none; }
  .hero { padding: 6rem 1.5rem 3rem; }
  .blob-container { width: 200px; height: 200px; margin-bottom: 1.5rem; }
  .blob-shape { width: 140px; height: 140px; }
  .apps-grid { grid-template-columns: 1fr 1fr; }
  .app-card { padding: 1.25rem 0.75rem; }
  .app-blob { width: 44px; height: 44px; }
  .section-inner { padding: 0 1.25rem; }
  .about-card { padding: 2.5rem 1.5rem; }
  .support-card { padding: 2.5rem 1.5rem; }
}

.hero-content > *, .about-card > *, .support-card > * {
  will-change: transform, opacity;
}
