:root {
  --bg: #050416;
  --bg-soft: #0b0a1f;
  --card: #111226;
  --accent: #a855f7;
  --accent-soft: rgba(168, 85, 247, 0.2);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-soft: #1f2937;
  --radius-xl: 20px;
  --shadow-soft: 0 22px 45px rgba(0, 0, 0, 0.65);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background:
    radial-gradient(circle at top, rgba(168, 85, 247, 0.24), transparent 55%),
    radial-gradient(circle at bottom right, rgba(79, 70, 229, 0.25), transparent 55%),
    var(--bg);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 24px 12px 32px;
}

.hyvys-page {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* HEADER / NAV */

.hyvys-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 4px;
}

.hyvys-logo {
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.15s ease, text-shadow 0.15s ease;
  cursor: pointer;
}

.hyvys-logo:hover {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.65);
}

.hyvys-v {
  color: #7c2bd3;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}

.hyvys-nav-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hyvys-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
}

.hyvys-nav a {
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.hyvys-nav a:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(148, 163, 184, 0.35);
}

.hyvys-nav a.active {
  color: var(--text-main);
  background: var(--accent-soft);
  border-color: rgba(168, 85, 247, 0.55);
}

/* LAYOUT PRINCIPAL */

.hyvys-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hyvys-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.98));
  border-radius: var(--radius-xl);
  padding: 24px 20px 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

@media (min-width: 720px) {
  .hyvys-card {
    padding: 28px 26px 28px;
  }
}

.hyvys-hero-main {
  background:
    linear-gradient(135deg, rgba(30, 64, 175, 0.45), rgba(88, 28, 135, 0.9)),
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.35), transparent 65%);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.hyvys-section {
  background: radial-gradient(circle at top left, rgba(168, 85, 247, 0.12), transparent 70%),
    rgba(15, 23, 42, 0.96);
}

/* HERO */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.hero-logo {
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-title-main {
  font-size: 1.9rem;
  font-weight: 600;
  margin: 6px 0 8px;
}

.hero-subtitle-main {
  font-size: 0.96rem;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.5;
  margin: 0 0 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* BOUTONS */

.hyvys-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease, box-shadow 0.12s ease;
}

.hyvys-btn:hover {
  background: rgba(55, 65, 81, 0.8);
  border-color: rgba(148, 163, 184, 0.8);
  transform: scale(1.02) translateY(-1px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.7);
}

.hyvys-btn--clarte {
  background: var(--accent);
  border-color: transparent;
}

.hyvys-btn--clarte:hover {
  background: #9333ea;
  box-shadow: 0 18px 50px rgba(168, 85, 247, 0.7);
}

.hyvys-btn--neutral {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.45);
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
  }
  .hyvys-btn {
    width: 100%;
  }
}

/* MODULES / GRID */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 6px;
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.module {
  border-radius: 16px;
  border: 1px solid rgba(31, 41, 55, 0.8);
  background: radial-gradient(circle at top left, rgba(168, 85, 247, 0.16), transparent 65%),
    rgba(15, 23, 42, 0.85);
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.module:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.75);
  border-color: rgba(148, 163, 184, 0.6);
}

.module-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(209, 213, 219, 0.7);
}

.module-title {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 2px;
}

.module-text {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.module-link {
  font-size: 0.82rem;
  margin-top: 6px;
}

.module-link a {
  color: var(--accent);
  text-decoration: none;
}

.module-link a:hover {
  text-decoration: underline;
}

/* FOOTER */

.hyvys-footer {
  margin-top: 4px;
  padding: 4px 4px 0;
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.7);
  text-align: right;
}

/* OPTION A2 — HALO PREMIUM GLOBAL */

body.hyvys-premium-active .hyvys-logo {
  position: relative;
  color: #e5d4ff;
  text-shadow: 0 0 14px rgba(168, 85, 247, 0.85);
}

body.hyvys-premium-active .hyvys-logo::after {
  content: "";
  position: absolute;
  inset: -4px -10px;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.35), transparent 60%);
  opacity: 0.85;
  pointer-events: none;
}

@keyframes hyvysPremiumPulse {
  0% {
    transform: scale(1);
    text-shadow: 0 0 0 rgba(168, 85, 247, 0);
  }
  40% {
    transform: scale(1.04);
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.9);
  }
  100% {
    transform: scale(1);
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
  }
}

.hyvys-logo.premium-just-activated {
  animation: hyvysPremiumPulse 0.6s ease-out;
}

/* Overlay de transition Premium (piloté par hyvys-premium.js) */

#hyvysPremiumTransition {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.35), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease-out;
  z-index: 9999;
}

#hyvysPremiumTransition.visible {
  opacity: 1;
}
