﻿/* ====================================== */
/* STYLES SPECIFIQUES POUR ACCUEIL.HTML */
/* ====================================== */
/* Ce fichier contient UNIQUEMENT les styles du hero-left et son contenu */
/* Tous les autres styles globaux sont dans common-styles.css */

/* ======================================
   WIDGET STATS COMMUNAUTÃ‰ (sidebar bas)
   ====================================== */

.community-stats-widget,
.community-stats-widget * {
  outline: none;
}

.community-stats-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 64px;
  margin-top: 12px;
  position: relative;
  z-index: 20;
  /* Variables par dÃ©faut (beige/blanc) */
  --csw-bg: #f5ede0;
  --csw-gold: #c9a84c;
  --csw-text: #1a4a35;
  --csw-label-color: rgba(26, 74, 53, 0.5);
  --csw-sep-color: rgba(201, 168, 76, 0.65);
  --csw-sep-line: rgba(201, 168, 76, 0.3);
}

body.theme-blanc .community-stats-widget {
  --csw-bg: #f4f4f4;
}

body.theme-noir .community-stats-widget {
  --csw-bg: #2a3a3d;
  --csw-text: #e0e0e0;
  --csw-label-color: rgba(224, 224, 224, 0.45);
}

body.theme-maquette .community-stats-widget {
  --csw-bg: #1b322d;
  --csw-gold: #c7993f;
  --csw-text: #e2d6bc;
  --csw-label-color: rgba(226, 214, 188, 0.45);
  --csw-sep-color: rgba(199, 153, 63, 0.65);
  --csw-sep-line: rgba(199, 153, 63, 0.3);
}

.csw-arch-top {
  width: 64px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.csw-arch-fill  { fill: var(--csw-bg); }
.csw-arch-stroke { stroke: var(--csw-gold); }
.csw-arch-accent { fill: var(--csw-gold); }

.csw-content {
  width: 64px;
  background: var(--csw-bg);
  border: 2px solid var(--csw-gold);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 4px 5px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.14));
}

.csw-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 2px 6px;
  width: 100%;
  text-align: center;
}

.csw-icon {
  width: 22px;
  height: 22px;
  color: var(--csw-gold);
  flex-shrink: 0;
  margin-bottom: 4px;
}

.csw-value {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--csw-text);
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.csw-value small {
  font-size: 10px;
  font-weight: 700;
  color: var(--csw-text);
}

.csw-value-sub {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 11px;
  font-weight: 700;
  color: var(--csw-text);
  line-height: 1.2;
  white-space: nowrap;
}

.csw-value-sub small {
  font-size: 9px;
  font-weight: 600;
  color: var(--csw-text);
}

.csw-label {
  font-family: var(--font-sans, system-ui);
  font-size: 8px;
  color: var(--csw-label-color);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
  margin-top: 2px;
}

.csw-sep {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  color: var(--csw-sep-color);
  font-size: 6px;
  line-height: 1;
  padding: 0 4px;
  box-sizing: border-box;
}

.csw-sep span {
  flex: 1;
  height: 1px;
  background: var(--csw-sep-line);
  display: block;
}

/* --- Ã‰tat par dÃ©faut : lÃ©gÃ¨rement transparent --- */
.community-stats-widget {
  opacity: 0.3;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

/* --- Hover : rÃ©vÃ¨le le widget complet --- */
.community-stats-widget:hover {
  opacity: 1;
}

/* Masquer sur mobile (sidebar masquÃ©e) */
@media (max-width: 768px) {
  .community-stats-widget { display: none; }
}

.hero-left {
  width: 100%;
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
  scroll-behavior: smooth;
  /* scroll fluide */
  scrollbar-width: none;
  /* Masquer scrollbar pour Firefox */
  -ms-overflow-style: none;
  /* Masquer scrollbar pour IE et Edge */
}

/* Masquer scrollbar pour Chrome/Safari */
.hero-left::-webkit-scrollbar {
  display: none;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  color: var(--text-primary);
  font-weight: 600;
  max-width: 600px;
  letter-spacing: -0.5px;
  font-family: var(--font-serif);
  margin: 0 0 8px 0;
}

p.lead {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
  max-width: 500px;
  font-family: var(--font-sans);
  margin-bottom: 16px;
}

/* Conteneur des boutons d'action */
.action-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* Bouton primaire */
.start-button {
  background-color: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  padding: 11px 22px;
  border-radius: var(--card-radius);
  border: 0;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(46, 74, 64, 0.2);
  transition: var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.start-button:hover {
  background-color: var(--accent-dark);
  box-shadow: 0 6px 16px rgba(46, 74, 64, 0.3);
  transform: translateY(-2px);
}

/* Bouton Reprendre la lecture */
.resume-button {
  background-color: var(--panel);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  padding: 11px 22px;
  border-radius: var(--card-radius);
  border: 1px solid rgba(46, 74, 64, 0.2);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.resume-button:hover {
  background-color: var(--panel-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* --- Carousel --- */
.carousel-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  max-width: 100%;
  min-height: 320px;
  position: relative;
  gap: 24px;
  overflow-x: hidden;
  overflow-y: visible;
  padding-top: 10px;
  padding-bottom: 20px;
  padding-left: 20px;
  padding-right: 20px;
}

/* --- Livres du carousel --- */
.book {
  width: 160px;
  flex: 0 0 auto;
  align-self: flex-start;
  text-align: center;
  transform-origin: center bottom;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  will-change: transform;
  transform-style: preserve-3d;
  margin-top: 10px;
}

.book-cover-wrap {
  position: relative;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Mise en valeur "nouveauté" (cf. js/novelty.js) — bordure fixe + anneau
   scintillant qui se détache VERS L'EXTÉRIEUR (outline, cf. commentaire
   détaillé dans Bibliotheque-style.css — une bordure animée en épaisseur
   donnait une impression d'animation "vers l'intérieur"). Même technique
   que la Bibliothèque, dupliquée ici : chaque page charge son propre CSS
   indépendamment. Vert du site (--accent, cf. common-styles.css), donc
   varie selon le thème actif — distinct du vert vif utilisé par la
   sélection des modes de jeu du hub quiz. */
.book.book-novelty .book-cover-wrap {
  --novelty-color: var(--accent);
  border: 2px solid var(--novelty-color);
  border-radius: var(--cover-radius, 4px);
  animation: noveltyPulse 1.4s ease-out infinite;
}
/* Livre entièrement nouveau (kind book_added, cf. js/novelty.js) : doré au
   lieu du vert vif, dans tous les thèmes. */
.book.book-novelty.book-novelty-gold .book-cover-wrap {
  --novelty-color: var(--accent-gold, #b89e14);
}
@keyframes noveltyPulse {
  0% { outline: 2px solid color-mix(in srgb, var(--novelty-color) 75%, transparent); outline-offset: 0; }
  100% { outline: 2px solid color-mix(in srgb, var(--novelty-color) 0%, transparent); outline-offset: 8px; }
}

.book img {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: var(--cover-radius, 4px);
  display: block;
  background: var(--panel);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

/* Hover Effect - Lift & Glow */
.carousel-wrap .book:hover {
  z-index: 50 !important;
}

.carousel-wrap .book:hover .book-cover-wrap {
  transform: translateY(-8px) scale(1.05);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.carousel-wrap .book:hover img,
.carousel-wrap .book:focus-visible img {
  will-change: transform;
}

/* Trigger hover Accueil â€” base dans common-styles.css */
.carousel-wrap .book:hover .book-hover-overlay {
  opacity: 1;
}

.book-title {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-serif);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-top: 12px;
  opacity: 0;
  text-align: center;
  line-height: 1.4;
  transition: var(--transition-normal);
  transform: translateY(5px);
}

.book-title-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book.image-loaded .book-title {
  opacity: 0.8;
  transform: translateY(0);
}

.carousel-wrap .book:hover .book-title {
  opacity: 1;
  color: var(--accent);
  transform: translateY(-2px);
}

.book-title small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--accent-gold);
  font-weight: 500;
  font-style: italic;
  font-family: var(--font-serif);
  text-transform: none;
  letter-spacing: 0;
}


/* --- Optimisations Mobile --- */

/* AmÃ©liorer les interactions tactiles */
@media (hover: none) and (pointer: coarse) and (max-width: 768px) {

  /* DÃ©sactiver les effets hover sur mobile uniquement */
  .icon:hover {
    transform: none;
    color: var(--muted);
  }

  /* AmÃ©liorer la taille des zones tactiles — min-width/height seuls : le
     seul Ã©lÃ©ment avec class="icon" pur ici est l'icÃ´ne du menu du bas
     (bottom nav, common-layout.js), dÃ©jÃ  â‰¥44px sur toutes les tailles
     d'Ã©cran. padding:8px la rÃ©trÃ©cissait (box-sizing:border-box) sous la
     taille de son image interne (40px) en paysage (icÃ´ne 46Ã—44px), cassant
     le centrage margin:auto de l'image â€” dÃ©calage visible du logo dans le
     bouton. */
  .icon {
    min-width: 44px;
    min-height: 44px;
  }

  /* Le survol tactile ne se "relâche" jamais vraiment (pas de vrai pointeur
     qui quitte l'élément) : sans ce reset, un livre du carrousel touché puis
     relâché restait agrandi (lift + scale) jusqu'au prochain tap ailleurs. */
  .carousel-wrap .book:hover {
    z-index: auto !important;
  }
  .carousel-wrap .book:hover .book-cover-wrap {
    transform: none;
    box-shadow: none;
  }
  .carousel-wrap .book:hover .book-title {
    opacity: 0;
    color: var(--text-primary);
    transform: translateY(5px);
  }
  .carousel-wrap .book.image-loaded:hover .book-title {
    opacity: 0.8;
    color: var(--text-primary);
    transform: translateY(0);
  }
}

/* Zoom Ã©levÃ© (Ã©cran moyen avec zoom) */
@media (max-width: 980px) {
  /* Layout .wrap/.sidebar/.icon gÃ©rÃ© par common-mobile.css */

  h1 {
    font-size: 36px;
  }

  .book {
    width: 130px;
  }
}

/* Navigation mobile Ã¢â‚¬â€ layout global dÃ©placÃ© dans common-mobile.css */
@media (max-width: 768px) {

  .home-banner-slide {
    padding: 12px 16px 26px;
  }

  .hero-left {
    min-height: auto;
    padding-top: 0;
    flex: 1;
    overflow: visible;
  }

  h1 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 16px;
  }

  p.lead {
    text-align: center;
    font-size: 16px;
    margin-bottom: 24px;
  }

  .btn-primary {
    display: block;
    margin: 0 auto 24px auto;
    width: fit-content;
    padding: 12px 24px;
    font-size: 16px;
  }

  .carousel-wrap {
    margin-top: 20px;
    position: relative;
  }

  .book {
    width: 120px;
    flex-shrink: 0;
  }

  .book img {
    box-shadow: -8px 8px 15px rgba(0, 0, 0, 0.3);
  }

  .book-detail {
    flex-direction: column;
    text-align: center;
    margin: 16px 0;
    padding: 16px;
  }

  .book-detail img {
    width: 120px;
    margin: 0 auto 16px auto;
  }

  .book-detail .buttons {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .book-detail .btn {
    flex: 1;
    min-width: 120px;
    margin: 4px;
  }

}

/* Zoom trÃ¨s Ã©levÃ© (trÃ¨s petit Ã©cran) */
@media (max-width: 520px) {
  h1 {
    font-size: 28px;
  }

  .book {
    width: 120px;
  }

  .search {
    width: 100%;
  }

  .category-filters {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-btn {
    margin-bottom: 4px;
  }
}

/* AmÃ©liorations pour les trÃ¨s petits Ã©crans mobiles */
@media (max-width: 480px) {
  .wrap {
    margin: 4px;
    padding: 12px;
  }

  h1 {
    font-size: 28px;
  }

  .book {
    width: 100px;
  }

  .filter-btn {
    font-size: 12px;
    padding: 8px 12px;
  }

  .search {
    height: 44px;
  }
}

/* TrÃ¨s petits Ã©crans Ã¢â‚¬â€ garder uniquement les rÃ¨gles page-spÃ©cifiques */
@media (max-width: 400px), (max-height: 400px) {
  /* Layout .wrap/.sidebar/.icon gÃ©rÃ© par common-mobile.css */

  h1 {
    font-size: 24px;
    line-height: 1.1;
  }

  .book {
    width: 100px;
  }

  .filter-btn {
    padding: 4px 8px;
    font-size: 12px;
  }
}

/* Zoom extrÃªme - layout vertical */
@media (max-width: 320px) {
  /* Layout .wrap/.sidebar/.icon gÃ©rÃ© par common-mobile.css */

  .book {
    width: 90px;
  }
}

/* Zoom trÃ¨s Ã©levÃ© - ajustements pour les trÃ¨s petits Ã©crans */
@media (max-width: 280px) {
  /* Layout .wrap/.sidebar/.icon gÃ©rÃ© par common-mobile.css */

  h1 {
    font-size: 20px;
  }

  .book {
    width: 80px;
  }

  .search {
    height: 35px;
  }

  .filter-btn {
    padding: 3px 6px;
    font-size: 10px;
  }
}

/* Modal des rÃ©sumÃ©s */
.resumes-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.resumes-modal.active {
  opacity: 1;
}

.resumes-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.resumes-modal-content {
  position: relative;
  background: var(--panel-light);
  border-radius: var(--card-radius);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.resumes-modal-header {
  background: var(--panel-light);
  border-bottom: 1px solid rgba(44, 53, 57, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel);
}

.resumes-modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--text-primary);
  font-family: var(--font-serif);
}

.resumes-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #718096;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.resumes-modal-close:hover {
  background: #f7fafc;
  color: #2d3748;
  transform: rotate(90deg);
}

.resumes-modal-book-info {
  padding: 20px 30px;
  display: flex;
  gap: 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #e2e8f0;
}

.resumes-modal-book-info img {
  width: 60px;
  /* 90px = 60 * 3/2, ratio 2:3 exact — voir .banner-latest-cover plus haut */
  height: 90px;
  object-fit: cover;
  border-radius: var(--cover-radius, 4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.resumes-modal-book-info h3 {
  margin: 0 0 5px 0;
  font-size: 16px;
  color: #2d3748;
}

.resumes-modal-book-info p {
  margin: 0;
  font-size: 14px;
  color: #718096;
}

.resumes-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px 30px;
}

.resume-item {
  display: flex;
  gap: 15px;
  padding: 20px;
  background: var(--panel-light);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 15px;
  /* "all" animait aussi padding/background/border-radius à la première
     apparition (liste construite dynamiquement) — :hover ne change que
     border-color/box-shadow/transform. */
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.resume-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.resume-number {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: white;
  border-radius: var(--card-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.resume-content {
  flex: 1;
}

.resume-content h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #2d3748;
  font-weight: 600;
}

.resume-description {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #4a5568;
  line-height: 1.5;
}

.resume-date {
  margin: 0;
  font-size: 12px;
  color: #a0aec0;
}

.resume-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.resume-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.resume-btn-read {
  background: var(--accent, #3c8c6c);
  color: white;
}

.resume-btn-read:hover {
  background: #2d6b52;
  transform: translateX(-2px);
}

.resume-btn-download {
  background: #4299e1;
  color: white;
}

.resume-btn-download:hover {
  background: #3182ce;
  transform: translateX(-2px);
}

.resumes-modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #e2e8f0;
  text-align: right;
  background: #f8f9fa;
}

.resumes-modal-close-btn {
  padding: 10px 24px;
  background: #e2e8f0;
  color: #2d3748;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.resumes-modal-close-btn:hover {
  background: #cbd5e0;
}

.btn.resume {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn.resume:hover {
  background: linear-gradient(135deg, #5568d3 0%, #64398b 100%);
}

@media (max-width: 768px) {
  .resumes-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .resumes-modal-header {
    padding: 20px;
  }

  .resumes-modal-book-info {
    padding: 15px 20px;
  }

  .resumes-list {
    padding: 15px 20px;
  }

  .resume-item {
    flex-direction: column;
    gap: 12px;
  }

  .resume-number {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .resume-actions {
    flex-direction: row;
    width: 100%;
    justify-content: flex-start;
  }

  .resume-btn {
    flex: 1;
    justify-content: center;
  }

  .resumes-modal-footer {
    padding: 15px 20px;
  }
}

.resumes-list::-webkit-scrollbar {
  width: 8px;
}

.resumes-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.resumes-list::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

.resumes-list::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* --- Home Banner Carousel (remplace resume-reading) --- */
.home-banner {
  width: 94%;
  max-width: 1000px;
  margin: 0 auto 24px auto;
  position: relative;
  overflow: visible; /* Permet aux flÃ¨ches de dÃ©passer */
  z-index: 10;
}

/* Nouveau conteneur interne pour le style et l'overflow */
.home-banner-inner {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  /* transform: translateZ(0) â†’ force un compositing layer sur cet Ã©lÃ©ment.
     Sans Ã§a, le track (will-change:transform) crÃ©e un layer GPU indÃ©pendant
     qui ne respecte pas l'overflow:hidden du parent non-compositÃ©,
     laissant apparaÃ®tre un fragment de la slide suivante sur le bord droit. */
  transform: translateZ(0);
  box-shadow:
    inset 0 0 0 1px rgba(44, 53, 57, 0.08),
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.home-banner-track {
  display: flex;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.home-banner-slide {
  flex: 0 0 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 10px 20px 32px;
  min-height: 150px;
  display: flex;
  position: relative;
}

/* Couleurs de fond alternÃ©es (1, 2, 3 cyclique) assignÃ©es dynamiquement par JS */
/* Fallback : couleur neutre avant que data-bg soit assignÃ© */
.home-banner-slide:not([data-bg]) { background: var(--panel); }
.home-banner-slide[data-bg="1"] { background: var(--panel-light); }
.home-banner-slide[data-bg="2"] { background: var(--panel); }
.home-banner-slide[data-bg="3"] { background: var(--bg); }

/* --- Panneau 1 : Hero prÃ©sentation --- */
.banner-hero-slide {
  align-items: center;
}

/* --- Motifs dÃ©coratifs (Arabesques JPG) du bandeau --- */
.home-banner-slide {
  position: relative;
}

/* ================================================================ */
/* Arabesques aux coins â€” ::before = coin A, ::after = coin B       */
/* ================================================================ */

/* Styles communs aux deux pseudo-Ã©lÃ©ments */
.home-banner-slide::before,
.home-banner-slide::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;                   /* Un peu plus visible sur fond clair */
  background-image: url("assets/ornaments/ornament-1.svg");
  background-size: contain;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;        /* Le blanc devient transparent sur fond parchemin */
}

/* Slide 1 (dÃ©faut) : ::before = haut-droit, ::after = bas-gauche */
.home-banner-slide::before {
  top: 0;
  right: 0;
  bottom: auto;
  left: auto;
}
.home-banner-slide::after {
  bottom: 0;
  left: 0;
  top: auto;
  right: auto;
  display: block;
}

.home-banner-slide > * {
  position: relative;
  z-index: 1;
}

.banner-hero-slide {
  position: relative;
}

.banner-hero-content {
  max-width: 520px;
}

.banner-hero-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent); /* Passage au vert habituel */
  margin: 0 0 6px 0;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.banner-hero-lead {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0 0 12px 0;
}

.banner-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.banner-hero-cta {
  background: #DCC4A0; /* Marron mat plus soutenu */
  color: var(--accent);
  border: 1px solid rgba(44, 53, 57, 0.1);
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.banner-hero-cta:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 82, 56, 0.2);
}

.banner-continue-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none;
}
.banner-continue-btn:hover {
  background: var(--accent-dark); /* Plus sombre pour bien voir le texte blanc */
  color: #fff;
  border-color: var(--accent-dark);
}

/* Même traitement que .banner-continue-btn pour rester cohérent quand les
   deux boutons sont côte à côte dans .banner-hero-actions (mobile). */
.banner-install-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.banner-install-btn:hover {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}

/* --- Panneau 2 : Dernier livre ajoutÃ© --- */
.banner-latest-book-slide {
  flex-direction: column;
}

.banner-latest-book-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
  max-width: 480px;
  min-width: 0;
  margin: 0 auto;
}

.banner-latest-cover {
  width: 72px;
  /* 108px = 72 * 3/2, ratio 2:3 exact des couvertures (COVER_SMALL, voir
     lib/imgTransform.js) — évite qu'object-fit:cover recadre une image déjà
     recadrée côté serveur à ce ratio, ce qui coupait le bas de la couverture. */
  height: 108px;
  object-fit: cover;
  border-radius: var(--cover-radius, 4px);
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.banner-latest-book-content {
  transition: transform 0.2s ease;
}
.banner-latest-book-slide:hover .banner-latest-cover {
  transform: scale(1.07);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
  will-change: transform;
}
.banner-latest-book-slide:hover .banner-latest-link {
  color: var(--accent-gold, #b89e14);
}
.banner-latest-book-slide:hover .banner-latest-book-content {
  transform: translateY(-2px);
}

.banner-latest-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.banner-latest-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.banner-latest-author {
  font-size: 12px;
  color: var(--text-secondary);
}

.banner-latest-cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.banner-latest-category {
  font-size: 11px;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.banner-latest-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
}

.banner-latest-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent); /* Passage au vert pour lisibilitÃ© sur fond clair */
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Panneau 4 : Historique de lecture --- */
.banner-history-slide {
  flex-direction: column;
}

.banner-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.banner-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.banner-section-icon svg {
  width: 16px;
  height: 16px;
}

.banner-section-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.banner-history-books {
  display: flex;
  gap: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  min-width: 0;
  flex: 1;
  padding-top: 4px;
  overflow: visible;
}

.banner-history-books::-webkit-scrollbar {
  display: none;
}

/* Carte de livre dans le bandeau */
.banner-book-card {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  gap: 8px;
  padding: 7px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  cursor: pointer;
  /* "all" animait aussi padding/border-radius à la toute première apparition
     de la carte (injectée dynamiquement dans le bandeau) — flash "texte brut
     sans carte visible". :hover ne change que background/transform/border-color. */
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.12);
}

.banner-book-card:hover {
  background: rgba(0, 0, 0, 0.14);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
}

.banner-book-cover {
  width: 42px;
  min-width: 34px;
  /* 63px = 42 * 3/2, ratio 2:3 exact — voir .banner-latest-cover plus haut */
  height: 63px;
  object-fit: cover;
  border-radius: var(--cover-radius, 4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}
.banner-book-card:hover .banner-book-cover,
.banner-book-card:focus-visible .banner-book-cover {
  will-change: transform;
}

.banner-book-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.banner-book-title {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.banner-book-author {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.6);
  font-style: italic;
  font-family: var(--font-serif);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-book-chapter {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.banner-book-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.banner-progress-track {
  flex: 1;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.banner-progress-fill {
  height: 100%;
  background: var(--accent-gold);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.banner-progress-text {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-gold);
  min-width: 28px;
  text-align: right;
}

.banner-book-pages {
  font-size: 9px;
  color: rgba(0, 0, 0, 0.4);
  margin-top: 1px;
}

/* --- Panneau 5 : DerniÃ¨res notes --- */
.banner-notes-slide {
  flex-direction: column;
}

.banner-notes-list {
  display: flex;
  gap: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  min-width: 0;
  flex: 1;
  padding-top: 4px;
  overflow: visible;
}

.banner-notes-list::-webkit-scrollbar {
  display: none;
}

.banner-note-card {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  cursor: pointer;
  /* voir .banner-book-card ci-dessus : même correctif anti-flash */
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
}

.banner-note-card:hover {
  background: rgba(0, 0, 0, 0.14);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
}

.banner-note-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-note-color {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.banner-note-book {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.banner-note-text {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-style: italic;
}

.banner-note-date {
  font-size: 10px;
  color: var(--muted);
}

/* --- Panneau 6 : Biographies rÃ©centes des Shouyoukh --- */
.banner-bio-slide {
  flex-direction: column;
}

.banner-bio-list {
  display: flex;
  justify-content: center;
  gap: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  min-width: 0;
  flex: 1;
  padding-top: 4px;
  overflow: visible;
}

.banner-bio-list::-webkit-scrollbar {
  display: none;
}

.banner-bio-card {
  /* Un seul auteur affiché désormais (plus 4) : ne grandit plus pour remplir
     toute la largeur — largeur fixe + .banner-bio-list en justify-content:
     center pour rester une carte centrée, pas une bannière étirée. */
  flex: 0 1 340px;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  cursor: pointer;
  /* voir .banner-book-card ci-dessus : même correctif anti-flash */
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.banner-bio-card:hover {
  background: rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
}

.banner-bio-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.banner-bio-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: rgba(200, 155, 60, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid rgba(200, 155, 60, 0.3);
}

.banner-bio-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.banner-bio-identity {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.banner-bio-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.banner-bio-name {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.banner-bio-name-arabic {
  align-self: flex-end;
  font-family: var(--font-arabic, 'Amiri', serif);
  font-size: 12px;
  color: var(--accent-gold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
  text-align: right;
}

.banner-bio-dua {
  display: inline-block;
  align-self: flex-end;
  flex-shrink: 0;
  font-family: var(--font-arabic, 'Amiri', serif);
  font-size: 10px;
  color: var(--accent-gold);
  border: 1px solid rgba(200, 155, 60, 0.5);
  border-radius: 20px;
  padding: 0px 8px;
  line-height: 1.3;
}

/* ThÃ¨me beige : le dorÃ© devient illisible au survol â€” on utilise la couleur primaire */
body.theme-beige .banner-bio-name,
body.theme-blanc .banner-bio-name {
  color: var(--text-primary);
}

body.theme-beige .banner-bio-name-arabic,
body.theme-blanc .banner-bio-name-arabic,
body.theme-beige .banner-bio-dua,
body.theme-blanc .banner-bio-dua {
  color: #8B6914;
}

body.theme-beige .banner-bio-dua,
body.theme-blanc .banner-bio-dua {
  border-color: rgba(180, 135, 20, 0.4);
}

/* Badges domaines d'expertise : rgba(gold,0.2) + #d4af5f sont invisibles sur fond clair */
body.theme-beige .banner-bio-tag,
body.theme-blanc .banner-bio-tag {
  background: rgba(180, 135, 20, 0.13);
  color: #8B6914;
}

/* ================================================================ */
/*  THÃˆME SOMBRE â€” Banderole                                        */
/* ================================================================ */

/* SVG icÃ´nes en-tÃªte de slide : passer au vert clair du thÃ¨me sombre */
body.theme-noir .banner-section-icon svg {
  stroke: var(--accent-light);
}

/* Cartes "Reprendre la lecture" : textes noir-rgba â†’ couleurs thÃ¨me sombre */
body.theme-noir .banner-book-author {
  color: var(--text-secondary);
}
body.theme-noir .banner-book-chapter {
  color: var(--muted);
}
body.theme-noir .banner-book-pages {
  color: var(--muted);
}
body.theme-noir .banner-progress-track {
  background: rgba(255, 255, 255, 0.15);
}
body.theme-noir .banner-book-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent-light);
}

.banner-bio-dates {
  font-size: 10px;
  color: var(--text-secondary);
  font-style: italic;
}

.banner-bio-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.banner-bio-tag {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(200, 155, 60, 0.2);
  color: var(--accent-gold-light);
  white-space: nowrap;
}

.banner-bio-meta {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  opacity: 0.8;
}

.banner-bio-excerpt {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0.85;
}

/* Mobile : masquer génération/lieu, dates et extrait de bio — ne garder que
   l'avatar et l'identité (nom fr, nom ar, du'a, chacun sur sa ligne) */
@media (max-width: 768px) {
  .banner-bio-body {
    display: none;
  }

  /* Le médaillon grandit pour occuper toute la hauteur des 3 lignes d'identité */
  .banner-bio-header {
    align-items: stretch;
    width: 100%;
    height: 100%;
  }

  .banner-bio-avatar {
    width: auto;
    height: auto;
    min-width: 0;
    aspect-ratio: 1 / 1;
    /* Garde-fou : empêche le médaillon de devenir démesuré si le contenu
       texte à côté venait à s'étirer sur une hauteur inhabituelle */
    max-height: 70px;
    max-width: 70px;
  }
}

/* --- Indicateurs du bandeau --- */
.home-banner-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 4px;
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.home-banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  flex-shrink: 0;
}

.home-banner-dot:hover {
  background: rgba(0, 0, 0, 0.3);
  transform: scale(1.2);
}

.home-banner-dot.active {
  background: var(--accent);
  width: 20px;
  border-radius: 3px;
}

/* Quand la banniÃ¨re n'a qu'un seul panneau, cacher les indicateurs */
.home-banner-indicators:empty {
  display: none;
}

/* --- FlÃ¨ches de navigation du bandeau --- */
.home-banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.12));
  background: var(--panel);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  pointer-events: auto;
}

.home-banner-arrow:hover {
  background: var(--panel-light);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  border-color: var(--border-color, rgba(0, 0, 0, 0.2));
}

.home-banner-arrow-left {
  left: -18px; /* MoitiÃ© dehors (36/2) */
}

.home-banner-arrow-right {
  right: -18px;
}

.home-banner-arrow svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.home-banner-arrow.hidden {
  display: none;
}

/* --- Glisser/déposer du bandeau --- */
.home-banner-inner {
  cursor: grab;
  touch-action: pan-y;
}

.home-banner-inner:active {
  cursor: grabbing;
}

.home-banner-track img {
  -webkit-user-drag: none;
  user-select: none;
}

/* --- Main animée invitant à glisser le bandeau (affichée une seule fois) --- */
.banner-swipe-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 25;
  pointer-events: none;
  color: #fff;
  opacity: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  transform: translate(-50%, -50%);
}

.banner-swipe-hint.show {
  animation: banner-swipe-hand-move 1.6s ease-in-out 1;
}

@keyframes banner-swipe-hand-move {
  0%   { opacity: 0; transform: translate(calc(-50% + 22px), -50%) scale(1); }
  10%  { opacity: 1; }
  25%  { transform: translate(calc(-50% + 22px), -50%) scale(0.85); }
  60%  { transform: translate(calc(-50% - 22px), -50%) scale(0.85); }
  75%  { transform: translate(calc(-50% - 22px), -50%) scale(1); }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% - 22px), -50%) scale(1); }
}

/* ================================================================ */
/* Arabesques par slide â€” chaque coin positionnÃ© indÃ©pendamment    */
/* ================================================================ */

/* --- Slide 2 â€” Dernier livre : haut-gauche (dÃ©calÃ© 40px du haut) + bas-droite (dÃ©calÃ© 40px du bas) --- */
.banner-latest-book-slide::before {
  background-image: url("assets/ornaments/ornament-2.svg");
  top: 10px;   /* Ã©loignÃ© du bord haut */
  left: 0;
  right: auto;
  bottom: auto;
}
.banner-latest-book-slide::after {
  background-image: url("assets/ornaments/ornament-2.svg");
  bottom: 10px; /* Ã©loignÃ© du bord bas */
  right: 0;
  left: auto;
  top: auto;
}

/* --- Slide 3 â€” Historique : haut-droit + bas-gauche --- */
.banner-history-slide::before {
  background-image: url("assets/ornaments/ornament-5.svg");
  top: 0;
  right: 0;
  left: auto;
  bottom: 0;
}
.banner-history-slide::after {
  background-image: url("assets/ornaments/ornament-5.svg");
  bottom: 0;
  left: 0;
  right: auto;
  top: 40px;
}

/* --- Slide 4 â€” Notes : bas-droite + haut-gauche --- */
.banner-notes-slide::before {
  background-image: url("assets/ornaments/ornament-1.svg");
  bottom: 0;
  right: 0;
  top: auto;
  left: auto;
}
.banner-notes-slide::after {
  background-image: url("assets/ornaments/ornament-1.svg");
  top: 0;
  left: 0;
  bottom: auto;
  right: auto;
}

/* --- Slide 5 â€” Bio : haut-droite + bas-gauche --- */
.banner-bio-slide::before {
  background-image: url("assets/ornaments/ornament-2.svg");
  top: 0;
  right: 0;
  left: auto;
  bottom: auto;
}
.banner-bio-slide::after {
  background-image: url("assets/ornaments/ornament-2.svg");
  bottom: 0;
  left: 0;
  right: auto;
  top: auto;
}

/* --- Slide 6 â€” RÃ©fÃ©rence du jour : bas-gauche + haut-droite --- */
.banner-daily-ref-slide::before {
  background-image: url("assets/ornaments/ornament-1.svg");
  bottom: 0;
  left: 0;
  top: auto;
  right: auto;
}
.banner-daily-ref-slide::after {
  background-image: url("assets/ornaments/ornament-1.svg");
  top: 0;
  right: 0;
  bottom: auto;
  left: auto;
}

/* Fallback reveal supprimÃ© : le bandeau est visible immÃ©diatement */

/* ====================================================
   Slide : RÃ©fÃ©rence du jour (banner-daily-ref-slide)
   ==================================================== */
.banner-daily-ref-slide {
  flex-direction: column;
}

.banner-daily-ref-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  flex: 1;
}

.banner-daily-ref-sourate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.banner-daily-ref-sourate-arabic {
  font-family: 'Amiri', 'Noto Naskh Arabic', serif;
  font-size: 1rem;
  direction: rtl;
  color: var(--accent, #1A5238);
  font-weight: 600;
}

.banner-daily-ref-sourate-latin {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent-gold, #b89e14);
  font-weight: 600;
}

.banner-daily-ref-reference {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold, #b89e14);
}

.banner-daily-ref-arabic {
  font-family: 'Amiri', 'Noto Naskh Arabic', serif;
  font-size: 1.3rem;
  line-height: 1.9;
  direction: rtl;
  text-align: center;
  color: var(--text-primary, #1a1a1a);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

.banner-daily-ref-translation {
  font-size: 12px;
  font-style: italic;
  color: var(--text-secondary, #5C4A32);
  text-align: center;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

/* ====================================================
   Slide : Note du jour (banner-daily-note-slide)
   ==================================================== */
.banner-daily-note-slide {
  flex-direction: column;
  gap: 12px;
}

.banner-daily-note-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 8px;
}

.banner-daily-note-quote {
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-primary, #1a1a1a);
  text-align: center;
  margin: 0;
  padding: 0 16px;
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.banner-daily-note-quote::before {
  content: '\201C';
  font-family: var(--font-serif, Georgia, serif);
  font-size: 56px;
  line-height: 0;
  color: var(--accent-gold, #b89e14);
  opacity: 0.35;
  position: absolute;
  top: 18px;
  left: 0;
  font-style: normal;
}

.banner-daily-note-quote::after {
  content: '\201D';
  font-family: var(--font-serif, Georgia, serif);
  font-size: 56px;
  line-height: 0;
  color: var(--accent-gold, #b89e14);
  opacity: 0.35;
  position: absolute;
  bottom: -8px;
  right: 0;
  font-style: normal;
}

.banner-daily-note-source {
  font-size: 11.5px;
  font-style: normal;
  font-weight: 600;
  color: var(--accent-gold, #b89e14);
  text-align: right;
  width: 100%;
  padding-right: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Panneau Prochainement --- */
.banner-coming-soon-slide {
  flex-direction: column;
}
.banner-coming-soon-content {
  display: flex;
  gap: 20px;
  align-items: center;
  max-width: 480px;
  min-width: 0;
  margin: 0 auto;
}
.banner-coming-soon-cover-wrap {
  width: 72px;
  /* 108px = 72 * 3/2, même ratio 2:3 que .banner-latest-cover ci-dessus —
     évite de recadrer le bas de la couverture (déjà recadrée à ce ratio
     côté serveur, voir COVER_SMALL dans lib/imgTransform.js). */
  height: 108px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--cover-radius, 4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.banner-coming-soon-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px);
  transform: scale(1.12);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.banner-coming-soon-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.banner-coming-soon-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-gold, #b89e14);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.banner-coming-soon-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.banner-coming-soon-author {
  font-size: 12px;
  color: var(--text-secondary);
}

/* DÃ©corations arabesques */
.banner-coming-soon-slide::before {
  background-image: url("assets/ornaments/ornament-3.svg");
  top: 0;
  right: 0;
  left: auto;
  bottom: 0;
}
.banner-coming-soon-slide::after {
  background-image: url("assets/ornaments/ornament-3.svg");
  bottom: 0;
  left: 0;
  right: auto;
  top: 40px;
}

.banner-daily-note-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.banner-note-page {
  font-size: 10px;
  color: var(--muted, #888);
  background: rgba(0, 0, 0, 0.07);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
  white-space: nowrap;
}

.banner-daily-note-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.banner-daily-note-tag {
  background: #e3f2fd;
  color: #1976d2;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

body.theme-noir .banner-daily-note-tag {
  background: rgba(100, 160, 220, 0.15);
  color: #90caf9;
}

.banner-daily-note-highlight {
  font-size: 12.5px;
  font-style: italic;
  color: var(--text-primary, #222);
  line-height: 1.6;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

.banner-daily-note-annotation {
  font-size: 11px;
  color: var(--text-secondary, #555);
  line-height: 1.5;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

/* DÃ©corations arabesques */
.banner-daily-note-slide::before {
  background-image: url("assets/ornaments/ornament-4.svg");
  top: 0;
  right: 0;
  bottom: auto;
  left: auto;
}
.banner-daily-note-slide::after {
  background-image: url("assets/ornaments/ornament-4.svg");
  bottom: 0;
  left: 0;
  top: auto;
  right: auto;
}

/* --- Titre de section Accueil (style BibliothÃ¨que/Mes Notes) --- */
.accueil-section-title {
  width: 100%;
  padding: 0 4px;
  flex-shrink: 0;
  margin-bottom: 8px;
}

.accueil-section-title h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 8px 0 12px 0; /* AugmentÃ© la marge basse pour l'espace de la ligne */
  letter-spacing: -0.3px;
  position: relative;
}

.accueil-section-title h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent-gold, #b89e14);
  border-radius: 2px;
  margin-top: 8px;
}
