/* ══════════════════════════════════════════════════
   Terre Salée — feuille de style du Carnet (blog)
   Hérite des variables et fontes de styles.css
   ══════════════════════════════════════════════════ */

/* ─── Header du blog ─── */
.blog-header {
  padding: 160px 40px 80px;
  max-width: var(--page-max);
  margin: 0 auto;
}
.blog-header-inner {
  max-width: 900px;
}
.blog-header h1 {
  font-size: clamp(64px, 10vw, 160px);
  font-weight: 300;
  font-variation-settings: "SOFT" 80, "opsz" 144, "wght" 350;
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 28px 0 32px;
}
.blog-header h1 em {
  font-style: italic;
  color: var(--sienna);
  font-variation-settings: "SOFT" 100, "opsz" 144, "wght" 300;
}
.blog-intro {
  font-size: 20px;
  line-height: 1.6;
  max-width: 580px;
  color: var(--ink-soft);
  font-style: italic;
}

/* ─── Liste d'articles ─── */
.blog-list-section {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 40px 120px;
}

.blog-list-section .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 70px;
  border-top: 1px solid rgba(31,26,20,0.12);
  border-bottom: 1px solid rgba(31,26,20,0.12);
  padding: 18px 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 70px 50px;
}

.post-card {
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.post-card:hover { transform: translateY(-4px); }

.post-card-cover {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--sand);
  margin-bottom: 22px;
  position: relative;
}
.post-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.02);
  transition: transform 0.8s cubic-bezier(.2,.8,.2,1);
}
.post-card:hover .post-card-cover img { transform: scale(1.04); }

.post-card-cover-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 80px;
  color: rgba(143, 68, 40, 0.25);
  background: var(--clay);
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.post-card-meta .cat { color: var(--sienna); }
.post-card-meta .draft {
  background: var(--ink);
  color: var(--salt);
  padding: 2px 8px;
  margin-left: 8px;
  font-size: 9px;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  font-variation-settings: "SOFT" 80, "opsz" 144, "wght" 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.post-card-excerpt {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.post-card-readmore {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sienna);
  position: relative;
  display: inline-block;
}
.post-card-readmore::after {
  content: ' →';
  transition: transform 0.25s ease;
  display: inline-block;
}
.post-card:hover .post-card-readmore::after { transform: translateX(4px); }

.blog-empty {
  text-align: center;
  padding: 80px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  color: var(--ink-soft);
}

/* ─── Page article ─── */
.post {
  max-width: 760px;
  margin: 0 auto;
  padding: 160px 40px 80px;
  position: relative;
  z-index: 2;
}

.post-loading {
  text-align: center;
  padding: 80px 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-soft);
}

.post-back {
  display: inline-block;
  margin-bottom: 36px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.post-back:hover { color: var(--sienna); }

.post-eyebrow {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  gap: 14px;
}
.post-eyebrow .cat { color: var(--sienna); }
.post-eyebrow .sep { opacity: 0.4; }

.post-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 300;
  font-variation-settings: "SOFT" 80, "opsz" 144, "wght" 350;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}
.post-title em {
  font-style: italic;
  color: var(--sienna);
}

.post-lead {
  font-size: 22px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(31,26,20,0.12);
}

.post-cover {
  margin: 0 -40px 60px;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--sand);
}
.post-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ─── Mise en forme du contenu Markdown ─── */
.post-content {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
}
.post-content > * + * { margin-top: 1.4em; }
.post-content h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "opsz" 144, "wght" 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-top: 2.2em;
  color: var(--ink);
}
.post-content h2 + p { margin-top: 0.8em; }
.post-content h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: 1.8em;
}
.post-content p {
  font-family: var(--font-body);
}
.post-content strong {
  font-weight: 600;
  color: var(--sienna-deep);
}
.post-content em { font-style: italic; }
.post-content a {
  color: var(--sienna);
  border-bottom: 1px solid currentColor;
  transition: color 0.2s ease;
}
.post-content a:hover { color: var(--sienna-deep); }

.post-content blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  font-variation-settings: "SOFT" 100, "opsz" 144, "wght" 300;
  line-height: 1.3;
  color: var(--sienna-deep);
  border-left: 2px solid var(--sienna);
  padding: 14px 0 14px 28px;
  margin: 2em 0;
}
.post-content ul, .post-content ol {
  padding-left: 28px;
}
.post-content ul li, .post-content ol li {
  margin-bottom: 0.5em;
}
.post-content hr {
  border: 0;
  height: 1px;
  background: rgba(31,26,20,0.12);
  margin: 2.4em 0;
}
.post-content img {
  width: 100%;
  height: auto;
  margin: 2em 0;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--sand);
  padding: 2px 7px;
  border-radius: 2px;
}
.post-content pre {
  background: var(--ink);
  color: var(--salt);
  padding: 22px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}
.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* ─── Galerie de photos ─── */
.post-gallery {
  display: grid;
  gap: 14px;
  margin: 2.4em -40px;
}
.post-gallery.cols-1 { grid-template-columns: 1fr; }
.post-gallery.cols-2 { grid-template-columns: 1fr 1fr; }
.post-gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.post-gallery-item {
  margin: 0;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--sand);
  cursor: zoom-in;
}
.post-gallery.cols-1 .post-gallery-item { aspect-ratio: 16/10; }
.post-gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  margin: 0 !important;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.post-gallery-item:hover img { transform: scale(1.04); }

/* ─── Vidéo locale ─── */
.post-video {
  margin: 2.4em -40px;
  background: var(--ink);
}
.post-video video {
  width: 100%;
  display: block;
  max-height: 80vh;
}

/* ─── Embeds YouTube / Vimeo ─── */
.post-embed {
  margin: 2.4em -40px;
  position: relative;
  aspect-ratio: 16/9;
  background: var(--ink);
}
.post-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─── Lightbox pour les galeries ─── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(31, 26, 20, 0.95);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
  animation: fadeIn 0.3s ease;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 24px; right: 30px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--salt);
  opacity: 0.7;
}
.lightbox-close:hover { opacity: 1; }

.post-footer {
  margin-top: 80px;
  padding-top: 30px;
  border-top: 1px solid rgba(31,26,20,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.post-signature {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

/* ─── Bloc « Lire aussi » ─── */
.post-related {
  background: var(--salt);
  padding: 100px 40px;
  position: relative;
  z-index: 2;
}
.post-related-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.post-related .eyebrow {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px 40px;
}

/* ─── Bloc Carnet sur l'accueil ─── */
.home-blog {
  background: var(--salt);
  padding: 120px 40px;
}
.home-blog-inner {
  max-width: var(--page-max);
  margin: 0 auto;
}
.home-blog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 60px;
}
.home-blog-head h2 {
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 300;
  font-variation-settings: "SOFT" 80, "opsz" 144, "wght" 300;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.home-blog-head h2 em {
  font-style: italic;
  color: var(--sienna);
}
.home-blog-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.home-blog-link:hover { color: var(--sienna); border-color: var(--sienna); }

.home-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px 40px;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .blog-header { padding: 110px 20px 50px; }
  .blog-list-section { padding: 0 20px 80px; }
  .blog-grid { grid-template-columns: 1fr; gap: 60px; }
  .post { padding: 110px 20px 60px; }
  .post-cover { margin: 0 -20px 50px; }
  .post-gallery, .post-video, .post-embed { margin-left: -20px; margin-right: -20px; }
  .post-gallery.cols-3 { grid-template-columns: 1fr 1fr; }
  .post-content { font-size: 17px; }
  .post-content h2 { font-size: 26px; }
  .post-content blockquote { font-size: 22px; padding-left: 20px; }
  .post-related { padding: 70px 20px; }
  .related-grid { grid-template-columns: 1fr; gap: 50px; }
  .home-blog { padding: 80px 20px; }
  .home-blog-grid { grid-template-columns: 1fr; gap: 50px; }
  .home-blog-head { flex-direction: column; align-items: flex-start; }
}
