/* ============================================
   RACHAT CREDIT EXPERT — Design Vert Clean
   Font: Inter | Primary: #10B981 (Emerald)
   ============================================ */

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

:root {
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-light: #D1FAE5;
  --secondary: #1F2937;
  --text: #374151;
  --text-light: #6B7280;
  --bg: #FFFFFF;
  --bg-alt: #F9FAFB;
  --border: #E5E7EB;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--secondary);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p { margin-bottom: 1rem; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 800px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
}

.logo span {
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--primary);
  color: white !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: var(--radius);
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--primary-dark);
}

.nav-cta::after {
  display: none;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--secondary);
  margin: 5px 0;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  
  .nav.active {
    display: flex;
  }
  
  .nav a {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }
  
  .nav-cta {
    margin-top: 1rem;
    text-align: center;
  }
}

/* Hero */
.hero {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--primary-light) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.05;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero h1 span {
  color: var(--primary);
}

.hero-text {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Hero Simulator */
.hero-simulator {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.simulator-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.range-value {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.simulator-result {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-top: 1.5rem;
}

.result-label {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.result-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.result-detail {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-text {
    margin: 0 auto 2rem;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: white;
  color: var(--secondary);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

/* Sections */
section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.125rem;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.card h3 {
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-light);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step {
  text-align: center;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
}

.step h3 {
  margin-bottom: 0.75rem;
}

.step p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Advantages */
.advantages {
  background: var(--bg-alt);
}

.advantage-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.advantage-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.advantage-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.25rem;
}

.advantage-item h4 {
  margin-bottom: 0.25rem;
}

.advantage-item p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0;
}

@media (max-width: 768px) {
  .advantage-list {
    grid-template-columns: 1fr;
  }
}

/* Comparatif Table */
.comparison-table {
  width: 100%;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.comparison-table th,
.comparison-table td {
  padding: 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  background: var(--secondary);
  color: white;
  font-weight: 600;
}

.comparison-table tr:nth-child(even) {
  background: var(--bg-alt);
}

.comparison-table tr:hover {
  background: var(--primary-light);
}

.comparison-table .highlight {
  background: var(--primary);
  color: white;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--secondary);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  transition: var(--transition);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding-bottom: 1.5rem;
  color: var(--text-light);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-section p {
  opacity: 0.9;
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

.cta-section .btn-primary {
  background: white;
  color: var(--primary-dark);
}

.cta-section .btn-primary:hover {
  background: var(--bg-alt);
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.testimonial-stars {
  color: #FBBF24;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-style: italic;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
}

.testimonial-name {
  font-weight: 600;
  color: var(--secondary);
}

.testimonial-location {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Footer */
.footer {
  background: var(--secondary);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.7);
  margin-top: 1rem;
  max-width: 300px;
}

.footer h4 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: rgba(255,255,255,0.5);
}

.footer-legal a:hover {
  color: white;
}

@media (max-width: 968px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Disclaimer */
.disclaimer {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  color: #92400E;
  margin: 2rem 0;
}

.affiliate-notice {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  color: var(--text-light);
  text-align: center;
}

/* Article / Blog */
.article-header {
  padding: 4rem 0;
  background: var(--bg-alt);
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.article-content {
  padding: 3rem 0;
}

.article-content h2 {
  margin: 2.5rem 0 1rem;
}

.article-content h3 {
  margin: 2rem 0 0.75rem;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1rem 2rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-light);
}

/* Table of Contents */
.toc {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.toc h4 {
  margin-bottom: 1rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.5rem;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  color: var(--text);
}

.toc a:hover {
  color: var(--primary);
}

/* Reading Progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  z-index: 1000;
  transition: width 0.1s;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  border: none;
  box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
}

/* Utilities */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.bg-alt { background: var(--bg-alt); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
