/*
Theme Name: Photo Journal
Theme URI: https://journal-photographique.wdtrends.chatgpt.site
Author: IZHAK / Arnaud Steckle
Description: Un thème WordPress minimaliste pour un journal photographique en colonne unique.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: photo-journal
*/

:root {
  --paper: #f4f3ef;
  --ink: #101010;
  --line: rgba(16, 16, 16, .22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  letter-spacing: .035em;
}
body.is-loading-more { cursor: progress; }
body.overlay-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2.2vw;
  background: rgba(244, 243, 239, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
}
.wordmark { font-size: 13px; font-weight: 700; letter-spacing: -.02em; }
.wordmark span { font-weight: 400; margin-left: 12px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a,
.site-nav button { transition: opacity .2s ease; }
.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav button:hover,
.site-nav button:focus-visible { opacity: .45; }
.index-link {
  display: flex;
  gap: 15px;
  align-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  text-transform: uppercase;
  cursor: pointer;
}
.index-link span { font-size: 16px; line-height: 0; }

.intro {
  min-height: 78vh;
  padding: 15vh 2.2vw 6vh;
  position: relative;
}
.eyebrow { margin: 0; text-transform: uppercase; }
.intro h1 {
  margin: 7vh 0 0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(62px, 10.5vw, 174px);
  font-weight: 400;
  line-height: .82;
  letter-spacing: -.075em;
}
.intro-note {
  position: absolute;
  right: 2.2vw;
  bottom: 7vh;
  margin: 0;
  line-height: 1.55;
  text-transform: uppercase;
}

.diary {
  width: min(calc(100% - 4.4vw), 1080px);
  margin: 0 auto;
  padding: 0 0 16vh;
  display: flex;
  flex-direction: column;
  gap: 14vh;
}
.entry { width: 100%; }
.photo-link {
  display: block;
  width: 100%;
  overflow: hidden;
  background: #ddd;
}
.photo-link img {
  width: 100%;
  height: auto;
  display: block;
  filter: none !important;
  mix-blend-mode: normal;
  opacity: 1;
  transition: transform .8s cubic-bezier(.2,.7,.1,1);
}
.photo-link:hover img,
.photo-link:focus-visible img {
  transform: scale(1.012);
  filter: none !important;
  opacity: 1;
}
.photo-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  text-transform: uppercase;
}
.caption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 10px;
  text-transform: uppercase;
  line-height: 1.4;
}
.caption p { margin: 0; }
.caption p:last-child { text-align: right; }

.archive-index {
  position: fixed;
  z-index: 40;
  inset: 0;
  overflow-y: auto;
  padding: 22px 2.2vw 60px;
  color: #fff;
  background: rgba(8, 8, 8, .98);
  animation: overlay-reveal .28s ease both;
}
.archive-index[hidden] { display: none; }
.archive-index-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 60px;
  text-transform: uppercase;
}
.archive-index-close {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-transform: uppercase;
  cursor: pointer;
}
.archive-months { max-width: 1140px; margin: auto; }
.archive-month {
  display: grid;
  grid-template-columns: 150px 1fr;
  padding: 24px 0 42px;
  border-top: 1px solid rgba(255, 255, 255, .35);
}
.archive-month > p { margin: 5px 0 0; }
.archive-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px 24px;
}
.archive-days span,
.archive-days a {
  position: relative;
  min-height: 20px;
  padding: 5px 0;
  color: #555;
}
.archive-days a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.archive-days a:hover,
.archive-days a:focus-visible { opacity: .55; }
.archive-count {
  position: absolute;
  top: 2px;
  margin-left: 3px;
  font-size: 8px;
  text-decoration: none;
}
@keyframes overlay-reveal {
  from { opacity: 0; transform: translateY(-8px); }
}

.lightbox {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: #090909;
  animation: overlay-reveal .22s ease both;
}
.lightbox[hidden] { display: none; }
.lightbox-close {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 2.2vw;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-transform: uppercase;
  cursor: pointer;
}
.lightbox-figure {
  width: min(82vw, 1400px);
  height: 86vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.lightbox-image {
  width: 100%;
  min-height: 0;
  flex: 1;
  object-fit: contain;
  filter: none !important;
}
.lightbox-caption {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  padding-top: 14px;
  text-transform: uppercase;
}
.lightbox-caption span:nth-child(2) { text-align: center; }
.lightbox-counter { text-align: right; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  border: 0;
  padding: 20px;
  color: inherit;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}
.lightbox-prev { left: 1vw; }
.lightbox-next { right: 1vw; }

.load-more {
  min-height: 90px;
  display: grid;
  place-items: center;
  text-transform: uppercase;
  border-top: 1px solid var(--line);
}
.loader {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(16,16,16,.25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.loader[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.about {
  min-height: 70vh;
  border-top: 1px solid var(--line);
  padding: 8vh 2.2vw;
  display: grid;
  grid-template-columns: 2fr 7fr 3fr;
  align-items: start;
}
.about-copy {
  max-width: 900px;
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(35px, 5.2vw, 82px);
  line-height: .98;
  letter-spacing: -.045em;
}
.about a { justify-self: end; text-transform: uppercase; }
.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 25px 2.2vw;
  border-top: 1px solid var(--line);
  text-transform: uppercase;
}
.single-content {
  width: min(calc(100% - 32px), 900px);
  margin: 12vh auto;
  font-size: 17px;
  line-height: 1.7;
}
.single-content img { max-width: 100%; height: auto; }

@media (max-width: 760px) {
  .site-header { height: 58px; padding: 0 16px; }
  .site-nav { gap: 14px; }
  .site-nav .about-link { display: none; }
  .intro { min-height: 68vh; padding: 12vh 16px 6vh; }
  .intro h1 { font-size: clamp(56px, 21vw, 96px); line-height: .88; }
  .intro-note { position: static; margin-top: 9vh; }
  .diary { width: auto; margin: 0 16px; padding-bottom: 100px; gap: 70px; }
  .caption { font-size: 9px; }
  .archive-index { padding: 18px 16px 50px; }
  .archive-month { grid-template-columns: 1fr; gap: 20px; }
  .archive-days { gap: 8px 12px; }
  .lightbox-figure { width: calc(100vw - 32px); height: 78vh; }
  .lightbox-nav { top: auto; bottom: 18px; }
  .lightbox-caption { grid-template-columns: 1fr 1fr; }
  .lightbox-caption span:nth-child(2) { display: none; }
  .about { min-height: 75vh; padding: 50px 16px; grid-template-columns: 1fr; gap: 50px; }
  .about a { justify-self: start; }
  .site-footer { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
