/* ========================================
   SUPPORT PAGES - GLOBAL STYLES
======================================== */
:root {
  --support-primary: #667eea;
  --support-secondary: #764ba2;
  --support-success: #10b981;
  --support-warning: #f59e0b;
  --support-error: #ef4444;
  --support-bg: #f8fafc;
  --support-text: #1e293b;
  --support-text-light: #64748b;
}

/* ========================================
   SUPPORT HEADER
======================================== */
.support-header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.support-header .header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.support-header .logo img {
  height: 40px;
}

.support-nav {
  display: flex;
  gap: 2rem;
}

.support-nav a {
  color: var(--support-text-light);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.support-nav a:hover,
.support-nav a.active {
  color: var(--support-primary);
  border-bottom-color: var(--support-primary);
}

/* ========================================
   SUPPORT FOOTER
======================================== */
.support-footer {
  background: #1e293b;
  color: white;
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}

.support-footer .container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.support-footer p {
  margin: 0;
  color: #94a3b8;
}

.support-footer .footer-links {
  display: flex;
  gap: 2rem;
}

.support-footer .footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.support-footer .footer-links a:hover {
  color: white;
}

/* ========================================
   TERMS/CGU PAGE
======================================== */
.terms-hero {
  background: linear-gradient(135deg, var(--support-primary) 0%, var(--support-secondary) 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.terms-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.terms-date {
  font-size: 1.1rem;
  opacity: 0.9;
}

.terms-content {
  padding: 3rem 2rem;
  background: var(--support-bg);
}

.terms-layout {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
}

/* Sidebar TOC */
.terms-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.terms-toc {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.terms-toc h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--support-text);
}

.terms-toc ul {
  list-style: none;
  padding: 0;
}

.terms-toc li {
  margin-bottom: 0.75rem;
}

.terms-toc-link {
  color: var(--support-text-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: block;
  padding: 0.5rem;
  border-radius: 6px;
}

.terms-toc-link:hover {
  color: var(--support-primary);
  background: rgba(102, 126, 234, 0.05);
  padding-left: 1rem;
}

/* Main Content */
.terms-main {
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.terms-section {
  margin-bottom: 3rem;
  scroll-margin-top: 100px;
}

.terms-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--support-text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--support-primary);
}

.terms-section-content {
  color: var(--support-text-light);
  line-height: 1.8;
}

.terms-section-content h3,
.terms-section-content h4 {
  color: var(--support-text);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.terms-section-content h3 {
  font-size: 1.4rem;
}

.terms-section-content h4 {
  font-size: 1.2rem;
}

.terms-section-content p {
  margin-bottom: 1rem;
}

.terms-section-content ul,
.terms-section-content ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.terms-section-content li {
  margin-bottom: 0.5rem;
}

.terms-section-content strong {
  color: var(--support-text);
  font-weight: 600;
}

.terms-section-content a {
  color: var(--support-primary);
  text-decoration: underline;
}

.terms-section-content a:hover {
  color: var(--support-secondary);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 992px) {
  .terms-layout {
    grid-template-columns: 1fr;
  }
  
  .terms-sidebar {
    position: static;
  }
  
  .support-nav {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .terms-hero h1 {
    font-size: 2rem;
  }
  
  .terms-main {
    padding: 2rem 1.5rem;
  }
  
  .terms-section h2 {
    font-size: 1.5rem;
  }
  
  .support-header {
    padding: 1rem;
  }
  
  .support-nav {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .support-footer .container {
    flex-direction: column;
    text-align: center;
  }
}

/* ========================================
   PAGES CENTRE D'AIDE / FAQ / DOCUMENTATION
   (même univers visuel que les CGU et les tarifs)
======================================== */
.support-hero {
  background: linear-gradient(135deg, var(--support-primary) 0%, var(--support-secondary) 100%);
  color: white;
  padding: 4rem 2rem 5.5rem;
  text-align: center;
}

.support-hero .container {
  max-width: 760px;
  margin: 0 auto;
}

.support-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: white;
}

.support-hero p {
  font-size: 1.15rem;
  opacity: 0.92;
  margin: 0;
}

.search-box {
  position: relative;
  max-width: 560px;
  margin: 2rem auto 0;
}

.search-box i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--support-text-light);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.25rem 1rem 3.1rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  color: var(--support-text);
  background: white;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.search-box input:focus {
  outline: 3px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.help-content,
.faq-content,
.docs-content {
  background: var(--support-bg);
  padding: 0 2rem 1rem;
}

.help-content > .container,
.faq-content > .container,
.docs-content > .container {
  max-width: 1200px;
  margin: -2.5rem auto 0;
  padding: 0;
  position: relative;
}

.support-empty {
  background: white;
  border-radius: 14px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--support-text-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.support-empty i {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  color: #cbd5e1;
}

/* ---- Centre d'aide : cartes par thème ---- */
.help-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.help-category-card {
  background: white;
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #eef2f7;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.help-category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.14);
}

.help-category-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
  background: linear-gradient(135deg, var(--support-primary) 0%, var(--support-secondary) 100%);
  margin-bottom: 1rem;
}

.help-category-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--support-text);
  margin: 0 0 0.25rem;
}

.help-category-card > p {
  color: var(--support-text-light);
  font-size: 0.92rem;
  margin: 0 0 1rem;
}

.help-article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #f1f5f9;
}

.help-article-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 0.93rem;
  line-height: 1.45;
}

.help-article-list li:last-child {
  border-bottom: none;
}

.help-article-list li i {
  color: var(--support-primary);
  margin-top: 0.2rem;
  font-size: 0.85rem;
}

.help-article-list mark,
.faq-item mark {
  background: #fef08a;
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

/* ---- Bloc contact (centre d'aide + FAQ) ---- */
.help-contact-section {
  margin-top: 3rem;
}

.help-contact-card,
.faq-contact-box {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--support-primary) 0%, var(--support-secondary) 100%);
  color: white;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(102, 126, 234, 0.28);
}

.faq-contact-box {
  margin-top: 3rem;
}

.help-contact-card > i {
  font-size: 2.2rem;
  opacity: 0.9;
  margin-bottom: 0.75rem;
}

.help-contact-card h3,
.faq-contact-box h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: white;
}

.help-contact-card p,
.faq-contact-box p {
  margin: 0 0 1.75rem;
  opacity: 0.92;
}

.help-contact-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.help-contact-card .btn,
.faq-contact-box .btn {
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  font-weight: 600;
}

.help-contact-card .btn-primary,
.faq-contact-box .btn-primary {
  background: white;
  color: var(--support-primary);
  box-shadow: none;
}

.help-contact-card .btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.help-contact-card .btn:hover,
.faq-contact-box .btn:hover {
  transform: translateY(-2px);
}

/* ---- FAQ ---- */
.faq-categories {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  background: white;
  padding: 0.75rem;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  max-width: 860px;
  margin: 0 auto 1.5rem;
  box-sizing: border-box;
}

.faq-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #e2e8f0;
  background: white;
  color: #475569;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.faq-cat-btn:hover {
  border-color: var(--support-primary);
  color: var(--support-primary);
}

.faq-cat-btn.active {
  background: var(--support-primary);
  border-color: var(--support-primary);
  color: white;
}

.faq-content .faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-content .faq-item {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #eef2f7;
  overflow: hidden;
}

.faq-content .faq-item.active {
  border-color: rgba(102, 126, 234, 0.4);
}

.faq-content .faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--support-text);
}

.faq-content .faq-question:hover {
  background: rgba(102, 126, 234, 0.05);
}

.faq-content .faq-question h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0;
}

.faq-content .faq-question i {
  color: var(--support-primary);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-content .faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-content .faq-answer {
  display: none;
  padding: 0 1.5rem 1.35rem;
}

.faq-content .faq-item.active .faq-answer {
  display: block;
}

.faq-content .faq-answer p {
  margin: 0;
  color: var(--support-text-light);
  line-height: 1.7;
}

/* ---- Documentation ---- */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 100px;
  background: white;
  padding: 1.5rem;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.docs-sidebar h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--support-text);
}

.docs-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-menu-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--support-text-light);
  text-decoration: none;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.docs-menu-link:hover {
  color: var(--support-primary);
  background: rgba(102, 126, 234, 0.06);
}

.docs-menu-link.active {
  color: var(--support-primary);
  background: rgba(102, 126, 234, 0.08);
  border-left-color: var(--support-primary);
  font-weight: 600;
}

.docs-api-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: #f5f3ff;
  color: #5b21b6;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.docs-api-link:hover {
  background: #ede9fe;
}

.docs-main {
  background: white;
  padding: 2.5rem 3rem;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  min-width: 0;
}

.docs-section {
  scroll-margin-top: 100px;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #f1f5f9;
}

.docs-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.docs-section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--support-text);
  margin: 0 0 0.75rem;
}

.docs-intro {
  font-size: 1.05rem;
  color: #475569;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.docs-content-text {
  color: var(--support-text-light);
  line-height: 1.75;
}

.docs-content-text h3 {
  font-size: 1.1rem;
  color: var(--support-text);
  margin: 1.5rem 0 0.5rem;
}

.docs-content-text p {
  margin: 0 0 0.75rem;
}

.docs-content-text ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.docs-content-text li {
  margin-bottom: 0.35rem;
}

.docs-content-text a {
  color: var(--support-primary);
}

.docs-code {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 1rem 0 0;
}

.docs-code code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

@media (max-width: 992px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  /* Menu des pages support : une ligne qui défile plutôt qu'une colonne */
  .support-header .header-container {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .support-nav {
    flex-direction: row;
    width: 100%;
    gap: 1.25rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .support-nav a {
    white-space: nowrap;
  }

  .support-hero {
    padding: 2.5rem 1rem 4.5rem;
  }

  .support-hero h1 {
    font-size: 1.85rem;
  }

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

  .help-content,
  .faq-content,
  .docs-content {
    padding: 0 1rem 1rem;
  }

  .help-categories {
    grid-template-columns: 1fr;
  }

  .faq-categories {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .faq-cat-btn {
    white-space: nowrap;
  }

  .docs-main {
    padding: 1.75rem 1.25rem;
  }

  .help-contact-card,
  .faq-contact-box {
    padding: 2.25rem 1.25rem;
  }
}

/* Sujets du centre d'aide : question cliquable, réponse dépliée */
.help-article-list li.help-article {
  display: block;
  padding: 0;
}

.help-article-q {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.93rem;
  color: #334155;
  text-align: left;
  cursor: pointer;
  line-height: 1.45;
}

.help-article-q:hover:not(:disabled) {
  color: var(--support-primary);
}

.help-article-q:disabled {
  cursor: default;
}

.help-article-q i {
  color: var(--support-primary);
  font-size: 0.75rem;
  margin-top: 0.3rem;
  transition: transform 0.2s ease;
}

.help-article-q[aria-expanded="true"] {
  color: var(--support-text);
  font-weight: 600;
}

.help-article-q[aria-expanded="true"] i {
  transform: rotate(90deg);
}

.help-article-a {
  margin: 0 0 0.75rem 1.35rem;
  color: var(--support-text-light);
  font-size: 0.9rem;
  line-height: 1.6;
}
