/* Variables globales */
:root {
  --bg: #0a0a0a;
  --text: #e8e8e8;
  --accent: #d4af37; /* or ancien */
  --accent-dark: #b8962e;
  --card-bg: #111111;
  --overlay: rgba(10, 10, 10, 0.55); /* pour hero lisible */
}
/* Styles de base */
body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
body.en {
  font-family: 'Open Sans', sans-serif; /* même police pour l'anglais */
}
/* Bouton switch langue */
#lang-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
  background: var(--accent);
  color: #000;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  padding: 1rem 2rem;
  z-index: 1000;
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  position: relative; /* important pour positionner le menu mobile */
}
.logo {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  color: var(--accent);
  font-weight: 700;
}
/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}
.hamburger span {
  width: 100%;
  height: 3px;
  background: var(--text); /* change en var(--accent) si tu veux or */
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}
/* Liens de navigation (desktop par défaut) */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  transition: all 0.4s ease;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}
.nav-links a:hover {
  color: var(--accent);
}
/* Hero section */
.hero {
  position: relative;
  height: 90vh;
  min-height: 600px;
  max-width: 100%;
  background: url('images/amours-3-v3.png') center/cover no-repeat fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.65); /* overlay plus foncé pour meilleure lisibilité */
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 2rem;
}
.hero h1 {
  font-size: clamp(2.0rem, 5.5vw, 4.0rem); /* Réduit la taille min, moyenne et max */
  margin: 0 0 1.5rem;
  color: var(--accent);
  text-shadow: 0 4px 12px rgba(0,0,0,0.7);
}
.tagline {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  margin: 0 0 2.5rem;
  opacity: 0.9;
}
.cta-button {
  background: var(--accent);
  color: #000;
  padding: 1rem 2.2rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  font-size: 1.2rem;
  transition: all 0.3s;
}
.cta-button:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
}
/* Sections intro + cards */
.intro {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
/* Sections intro + cards */
.section {
  padding-right: 2rem;
  padding-left: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}
.card {
  background: var(--card-bg);
  border: 1px solid #222;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(212,175,55,0.12);
}
.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.card h3 {
  font-family: 'Cardo', serif;
  color: var(--accent);
  margin: 1.2rem 1.5rem 0.8rem;
}
.card p {
  padding: 0 1.5rem 1.5rem;
}
/* Newsletter */
.newsletter {
  text-align: center;
  padding: 6rem 2rem;
  background: linear-gradient(to bottom, #111, #0a0a0a);
}
.newsletter h2 {
  font-family: 'Cinzel', serif;
  color: var(--accent);
  margin-bottom: 1rem;
}
.newsletter form {
  margin-top: 2rem;
}
.newsletter input {
  padding: 0.9rem;
  width: 280px;
  max-width: 100%;
  border: 1px solid #444;
  border-radius: 4px 0 0 4px;
  background: #1a1a1a;
  color: white;
}
.newsletter button {
  padding: 0.9rem 1.8rem;
  background: var(--accent);
  border: none;
  color: #000;
  font-weight: bold;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background 0.3s;
}
.newsletter button:hover {
  background: var(--accent-dark);
}
/* Footer */
footer {
  text-align: center;
  padding: 3rem 2rem;
  background: #000;
  font-size: 0.95rem;
  opacity: 0.7;
}
.socials a {
  color: var(--text);
  margin: 0 1rem;
  text-decoration: none;
}
.socials a:hover {
  color: var(--accent);
}
/* Responsive & Hamburger mobile */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.95);
    padding: 2rem 1rem;
    gap: 1.5rem;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-links li a {
    font-size: 1.3rem;
    padding: 0.8rem;
    display: block;
    text-align: center;
  }
  .navbar {
    padding: 1rem;
  }
  .hero {
    height: 70vh;
    min-height: 500px;
  }
}
/* Optionnel : centrage du tagline intermédiaire */
.centered-tagline {
  text-align: center;
  padding: 2rem 1rem;
  font-style: italic;
  opacity: 0.85;
}


.products-section {
    padding: 6rem 2rem;
    background: linear-gradient(to bottom, #111, #0a0a0a);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-family: 'Cinzel', serif;
    color: var(--accent);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 800px;
    margin: 0 auto;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.book-card {
    background: var(--card-bg);
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(212,175,55,0.2);
}

.book-cover {
    height: 300px;
    overflow: hidden;
    position: relative;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.book-info h3 {
    font-family: 'Cinzel', serif;
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.book-info p {
    opacity: 0.9;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.book-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--accent);
    color: #000;
}


.featured {
    border: 2px solid var(--accent);
    background: linear-gradient(135deg, var(--card-bg), #1a1a1a);
    position: relative;
    overflow: hidden;
}

.featured::before {
    content: "🔥";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    color: var(--accent);
}

.post-category {
    background: rgba(212,175,55,0.2);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.book-showcase {
    text-align: center;
    margin: 2rem 0;
}

.purchase-links {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    transition: all 0.4s ease;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Pour les liens actifs */
.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active::after {
    width: 100%;
}

/* Pour le badge "Base documentaire de la saga" */
.featured-badge {
  background: linear-gradient(135deg, var(--accent-dark), #8b6f1e);
  color: #000;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(212,175,85,0.3);
}

/* Sous-titre plus discret sous le titre principal */
.book-info h4.subtitle {
  font-family: 'Cardo', serif;
  color: var(--text);
  opacity: 0.85;
  font-size: 1.1rem;
  margin: -0.5rem 0 1.2rem 0;
  font-style: italic;
}

/* Amélioration responsive pour les descriptions longues */
@media (max-width: 480px) {
  .book-info p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}


.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));  /* 220-240px idéal pour les couvertures portrait */
    gap: 2.5rem 3rem;  /* un peu plus d'espace vertical pour respirer */
    justify-items: center;  /* centre les cartes si elles sont plus étroites */
}

.book-card {
    max-width: 280px;           /* limite max pour éviter que ça s'étire trop sur grand écran */
    background: var(--card-bg);
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;               /* force les cartes à même hauteur si besoin */
}

.book-cover {
    width: 100%;
    aspect-ratio: 2 / 3;        /* ratio "moyen" idéal entre tes deux livres (≈0.666) */
    overflow: hidden;
    position: relative;
    background: #0a0a0a;        /* fond sombre mystique si l'image ne remplit pas parfaitement */
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;        /* IMPORTANT : l'image entière visible, sans crop forcé */
    object-position: center;
    padding: 0.8rem;            /* petit padding intérieur → effet "cadre" élégant */
    box-sizing: border-box;
    transition: transform 0.6s ease;
}

.book-card:hover .book-cover img {
    transform: scale(1.06);     /* zoom subtil au survol */
}

/* Option : ombre portée légère pour effet "livre posé" */
.book-card {
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(212,175,55,0.15);
}
