/* ------------------------------------------------------
   Global variables
   ------------------------------------------------------ */
:root {
  --bg-dark: #060915;
  --bg-light: #f7f7fa;
  --accent: #f4b124;
  --text-main: #f5f5f7;
  --text-muted: #999fb4;
  --text-dark: #1d2130;
  --border-soft: rgba(255, 255, 255, 0.08);
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.5);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
}

.container {
  width: min(1200px, 90vw);
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section h2 {
  font-size: 2.3rem;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* ------------------------------------------------------
   Header and navigation
   ------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.logo {
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.08em;
}
.logo a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem; /* same as before */
}

.logo a:hover {
  color: var(--accent); /* the golden accent color */
}

.main-nav a {
  margin-left: 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: #fff;
}

/* ------------------------------------------------------
   Hero section
   ------------------------------------------------------ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 550px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;

  background-image: url("https://static.wixstatic.com/media/3ac46f_c3b6b6e10438460b86249392ab90eedb~mv2.jpg");
  background-attachment: fixed;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(6, 9, 21, 0.85), rgba(6, 9, 21, 0.5));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
  padding-top: 60px;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.8rem;
}

.btn-primary {
  border: none;
  background: var(--accent);
  color: #1a1307;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 8px 18px rgba(244, 177, 36, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(244, 177, 36, 0.4);
}

/* ------------------------------------------------------
   Featured books carousel
   ------------------------------------------------------ */
.featured-swiper {
  margin-top: 32px;
  padding-bottom: 40px;
}

.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 28px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

/* fixed-size cover frame (featured) */
.featured-cover-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-cover-frame {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-meta h3 {
  font-size: 1.3rem;
  margin-top: 2px;
  color: var(--accent);
}

.book-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

/* debug display for Highlight in Livres récents */
.highlight-debug {
  font-size: 0.8rem;
  color: #7f849c;
  margin-bottom: 0.6rem;
}

.featured-meta p {
  color: var(--text-main);
}

.featured-link {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.featured-link:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------
   Parallax (fixed background) strips
   ------------------------------------------------------ */
.parallax-strip {
  position: relative;
  padding: 80px 0;
  color: white;

  background-image: url("https://static.wixstatic.com/media/3ac46f_c3b6b6e10438460b86249392ab90eedb~mv2.jpg");
  background-attachment: fixed;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* overlay for readability */
.parallax-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6, 9, 21, 0.75),
    rgba(6, 9, 21, 0.55)
  );
  pointer-events: none;
}

.parallax-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
}

.parallax-content h3 {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.parallax-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
}

/* ------------------------------------------------------
   Catalog grid (all books)
   ------------------------------------------------------ */
.catalog-controls {
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.catalog-controls select {
  margin-left: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 10, 24, 0.8);
  color: var(--text-main);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

/* book card base + fade-in animation */
.book-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.book-card--hidden {
  opacity: 0;
  transform: translateY(24px);
}

/* fixed-size cover frame (grid) */
.book-cover-frame {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.book-cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-card h3 {
  font-size: 1.05rem;
  color: var(--accent);
  margin: 6px 0;
}

.book-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.book-card a {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
}

.book-card a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------
   About section
   ------------------------------------------------------ */
.section-light {
  background: var(--bg-light);
  color: var(--text-dark);
}

.about-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.about-photo img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-photo img:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.about-text {
  flex: 1 1 400px;
  max-width: 600px;
}

.quote {
  font-style: italic;
  margin-top: 14px;
  color: #444a63;
}

/* ------------------------------------------------------
   Footer
   ------------------------------------------------------ */
.site-footer {
  background: #050712;
  color: var(--text-muted);
  padding: 20px 0 26px;
  text-align: center;
}

/* ------------------------------------------------------
   Page transition overlay
   ------------------------------------------------------ */
.page-transition {
  position: fixed;
  inset: 0;
  background: #060915;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 999;
}

.page-transition.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* ------------------------------------------------------
   Clickable cover hover effects
   ------------------------------------------------------ */
.book-cover-link,
.featured-cover-link {
  display: block;
}

.book-cover-link img,
.featured-cover-link img {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.book-cover-link:hover img,
.featured-cover-link:hover img {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

/* ------------------------------------------------------
   Book detail page
   ------------------------------------------------------ */
.book-detail-main {
  padding-top: 80px;
}

.book-detail-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  padding: 60px 0;
}

.book-detail-cover img {
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.book-detail-meta {
  flex: 1 1 360px;
}

.book-detail-title {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.book-detail-date {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.book-detail-abstract {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.book-detail-publisher {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.book-detail-publisher:hover {
  text-decoration: underline;
}

.book-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}

.book-detail-back:hover {
  color: #ffffff;
}

/* ------------------------------------------------------
   Responsive adjustments
   ------------------------------------------------------ */
@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .featured-cover-wrap {
    justify-content: center;
  }

  .featured-cover-frame {
    max-width: 220px;
  }

  .books-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .books-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .parallax-strip {
    background-attachment: scroll; /* smoother on phones */
  }

  .about-photo img {
    width: 180px;
    height: 180px;
  }

  .about-layout {
    text-align: center;
  }

  .about-text {
    max-width: 100%;
  }

  .book-detail-layout {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }
}

/* ---- nav dropdown ---- */
.nav-dropdown {
  position: relative;
  display: inline-block;
  margin-left: 24px;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.nav-dropdown-toggle:hover {
  color: #fff;
}

.nav-dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  min-width: 220px;
  background: rgba(5, 7, 18, 0.97);
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  padding: 8px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 30;
}



.nav-dropdown-menu a {
  display: block;
  padding: 8px 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* menu is shown when .nav-dropdown has the .open class */
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}


/* ---- publications pages ---- */
.publications-hero {
  padding-top: 80px;
  padding-bottom: 40px;
  background: radial-gradient(circle at top, #101322, #060915);
}

.publications-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.publications-hero p {
  color: var(--text-muted);
  max-width: 700px;
}

.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pub-filters select,
.pub-filters input[type="search"] {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 10, 24, 0.9);
  color: var(--text-main);
  font-size: 0.9rem;
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pub-year-group {
  border-left: 2px solid rgba(244, 177, 36, 0.4);
  padding-left: 16px;
}

.pub-year-heading {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.pub-item {
  margin-bottom: 10px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.pub-item--hidden {
  opacity: 0;
  transform: translateY(16px);
}

.pub-item-title {
  font-weight: 600;
}

.pub-item-outlet {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .pub-filters {
    flex-direction: column;
    align-items: flex-start;
  }
}

