/* FAQ D.Majin — vivante, style compte / univers */
.page-faq {
  --faq-t: #00f5d4;
  --faq-v: #9b5cff;
  --faq-y: #fee440;
  background: #08090c;
  color: #f4f4f5;
}

.page-faq .page-content {
  opacity: 1;
  animation: none;
}

/* Hero */
.faq-hero {
  position: relative;
  min-height: clamp(220px, 38vh, 320px);
  display: flex;
  align-items: flex-end;
  padding: max(5rem, calc(env(safe-area-inset-top) + 3.5rem)) 1.25rem 2rem;
  overflow: hidden;
}

.faq-hero-bg {
  position: absolute;
  inset: 0;
}

.faq-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  animation: faqKenBurns 18s ease-in-out infinite alternate;
}

@keyframes faqKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.faq-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 9, 12, 0.2) 0%, rgba(8, 9, 12, 0.75) 70%, #08090c 100%),
    radial-gradient(ellipse 70% 55% at 85% 10%, rgba(155, 92, 255, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 45% at 10% 80%, rgba(0, 245, 212, 0.15), transparent 50%);
}

.faq-hero-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--faq-t);
  box-shadow: 0 0 10px var(--faq-t);
  animation: faqParticle 5s ease-in-out infinite;
  opacity: 0;
}

.faq-hero-particles span:nth-child(1) { left: 10%; top: 25%; animation-delay: 0s; }
.faq-hero-particles span:nth-child(2) { left: 75%; top: 18%; animation-delay: 1s; background: var(--faq-v); box-shadow: 0 0 10px var(--faq-v); }
.faq-hero-particles span:nth-child(3) { left: 42%; top: 40%; animation-delay: 2s; }
.faq-hero-particles span:nth-child(4) { left: 88%; top: 55%; animation-delay: 0.5s; }
.faq-hero-particles span:nth-child(5) { left: 18%; top: 62%; animation-delay: 1.8s; background: var(--faq-y); box-shadow: 0 0 8px var(--faq-y); }
.faq-hero-particles span:nth-child(6) { left: 58%; top: 70%; animation-delay: 2.5s; }

@keyframes faqParticle {
  0%, 100% { opacity: 0; transform: translateY(0); }
  50% { opacity: 0.85; transform: translateY(-10px); }
}

.faq-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.faq-hero-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faq-t);
}

.faq-hero-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: clamp(2.4rem, 7vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
}

.faq-hero-title span {
  color: var(--faq-t);
  text-shadow: 0 0 40px rgba(0, 245, 212, 0.35);
}

.faq-hero-lead {
  margin: 0;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(244, 244, 245, 0.82);
}

/* Shell */
.faq-shell {
  max-width: 820px;
  margin: -1rem auto 0;
  padding: 0 1.25rem 2.5rem;
  position: relative;
  z-index: 2;
}

.faq-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.faq-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Carte recherche */
.faq-ask-card {
  position: relative;
  padding: 1.15rem 1.25rem 1.25rem;
  border-radius: 18px;
  background: rgba(14, 17, 22, 0.92);
  border: 1px solid rgba(0, 245, 212, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(12px);
  margin-bottom: 1.75rem;
  overflow: hidden;
}

.faq-ask-card-glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 55%;
  height: 120%;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.12), transparent 65%);
  pointer-events: none;
}

.faq-ask-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.faq-navi-mini {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(0, 245, 212, 0.45));
}

.faq-navi-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  image-rendering: pixelated;
}

.faq-navi-frame--0 { opacity: 1; animation: faqNavi0 0.52s step-end infinite; }
.faq-navi-frame--1 { animation: faqNavi1 0.52s step-end infinite; }
.faq-navi-frame--2 { animation: faqNavi2 0.52s step-end infinite; }
.faq-navi-frame--3 { animation: faqNavi3 0.52s step-end infinite; }

@keyframes faqNavi0 { 0%, 24% { opacity: 1; } 25%, 100% { opacity: 0; } }
@keyframes faqNavi1 { 0%, 24% { opacity: 0; } 25%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes faqNavi2 { 0%, 49% { opacity: 0; } 50%, 74% { opacity: 1; } 75%, 100% { opacity: 0; } }
@keyframes faqNavi3 { 0%, 74% { opacity: 0; } 75%, 100% { opacity: 1; } }

.faq-ask-main {
  flex: 1;
  min-width: 0;
}

.faq-ask-label {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--faq-t);
}

.faq-ask-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.faq-ask-input {
  flex: 1;
  min-width: 180px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  padding: 0.65rem 0.85rem;
}

.faq-ask-input:focus {
  outline: none;
  border-color: rgba(0, 245, 212, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.1);
}

.faq-ask-btn {
  flex-shrink: 0;
  padding: 0.65rem 1.15rem !important;
  font-size: 0.88rem !important;
}

.faq-answer {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(0, 245, 212, 0.06);
  border: 1px solid rgba(0, 245, 212, 0.18);
  animation: faqFadeIn 0.35s ease;
}

.faq-answer.hidden { display: none; }

@keyframes faqFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.faq-answer-q {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--faq-t);
}

.faq-answer-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(244, 244, 245, 0.9);
}

.faq-answer-links {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.faq-answer-links a {
  font-size: 0.85rem;
  color: var(--faq-t);
  text-decoration: none;
  font-weight: 500;
}

.faq-answer-links a:hover { text-decoration: underline; }

/* Accès rapide */
.faq-quick {
  margin-bottom: 1.75rem;
}

.faq-quick-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  color: rgba(244, 244, 245, 0.9);
}

.faq-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}

.faq-quick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(22, 26, 34, 0.9), rgba(10, 12, 16, 0.95));
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.faq-quick-card:hover {
  border-color: rgba(0, 245, 212, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.faq-quick-card-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 245, 212, 0.1);
  color: var(--faq-t);
}

.faq-quick-card-ic svg {
  width: 18px;
  height: 18px;
}

.faq-quick-card span {
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(244, 244, 245, 0.88);
}

/* Liste principale */
.faq-main-card {
  padding: 1.25rem 1.25rem 0.5rem;
  border-radius: 18px;
  background: rgba(12, 14, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.faq-main-card-head {
  margin-bottom: 1rem;
}

.faq-main-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

.faq-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.faq-tab {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 244, 245, 0.65);
  font: inherit;
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.faq-tab:hover {
  border-color: rgba(0, 245, 212, 0.3);
  color: #fff;
}

.faq-tab.is-active {
  background: rgba(0, 245, 212, 0.12);
  border-color: rgba(0, 245, 212, 0.45);
  color: var(--faq-t);
}

.faq-list {
  margin-top: 0.25rem;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s;
}

.faq-item:last-child { border-bottom: none; }

.faq-item.is-open {
  background: rgba(0, 245, 212, 0.04);
  border-left: 3px solid var(--faq-t);
  padding-left: 0.15rem;
}

.faq-item-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 0.35rem;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.faq-item-q {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
}

.faq-item-mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 245, 212, 0.35);
  color: var(--faq-t);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.25s, background 0.25s;
}

.faq-item.is-open .faq-item-mark {
  background: rgba(0, 245, 212, 0.15);
  transform: rotate(45deg);
}

.faq-item-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.faq-item.is-open .faq-item-body {
  grid-template-rows: 1fr;
}

.faq-item-body-inner {
  overflow: hidden;
}

.faq-item-body-inner > div {
  padding: 0 0.35rem 1rem 0.35rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(244, 244, 245, 0.72);
}

.faq-item-link {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: var(--faq-t);
  font-weight: 500;
  text-decoration: none;
}

.faq-item-link:hover { text-decoration: underline; }

.faq-empty {
  padding: 1.5rem;
  text-align: center;
  color: rgba(244, 244, 245, 0.45);
  font-size: 0.9rem;
}

/* CTA */
.faq-cta {
  margin-top: 1.75rem;
}

.faq-cta-inner {
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(135deg, rgba(155, 92, 255, 0.12), rgba(0, 245, 212, 0.08));
  border: 1px solid rgba(254, 228, 64, 0.15);
}

.faq-cta-text {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.faq-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

@media (max-width: 560px) {
  .faq-ask-form {
    flex-direction: column;
  }

  .faq-ask-btn {
    width: 100%;
  }

  .faq-quick-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-hero-bg img,
  .faq-hero-particles span,
  .faq-navi-frame { animation: none !important; }
  .faq-navi-frame--0 { opacity: 1; }
}
