/* === VARIABLES CSS === */
:root {
  --color-primary: #2d1b3d;
  --color-secondary: #3d2552;
  --color-accent: #b8860b;
  --color-accent-hover: #d4a017;
  --color-gold: #c9a96e;
  --color-gold-light: #f5e6cc;
  --color-bg: #ffffff;
  --color-bg-alt: #f9f6f1;
  --color-bg-dark: #2d1b3d;
  --color-text: #2c2c2c;
  --color-text-light: #6b6b6b;
  --color-text-muted: #999999;
  --color-border: #e8e4df;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --max-width-article: 820px;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: 0.3s ease;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-hover); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.3;
}

/* === HEADER === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-gold) !important;
  letter-spacing: 0.5px;
}
.site-logo:hover { color: var(--color-gold-light) !important; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}
.main-nav {
  display: flex;
  gap: 0.25rem;
}
.main-nav a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* === HERO HOMEPAGE === */
.hero-section {
  margin-top: 64px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  padding: 4rem 1.5rem;
  text-align: center;
}
.hero-section h1 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.hero-section p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* === ARTICLE HERO === */
.article-hero {
  margin-top: 64px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  padding: 3rem 1.5rem 2.5rem;
}
.article-hero .breadcrumb,
.article-hero h1,
.article-hero .article-meta,
.article-hero .article-summary {
  max-width: var(--max-width-article);
  margin-left: auto;
  margin-right: auto;
}
.article-hero-inner {
  max-width: var(--max-width-article);
  margin: 0 auto;
}
.article-hero h1 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

/* === BREADCRUMB === */
.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  opacity: 0.8;
}
.breadcrumb a { color: var(--color-gold-light); }
.breadcrumb a:hover { color: #fff; }

/* === ARTICLE META === */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 1.25rem;
}
.article-meta i { margin-right: 0.35rem; }

/* === ARTICLE SUMMARY === */
.article-summary {
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: 0.92;
  border-left: 3px solid var(--color-gold);
  padding-left: 1.25rem;
}

/* === ARTICLE CONTAINER === */
.article-container {
  max-width: var(--max-width-article);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

/* === TABLE DES MATIERES === */
.toc {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}
.toc-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}
.toc-title i { margin-right: 0.5rem; color: var(--color-accent); }
.toc ol {
  list-style: decimal;
  padding-left: 1.5rem;
}
.toc li {
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}
.toc a { color: var(--color-text); }
.toc a:hover { color: var(--color-accent); }

/* === ARTICLE CONTENT === */
.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
}
.article-content h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-gold-light);
}
.article-content h3 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
}
.article-content p {
  margin-bottom: 1.25rem;
}
.article-content img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin: 1.5rem 0;
  width: 100%;
}
.article-content ul,
.article-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 0.5rem; }
.article-content blockquote {
  border-left: 4px solid var(--color-gold);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-text-light);
}
.article-content strong { color: var(--color-primary); }

/* === FAQ SECTION === */
.faq-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-border);
}
.faq-section > h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: none;
}
.faq-section > h2 i { color: var(--color-accent); margin-right: 0.5rem; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--color-bg-alt);
  transition: background var(--transition);
}
.faq-question:hover { background: var(--color-gold-light); }
.faq-question i {
  transition: transform var(--transition);
  color: var(--color-accent);
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 1rem 1.25rem;
}

/* === ARTICLES GRID (HOMEPAGE + CATEGORIES) === */
.articles-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.articles-section > h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 2rem;
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.article-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.article-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.article-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.article-card h3 a { color: var(--color-primary); }
.article-card h3 a:hover { color: var(--color-accent); }
.article-card p {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.55;
  flex: 1;
}
.article-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

/* === RELATED ARTICLES === */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-border);
}
.related-articles h3 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.related-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: block;
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.related-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.related-card h4 {
  padding: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.35;
}

/* === CATEGORY PAGE === */
.category-hero {
  margin-top: 64px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  padding: 3rem 1.5rem;
  text-align: center;
}
.category-hero h1 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.category-hero p {
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
}
.category-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* === FOOTER === */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.8);
  padding: 3rem 1.5rem 0;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-col h4 {
  color: var(--color-gold);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}
.footer-col p {
  font-size: 0.88rem;
  line-height: 1.6;
  opacity: 0.8;
}
.footer-col ul li {
  margin-bottom: 0.5rem;
}
.footer-col a {
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--color-gold); }
.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem;
  opacity: 0.6;
}

/* === MEDIA QUERIES === */
@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.active { display: flex; }
  .main-nav a {
    padding: 0.75rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .hero-section { padding: 2.5rem 1rem; }
  .hero-section h1 { font-size: 1.8rem; }
  .article-hero h1 { font-size: 1.6rem; }
  .category-hero h1 { font-size: 1.6rem; }
  .articles-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .article-meta { flex-direction: column; gap: 0.5rem; }
  .article-content h2 { font-size: 1.35rem; }
}