/*
Theme Name: Alban Cambe Naturaliste
Theme URI: https://albancambe.com
Author: Alban Cambe
Author URI: https://albancambe.com
Description: Thème personnel auteur naturaliste — Éditions SOLAR
Version: 3.0.0
Text Domain: alban-cambe
*/

/* ── VARIABLES ──────────────────────────────────────────────────────────── */
:root {
  --forest:    #1E3A1E;
  --moss:      #3D6B3D;
  --sage:      #7A9E7A;
  --gold:      #C4923A;
  --gold-dark: #A87830;
  --parchment: #F4EFE4;
  --cream:     #FDFAF4;
  --bark:      #5C3D1E;
  --stone:     #8A8070;
  --charcoal:  #1A1A18;
  --ink:       #2A2820;
  --mist:      #E8E4DA;
  --white:     #FFFEF9;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body:  'Crimson Pro', Georgia, serif;
  --font-mono:  'DM Mono', 'Courier New', monospace;
  --radius: 2px;
  --ease: 0.25s ease;
  --max-w: 1100px;
  --gap: 48px;
}

/* ── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── BASE ───────────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { font-family: var(--font-serif); font-weight: 700; color: var(--forest); line-height: 1.1; }
h1 { font-size: clamp(36px,5vw,56px); }
h2 { font-size: clamp(26px,3.5vw,38px); }
h3 { font-size: 18px; }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ── LAYOUT ─────────────────────────────────────────────────────────────── */
.site-wrapper { background: var(--white); }
.inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gap); }

/* ── UTILS ──────────────────────────────────────────────────────────────── */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 10px;
}
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all var(--ease);
  cursor: pointer;
  white-space: nowrap;
  border: none;
}
.btn-gold   { background: var(--gold); color: var(--charcoal); }
.btn-gold:hover { background: var(--gold-dark); color: var(--charcoal); }
.btn-forest { background: var(--forest); color: var(--white); }
.btn-forest:hover { background: var(--moss); color: var(--white); }
.btn-outline { background: transparent; color: var(--forest); border: 1px solid var(--forest); }
.btn-outline:hover { background: var(--forest); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.35); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.divider { border: none; border-top: 1px solid var(--mist); margin: 0; }
.sec-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 48px; }
.sec-link {
  font-family: var(--font-mono); font-size: 11px; color: var(--moss);
  letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--sage); padding-bottom: 2px;
  transition: color var(--ease); flex-shrink: 0;
}
.sec-link:hover { color: var(--forest); }

/* ══════════════════════════════════════════════════════════════
   HEADER / NAV
══════════════════════════════════════════════════════════════ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--mist);
  position: sticky; top: 0; z-index: 200;
  transition: box-shadow var(--ease);
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(30,58,30,.10); }
.nav-wrap {
  max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gap);
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 20px;
}
.nav-logo { flex-shrink: 0; }
.nav-logo-name {
  display: block; font-family: var(--font-serif); font-size: 19px;
  font-weight: 600; color: var(--forest); line-height: 1.1;
}
.nav-logo-sub {
  display: block; font-family: var(--font-mono); font-size: 9px;
  color: var(--stone); letter-spacing: .12em; text-transform: uppercase; margin-top: 2px;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  position: relative; transition: color var(--ease); white-space: nowrap;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--moss); transition: width .3s;
}
.nav-links a:hover { color: var(--forest); }
.nav-links a:hover::after { width: 100%; }
.nav-links .ext::after { content: ' ↗'; font-size: 10px; opacity: .5; }
.nav-cta {
  background: var(--forest); color: var(--white);
  padding: 9px 20px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase;
  transition: background var(--ease); flex-shrink: 0;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--moss); color: var(--white); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  padding: 4px; cursor: pointer; background: none; border: none;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--forest); border-radius: 2px; transition: all .3s;
}

/* ══════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */
.hero { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.hero-left {
  background: var(--forest); padding: 80px var(--gap);
  display: flex; flex-direction: column; justify-content: center;
  min-height: 0;
}
.hero-eyebrow { font-family: var(--font-mono); font-size: 10px; color: var(--sage); letter-spacing: .18em; text-transform: uppercase; margin-bottom: 20px; }
.hero-name { font-family: var(--font-serif); font-size: clamp(40px,5vw,58px); font-weight: 700; color: var(--white); line-height: 1.0; margin-bottom: 10px; }
.hero-subtitle { font-family: var(--font-serif); font-size: 18px; font-weight: 400; font-style: italic; color: var(--sage); margin-bottom: 28px; }
.hero-tagline { font-family: var(--font-body); font-size: 19px; color: rgba(244,239,228,.85); line-height: 1.55; margin-bottom: 32px; border-left: 3px solid var(--gold); padding-left: 18px; }
.hero-creds { display: flex; gap: 24px; align-items: center; margin-bottom: 36px; }
.cred { text-align: center; }
.cred-n { font-family: var(--font-serif); font-size: 30px; font-weight: 700; color: var(--gold); line-height: 1; }
.cred-l { font-family: var(--font-mono); font-size: 9px; color: var(--sage); letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
.cred-sep { width: 1px; height: 36px; background: rgba(122,158,122,.3); }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-right { position: relative; overflow: hidden; background: var(--moss); }
.hero-right img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
}
.hero-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(160deg,rgba(30,58,30,.2) 0%,transparent 50%),
              linear-gradient(to bottom,transparent 55%,rgba(30,58,30,.65) 100%);
}
.hero-badge {
  position: absolute; bottom: 24px; right: 24px;
  background: var(--parchment); padding: 12px 16px;
  border-radius: var(--radius); box-shadow: 0 4px 20px rgba(0,0,0,.18);
  text-align: center; line-height: 1.7;
}
.hero-badge-pub { font-family: var(--font-mono); font-size: 9px; color: var(--stone); letter-spacing: .14em; text-transform: uppercase; }
.hero-badge-titles { font-family: var(--font-serif); font-size: 12px; color: var(--forest); font-style: italic; }

/* ══════════════════════════════════════════════════════════════
   MEDIA BAR
══════════════════════════════════════════════════════════════ */
.media-bar { background: var(--parchment); border-top: 1px solid var(--mist); border-bottom: 1px solid var(--mist); padding: 18px var(--gap); }
.media-bar-inner { max-width: var(--max-w); margin: 0 auto; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.media-label { font-family: var(--font-mono); font-size: 9px; color: var(--stone); letter-spacing: .15em; text-transform: uppercase; white-space: nowrap; flex-shrink: 0; }
.media-sep { width: 1px; height: 22px; background: var(--mist); flex-shrink: 0; }
.media-logos { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; flex: 1; }
.media-logo { font-family: var(--font-serif); font-size: 13px; font-weight: 600; color: var(--stone); opacity: .6; transition: opacity var(--ease); letter-spacing: .03em; white-space: nowrap; }
.media-logo:hover { opacity: 1; }
.media-logo.mono { font-family: var(--font-mono); font-size: 12px; font-weight: 400; }

/* ══════════════════════════════════════════════════════════════
   LIVRES VEDETTE (accueil)
══════════════════════════════════════════════════════════════ */
.sec-livres { padding: 88px var(--gap); background: var(--white); }
.books-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px 32px; }
.book-card { display: flex; flex-direction: column; }

/* Couverture : hauteur fixe, image contenue sans coupure */
.book-cover {
  height: 320px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
  background: var(--forest);
  box-shadow: 3px 5px 18px rgba(30,58,30,.13), 0 2px 5px rgba(0,0,0,.07);
  transition: transform var(--ease), box-shadow var(--ease);
}
.book-card:hover .book-cover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 6px 12px 30px rgba(30,58,30,.22), 0 4px 10px rgba(0,0,0,.12);
}
/* L'image est contenue (contain) pour ne jamais être coupée */
.book-cover img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center center;
  padding: 8px;
  background: var(--forest);
  transition: transform var(--ease);
}
.book-card:hover .book-cover img { transform: scale(1.04); }
.book-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--gold); color: var(--charcoal);
  font-family: var(--font-mono); font-size: 8px;
  padding: 3px 7px; letter-spacing: .1em; text-transform: uppercase;
  border-radius: var(--radius);
}
.book-info { flex: 1; display: flex; flex-direction: column; }
.book-title { font-family: var(--font-serif); font-size: 17px; font-weight: 600; color: var(--forest); line-height: 1.25; margin-bottom: 8px; }
.book-promise { font-family: var(--font-body); font-size: 14px; font-style: italic; color: var(--stone); line-height: 1.5; margin-bottom: 12px; flex: 1; }
.book-meta { font-family: var(--font-mono); font-size: 9px; color: var(--sage); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }

/* ══════════════════════════════════════════════════════════════
   NEWSLETTER
══════════════════════════════════════════════════════════════ */
.sec-nl { background: var(--forest); padding: 80px var(--gap); }
.nl-inner { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1fr; gap: 72px; align-items: center; }
.nl-eyebrow { font-family: var(--font-mono); font-size: 10px; color: var(--sage); letter-spacing: .18em; text-transform: uppercase; margin-bottom: 16px; }
.nl-title { font-family: var(--font-serif); font-size: clamp(26px,3.5vw,36px); font-weight: 700; color: var(--white); line-height: 1.1; margin-bottom: 16px; }
.nl-title em { font-style: italic; color: var(--gold); }
.nl-sub { font-family: var(--font-body); font-size: 18px; color: rgba(244,239,228,.72); line-height: 1.5; margin-bottom: 24px; }
.nl-feats { display: flex; gap: 20px; flex-wrap: wrap; }
.nl-feat { font-family: var(--font-mono); font-size: 10px; color: var(--sage); letter-spacing: .08em; display: flex; align-items: center; gap: 6px; }
.nl-feat::before { content: '○'; color: var(--gold); font-size: 8px; }
.nl-box { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 4px; padding: 32px; }
.nl-box-label { font-family: var(--font-mono); font-size: 9px; color: var(--sage); letter-spacing: .15em; text-transform: uppercase; margin-bottom: 14px; opacity: .7; }
.nl-quote { font-family: var(--font-body); font-size: 16px; font-style: italic; color: rgba(244,239,228,.82); line-height: 1.6; margin-bottom: 24px; padding-left: 14px; border-left: 2px solid var(--gold); }
.nl-btn { display: block; text-align: center; margin-bottom: 10px; }
.nl-note { font-family: var(--font-mono); font-size: 9px; color: var(--sage); text-align: center; opacity: .55; letter-spacing: .06em; }

/* ══════════════════════════════════════════════════════════════
   BIO
══════════════════════════════════════════════════════════════ */
.sec-bio { padding: 88px var(--gap); background: var(--parchment); }
.bio-inner { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 300px 1fr; gap: 72px; align-items: start; }
.bio-photo { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/4; background: var(--moss); box-shadow: 0 4px 20px rgba(30,58,30,.1); }
.bio-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.bio-photo-cap { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top,rgba(30,58,30,.88),transparent); padding: 40px 18px 16px; font-family: var(--font-mono); font-size: 9px; color: rgba(255,255,255,.5); letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.bio-quote { font-family: var(--font-serif); font-size: clamp(19px,2.2vw,25px); font-weight: 400; font-style: italic; color: var(--forest); line-height: 1.35; margin-bottom: 20px; }
.bio-text { font-family: var(--font-body); font-size: 17px; color: var(--ink); line-height: 1.7; }
.bio-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 30px 0; padding: 26px 0; border-top: 1px solid var(--mist); border-bottom: 1px solid var(--mist); }
.stat-n { font-family: var(--font-serif); font-size: 34px; font-weight: 700; color: var(--forest); line-height: 1; }
.stat-l { font-family: var(--font-mono); font-size: 9px; color: var(--stone); letter-spacing: .1em; text-transform: uppercase; margin-top: 5px; }
.bio-link { font-family: var(--font-mono); font-size: 11px; color: var(--forest); letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid var(--moss); padding-bottom: 2px; transition: color var(--ease); }
.bio-link:hover { color: var(--moss); }

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.site-footer { background: var(--charcoal); padding: 56px var(--gap) 32px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-logo { font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--white); margin-bottom: 10px; }
.footer-tagline { font-family: var(--font-body); font-size: 14px; font-style: italic; color: rgba(255,255,255,.38); line-height: 1.55; margin-bottom: 22px; }
.footer-socials { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-socials a { font-family: var(--font-mono); font-size: 10px; color: rgba(255,255,255,.38); letter-spacing: .08em; text-transform: uppercase; transition: color var(--ease); }
.footer-socials a:hover { color: var(--gold); }
.footer-col-title { font-family: var(--font-mono); font-size: 9px; color: var(--sage); letter-spacing: .18em; text-transform: uppercase; margin-bottom: 18px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-family: var(--font-body); font-size: 14px; color: rgba(255,255,255,.45); transition: color var(--ease); }
.footer-links a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-family: var(--font-mono); font-size: 10px; color: rgba(255,255,255,.22); letter-spacing: .06em; }

/* ══════════════════════════════════════════════════════════════
   PAGE LIVRES (grille complète)
══════════════════════════════════════════════════════════════ */
.page-hero { background: var(--forest); padding: 60px var(--gap) 52px; }
.page-hero .eyebrow { color: var(--sage); }
.page-hero h1 { color: var(--white); font-size: clamp(28px,4vw,44px); }
.page-body { max-width: var(--max-w); margin: 0 auto; padding: 60px var(--gap); }
.page-body p { font-family: var(--font-body); font-size: 17px; line-height: 1.7; }

.livres-page { padding: 72px var(--gap); background: var(--white); }
.livres-page .inner { max-width: var(--max-w); margin: 0 auto; padding: 0; }

/* Filtre par éditeur */
.livres-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 48px; }
.filter-btn {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; padding: 7px 16px; border-radius: 20px;
  border: 1px solid var(--mist); background: transparent; color: var(--stone);
  cursor: pointer; transition: all var(--ease);
}
.filter-btn:hover, .filter-btn.active { background: var(--forest); color: var(--white); border-color: var(--forest); }

.livres-grid-full { display: grid; grid-template-columns: repeat(3,1fr); gap: 52px 32px; }
.livre-card { display: flex; flex-direction: column; }
.livre-cover-wrap {
  height: 300px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  background: var(--forest);
  box-shadow: 3px 5px 18px rgba(30,58,30,.13), 0 2px 5px rgba(0,0,0,.07);
  transition: transform var(--ease), box-shadow var(--ease);
}
.livre-card:hover .livre-cover-wrap {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 6px 12px 28px rgba(30,58,30,.20), 0 4px 10px rgba(0,0,0,.1);
}
.livre-cover-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
  background: var(--forest);
  transition: transform var(--ease);
}
.livre-card:hover .livre-cover-wrap img { transform: scale(1.04); }
.livre-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(135deg, var(--forest), var(--moss));
}
.livre-cover-placeholder span { font-family: var(--font-serif); font-size: 14px; color: rgba(255,255,255,.7); text-align: center; line-height: 1.4; }
.livre-badge { position: absolute; top: 10px; right: 10px; background: var(--gold); color: var(--charcoal); font-family: var(--font-mono); font-size: 8px; padding: 3px 7px; letter-spacing: .1em; text-transform: uppercase; border-radius: var(--radius); }
.livre-info { flex: 1; display: flex; flex-direction: column; }
.livre-title { font-family: var(--font-serif); font-size: 16px; font-weight: 600; color: var(--forest); line-height: 1.25; margin-bottom: 7px; }
.livre-promise { font-family: var(--font-body); font-size: 14px; font-style: italic; color: var(--stone); line-height: 1.5; margin-bottom: 10px; flex: 1; }
.livre-editor { font-family: var(--font-mono); font-size: 9px; color: var(--sage); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.livres-note { background: var(--parchment); border-top: 1px solid var(--mist); padding: 24px var(--gap); text-align: center; }
.livres-note p { font-family: var(--font-body); font-size: 15px; color: var(--stone); margin: 0; }
.livres-note a { color: var(--moss); border-bottom: 1px solid var(--sage); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  :root { --gap: 28px; }
  .hero { grid-template-columns: 1fr; }
  .hero-right { min-height: 320px; order: -1; }
  .books-grid { grid-template-columns: repeat(2,1fr); }
  .nl-inner { grid-template-columns: 1fr; gap: 40px; }
  .bio-inner { grid-template-columns: 1fr; }
  .bio-photo { max-width: 260px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .livres-grid-full { grid-template-columns: repeat(2,1fr); gap: 40px 24px; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; background: var(--white);
    padding: 24px var(--gap); border-bottom: 1px solid var(--mist);
    box-shadow: 0 8px 32px rgba(0,0,0,.08); gap: 20px; z-index: 199;
  }
  .nav-links.open { display: flex; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 560px) {
  :root { --gap: 20px; }
  .books-grid, .livres-grid-full { grid-template-columns: 1fr; max-width: 300px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-creds { gap: 14px; }
  .sec-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .bio-photo { max-width: 220px; }
}
