/* =====================================================================
   PAGE FAQ France-USA-Net.Com (2026)
   Accordéon, sommaire, recherche, palette franco-américaine
   ===================================================================== */

.faq-page {
  --faq-ink: var(--ink);
  --faq-muted: var(--ink-soft);
  --faq-surface: var(--surface);
  --faq-border: var(--border);
  position: relative;
  background: var(--bg);
  color: var(--text);
}

.faq-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: clamp(200px, 35vw, 320px);
  background: linear-gradient(
    135deg,
    rgba(10, 36, 99, 0.09) 0%,
    rgba(255, 255, 255, 0.03) 50%,
    rgba(215, 38, 61, 0.08) 100%
  );
  pointer-events: none;
  z-index: -1;
}

.faq-page > [data-include],
.faq-page > .skip-link {
  position: relative;
  z-index: 2;
}

.faq-page > main {
  position: relative;
  z-index: 0;
}

/* Hero */
.faq-hero {
  background: var(--grad-brand);
  color: var(--paper);
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}

.faq-hero .breadcrumb a {
  color: var(--paper-soft);
}

.faq-hero .breadcrumb [aria-current="page"] {
  color: var(--paper);
}

.faq-hero__logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 1.25rem;
}

.faq-hero__logo {
  width: 378.88px; /* 37 % de la taille native 1024 px */
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.2));
}

.faq-hero__intro {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto;
}

.faq-hero__intro h1 {
  color: var(--paper);
  margin: 0 0 0.65rem;
}

.faq-hero__intro .page-hero__lead {
  color: var(--paper-soft);
}

.faq-hero__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.faq-hero__badges .pill {
  background: rgba(255, 255, 255, 0.12);
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Avertissement */
.faq-disclaimer {
  margin: 1.25rem 0 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid rgba(215, 38, 61, 0.25);
  background: rgba(215, 38, 61, 0.06);
  color: var(--faq-ink);
  font-size: 0.92rem;
  line-height: 1.65;
}

.faq-disclaimer strong {
  color: var(--blue-dark);
}

/* Outils : recherche + sommaire */
.faq-toolbar {
  padding: 1.25rem 0 0.5rem;
}

.faq-search-wrap {
  position: relative;
  max-width: 40rem;
  margin: 0 auto 0.5rem;
}

.faq-search {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  border: 1px solid var(--faq-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--faq-surface);
  color: var(--faq-ink);
}

.faq-search:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.22);
}

.faq-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.65;
  pointer-events: none;
}

.faq-search-meta {
  text-align: center;
  font-size: 0.88rem;
  color: var(--faq-muted);
  margin: 0.35rem 0 1rem;
}

.faq-noresult {
  display: none;
  text-align: center;
  padding: 1rem;
  color: var(--faq-muted);
  font-size: 0.95rem;
}

.faq-noresult.visible {
  display: block;
}

/* Sommaire interne (scrollspy via app.js data-toc) */
.faq-page .faq-toc {
  position: sticky;
  top: calc(64px + 0.5rem);
  z-index: 5;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--faq-border);
  border-radius: var(--radius);
  background: var(--faq-surface);
  box-shadow: var(--shadow-sm);
}

.faq-page .faq-toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.faq-page .faq-toc__head h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--blue-dark);
}

.faq-page .toc__toggle {
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--faq-border);
  border-radius: var(--radius-sm);
  background: var(--light);
  color: var(--faq-ink);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.faq-page .toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
}

.faq-page .toc__list a {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--blue-dark);
  text-decoration: none;
}

.faq-page .toc__list a:hover,
.faq-page .toc__list a:focus-visible {
  background: rgba(58, 134, 255, 0.1);
}

.faq-page .toc__list a[aria-current="true"] {
  background: rgba(10, 36, 99, 0.1);
  color: var(--blue-dark);
  font-weight: 700;
}

/* Catégories */
.faq-category {
  scroll-margin-top: 7rem;
  margin-bottom: 2rem;
}

.faq-category__head {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--faq-border);
}

.faq-category__head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  color: var(--blue-dark);
}

.faq-category__badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
  background: rgba(58, 134, 255, 0.12);
  color: var(--blue-dark);
  border: 1px solid rgba(58, 134, 255, 0.22);
}

.faq-category__intro {
  margin: 0;
  color: var(--faq-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Accordéon */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.faq-item {
  border: 1px solid var(--faq-border);
  border-radius: var(--radius);
  background: var(--faq-surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.faq-item[open] {
  border-color: rgba(58, 134, 255, 0.35);
  box-shadow: var(--shadow-md);
}

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

.faq-item summary {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--faq-ink);
  list-style: none;
  line-height: 1.45;
}

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

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  margin-left: auto;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(10, 36, 99, 0.08);
  color: var(--blue-dark);
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.22s ease, background 0.22s ease;
}

.faq-item[open] summary::after {
  content: "\2212";
  background: rgba(215, 38, 61, 0.1);
  color: var(--red);
}

.faq-item summary:hover,
.faq-item summary:focus-visible {
  background: rgba(58, 134, 255, 0.06);
  outline: none;
}

.faq-item__body {
  padding: 0 1.1rem 1rem;
  border-top: 1px solid var(--faq-border);
  animation: faqOpen 0.28s ease-out;
}

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

.faq-answer {
  margin: 0.85rem 0 0.65rem;
  color: var(--faq-muted);
  line-height: 1.72;
  text-align: justify;
  hyphens: auto;
}

.faq-answer p {
  margin: 0 0 0.65rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  color: var(--blue-dark);
  font-weight: 600;
}

.faq-source {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--light);
  font-size: 0.84rem;
  font-style: italic;
  color: var(--faq-muted);
  line-height: 1.55;
}

.faq-source a {
  color: var(--blue-dark);
}

/* CTA bas de page */
.faq-cta {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  border-top: 1px solid var(--faq-border);
  margin-top: 1rem;
}

.faq-cta p {
  color: var(--faq-muted);
  max-width: 32rem;
  margin: 0 auto 1rem;
}

@media (max-width: 1024px) {
  .faq-page .toc__toggle {
    display: inline-flex;
  }

  .faq-page .faq-toc:not(.is-open) .toc__list {
    display: none;
  }

  .faq-page .faq-toc.is-open .toc__list {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .faq-page .toc__list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .faq-page .toc__list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-item__body {
    animation: none;
  }

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