/* Reset et base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #2c3e50;
  background-color: #f8fafc;
  overflow-x: hidden;
}

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

/* Header */
.site-title {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

header {
  background: linear-gradient(135deg, #23415b 0%, #6194b2 40%, #a186a3 100%);
  color: #f4ebe4;
  padding: 0.75rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Masquer visuellement le fallback header mais le garder pour SEO */
#header-placeholder.loading {
  visibility: hidden;
  position: absolute;
}

/* Afficher le vrai header une fois chargé */
#header-placeholder.loaded {
  visibility: visible;
  position: static;
}

/* .header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
} */

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 60px;
  height: 60px;
  display: block;
  flex-shrink: 0;
  /* Filtre pour transformer le noir en #feedcf (beige clair) */
  filter: brightness(0) saturate(100%) invert(93%) sepia(13%) saturate(629%) hue-rotate(312deg) brightness(103%) contrast(97%) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  overflow: visible;
}

.site-title {
  font-family: 'Cinzel', serif;  /* ou MedievalSharp */
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #feedcf;
}

/* Menu */
nav a {
  color: #f4ebe4;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

nav a:hover {
  color: #feedcf;
  border-bottom-color: #e2c0b9;
}

header h1 a {
  color: white;
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}


/* Main */
main {
  padding: 3rem 0;
  min-height: calc(100vh - 200px);
}

/* Grilles */
/* Par défaut (mobile/tablette) : 1 colonne */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
/* À partir de 900px : exactement 3 colonnes */
@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Sections */
section {
  margin-bottom: 3rem;
  background: rgba(255, 255, 255, 0.28);  /* Blanc 92% opaque = léger transparent */
  backdrop-filter: blur(10px);            /* Effet verre dépoli */
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);  /* Bordure subtile */
}

section h2, section h3 {
  color: #23415b;
  margin-bottom: 1.5rem;
  font-weight: 600;
}
/* titre h3 plus grand que h2*/
section h3 {
  font-size: 1.8rem;
  line-height: 1.2;
}

@media (min-width: 900px) {
  section h3 { font-size: 2.1rem; }
}

@media (max-width: 600px) {
  section h3 { font-size: 1.6rem; }
}

/* Hero */
/* HERO : neutralise TOUT le style section */
section.hero {
  margin: 0 0 4rem 0;
  padding: 0;
  background: transparent !important;     /* ✅ Force transparent */
  backdrop-filter: none !important;       /* ✅ Supprime flou */
  box-shadow: none !important;            /* ✅ Supprime ombre */
  border: none !important;                /* ✅ Supprime bordure */
  border-radius: 0 !important;            /* ✅ Supprime coins */
}


/* Rectangle bleu foncé pleine largeur */
.hero-inner-wrapper {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: radial-gradient(circle at top, rgba(79,100,129,0.6), rgba(15,23,42,0.9));
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

/* Contenu interne*/
.hero-inner {
  display: grid;
  grid-template-columns: 1.6fr 1.2fr; /* texte / image */
  gap: 3rem;
  align-items: center;
  padding: 3.5rem 1.5rem 3rem;
  color: #feedcf;
}

/* Texte */
.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: #feedcf;
  margin-bottom: 0.75rem;
}

.hero-text h2 {
  font-size: 2.4rem;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: #f4ebe4;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #feedcf;
}

/* Image à droite, responsive */
.hero-image {
  display: flex;
  justify-content: flex-end;
}

.hero-image img {
  width: 400px;
  max-width: 100%;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 10px 35px rgba(0,0,0,0.5);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 3.5rem 1.25rem 3rem;
  }

  .hero-image {
    justify-content: center;
  }

  .hero-text h2 {
    font-size: 2rem;
  }
}


/* Boutons */
.hero-cta {
  display: inline-block;
  margin-right: 1rem;
  margin-bottom: 0.75rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 1px solid #feedcf;
  background: linear-gradient(135deg, #99d4e2, #e2c0b9);
  color: #16213e;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  transition: all 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.35);
}

/* Profil */
.hero-profile {
  text-align: center;
}

.hero-avatar-ring {
  width: 300px;
  height: 300px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 180deg, #feedcf, #a186a3, #6194b2, #feedcf);
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
}

.hero-avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.hero-name {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  color: #feedcf;
}

.hero-role {
  margin: 0;
  color: #cfe8ed;
  font-size: 0.95rem;
}

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

  .hero-text h2 {
    font-size: 2rem;
  }

  .hero {
    border-radius: 0 0 16px 16px;
    padding: 3.5rem 0 3rem;
  }

  .hero-cta {
    margin-right: 0.5rem;
  }
}

@media (max-width: 600px) {
  .hero-avatar-ring {
    width: 140px;
    height: 140px;
  }

  .hero-text h2 {
    font-size: 1.7rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}

/* section romans */
.livre-card {
  width: 100%;
  max-width: 300px;
  margin: 2rem auto;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

/* Image : hauteur fixe identique pour toutes les cartes */
.livre-card img {
  width: 100%;
  height: 400px;          /* ajuste si besoin */
  object-fit: cover;
  object-position: center;
  display: block;
}

/* BANDEAU STATUT - BLEU FONCÉ */
.livre-statut {
  padding: 0.6rem 1.2rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #23415b;
  color: white;
  border: none;
  margin: 0;
}

/* Bloc texte : occupe tout l'espace dispo, bouton en bas */
.livre-info {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;  /* ✅ Essentiel pour flex */
}

/* H3 - 2 LIGNES SANS COUPURE */
.livre-info h3 {
  margin: 0 0 0.75rem 0;
  height: 5rem;           /* ✅ +0.2rem pour respirer */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;  /* ✅ Aligné haut (pas centré) */
  align-items: flex-start;      /* ✅ Aligné gauche */
  font-size: 1.5rem;
  line-height: 1.35;            /* ✅ Ligne-height précis */
  padding: 0.2rem 0;            /* ✅ Petit padding interne */
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  hyphens: auto;                /* ✅ Tirets si mot trop long */
  word-break: break-word;       /* ✅ Rupture mots propres */
}

.livre-info h4 {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

/* Description - TEXTE COMPLET (sans coupure) */
.livre-desc {
  flex: 1;                  /* ✅ Prend l'espace restant */
  margin-bottom: 1.5rem;
  line-height: 1.5;
  /* ✅ SUPPRIMÉ : overflow, line-clamp → texte entier */
}

/* MOTS-CLÉS : plus petits et italiques */
.livre-info .mots-cles {
  font-size: 0.85rem;
  font-style: italic;
  color: #64748b;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

/* Bouton fixe en bas */
.livre-info .btn-livre {
  align-self: center;
  margin-top: auto;         /* ✅ Colle définitivement en bas */
}

/* Vidéo de fond plein écran */
.site-bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;              /* derrière tout */
  pointer-events: none;     /* clics passent au-dessus */
}

/* Contenu du site par-dessus la vidéo */
.site-content {
  position: relative;
  z-index: 1;
  /* léger fond translucide pour la lisibilité */
  background: radial-gradient(circle at top, rgba(15,23,42,0.2), rgba(15,23,42,0.9));
  min-height: 100vh;
}

/* Pages de détail de livre */
.livre-hero {
  text-align: center;
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.livre-hero h1 {
  font-family: 'Cinzel', serif;
  font-size: 3rem;
  color: #23415b;
  margin-bottom: 1rem;
}

.livre-hero .genre-tags {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 1rem 0;
  color: #475569;
}

.livre-hero .livre-type {
  font-size: 1.3rem;
  font-weight: 600;
  color: #6194b2;
  margin-top: 0.5rem;
}

.livre-description {
  font-size: 1.1rem;
  line-height: 1.8;
  padding: 0;
  overflow: hidden;
}

.description-content {
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 0;
  align-items: stretch;
}

.description-text {
  padding: 2.5rem;
}

.description-text h2 {
  margin-top: 0;
}

.description-text p {
  margin-bottom: 1.5rem;
}

.description-text p + ul {
  margin-top: -0.75rem;
}

.description-image {
  height: 100%;
  overflow: hidden;
}

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

@media (max-width: 768px) {
  .description-content {
    grid-template-columns: 1fr !important;
  }

  .description-image {
    order: -1;
    height: auto;
    margin-bottom: 2rem;
  }

  .description-image .hero-avatar-ring {
    width: 250px !important;
    height: 250px !important;
  }

  .description-text {
    padding: 2rem;
  }
}

/* Sections des tomes */
.tome-section {
  margin-bottom: 4rem;
}

.tome-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .tome-content {
    grid-template-columns: 1fr 1.5fr;
  }
}

.tome-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tome-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  display: block;
  border: none;
}

.tome-info h2 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: #23415b;
  margin-bottom: 1rem;
}

.tome-info h3 {
  font-size: 1.3rem;
  color: #475569;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.tome-tagline {
  font-size: 1.2rem;
  color: #6194b2;
  margin-bottom: 1.5rem;
}

.tome-info p {
  line-height: 1.8;
  margin-bottom: 1rem;
}

.tome-note, .tome-finale {
  font-weight: 600;
  color: #23415b;
  margin-top: 1.5rem;
}

.tome-info .btn-livre {
  margin-top: 2rem;
}

/* Section extrait */
.extrait-section {
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.extrait-content {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 0;
  align-items: stretch;
}

.extrait-image {
  height: 100%;
  overflow: hidden;
}

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

.extrait-text {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.extrait-text h2 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
  color: #23415b;
}

.extrait-text p {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.extrait-text .btn-livre {
  align-self: flex-start;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}

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

  .extrait-image {
    height: 250px;
  }
}

/* Section chroniques */
.chroniques-section {
  margin-bottom: 3rem;
}

.chroniques-section h2 {
  text-align: center;
  color: #23415b;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.chroniques-section .section-intro {
  text-align: center;
  color: #475569;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.chroniques-carousel {
  position: relative;
}

.chroniques-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.chronique-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 3/4;
}

.chronique-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.chronique-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.3s ease;
}

.chronique-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(35, 65, 91, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
}

.chronique-card:hover .chronique-overlay {
  opacity: 1;
}

.chronique-quote {
  color: #feedcf;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  font-style: italic;
}

.chronique-author {
  color: #99d4e2;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
}

/* Navigation du carrousel */
.chroniques-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.nav-btn {
  background: linear-gradient(135deg, #6194b2, #a186a3);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: scale(1);
}

.nav-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #6194b2;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.dot.active {
  background: #6194b2;
  transform: scale(1.2);
}

.dot:hover {
  background: #a186a3;
  border-color: #a186a3;
}

/* Responsive */
@media (max-width: 900px) {
  .chroniques-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .chroniques-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .chronique-quote {
    font-size: 0.85rem;
  }
}

/* Page prologue */
.prologue-section {
  margin-bottom: 3rem;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  overflow: hidden;
}

.prologue-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2.5rem;
  font-size: 1.1rem;
  line-height: 1.9;
}

.prologue-content h2 {
  text-align: center;
  color: #23415b;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  font-family: 'Cinzel', serif;
}

.prologue-content p {
  margin-bottom: 1.5rem;
  text-align: justify;
  text-indent: 2rem;
  color: #2c3e50;
}

.prologue-cta {
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0;
  margin-bottom: 2rem;
  overflow: hidden;
}

.prologue-cta-content {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 0;
  align-items: center;
  padding-left: 3rem;
}

.prologue-cta-cover {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
}

.prologue-cta-text {
  padding: 2.5rem;
  text-align: center;
}

.prologue-cta-text h2 {
  color: #23415b;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.prologue-cta-text p {
  font-size: 1.1rem;
  color: #475569;
  margin-bottom: 2rem;
}

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

  .prologue-cta-cover {
    max-height: 400px;
    object-fit: contain;
  }

  .prologue-cta-text {
    padding: 2rem;
  }

  .prologue-content {
    padding: 2rem 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
  }

  .prologue-content h2 {
    font-size: 2rem;
  }

  .prologue-content p {
    text-indent: 1rem;
  }

  .prologue-cta-text h2 {
    font-size: 1.6rem;
  }

  .prologue-cta-text p {
    font-size: 1rem;
  }
}

/* Lien retour */
.back-link {
  text-align: center;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
}

.back-link a {
  background: none;
  box-shadow: none;
  color: #6194b2;
  padding: 0;
}

.back-link a:hover {
  background: none;
  box-shadow: none;
  transform: none;
  color: #23415b;
  text-decoration: underline;
}

/* Bouton générique */
.btn-livre {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, #6194b2, #a186a3);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-livre:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, #5383a1, #8f7491);
}

@media (max-width: 768px) {
  .livre-hero h1 {
    font-size: 2rem;
  }

  .tome-info h2 {
    font-size: 1.6rem;
  }

  .tome-content {
    grid-template-columns: 1fr;
  }

  /* Élargir les sections transparentes au maximum sur mobile */
  .tome-section,
  .extrait-section,
  .livre-description,
  .prologue-section {
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
  }

  /* Élargir les cartes de livres blanches à presque toute la largeur */
  .livre-card {
    width: 100%;
    max-width: none;
    margin: 1rem 0;
  }

  /* Augmenter le padding interne pour la lisibilité */
  .tome-info,
  .extrait-text,
  .description-text {
    padding: 1.5rem;
  }

  /* Réduire les marges globales pour maximiser l'espace */
  .container {
    padding: 0 0.5rem;
  }

  /* Réduire le padding des sections transparentes sur mobile */
  section {
    padding: 1rem 0.5rem;
  }

  /* Réduire l'espacement entre les cartes */
  .grid-3 {
    gap: 1rem;
    padding: 0;
  }

  /* Adapter la hauteur de l'image pour qu'elle soit entièrement visible */
  .livre-card img {
    height: auto;
    max-height: 400px;
    object-fit: contain;
  }
}

/* Footer */
footer {
  background: linear-gradient(135deg, #23415b 0%, #6194b2 40%, #a186a3 100%);
  color: #f4ebe4;
  padding: 2rem 0;
  text-align: center;
  margin-top: 4rem;
}

footer p {
  margin: 0;
  font-size: 0.95rem;
}

footer a {
  color: #feedcf;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}
