/* ============================================
   NDSA Design System — Visite en Ligne
   Palette : Rose #FF2E93, Violet #7B2CFF,
   Bleu IA #0E7CFF, Cyan #32D6FF,
   Blanc #F9FAFC, Bleu nuit #081B5B
   Typo : Inter, Manrope, Montserrat
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --rose: #FF2E93;
  --violet: #7B2CFF;
  --bleu-ia: #0E7CFF;
  --cyan: #32D6FF;
  --blanc: #F9FAFC;
  --bleu-nuit: #081B5B;
  --bleu-profond: #050E2A;
  --gris-fonce: #1A1F3A;
  --gris-moyen: #2A2F4A;
  --gris-clair: #8A8FA8;
  --rose-glow: rgba(255, 46, 147, 0.3);
  --cyan-glow: rgba(50, 214, 255, 0.3);
  --violet-glow: rgba(123, 44, 255, 0.3);
  --gradient-principal: linear-gradient(135deg, var(--rose), var(--violet));
  --gradient-cyan: linear-gradient(135deg, var(--cyan), var(--bleu-ia));
  --gradient-full: linear-gradient(135deg, var(--rose), var(--violet), var(--bleu-ia), var(--cyan));
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Manrope', sans-serif;
  --font-display: 'Montserrat', sans-serif;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow-rose: 0 0 20px var(--rose-glow);
  --shadow-glow-cyan: 0 0 20px var(--cyan-glow);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  background: var(--bleu-profond);
  color: var(--blanc);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background particles effect */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(123, 44, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 46, 147, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(14, 124, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Neural Network Background */
.neural-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  opacity: 0.15;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--rose); }

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }

.gradient-text {
  background: var(--gradient-principal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-cyan {
  background: var(--gradient-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== HEADER / NAV ========== */
header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  padding: 0.8rem 2rem;
  background: rgba(5, 14, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}

header.scrolled {
  background: rgba(5, 14, 42, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

nav {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--blanc);
}

.logo img {
  height: 40px;
  width: auto;
}

.logo .ndsa-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-principal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  color: white;
  position: relative;
}

.logo .ndsa-badge::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--cyan));
  z-index: -1;
  opacity: 0.5;
  animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.2; }
}

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

.nav-links a {
  color: var(--gris-clair);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-principal);
  transition: width 0.3s;
}

.nav-links a:hover { color: var(--blanc); }
.nav-links a:hover::after { width: 100%; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-principal);
  color: white;
  box-shadow: 0 4px 15px var(--rose-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--rose-glow);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--blanc);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
  transform: translateY(-2px);
}

.btn-cyan {
  background: var(--gradient-cyan);
  color: var(--bleu-profond);
  box-shadow: 0 4px 15px var(--cyan-glow);
}

.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--cyan-glow);
  color: var(--bleu-profond);
}

.btn-lg { padding: 16px 36px; font-size: 1.1rem; }

/* ========== SECTIONS ========== */
section {
  padding: 6rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header .subtitle {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--rose);
  margin-bottom: 1rem;
  background: rgba(255, 46, 147, 0.1);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 46, 147, 0.2);
}

.section-header p {
  color: var(--gris-clair);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 1rem auto 0;
}

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

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 44, 255, 0.15), transparent);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 46, 147, 0.1), transparent);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero p {
  font-size: 1.2rem;
  color: var(--gris-clair);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero brain animation container */
.brain-container {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  position: relative;
}

.brain-svg {
  width: 100%;
  height: 100%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

/* ========== CATEGORIES GRID ========== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.category-card {
  background: linear-gradient(135deg, var(--gris-fonce), var(--bleu-nuit));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 2rem;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--gradient-principal);
  opacity: 0;
  transition: opacity 0.3s;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 46, 147, 0.3);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(255, 46, 147, 0.1);
}

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

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.category-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--blanc);
}

.category-card p {
  color: var(--gris-clair);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ========== QUIZ / QUESTIONNAIRE ========== */
.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 0;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--gris-moyen);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-principal);
  border-radius: 2px;
  transition: width 0.5s ease;
  width: 0%;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--gris-clair);
  font-weight: 500;
  white-space: nowrap;
}

.quiz-step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.quiz-step.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-question {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--blanc);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.quiz-option {
  background: var(--gris-fonce);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: var(--blanc);
  font-family: var(--font-primary);
}

.quiz-option:hover {
  border-color: var(--cyan);
  background: rgba(50, 214, 255, 0.05);
}

.quiz-option.selected {
  border-color: var(--rose);
  background: rgba(255, 46, 147, 0.08);
  box-shadow: 0 0 15px rgba(255, 46, 147, 0.15);
}

.quiz-option .radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gris-moyen);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s;
}

.quiz-option.selected .radio {
  border-color: var(--rose);
  background: var(--gradient-principal);
}

.quiz-option.selected .radio::after {
  content: '✓';
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Slider for severity */
.slider-container {
  margin: 1.5rem 0;
}

.slider-container label {
  display: block;
  color: var(--gris-clair);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.slider-value {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--gris-clair);
  margin-top: 0.3rem;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--gris-moyen);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient-principal);
  cursor: pointer;
  box-shadow: 0 0 10px var(--rose-glow);
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

/* ========== RESULT PAGE ========== */
.result-container {
  max-width: 800px;
  margin: 0 auto;
}

.result-header {
  text-align: center;
  margin-bottom: 3rem;
}

.result-header h2 {
  margin-bottom: 0.5rem;
}

.result-card {
  background: linear-gradient(135deg, var(--gris-fonce), var(--bleu-nuit));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.result-card .card-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--cyan);
  margin-bottom: 1rem;
  background: rgba(50, 214, 255, 0.1);
  padding: 4px 12px;
  border-radius: 12px;
}

.result-card h3 {
  color: var(--blanc);
  margin-bottom: 1rem;
}

.result-card p, .result-card li {
  color: var(--gris-clair);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.result-card ul {
  list-style: none;
  padding: 0;
}

.result-card ul li::before {
  content: '✦';
  color: var(--rose);
  margin-right: 8px;
}

.protocol-steps {
  counter-reset: step;
}

.protocol-step {
  counter-increment: step;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.protocol-step:last-child { border-bottom: none; }

.protocol-step::before {
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-principal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}

.protocol-step h4 {
  color: var(--blanc);
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.protocol-step p {
  color: var(--gris-clair);
  font-size: 0.9rem;
  margin: 0;
}

/* Product Card for Boutique */
.product-card {
  background: linear-gradient(135deg, var(--gris-fonce), var(--bleu-nuit));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1rem;
  transition: all 0.3s;
}

.product-card:hover {
  border-color: rgba(50, 214, 255, 0.2);
  transform: translateX(5px);
}

.product-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  background: var(--gris-moyen);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.product-info { flex: 1; }

.product-info h4 {
  color: var(--blanc);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.product-info p {
  color: var(--gris-clair);
  font-size: 0.85rem;
  margin: 0;
}

.product-price {
  color: var(--cyan);
  font-weight: 700;
  font-size: 1.2rem;
  text-align: right;
}

/* ========== PRICING ========== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.pricing-card {
  background: linear-gradient(135deg, var(--gris-fonce), var(--bleu-nuit));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  transition: all 0.4s;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--rose);
  box-shadow: 0 0 30px var(--rose-glow);
  transform: scale(1.02);
}

.pricing-card.featured::before {
  content: 'RECOMMANDÉ';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-principal);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 4px 16px;
  border-radius: 12px;
}

.pricing-card h3 { margin-bottom: 0.5rem; }

.pricing-card .price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  margin: 1rem 0;
}

.pricing-card .price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--gris-clair);
}

.pricing-card ul {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0;
}

.pricing-card ul li {
  padding: 0.5rem 0;
  color: var(--gris-clair);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-card ul li::before {
  content: '✓';
  color: var(--cyan);
  font-weight: 700;
}

.pricing-card .btn { width: 100%; justify-content: center; }

/* ========== LOADING SPINNER ========== */
.spinner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--gris-moyen);
  border-top-color: var(--rose);
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.analysis-loading {
  text-align: center;
  padding: 3rem;
}

.analysis-loading p {
  color: var(--gris-clair);
  margin-top: 1rem;
}

/* ========== FOOTER ========== */
footer {
  background: var(--bleu-nuit);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3rem 2rem;
  text-align: center;
}

footer p {
  color: var(--gris-clair);
  font-size: 0.85rem;
}

footer .disclaimer {
  max-width: 600px;
  margin: 1rem auto;
  font-size: 0.75rem;
  color: rgba(138, 143, 168, 0.6);
  line-height: 1.6;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  section { padding: 4rem 1rem; }
  .hero { padding: 7rem 1rem 3rem; }
  .hero h1 { font-size: 1.8rem; }
  
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.8rem; }
  
  .categories-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: none; }
  
  .result-card { padding: 1.5rem; }
  .product-card { flex-direction: column; text-align: center; }
  .product-price { text-align: center; }
  
  .protocol-step { flex-direction: column; }
  
  .hero-buttons { flex-direction: column; align-items: center; }
}
