/* ============================================================
   Joueursparlent — Dark Crypto-Neon Theme
   ============================================================ */

:root {
  --bg: #0b1020;
  --bg-alt: #111a33;
  --bg-card: #151f3d;
  --border: #243056;
  --text: #e8ecf8;
  --text-muted: #9aa7c7;
  --primary: #00e5ff;
  --primary-2: #7c4dff;
  --accent: #ff2d78;
  --success: #00e676;
  --warning: #ffd740;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--primary);
  color: #000;
  padding: 8px 16px;
  border-radius: 8px;
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 16, 32, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-card);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.25rem;
}
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--primary); }

.main-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
}
.main-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.main-nav a:hover,
.main-nav a.active { color: var(--primary); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.3s;
}

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 60px;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0, 229, 255, 0.12), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(255, 45, 120, 0.1), transparent 50%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2.8rem;
  line-height: 1.15;
  margin-bottom: 20px;
  font-weight: 800;
}

.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.3);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border, #243056);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.hero-visual img { filter: drop-shadow(0 0 40px rgba(0, 229, 255, 0.2)); }

/* ---------- Sections ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-head h2 { font-size: 1.6rem; }
.section-link { color: var(--primary); font-weight: 600; }

.featured-section, .latest-section, .list-section, .terms-section {
  padding: 60px 0;
}
.latest-section { background: var(--bg-alt); }

/* ---------- Cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: block;
  color: var(--text);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.card img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 20px; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.card-meta { color: var(--text-muted); font-size: 0.8rem; }

/* ---------- Featured card ---------- */
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--bg-card);
}
.featured-cover img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 32px; }
.featured-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.featured-meta time { color: var(--text-muted); font-size: 0.85rem; }
.featured-body h2 { font-size: 1.5rem; margin-bottom: 12px; }
.featured-body h2 a { color: var(--text); }
.featured-body p { color: var(--text-muted); margin-bottom: 16px; }
.read-more { color: var(--primary); font-weight: 600; }

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}
.tag:hover { text-decoration: none; background: rgba(0, 229, 255, 0.2); }

/* ---------- Post ---------- */
.post-hero {
  padding: 48px 0 24px;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(108, 77, 255, 0.1), transparent 50%),
    radial-gradient(ellipse at 90% 0%, rgba(0, 229, 255, 0.08), transparent 50%);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

.post-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2;
  margin-bottom: 16px;
  font-weight: 800;
}

.post-excerpt {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 720px;
  margin-bottom: 20px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.meta-author { color: var(--primary); font-weight: 600; }

.post-tags { display: flex; gap: 8px; }

.post-cover { margin: 24px auto; }
.post-cover img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.post-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  padding: 24px 24px 60px;
}

.post-toc {
  position: sticky;
  top: 90px;
  align-self: start;
  background: var(--bg-card);
  border: 1px solid var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.post-toc h2 { font-size: 1rem; margin-bottom: 12px; color: var(--primary); }
.post-toc nav ul { list-style: none; }
.post-toc nav ul ul { padding-left: 16px; }
.post-toc nav a {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 4px 0;
}
.post-toc nav a:hover { color: var(--primary); text-decoration: none; }

.post-content { max-width: 720px; }
.post-content h2 {
  font-size: 1.6rem;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bg-card);
}
.post-content h3 { font-size: 1.2rem; margin: 28px 0 12px; color: var(--primary); }
.post-content p { margin-bottom: 16px; }
.post-content ul, .post-content ol { margin: 0 0 16px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content strong { color: var(--text); }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
}
.post-content blockquote p { margin: 0; }
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}
.post-content th, .post-content td {
  border: 1px solid var(--bg-card);
  padding: 12px;
  text-align: left;
}
.post-content th { background: var(--bg-card); color: var(--primary); }

/* ---------- FAQ ---------- */
.faq { margin-top: 48px; }
.faq h2 { margin-bottom: 20px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 40px;
}
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--primary);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 20px 16px; color: var(--text-muted); }

/* ---------- Share ---------- */
.post-share {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--bg-card);
}
.post-share span { color: var(--text-muted); }
.post-share a {
  background: var(--bg-card);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
}
.post-share a:hover { color: var(--primary); text-decoration: none; }

/* ---------- Related ---------- */
.related-posts { padding: 60px 0; background: var(--bg-alt); }
.related-posts h2 { margin-bottom: 28px; }

/* ---------- Terms ---------- */
.terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.term-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s;
  color: var(--text);
}
.term-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  text-decoration: none;
}
.term-icon { font-size: 1.8rem; }
.term-name { font-weight: 700; font-size: 1.1rem; }
.term-count { color: var(--text-muted); font-size: 0.85rem; }

.empty-state { color: var(--text-muted); text-align: center; padding: 40px 0; }

/* ---------- CTA ---------- */
.cta-banner {
  padding: 60px 0;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(255, 45, 120, 0.08));
  text-align: center;
}
.cta-banner h2 { font-size: 1.6rem; margin-bottom: 12px; }
.cta-banner p { color: var(--text-muted); margin-bottom: 20px; }
.newsletter {
  display: flex;
  gap: 12px;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto 12px;
}
.newsletter input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--bg-card);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.95rem;
}
.newsletter input:focus { outline: none; border-color: var(--primary); }
.cta-note { font-size: 0.8rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--bg-card);
  padding-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin: 12px 0; }
.footer-social { display: flex; gap: 12px; list-style: none; }
.footer-social a {
  background: var(--bg-card);
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
}
.footer-social a:hover { color: var(--primary); text-decoration: none; }
.footer-col h3 { font-size: 0.95rem; margin-bottom: 16px; color: var(--primary); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary); }
.footer-disclaimer p { color: var(--text-muted); font-size: 0.85rem; }
.footer-disclaimer strong { color: var(--warning); }
.footer-bottom {
  border-top: 1px solid var(--bg-card);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; margin: 4px 0; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
}
.pagination a {
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text);
}
.pagination a:hover { color: var(--primary); text-decoration: none; }
.pagination span { color: var(--text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .featured-card { grid-template-columns: 1fr; }
  .post-layout { grid-template-columns: 1fr; }
  .post-toc { position: static; max-height: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .main-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--bg-card);
    padding: 20px;
    transform: translateY(-150%);
    transition: transform 0.3s;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; gap: 16px; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter { flex-direction: column; }
  .hero h1 { font-size: 2rem; }
}