/**
 * ═══════════════════════════════════════════════════════════════════════════
 * FEUILLE CSS GÉNÉRIQUE — FICHES PRODUIT ÉDITIONS REKAN
 * ═══════════════════════════════════════════════════════════════════════════
 * 
 * Utilisée par TOUTES les fiches produit :
 * - /examen-civique/index.html
 * - /ma-reduction-mammaire/index.html
 * - /femmes-ia/index.html
 * - /suivi-reequilibrage-alimentaire/index.html
 * - etc.
 *
 * À CHARGER DANS CHAQUE FICHE : <link rel="stylesheet" href="/assets/css/product-pages.css">
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* === Variables CSS (définis aussi dans styles.css) === */
:root {
  /* Alignés sur styles.css - charte biblio classique */
  --paper: #FFFFFF;
  --white: #FFFFFF;
  --cream: #FAF8F3;
  --ink: #1A1A1A;
  --gold: #C4A668;
  --gold-dark: #A88B4F;
  --muted: #6B6657;      /* Corrigé : était #666666 (neutre), maintenant #6B6657 (chaud) */
  --line: #E5E0D3;
  --line-dark: #D5CFB8;
}

/* === BOUTON RETOUR === */
.back-nav {
  padding: 2rem 0 0;
}

.back-nav .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: all 0.25s ease;
  font-weight: 500;
}

.back-nav .back-btn:hover {
  color: var(--gold-dark);
  transform: translateX(-3px);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* LAYOUT PRINCIPAL — 2 COLONNES (Desktop) / 1 COLONNE (Mobile) */
/* ═══════════════════════════════════════════════════════════════════════════ */

.product-main,
.hero-section {
  padding: 4rem 0;
}

/* === LAYOUT PENGUIN (Examen Civique) === */
.product-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

/* Colonne gauche : Couverture sticky */
.product-cover {
  position: sticky;
  top: 6rem;
}

.product-cover img {
  width: 100%;
  max-width: 280px;
  max-height: 430px;
  object-fit: contain;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: block;
}

.product-cover .bg-decoration {
  position: absolute;
  inset: -1rem;
  background: rgba(196, 166, 104, 0.08);
  z-index: -1;
  transform: rotate(-1deg);
}

.product-cover .wrap {
  position: relative;
}

/* === LAYOUT HERO GÉNÉRIQUE (autres fiches) === */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Image hero (background-image ou <img> via CSS) */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 550px;
  aspect-ratio: 3 / 4;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--cream);
  border-radius: 4px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  margin: 0 auto 0 0;
}

.hero-visual .visual-label {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* CONTENU DES FICHES */
/* ═══════════════════════════════════════════════════════════════════════════ */

.product-details,
.hero-content {
  /* Les deux peuvent être utilisés */
}

.product-details h1,
.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0.5rem 0 0.75rem;
  line-height: 1.1;
}

.product-details .subtitle,
.hero-content .subtitle {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.product-details .author-line,
.hero-content .author-line {
  font-size: 0.875rem;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.product-details .author-line strong,
.hero-content .author-line strong {
  font-weight: 500;
}

.product-details .collection-line {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === BADGE === */
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.badge-available {
  background: #d4edda;
  color: #155724;
}

.badge-preorder {
  background: #fff3cd;
  color: #856404;
}

.badge-coming {
  background: #e7e7e7;
  color: var(--muted);
}

/* === POINTS FORTS === */
.key-features {
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.key-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.key-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  line-height: 1.6;
}

.key-features .check {
  color: var(--gold);
  font-weight: bold;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* === FORMATS D'ACHAT === */
.purchase-formats {
  margin: 2rem 0;
}

.format-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.format-row:last-child {
  border-bottom: none;
}

.format-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.format-info p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.format-action {
  text-align: right;
}

.format-action .price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}

/* === BOUTONS === */
.btn-primary,
.btn-disabled {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gold);
  color: white;
}

.btn-primary:hover {
  background: var(--gold-dark);
}

.btn-disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

/* === SECTION "À QUI ÇA S'ADRESSE" === */
.target-audience-section {
  margin: 2.5rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.target-audience-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--ink);
}

.target-audience-section p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.target-audience-section p:last-child {
  margin-bottom: 0;
}

/* === PROFILS D'AUDIENCE (I/II/III) === */
.audience-grid {
  margin: 3rem 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.audience-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
}

.audience-level {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.audience-label {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

/* === DESCRIPTION LONGUE === */
.product-description {
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.product-description h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.product-description p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* === WEB APP SECTION === */
.webapp-section {
  margin: 4rem 0;
  padding: 2rem;
  background: var(--cream);
  border-radius: 4px;
  text-align: center;
}

.webapp-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.webapp-section p {
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.webapp-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.webapp-feature {
  text-align: center;
}

.webapp-feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.webapp-feature p {
  font-size: 0.875rem;
  margin: 0;
}

.webapp-section .btn-primary {
  margin-top: 1.5rem;
}

/* === NEWSLETTER SECTION === */
.newsletter-section {
  margin: 4rem 0;
  padding: 2rem;
  background: var(--cream);
  border-radius: 4px;
}

.newsletter-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.newsletter-section p {
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.newsletter-section input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
}

.newsletter-section input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 166, 104, 0.1);
}

/* === LIVRES LIÉS === */
.related-section {
  margin: 4rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.related-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.related-books-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.book-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.book-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.book-card p {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

/* === Texte paiement (sous formats) === */
.secure-payment-note {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0;
  text-align: center;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* RESPONSIVE */
/* ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  /* Layout Penguin */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .product-cover {
    position: relative;
    top: auto;
    max-width: 300px;
    margin: 0 auto;
  }

  /* Layout Hero */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-visual {
    max-width: 100%;
  }

  /* Grilles */
  .audience-grid {
    grid-template-columns: 1fr;
  }

  .webapp-features {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 640px) {
  .product-cover {
    max-width: 100%;
  }

  .hero-visual {
    max-width: 100%;
  }

  .format-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .format-action {
    text-align: left;
    width: 100%;
  }

  .webapp-features {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .hero-grid {
    gap: 2rem;
  }

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