/* === Polices & Reset === */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

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

:root {
  --primary: #2563eb;        /* Bleu professionnel */
  --primary-dark: #1d4ed8;
  --secondary: #f97316;      /* Orange pour l'accent */
  --accent: #10b981;         /* Vert */
  --dark: #0f172a;
  --gray: #64748b;
  --light: #f8fafc;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --border-radius: 12px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
/* Empêcher tout débordement horizontal */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* S'assurer que toutes les images et éléments ne dépassent pas */
img, iframe, video, table {
  max-width: 100%;
  height: auto;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
   width: 100%;
  max-width: 1200px;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

/* === Header === */
/* === Header avec effet au scroll === */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s ease;
  background: transparent;
  box-shadow: none;
}

.main-header.scrolled {
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 10px 0;
}

/* Liens du header - blancs quand transparent, foncés après scroll */
.main-header .nav-list a {
  color:  var(--dark);
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.main-header.scrolled .nav-list a {
  color: var(--dark);
  text-shadow: none;
}

.main-header .logo a {
  color:  var(--dark);
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.main-header.scrolled .logo a {
  color: var(--dark);
  text-shadow: none;
}

/* Ajustement du bouton login pour rester lisible */
.main-header .btn-login {
  background: var(--primary);
  color: white !important;  
  text-shadow: none;
}

.main-header.scrolled .btn-login {
  background: var(--primary);
  color: white !important;
}

/* Assure que le contenu ne passe pas sous le header fixe */
body {
  padding-top: 80px;
}

@media (max-width: 768px) {
  .main-header .nav-list {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .main-header .nav-list a {
    color: var(--dark);
    text-shadow: none;
  }
  .header-container {
    flex-wrap: wrap;
  }
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--dark);
}

.logo-icon {
  font-size: 2rem;
}

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

.nav-list {
  display: flex;
  list-style: none;
  gap: 28px;
  align-items: center;
}

.nav-list a {
  text-decoration: none;
  font-weight: 500;
  color: var(--dark);
  transition: color 0.2s;
  font-size: 1rem;
}

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

.btn-login {
  background: var(--primary);
  color: white !important;
  padding: 8px 20px;
  border-radius: 30px;
  font-weight: 600;
  transition: background 0.2s;
}

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

.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gray);
  font-size: 1.8rem;
  padding: 0 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* === Footer === */
.main-footer {
  background: var(--dark);
  color: #e2e8f0;
  margin-top: auto;
  padding: 48px 0 20px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: white;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* === Boutons & Éléments communs === */
.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 40px;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

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

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

/* === Hero Section (page d'accueil) === */
.hero {
  padding: 60px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-content .highlight {
  color: var(--primary);
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--gray);
  margin-bottom: 30px;
}



.hero-image {
  background: linear-gradient(145deg, #dbeafe, #eff6ff);
  border-radius: 24px;
  padding: 20px;
  text-align: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
}

/* === Niveaux (cards) === */
.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 48px;
  font-weight: 700;
}

.level-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 40px 0 60px;
}

.card {
  background: white;
  border-radius: var(--border-radius);
  padding: 30px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--gray);
  margin-bottom: 24px;
}

.badge {
  background: #fef3c7;
  color: #b45309;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 16px;
}

.premium-badge {
  background: #f1f5f9;
  color: var(--dark);
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

 

  .level-cards {
    grid-template-columns: 1fr;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    box-shadow: var(--shadow);
     width: 100%;
    box-sizing: border-box;
  }

  .nav-list.active {
    display: flex;
    width: 100%;
    max-width: 100vw;
  }

  .mobile-menu-toggle {
    display: block;
  }
}

/* Utilitaires */
.text-center { text-align: center; }
.mt-5 { margin-top: 3rem; }
/* === Quiz Grid (Quiz populaires) === */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.quiz-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.quiz-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.quiz-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.quiz-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.quiz-card p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.question-count {
  font-size: 0.85rem;
  color: var(--gray);
  font-weight: 500;
}

.badge.free {
  background: #dcfce7;
  color: #15803d;
}

/* === Pricing Grid (Gratuit vs Premium) === */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.pricing-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 35px 30px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
}

.pricing-card.recommended {
  border: 2px solid var(--primary);
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.recommended-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 4px 16px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: 1.6rem;
  margin-bottom: 15px;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 25px;
}

.features {
  list-style: none;
  margin-bottom: 30px;
}

.features li {
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  color: var(--gray);
}

.features li:last-child {
  border-bottom: none;
}

/* === Testimonials Grid (Témoignages) === */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.testimonial-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.stars {
  color: #fbbf24;
  font-size: 1.2rem;
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.quote {
  font-style: italic;
  color: var(--dark);
  margin-bottom: 20px;
  line-height: 1.5;
}

.author {
  border-top: 1px solid #e2e8f0;
  padding-top: 15px;
}

.author strong {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.author span {
  font-size: 0.85rem;
  color: var(--gray);
}

/* === Responsive === */
@media (max-width: 900px) {
  .quiz-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .quiz-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}
/* === ------------------------------------------------------------   PREMIUM --------------------- === */
/* === Premium Hero === */
.premium-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  padding: 30px 0 30px;
  margin-bottom: 60px;
  border-radius: 0 0 50px 50px;
}

.premium-hero-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.premium-hero h1 {
  font-size: 3rem;
  margin: 20px 0;
}

.premium-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

.btn-outline-light {
  background: transparent;
  color: white;
  border: 2px solid white;
}

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

.btn-large {
  padding: 14px 36px;
  font-size: 1.1rem;
}

/* === Features Grid (Avantages) === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin: 40px 0;
}

.feature-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.feature-card h3 {
  margin-bottom: 10px;
  font-weight: 600;
}

/* === Pricing Grid étendu (3 colonnes) === */
.pricing-grid.extended {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1100px;
}

.price span {
  font-size: 1rem;
  font-weight: normal;
  color: var(--gray);
}

/* === Responsive Premium === */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-grid.extended {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .premium-hero h1 {
    font-size: 2.2rem;
  }
}


/* Formulaire en deux colonnes */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.subscription-choice {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.subscription-choice legend {
  font-weight: 600;
  padding: 0 10px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: normal;
  cursor: pointer;
}

select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
}

.success-message {
  background: #dcfce7;
  color: #15803d;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}


/* ==========================================================================
   STYLES PREMIUM – BADGE ET BOUTON ACTIF
   ========================================================================== */

/* Badge Premium : fond jaune vif pour se distinguer */
.badge.premium {
  background: #fbbf24;
  color: #0f172a;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 30px;
}

/* Bouton premium quand l'utilisateur connecté est premium actif */
.premium-btn.active-premium {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
  font-weight: 600;
}


.premium-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.premium-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}



.premium-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.premium-card p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex-grow: 1;
}
#hero-secondary-btn.active-premium {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
/* Masquer les boutons hero par défaut pour éviter le flash */
.hero-buttons {
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  gap: 16px;
justify-content: center;
}

/* Une fois prêts, JS ajoute cette classe pour les afficher */
.hero-buttons.ready {
  opacity: 1;
}
/* Masquer les boutons premium par défaut */
.premium-btn {
   opacity: 1; /* Toujours visible */
  transition: background 0.2s ease, color 0.2s ease;
  /*transition: opacity 0.2s ease; */
}

/* Une fois mis à jour */
.premium-btn.ready {
  opacity: 1;
}

@media (max-width: 768px) {
  /* Ajustement du body padding-top pour le header fixe */
  body {
    padding-top: 70px;
  }

  /* Hero : empêcher le texte de déborder */
  .hero-content h1 {
    font-size: 2.2rem;
    word-break: break-word;
  }

  .hero-content p {
    font-size: 1rem;
  }

  /* Grilles : s'assurer qu'elles ne dépassent pas */
  .quiz-grid,
  .level-cards,
  .features-grid,
  .testimonials-grid,
  .pricing-grid {
    width: 100%;
  }

  /* Cartes : padding réduit pour gagner de l'espace */
  .quiz-card,
  .card,
  .pricing-card,
  .testimonial-card,
  .feature-card {
    padding: 20px 15px;
  }

  /* Boutons : éviter qu'ils ne débordent */
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .hero-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-buttons .btn {
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  /* Réduire encore les paddings */
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

.premium-hero-content p.premium-message {
  background: rgba(255,255,255,0.2);
  padding: 15px;
  border-radius: 8px;
  font-weight: 500;
}





/* Forcer l'affichage des boutons sur la page premium */
.premium-hero .hero-buttons {
  opacity: 1 !important;
}
/* ===== SOUS-MENUS DÉROULANTS ===== */
.nav-list .dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 1000;
  list-style: none;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--dark) !important;
  text-shadow: none !important;
  font-weight: 500;
  transition: background 0.2s;
}

.dropdown-menu a:hover {
  background: #f1f5f9;
  color: var(--primary) !important;
}

/* Flèche discrète sur le lien parent */
.dropdown-toggle::after {
  content: "▾";
  margin-left: 6px;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Adaptation mobile */
@media (max-width: 768px) {
  .nav-list .dropdown {
    position: static;
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding-left: 20px;
    min-width: auto;
  }
  .dropdown-menu a {
    padding: 8px 20px;
  }
  .dropdown-toggle::after {
    display: none;
  }
  /* Sur mobile, le sous‑menu est toujours visible quand le menu principal est ouvert */
  .nav-list.active .dropdown-menu {
    display: block;
  }
}


/* Badge Premium (fond jaune) */
.badge.premium {
  background: #fbbf24;
  color: #0f172a;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 30px;
}

/* Badge Gratuit (fond vert clair) */
.badge.free {
  background: #dcfce7;
  color: #15803d;
}

/* Bouton premium actif (quand l'utilisateur est premium) */
.premium-btn.active-premium {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
  font-weight: 600;
}