/* ══════════════════════════════════════════════
   ABSOLAR — Design solaire, moderne, professionnel
   Palette : Bleu solaire #0c4a6e / Orange énergie #f59e0b / Vert eco #059669
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #fafbfc;
  --white: #ffffff;
  --navy: #0c4a6e;
  --navy-deep: #082f49;
  --navy-light: #0369a1;
  --orange: #f59e0b;
  --orange-light: #fbbf24;
  --green: #059669;
  --green-light: #10b981;
  --text: #1e293b;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --border: #e2e8f0;
  --max: 1200px;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 1rem; line-height: 1.75; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Plus Jakarta Sans', sans-serif; line-height: 1.2; color: var(--navy); font-weight: 800; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; font-weight: 700; }

a { color: var(--navy-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange); }
img { max-width: 100%; height: auto; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 2rem; }

/* ══ BOUTONS ══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 2rem; font-size: 0.88rem; font-weight: 700;
  border-radius: 50px; transition: all 0.3s; cursor: pointer; border: none;
}
.btn-primary { background: var(--orange); color: var(--navy-deep); }
.btn-primary:hover { background: var(--orange-light); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(245,158,11,0.3); color: var(--navy-deep); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.3); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-light); color: var(--white); transform: translateY(-2px); }
.btn-lg { padding: 1rem 2.5rem; font-size: 0.95rem; }

/* ══ NAV ══ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.95); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 2rem;
  height: 72px; display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 42px; width: auto; display: block; }
.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav a { font-size: 0.88rem; font-weight: 500; color: var(--text); }
.main-nav a:hover { color: var(--orange); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; }

/* ══ HERO ══ */
.hero {
  padding: 10rem 0 5rem;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 50%, var(--navy-light) 100%);
  color: var(--white); position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
}
.hero::after {
  content: ''; position: absolute; bottom: -80px; left: -60px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(5,150,105,0.1) 0%, transparent 70%);
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: center; position: relative; z-index: 1;
}
.hero h1 { color: var(--white); margin-bottom: 1.5rem; }
.hero h1 .highlight { color: var(--orange); }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,0.8); margin-bottom: 2rem; line-height: 1.8; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-img img { width: 100%; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); aspect-ratio: 3/2; object-fit: cover; }

/* ══ STATS ══ */
.stats-bar {
  display: flex; justify-content: center; gap: 4rem; padding: 3rem 0; flex-wrap: wrap;
  background: var(--white); border-bottom: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-item strong { display: block; font-size: 2.5rem; font-weight: 800; color: var(--navy); }
.stat-item span { font-size: 0.78rem; color: var(--text-lighter); text-transform: uppercase; letter-spacing: 0.1em; }

/* ══ SECTIONS ══ */
section { padding: 5rem 0; }
.section-grey { background: #f1f5f9; }
.section-dark { background: var(--navy-deep); color: var(--white); }
.section-dark h2 { color: var(--white); }

.section-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--orange); margin-bottom: 0.6rem;
}
.section-header { text-align: center; max-width: 680px; margin: 0 auto 3.5rem; }
.section-header p { color: var(--text-light); font-size: 1.05rem; margin-top: 1rem; line-height: 1.8; }

/* ══ CATÉGORIES GRID ══ */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.cat-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; text-align: center; transition: all 0.3s; text-decoration: none;
}
.cat-card:hover { border-color: var(--orange); transform: translateY(-4px); box-shadow: 0 12px 30px rgba(12,74,110,0.08); }
.cat-card-icon { font-size: 2rem; margin-bottom: 1rem; }
.cat-card h3 { color: var(--navy); margin-bottom: 0.4rem; }
.cat-card p { font-size: 0.85rem; color: var(--text-light); }
.cat-card .cat-count { font-size: 0.75rem; color: var(--orange); font-weight: 600; margin-top: 0.5rem; }

/* ══ ARTICLES GRID ══ */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.article-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all 0.3s; text-decoration: none; display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(12,74,110,0.08); }
.article-card img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.4s; }
.article-card:hover img { transform: scale(1.03); }
.article-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.article-card-cat {
  display: inline-block; background: rgba(245,158,11,0.1); color: var(--orange);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.25rem 0.7rem; border-radius: 50px; margin-bottom: 0.8rem; width: fit-content;
}
.article-card h3 { font-size: 1rem; font-weight: 700; color: var(--navy); line-height: 1.35; margin-bottom: 0.6rem; flex: 1; }
.article-card-date { font-size: 0.75rem; color: var(--text-lighter); }

/* ══ BREADCRUMB ══ */
.breadcrumb { font-size: 0.78rem; color: var(--text-lighter); padding: 1rem 0; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span { margin: 0 0.3rem; }

/* ══ ARTICLE PAGE ══ */
.article-header { max-width: 960px; margin: 0 auto; padding: 2rem 2rem 1rem; }
.article-meta { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange); margin-bottom: 0.6rem; }
.article-header h1 { margin-bottom: 0.6rem; }
.article-date { font-size: 0.78rem; color: var(--text-lighter); }

.article-featured-img { max-width: 960px; margin: 1.5rem auto 2.5rem; padding: 0 2rem; }
.article-featured-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); }

.article-layout { max-width: 960px; margin: 0 auto; padding: 0 2rem; }

.article-content { min-width: 0; max-width: 100%; padding: 0 0 3rem; overflow: hidden; }
.article-content > div, .article-content > nav, .article-content > figure, .article-content > iframe { max-width: 100%; }
.article-content p { font-size: 1.02rem; line-height: 1.85; color: var(--text); margin-bottom: 1.2rem; }
.article-content h2 { font-size: 1.5rem; margin: 2.5rem 0 0.75rem; color: var(--navy); }
.article-content h3 { font-size: 1.2rem; margin: 2rem 0 0.5rem; color: var(--navy); }
.article-content a { color: var(--navy-light); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.article-content strong { color: var(--navy); }
.article-content img { border-radius: var(--radius); margin: 1.5rem 0; max-width: 100%; height: auto; }
.article-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; border-radius: var(--radius); overflow: hidden; }
.article-content th { background: #f1f5f9; color: var(--navy); padding: 0.8rem 1rem; text-align: left; font-size: 0.88rem; }
.article-content td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.article-content ul, .article-content ol { margin: 1rem 0 1.5rem 1.5rem; }
.article-content li { margin-bottom: 0.5rem; }

/* Author */
.author-box { display: flex; gap: 1.2rem; align-items: center; padding: 2rem; border-top: 1px solid var(--border); margin: 2rem auto; max-width: 960px; }
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.author-box h4 { font-size: 0.95rem; margin-bottom: 0.15rem; }
.author-box p { font-size: 0.82rem; color: var(--text-light); margin: 0; }

/* Related */
.related-posts { max-width: 960px; margin: 0 auto 3rem; padding: 0 2rem; }
.related-posts h3 { font-size: 1.2rem; margin-bottom: 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.related-card { text-decoration: none; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: all 0.3s; }
.related-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(12,74,110,0.08); }
.related-card img { width: 100%; height: 120px; object-fit: cover; }
.related-card-cat { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--orange); padding: 0.8rem 1rem 0; }
.related-card h4 { font-size: 0.85rem; font-weight: 600; color: var(--navy); padding: 0.3rem 1rem 1rem; line-height: 1.3; }

/* Page statique */
.page-content { max-width: 820px; margin: 0 auto; padding: 3rem 2rem 4rem; }
.page-content h1 { margin-bottom: 2rem; }
.page-content h2 { font-size: 1.3rem; margin: 2rem 0 0.5rem; }
.page-content p { margin-bottom: 1rem; line-height: 1.8; }
.page-content a { color: var(--navy-light); }
.page-content ul { margin: 1rem 0 1.5rem 1.5rem; }
.page-content li { margin-bottom: 0.4rem; }

/* ══ CTA ══ */
.cta-section {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 50%, var(--navy-light) 100%);
  padding: 5rem 0; text-align: center; color: var(--white);
}
.cta-section h2 { color: var(--white); font-size: 2rem; margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,0.7); font-size: 1.05rem; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ══ FOOTER ══ */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.6); padding: 4rem 0 2rem; }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 2rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem;
}
.footer-brand p { font-size: 0.85rem; margin-top: 1rem; line-height: 1.7; }
.footer-col h4 { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--white); margin-bottom: 1.2rem; }
.footer-col a { display: block; color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-bottom: 0.5rem; }
.footer-col a:hover { color: var(--orange); }
.footer-bottom { max-width: var(--max); margin: 2rem auto 0; padding: 1.5rem 2rem 0; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.78rem; text-align: center; }

/* ══ RESPONSIVE ══ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-img { display: none; }
  .hero-cta { justify-content: center; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  .main-nav { display: none; }
  .main-nav.open {
    display: flex; flex-direction: column; position: absolute;
    top: 72px; left: 0; right: 0; background: var(--white);
    border-bottom: 1px solid var(--border); padding: 1.5rem 2rem; gap: 0.3rem;
  }
  .nav-toggle { display: block; }
  .cat-grid, .articles-grid { grid-template-columns: 1fr; }
  .stats-bar { gap: 2rem; flex-direction: column; align-items: center; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero { padding: 8rem 0 3rem; }
  .related-grid { grid-template-columns: 1fr; }
  .article-content table { display: block; overflow-x: auto; }
  .hero-cta { flex-direction: column; align-items: center; }
  .article-body table { display: block; overflow-x: auto; }
}
