/* Correctif theme enfant : faq.css vient d'une version anterieure du projet et
   utilise des variables absentes de styles.css. On les mappe sur la palette commune. */
:root {
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-600: var(--primary);
  --primary-700: var(--primary-dark);
  --primary-800: #1e40af;
  --accent-orange: var(--accent);
  --accent-orange-dark: var(--accent-dark);
  --accent-orange-light: #fbbf24;
  --border-light: var(--gray-200);
  --border-default: var(--gray-300);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-light: var(--gray-500);
}

/* En-tete de page (non style dans le projet d'origine : il passait sous la barre fixe) */
.page-header {
  padding: calc(96px + var(--space-12)) 0 var(--space-12);
  background: var(--gradient-hero);
  color: var(--white);
  text-align: center;
}
.page-header h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: var(--space-4);
}
.page-header p {
  color: var(--gray-300);
  font-size: 1.125rem;
  max-width: 640px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .page-header h1 { font-size: 2rem; }
}

/* FAQ Page - Modern Design */

/* FAQ Search */
.faq-search {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}

.faq-search::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(59, 130, 246, 0.06)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
  opacity: 0.5;
}

.search-box {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  z-index: 1;
}

.search-box svg {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.25rem;
  z-index: 2;
}

.search-box input {
  width: 100%;
  padding: 1.25rem 1.25rem 1.25rem 4rem;
  border: 2px solid var(--border-default);
  border-radius: 3rem;
  font-size: 1.125rem;
  background: white;
  transition: all 0.4s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  font-weight: 500;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 12px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.search-box input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

/* FAQ Categories */
.faq-categories {
  padding: 3rem 0;
  background: white;
}

.category-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.category-btn {
  padding: 1rem 2rem;
  border: 2px solid var(--border-default);
  background: white;
  color: var(--text-secondary);
  border-radius: 3rem;
  cursor: pointer;
  transition: all 0.4s ease;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.category-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.6s;
}

.category-btn:hover::before {
  left: 100%;
}

.category-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
  border-color: var(--primary-300);
}

.category-btn.active {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
  border-color: var(--primary-600);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* FAQ Content */
.faq-content {
  padding: 3rem 0 6rem;
  background: white;
}

.faq-grid {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.faq-item {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 1.5rem;
  overflow: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  position: relative;
}

.faq-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-600), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.faq-item:hover::before,
.faq-item.active::before {
  opacity: 1;
}

.faq-item:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.faq-item.active {
  border-color: var(--primary-200);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  cursor: pointer;
  background: white;
  transition: all 0.3s ease;
  position: relative;
}

.faq-question:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.faq-item.active .faq-question {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(99, 102, 241, 0.03) 100%);
}

.faq-question h3 {
  flex: 1;
  color: var(--text-primary);
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.4;
  padding-right: 2rem;
}

.faq-question > svg {
  color: var(--primary-600);
  width: 40px;
  height: 40px;
  padding: 10px;
  box-sizing: border-box;
  flex-shrink: 0;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  transition: all 0.4s ease;
}

.faq-item.active .faq-question > svg {
  transform: rotate(180deg);
  background: var(--primary-600);
  color: white;
}

.faq-answer {
  padding: 0 2rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

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

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
  padding: 0.75rem 0 1.75rem;
  font-size: 1.125rem;
  font-weight: 400;
}

/* FAQ Filter */
.faq-item.hidden {
  display: none;
}

/* Popular Badge */
.popular-badge {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-dark) 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 1rem;
  animation: pulse 3s infinite;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

/* FAQ Share Button */
.faq-share-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 0.5rem;
  transition: all 0.3s ease;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-share-btn:hover {
  color: var(--primary-600);
  background: rgba(59, 130, 246, 0.1);
  transform: scale(1.1);
}

/* Support Section */
.support-section {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
  color: white;
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.support-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 70%, rgba(249, 115, 22, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  opacity: 0.8;
}

.support-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.support-text h2 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.support-text p {
  font-size: 1.375rem;
  opacity: 0.95;
  max-width: 700px;
  line-height: 1.7;
  color: var(--gray-200);
}

.support-actions {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.support-section .btn-primary {
  background: white;
  color: var(--primary-600);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.support-section .btn-primary:hover {
  background: var(--gray-50);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.3);
}

.support-section .btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.support-section .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}

/* No Results Message */
.no-results-message {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 2rem;
  margin: 2rem 0;
  border: 1px solid var(--border-light);
}

.no-results-message svg {
  font-size: 4rem;
  margin-bottom: 2rem;
  color: var(--text-light);
  opacity: 0.5;
}

.no-results-message h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.no-results-message p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Enhanced Animations */
@keyframes faqSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-item {
  animation: faqSlideIn 0.5s ease-out;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(6) { animation-delay: 0.6s; }

/* Highlight Search Terms */
mark {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-light) 100%);
  color: white;
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .faq-search {
    padding: 2.5rem 0;
  }

  .search-box {
    max-width: 600px;
  }

  .search-box input {
    padding: 1.125rem 1.125rem 1.125rem 3.5rem;
    font-size: 1rem;
  }

  .category-buttons {
    gap: 1rem;
  }

  .category-btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.9rem;
  }

  .faq-grid {
    max-width: 800px;
  }

  .faq-question {
    padding: 1.75rem;
  }

  .faq-question h3 {
    font-size: 1.125rem;
  }

  .faq-answer {
    padding: 0 1.75rem;
  }

  .faq-answer p {
    padding: 0.75rem 0 1.75rem;
  }

  .support-text h2 {
    font-size: 2.5rem;
  }

  .support-text p {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .faq-search {
    padding: 2rem 0;
  }

  .search-box input {
    padding: 1rem 1rem 1rem 3rem;
    font-size: 0.95rem;
  }

  .search-box svg {
    left: 1.25rem;
    font-size: 1.125rem;
  }

  .faq-categories {
    padding: 2rem 0;
  }

  .category-buttons {
    gap: 0.75rem;
  }

  .category-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
  }

  .faq-content {
    padding: 2rem 0 4rem;
  }

  .faq-grid {
    gap: 1.25rem;
  }

  .faq-question {
    padding: 1.5rem;
  }

  .faq-question h3 {
    font-size: 1rem;
    padding-right: 1.5rem;
  }

  .faq-question > svg {
    width: 34px;
    height: 34px;
    padding: 8px;
  }

  .faq-answer {
    padding: 0 1.5rem;
  }

  .faq-answer p {
    padding: 0 0 1.5rem;
  }

  .faq-answer p {
    font-size: 1rem;
  }

  .support-section {
    padding: 4rem 0;
  }

  .support-content {
    gap: 2rem;
  }

  .support-text h2 {
    font-size: 2.25rem;
  }

  .support-text p {
    font-size: 1.125rem;
  }

  .support-actions {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .support-actions .btn {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .search-box input {
    padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    font-size: 0.9rem;
  }

  .search-box svg {
    left: 1rem;
    font-size: 1rem;
  }

  .category-buttons {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 1rem;
    gap: 1rem;
  }

  .category-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.625rem 1.25rem;
    font-size: 0.8rem;
  }

  .faq-question {
    padding: 1.25rem;
  }

  .faq-question h3 {
    font-size: 0.95rem;
    padding-right: 1rem;
  }

  .faq-question > svg {
    width: 32px;
    height: 32px;
    padding: 8px;
  }

  .faq-answer {
    padding: 0 1.25rem;
  }

  .faq-answer p {
    padding: 0 0 1.25rem;
  }

  .faq-answer p {
    font-size: 0.95rem;
  }

  .support-text h2 {
    font-size: 2rem;
  }

  .support-text p {
    font-size: 1rem;
  }

  .no-results-message {
    padding: 3rem 1.5rem;
  }

  .no-results-message svg {
    font-size: 3rem;
  }

  .no-results-message h3 {
    font-size: 1.5rem;
  }

  .no-results-message p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .faq-search {
    padding: 1.5rem 0;
  }

  .search-box input {
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    font-size: 0.85rem;
  }

  .search-box svg {
    left: 0.875rem;
    font-size: 0.95rem;
  }

  .faq-categories {
    padding: 1.5rem 0;
  }

  .faq-content {
    padding: 1.5rem 0 3rem;
  }

  .faq-question {
    padding: 1rem;
  }

  .faq-question h3 {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .faq-question > svg {
    width: 30px;
    height: 30px;
    padding: 7px;
  }

  .faq-answer {
    padding: 0 1rem;
  }

  .faq-answer p {
    padding: 0 0 1rem;
  }

  .faq-answer p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .support-section {
    padding: 3rem 0;
  }

  .support-text h2 {
    font-size: 1.75rem;
  }

  .support-text p {
    font-size: 0.95rem;
  }

  .support-actions .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .no-results-message {
    padding: 2rem 1rem;
  }

  .no-results-message svg {
    font-size: 2.5rem;
  }

  .no-results-message h3 {
    font-size: 1.25rem;
  }

  .no-results-message p {
    font-size: 0.9rem;
  }
}

/* Pastille de categorie dans chaque question */
.faq-category-badge {
  flex-shrink: 0;
  margin: 0 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--primary-700);
  background: var(--primary-200);
  white-space: nowrap;
}

.faq-item.active .faq-category-badge {
  background: var(--primary-600);
  color: var(--white);
}

@media (max-width: 640px) {
  .faq-category-badge {
    display: none;
  }
}

/* Chevron et bouton de partage cote a cote, a droite de la question */
.faq-question > svg {
  margin-left: 0.5rem;
}

/* Ordre dans la question : titre, categorie, partage, chevron */
.faq-question h3 { order: 0; }
.faq-category-badge { order: 1; }
.faq-share-btn { order: 2; margin-left: 0.5rem; }
.faq-question > svg { order: 3; margin-left: 0.5rem; }

@media (max-width: 640px) {
  .faq-share-btn {
    display: none;
  }
}

/* Section "Vous ne trouvez pas votre reponse" : memes styles que le CTA de l'accueil */
.cta {
  padding: var(--space-24) 0;
  background: var(--gradient-primary);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 30% 70%, rgba(245, 158, 11, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  animation: float 10s ease-in-out infinite;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2rem;
  margin: 0 auto var(--space-6);
  animation: float 3s ease-in-out infinite;
}

.cta-content h2 {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  font-weight: 900;
}

.cta-content p {
  font-size: 1.25rem;
  margin-bottom: var(--space-8);
  color: var(--gray-200);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
}

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

.cta .btn-primary:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.cta .btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
}

.cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}


/* Titres de groupe (H2 par categorie), discrets, filtres avec les questions */
.faq-group-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 0.5rem 0 -0.5rem;
  padding-left: 0.25rem;
}

.faq-group-title:first-child {
  margin-top: 0;
}

.faq-group-title.hidden {
  display: none;
}
