/**
 * CREDLIM - Module Sécurisé de Bibliothèque & Carte Virtuelle d'Abonnement
 * Protection Anti-Copie, Anti-Téléchargement, Liseuse e-Reader & Synthèse Audio
 */

/* =============================================================================
   AFFICHAGE ET VISIBILITÉ FORCÉE DES MODALES DU MODULE BIBLIOTHÈQUE
   ============================================================================= */
.modal-backdrop.open,
.modal-backdrop.active,
#bookDetailsModal.open,
#bookDetailsModal.active,
#subscriptionModal.open,
#subscriptionModal.active,
#readerAuthModal.open,
#readerAuthModal.active,
#secureReaderModal.open,
#secureReaderModal.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  z-index: 10050 !important;
}

#bookDetailsModal.open .modal-content-box,
#bookDetailsModal.active .modal-content-box,
#subscriptionModal.open .modal-content-box,
#subscriptionModal.active .modal-content-box,
#readerAuthModal.open .modal-content-box,
#readerAuthModal.active .modal-content-box,
#secureReaderModal.open .modal-content-box,
#secureReaderModal.active .modal-content-box,
#secureReaderModal.open .secure-reader-modal,
#secureReaderModal.active .secure-reader-modal {
  transform: translateY(0) !important;
  opacity: 1 !important;
  display: flex !important;
}

#bookDetailsModal:not(.open):not(.active),
#subscriptionModal:not(.open):not(.active),
#readerAuthModal:not(.open):not(.active),
#secureReaderModal:not(.open):not(.active) {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* =============================================================================
   1. BANNIÈRE D'ACCÈS BIBLIOTHÈQUE DANS LA PAGE
   ============================================================================= */
.secure-library-banner {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.98) 0%, rgba(3, 46, 37, 0.99) 100%) !important;
  border: 2px solid var(--accent-gold) !important;
  border-radius: 14px !important;
  padding: 1.4rem 1.6rem !important;
  margin-bottom: 1.75rem !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35) !important;
  position: relative;
  overflow: hidden;
}

.secure-library-banner::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(253, 224, 71, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.library-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10B981;
  color: #A7F3D0;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* =============================================================================
   2. CARTE VIRTUELLE NOMINATIVE (GLASSMORPHISM & FINITION HAUT DE GAMME)
   ============================================================================= */
.virtual-card-container {
  perspective: 1000px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto 1.5rem;
}

.virtual-card {
  width: 100%;
  aspect-ratio: 1.586;
  background: linear-gradient(135deg, #064E3B 0%, #04392E 45%, #02241D 100%);
  border: 2px solid #FDE047;
  border-radius: 18px;
  padding: 1.4rem;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.virtual-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 85% 15%, rgba(253, 224, 71, 0.25) 0%, transparent 50%),
              radial-gradient(circle at 10% 90%, rgba(16, 185, 129, 0.3) 0%, transparent 60%);
  pointer-events: none;
}

.virtual-card::after {
  content: "CREDLIM";
  position: absolute;
  right: -20px;
  bottom: -35px;
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: 5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  letter-spacing: 0.1em;
}

.vcard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.vcard-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.vcard-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1.5px solid #FDE047;
  object-fit: cover;
  background: #0A0E17;
}

.vcard-title {
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  line-height: 1.2;
}

.vcard-subtitle {
  font-size: 0.62rem;
  color: #FDE047;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.vcard-chip {
  width: 38px;
  height: 28px;
  background: linear-gradient(135deg, #FDE68A 0%, #D97706 100%);
  border-radius: 5px;
  border: 1px solid #B45309;
  position: relative;
}

.vcard-chip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.3);
}

.vcard-body {
  position: relative;
  z-index: 2;
  margin: 0.4rem 0;
}

.vcard-number {
  font-family: 'Courier New', monospace;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #FFFFFF;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.35rem;
}

.vcard-pin-box {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(10, 14, 23, 0.7);
  border: 1px dashed #FDE047;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.76rem;
  color: #FDE047;
  font-weight: 800;
}

.vcard-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(253, 224, 71, 0.25);
  padding-top: 0.5rem;
}

.vcard-holder {
  display: flex;
  flex-direction: column;
}

.vcard-label {
  font-size: 0.56rem;
  color: #A7F3D0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.vcard-holder-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vcard-validity {
  text-align: right;
  font-size: 0.72rem;
  color: #FDE047;
  font-weight: 700;
}

/* Formules d'abonnement */
.plan-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.plan-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-radius: 12px;
  padding: 1.1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.plan-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-3px);
}

.plan-card.active {
  border-color: #FDE047;
  background: linear-gradient(160deg, rgba(6, 78, 59, 0.3) 0%, rgba(10, 14, 23, 0.1) 100%);
  box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.4);
}

.plan-card-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: #D97706;
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.plan-price {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin: 0.4rem 0 0.2rem;
}

/* Boutons de paiement */
.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.payment-btn {
  background: var(--bg-muted);
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  padding: 0.65rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.payment-btn.active, .payment-btn:hover {
  border-color: var(--accent-gold);
  background: rgba(253, 224, 71, 0.1);
  color: var(--text-main);
}

/* =============================================================================
   2.1. PASSERELLE DE VALIDATION EFFECTIVE DU PAIEMENT (ENVOI & ACCRÉDITATION)
   ============================================================================= */
.payment-recap-card {
  background: rgba(2, 32, 26, 0.7);
  border: 1px solid rgba(253, 224, 71, 0.25);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.payment-gateway-box {
  background: rgba(10, 14, 23, 0.65);
  border: 1.5px solid var(--accent-gold);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.payment-spinner {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(253, 224, 71, 0.15);
  border-top-color: #FDE047;
  border-right-color: #10B981;
  border-radius: 50%;
  animation: credlimSpin 0.85s linear infinite;
  margin: 0 auto 1.25rem;
}

@keyframes credlimSpin {
  to { transform: rotate(360deg); }
}

.payment-progress-bar-wrap {
  width: 100%;
  max-width: 460px;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(253, 224, 71, 0.3);
  border-radius: 5px;
  overflow: hidden;
  margin: 1rem auto;
}

.payment-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FDE047 0%, #10B981 100%);
  border-radius: 4px;
  transition: width 0.45s ease;
}

.payment-receipt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.2);
  border: 1.5px solid #10B981;
  color: #A7F3D0;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.payment-receipt-card {
  background: rgba(2, 32, 26, 0.8);
  border: 1px solid rgba(253, 224, 71, 0.3);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  max-width: 520px;
  margin: 0 auto 1.25rem;
  text-align: left;
}

.payment-receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin: 0;
}

.payment-receipt-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #ECFDF5;
}

.payment-receipt-table tr:last-child td {
  border-bottom: none;
}

.payment-receipt-table td:first-child {
  color: #94A3B8;
  font-weight: 600;
  width: 44%;
}

.payment-receipt-table td:last-child {
  font-weight: 700;
  color: #FFFFFF;
}

/* =============================================================================
   3. LISEUSE SÉCURISÉE & LECTEUR AUDIO (MODALE GRAND FORMAT)
   ============================================================================= */
.secure-reader-modal {
  max-width: 1180px !important;
  width: 95vw !important;
  height: 92vh !important;
  max-height: 94vh !important;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden !important;
  background: #042F26 !important;
  border: 2px solid var(--accent-gold) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7) !important;
}

/* En-tête de la liseuse */
.reader-top-bar {
  background: #02201A;
  border-bottom: 1.5px solid rgba(253, 224, 71, 0.25);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex-shrink: 0;
}

.reader-book-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reader-book-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.2);
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.reader-book-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.25;
}

.reader-book-meta {
  font-size: 0.74rem;
  color: #A7F3D0;
}

.reader-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Barre Audio Flottante / Intégrée */
.reader-audio-bar {
  background: linear-gradient(90deg, #064E3B 0%, #04392E 50%, #064E3B 100%);
  border-bottom: 1px solid rgba(253, 224, 71, 0.3);
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.audio-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 14, 23, 0.6);
  border: 1px solid var(--accent-gold);
  color: #FDE047;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.audio-btn:hover {
  background: var(--accent-gold);
  color: #0A0E17;
  transform: scale(1.08);
}

.audio-btn.play-main {
  width: 42px;
  height: 42px;
  background: #FDE047;
  color: #0A0E17;
  font-size: 1.1rem;
  border: none;
  font-weight: 900;
}

.audio-btn.play-main:hover {
  background: #F59E0B;
}

.audio-progress-wrap {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.audio-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.audio-wave span {
  width: 3px;
  height: 6px;
  background: #FDE047;
  border-radius: 2px;
  transition: height 0.2s ease;
}

.audio-wave.playing span {
  animation: audioWaveAnim 1.2s infinite ease-in-out;
}

.audio-wave.playing span:nth-child(2) { animation-delay: 0.15s; }
.audio-wave.playing span:nth-child(3) { animation-delay: 0.3s; }
.audio-wave.playing span:nth-child(4) { animation-delay: 0.45s; }
.audio-wave.playing span:nth-child(5) { animation-delay: 0.6s; }

@keyframes audioWaveAnim {
  0%, 100% { height: 4px; }
  50% { height: 18px; }
}

/* Corps de lecture à deux colonnes */
.reader-main-split {
  display: grid;
  grid-template-columns: 280px 1fr;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Sommaire des chapitres */
.reader-toc-sidebar {
  background: #02201A;
  border-right: 1px solid rgba(253, 224, 71, 0.2);
  overflow-y: auto;
  padding: 1rem;
}

.reader-toc-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.reader-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.reader-toc-item {
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  color: #ECFDF5;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 3px solid transparent;
}

.reader-toc-item:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #FFFFFF;
}

.reader-toc-item.active {
  background: rgba(245, 158, 11, 0.2);
  border-left-color: var(--accent-gold);
  color: #FDE047;
  font-weight: 700;
}

/* Zone de lecture du texte */
.reader-text-viewport {
  overflow-y: auto;
  padding: 2.5rem 3.5rem;
  position: relative;
  /* PROTECTION ANTI-SÉLECTION & COPIE */
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

/* Watermark de sécurité dynamique */
.reader-security-watermark {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    -35deg,
    rgba(253, 224, 71, 0.04) 0px,
    rgba(253, 224, 71, 0.04) 20px,
    transparent 20px,
    transparent 80px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.watermark-stamp {
  transform: rotate(-30deg);
  font-size: 1.1rem;
  font-weight: 800;
  color: rgba(253, 224, 71, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  max-width: 600px;
  line-height: 2.2;
}

/* Contenu du texte éditorial */
.reader-content-wrap {
  position: relative;
  z-index: 5;
  max-width: 780px;
  margin: 0 auto;
  color: #ECFDF5;
  font-size: 1rem;
  line-height: 1.85;
}

.reader-chapter-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid var(--accent-gold);
  color: #FDE047;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

.reader-chapter-title {
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: 1.65rem;
  color: #FFFFFF;
  margin: 0 0 1rem;
  line-height: 1.3;
}

.reader-quote-lead {
  background: rgba(2, 32, 26, 0.6);
  border-left: 4px solid var(--accent-gold);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  font-size: 1.05rem;
  color: #FDE047;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.reader-paragraph {
  margin-bottom: 1.25rem;
  text-align: justify;
  transition: background-color 0.3s ease;
}

/* Surbrillance lors de la lecture audio */
.reader-paragraph.speaking-active {
  background: rgba(253, 224, 71, 0.18) !important;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  color: #FFFFFF !important;
  box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.3);
}

/* Thèmes de lecture */
.reader-theme-dark .reader-text-viewport {
  background: #042F26;
  color: #ECFDF5;
}

.reader-theme-sepia .reader-text-viewport {
  background: #F4EBD9 !important;
  color: #2D2319 !important;
}
.reader-theme-sepia .reader-chapter-title { color: #2D2319 !important; }
.reader-theme-sepia .reader-quote-lead { background: rgba(217, 119, 6, 0.12) !important; color: #78350F !important; }
.reader-theme-sepia .watermark-stamp { color: rgba(120, 53, 15, 0.08) !important; }

.reader-theme-light .reader-text-viewport {
  background: #FAFAFA !important;
  color: #0F172A !important;
}
.reader-theme-light .reader-chapter-title { color: #0F172A !important; }
.reader-theme-light .reader-quote-lead { background: rgba(6, 78, 59, 0.08) !important; color: #064E3B !important; }
.reader-theme-light .watermark-stamp { color: rgba(0, 0, 0, 0.05) !important; }

/* Responsive Liseuse */
@media (max-width: 900px) {
  .reader-main-split {
    grid-template-columns: 1fr;
  }
  .reader-toc-sidebar {
    display: none;
  }
  .reader-toc-sidebar.mobile-open {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 20;
    box-shadow: 4px 0 15px rgba(0,0,0,0.5);
  }
  .reader-text-viewport {
    padding: 1.5rem 1.25rem;
  }
}

/* =============================================================================
   4. RÈGLES DE SÉCURITÉ PRINT STICTES (ANTI-IMPRESSION)
   ============================================================================= */
@media print {
  body * {
    visibility: hidden !important;
  }
  .secure-reader-modal, #secureReaderModal, .reader-text-viewport {
    display: none !important;
  }
}


/* =============================================================================
   5. CHARTE GRAPHIQUE Ã‰DITORIALE "SAVOIRS & SOCIÃ‰TÃ‰" (5 SÃ‰RIES THÃ‰MATIQUES)
   ============================================================================= */

:root {
  --serie-1-color: #1E3A8A; /* Bleu profond - Management et Leadership */
  --serie-1-light: #60A5FA;
  --serie-1-bg: rgba(30, 58, 138, 0.15);
  
  --serie-2-color: #15803D; /* Vert forestier - DÃ©veloppement et Territoires */
  --serie-2-light: #4ADE80;
  --serie-2-bg: rgba(21, 128, 61, 0.15);
  
  --serie-3-color: #881337; /* Bordeaux profond - Gouvernance et Institutions */
  --serie-3-light: #FB7185;
  --serie-3-bg: rgba(136, 19, 55, 0.15);
  
  --serie-4-color: #D97706; /* Ocre chaleureux - Protection sociale et Ã‰conomie humaine */
  --serie-4-light: #FBBF24;
  --serie-4-bg: rgba(217, 119, 6, 0.15);
  
  --serie-5-color: #475569; /* Gris ardoise - SociÃ©tÃ©, Ã‰thique et CitoyennetÃ© */
  --serie-5-light: #94A3B8;
  --serie-5-bg: rgba(71, 85, 105, 0.15);
}

/* BanniÃ¨re Prestige de la Collection Savoirs & SociÃ©tÃ© */
.savoirs-collection-header {
  background: radial-gradient(circle at top center, rgba(30, 58, 138, 0.25) 0%, rgba(10, 15, 29, 0.95) 70%),
              linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(6, 78, 59, 0.25) 100%);
  border: 1px solid rgba(253, 224, 71, 0.35);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.savoirs-collection-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1E3A8A 0%, #15803D 25%, #881337 50%, #D97706 75%, #475569 100%);
}

.savoirs-brand-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.savoirs-brand-icon {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1E3A8A 0%, #0F172A 100%);
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FDE047;
  font-size: 2rem;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}

.savoirs-brand-titles {
  flex: 1;
  min-width: 280px;
}

.savoirs-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FDE047;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.4rem;
}

.savoirs-brand-name {
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: 1.95rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 0.03em;
  margin: 0 0 0.35rem 0;
  line-height: 1.2;
}

.savoirs-brand-author {
  font-size: 1.05rem;
  color: #E2E8F0;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.savoirs-motto-tagline {
  font-size: 0.92rem;
  color: #FDE047;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.savoirs-collection-desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #CBD5E1;
  margin: 1rem 0 1.5rem 0;
  max-width: 950px;
}

/* Grille de Vitrine des 5 SÃ©ries */
.series-showcase-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 1200px) {
  .series-showcase-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

.series-showcase-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.15rem 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.series-showcase-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.series-showcase-card.s1::before { background: var(--serie-1-color); }
.series-showcase-card.s2::before { background: var(--serie-2-color); }
.series-showcase-card.s3::before { background: var(--serie-3-color); }
.series-showcase-card.s4::before { background: var(--serie-4-color); }
.series-showcase-card.s5::before { background: var(--serie-5-color); }

.series-showcase-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  border-color: rgba(253, 224, 71, 0.4);
}

.series-showcase-card.active {
  box-shadow: 0 0 0 2px var(--accent-gold), 0 12px 28px rgba(0, 0, 0, 0.5);
  background: rgba(30, 41, 59, 0.95);
}

.series-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.series-card-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #FFFFFF;
}

.s1 .series-card-icon-wrap { background: var(--serie-1-color); }
.s2 .series-card-icon-wrap { background: var(--serie-2-color); }
.s3 .series-card-icon-wrap { background: var(--serie-3-color); }
.s4 .series-card-icon-wrap { background: var(--serie-4-color); }
.s5 .series-card-icon-wrap { background: var(--serie-5-color); }

.series-card-pill-count {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.series-card-num {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.s1 .series-card-num { color: var(--serie-1-light); }
.s2 .series-card-num { color: var(--serie-2-light); }
.s3 .series-card-num { color: var(--serie-3-light); }
.s4 .series-card-num { color: var(--serie-4-light); }
.s5 .series-card-num { color: var(--serie-5-light); }

.series-card-title {
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: 0.98rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
}

.series-card-desc {
  font-size: 0.78rem;
  color: #94A3B8;
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.series-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #FDE047;
  text-decoration: none;
  margin-top: auto;
}

/* Barre de Filtrage 1-Clic par SÃ©rie */
.series-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 1rem 0 1.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

.series-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #CBD5E1;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.series-filter-btn:hover {
  color: #FFFFFF;
  border-color: rgba(253, 224, 71, 0.5);
  transform: translateY(-2px);
}

.series-filter-btn.active {
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.series-filter-btn[data-serie-target="all"].active {
  background: linear-gradient(135deg, #1E3A8A 0%, #15803D 100%);
  border-color: var(--accent-gold);
}

.series-filter-btn[data-serie-target="1"].active {
  background: var(--serie-1-color);
  border-color: #60A5FA;
}

.series-filter-btn[data-serie-target="2"].active {
  background: var(--serie-2-color);
  border-color: #4ADE80;
}

.series-filter-btn[data-serie-target="3"].active {
  background: var(--serie-3-color);
  border-color: #FB7185;
}

.series-filter-btn[data-serie-target="4"].active {
  background: var(--serie-4-color);
  border-color: #FBBF24;
}

.series-filter-btn[data-serie-target="5"].active {
  background: var(--serie-5-color);
  border-color: #94A3B8;
}

.series-filter-count {
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

/* =============================================================================
   GABARIT HARMONISÃ‰ DES CARTES DE LIVRES (31 OUVRAGES)
   ============================================================================= */
.book-card {
  position: relative;
  background: linear-gradient(180deg, #111827 0%, #0B0F19 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 0 !important;
  overflow: hidden;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  box-shadow: -4px 8px 24px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease !important;
}

.book-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: -6px 14px 32px rgba(0, 0, 0, 0.6) !important;
  border-color: rgba(253, 224, 71, 0.3) !important;
}

/* Tranche latÃ©rale 3D selon la SÃ©rie */
.book-card.serie-1 { border-left: 6px solid var(--serie-1-color) !important; }
.book-card.serie-2 { border-left: 6px solid var(--serie-2-color) !important; }
.book-card.serie-3 { border-left: 6px solid var(--serie-3-color) !important; }
.book-card.serie-4 { border-left: 6px solid var(--serie-4-color) !important; }
.book-card.serie-5 { border-left: 6px solid var(--serie-5-color) !important; }

/* Ruban supÃ©rieur de sÃ©rie */
.book-series-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #FFFFFF;
}

.book-card.serie-1 .book-series-ribbon { background: var(--serie-1-color); }
.book-card.serie-2 .book-series-ribbon { background: var(--serie-2-color); }
.book-card.serie-3 .book-series-ribbon { background: var(--serie-3-color); }
.book-card.serie-4 .book-series-ribbon { background: var(--serie-4-color); }
.book-card.serie-5 .book-series-ribbon { background: var(--serie-5-color); }

.ribbon-collection {
  font-size: 0.68rem;
  opacity: 0.9;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Corps interne de la carte */
.book-card-body {
  padding: 1.15rem 1.15rem 0.5rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.book-badge-status {
  background: rgba(245, 158, 11, 0.22);
  color: #FDE047;
  border: 1.5px solid #F59E0B;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.book-badge-year {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(10, 14, 23, 0.6);
  color: #A7F3D0;
  border: 1px solid rgba(167, 243, 208, 0.3);
  font-weight: 600;
}

/* Maquette Visuelle de Couverture (Format Livre Ã‰lÃ©gant) */
.book-cover-mockup {
  position: relative;
  background: linear-gradient(135deg, #0A0F1D 0%, #151F32 100%);
  border: 1px solid rgba(253, 224, 71, 0.25);
  border-radius: 8px;
  padding: 1.15rem 1rem;
  margin-bottom: 1.1rem;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.35);
  text-align: center;
  overflow: hidden;
}

.book-cover-mockup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  bottom: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(255,255,255,0.06) 50%, rgba(0,0,0,0.4) 100%);
  border-right: 1px solid rgba(255,255,255,0.08);
}

.book-cover-brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FDE047;
  margin-bottom: 0.4rem;
}

.book-cover-serie-tag {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  opacity: 0.95;
}

.serie-1 .book-cover-serie-tag { color: var(--serie-1-light); }
.serie-2 .book-cover-serie-tag { color: var(--serie-2-light); }
.serie-3 .book-cover-serie-tag { color: var(--serie-3-light); }
.serie-4 .book-cover-serie-tag { color: var(--serie-4-light); }
.serie-5 .book-cover-serie-tag { color: var(--serie-5-light); }

.book-cover-display-title {
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: 0.96rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.35;
  margin: 0.35rem 0 0.8rem 0;
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover-emblem-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0.4rem auto 0.75rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(253, 224, 71, 0.35);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.serie-1 .book-cover-emblem-wrap { color: var(--serie-1-light); border-color: var(--serie-1-light); }
.serie-2 .book-cover-emblem-wrap { color: var(--serie-2-light); border-color: var(--serie-2-light); }
.serie-3 .book-cover-emblem-wrap { color: var(--serie-3-light); border-color: var(--serie-3-light); }
.serie-4 .book-cover-emblem-wrap { color: var(--serie-4-light); border-color: var(--serie-4-light); }
.serie-5 .book-cover-emblem-wrap { color: var(--serie-5-light); border-color: var(--serie-5-light); }

.book-cover-author-strip {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.book-cover-author-label {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94A3B8;
  font-weight: 600;
}

.book-cover-author-val {
  font-size: 0.82rem;
  font-weight: 800;
  color: #F8FAFC;
  letter-spacing: 0.05em;
}

/* Couverture 3D Réelle & Officielle (Haute Définition) */
.book-cover-real-3d-wrap {
  position: relative;
  background: linear-gradient(135deg, #0A0F1D 0%, #151F32 100%);
  border: 1.5px solid rgba(253, 224, 71, 0.35);
  border-radius: 10px;
  margin-bottom: 1.15rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 5.2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.book-cover-real-3d-wrap:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 20px rgba(251, 191, 36, 0.3);
  border-color: #FBBF24;
}

.book-cover-real-3d-wrap .book-cover-3d-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.book-cover-real-3d-wrap:hover .book-cover-3d-img {
  transform: scale(1.04);
}

.book-cover-3d-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.2) 55%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
  z-index: 3;
}

.book-cover-real-3d-wrap:hover .book-cover-3d-overlay {
  opacity: 1;
}

.btn-3d-zoom {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #0A0E17 !important;
  font-weight: 800;
  font-size: 0.74rem;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}

.book-cover-3d-badge-floating {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(10, 15, 29, 0.88);
  backdrop-filter: blur(6px);
  color: #FCD34D;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid rgba(252, 211, 77, 0.5);
  z-index: 2;
  box-shadow: 0 3px 8px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.03em;
}

/* Typographie de Notice */
.book-title {
  font-family: var(--font-heading, 'Cinzel', serif);
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 0.35rem 0;
  line-height: 1.35;
}

.book-subtitle-text {
  font-size: 0.8rem;
  color: #CBD5E1;
  font-weight: 500;
  margin-bottom: 0.55rem;
  line-height: 1.4;
}

.book-author-text {
  font-size: 0.8rem;
  color: #FDE047;
  font-weight: 600;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.book-quote-box {
  background: rgba(15, 23, 42, 0.6);
  border-left: 3px solid var(--accent-gold);
  padding: 0.6rem 0.75rem;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  font-size: 0.78rem;
  color: #E2E8F0;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.serie-1 .book-quote-box { border-left-color: var(--serie-1-light); }
.serie-2 .book-quote-box { border-left-color: var(--serie-2-light); }
.serie-3 .book-quote-box { border-left-color: var(--serie-3-light); }
.serie-4 .book-quote-box { border-left-color: var(--serie-4-light); }
.serie-5 .book-quote-box { border-left-color: var(--serie-5-light); }

.book-synopsis-text {
  font-size: 0.8rem;
  color: #94A3B8;
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

/* Pied de carte : ISBN & Code-barres */
.book-barcode-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
  margin-bottom: 0.85rem;
}

.book-isbn-label {
  font-size: 0.72rem;
  color: #64748B;
  font-family: monospace;
  font-weight: 600;
}

.barcode-graphic {
  display: flex;
  align-items: center;
  gap: 1.5px;
  height: 18px;
  padding: 2px 4px;
  background: #FFFFFF;
  border-radius: 2px;
}

.barcode-graphic span {
  display: inline-block;
  height: 100%;
  background: #000000;
  width: 1px;
}

.barcode-graphic span:nth-child(2n) { width: 2px; }
.barcode-graphic span:nth-child(3n) { width: 1.5px; }
.barcode-graphic span:nth-child(5n) { width: 2.5px; }

/* Actions Opérationnelles */
.book-card .pub-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.15rem 1.15rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 15, 25, 0.5);
  position: relative;
  z-index: 5;
}

.book-card .pub-actions .btn,
.book-card .pub-actions button,
.series-filter-toolbar .series-filter-btn,
.series-showcase-grid .series-showcase-card {
  cursor: pointer !important;
  pointer-events: auto !important;
  user-select: none;
}

.book-card.serie-hidden {
  display: none !important;
}