:root {
  --bg: #000;
  --header: #fff;
  --card: #fff;
  --text: #444;
  --title: #333;
  --muted: #999;
  --line: #e5e5e5;
  --font: "Roboto", Arial, Helvetica, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5em;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #333; text-decoration: none; }
a:hover { color: #000; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: #fff;
  padding: .5rem .75rem;
}

/* ——— Header (Gridzone) ——— */
#header {
  background: var(--header);
  position: sticky;
  top: 0;
  z-index: 99;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

#header .group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 100%;
  min-height: 80px;
}

.site-title {
  margin: 0;
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.5px;
  line-height: 60px;
  padding: 10px 0;
  flex: 1 1 auto;
  min-width: 0;
}

.site-title a {
  display: block;
  color: #333;
  max-width: 100%;
}

.site-title a:hover { color: #000; }

.site-search {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.site-search input[type="search"] {
  border: 0;
  outline: none;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 14px;
  color: #333;
  min-width: 160px;
  width: min(220px, 36vw);
  background: transparent;
}
.site-search input[type="search"]::placeholder { color: #aaa; }
.site-search button {
  border: 0;
  background: #f5f5f5;
  color: #333;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-search button:hover { background: #eee; color: #000; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ——— Content shell ——— */
.content {
  margin: 0 auto;
  position: relative;
  width: 100%;
  padding: 20px;
}

/* ——— Masonry grid ——— */
.masonry {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0;
}

.masonry-item {
  width: 25%;
  padding: 20px;
}

.masonry-inner {
  background: var(--card);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.masonry-item:hover .masonry-inner {
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.entry-top {
  position: relative;
  overflow: hidden;
}

.entry-thumbnail {
  display: block;
  position: relative;
  background: #eee;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.entry-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-thumbnail-fallback {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(135deg, #eee 0 10px, #e5e5e5 10px 20px);
}

.entry-thumbnail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.masonry-item:hover .entry-thumbnail::before { opacity: 0.25; }

.entry-title {
  margin: 0;
  padding: 20px 20px 0;
}

.entry-title a {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: #333;
}

.entry-title a:hover { color: #000; }

.entry-meta {
  list-style: none;
  margin: 0;
  padding: 14px 20px;
  color: #999;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.entry-meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.entry-meta .icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  flex-shrink: 0;
}

/* ——— Pagination ——— */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 10px 20px 40px;
  color: #777;
  font-size: 15px;
}

.pagination a {
  color: #ccc;
  font-weight: 400;
}
.pagination a:hover { color: #fff; }

/* ——— Single post ——— */
.post-wrapper {
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  margin: 20px auto 40px;
  max-width: 940px;
  border-radius: 10px;
  width: 100%;
  overflow: hidden;
}

.entry-header {
  max-width: 740px;
  margin: 40px auto 20px;
  padding: 0 40px;
  position: relative;
}

.entry-header .entry-title {
  padding: 0;
  font-weight: 300;
  font-size: 50px;
  line-height: 1.3em;
  letter-spacing: -1px;
  margin: 0 0 20px;
  color: #333;
}

.entry-header .entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  padding: 0;
  margin: 0 0 10px;
  color: #999;
  font-size: 14px;
}

.entry-header .entry-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.entry-content {
  padding: 0 40px 40px;
  max-width: 820px;
  margin: 0 auto;
}

.entry {
  font-size: 19px;
  line-height: 1.6em;
  color: #444;
  font-weight: 300;
}

.entry > *:first-child { margin-top: 0; }

.entry a {
  color: #000;
  box-shadow: 0 1px 0 #999;
}
.entry a:hover { box-shadow: 0 1px 0 #000; }

.entry h2 {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.5px;
  color: #333;
  margin: 1.6em 0 0.6em;
}
.entry h3 {
  font-size: 22px;
  font-weight: 400;
  color: #333;
  margin: 1.4em 0 0.5em;
}

.entry hr,
.entry .wp-block-separator {
  border: 0;
  background: #e5e5e5;
  height: 2px;
  width: 30%;
  margin: 40px auto;
}

.entry ul,
.entry ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.entry img,
.entry figure {
  margin: 1.25em auto;
  max-width: 100%;
}

.entry figure { margin-left: auto; margin-right: auto; text-align: center; }
.entry figcaption {
  color: #999;
  font-size: 13px;
  margin-top: 6px;
}

/* Photos plus petites + zoom au clic */
.entry img {
  max-width: min(420px, 100%);
  width: auto;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  cursor: zoom-in;
  border-radius: 4px;
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}
.entry img:hover {
  opacity: 0.92;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.entry blockquote {
  position: relative;
  color: #777;
  font-style: italic;
  margin: 0 0 20px;
  padding-left: 24px;
  border-left: 3px solid #e5e5e5;
}

.entry pre {
  background: #f5f5f5;
  padding: 18px 20px;
  margin: 30px 0;
  border: 1px solid #ddd;
  line-height: 19px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  font-size: 12px;
  font-family: Monaco, "Courier New", monospace;
}

.entry code {
  background: #ddd;
  padding: 0 3px;
  font-size: 0.85em;
  font-family: Monaco, "Courier New", monospace;
}

.entry pre code { background: transparent; padding: 0; }

.entry iframe {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  margin: 1em 0;
}

/* WordPress block galleries / images */
.entry .wp-block-gallery,
.entry .wp-block-gallery-is-layout-flex,
.entry .is-layout-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25em auto;
  justify-content: center;
  max-width: 640px;
}

.entry .wp-block-gallery .wp-block-image,
.entry .wp-block-gallery figure {
  margin: 0;
  flex: 0 1 calc(50% - 0.4rem);
  min-width: 120px;
  max-width: 300px;
}

.entry .wp-block-gallery.columns-3 .wp-block-image,
.entry .wp-block-gallery.columns-3 figure {
  flex-basis: calc(33.333% - 0.55rem);
  max-width: 200px;
}

.entry .wp-block-gallery img {
  max-width: 100%;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.entry .wp-block-image {
  margin: 1.25em auto;
  max-width: min(420px, 100%);
}

.entry .wp-block-image img {
  height: auto;
  border-radius: 4px;
  max-width: 100%;
}

.entry .wp-block-image figcaption,
.entry figcaption {
  color: #999;
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
}

/* WP lightbox buttons are inert without WordPress JS */
.entry .lightbox-trigger,
.entry .wp-lightbox-container > button {
  display: none !important;
}

.entry .wp-lightbox-container {
  position: relative;
}

.entry .aligncenter {
  margin-left: auto;
  margin-right: auto;
}

.entry .alignwide,
.entry .alignfull {
  max-width: 100%;
}

.entry-footer {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 40px 40px;
  color: #999;
  font-size: 14px;
}

.entry-footer a { color: #666; }
.entry-footer a:hover { color: #000; }

/* ——— Footer ——— */
#footer {
  color: #777;
  position: relative;
  padding: 30px 20px 70px;
  border-top: 1px solid #222;
  text-align: center;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6em;
}

#footer a { color: #999; }
#footer a:hover { color: #fff; }

#copyright p,
#credit p { margin: 0.35em 0; }

#credit { color: #666; }

/* ——— Empty / 404 ——— */
.empty-state {
  max-width: 560px;
  margin: 60px auto;
  background: #fff;
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}
.empty-state h1 {
  font-weight: 300;
  letter-spacing: -0.5px;
  color: #333;
}

/* ——— Responsive (Gridzone breakpoints) ——— */
@media only screen and (max-width: 1680px) {
  .masonry-item { width: 33.33%; }
}

@media only screen and (max-width: 1280px) {
  .masonry-item { width: 50%; }
  .entry-header .entry-title { font-size: 38px; }
}

@media only screen and (min-width: 960px) and (max-width: 1080px) {
  .masonry-item { width: 33.33%; }
}

@media only screen and (max-width: 959px) {
  #header { padding: 0 20px; }
  .site-title { font-size: 28px; line-height: 50px; }
  .entry-header,
  .entry-content,
  .entry-footer { padding-left: 24px; padding-right: 24px; }
}

@media only screen and (max-width: 620px) {
  .masonry { margin: 0; }
  .masonry-item { width: 100%; padding: 10px; }
  .content { padding: 10px; }
  .entry-header .entry-title { font-size: 28px; }
  .entry { font-size: 17px; }
}

@media only screen and (max-width: 479px) {
  .site-title { font-size: 24px; }
  #header { padding: 0 12px; }
  .entry img { max-width: min(100%, 320px); }
}

/* ——— Lightbox zoom ——— */
.site-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  padding: 1.5rem;
  cursor: zoom-out;
}
.site-lightbox.is-open { display: flex; }
.site-lightbox__img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
  cursor: default;
}
.site-lightbox__close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  opacity: 0.85;
}
.site-lightbox__close:hover { opacity: 1; }
.site-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-lightbox__nav:hover { background: rgba(255, 255, 255, 0.22); }
.site-lightbox__prev { left: 12px; }
.site-lightbox__next { right: 12px; }

body.lightbox-open { overflow: hidden; }

.entry-thumbnail,
.entry-thumbnail img {
  cursor: zoom-in;
}

/* ——— Search results ——— */
.search-page {
  max-width: 860px;
  margin: 10px auto 40px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  padding: 28px 32px 36px;
}
.search-header { margin-bottom: 1.25rem; }
.search-title {
  margin: 0;
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.5px;
  color: #333;
}
.search-count {
  margin: 0.4rem 0 0;
  color: #999;
  font-size: 0.95rem;
}
.search-empty {
  color: #666;
  margin: 1rem 0 0;
}
.search-results { display: grid; gap: 1rem; }
.search-hit {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid #eee;
}
.search-hit:first-child { border-top: 0; padding-top: 0; }
.search-hit-thumb {
  display: block;
  width: 120px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
}
.search-hit-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.search-hit-fallback {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(135deg, #eee 0 8px, #e5e5e5 8px 16px);
}
.search-hit-title {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}
.search-hit-title a { color: #333; }
.search-hit-title a:hover { color: #000; }
.search-hit-body time {
  display: block;
  color: #999;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}
.search-hit-body p {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

@media only screen and (max-width: 620px) {
  .search-page { padding: 20px 16px 28px; margin: 0 0 24px; border-radius: 0; }
  .search-hit { grid-template-columns: 88px 1fr; gap: 0.75rem; }
  .search-hit-thumb { width: 88px; height: 66px; }
  .site-title { font-size: 22px; line-height: 1.2; padding: 12px 0; }
  .site-search input[type="search"] { min-width: 0; width: 120px; }
}
