/*
Theme Name: Minimal
Theme URI: https://example.com
Author: You
Description: Un thème minimaliste centré sur l'article du jour.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: minimal
*/

/* ─── Variables ───────────────────────────────────────────────────── */
:root {
  --black:   #0a0a0a;
  --white:   #f5f4f0;
  --grey:    #888;
  --rule:    #d8d6d0;
  --accent:  #0a0a0a;
  --font-serif: 'EB Garamond', Georgia, serif;
  --font-sans:  'DM Mono', 'Courier New', monospace;
  --col: 680px;
  --gap: 2rem;
}

/* ─── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-serif);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Layout ──────────────────────────────────────────────────────── */
.site-container {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ─── Header ──────────────────────────────────────────────────────── */
.site-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--rule);
}

.site-header .site-container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-title a { color: var(--black); }

.site-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  transition: color 0.15s;
}

.site-nav a:hover { color: var(--black); }

/* ─── Homepage hero ───────────────────────────────────────────────── */
.home-hero {
  padding: 3rem 0;
}

/* Thumbnail pleine largeur, en tête de hero */
.home-hero .thumbnail {
  margin-bottom: 0;
  line-height: 0;
}

.home-hero .thumbnail a {
  display: block;
  overflow: hidden;
}

.home-hero .thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s;
}

.home-hero .thumbnail a:hover img {
  transform: scale(1.015);
  opacity: 0.92;
}

/* Corps texte sous l'image */
.home-hero .hero-body {
  padding-top: 1.75rem;
}

.home-hero .label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 1rem;
  display: block;
}

.home-hero .post-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.home-hero .post-title a {
  color: var(--black);
  transition: opacity 0.15s;
}

.home-hero .post-title a:hover { opacity: 0.55; }

.home-hero .post-meta {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--grey);
  letter-spacing: 0.05em;
  margin-bottom: 1.75rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.home-hero .post-excerpt {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #3a3a3a;
  margin-bottom: 2rem;
  max-width: 56ch;
}

/* ─── Read more link ──────────────────────────────────────────────── */
.read-more {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--black);
  transition: opacity 0.15s;
}

.read-more:hover { opacity: 0.5; }

.read-more::after { content: '→'; }

/* ─── Divider ─────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

/* ─── Previous articles list ─────────────────────────────────────── */
.previous-articles .section-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 2rem;
  display: block;
}

.article-list {
  list-style: none;
}

.article-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
}

.article-list li:first-child {
  border-top: 1px solid var(--rule);
}

.article-list .item-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.4;
}

.article-list .item-title a {
  color: var(--black);
  transition: opacity 0.15s;
}

.article-list .item-title a:hover { opacity: 0.5; }

.article-list .item-date {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--grey);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ─── Single article ──────────────────────────────────────────────── */
.single-article {
  padding: 4rem 0 6rem;
}

.single-article .post-header {
  margin-bottom: 3rem;
}

.single-article .post-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.single-article .post-meta {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--grey);
  letter-spacing: 0.05em;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.single-article .post-meta a {
  color: var(--grey);
  border-bottom: 1px solid var(--rule);
  transition: color 0.15s, border-color 0.15s;
}

.single-article .post-meta a:hover {
  color: var(--black);
  border-color: var(--black);
}

.single-article .featured-image {
  margin-bottom: 3rem;
  overflow: hidden;
}

.single-article .featured-image img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* ─── Article content typography ─────────────────────────────────── */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #1a1a1a;
}

.entry-content p { margin-bottom: 1.5em; }

.entry-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 2.5em 0 0.75em;
  line-height: 1.3;
}

.entry-content h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin: 2em 0 0.5em;
}

.entry-content blockquote {
  border-left: 2px solid var(--black);
  margin: 2em 0;
  padding: 0.25em 0 0.25em 1.5em;
  font-style: italic;
  color: #3a3a3a;
}

.entry-content blockquote p { margin-bottom: 0; }

.entry-content ul,
.entry-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.entry-content li { margin-bottom: 0.4em; }

.entry-content a {
  border-bottom: 1px solid var(--black);
  transition: opacity 0.15s;
}

.entry-content a:hover { opacity: 0.5; }

.entry-content hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3em 0;
}

.entry-content code {
  font-family: var(--font-sans);
  font-size: 0.85em;
  background: #eeecea;
  padding: 0.1em 0.35em;
}

.entry-content pre {
  background: #eeecea;
  padding: 1.5em;
  overflow-x: auto;
  margin-bottom: 1.5em;
}

.entry-content pre code {
  background: none;
  padding: 0;
  font-size: 0.82rem;
}

.entry-content figure { margin: 2.5em 0; }

.entry-content figcaption {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--grey);
  letter-spacing: 0.05em;
  margin-top: 0.75rem;
}

/* ─── Categories / tags (single footer) ──────────────────────────── */
.post-footer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

/* ─── Boutons de partage ──────────────────────────────────────── */
.share-block {
  margin-bottom: 2.5rem;
}

.share-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  display: block;
  margin-bottom: 1rem;
}

.share-buttons {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5em 0.9em;
  border: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--grey);
  background: transparent;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}

.share-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.share-btn--twitter:hover  { color: var(--white); background: #000;     border-color: #000; }
.share-btn--linkedin:hover { color: var(--white); background: #0A66C2;  border-color: #0A66C2; }
.share-btn--facebook:hover { color: var(--white); background: #1877F2;  border-color: #1877F2; }
.share-btn--whatsapp:hover { color: var(--white); background: #25D366;  border-color: #25D366; }
.share-btn--copy:hover     { color: var(--white); background: var(--black); border-color: var(--black); }

.share-btn--copied,
.share-btn--copied:hover {
  color: var(--white) !important;
  background: #2a9d5c !important;
  border-color: #2a9d5c !important;
}

@media (max-width: 480px) {
  .share-btn__label { display: none; }
  .share-btn { padding: 0.6em 0.75em; }
  .share-btn svg { width: 16px; height: 16px; }
}

.post-footer .tags-label,
.post-footer .cats-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 0.5rem;
  display: block;
}

.tag-list, .cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-bottom: 1.25rem;
}

.tag-list a, .cat-list a {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  padding: 0.3em 0.8em;
  border: 1px solid var(--rule);
  color: var(--grey);
  transition: border-color 0.15s, color 0.15s;
}

.tag-list a:hover, .cat-list a:hover {
  border-color: var(--black);
  color: var(--black);
}

/* ─── Post navigation ─────────────────────────────────────────────── */
.post-navigation {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}

.post-navigation .nav-label {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey);
  display: block;
  margin-bottom: 0.5rem;
}

.post-navigation .nav-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--black);
  transition: opacity 0.15s;
}

.post-navigation a:hover .nav-title { opacity: 0.5; }

.post-navigation .nav-next { text-align: right; }

/* ─── Archive / Category ──────────────────────────────────────────── */
.archive-header {
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.archive-header .archive-type {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 0.75rem;
  display: block;
}

.archive-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
}

.archive-grid {
  padding: 2.5rem 0 5rem;
  list-style: none;
}

.archive-grid li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.archive-grid .entry-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.archive-grid .entry-title a {
  color: var(--black);
  transition: opacity 0.15s;
}

.archive-grid .entry-title a:hover { opacity: 0.5; }

.archive-grid .entry-meta {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--grey);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.archive-grid .entry-excerpt {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #3a3a3a;
  max-width: 60ch;
  margin-bottom: 1rem;
}

/* ─── Pagination ──────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0 4rem;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.pagination a, .pagination span {
  color: var(--grey);
  text-transform: uppercase;
  transition: color 0.15s;
}

.pagination a:hover { color: var(--black); }
.pagination .current { color: var(--black); }
.pagination .sep { color: var(--rule); }

/* ─── 404 / No results ────────────────────────────────────────────── */
.not-found {
  padding: 6rem 0;
  text-align: center;
}

.not-found h1 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 1.5rem;
}

.not-found p {
  font-size: 0.95rem;
  color: var(--grey);
}

/* ─── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
}

.site-footer .site-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer .footer-copy,
.site-footer .footer-info {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--grey);
  letter-spacing: 0.08em;
}

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --gap: 1.25rem; }

  .site-header { padding: 2rem 0 1.5rem; }
  .home-hero { padding: 3rem 0 2rem; }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .article-list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
