/* ════════════════════════════════════════════════════════════════
   article.css — design magazine/journal pour les pages d'article seules
   ────────────────────────────────────────────────────────────────
   Fond crème, typo noire serif, lecture confortable comme un imprimé.
   Partagé par toutes les pages /articles/{slug}.html (chargé via
   <link rel="stylesheet" href="article.css"> en remplacement du style
   inline historique des articles).
   ════════════════════════════════════════════════════════════════ */

:root {
  --paper:       #f5efde;   /* fond crème papier */
  --paper-2:     #ede5cf;   /* crème un cran plus foncé pour bordures/footer */
  --ink:         #1a1612;   /* texte noir chaud */
  --ink-soft:    #4a4239;   /* texte secondaire */
  --rule:        #1a1612;   /* filets noirs */
  --rule-soft:   #b6ab93;   /* filets discrets */
  --accent:      #6b4515;   /* accents bruns/sépia (date, links, drop cap) */
  --serif:       'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --sans:        'Inter', -apple-system, system-ui, sans-serif;
  --mono:        'Space Mono', ui-monospace, Menlo, monospace;
  --px:          24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Texture papier subtile (n'apparaît qu'à l'œil attentif) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(26,22,18,0.025) 1px, transparent 1px),
    radial-gradient(rgba(26,22,18,0.015) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  z-index: 1;
  opacity: 0.5;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  transition: opacity 0.2s ease;
}
a:hover { opacity: 0.6; }

/* ── Navigation ─────────────────────────────────────────────── */
.article-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px var(--px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245,239,222,0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.article-nav .back {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  border: 0;
}
.article-nav .back:hover { color: var(--accent); opacity: 1; }
.article-nav .sigil {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ── Article Header ─────────────────────────────────────────── */
.article-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px var(--px) 28px;
  position: relative;
  z-index: 2;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}
.article-date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
  display: block;
}
/* Petit filet décoratif autour de la date (signature magazine) */
.article-date::before,
.article-date::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin: 0 14px;
}
.article-title {
  font-family: var(--serif);
  font-size: clamp(34px, 5.6vw, 58px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

/* ── Hero image ─────────────────────────────────────────────── */
.article-hero {
  max-width: 920px;
  margin: 36px auto 0;
  padding: 0 var(--px);
  position: relative;
  z-index: 2;
}
.article-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  box-shadow: 0 1px 0 var(--rule-soft), 0 16px 28px -20px rgba(26,22,18,0.25);
}

/* ── Article body ───────────────────────────────────────────── */
.article-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px var(--px) 60px;
  position: relative;
  z-index: 2;
}
.article-body p {
  margin-bottom: 1.4em;
  font-size: 19px;
  line-height: 1.7;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.article-body p:first-of-type { text-align: left; }
/* Drop cap — première lettre du premier paragraphe */
.article-body > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 5.2em;
  line-height: 0.85;
  float: left;
  margin: 0.04em 0.08em 0 -0.04em;
  color: var(--accent);
}
.article-body h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.6vw, 34px);
  font-weight: 600;
  color: var(--ink);
  margin: 2.2em 0 0.7em;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
}
.article-body h2::before,
.article-body h2::after {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--rule);
  vertical-align: middle;
  margin: 0 18px 0.18em;
}
.article-body h3 {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 26px);
  font-weight: 400;
  color: var(--ink-soft);
  margin: 1.8em 0 0.6em;
  line-height: 1.3;
}
.article-body blockquote {
  border-left: 3px solid var(--rule);
  padding: 6px 0 6px 26px;
  margin: 1.8em 6px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  line-height: 1.5;
  font-weight: 400;
}
.article-body ul,
.article-body ol {
  margin: 1.4em 0 1.6em 1.2em;
  padding-left: 1em;
}
.article-body li {
  margin-bottom: 0.5em;
  line-height: 1.65;
  font-size: 19px;
}
.article-body li::marker { color: var(--accent); }
.article-body strong {
  color: var(--ink);
  font-weight: 600;
}
.article-body em { font-style: italic; }
.article-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}
.article-body a:hover { background: rgba(107,69,21,0.08); }
.article-body img {
  max-width: 100%;
  margin: 2em auto;
  display: block;
  border-radius: 0;
  box-shadow: 0 1px 0 var(--rule-soft);
}
.article-body figure { margin: 2em 0; text-align: center; }
.article-body figure img { margin: 0 auto 12px; }
.article-body figcaption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.4;
}
.article-body hr {
  border: 0;
  text-align: center;
  margin: 2.6em 0;
  height: 14px;
  position: relative;
}
.article-body hr::before {
  content: '· · ·';
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.6em;
  color: var(--ink-soft);
}

/* ── End mark ───────────────────────────────────────────────── */
.article-end {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--px) 48px;
  position: relative;
  z-index: 2;
  text-align: center;
}
.article-end .divider {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: 0.5em;
  font-weight: 600;
}

/* ── Share (icônes sociales sous l'article) ─────────────────── */
.article-share {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px var(--px) 36px;
  position: relative;
  z-index: 2;
  text-align: center;
  border-top: 1px solid var(--rule-soft);
}
.article-share .share-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
  display: inline-block;
}
.article-share .share-label::before,
.article-share .share-label::after {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--rule-soft);
  vertical-align: middle;
  margin: 0 14px;
}
.article-share .share-list {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.article-share .share-list a,
.article-share .share-list button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
  font-family: inherit;
  position: relative;
}
.article-share .share-list a:hover,
.article-share .share-list button:hover,
.article-share .share-list a:focus-visible,
.article-share .share-list button:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: none;
  opacity: 1;
}
.article-share .share-list svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.article-share .share-list .is-copied::after {
  content: 'Copié ✓';
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--accent);
  white-space: nowrap;
}
body.lang-en .article-share .share-list .is-copied::after { content: 'Copied ✓'; }

/* ── Footer ─────────────────────────────────────────────────── */
.article-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px var(--px) 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
  gap: 12px;
}
.article-footer .author {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.article-footer .copyright {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Lang toggle (dans la nav) ─────────────────────────────── */
.lang-toggle {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--rule);
}
.lang-toggle button {
  min-width: 38px;
  padding: 6px 10px;
  background: transparent;
  border: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-toggle button:hover { background: rgba(26,22,18,0.06); }
.lang-toggle button.is-active {
  background: var(--ink);
  color: var(--paper);
}
.lang-toggle button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Origin / translation banner ───────────────────────────── */
.origin-banner {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px var(--px);
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  border-bottom: 1px solid var(--rule-soft);
}
.origin-banner.translated {
  color: var(--accent);
  background: rgba(107,69,21,0.04);
}
.origin-banner.pending {
  color: var(--accent);
  background: rgba(107,69,21,0.06);
}
.origin-banner a {
  color: inherit;
  border-bottom: 1px solid currentColor;
}

/* ── Prev / next chronological arrows (fixed sides, à toutes tailles) ── */
.chrono-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  max-width: 60px; /* mobile/tablet : juste la flèche */
}
.chrono-nav.left  { left: 8px;  align-items: flex-start; }
.chrono-nav.right { right: 8px; align-items: flex-end; }
.chrono-nav a {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,239,222,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  text-decoration: none;
  transition: all 0.25s ease;
}
.chrono-nav a:hover,
.chrono-nav a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  opacity: 1;
  outline: none;
}
.chrono-nav .label {
  pointer-events: auto;
  max-width: 200px;
  padding: 8px 10px;
  background: rgba(245,239,222,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--rule-soft);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.3;
  color: var(--ink-soft);
  font-style: italic;
  display: none; /* affiché uniquement sur grand écran */
}
@media (min-width: 1024px) {
  .chrono-nav { max-width: 240px; }
  .chrono-nav.left  { left: 16px; }
  .chrono-nav.right { right: 16px; }
  .chrono-nav a { width: 44px; height: 44px; font-size: 24px; }
  .chrono-nav .label { display: block; }
}

/* ── Selection ──────────────────────────────────────────────── */
::selection {
  background: var(--accent);
  color: var(--paper);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (min-width: 768px) {
  :root { --px: 40px; }
  .article-body p { font-size: 20px; line-height: 1.72; }
  .article-body li { font-size: 20px; }
}
@media (min-width: 1024px) {
  :root { --px: 56px; }
  .article-header { padding-top: 96px; padding-bottom: 36px; }
  .article-body { padding-top: 56px; padding-bottom: 72px; }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  body::before, .article-nav { display: none; }
  body { background: white; color: black; }
  .article-body p { font-size: 12pt; line-height: 1.5; }
  a { color: black; }
}

/* ── Reduce motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
