:root {
  --ink: #171310;
  --ink-soft: #4a4038;
  --cream: #fdfaf4;
  --paper: #f7f2e9;
  --line: #e6ddcd;
  --accent: #a4552e;
  --accent-dark: #7e3f20;
  --gold: #b8863b;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(23, 19, 16, .18);
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 550; line-height: 1.15; }

.muted { color: var(--ink-soft); opacity: .75; font-size: .92rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: .8rem; padding-bottom: .8rem; }
.brand { display: flex; align-items: center; gap: .65rem; }
.brand-word { font-family: var(--font-serif); font-size: 1.45rem; letter-spacing: -.02em; font-weight: 600; }
.brand-word.small { font-size: 1.15rem; }
.brand-mirror { color: var(--accent); font-style: italic; }
.site-nav { display: flex; align-items: center; gap: 1.6rem; font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--accent); }
.nav-search { display: inline-flex; align-items: center; }
.lang-switch { display: inline-flex; gap: .3rem; font-size: .8rem; letter-spacing: .05em; color: var(--ink-soft); }
.lang-switch a.on { color: var(--accent); font-weight: 600; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 60%),
    radial-gradient(900px 420px at 10% 110%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 5.5rem 0 4rem;
  text-align: center;
}
.hero-eyebrow { text-transform: uppercase; letter-spacing: .35em; font-size: .72rem; color: var(--accent); font-weight: 600; margin-bottom: 1.4rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub { max-width: 620px; margin: 1.5rem auto 2.2rem; font-size: 1.08rem; color: var(--ink-soft); }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 3rem; justify-content: center; margin-top: 3.2rem; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-serif); font-size: 2rem; color: var(--accent-dark); }
.hero-stats span { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); }

/* ---------- boutons ---------- */
.btn {
  display: inline-block; padding: .8rem 1.7rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; transition: all .2s ease; border: 1.5px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- sections ---------- */
.section { padding: 4rem 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2rem; }
.section-head h2 { font-size: 1.8rem; }
.link-more { color: var(--accent); font-weight: 600; font-size: .92rem; }
.link-more:hover { text-decoration: underline; }

.page-head { background: var(--paper); border-bottom: 1px solid var(--line); padding: 3.2rem 0 2.4rem; }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); }

/* ---------- grilles & cartes ---------- */
.grid { display: grid; gap: 1.6rem; }
.grid-books { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.grid-authors { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid-publishers { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.card { transition: transform .2s ease; }
.card:hover { transform: translateY(-4px); }
.card h3 { font-size: 1.02rem; margin-top: .7rem; }
.card:hover h3 { color: var(--accent); }

.cover {
  aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow); background: var(--paper); border: 1px solid var(--line);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 1rem; text-align: center;
  background: linear-gradient(155deg, var(--paper), color-mix(in srgb, var(--gold) 20%, var(--paper)));
}
.cover-placeholder span { font-family: var(--font-serif); font-style: italic; font-size: .95rem; color: var(--ink-soft); }
.cover-placeholder.large span { font-size: 1.3rem; }
.isbn { font-size: .74rem; color: var(--ink-soft); opacity: .6; letter-spacing: .04em; margin-top: .15rem; }

.card-author { text-align: center; }
.avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto; box-shadow: var(--shadow); }
.avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 2.4rem; color: var(--cream);
  background: linear-gradient(140deg, var(--accent), var(--gold));
}
.avatar.xl { width: 150px; height: 150px; font-size: 3.2rem; flex-shrink: 0; }

.card-publisher { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.pub-logo { max-height: 54px; width: auto; object-fit: contain; margin-bottom: .8rem; }
.pub-logo.xl { max-height: 90px; }

/* ---------- fiches détail ---------- */
.breadcrumb { font-size: .85rem; color: var(--ink-soft); margin-bottom: 2.2rem; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { opacity: .7; }

.book-detail { display: grid; grid-template-columns: 300px 1fr; gap: 3.5rem; align-items: start; }
.book-cover { position: sticky; top: 90px; }
.book-cover img, .book-cover .cover-placeholder { border-radius: 10px; box-shadow: var(--shadow); }
.book-cover .cover-placeholder { aspect-ratio: 2/3; border: 1px solid var(--line); }
.book-info h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .4rem; }
.subtitle { font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); margin-bottom: .6rem; }
.byline { font-size: 1.05rem; margin-bottom: 1.4rem; }
.byline a { color: var(--accent); font-weight: 600; border-bottom: 1px solid transparent; }
.byline a:hover { border-color: var(--accent); }
.prose { max-width: 62ch; color: var(--ink-soft); margin-bottom: 1.8rem; }
.prose.bio { margin-top: 1.8rem; }

.meta-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.meta-list dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 600; }
.meta-list dd { font-size: .98rem; }
.meta-list dd a { color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--line); }
.meta-list dd a:hover { color: var(--accent); border-color: var(--accent); }

.profile-head { display: flex; gap: 2.2rem; align-items: center; }
.profile-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.ext { color: var(--accent); font-weight: 500; font-size: .92rem; }
.ext:hover { text-decoration: underline; }

/* ---------- recherche ---------- */
.search-form { display: flex; gap: .8rem; max-width: 560px; margin-top: 1.4rem; }
.search-form input {
  flex: 1; padding: .8rem 1.2rem; border: 1.5px solid var(--line); border-radius: 999px;
  font: inherit; background: #fff; outline: none;
}
.search-form input:focus { border-color: var(--accent); }
.search-form .btn { border: none; cursor: pointer; font-family: inherit; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 3rem 0; }
.notfound-code { font-family: var(--font-serif); font-size: 6rem; font-weight: 300; color: var(--accent); opacity: .35; line-height: 1; }
.notfound h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: .5rem 0 1rem; }
.notfound .hero-actions { margin-top: 2rem; }

.empty-state { text-align: center; padding: 3rem 0; color: var(--ink-soft); font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); margin-top: 2rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.6rem 1.5rem; flex-wrap: wrap; }
.footer-brand p { font-size: .85rem; opacity: .65; margin-top: .2rem; }
.footer-nav { display: flex; gap: 1.6rem; font-size: .9rem; }
.footer-nav a { opacity: .8; }
.footer-nav a:hover { opacity: 1; color: var(--gold); }
.footer-copy { font-size: .8rem; opacity: .5; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .site-nav { gap: 1rem; font-size: .88rem; }
  .book-detail { grid-template-columns: 1fr; gap: 2rem; }
  .book-cover { position: static; max-width: 240px; margin: 0 auto; }
  .profile-head { flex-direction: column; text-align: center; gap: 1.2rem; }
  .hero-stats { gap: 1.8rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}
