/*
Theme Name: Florajet Blog
Theme URI: https://www.florajet.com
Author: Florajet
Description: Thème blog Florajet - grille d'articles 3 colonnes avec hero et filtres catégories
Version: 1.0
*/

/* =====================
   RESET & BASE
===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --vert:    #3a6b4a;
  --vert-dark: #2d5239;
  --rose:    #e8a0b0;
  --texte:   #333333;
  --gris:    #666666;
  --gris-clair: #f5f5f5;
  --blanc:   #ffffff;
  --border:  #e0e0e0;
  --font:    'Lato', 'Helvetica Neue', Arial, sans-serif;
  --radius:  4px;
}

body {
  font-family: var(--font);
  color: var(--texte);
  background: var(--blanc);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* =====================
   HEADER
===================== */
.site-header {
  background: var(--vert-dark);
  color: var(--blanc);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.site-logo img { height: 48px; width: auto; }
.site-logo span {
  font-size: 22px;
  font-weight: 700;
  color: var(--blanc);
  letter-spacing: 1px;
}

.header-links {
  display: flex;
  gap: 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
}
.header-links a { color: rgba(255,255,255,0.85); }
.header-links a:hover { color: var(--blanc); }

.header-nav {
  background: var(--blanc);
  border-bottom: 1px solid var(--border);
}

.header-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 40px;
  flex-wrap: wrap;
}

.header-nav ul li a {
  display: block;
  padding: 14px 12px;
  font-size: 13px;
  color: var(--texte);
  font-weight: 500;
  transition: color .2s;
}
.header-nav ul li a:hover { color: var(--vert); }

/* =====================
   BREADCRUMB
===================== */
.breadcrumb {
  padding: 10px 40px;
  font-size: 12px;
  color: var(--gris);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--gris); }
.breadcrumb a:hover { color: var(--vert); }
.breadcrumb span { margin: 0 6px; }

/* =====================
   HERO BLOG
===================== */
.blog-hero {
  position: relative;
  background: linear-gradient(135deg, #f9ece8 0%, #fdf0f3 40%, #e8f0e8 100%);
  padding: 60px 40px;
  text-align: center;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 35%;
  background: linear-gradient(to left, rgba(232,160,176,0.3), transparent);
  pointer-events: none;
}

.blog-hero-content { position: relative; z-index: 1; }

.blog-hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--texte);
  margin-bottom: 12px;
}

.blog-hero p {
  font-size: 15px;
  color: var(--gris);
  max-width: 540px;
  margin: 0 auto;
}

/* =====================
   FILTRES CATÉGORIES
===================== */
.category-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
}

.category-filters a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--texte);
  background: var(--blanc);
  transition: all .2s;
}

.category-filters a:hover,
.category-filters a.active {
  background: var(--vert);
  border-color: var(--vert);
  color: var(--blanc);
}

/* =====================
   GRILLE ARTICLES
===================== */
.blog-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* CARD */
.post-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.post-card:hover .post-thumb { transform: scale(1.05); opacity: 0.75; }
.post-card:hover .post-overlay { background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%); }

.post-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease, opacity .4s ease;
  opacity: 0.9;
}

.post-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
  transition: background .4s ease;
}

.post-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 14px 16px;
  color: var(--blanc);
}

.post-meta {
  font-size: 11px;
  opacity: 0.85;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-cat {
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* NO THUMBNAIL FALLBACK */
.post-card.no-thumb {
  background: var(--gris-clair);
  aspect-ratio: unset;
  min-height: 220px;
}
.post-card.no-thumb .post-overlay { display: none; }
.post-card.no-thumb .post-info { position: static; color: var(--texte); padding: 20px; }
.post-card.no-thumb .post-title { font-size: 15px; color: var(--texte); }
.post-card.no-thumb .post-meta { color: var(--gris); }
.post-card.no-thumb .post-cat { background: var(--vert); color: var(--blanc); }

/* =====================
   PAGINATION
===================== */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--texte);
  background: var(--blanc);
  transition: all .2s;
}

.blog-pagination a:hover { background: var(--vert); border-color: var(--vert); color: var(--blanc); }
.blog-pagination .current { background: var(--vert); border-color: var(--vert); color: var(--blanc); font-weight: 700; }

/* =====================
   ARTICLE SINGLE
===================== */
.single-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.single-article .post-header { margin-bottom: 30px; }
.single-article .post-header .post-cat-label {
  display: inline-block;
  background: var(--vert);
  color: var(--blanc);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.single-article h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.single-article .post-date {
  font-size: 13px;
  color: var(--gris);
}

.single-article .post-featured-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.single-article .post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--texte);
}

.single-article .post-content h2 { font-size: 22px; margin: 32px 0 14px; color: var(--vert-dark); }
.single-article .post-content h3 { font-size: 18px; margin: 24px 0 10px; }
.single-article .post-content p { margin-bottom: 18px; }
.single-article .post-content ul, .single-article .post-content ol { margin: 0 0 18px 24px; }
.single-article .post-content li { margin-bottom: 6px; }
.single-article .post-content a { color: var(--vert); text-decoration: underline; }
.single-article .post-content img { border-radius: var(--radius); margin: 20px 0; }
.single-article .post-content blockquote {
  border-left: 4px solid var(--vert);
  padding: 12px 20px;
  background: var(--gris-clair);
  font-style: italic;
  margin: 20px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Back link */
.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--vert);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
}
.back-to-blog:hover { text-decoration: underline; }

/* =====================
   FOOTER
===================== */
.site-footer {
  background: var(--vert-dark);
  color: rgba(255,255,255,0.8);
  padding: 40px 40px 20px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto 30px;
}

.footer-col h4 {
  color: var(--blanc);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.7); transition: color .2s; }
.footer-col ul li a:hover { color: var(--blanc); }

.footer-brand p { font-size: 13px; line-height: 1.7; margin-top: 10px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  max-width: 1180px;
  margin: 0 auto;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .header-top { flex-direction: column; gap: 10px; padding: 12px 16px; }
  .header-nav ul { padding: 0 16px; }
  .blog-hero { padding: 40px 20px; }
  .blog-hero h1 { font-size: 26px; }
  .category-filters { padding: 16px; }
  .blog-container { padding: 20px 12px 40px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .site-footer { padding: 30px 20px 16px; }
}
