

/* ========================= FAQ PAGE ========================= */
.faq-page {
  padding: 2rem 1rem;
  min-height: 100vh;
}

/* Titre principal masqué pour l'accessibilité */
#faq-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================= FAQ ITEMS ========================= */
.faq-item {
  margin-bottom: 1rem;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  overflow: hidden;
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.faq-item details {
  margin: 0;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: none;
  transition: all 0.3s ease;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '';
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item summary::after {
  content: '+';
}

.faq-item details[open] summary::after {
  content: '−';
  background: var(--primary);
  color: white;
  transform: rotate(180deg);
}

.faq-item summary:hover {
  background: var(--bg-secondary);
  color: var(--primary);
}

.faq-item summary:focus {
  outline: 3px solid rgba(37, 99, 235, 0.15);
  outline-offset: -3px;
  border-radius: var(--radius-lg);
}

/* Contenu de la réponse */
.faq-body {
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
  animation: fadeIn 0.3s ease-out;
  background: var(--bg-primary);
}

.faq-body p {
  margin: 0;
  font-size: 0.95rem;
}

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

/* ========================= HELP BOX ========================= */
.help-box {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.help-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(0deg); }
  50% { transform: translateX(100%) translateY(100%) rotate(180deg); }
}

.help-box h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.help-box p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.help-box a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.help-box a:hover {
  border-bottom-color: var(--primary);
}

/* ========================= RESPONSIVE DESIGN ========================= */
@media (min-width: 640px) {
  .faq-page {
    padding: 3rem 1rem;
  }

  .faq-item summary {
    padding: 1.5rem 2rem;
    font-size: 1.1rem;
  }

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

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

@media (min-width: 768px) {
  .faq-page {
    padding: 4rem 2rem;
  }
}

@media (min-width: 1024px) {
  .faq-page {
    padding: 5rem 2rem;
  }

  .help-box {
    padding: 2.5rem;
  }
}

/* ========================= ÉTATS SPÉCIAUX ========================= */
/* Effet de focus amélioré pour l'accessibilité */
.faq-item details:focus-within {
  ring: 3px solid rgba(37, 99, 235, 0.15);
  ring-offset: 2px;
}

/* Animation d'ouverture/fermeture améliorée */
.faq-item details[open] {
  border-color: var(--border);
}

.faq-item details[open] summary {
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

/* États de survol pour les liens dans les réponses */
.faq-body a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.faq-body a:hover {
  border-bottom-color: var(--primary);
  color: var(--primary-hover);
}

/* ========================= DARK MODE SUPPORT ========================= */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --bg-primary: #1e293b;
    --bg-secondary: #334155;
    --bg-accent: #1e3a8a;
    --border: #475569;
    --border-light: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
  }

  .faq-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  }

  .help-box {
    background: linear-gradient(135deg, #451a03 0%, #92400e 100%);
  }
}

/* ========================= PRINT STYLES ========================= */
@media print {
  .faq-page {
    background: white !important;
    box-shadow: none !important;
  }

  .faq-item {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }

  .faq-item details {
    open: true;
  }

  .faq-item summary::after {
    display: none;
  }

  .help-box {
    background: #f5f5f5 !important;
    border: 1px solid #ccc !important;
  }
}