@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,300;0,400;1,300;1,400&family=Spectral+SC:wght@300;400&display=swap');

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

:root {
  --bg:    #ffffff;
  --ink:   #0e0e0e;
  --mid:   #666;
  --muted: #aaa;
  --line:  #e5e5e5;
  --f:     'Spectral', Georgia, serif;
  --sc:    'Spectral SC', Georgia, serif;
  --pad:   clamp(1.5rem, 5vw, 4rem);
  --col:   820px;
  --nav-h: 52px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }


/* ── NAV ──────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  gap: 2rem;
}

.nav__name {
  font-family: var(--sc);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 400;
  letter-spacing: .1em;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.8rem);
}

.nav__links a {
  font-family: var(--sc);
  font-size: .58rem;
  font-weight: 300;
  letter-spacing: .18em;
  color: var(--mid);
  white-space: nowrap;
  transition: color .2s;
}

.nav__links a:hover,
.nav__links a.active { color: var(--ink); }

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  flex-direction: column;
  gap: 5px;
}

.nav__toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--ink);
  transition: transform .28s, opacity .28s;
}

.nav__toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


/* ── INDEX layout ─────────────────────────────────────────── */

.index-layout {
  display: grid;
  grid-template-columns: 3fr 1.4fr;
  height: 100vh;
}

.index-photo {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.5rem, 3vh, 3rem) clamp(2rem, 3vw, 3rem);
  overflow: hidden;
}

.index-photo__img {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: .6rem;
  min-height: 0;
}

.index-photo__img img {
  max-width: 48%;
  max-height: 100%;
  width: auto;
  height: auto;
  flex-shrink: 1;
}

.index-photo__credit {
  font-family: var(--sc);
  font-size: .5rem;
  font-weight: 300;
  letter-spacing: .16em;
  color: var(--muted);
}

.index-aside {
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vh, 4rem) clamp(1.5rem, 3vw, 2.5rem) clamp(2rem, 5vh, 4rem) clamp(4rem, 8vw, 6rem);
  gap: 3rem;
}

.index-name {
  font-family: var(--f);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.08;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
}

.index-nav {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.index-nav a {
  font-family: var(--sc);
  font-size: clamp(.72rem, 1.1vw, .88rem);
  font-weight: 300;
  letter-spacing: .18em;
  color: var(--mid);
  transition: color .2s;
}

.index-nav a:hover { color: var(--ink); }

.index-copy {
  font-family: var(--sc);
  font-size: .48rem;
  font-weight: 300;
  letter-spacing: .16em;
  color: #ccc;
}

@media (max-width: 640px) {
  .index-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
    min-height: 100vh;
  }

  .index-photo {
    padding: 1.5rem;
    max-height: 60vh;
  }

  .index-aside {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 2rem 1.5rem;
    gap: 2rem;
  }
}


/* ── PAGES INTÉRIEURES ────────────────────────────────────── */

.page {
  max-width: var(--col);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vh, 5rem) var(--pad);
}

.page-label {
  display: block;
  font-family: var(--sc);
  font-size: .54rem;
  font-weight: 300;
  letter-spacing: .28em;
  color: var(--muted);
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.8rem;
}

/* ── Typographie ──────────────────────────────────────────── */

.lead {
  font-size: clamp(1.1rem, 2.2vw, 1.38rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.68;
  margin-bottom: 2.2rem;
}

.body p {
  font-size: clamp(.9rem, 1.6vw, 1rem);
  font-weight: 300;
  line-height: 1.92;
  color: #444;
  margin-bottom: 1.2rem;
}

.body p:last-child { margin-bottom: 0; }


/* ── LIVRES — grille ──────────────────────────────────────── */

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 3rem 2rem;
}

.book-card {
  cursor: pointer;
}

.book-card__cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--line);
  transition: opacity .2s;
}

.book-card:hover .book-card__cover { opacity: .8; }

.book-card__title {
  margin-top: .8rem;
  font-size: clamp(.82rem, 1.5vw, .92rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.4;
}

.book-card__meta {
  margin-top: .25rem;
  font-family: var(--sc);
  font-size: .52rem;
  font-weight: 300;
  letter-spacing: .12em;
  color: var(--muted);
}

.book-card__desc {
  margin-top: .7rem;
  font-size: .82rem;
  font-weight: 300;
  line-height: 1.65;
  color: #666;
}


/* ── LIVRE — détail ───────────────────────────────────────── */

.book-detail {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3.5rem;
  align-items: start;
}

.book-detail__cover {
  width: 100%;
  box-shadow: 0 4px 24px rgba(0,0,0,.1);
}

.book-detail__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.book-detail__meta {
  font-family: var(--sc);
  font-size: .58rem;
  font-weight: 300;
  letter-spacing: .18em;
  color: var(--muted);
  line-height: 2.2;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.4rem;
}

.book-detail__desc {
  font-size: clamp(.9rem, 1.6vw, 1rem);
  font-weight: 300;
  line-height: 1.9;
  color: #444;
  margin-bottom: 2rem;
}

.book-detail__liens {
  list-style: none;
}

.book-detail__liens li {
  border-bottom: 1px solid var(--line);
}

.book-detail__liens li:first-child { border-top: 1px solid var(--line); }

.book-detail__liens a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: .9rem;
  font-family: var(--sc);
  font-size: .58rem;
  font-weight: 300;
  letter-spacing: .14em;
  color: var(--mid);
  transition: color .2s;
}

.book-detail__liens a:hover { color: var(--ink); }


/* ── PHOTOGRAPHIE — séries ────────────────────────────────── */

.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.serie-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: #111;
}

.serie-card__cover {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: grayscale(1) brightness(.9);
  transition: transform .5s ease, opacity .3s;
  display: block;
}

.serie-card__placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.serie-card:hover .serie-card__cover {
  transform: scale(1.03);
  opacity: .85;
}

.serie-card__label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2rem 1.2rem .9rem;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: #fff;
  font-family: var(--sc);
  font-size: .62rem;
  font-weight: 300;
  letter-spacing: .18em;
}


/* ── SÉRIE — album ────────────────────────────────────────── */

.album-header {
  margin-bottom: 2.5rem;
}

.album-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 300;
  font-style: italic;
  margin-bottom: .6rem;
}

.album-header p {
  font-size: .92rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--mid);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 3px;
}

.album-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(1);
  cursor: pointer;
  transition: opacity .2s;
}

.album-grid img:hover { opacity: .85; }

.album-empty {
  padding: 4rem 0;
  font-family: var(--sc);
  font-size: .58rem;
  font-weight: 300;
  letter-spacing: .2em;
  color: var(--muted);
  text-align: center;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  filter: grayscale(1);
}

.lightbox__close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  font-family: var(--sc);
  font-size: .58rem;
  letter-spacing: .2em;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  background: none;
  border: none;
  transition: color .2s;
}

.lightbox__close:hover { color: #fff; }


/* ── LIENS ────────────────────────────────────────────────── */

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

.liens-list li {
  border-bottom: 1px solid var(--line);
}

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

.lien-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding-block: 1.4rem;
  transition: padding .18s, background .18s;
}

.lien-item:hover {
  padding-inline: .5rem;
  background: #f7f7f7;
}

.lien-item__title {
  font-size: clamp(.95rem, 1.8vw, 1.08rem);
  font-weight: 300;
  font-style: italic;
}

.lien-item__desc {
  font-size: .6rem;
  font-weight: 300;
  color: var(--muted);
  margin-top: .2rem;
  font-style: normal;
}

.lien-item__arrow {
  font-family: var(--sc);
  font-size: .54rem;
  letter-spacing: .12em;
  color: var(--muted);
  flex-shrink: 0;
  transition: color .2s;
}

.lien-item:hover .lien-item__arrow { color: var(--ink); }


/* ── CONTACT ──────────────────────────────────────────────── */

.contact-links {
  list-style: none;
  margin-top: 2rem;
}

.contact-links li { border-bottom: 1px solid var(--line); }
.contact-links li:first-child { border-top: 1px solid var(--line); }

.contact-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.15rem;
  font-size: .85rem;
  font-weight: 300;
  color: var(--mid);
  transition: color .2s, padding .18s;
}

.contact-links a:hover { color: var(--ink); padding-inline: .5rem; }


/* ── FOOTER ───────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem var(--pad);
  margin-top: 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--col);
  margin-inline: auto;
  margin-top: 5rem;
}

.footer span,
.footer a {
  font-family: var(--sc);
  font-size: .5rem;
  font-weight: 300;
  letter-spacing: .18em;
  color: var(--muted);
}

.footer a:hover { color: var(--ink); }


/* ── ADMIN ────────────────────────────────────────────────── */

.admin-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 2rem;
}

.admin-login h1 {
  font-family: var(--sc);
  font-size: .8rem;
  font-weight: 300;
  letter-spacing: .22em;
  color: var(--mid);
}

.admin-login input {
  border: 1px solid var(--line);
  padding: .7rem 1rem;
  font-family: var(--f);
  font-size: .9rem;
  width: 240px;
  outline: none;
  transition: border-color .2s;
}

.admin-login input:focus { border-color: var(--ink); }

.btn {
  font-family: var(--sc);
  font-size: .58rem;
  font-weight: 300;
  letter-spacing: .18em;
  color: var(--bg);
  background: var(--ink);
  border: none;
  padding: .7rem 1.6rem;
  cursor: pointer;
  transition: background .2s;
}

.btn:hover { background: #333; }

.btn-ghost {
  background: none;
  color: var(--mid);
  border: 1px solid var(--line);
}

.btn-ghost:hover { background: #f5f5f5; color: var(--ink); }

.btn-danger {
  background: #c0392b;
}

.btn-danger:hover { background: #a93226; }

.admin-panel {
  max-width: 860px;
  margin-inline: auto;
  padding: 3rem var(--pad) 6rem;
}

.admin-panel h1 {
  font-family: var(--sc);
  font-size: .72rem;
  font-weight: 300;
  letter-spacing: .22em;
  color: var(--mid);
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
  overflow-x: auto;
}

.admin-tab {
  font-family: var(--sc);
  font-size: .56rem;
  font-weight: 300;
  letter-spacing: .18em;
  color: var(--muted);
  padding: .8rem 1.2rem;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .2s;
}

.admin-tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-section h2 {
  font-family: var(--sc);
  font-size: .62rem;
  font-weight: 300;
  letter-spacing: .18em;
  color: var(--mid);
  margin-bottom: 1.5rem;
}

.field {
  margin-bottom: 1.2rem;
}

.field label {
  display: block;
  font-family: var(--sc);
  font-size: .52rem;
  font-weight: 300;
  letter-spacing: .16em;
  color: var(--muted);
  margin-bottom: .4rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  padding: .6rem .8rem;
  font-family: var(--f);
  font-size: .92rem;
  font-weight: 300;
  outline: none;
  background: #fff;
  transition: border-color .2s;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--ink); }

.field textarea { min-height: 100px; }

.admin-card {
  border: 1px solid var(--line);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}

.admin-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-card__head h3 {
  font-size: .92rem;
  font-weight: 300;
  font-style: italic;
}

.admin-card__actions {
  display: flex;
  gap: .6rem;
  flex-shrink: 0;
}

.admin-bar {
  display: flex;
  gap: .8rem;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.admin-msg {
  font-family: var(--sc);
  font-size: .54rem;
  letter-spacing: .16em;
  color: var(--muted);
  padding: .5rem 0;
}

.admin-msg.ok { color: #2a7a2a; }
.admin-msg.err { color: #c0392b; }

.preview-img {
  height: 80px;
  width: auto;
  margin-top: .4rem;
  border: 1px solid var(--line);
  object-fit: cover;
}


/* ── RESPONSIVE ───────────────────────────────────────────── */

@media (max-width: 640px) {
  .nav__toggle { display: flex; }

  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem var(--pad);
    gap: 0;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    border-top: 1px solid var(--line);
    z-index: 49;
  }

  .nav__links.open { transform: none; }

  .nav__links a {
    font-size: .8rem;
    letter-spacing: .14em;
    color: var(--ink);
    padding-block: 1rem;
    border-bottom: 1px solid var(--line);
    width: 100%;
    display: block;
  }

  .nav__links a:last-child { border-bottom: none; }

  .book-detail { grid-template-columns: 1fr; }
  .book-detail__cover { max-width: 180px; }

  .footer { flex-direction: column; }
}
