body {
  font-family: 'DM Sans', sans-serif;
}

/* Palette de couleurs personnalisée */
:root {
  --primary-color: #9a6eaf;
  --secondary-color: #f6b737;
  --background-color: #F4F4F4;
  --text-color: #333;
  --header-bg: #5c3072;
  --gradient-primary: linear-gradient(135deg, #9a6eaf 0%, #7b5a8f 100%);
  --gradient-secondary: linear-gradient(135deg, #f6b737 0%, #e0ac07 100%);
  --gradient-accent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --shadow-soft: 0 10px 40px rgba(0,0,0,0.1);
  --shadow-medium: 0 20px 60px rgba(0,0,0,0.15);
  --border-radius: 20px;
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Header et Navbar */
header {
  background: #fff;
  backdrop-filter: blur(20px);
  position: fixed;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar-brand img {
  max-height: 80px;
  transition: var(--transition);
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: var(--text-color) !important;
  margin-right: 20px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: var(--transition);
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}

.navbar-nav .nav-link:hover {
  color: var(--secondary-color) !important;
  transform: translateY(-2px);
}

/* Hero Section Enhanced */
.hero {
  background: url('/images/home-background.svg') no-repeat center center/cover;
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(92,48,114,0.8) 100%);
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.3)"/><circle cx="80" cy="40" r="0.5" fill="rgba(246,183,55,0.4)"/><circle cx="40" cy="70" r="0.8" fill="rgba(255,255,255,0.2)"/><circle cx="70" cy="80" r="0.3" fill="rgba(246,183,55,0.5)"/></svg>') repeat;
  animation: particles 20s linear infinite;
}

@keyframes particles {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-100px) rotate(360deg); }
}

.hero-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.floating-shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 120px;
  height: 120px;
  top: 50%;
  right: 15%;
  animation-delay: 2s;
}

.shape-3 {
  width: 60px;
  height: 60px;
  bottom: 30%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 200px 20px;
  max-width: 900px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 0.9rem;
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.gradient-text {
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.highlight-text {
  position: relative;
  display: inline-block;
}

.highlight-text::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--secondary-color);
  opacity: 0.7;
  z-index: -1;
  transform: skew(-12deg);
}

.hero-subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  margin: 2rem 0;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 12px 24px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-icon {
  font-size: 1.2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn-cta {
  background: var(--gradient-secondary);
  border: none;
  padding: 18px 36px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 8px 30px rgba(246, 183, 55, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.btn-cta:hover::before {
  left: 100%;
}

.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(246, 183, 55, 0.6);
}

.demo-btn {
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #fff;
}

.demo-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}

/* Sections communes */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(154, 110, 175, 0.1);
  color: var(--primary-color);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.section-subtitle {
  font-size: 1.1rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* Features Section Enhanced */
.features {
  padding: 100px 0;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.feature-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 40px 30px;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  text-align: center;
  height: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-medium);
}

.feature-icon-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(154, 110, 175, 0.1);
  border-radius: 50%;
  position: relative;
  z-index: 2;
}

.feature-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(154, 110, 175, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.feature-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.feature-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.tag {
  background: rgba(154, 110, 175, 0.1);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* How it Works Section */
.how-it-works {
  padding: 100px 0;
  background: var(--background-color);
}

.image-showcase {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.showcase-bg {
  position: absolute;
  width: 300px;
  height: 300px;
  background: var(--gradient-primary);
  border-radius: 50%;
  opacity: 0.1;
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.showcase-img {
  position: relative;
  z-index: 2;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  max-width: 400px;
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.floating-element {
  position: absolute;
  font-size: 2rem;
  animation: floatElement 4s ease-in-out infinite;
}

.element-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.element-2 {
  top: 60%;
  right: 15%;
  animation-delay: 1.5s;
}

.element-3 {
  bottom: 20%;
  left: 20%;
  animation-delay: 3s;
}

@keyframes floatElement {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

.content-wrapper {
  padding-left: 2rem;
}

.section-description {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.process-steps {
  margin-top: 2rem;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  transition: var(--transition);
}

.step:hover {
  background: #fff;
  transform: translateX(10px);
  box-shadow: var(--shadow-soft);
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.step-content p {
  color: #666;
  margin: 0;
  font-size: 0.95rem;
}

/* Stats Section Enhanced */
.stats {
  padding: 80px 0;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.stats-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(154, 110, 175, 0.05) 0%, rgba(246, 183, 55, 0.05) 100%);
}

.stat-item {
  padding: 20px;
  position: relative;
}

.stat-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.5);
  height: 100%;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
  background: #fff;
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  color: #666;
  font-weight: 500;
  margin: 0;
}

/* Testimonials Section Enhanced */
.testimonials {
  padding: 100px 0;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.testimonial-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow-soft);
  margin: 15px 0;
  transition: var(--transition);
  height: 100%;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.testimonial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.testimonial-avatar {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 3px solid var(--secondary-color);
}

.testimonial-rating {
  font-size: 1.1rem;
}

.testimonial-quote {
  font-style: italic;
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  position: relative;
  padding-left: 1rem;
  border-left: 3px solid var(--secondary-color);
}

.testimonial-author h5 {
  margin: 0;
  font-weight: 700;
  color: var(--text-color);
}

.testimonial-role {
  color: #666;
  font-size: 0.9rem;
}

/* Final CTA Section */
.final-cta {
  padding: 100px 0;
  background: var(--gradient-primary);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="30" r="1.5" fill="rgba(255,255,255,0.08)"/><circle cx="30" cy="80" r="0.8" fill="rgba(255,255,255,0.12)"/></svg>') repeat;
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-description {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.cta-note {
  opacity: 0.8;
}

/* Demo Modal */
.demo-placeholder {
  text-align: center;
  padding: 3rem 1rem;
}

.demo-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.demo-placeholder h4 {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.demo-placeholder p {
  color: #666;
  margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .btn-cta, .demo-btn {
    width: 100%;
    max-width: 300px;
  }
  
  .content-wrapper {
    padding-left: 0;
    margin-top: 2rem;
  }
  
  .step {
    padding: 0.8rem;
  }
  
  .feature-card {
    margin-bottom: 2rem;
  }
  
  .cta-title {
    font-size: 2rem;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .btn-outline-primary {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .feature-card {
    padding: 30px 20px;
  }
  
  .testimonial-card {
    padding: 20px;
  }
  
  .stat-card {
    padding: 20px;
  }
}

/* Animation Delay Utilitaires */
.delay-2 {
  animation-delay: 0.2s;
}
.delay-4 {
  animation-delay: 0.4s;
}
.delay-6 {
  animation-delay: 0.6s;
}

/* Footer */
footer {
  background: var(--text-color);
  color: #fff;
  padding: 40px 0;
  text-align: center;
}

/* Override Bootstrap primary button colors */
.btn-primary {
  background: var(--gradient-secondary) !important;
  border: none !important;
  border-radius: 50px !important;
  padding: 12px 24px !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: linear-gradient(135deg, #e0ac07 0%, #d19e06 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(246, 183, 55, 0.4) !important;
}

.btn-outline-primary {
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px) !important;
  color: #fff !important;
  border-radius: 50px !important;
  padding: 12px 24px !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
}

.btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
}

/* Container du formulaire */
.login-container, .register-container, .contact-container {
  padding-top: 160px;
  padding-bottom: 100px;
}

.login-card, .register-card {
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

@media (min-width: 1400px) {
  .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
      max-width: 1200px;
  }
}

/* Dyslexia Support */
:root {
  --line-height-normal: 1.4;
  --letter-spacing-normal: 0;
  --word-spacing-normal: 0.05em;
}

body {
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  word-spacing: var(--word-spacing-normal);
}

body.dys-mode {
  font-family: 'Lexend', 'OpenDyslexic', 'DM Sans', sans-serif;
  --line-height-normal: 1.6;
  --letter-spacing-normal: 0.2em;
  --word-spacing-normal: 0.24em;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  [class*=animate__],
  .floating-shape,
  .hero-particles,
  .feature-glow,
  .showcase-bg {
    animation: none !important;
  }
}

/* Minimum target size for touch devices */
.navbar-nav .nav-link,
#dys-toggle,
.btn-cta,
.demo-btn {
  min-width: 48px;
  min-height: 48px;
}

/* Focus styles for accessibility */
.btn-cta:focus,
.demo-btn:focus,
.btn-primary:focus,
.btn-outline-primary:focus {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .feature-card,
  .testimonial-card,
  .stat-card {
    border: 2px solid var(--text-color);
  }
  
  .hero-badge,
  .stat-pill {
    border: 1px solid #fff;
  }
}