/*
 Theme Name:   biblespinks
 Theme URI:    http://elegantthemes.com/
 Description:  Divi Child Theme
 Author:       Yann Calonne
 Author URI:   http://yanncalonne.com
 Template:     Divi
 Version:      1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 
*/

/* ==========================================================================
   0. IMPORTATION DES POLICES (LOCALES)
   ========================================================================== */
@font-face {
  font-family: "Trajan Pro 3";
  /* Le chemin est relatif à ce fichier style.css */
  src: url("fonts/Trajan Pro 3 Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap; /* Performance : affiche un texte standard tant que la police charge */
}

:root {
  /* Polices */
  --font-main: "Outfit", sans-serif;
  --font-serif: "Playfair Display", serif;

  /* Polices Spécifiques Titre */
  /* On utilise ici le nom exact défini dans le @font-face ci-dessus */
  --font-title-top: "PeridotPEVariable", "Outfit", sans-serif;
  --font-title-brand: "Trajan Pro 3", "Trajan", serif;
}
/* ==========================================================================
   4. TITRE PRINCIPAL (STYLE LOGO) - NOUVEAU
   ========================================================================== */
.spinks-main-title {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.title-bible {
  display: block;
  font-family: "PeridotPEVariable Light", "Outfit", sans-serif;
  font-weight: 300; /* Light */
  font-size: 3rem; /* Ajustez selon la taille souhaitée */
  text-transform: uppercase;
  letter-spacing: 0px;
  color: var(--text-main);
}

.title-brand {
  display: block;
  font-family: "Trajan Pro 3", "Trajan", serif;
  font-weight: bold; /* Regular pour Trajan */
  font-style: normal; /* Trajan est rarement italique, remettre italic si besoin */
  font-size: 5rem; /* Plus gros que le texte du dessus */
  text-transform: uppercase;
  color: var(--text-muted); /* Ou var(--accent-color) si vous voulez du doré */
  letter-spacing: 2px;
  margin-top: -5px; /* Rapprochement visuel */
}
/* Conteneur principal pour isoler ton design du reste de Divi */
#bibleBody {
  font-family:
    "Outfit", sans-serif; /* Assure-toi d'avoir importé la font si besoin */
  --bg-main: #0f1115;
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-hover: rgba(255, 255, 255, 0.08);
  --accent-color: #c59d5f;
  --border-glass: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0; /* Espace pour ne pas coller au menu Divi */
  min-height: 80vh;
  background-color: var(--bg-main);
  color: var(--text-main);

  /* --- TRANSITION FLUIDE (SMOOTH) --- */
  transition:
    background-color 0.5s ease-in-out,
    color 0.5s ease-in-out;
}

/* MODE CLAIR (Light Mode) */
#bibleBody.light-mode {
  --bg-main: #fcfcfc;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --card-bg: rgba(0, 0, 0, 0.05);
  --card-hover: rgba(0, 0, 0, 0.08);
  --border-glass: 1px solid rgba(0, 0, 0, 0.1);
}

/* ÉLÉMENTS GLOBAUX BIBLE */
#bibleBody h1,
#bibleBody h2,
#bibleBody h3 {
  color: var(--text-main);
  transition: color 0.5s ease-in-out; /* Transition ajoutée */
}
#bibleBody a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease; /* Transition plus rapide pour le hover */
}

/* GRID LIVRES & CHAPITRES */
.books-grid,
.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1rem 0;
}

/* CARTES (Livres et Chapitres) */
.book-card,
.chapter-card {
  background: var(--card-bg);
  border: var(--border-glass);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;

  /* Transition fluide pour le fond et la bordure */
  transition:
    background-color 0.5s ease,
    border-color 0.5s ease,
    transform 0.3s ease;
}
.book-card:hover,
.chapter-card:hover {
  transform: translateY(-5px);
  background: var(--card-hover);
  border-color: var(--accent-color);
}
.book-name {
  font-weight: 600;
  font-size: 1.1rem;
  z-index: 2;
  transition: color 0.5s ease;
}
.book-number,
.chapter-number {
  font-size: 2rem;
  font-weight: 700;
  opacity: 0.1;
  position: absolute;
  z-index: 1;
  transition: color 0.5s ease;
}
.chapter-number {
  opacity: 1;
  font-size: 1.5rem;
  position: relative;
  color: var(--text-main);
}

/* LECTURE TEXTE */
.reading-area {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}
.book-chapter-title {
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(
    --text-main
  ) !important; /* Modifié : utilise la couleur du texte principale */
  transition: color 0.5s ease;
}
.verse-text {
  font-family: "Lora", serif;
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-main);
  transition: color 0.5s ease; /* Transition fluide du texte */
}
.verse-text p {
  margin-bottom: 1rem;
}

/* BOUTONS NAVIGATION */
.nav-button,
#themeToggle {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  /* Transition fluide */
  transition:
    all 0.3s ease,
    color 0.5s ease,
    border-color 0.5s ease;
}
.nav-button:hover,
#themeToggle:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}
.pagination-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: var(--border-glass);
  transition: border-color 0.5s ease;
}
.search-wrapper input {
  width: 100%;
  max-width: 500px;
  padding: 1rem;
  border-radius: 50px;
  border: var(--border-glass);
  background: var(--card-bg);
  /* Force la couleur du texte à utiliser la variable --text-main */
  color: var(--text-main) !important;
  margin: 2rem auto;
  display: block;

  /* Transition fluide */
  transition:
    background-color 0.5s ease,
    border-color 0.5s ease,
    color 0.5s ease;
}

/* Import des fonts si pas géré par Divi */
@import url("https://fonts.googleapis.com/css2?family=Lora:ital@0;1&family=Outfit:wght@300;400;600;700&family=Playfair+Display:wght@700&display=swap");

/* ======================================= */
/* CORRECTION DES LISTES DE VERSETS (ACF)  */
/* ======================================= */

/* 1. Réactiver les numéros pour les listes ordonnées dans le texte biblique */
.verse-text ol {
  list-style-type: decimal !important; /* Force les chiffres 1, 2, 3 */
  margin-left: 0 !important;
  padding-left: 1.5rem !important; /* Décalage pour laisser la place aux chiffres */
  margin-bottom: 1.5rem;
}

/* 2. Style de chaque verset (élément de la liste) */
.verse-text li {
  margin-bottom: 0.5rem; /* Espace entre les versets */
  padding-left: 0.5rem; /* Espace entre le chiffre et le texte */
  position: relative;
}

/* 3. Style spécifique des NUMÉROS (Optionnel : Pour les mettre en doré) */
.verse-text li::marker {
  color: var(--accent-color); /* Utilise ta couleur dorée */
  font-weight: 700; /* Chiffres en gras */
  font-family: "Outfit", sans-serif; /* Police des chiffres */
  font-size: 0.9em;
  transition: color 0.5s ease;
}

/* ================================================== */
/* FIX : FORCER LE CONTENU SOUS LE HEADER DIVI        */
/* ================================================== */

/* Applique une marge haute pour éviter que le contenu passe sous le menu */
.single-bible-comments #main-content,
.tax-livre #main-content,
.page-template-page-bible-livres #main-content {
  padding-top: 100px !important; /* Ajuste ce chiffre selon la hauteur de ton menu (80px, 100px, 120px...) */
  min-height: 100vh; /* Assure que le footer reste en bas */
  background-color: var(--bg-main); /* Étend la couleur de fond */

  /* Transition fluide sur le fond principal */
  transition: background-color 0.5s ease-in-out;
}

/* ================================================================= */
/* FIX UNIVERSEL : FOND NOIR & ESPACEMENT MENU (Toutes les pages)    */
/* ================================================================= */

/* 1. CIBLAGE DE TOUTES LES PAGES BIBLE (Accueil, Chapitres, Lecture) */
body.page-template-page-bible-livres,      /* Page Accueil Bible */
body.tax-livre,                            /* Page Liste des Chapitres */
body.single-bible-comments {
  /* Page Lecture */
  background-color: #0f1115 !important; /* Fond noir sur le body */
  transition: background-color 0.5s ease-in-out;
}

/* 2. FORCER LE NOIR SUR LES CONTENEURS DIVI (Tue le blanc) */
body.page-template-page-bible-livres #page-container,
body.tax-livre #page-container,
body.single-bible-comments #page-container,
body.page-template-page-bible-livres #main-content,
body.tax-livre #main-content,
body.single-bible-comments #main-content,
body.page-template-page-bible-livres .container,
body.tax-livre .container,
body.single-bible-comments .container {
  background-color: #0f1115 !important;
  transition: background-color 0.5s ease-in-out;
}

/* ========================================================= */
/* ADAPTATION JOUR/NUIT : COMMENTAIRES (BLEU & ITALIQUE)     */
/* ========================================================= */

#bibleBody blockquote {
  background-color: rgba(59, 130, 246, 0.1) !important;
  color: #60a5fa !important;
  font-style: italic !important;
  font-family: "Playfair Display", serif;
  border-left: 4px solid #60a5fa;
  border-top: var(--border-glass);
  border-right: var(--border-glass);
  border-bottom: var(--border-glass);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.5s ease-in-out;
}
#bibleBody blockquote::before {
  content: none;
}

/* --- ADAPTATION MODE JOUR (Light Mode) --- */
body.light-mode #bibleBody blockquote {
  background-color: rgba(37, 99, 235, 0.05) !important;
  color: #1e40af !important;
  border-left-color: #1e40af;
  border-color: rgba(37, 99, 235, 0.1);
}

#bibleBody blockquote a, #bibleBody blockquote a span {
  color: #c59d5f !important;
  font-weight: 700 !important;
}

#bibleBody blockquote a:hover {
  text-decoration: underline;
}

/* ========================================================= */
/* BARRE DE RECHERCHE DIVI (.et-search-form)                 */
/* ========================================================= */

#bibleBody .et_search_form_container,
#bibleBody .et-search-form,
#bibleBody form.searchform {
  background-color: var(--card-bg) !important;
  border: var(--border-glass) !important;
  border-radius: 50px;
  padding: 5px 15px;
  position: relative;
  transition:
    background-color 0.5s ease,
    border-color 0.5s ease;
}

#bibleBody .et-search-form input,
#bibleBody input.search-field,
#bibleBody input[type="search"] {
  background-color: transparent !important;
  border: none !important;
  color: var(--text-main) !important;
  font-family: "Outfit", sans-serif;
  transition: color 0.5s ease;
}

#bibleBody input::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.7;
  transition: color 0.5s ease;
}

#bibleBody .et-search-form button,
#bibleBody .search-button,
#bibleBody .et_search_submit {
  color: var(--text-muted) !important;
  background: transparent !important;
  transition: color 0.5s ease;
}
#bibleBody .et-search-form button:hover {
  color: var(--accent-color) !important;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--controls-bg);
  backdrop-filter: blur(12px);
  border-bottom: var(--border-glass);
  padding: 1.5rem 0;
  transition:
    background-color 0.5s ease,
    border-color 0.5s ease;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}
.logo svg {
  height: 50px;
  width: auto;
  fill: var(--text-main);
  transition: fill 0.5s ease;
}
.logo:hover svg {
  fill: var(--accent-color);
}

/* ======================================= */
/* STYLE PAGINATION ÉPURÉE (MINIMALISTE)   */
/* ======================================= */

.chapter-end-section {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 2rem 0;
  margin-top: 3rem;
  margin-bottom: 4rem;
  text-align: center;
}

.chapter-end-text {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 3rem;
  text-transform: none;
  letter-spacing: 0.5px;
  opacity: 0.9;
  transition: color 0.5s ease;
}

.chapter-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.nav-btn-prev,
.nav-btn-next {
  flex: 1;
}
.nav-btn-prev {
  text-align: left;
}
.nav-btn-next {
  text-align: right;
}

.chapter-nav-container a {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--text-muted);
  border-radius: 50px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  white-space: nowrap;
  transition:
    all 0.3s ease,
    border-color 0.5s ease,
    color 0.5s ease;
}

.chapter-nav-container a:hover {
  border-color: var(--accent-color);
  background-color: var(--accent-color);
  color: #0f1115;
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .chapter-nav-container {
    gap: 10px;
  }
  .chapter-nav-container a {
    width: 100%;
    padding: 0.7rem 0.5rem;
    font-size: 0.8rem;
    text-align: center;
  }
}

/* ========================================================= */
/* CORRECTIF MODE JOUR (Light Mode)                          */
/* ========================================================= */

body.light-mode #main-content,
body.light-mode #page-container,
body.light-mode .container,
body.light-mode #bibleBody {
  background-color: #fdfbf7 !important;
  transition: background-color 0.5s ease-in-out !important;
}

#bibleBody {
  transition:
    background-color 0.5s ease-in-out,
    color 0.5s ease-in-out !important;
}

/* =========================================================================
   STYLES EXTRAITS DE FUNCTIONS.PHP (Header Spinks)
   ========================================================================= */

/* MASQUER HEADER DIVI */
#main-header,
#top-header {
  display: none !important;
}
#page-container {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* SUPPRIMER TOUS LES ANCIENS BOUTONS TOGGLE SUR LES PAGES (s'ils existent en doublon) */
#themeToggle {
  /* Gardé visible via d'autres règles si c'est celui de la page single, 
       mais ici l'ID conflictuel du header peut être géré */
  /* display: none !important; <= Je commente ceci car tu utilises le même ID dans tes pages single.php */
}

/* STRUCTURE DU HEADER */
#spinks-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99999;
  background: transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem 0;
  transition: background 0.3s ease;
}

body.light-mode #spinks-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.spinks-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LOGO */
.spinks-logo svg {
  width: 140px;
  height: auto;
  fill: #fff;
  transition: fill 0.3s ease;
}
body.light-mode .spinks-logo svg {
  fill: #1f2937;
}

/* BOUTON THEME GLOBAL (Header) */
#globalThemeToggle {
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 1.2rem;
  color: #fff;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
#globalThemeToggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #c59d5f;
  color: #c59d5f;
  transform: scale(1.05);
}
body.light-mode #globalThemeToggle {
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(0, 0, 0, 0.2);
  color: #333;
}
body.light-mode #globalThemeToggle:hover {
  background: #fff;
  border-color: #d97706;
  color: #d97706;
}
@media (max-width: 600px) {
  .spinks-logo svg {
    width: 110px;
  }
  .spinks-content {
    padding: 0 1.5rem;
  }
}

/* =========================================================================
   STYLES EXTRAITS DE FUNCTIONS.PHP (Shortcodes Versets)
   ========================================================================= */

.verset-du-jour-container {
  background-color: var(--card-bg, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
  padding: 15px 20px;
  border-radius: 8px;
  margin: 10px 0;
  font-family: "Outfit", sans-serif;
  text-align: left;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.verset-du-jour-container:hover {
  transform: translateY(-2px);
  background-color: var(--card-hover, rgba(255, 255, 255, 0.05));
}
.verset-du-jour-container.annee-1 {
  border-left: 4px solid #c59d5f;
}
.verset-du-jour-container.annee-2 {
  border-left: 4px solid #c59d5f;
}

.verset-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-glass, rgba(255, 255, 255, 0.05));
}
.verset-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted, #9ca3af);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Outfit", sans-serif;
}
.verset-meta {
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  opacity: 0.8;
  margin: 0;
  display: flex;
  gap: 10px;
}
.verset-content {
  padding: 0;
  background: none;
}
.verset-texte {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-main, inherit);
  margin: 0;
}
.bible-link {
  color: var(--text-main, inherit);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid transparent;
  transition: color 0.2s;
}
.bible-link:hover {
  color: var(--accent-color, #c59d5f);
  border-bottom-color: var(--accent-color, #c59d5f);
}
.sep {
  opacity: 0.3;
  margin: 0 8px;
  font-weight: 300;
}

@media (max-width: 600px) {
  .verset-cycle {
    display: none;
  }
  .verset-header {
    flex-direction: column;
    gap: 2px;
  }
}

/* =========================================================================
   STYLES EXTRAITS DE PAGE-BIBLE-LIVRES.PHP
   ========================================================================= */

/* VARIABLES LOCALES PAGE ACCUEIL */
#bibleBody {
  --bg-main: #0f1115;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-hover: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --border-glass: 1px solid rgba(255, 255, 255, 0.1);
  --accent-color: #c59d5f;
  --shadow-hover: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --bg-letter-color: rgba(255, 255, 255, 0.02);

  background-color: var(--bg-main);
  background-image:
    radial-gradient(
      circle at 10% 20%,
      rgba(255, 215, 0, 0.03) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(64, 100, 255, 0.05) 0%,
      transparent 40%
    );
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-main);
}

body.light-mode #bibleBody {
  --bg-main: #fdfbf7;
  --card-bg: #ffffff;
  --card-hover: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-glass: 1px solid rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 30px -10px rgba(0, 0, 0, 0.1);
  --bg-letter-color: rgba(0, 0, 0, 0.04);
  background-image: none;
}

.sticky-header-internal {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  backdrop-filter: blur(12px);
  padding: 1rem 0;
  transition: background-color 0.3s ease;
}

.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin: 4rem 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-weight: 600;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--text-muted), transparent);
  opacity: 0.2;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.book-card {
  background: var(--card-bg);
  border: var(--border-glass);
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 140px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.book-card:hover {
  transform: translateY(-5px) scale(1.01);
  background: var(--card-hover);
  box-shadow: var(--shadow-hover);
  border-color: var(--text-muted);
}

.book-name {
  font-size: 1.2rem;
  font-weight: 700;
  z-index: 2;
  position: relative;
  color: var(--text-main);
}
.book-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 2;
  position: relative;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s;
}
.book-card:hover .book-meta {
  color: var(--accent-color);
}

.book-bg-number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--bg-letter-color);
  position: absolute;
  bottom: -15px;
  right: 10px;
  transition:
    transform 0.4s,
    color 0.4s;
  line-height: 1;
  user-select: none;
  font-family: "Outfit", sans-serif;
}
.book-card:hover .book-bg-number {
  transform: translateY(-5px) scale(1.1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  h1 {
    font-size: 2.5rem !important;
  }
  .book-card {
    height: 120px;
    padding: 1.2rem;
  }
  .book-bg-number {
    font-size: 3rem;
  }
}

/* =========================================================================
   STYLES EXTRAITS DE TAXONOMY-LIVRE.PHP
   ========================================================================= */

/* CONFIGURATION DARK MODE (Défaut pour Taxonomie) */
#bibleBody {
  /* (Déjà défini plus haut, mais répété pour cohérence avec le code d'origine) */
  --card-border: rgba(255, 255, 255, 0.12);
  --card-hover-bg: rgba(255, 255, 255, 0.08);
  --accent-color: #c59d5f;
}

body.light-mode #bibleBody {
  --card-border: #e2e8f0;
}

.chapter-header-zone {
  text-align: center;
  margin-bottom: 3rem;
}
.top-nav-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 1rem;
}

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: 0.3s;
}
.back-link:hover {
  color: var(--accent-color) !important;
}

#themeToggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-muted);
}
#themeToggle:hover {
  color: var(--accent-color);
}

.book-title {
  font-family: "Playfair Display", serif;
  font-size: 4.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--text-main) !important;
}

.book-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 1rem;
  opacity: 0.9;
}

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
  gap: 12px;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.chapter-card {
  aspect-ratio: 1 / 1;
  background: var(--card-bg);
  border: 1px solid var(--border-glass); /* Remplacement de --card-border pour unifier */
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  color: var(--text-main) !important;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 0;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

body.light-mode .chapter-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #111827 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chapter-card:hover {
  transform: scale(1.15);
  z-index: 10;
  border-color: var(--accent-color);
  color: var(--accent-color) !important;
}

body:not(.light-mode) .chapter-card:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

body.light-mode .chapter-card:hover {
  background: #ffffff;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.5) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 600px) {
  .book-title {
    font-size: 3rem;
  }
  .chapters-grid {
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 8px;
  }
}

/* --- Force la couleur du texte dans la barre de recherche --- */

/* Par défaut (Mode Sombre) : Texte BLANC */
.search-wrapper input {
  color: #ffffff !important;
  caret-color: #ffffff; /* Couleur du curseur clignotant */
}

/* Placeholder (le texte "Rechercher...") en blanc transparent */
.search-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Exception pour le Mode Clair (Texte FONCÉ) */
body.light-mode .search-wrapper input {
  color: #1f2937 !important;
  caret-color: #1f2937;
}

body.light-mode .search-wrapper input::placeholder {
  color: rgba(0, 0, 0, 0.6) !important;
}

/* --- STYLES FORMULAIRE CONTACT (QUESTIONS BIBLIQUES) --- */

/* Petits ajustements spécifiques au formulaire pour le survol du bouton */
.spinks-form button:hover {
  border-color: var(--accent-color) !important;
  color: var(--accent-color) !important;
  background: var(--card-hover) !important;
  transform: translateY(-2px);
}

/* Focus sur les champs */
.spinks-form input:focus,
.spinks-form textarea:focus {
  outline: none;
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 2px rgba(197, 157, 95, 0.2);
}

/* --- GESTION SPÉCIFIQUE DU MODE CLAIR (Light Mode) --- */
/* On ajoute une bordure noire aux champs uniquement en mode clair */
body.light-mode .spinks-form input,
body.light-mode .spinks-form textarea {
  border: 1px solid #000000 !important; /* Bordure NOIRE */
}

/* =========================================================================
   5. PIED DE PAGE (FOOTER) - SYNC & TRANSITIONS
   ========================================================================= */

#spinks-footer {
  /* DÉFINITION DES VARIABLES LOCALES POUR LE FOOTER (Dark Mode par défaut) */
  --bg-main: #0f1115;
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --accent-color: #c59d5f;
  --border-glass: 1px solid rgba(255, 255, 255, 0.1);

  background-color: var(--bg-main);
  border-top: var(--border-glass);
  padding: 4rem 2rem 2rem;
  color: var(--text-muted);
  font-family: "Outfit", sans-serif;

  /* TRANSITION SYNCHRONISÉE AVEC LE BODY (0.5s ease-in-out) */
  transition:
    background-color 0.5s ease-in-out,
    border-color 0.5s ease-in-out,
    color 0.5s ease-in-out;
}

/* VARIABLES FOOTER EN MODE CLAIR (Override) */
body.light-mode #spinks-footer {
  --bg-main: #fdfbf7;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-glass: 1px solid rgba(0, 0, 0, 0.08);
}

#spinks-footer .footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

/* LOGO DANS LE FOOTER */
.footer-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

/* Style SVG : Transition synchronisée */
#spinks-footer .spinks-logo-footer svg {
  width: 160px;
  height: auto;
  fill: var(--text-main);
  transition: fill 0.5s ease-in-out;
  margin-bottom: 1.5rem;
}

.footer-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.8;
  max-width: 300px;
}

/* LIENS */
#spinks-footer h4 {
  color: var(--text-main);
  font-family: "PeridotPEVariable", "Outfit", sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  transition: color 0.5s ease-in-out; /* Ajout transition titre */
}

#spinks-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#spinks-footer ul li {
  margin-bottom: 0.8rem;
}
#spinks-footer ul li a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1rem;
  /* Transition couleur synchronisée, on garde 0.3s pour le hover si besoin, 
     mais pour le theme switch c'est mieux d'avoir 0.5s sur la couleur de base */
  transition: color 0.5s ease-in-out;
}
#spinks-footer ul li a:hover {
  color: var(--accent-color);
  padding-left: 5px;
  transition: all 0.2s ease; /* Hover plus rapide */
}

/* COPYRIGHT ET CREDITS BAS DE PAGE */
.footer-bottom {
  text-align: center;
  border-top: var(--border-glass);
  padding-top: 2rem;
  color: var(--text-muted);
  /* Transition spécifique pour cette section */
  transition:
    color 0.5s ease-in-out,
    border-color 0.5s ease-in-out;
}

.footer-bottom .copyright-info p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.footer-bottom .credits {
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-bottom .credits a {
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.footer-bottom .credits a:hover {
  border-bottom-color: currentColor;
}

.footer-bottom .soli-deo {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.5;
  margin-top: 1.5rem !important;
}

/* RESPONSIVE FOOTER */
@media (max-width: 900px) {
  #spinks-footer .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .footer-logo,
  .footer-desc {
    align-items: center;
    margin: 0 auto 1.5rem;
  }
}

/* =========================================================================
   6. NETTOYAGE DIVI (Masquer le footer par défaut)
   ========================================================================= */

#main-footer,
.et_pb_section_0_tb_footer {
  display: none !important;
}





/* ==========================================================================
   POP-UP PROMO (Synchronisé avec Dark/Light mode)
   ========================================================================== */

.spinks-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999; /* Par-dessus ton header fixe */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* État masqué */
.spinks-popup-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Boîte principale - Utilise tes variables globales */
.spinks-popup-content {
  background-color: var(--bg-main, #0f1115);
  border: var(--border-glass, 1px solid rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  
  /* Transition synchronisée avec ton body */
  transition: 
    background-color 0.5s ease-in-out, 
    border-color 0.5s ease-in-out, 
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  transform: translateY(0) scale(1);
}

/* Animation d'entrée type "Pop" */
.spinks-popup-overlay.hidden .spinks-popup-content {
  transform: translateY(30px) scale(0.95);
}

/* Bouton Fermer */
.spinks-close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  background: none;
  border: none;
  color: var(--text-muted, #9ca3af);
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
}

.spinks-close-btn:hover {
  color: var(--accent-color, #c59d5f);
}

/* Image */
.spinks-popup-image img {
  max-width: 100%;
  max-height: 250px;
  width: auto;
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Typographie (réutilisation de tes polices) */
.spinks-popup-title {
  font-family: var(--font-serif, "Playfair Display", serif);
  color: var(--text-main, #ffffff);
  font-size: 2.2rem;
  margin: 0;
  line-height: 1.1;
  transition: color 0.5s ease-in-out;
}

.spinks-popup-text p {
  font-family: var(--font-main, "Outfit", sans-serif);
  color: var(--text-muted, #9ca3af);
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0;
  transition: color 0.5s ease-in-out;
}

/* Bouton CTA - Style "Ghost" qui se remplit au hover */
.spinks-popup-cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 12px 30px;
  background-color: transparent;
  border: 1px solid var(--text-muted, #9ca3af);
  color: var(--text-main, #ffffff);
  font-family: var(--font-main, "Outfit", sans-serif);
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  transition: 
    all 0.3s ease, 
    border-color 0.5s ease-in-out, 
    color 0.5s ease-in-out;
}

.spinks-popup-cta:hover {
  background-color: var(--accent-color, #c59d5f);
  border-color: var(--accent-color, #c59d5f);
  color: #0f1115 !important; /* Force le contraste en mode sombre/clair */
  transform: translateY(-2px);
}

/* --- FALLBACK LIGHT MODE (Au cas où le HTML serait hors de #bibleBody) --- */
body.light-mode .spinks-popup-content {
  background-color: #fcfcfc;
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-mode .spinks-popup-title,
body.light-mode .spinks-popup-cta {
  color: #1f2937;
}
body.light-mode .spinks-popup-text p,
body.light-mode .spinks-close-btn {
  color: #6b7280;
}
body.light-mode .spinks-popup-cta {
  border-color: #6b7280;
}