/* ============================================
   BLOG ARTICLE CSS - VERSION 1.4
   À placer dans : /css/blog-article.css
   ============================================ */

/* === PROGRESS BAR === */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent, #f0a500), var(--accent-light, #ffc107));
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* === HERO SECTION === */
.page-hero {
  background-color: var(--primary, #002850);
  color: var(--white, #fff);
  padding: 10rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(rgba(0,40,80,0.85), rgba(0,40,80,0.75));
  z-index: 2;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 10;
  padding: 0 1rem;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(255,255,255,0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  color: var(--white, #fff);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255,255,255,0.2);
}

.page-hero h1 {
  font-size: 3rem;
  color: var(--white, #fff);
  margin: 1.5rem 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  font-weight: 300;
  max-width: 700px;
  margin: 0 auto;
}

.article-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-item i { color: var(--accent-light, #ffc107); }

/* === BREADCRUMB === */
.breadcrumb {
  background: var(--white, #fff);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border, #e0e0e0);
  font-size: 0.9rem;
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-light, #666);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumb a:hover { color: var(--primary, #002850); }

.breadcrumb i.fa-chevron-right {
  font-size: 0.7rem;
  color: var(--border, #e0e0e0);
}

.breadcrumb > .container > span {
  color: var(--primary, #002850);
  font-weight: 500;
}

/* === BLOG LAYOUT === */
.blog-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  padding: 3rem 2rem;
  align-items: start;
}

/* === SIDEBAR === */
.blog-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* === TOC === */
.toc {
  position: sticky;
  top: 100px;
  background: var(--white, #fff);
  padding: 1.5rem;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: var(--radius-md, 12px);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.05));
}

.toc h4, .social-share h4, .article-tags h4, .author-card h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent, #f0a500);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary, #002850);
}

.toc h4 i, .social-share h4 i, .article-tags h4 i, .author-card h4 i {
  color: var(--accent, #f0a500);
}

.toc ul {
  list-style: none;
  max-height: 50vh;
  overflow-y: auto;
  padding: 0;
  margin: 0;
}

.toc li { margin-bottom: 0.5rem; }
.toc li.toc-sub { padding-left: 1rem; }

.toc a {
  font-size: 0.9rem;
  color: var(--text-light, #666);
  display: block;
  padding: 0.4rem 0.75rem;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0;
  transition: all 0.2s ease;
  text-decoration: none;
}

.toc a:hover {
  color: var(--primary, #002850);
  background: var(--lighter-bg, #f5f5f5);
}

.toc a.active {
  color: var(--primary, #002850);
  font-weight: 600;
  border-left-color: var(--accent, #f0a500);
  background: var(--lighter-bg, #f5f5f5);
}

/* === SOCIAL SHARE === */
.social-share, .article-tags, .author-card {
  background: var(--white, #fff);
  padding: 1.5rem;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: var(--radius-md, 12px);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.05));
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
}

.share-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lighter-bg, #f5f5f5);
  border-radius: var(--radius-sm, 6px);
  color: var(--primary, #002850);
  font-size: 1rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.share-btn:hover { transform: translateY(-2px); }
.share-btn.facebook:hover { background: #1877f2; color: var(--white, #fff); }
.share-btn.twitter:hover { background: #1da1f2; color: var(--white, #fff); }
.share-btn.linkedin:hover { background: #0077b5; color: var(--white, #fff); }
.share-btn.email:hover { background: var(--primary, #002850); color: var(--white, #fff); }

/* === TAGS === */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--lighter-bg, #f5f5f5);
  color: var(--text-light, #666);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  border: 1px solid var(--border, #e0e0e0);
  text-decoration: none;
}

.tag:hover {
  background: var(--primary, #002850);
  color: var(--white, #fff);
  border-color: var(--primary, #002850);
}

/* === AUTHOR === */
.author-info {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.author-avatar, .author-avatar-placeholder {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md, 12px);
  object-fit: cover;
  border: 2px solid var(--border, #e0e0e0);
  background: var(--lighter-bg, #f5f5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary, #002850);
}

.author-info strong {
  display: block;
  color: var(--primary, #002850);
  margin-bottom: 0.25rem;
}

.author-info p {
  font-size: 0.85rem;
  color: var(--text-light, #666);
  line-height: 1.5;
  margin: 0;
}

/* === ARTICLE === */
.blog-article {
  background: var(--white, #fff);
  padding: 2.5rem;
  border-radius: var(--radius-md, 12px);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.05));
  border: 1px solid var(--border, #e0e0e0);
}

.article-content { line-height: 1.8; }

.article-content h2 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--lighter-bg, #f5f5f5);
  scroll-margin-top: 100px;
  color: var(--primary, #002850);
}

.article-content h3 {
  font-size: 1.3rem;
  margin: 2rem 0 1rem;
  color: var(--primary-light, #003d7a);
  scroll-margin-top: 100px;
}

.article-content p {
  margin-bottom: 1.25rem;
  color: var(--text, #333);
}

.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li { margin-bottom: 0.5rem; }
.article-content strong { color: var(--primary, #002850); }
.article-content em { color: var(--text-light, #666); }

.article-content a {
  color: var(--accent, #f0a500);
  text-decoration: underline;
}

.article-content a:hover {
  color: var(--primary, #002850);
}

.article-content blockquote {
  border-left: 4px solid var(--accent, #f0a500);
  background: var(--lighter-bg, #f5f5f5);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-md, 12px) var(--radius-md, 12px) 0;
  font-style: italic;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md, 12px);
  margin: 1.5rem 0;
}

/* === NEWS CARDS === */
.news-card {
  background: var(--white, #fff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: var(--radius-md, 12px);
  margin: 1.5rem 0;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.05));
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,0.15));
  border-color: var(--accent, #f0a500);
}

.news-card-header {
  background: linear-gradient(135deg, var(--primary, #002850), var(--primary-light, #003d7a));
  color: var(--white, #fff);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.news-card-header h3 {
  color: var(--white, #fff);
  font-size: 1.1rem;
  margin: 0;
  flex: 1;
}

.news-domain {
  background: var(--accent, #f0a500);
  color: var(--white, #fff);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.news-card-body { padding: 1.5rem; }

.news-summary {
  color: var(--text, #333);
  line-height: 1.7;
  margin: 0;
}

.news-card-footer {
  background: var(--lighter-bg, #f5f5f5);
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border, #e0e0e0);
}

.news-source {
  color: var(--text-light, #666);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.news-source i { color: var(--accent, #f0a500); }

a.news-source:hover {
  color: var(--primary, #002850);
}

/* === RECOMMENDATION CARDS === */
.recommendation-card {
  background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
  border: 1px solid #ffc107;
  border-radius: var(--radius-md, 12px);
  margin: 1.5rem 0;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.05));
}

.recommendation-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,0.15));
}

.recommendation-header {
  background: linear-gradient(135deg, #f0a500, #ffc107);
  color: var(--white, #fff);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.recommendation-header i {
  font-size: 1.25rem;
}

.recommendation-header h3 {
  color: var(--white, #fff);
  font-size: 1rem;
  margin: 0;
  flex: 1;
}

.recommendation-body {
  padding: 1.25rem 1.5rem;
}

.recommendation-body p {
  color: var(--text, #333);
  line-height: 1.6;
  margin: 0;
}

/* === NAVIGATION === */
.article-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border, #e0e0e0);
}

.article-navigation a,
.article-navigation button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--lighter-bg, #f5f5f5);
  border-radius: var(--radius-md, 12px);
  color: var(--text, #333);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  text-decoration: none;
  border: 1px solid var(--border, #e0e0e0);
  cursor: pointer;
}

.article-navigation a:hover,
.article-navigation button:hover {
  background: var(--primary, #002850);
  color: var(--white, #fff);
  border-color: var(--primary, #002850);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 15px rgba(0,0,0,0.1));
}

.nav-prev { justify-self: start; }
.nav-center { justify-self: center; }
.nav-next { justify-self: end; text-align: right; }

.nav-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.nav-title {
  font-weight: 600;
  font-size: 0.85rem;
}

/* === CTA SECTION === */
.section-cta {
  background: linear-gradient(135deg, var(--primary, #002850), var(--primary-light, #003d7a));
  color: var(--white, #fff);
  text-align: center;
  padding: 4rem 2rem;
}

.section-cta h2 { color: var(--white, #fff); margin-bottom: 1rem; }
.section-cta p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* === BOUTONS FLOTTANTS === */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary, #002850);
  color: var(--white, #fff);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,0.15));
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-light, #003d7a);
  transform: translateY(-3px);
}

.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 5rem;
  width: 50px;
  height: 50px;
  background: var(--lighter-bg, #f5f5f5);
  color: var(--primary, #002850);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
}

.theme-toggle:hover {
  background: var(--primary, #002850);
  color: var(--white, #fff);
}

/* === MODE SOMBRE === */
body.dark-mode {
  --white: #1a1a2e;
  --light-bg: #16213e;
  --lighter-bg: #0f3460;
  --text: #e8e8e8;
  --text-light: #b8b8b8;
  --border: #2a2a4a;
}

body.dark-mode .blog-article,
body.dark-mode .toc,
body.dark-mode .author-card,
body.dark-mode .social-share,
body.dark-mode .article-tags,
body.dark-mode .news-card {
  background: var(--lighter-bg);
}

body.dark-mode .news-card-footer,
body.dark-mode .recommendation-body {
  background: var(--light-bg);
}

body.dark-mode .recommendation-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-color: #f0a500;
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4 {
  color: var(--accent-light, #ffc107);
}

body.dark-mode .news-card-header h3,
body.dark-mode .recommendation-header h3 { 
  color: var(--white); 
}

body.dark-mode .breadcrumb { 
  background: var(--light-bg); 
}

body.dark-mode .article-content a {
  color: var(--accent-light, #ffc107);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .blog-sidebar {
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .toc {
    position: relative;
    top: 0;
    grid-column: 1 / -1;
  }
  .page-hero h1 { font-size: 2.25rem; }
}

@media (max-width: 768px) {
  .page-hero { padding: 8rem 1rem 3rem; }
  .page-hero h1 { font-size: 1.75rem; }
  .subtitle { font-size: 1rem; }
  .article-meta { flex-direction: column; gap: 0.75rem; }
  .blog-layout { padding: 1.5rem 1rem; }
  .blog-sidebar { grid-template-columns: 1fr; }
  .blog-article { padding: 1.5rem; }
  .article-content h2 { font-size: 1.5rem; }
  .article-content h3 { font-size: 1.2rem; }
  .article-navigation {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .nav-center {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
    order: -1;
  }
  .news-card-header { flex-direction: column; }
  .news-domain { align-self: flex-start; }
  .back-to-top { bottom: 1rem; right: 1rem; width: 45px; height: 45px; }
  .theme-toggle { bottom: 1rem; right: 4rem; width: 45px; height: 45px; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .page-hero h1 { font-size: 1.4rem; }
  .blog-article { padding: 1rem; }
  .toc, .social-share, .article-tags, .author-card { padding: 1rem; }
  .share-buttons { justify-content: center; }
  .article-navigation { grid-template-columns: 1fr; }
  .nav-prev, .nav-center, .nav-next {
    justify-self: stretch;
    justify-content: center;
  }
}

/* === PRINT === */
@media print {
  .blog-sidebar, .breadcrumb, .section-cta, .article-navigation,
  .back-to-top, .theme-toggle, .reading-progress, header, footer {
    display: none !important;
  }
  .blog-layout { display: block; }
  .blog-article { box-shadow: none; border: none; padding: 0; }
  .page-hero { background: none !important; color: var(--text); padding: 2rem 0; }
  .page-hero h1 { color: var(--primary); }
  .news-card, .recommendation-card { break-inside: avoid; box-shadow: none; }
}
