@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --bg: #ffffff;
  --tile: #eeeeee;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: #555555; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.wrap { max-width: 1248px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 10; }

/* En-tête */
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; padding-top: 40px; }
.brand { font-family: var(--serif); font-size: 30px; letter-spacing: 0.01em; line-height: 1.2; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 15px; }
.nav a { padding: 10px 0; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }

/* Menu déroulant (téléphone) */
.menu-toggle { display: none; }
@media (max-width: 640px) {
  .js .site-header { flex-wrap: wrap; align-items: center; }
  .js .menu-toggle { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 44px; padding: 10px 0 10px 12px; border: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; }
  .js .menu-toggle .i-close { display: none; }
  .js .menu-toggle[aria-expanded="true"] .i-close { display: inline; }
  .js .menu-toggle[aria-expanded="true"] .i-open { display: none; }
  .js .nav { display: none; flex-basis: 100%; flex-direction: column; gap: 0; border-top: 1px solid var(--line); margin-top: 8px; font-size: 18px; }
  .js .menu-toggle[aria-expanded="true"] + .nav { display: flex; }
  .js .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .js .nav a[aria-current="page"] { text-decoration: none; font-weight: 500; }
}

/* Accueil */
.intro { padding-top: 96px; padding-bottom: 72px; }
.intro-spacer { height: 64px; }
.tagline { margin: 0; max-width: 680px; font-family: var(--serif); font-size: clamp(32px, 5vw, 44px); line-height: 1.15; }
.section { padding-bottom: 96px; scroll-margin-top: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; margin-bottom: 32px; }
.section-head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 32px; }
.section-head .muted { font-size: 14px; }
.cards { display: flex; flex-wrap: wrap; gap: 48px 32px; }
/* Rangées justifiées : toutes les vignettes d'une rangée ont la même hauteur.
   --r = largeur / hauteur de la photo de couverture. */
.cards::after { content: ""; flex-grow: 999; }
.card { --r: 1; flex: var(--r) 1 calc(var(--r) * 260px); min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.card-img { display: block; aspect-ratio: var(--r); background: var(--tile); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.card:hover .card-img img { opacity: .88; }
.card-meta { display: flex; justify-content: space-between; gap: 4px 12px; font-size: 15px; }
.card-title { min-width: 0; }
.card-meta .muted { white-space: nowrap; }
@media (max-width: 640px) {
  .card { flex: 1 1 100%; }
  .cards::after { display: none; }
}

/* Série */
.draft-banner { margin-top: 24px; padding: 12px 16px; background: #fff6d6; color: #5a4300; font-size: 14px; border-radius: 6px; }
.serie-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; padding-top: 88px; padding-bottom: 56px; }
.serie-title { display: flex; flex-direction: column; gap: 12px; }
.serie-title .muted { font-size: 14px; }
.serie-head h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7vw, 64px); line-height: 1; }
.serie-info { display: flex; flex-direction: column; gap: 6px; max-width: 380px; }
.serie-intro { margin: 0; font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.35; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 40px; align-items: start; }
.photo { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.photo a { display: block; background: var(--tile); cursor: zoom-in; }
.photo img { width: 100%; }
.photo figcaption { font-size: 13px; }
.neighbours { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-top: 96px; padding-bottom: 72px; }
.neighbours a { display: flex; flex-direction: column; gap: 6px; }
.neighbours .next { align-items: flex-end; text-align: right; margin-left: auto; }
.neighbours .muted { font-size: 13px; }
.neighbour-title { font-family: var(--serif); font-size: 28px; line-height: 1.2; }

/* À propos */
.about { display: flex; flex-wrap: wrap; gap: 64px; padding-top: 88px; padding-bottom: 80px; }
.about-portrait { flex: 1 1 300px; max-width: 420px; }
.about-portrait img { width: 100%; }
.about-text { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.about-text h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6vw, 56px); line-height: 1.05; }
.about-text p { margin: 0; max-width: 580px; font-size: 18px; line-height: 1.6; color: #333333; }
.about-contact { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.about-contact .muted { font-size: 14px; }
.about-contact a { font-family: var(--serif); font-size: clamp(24px, 4vw, 30px); text-decoration: underline; text-underline-offset: 6px; overflow-wrap: anywhere; }
.cv { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 48px; padding-bottom: 96px; }
.cv-block { border-top: 1px solid var(--line); padding-top: 20px; }
.cv-block h2 { margin: 0 0 18px; font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cv-block ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; font-size: 15px; line-height: 1.45; }
.cv-block li { display: flex; flex-direction: column; gap: 2px; }

/* Pied de page */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 32px 0 56px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-links a { color: var(--muted); }

/* Visionneuse plein écran */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(255,255,255,.98); display: flex; align-items: center; justify-content: center; }
.lb[hidden] { display: none; }
.lb img { max-width: calc(100vw - 32px); max-height: calc(100vh - 120px); width: auto; height: auto; object-fit: contain; }
.lb button { position: absolute; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; min-width: 44px; min-height: 44px; padding: 10px 14px; cursor: pointer; }
.lb button:hover { color: #555; }
.lb .lb-close { top: 12px; right: 12px; }
.lb .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); font-size: 28px; }
.lb .lb-next { right: 8px; top: 50%; transform: translateY(-50%); font-size: 28px; }
.lb .lb-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  .site-header { padding-top: 24px; }
  .intro { padding-top: 56px; padding-bottom: 48px; }
  .intro-spacer { height: 40px; }
  .serie-head, .about { padding-top: 48px; }
  .photos { gap: 28px; }
  .lb .lb-prev, .lb .lb-next { top: auto; bottom: 8px; transform: none; }
}

/* Bandeau d'aperçu de thème (visible seulement par l'admin) */
.theme-preview-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 10px 24px; background: #111; color: #fff; font-size: 14px; }
.theme-preview-bar a { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
