/* ===========================
   Variables CSS Globales
   =========================== */
   :root {
    /* Couleurs */
    --color-background: var(--surface-page);
    --color-dark-gray: var(--surface-zone);
    --color-text-primary: var(--text-primary);
    --color-text-secondary: var(--text-secondary);
    --color-accent-primary: #8B0000; /* Rouge royal */
    --color-accent-secondary: #d4af37; /* Or */
    --color-border: #1A1A1A; /* Gris très sombre */
    --color-shadow: rgba(0, 0, 0, 0.7); /* Ombre noire */
    --color-button-gradient: linear-gradient(45deg, #8B0000, #d4af37);

    /* Typographie */
    --font-primary: var(--font-sans);
    --font-secondary: var(--font-body);

    /* Spacing */
    --spacing-small: 8px;
    --spacing-medium: 16px;
    --spacing-large: 24px;

    /* Border Radius */
    --border-radius: 8px;
}

/* ===========================
   Styles Globaux
   =========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-background);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--color-accent-primary);
    transition: color 0.3s;
}

a:hover {
    color: var(--color-accent-secondary);
}

ul {
    list-style: none;
    padding: 0;
}

/* ===========================
   Barre Supérieure (Entête)
   =========================== */
/* header {
    width: 100%;
    height: 80px;
    background-color: var(--color-dark-gray); 
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-large);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px var(--color-shadow);
} */

header .left-actions,
header .right-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-medium);
}

header .left-actions button,
header .right-actions button {
    background: var(--color-button-gradient);
    border: none;
    color: var(--color-text-primary);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font-secondary);
    transition: transform 0.3s, opacity 0.3s;
}

header .left-actions button:hover,
header .right-actions button:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

header .right-actions .search-bar {
    position: relative;
}

header .right-actions .search-bar input {
    padding: 8px 12px;
    border: 1px solid var(--color-accent-primary);
    border-radius: var(--border-radius);
    outline: none;
    font-family: var(--font-secondary);
    width: 200px;
    transition: width 0.3s;
    background-color: var(--color-dark-gray);
    color: var(--color-text-primary);
}

header .right-actions .search-bar input::placeholder {
    color: var(--color-text-secondary);
}

header .right-actions .profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--color-accent-primary);
}

header .right-actions .profile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ===========================
   Conteneur Principal
   =========================== */
   .main-content {
    /* On conserve le margin vertical et le centrage si nécessaire */
    margin: 40px auto;
    /* On retire le padding horizontal */
    padding: 0;
    display: grid;
    grid-gap: var(--spacing-large);
    gap: var(--spacing-large);
    grid-template-columns: 3fr 1fr;
    max-width: auto;
}

/* H1 de la home : une ligne d'en-tete, petites capitales entre deux filets. */
.home-h1 {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 900px;
    margin: 16px auto 10px;
    padding: 0 16px;
    font-family: var(--font-primary);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}
.home-h1::before,
.home-h1::after {
    content: "";
    flex: 1 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}
.home-h1 span { flex: none; }

/* "À propos" en pied de page : meme panneau que les autres sections. */
.home-about {
    margin-top: var(--spacing-large);
    padding: var(--spacing-large);
    background-color: var(--color-dark-gray);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
}
.home-about h2 {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-accent-primary);
    font-size: 1.3em;
    color: var(--color-text-primary);
    text-align: left;
}
.home-about p {
    max-width: 760px;
    margin: 0 0 16px;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}
.home-about-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}
.home-about-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-accent-secondary);
    text-decoration: none;
}
.home-about-links a:hover { text-decoration: underline; }

/* ===========================
   Zone Centrale : Dernières Sorties
   =========================== */
.latest-updates {
    background-color: var(--color-dark-gray); /* Gris très sombre */
    padding: var(--spacing-large);
    border-radius: var(--border-radius);
}

.latest-updates h2 {
    text-align: left; /* Alignement à gauche */
    margin-bottom: var(--spacing-large);
    font-size: 2.2em;
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    border-bottom: 2px solid var(--color-accent-primary);
    padding-top: var(--spacing-small);
}

.novel-grid {
    display: grid;
    /* Densite auto : ~4 colonnes dans la zone large, descend selon la place. */
    grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
    grid-gap: var(--spacing-medium);
    gap: var(--spacing-medium);
  }

  @media (max-width: 700px) {
    .novel-grid { grid-template-columns: 1fr; }
  }


  .novel-card {
    background-color: var(--color-dark-gray);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px var(--color-shadow);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 340px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    width: 100%;
    position: relative; /* Nécessaire pour l'effet shiny */
    border: 1px solid transparent;
}

/* Titre en bande pleine largeur en haut, fondu doux dans la carte (2 lignes max). */
.novel-card > .novel-title {
    margin: 0;
    padding: 12px 16px;
    flex-shrink: 0;
    background: transparent;
    border-bottom: 1px solid rgba(255, 215, 0, 0.18);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Corps : cover a gauche, infos (stars + chapitres) a droite. */
.novel-card-body {
    display: flex;
    flex: 1 1;
    min-height: 0;
    overflow: hidden;
}

.novel-card:hover {
    transform: translateY(-5px) scale(1.01); /* Déplacement vers le haut combiné avec un zoom léger */
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5); /* Ombre accentuée */
    border-color: #d4af37; /* Couleur dorée fixe pour le hover */
}

/* Effet shiny : balaye TOUTE la carte (au-dessus du titre, cover et infos). */
.novel-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* L'effet commence hors de la carte */
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 60%, transparent 100%);
    transform: skewX(-30deg); /* Inclinaison pour un effet dynamique */
    transition: transform 0.5s ease-in-out;
    z-index: 3;
    pointer-events: none;
}

/* Animation shiny au survol */
.novel-card:hover::after {
    transform: translateX(200%) skewX(-30deg); /* L'effet traverse la carte */
}



.novel-image {
    width: 190px; /* Taille fixe de l'image */
    flex-shrink: 0;
    height: 100%;
}

.novel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.novel-info {
    flex-grow: 1;
    min-width: 0;
    padding: 8px var(--spacing-medium);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    overflow: hidden;
}

/* Etoiles : collees en haut, petit gap avant la liste de chapitres. */
.novel-info .star-rating {
    margin: 0 0 12px;
}
.novel-info .recent-chapters {
    margin-top: 0;
}

.novel-title {
    font-size: 1.15em;
    margin: 0 0 var(--spacing-small);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    line-height: 1.25;
}

.novel-genre {
    font-size: 1em; /* Augmenté pour meilleure lisibilité */
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-small);
}

.novel-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.novel-rating .fa-star {
    color: var(--color-accent-secondary); /* Or pour les étoiles */
}

.recent-chapters {
    margin-top: 0;
    width: 100%;
}

.recent-chapters li {
    display: flex;
    flex-direction: column; /* Mise en colonne */
    align-items: flex-start;
    max-width: 500px;
    padding-bottom: 5px;
    margin-bottom: 0;
    /* Separateur degrade or qui fade aux bords (style des bords de news-slider). */
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg,
        rgba(255,215,0,0) 0%,
        rgba(255,215,0,0.6) 50%,
        rgba(255,215,0,0) 100%) 1;
}
.recent-chapters li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}


.recent-chapters li a {
    color: var(--color-accent-primary);
    font-size: 0.85em;
    transition: color 0.3s;
    font-weight: bold;
}

.recent-chapters li a:hover {
    color: var(--color-accent-secondary);
}

.recent-chapters li .zone-date {
    color: var(--color-text-secondary);
    font-size: .75em;
    margin-left: -.5px;
    margin-top: 4px;
    position: relative; /* Nécessaire pour positionner la pseudo-classe */
}

/* Ancienne barre gradient or/rouge retiree : un seul separateur discret sur le li. */

/* ===========================
   Colonne Droite : Populaire
   =========================== */
.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-large);
}

.sidebar {
    background-color: var(--color-dark-gray); /* Gris très sombre */
    padding: var(--spacing-medium);
    border-radius: var(--border-radius);
}

.sidebar h3 {
    font-size: 1.8em;
    margin-bottom: var(--spacing-medium);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
}

.top-novels li {
    display: flex;
    align-items: center;
    gap: var(--spacing-small);
    padding: var(--spacing-small);
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.3s;
}


.top-novels li:last-child {
    border-bottom: none;
}

.top-novels li:hover {
    background-color: #2C2C2C;
}

.top-novel-image img {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.top-novel-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.top-novel-title {
    font-size: 1em;
    color: var(--color-text-primary);
    font-family: var(--font-primary);
}

.top-novel-rating .fa-star {
    color: var(--color-accent-secondary); /* Or pour les étoiles */
}

.top-novel-genre {
    font-size: 0.8em;
    color: var(--color-text-secondary);
}

/* Modification pour le Top 1 Novel */
.top-novels li:first-child {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.top-novels li:first-child .top-novel-image {
    width: 100%;
    height: auto;
}

.top-novels li:first-child .top-novel-info {
    width: 100%;
    padding-top: var(--spacing-small);
}

/* ===========================
   Zone Inférieure : Récemment Ajouté
   =========================== */
.recently-added {
    margin-top: var(--spacing-large);
    padding: var(--spacing-large);
    background-color: var(--color-dark-gray); /* Gris très sombre */
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px var(--color-shadow);
}

.recently-added h2 {
    text-align: center;
    margin-bottom: var(--spacing-large);
    font-size: 2.5em;
    color: var(--color-text-primary);
    font-family: var(--font-primary);
}

.recently-added .recently-added-grid {
    display: flex;
    overflow-x: auto;
    gap: var(--spacing-medium);
}

.recently-added .recently-added-item {
    min-width: 200px;
    height: 280px;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    flex-shrink: 0;
}

.recently-added .recently-added-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px var(--color-shadow);
}

.recently-added .recently-added-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recently-added .recently-added-item:hover img {
    transform: scale(1.05);
}

.recently-added .recommendation-title {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: var(--color-text-primary);
    padding: var(--spacing-small);
    text-align: center;
    font-size: 1em;
    font-family: var(--font-primary);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    transition: background 0.3s;
}

.recently-added .recommendation-title:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ===========================
   Recommandations
   =========================== */
.recommendations {
    margin-top: var(--spacing-large);
    width: 100%;
}

.recommendations h2 {
    text-align: center;
    margin-bottom: var(--spacing-large);
    font-size: 2em;
    color: var(--color-text-primary);
    font-family: var(--font-primary);
}

.recommendations-container {
    display: flex;
    justify-content: center;
    gap: var(--spacing-medium);
    flex-wrap: wrap;
}

.recommendation-item {
    position: relative;
    width: 200px;
    height: 300px;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.recommendation-item:hover {
    transform: scale(1.05);
}

.recommendation-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recommendation-item:hover img {
    transform: scale(1.05);
}

.recommendation-title {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: var(--color-text-primary);
    padding: 7px;
    text-align: center;
    font-size: 1em;
    font-family: var(--font-primary);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    transition: background 0.3s;
}

.recommendation-item:hover .recommendation-title {
    background: rgba(0, 0, 0, 0.8);
}

/* ===========================
   Carousel (Conservation du Style)
   =========================== */
/* ===========================
   Styles Globaux du Carrousel
   =========================== */

/* Conteneur principal */
.carousel-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: var(--spacing-medium) 0;
  background-color: var(--color-dark-gray); /* Gris très sombre */
}

/* Slide contenant les items */
.carousel-slide {
  display: flex;
  transition: transform 0.5s ease-in-out;
  gap: 10px; /* Gap par défaut (peut être redéfini dans la media query) */
}

/* Chaque item du carrousel */
.carousel-item {
  box-sizing: content-box;
  /* La largeur est généralement définie dynamiquement par le JS */
}

/* Lien englobant l'image */
.carousel-link {
  display: block;
  height: 100%;
}

/* Image du carrousel (style par défaut pour desktop) */
.carousel-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius);
  transition: transform 0.3s, box-shadow 0.3s;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  -webkit-user-drag: none;
}

.carousel-img {
  border: 2px solid transparent; /* Bordure par défaut, invisible */
  border-radius: var(--border-radius); /* Coins arrondis */
  transition: transform 0.5s ease, opacity 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Lors du survol de l'item, on cible l'image à l'intérieur */
.carousel-item:hover .carousel-img {
  transform: scale(1.1);
  opacity: 0.9;
  border-color: gold; /* La couleur passe au gold */
  box-shadow: var(--shadow-elevated);
}

/* Boutons de navigation */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 2;
  border-radius: 4px;
  transition: background-color 0.3s, transform 0.3s;
  font-size: 1.8em;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.1);
}

/* Positionnement spécifique des boutons */
.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

@media (max-width: 768px) {
  /* Réduit le gap entre les items */
  .carousel-slide {
    gap: 8px;
  }
  
  /* Chaque item est fixé à 150px de largeur */
  .carousel-item {
    flex: 0 0 150px !important;
    width: 150px !important;
    padding-right: 8px;
  }
  
  /* Les images remplissent l'item et conservent un ratio 2:3 pour imiter une couverture de roman */
  .carousel-img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
  }
}

/* ===========================
   Pagination
   =========================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-medium);
    margin-top: var(--spacing-large);
  }
  
  .pagination button {
    background-color: var(--color-accent-primary);
    border: none;
    color: var(--color-text-primary);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font-secondary);
    transition: transform 0.3s, opacity 0.3s, background-color 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
  }
  
  /* Effet hover */
  .pagination button:hover:not(:disabled) {
    transform: scale(1.05);
    opacity: 0.9;
  }
  
  /* Effet au clic */
  .pagination button:active:not(:disabled) {
    transform: scale(0.95);
    background-color: #333;
  }
  
  /* Bouton actif (classe .active) : fond gris foncé */
  .pagination button.active {
    background-color: #333;
    transform: scale(1.05);
    opacity: 0.9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  }
  
  /* Effet ripple */
  .pagination button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
  }
  
  .pagination button:active:not(:disabled)::after {
    animation: ripple 0.6s ease-out;
  }
  
  @keyframes ripple {
    0% {
      transform: translate(-50%, -50%) scale(0);
      opacity: 0.5;
    }
    100% {
      transform: translate(-50%, -50%) scale(2);
      opacity: 0;
    }
  }
  
  /* Style spécifique pour les boutons désactivés */
  .pagination button:disabled {
    background-color: #444; /* Fond gris plus sombre pour les boutons inactifs */
    color: var(--color-text-secondary);
    border: 2px solid var(--color-border);
    cursor: not-allowed;
    opacity: 0.6;
  }
  
  /* Indicateur de page */
  .pagination span {
    font-size: 1em;
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    margin-left: var(--spacing-medium);
  }
  
/* ===========================
   Styles Additionnels
   =========================== */

/* Étoiles de Notation */
.fas.fa-star {
    color: var(--color-accent-secondary); /* Or pour les étoiles */
    margin-right: 2px;
}

.fas.fa-star.filled {
    color: var(--color-accent-secondary); /* Or pour les étoiles remplies */
}

/* Chapitre Item */
.chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-small) 0;
    border-bottom: 1px solid var(--color-border);
}

.chapter-item a {
    flex: 1 1;
    text-align: left;
    color: var(--color-accent-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    transition: color 0.3s;
}

.chapter-item a:hover {
    color: var(--color-accent-secondary);
}

.chapter-item .zone-date {
    flex-shrink: 0;
    margin-left: var(--spacing-small);
    color: var(--color-text-secondary);
    font-size: 0.85em;
}

/* Sidebar pour l'Historique */
#history-sidebar {
    margin-top: var(--spacing-medium);
}

#reading-history-home li {
    margin: var(--spacing-small) 0;
    font-size: 0.9em;
}

#reading-history-home a {
    color: var(--color-accent-primary);
    transition: color 0.3s;
}

#reading-history-home a:hover {
    color: var(--color-accent-secondary);
    text-decoration: underline;
}

/* ===========================
   MEDIA QUERIES (Responsive)
   =========================== */

/* Ajout d'un espace entre les cartes */
.novel-card {
    margin-bottom: 16px; /* Distance ajoutée entre chaque carte */
}

#lecture-ranking-sidebar {
    background-color: var(--color-dark-gray);
    padding: var(--spacing-large);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px var(--color-shadow);
    transition: background 0.3s;
    display: flex;
    flex-direction: column;
    /* S'aligne sur la hauteur de la grille d'oeuvres (sans les boutons de pagination). */
    align-self: start;
    max-height: 1080px;
}

#lecture-ranking-sidebar h3 {
    font-size: 1.8em;
    margin-bottom: var(--spacing-medium);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    text-align: center;
    border-bottom: 2px solid var(--color-accent-primary);
    padding-bottom: var(--spacing-small);
}

.lecture-rankings {
  list-style: none;
  padding: 0;
  flex: 1 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: var(--spacing-medium);
  scrollbar-width: none; /* Pour Firefox */
}

.lecture-rankings::-webkit-scrollbar {
  display: none; /* Pour Chrome, Safari et Opera */
}

/* Style pour chaque élément de classement */
.lecture-ranking-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-medium);
    padding: var(--spacing-small);
    margin-bottom: var(--spacing-small);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.lecture-ranking-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 215, 0, 0.25);
}

/* Numéro de rang */
.lecture-ranking-item .rank-number {
    font-size: 1.4em;
    color: var(--color-accent-secondary);
    min-width: 35px;
    text-align: center;
    font-weight: bold;
}

/* Zone image de la nouvelle */
.lecture-ranking-item .lecture-novel-image {
    width: 60px;
    height: 90px;
    flex-shrink: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 2px solid var(--color-border);
}

.lecture-ranking-item .lecture-novel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.lecture-ranking-item .lecture-novel-image img:hover {
    transform: scale(1.1);
}

/* Informations de la nouvelle */
.lecture-ranking-item .lecture-novel-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.lecture-ranking-item .lecture-novel-title {
    font-size: 1em;
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    cursor: pointer;
    transition: color 0.3s;
}

.lecture-ranking-item .lecture-novel-title:hover {
    color: var(--color-accent-secondary);
    text-decoration: underline;
}

.lecture-ranking-item .lecture-novel-genre {
    color: var(--color-text-secondary);
    font-size: 0.9em;
}

/* Top 1/2/3 : medaille en COIN BAS-DROITE + reflet shimmer (comme les cartes
   Dernieres Sorties). Couleurs or / argent / bronze. */
.lecture-ranking-item.top-1,
.lecture-ranking-item.top-2,
.lecture-ranking-item.top-3 {
    position: relative;
    overflow: hidden;
}

/* Ruban de medaille en diagonale dans le coin haut-droite */
.lecture-ranking-item.top-1::before,
.lecture-ranking-item.top-2::before,
.lecture-ranking-item.top-3::before {
    content: "";
    position: absolute;
    top: 14px;
    right: -34px;
    width: 110px;
    height: 24px;
    transform: rotate(45deg);
    z-index: 2;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
}
.lecture-ranking-item.top-1::before { background: linear-gradient(90deg, #b8860b, #fff3b0, #d4af37); }
.lecture-ranking-item.top-2::before { background: linear-gradient(90deg, #8d8d8d, #ffffff, #b0b0b0); }
.lecture-ranking-item.top-3::before { background: linear-gradient(90deg, #8a531f, #f0b079, #cd7f32); }

/* Reflet shimmer qui balaye (comme novel-card::after) */
.lecture-ranking-item.top-1::after,
.lecture-ranking-item.top-2::after,
.lecture-ranking-item.top-3::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    transform: skewX(-25deg);
    transition: left 0.7s ease;
}
.lecture-ranking-item.top-1::after { background: linear-gradient(120deg, transparent, rgba(255, 215, 0, 0.22), transparent); }
.lecture-ranking-item.top-2::after { background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.20), transparent); }
.lecture-ranking-item.top-3::after { background: linear-gradient(120deg, transparent, rgba(205, 127, 50, 0.22), transparent); }

.lecture-ranking-item.top-1:hover::after,
.lecture-ranking-item.top-2:hover::after,
.lecture-ranking-item.top-3:hover::after {
    left: 100%;
}

.lecture-ranking-item.top-1 {
    background: rgba(255, 215, 0, 0.06);
    border-color: rgba(255, 215, 0, 0.28);
}
.lecture-ranking-item.top-2 { border-color: rgba(200, 200, 200, 0.22); }
.lecture-ranking-item.top-3 { border-color: rgba(205, 127, 50, 0.22); }

.lecture-ranking-item.top-1 .lecture-novel-title { font-weight: 700; }


/* Étoiles de Notation */
.star-rating {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px; /* Espace entre les étoiles */
}

/* Étoiles de Notation */
.star-rating {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px; /* Espace entre chaque étoile */
  }
  
  .star-rating i {
    display: inline-block; /* Pour s'assurer qu'elles restent côte à côte */
    font-size: 1em; /* Ajustez la taille selon vos besoins */
    color: #d4af37; /* Couleur dorée par défaut */
  }
  
  /* Pour les étoiles remplies */
  .star-rating i.filled {
    color: #d4af37;
  }
  
  /* Pour les étoiles vides */
  .star-rating i.far.fa-star {
    color: rgba(255, 255, 255, 0.22);
  }
  
  .ranking-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-small);
    margin-bottom: var(--spacing-medium);
  }
  
  .ranking-button {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--color-text-secondary);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font-secondary);
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    position: relative;
    overflow: hidden;
  }

  .ranking-button:hover {
    background-color: rgba(255, 255, 255, 0.09);
    color: var(--color-text-primary);
  }

  .ranking-button:active {
    background-color: rgba(255, 215, 0, 0.12);
  }

  /* Bouton actif : accent or sobre */
  .ranking-button.active {
    background-color: rgba(255, 215, 0, 0.14);
    border-color: rgba(255, 215, 0, 0.5);
    color: var(--color-accent-secondary);
  }
  
  /* Pseudo-élément pour l'effet ripple */
  .ranking-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
  }
  
  /* Animation ripple lors du clic */
  .ranking-button:active::after {
    animation: ripple 0.6s ease-out;
  }
  
  @keyframes ripple {
    0% {
      transform: translate(-50%, -50%) scale(0);
      opacity: 0.5;
    }
    100% {
      transform: translate(-50%, -50%) scale(2);
      opacity: 0;
    }
  }
  
  .lecture-novel-title a {
    color: var(--color-text-primary);
  }
  .lecture-novel-genre {
    color: var(--color-text-secondary);
    font-size: 0.9em;
    margin-top: 4px;
  }

  .small-stars .star-rating {
    font-size: 0.8em;
    margin-top: 4px;
  }

/* Styles existants… */

/* Ajouts pour la zone recommandation */
.recommendation-zone {
    margin-top: 20px;
    text-align: center;
  }
  
  .recommendation-covers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  .recommendation-cover {
    width: 100px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s;
  }
  
  .recommendation-cover:hover {
    transform: scale(1.05);
  }
  
  .genre-selector {
    margin-top: 10px;
  }
  
  .genre-button {
    background: #eee;
    border: none;
    padding: 8px 12px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
  }
  
  .genre-button.active,
  .genre-button:hover {
    background: #ccc;
  }
  

/* ===========================
   Layout des conteneurs principaux
   =========================== */
   .popular-today-container {
    flex: 3 1;  /* 60% */
}

.translator-choice-container {
    flex: 2 1;  /* 40% */
}

/* ===========================
   Section : Le choix des Traducteurs (Slider) avec fond flou dynamique et bords arrondis
   =========================== */
.translator-slider-section {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius); /* Bordures arrondies pour la zone */
}

/* Fond dynamique basé sur l'image de couverture de l'œuvre active, avec effet blur et bords arrondis */
.slider-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    transform: scale(1.1);
    /* Fond gauche : on fond le bord gauche dans le noir pour adoucir la transition
       avec la colonne "Reprendre la lecture" (evite la coupure nette). */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.4) 12%, #000 32%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.4) 12%, #000 32%);
    z-index: 0;
    border-radius: var(--border-radius); /* Bordures arrondies pour le fond */
}

/* Overlay semi-transparent pour adoucir le fond flou */
.translator-slider-section .editor-choice.translator-slider {
    position: relative;
    z-index: 1;
    background: rgba(13, 13, 13, 0.8);
    padding: var(--spacing-medium);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px var(--color-shadow);
    padding-bottom: 36px;
}

.top-sections {
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, 
      rgba(255,215,0,0.2) 0%, 
      rgba(255,215,0,0.8) 50%, 
      rgba(255,215,0,0.2) 100%) 1;
}

@media only screen and (max-width: 768px) {
  .top-sections {
    border-bottom: 0px solid transparent;
  }

  .translator-slider-section .editor-choice.translator-slider {
      border-top: 3px solid transparent;
      border-bottom: 3px solid transparent;
      border-image: linear-gradient(90deg, 
          rgba(255,215,0,0.2) 0%, 
          rgba(255,215,0,0.8) 50%, 
          rgba(255,215,0,0.2) 100%) 1;
  }
  
}

.editor-choice.translator-slider h2 {
    font-size: 1.8em;
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    margin-bottom: var(--spacing-medium);
    border-bottom: 2px solid var(--color-accent-primary);
    padding-bottom: var(--spacing-small);
}

/* ===========================
   Styles pour le Slider / Carte Traducteurs
   =========================== */
.editor-choice-list {
    display: flex;
    flex-wrap: nowrap; /* Affichage d'une seule carte à la fois */
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.editor-choice-card {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 95%; /* Largeur maximale de la carte */
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
  margin: auto; /* Centrer la carte horizontalement */
  border: 1px solid transparent;
}

.editor-choice-card:hover {
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
  border-color: #d4af37;
}

/* Zone de l'image : taille fixe pour homogénéité */
.editor-choice-cover {
    width: 200px;    /* Largeur fixe */
    height: 250px;   /* Hauteur fixe */
    overflow: hidden;
    flex-shrink: 0;
}

.editor-choice-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  border-radius: 5px; /* Vous pouvez ajuster la valeur selon vos besoins */
}

/* Zone d'informations : occupe l'espace restant */
.editor-choice-info {
    flex: 1 1;
    padding: var(--spacing-medium);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--spacing-small);
}

.editor-choice-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: var(--spacing-small);
}

.editor-choice-summary {
    font-size: 0.9em;
    line-height: 1.4;
    color: var(--color-text-secondary);
    max-height: 80px;
    overflow: hidden;
}

.editor-choice-genre {
    background-color: var(--color-accent-primary); /* Rouge royal */
    color: var(--color-text-primary);
    padding: 4px 8px;
    border-radius: var(--border-radius);
    display: inline-block;
    font-size: 0.9em;
}

/* Badge de notation : une étoile jaune unique en haut à droite */
.editor-choice-rating {
    position: absolute;
    top: var(--spacing-small);
    right: var(--spacing-small);
    background-color: var(--color-accent-secondary); /* Or */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2em;
    color: var(--color-background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px var(--color-shadow);
}

/* ===========================
   Indicateurs du Slider
   =========================== */
   .slider-indicators {
    position: absolute;
    bottom: calc(var(--spacing-medium) - 15px);
    left: 0;
    right: 0;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 5;
    padding-bottom: 10px;
}

.slider-indicators .indicator {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.3); /* équivalent au gris clair */
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    transform: scale(1);
}

.slider-indicators .indicator:hover {
    background-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.slider-indicators .indicator.active {
    background-color: var(--color-accent-primary); /* Or */
    border-color: var(--color-accent-secondary);
    width: 30px;
    border-radius: 10px;
}


/* ===========================
   Section : Populaire Aujourd'hui
   =========================== */
.popular-today {
    margin-top: var(--spacing-large);
    padding: var(--spacing-medium);
    border-radius: var(--border-radius);
}

/* Titre aligné à gauche */
.popular-today h2 {
    font-size: 1.8em;
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    margin-bottom: var(--spacing-medium);
    border-bottom: 2px solid var(--color-accent-primary);
    padding-bottom: var(--spacing-small);
    text-align: left;
}

  /* Affichage par défaut sur grand écran : 5 colonnes */
  .popular-today-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: var(--spacing-medium);
    gap: var(--spacing-medium);
  }
  
  /* Sur mobile (écran de 768px ou moins) : 4 colonnes et masquer les items à partir du 5ème */
  @media (max-width: 768px) {
    .popular-today-grid {
      grid-template-columns: repeat(4, 1fr);
    }
    /* Masquer tous les items à partir du 5ème */
    .popular-today-grid > .popular-today-item:nth-child(n+5) {
      display: none;
    }
  }

/* Chaque carte d'œuvre */
.popular-today-item {
  border-radius: var(--border-radius);
  overflow: hidden;
  background-color: var(--color-dark-gray);
  box-shadow: 0 2px 5px var(--color-shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
}

.popular-today-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
  border-color: #d4af37;
}


/* Zone de couverture (image) */
.cover-wrapper {
    position: relative;
    width: 100%;
    height: 220px;         /* Hauteur fixe de la zone d'image */
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
}

.cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Badge du statut en haut à gauche */
.novel-status {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: var(--color-accent-primary);
    color: var(--color-text-primary);
    padding: 2px 6px;
    border-radius: var(--border-radius);
    font-size: 0.8em;
    text-transform: capitalize;
    box-shadow: 0 1px 2px var(--color-shadow);
}

/* Badge de notation en haut à droite (sans "/10") */
.rating-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: var(--color-accent-secondary);
    color: var(--color-background);
    padding: 2px 6px;
    border-radius: var(--border-radius);
    font-size: 0.8em;
    box-shadow: 0 1px 2px var(--color-shadow);
}

/* Zone d'information sous l'image */
.popular-novel-info {
    padding: var(--spacing-small);
    text-align: left;
}

/* Dernier chapitre (affiché au-dessus du titre) */
.last-chapter {
    display: block;
    font-size: 0.75em;           /* Plus petit que le titre */
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

/* Titre de l'œuvre, tronqué si trop long */
.popular-novel-title {
    font-size: 1em;
    font-family: var(--font-primary);
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Container global de la section GenreFilter */
.genre-filter-section {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: var(--spacing-medium) 10px; /* petit gap de 10px à gauche et à droite */
    overflow: hidden;
    isolation: isolate;
    background-color: var(--color-dark-gray);
    border-radius: var(--border-radius);
  }
  
  /* Fond dynamique flou basé sur la couleur dominante de l'image de l'œuvre active */
  .slider-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    z-index: -1;
  }
  
  /* Titre de la section aligné à gauche */
  .genre-filter-section h2 {
    font-family: var(--font-primary);
    font-size: 1.8em;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-medium);
    text-align: left;
    border-bottom: 2px solid var(--color-accent-primary);
    padding-bottom: var(--spacing-small);
    position: relative;
    z-index: 1;
  }
  
  /* Boutons de sélection des genres alignés à gauche */
  .genre-buttons {
    display: flex;
    justify-content: flex-start;
    gap: var(--spacing-medium);
    margin-bottom: var(--spacing-large);
    position: relative;
    z-index: 1;
  }
  
  .genre-button {
    background-color: var(--color-dark-gray);
    color: var(--color-text-primary);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-family: var(--font-secondary);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
  }
  
  .genre-button:hover {
    background-color: var(--color-accent-primary);
    transform: scale(1.05);
  }
  
  .genre-button.active {
    background-color: var(--color-accent-primary);
    color: var(--color-text-primary);
  }
  
  /* Wrapper du slider */
  .genre-slider-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    z-index: 1;
  }
  
  /* Container défilant du slider */
  .genre-slider-container {
    display: flex;
    gap: var(--spacing-medium);
    transition: transform 0.5s ease-in-out;
  }
  
  /* Chaque élément du slider (3 éléments visibles) */
.genre-slider-item {
  flex: 0 0 calc((100% - (2 * var(--spacing-medium))) / 3);
  position: relative;
  background-color: var(--dominant-color, var(--color-dark-gray));
  border-radius: var(--border-radius);
  box-shadow: 0 4px 10px var(--color-shadow);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: row;
  cursor: pointer;
  border: 1px solid transparent;
}

/* Pseudo-élément pour appliquer le flou sur la couleur dominante */
.genre-slider-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dominant-color, var(--color-dark-gray));
  filter: blur(20px);
  z-index: -1;
}

/* Effet hover adapté */
.genre-slider-item:hover {
  transform: translateY(0px) scale(1.0);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
  border-color: #d4af37;
}

/* Zone de la couverture */
.genre-cover {
  width: 200px;
  height: 250px;
  flex-shrink: 0;
  overflow: hidden;
}

.genre-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

/* Zone d'informations */
.genre-info {
  padding: var(--spacing-medium);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--spacing-small);
}

.genre-title {
  font-family: var(--font-primary);
  font-size: 1.2em;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-small);
}

.genre-summary {
  font-size: 0.9em;
  color: var(--color-text-secondary);
  line-height: 1.4;
  max-height: 80px;
  overflow: hidden;
}

.genre-label {
  font-size: 0.85em;
  color: var(--color-text-primary);
  background-color: var(--color-accent-primary);
  padding: 4px 8px;
  border-radius: var(--border-radius);
  display: inline-block;
  margin-top: var(--spacing-small);
}

/* ===========================
   Section : Reprendre la lecture
   =========================== */
/* Cartes : composant commun ReadingCard (styles/reading-card.css), le meme que la bibliotheque. */
.resume-reading {
  margin: 0 0 20px;
  padding: var(--spacing-large);
  background-color: var(--color-dark-gray);
  border-radius: var(--border-radius);
}

.resume-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
  margin-bottom: var(--spacing-medium);
  padding-bottom: var(--spacing-small);
  border-bottom: 2px solid var(--color-accent-primary);
}

.resume-head h2 {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 1.8em;
  color: var(--color-text-primary);
  text-align: left;
}

.resume-all {
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-accent-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.resume-all:hover { text-decoration: underline; }

.resume-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 22px 18px;
  gap: 22px 18px;
}

@media (max-width: 700px) {
  .resume-reading { padding: var(--spacing-medium); }
  .resume-head h2 { font-size: 1.35em; }

  /* une seule rangee qui defile au doigt */
  .resume-row {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 170px;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .resume-row > * { scroll-snap-align: start; }
}

/* ── Etat invite (non connecte) : icone + texte + bouton ── */
.resume-invite {
  display: flex;
  align-items: center;
  gap: 20px;
}

.resume-invite-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius);
  background-color: #0e0e0e;
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--color-accent-secondary);
  font-size: 1.25rem;
}

.resume-invite-text {
  flex: 1 1;
  min-width: 0;
}

.resume-invite-text h2 {
  margin: 0 0 4px;
  padding: 0;
  border: none;
  font-family: var(--font-primary);
  font-size: 1.4rem;
  color: var(--color-text-primary);
}

.resume-invite-text p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.resume-login {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  background: var(--color-accent-primary);
  border-radius: var(--border-radius);
  color: #f3f0e8;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.resume-login:hover { background: #a31212; }

  
  /* Styles communs pour tous les boutons de navigation */
.prev-btn,
.next-btn,
.genre-slider-prev,
.genre-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 2;
  border-radius: 4px;
  transition: background-color 0.3s, transform 0.3s;
  font-size: 1.8em;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hover state commun */
.prev-btn:hover,
.next-btn:hover,
.genre-slider-prev:hover,
.genre-slider-next:hover {
  background-color: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.1);
}

/* Positionnement spécifique */
.prev-btn,
.genre-slider-prev {
  left: 10px;
}

.next-btn,
.genre-slider-next {
  right: 10px;
}

/* ===========================
   News Slider - Full Width
   =========================== */
   .news-slider-wrapper {
    position: relative;
    overflow: hidden;
    margin-top: var(--spacing-large);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: 50vh; /* Hauteur fixée */
    /* Lignes au-dessus et en dessous */
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, 
        rgba(255,215,0,0.2) 0%, 
        rgba(255,215,0,0.8) 50%, 
        rgba(255,215,0,0.2) 100%) 1;
  }

/* ULTRA-LEGER : aucune parallaxe JS, aucun filter sur les images, aucun blend.
   Le survol n'anime QUE des transforms (perso grossit, structures reculent).
   Tourne sans GPU : rien n'est repeint en continu. */
.featured-oeuvre {
  --char-scale: 1;
  --front-scale: 1.08;
  display: block;
  position: relative;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  /* Pleine largeur. Les lignes dorées haut/bas sont dessinées en pseudo AU-DESSUS
     du perso (z-7) -> jamais recouvertes. */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: var(--spacing-large);
  height: clamp(520px, 62vh, 690px);
  min-height: 520px;
  isolation: isolate;
  background: #090a0d;
  /* Débordement autorisé UNIQUEMENT vers le haut. Bas + côtés au cadre. */
  overflow: visible;
  -webkit-clip-path: inset(-100% 0 0 0);
          clip-path: inset(-100% 0 0 0);
}

/* Lignes dorées haut + bas. */
.featured-oeuvre::before,
.featured-oeuvre::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg,
      rgba(255,215,0,0.2) 0%,
      rgba(255,215,0,0.8) 50%,
      rgba(255,215,0,0.2) 100%);
}

/* Haut : DERRIÈRE le perso (le perso déborde par-dessus). */
.featured-oeuvre::before { top: 0; z-index: 2; }
/* Bas : DEVANT le perso (jamais recouverte). */
.featured-oeuvre::after { bottom: 0; z-index: 7; }

/* Carrousel : slides empilées, crossfade sur la slide active. */
.featured-oeuvre__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms ease;
}

.featured-oeuvre__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.featured-oeuvre__link {
  position: absolute;
  inset: 0;
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Navigation (flèches haut/bas + index) : colonne à droite, au-dessus de tout. */
.featured-oeuvre__nav {
  position: absolute;
  right: clamp(20px, 3vw, 48px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.featured-oeuvre__arrow {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.5);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.featured-oeuvre__arrow:hover {
  border-color: rgba(255, 215, 0, 0.55);
  background: rgba(184, 134, 11, 0.28);
  color: #fff;
}

.featured-oeuvre__scene,
.featured-oeuvre__layer,
.featured-oeuvre__grain {
  position: absolute;
  inset: 0;
}

.featured-oeuvre__scene {
  overflow: hidden;
  z-index: 0;
}

.featured-oeuvre__layer {
  width: 100%;
  height: 100%;
}

/* Décor : figé. Assombrissement porté par l'atmosphère (pas de filter). */
.featured-oeuvre__background {
  z-index: 0;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  object-position: center;
}

.featured-oeuvre__atmosphere {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 6, 9, 0.97) 0%, rgba(7, 8, 12, 0.78) 35%, rgba(9, 10, 14, 0.22) 70%, rgba(4, 5, 8, 0.5) 100%),
    linear-gradient(0deg, rgba(3, 4, 6, 0.78) 0%, transparent 44%),
    linear-gradient(0deg, rgba(6, 7, 10, 0.32) 0%, rgba(6, 7, 10, 0.32) 100%);
}

.featured-oeuvre__character-wrap {
  position: absolute;
  z-index: 6;
  inset: auto 6% -8% auto;
  width: min(56vw, 780px);
  height: 118%;
  pointer-events: none;
}

/* Ombre de contact peinte une seule fois (remplace drop-shadow = coûteux CPU). */
.featured-oeuvre__character-wrap::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 16%;
  height: 14%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6), transparent 70%);
  z-index: -1;
}

.featured-oeuvre__character {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom right;
  transform-origin: 78% 100%;
  transform: scale(var(--char-scale));
  transition: transform 640ms cubic-bezier(0.16, 1, 0.3, 1);
  /* Ombre portée STATIQUE (épouse la silhouette transparente).
     Jamais animée -> peinte une fois -> OK sans GPU. */
  filter:
    drop-shadow(-16px 12px 10px rgba(0, 0, 0, 0.45))
    drop-shadow(-34px 26px 30px rgba(0, 0, 0, 0.5));
}

/* Survol : perso grossit/avance, structures RECULENT (scale < base). */
.featured-oeuvre:hover .featured-oeuvre__character {
  --char-scale: 1.14;
}

/* Survol : les structures reculent jusqu'à la plaque COMPLETE (scale 1). */
.featured-oeuvre:hover .featured-oeuvre__foreground {
  --front-scale: 1;
}

.featured-oeuvre__foreground {
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
  transform-origin: 50% 100%;
  transform: scale(var(--front-scale));
  transition: transform 640ms cubic-bezier(0.16, 1, 0.3, 1) 40ms;
  /* Ombre statique plus courte/douce (plan moyen, moins proche que le perso). */
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5));
}

.featured-oeuvre__grain {
  z-index: 4;
  opacity: 0.08;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

.featured-oeuvre__content {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 6vw, 96px);
  background: linear-gradient(90deg, rgba(6, 7, 10, 0.36), transparent 58%);
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.34);
  pointer-events: none;
}

.featured-oeuvre__copy {
  position: relative;
  z-index: 2;
  width: min(66%, 840px);
  pointer-events: auto;
}

.featured-oeuvre__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: rgba(232, 220, 178, 0.9);
  font-family: var(--font-primary);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.featured-oeuvre__eyebrow::before {
  content: '';
  width: 34px;
  height: 1px;
  background: var(--color-accent-primary);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.45);
}

.featured-oeuvre__title {
  max-width: none;
  margin: 0;
  padding: 0;
  color: #f4f2ed;
  font-family: var(--font-primary);
  font-size: clamp(2.6rem, 5.4vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.9;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 6px 34px rgba(0, 0, 0, 0.72);
}

.featured-oeuvre__title::after {
  display: none;
}

.featured-oeuvre__genre {
  display: inline-block;
  margin-top: 14px;
  color: rgba(232, 220, 178, 0.72);
  font-family: var(--font-primary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.featured-oeuvre__rule {
  width: min(260px, 46%);
  height: 1px;
  margin: 26px 0;
  background: linear-gradient(90deg, var(--color-accent-primary), rgba(255, 215, 0, 0));
}

.featured-oeuvre__desc {
  margin: 0 0 32px;
  max-width: 720px;
  color: rgba(228, 226, 220, 0.86);
  font-family: var(--font-secondary, var(--font-primary));
  font-size: clamp(0.96rem, 1.1vw, 1.12rem);
  font-weight: 400;
  line-height: 1.72;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.featured-oeuvre__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 11px 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(184, 134, 11, 0.2);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.featured-oeuvre__cta:hover {
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(184, 134, 11, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.featured-oeuvre__index {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-primary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.featured-oeuvre__index i {
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, var(--color-accent-primary) 0 50%, rgba(255, 255, 255, 0.24) 50% 100%);
}

@media (prefers-reduced-motion: reduce) {
  .featured-oeuvre__character,
  .featured-oeuvre__foreground,
  .featured-oeuvre__cta {
    transition: none;
  }

  .featured-oeuvre:hover .featured-oeuvre__character {
    --char-scale: 1;
  }

  .featured-oeuvre:hover .featured-oeuvre__foreground {
    --front-scale: 1.04;
  }
}
  .news-slider-wrapper .news-slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(3px) brightness(0.7);
    transform: scale(1.1);
    z-index: 0;
    transition: all 0.8s ease-in-out;
  }
  
  .news-slider-content {
    position: relative;
    z-index: 1;
    background: rgba(13, 13, 13, 0.5);
    -webkit-backdrop-filter: blur(5px);
            backdrop-filter: blur(5px);
    padding: var(--spacing-large);
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .news-slider-heading {
    font-size: 2.2em;
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    margin-bottom: var(--spacing-medium);
    border-bottom: none;
    position: relative;
    padding-bottom: var(--spacing-medium);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
  }
  
  .news-slider-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-accent-primary);
    transition: width 0.5s ease;
  }
  
  .news-slider-content:hover .news-slider-heading::after {
    width: 120px;
  }
  
  /* Le container des items occupe toute la hauteur */
  .news-slider-items {
    /* display: flex; à test */
    flex-wrap: nowrap;
    justify-content: flex-start; /* Aligne les slides à gauche */
    position: relative;
    overflow: hidden;
    flex: 1 1;
    height: 100%;
  }
  
  .news-slider-item {
    display: grid;
    grid-template-columns: fit-content(50%) auto;
    grid-gap: var(--spacing-large);
    gap: var(--spacing-large);
    width: auto;
    height: 100%; /* L'item occupe toute la hauteur du conteneur */
    background-color: transparent;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
    position: relative;
    align-items: center;
  }
  
  .news-slider-item .news-slider-image {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    width: auto;
    height: 100%; /* Le conteneur de l'image occupe toute la hauteur de l'item */
    min-height: 0;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.6s;
  }
  
  .news-slider-item .news-slider-image img {
    width: auto;
    height: 100%; /* Permet d'afficher l'image en entier en conservant son ratio */
    object-fit: contain; /* L'image est contenue sans être coupée */
    object-position: left center; /* L'image est alignée à gauche */
    transition: transform 0.8s;
    border-radius: 10px; /* Arrondit les bords de l'image */
  }
  
  
  .news-slider-item:hover .news-slider-image img {
    transform: scale(1.05);
  }
  
  .news-slider-item:hover .news-slider-image {
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.4);
  }
  
  /* Positionnement du texte en bas de l'item */
  .news-slider-item .news-slider-text {
    display: flex;
    flex-direction: column;
    padding: 0;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1) 0.1s, opacity 0.6s;
    margin-top: auto; /* Aligne le texte en bas */
  }
  
  .news-slider-item .news-slider-title {
    font-size: 2.4em;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-medium);
    color: white;
    position: relative;
    transition: transform 0.4s;
  }
  
  .news-slider-item:hover .news-slider-title {
    transform: translateY(-5px);
  }
  
  .news-slider-item .news-slider-description {
    font-size: 1.1em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--spacing-large);
    position: relative;
    max-width: 99%;
    transform: translateY(0);
    transition: transform 0.4s 0.1s;
  }
  
  .news-slider-item:hover .news-slider-description {
    transform: translateY(-5px);
  }

  
  .news-slider-indicators {
    position: absolute;
    bottom: var(--spacing-medium);
    left: 0;
    right: 0;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 5;
  }
  
  .news-slider-indicators .news-indicator {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    transform: scale(1);
  }
  
  .news-slider-indicators .news-indicator:hover {
    background-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
  }
  
  .news-slider-indicators .news-indicator.active {
    background-color: var(--color-accent-primary); /* Or */
    border-color: var(--color-accent-secondary);
    width: 30px;
    border-radius: 10px;
  }
  
  /* Animation pour le changement de slide */
  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateX(50px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes slideInLeft {
    from {
      opacity: 0;
      transform: translateX(-50px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  .news-slider-item.active .news-slider-image {
    animation: slideInLeft 0.7s forwards;
  }
  
  .news-slider-item.active .news-slider-text {
    animation: slideIn 0.7s forwards;
  }


  .chapter-item a.visited {
    color: gold;
  }

  @media (max-width: 768px) {
    .news-slider-wrapper {
      min-height: 40vh; /* Hauteur minimale pour un affichage homogène */
    }

    .news-slider-content {
      min-height: 40vh; /* Hauteur minimale pour un affichage homogène */
    }
  }

/* ===========================
   DA user : zones, titres, items
   =========================== */
.latest-updates,
.resume-reading,
.genre-filter-section,
.home-about {
    position: relative;
    background: var(--surface-zone);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.latest-updates::before,
.resume-reading::before,
.genre-filter-section::before,
.home-about::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    pointer-events: none;
    z-index: 0;
}

.resume-reading {
    margin-top: var(--spacing-large);
}

.latest-updates > *,
.resume-reading > *,
.home-about > * {
    position: relative;
    z-index: 1;
}

.latest-updates h2,
.genre-filter-section h2,
.home-about h2,
.resume-head {
    position: relative;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--uv-line);
}

.latest-updates h2,
.genre-filter-section h2,
.home-about h2,
.resume-head h2 {
    font-family: var(--uv-font);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.25;
    color: var(--uv-ink);
}

.latest-updates h2::after,
.genre-filter-section h2::after,
.home-about h2::after,
.resume-head::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 1px;
    background: var(--uv-red);
}

#lecture-ranking-sidebar {
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid var(--uv-line-soft);
    box-shadow: none;
}

@media (max-width: 576px) {
    #lecture-ranking-sidebar {
        border: none;
        background: transparent;
    }
}

#lecture-ranking-sidebar h3 {
    position: relative;
    text-align: left;
    border-bottom: 1px solid var(--uv-line);
}

#lecture-ranking-sidebar h3::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 1px;
    background: var(--uv-red);
}

.genre-slider-item,
.resume-row .rc {
    border: 1px solid var(--uv-line);
    box-shadow: none;
    transition: border-color 0.2s ease;
}

.novel-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--uv-line);
    box-shadow: 0 4px 10px var(--color-shadow);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.novel-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
    border-color: #d4af37;
}

.novel-card > .novel-title {
    border-bottom: 1px solid var(--uv-line);
}

.genre-slider-item:hover,
.resume-row .rc:hover {
    transform: none;
    box-shadow: none;
    border-color: #d4af37;
}

.resume-row .rc:hover .rc-title {
    color: #d4af37;
}

.lecture-ranking-item {
    border-color: var(--uv-line-soft);
}

.lecture-ranking-item:hover {
    border-color: rgba(212, 175, 55, 0.28);
}

.lecture-ranking-item .rank-number {
    color: #d4af37;
}

.lecture-ranking-item .lecture-novel-image {
    border: 1px solid var(--uv-line);
}

/* ===========================
   Global Styles
   =========================== */

/* Grille novels : densite auto (~4 colonnes sur large, descend selon la place). */
.novel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
  grid-gap: var(--spacing-medium);
  gap: var(--spacing-medium);
}

/* Par défaut, les éléments du slider de genres occupent leur largeur auto */
.genre-slider-item {
  flex: 0 0 auto;
  width: auto;
}

/* ===========================
   MEDIA QUERIES (Responsive)
   =========================== */

/* Pour les écrans < 1400px :
   - Les novel cards passent à 2 colonnes.
   - Les genre-slider-item occupent 50% de la largeur (2 par ligne).
   - Les top-sections s'affichent en mode colonne (une au-dessus de l'autre).
*/
@media (max-width: 1400px) {
  /* .novel-grid laisse en auto-fill (gere le nombre de colonnes selon la place). */
  .genre-slider-item {
    flex: 0 0 50%;
    width: 50%;
  }
  .top-sections {
    flex-direction: column;
  }
}

/* Pour les écrans < 1200px */
@media (max-width: 1200px) {
  .main-content {
    grid-template-columns: 1fr;
    margin: 40px auto;
    padding: 0 var(--spacing-medium);
  }
  .novel-image {
    width: 45%;
  }
  .recent-chapters li a {
    font-size: 0.8em;
  }
  .novel-genre,
  .novel-rating {
    font-size: 0.95em;
  }
  .novel-title {
    font-size: 1em;
  }
}

/* Pour les écrans < 992px */
@media (max-width: 992px) {
  .main-content {
    margin-top: 90px;
  }
  .latest-updates,
  .sidebar {
    padding: var(--spacing-small);
  }
  .novel-card {
    margin-bottom: 16px;
    width: 100%;
    height: auto;
  }
  .novel-image {
    width: 45%;
    height: auto;
  }
  .recent-chapters li a {
    font-size: 0.8em;
  }
}

/* Pour les écrans < 768px */
@media (max-width: 768px) {
  .novel-grid {
    grid-template-columns: 1fr;
  }
  .novel-card {
    margin-bottom: 16px;
  }
  .recent-chapters li a {
    font-size: 0.8em;
  }
}

/* Pour les écrans < 767px (petits mobiles) */
@media (max-width: 767px) {
  .star-rating i {
    font-size: 12px;
    margin-right: 1px;
  }
  .recent-chapters li a {
    font-size: 0.9em;
  }
}

/* Pour les écrans < 600px */
@media (max-width: 600px) {
  .novel-grid {
    gap: 4px;
  }
  .novel-card {
    margin-bottom: 16px;
  }
  .recent-chapters li a {
    font-size: 0.8em;
  }
  .top-sections {
    flex-direction: column;
  }
  .popular-today-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-small);
  }
  .popular-today-item {
    margin: var(--spacing-small);
  }
  .translator-slider-section {
    margin-top: var(--spacing-large);
    width: 100%;
  }
  .genre-slider-container {
    gap: var(--spacing-small);
    transition: transform 0.5s ease-in-out;
  }
  .prev-btn,
  .next-btn,
  .genre-slider-prev,
  .genre-slider-next {
    padding: 8px 12px;
    font-size: 1.5em;
  }
  .genre-title,
  .editor-choice-title,
  .popular-novel-title {
    font-size: 1em;
  }
}

/* Pour les écrans < 576px */
@media (max-width: 576px) {
  .novel-grid {
    padding: 0;
  }
  .latest-updates,
  .sidebar {
    padding: var(--spacing-small);
  }
  .novel-image {
    width: 45%;
  }
  .novel-card {
    margin-bottom: 16px;
  }
  .recent-chapters li a {
    font-size: 0.8em;
  }
  .main-content {
    margin: 0;
    padding: 0;
  }
  .sidebar,
  #lecture-ranking-sidebar {
    width: 100%;
    margin: 0;
    padding: 0;
    border-radius: 0;
  }
}

/* Pour les très petits écrans (< 400px) */
@media (max-width: 400px) {
  .novel-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .novel-card {
    margin-bottom: 16px;
  }
  .recent-chapters li a {
    font-size: 0.8em;
  }
}

/* ===========================
    Genre Slider Corrections for Mobile (<768px)
   =========================== */
/* Assurez-vous que le wrapper masque le débordement */
.genre-slider-wrapper {
  overflow: hidden;
}

/* Le container du slider en flex, il recevra la translation inline depuis React */
.genre-slider-container {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

@media (max-width: 768px) {
  /* Laisser l'inline style gérer la largeur calculée (environ 50% pour itemsPerView=2) */
  .genre-slider-item {
    flex: 0 0 auto; /* Conserve la largeur définie inline */
    padding: 0; /* Supprime les marges/paddings indésirables */
    box-sizing: border-box;
  }

  /* Masquer les informations textuelles */
  .genre-info {
    display: none !important;
  }

  /* S'assurer que la couverture occupe toute la largeur de son container */
  .genre-cover {
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .genre-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
  }
}
/* ===========================
   Genre Slider Corrections for Mobile (<768px)
   =========================== */
@media (max-width: 768px) {
  /* Assurer que le container masque le débordement et utilise flex */
  .genre-slider-wrapper {
    overflow: hidden;
  }
  .genre-slider-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
  }

  /* Ne pas forcer la largeur via !important, laisser l'inline style gérer la taille */
  .genre-slider-item {
    flex: 0 0 auto;
    padding: 0;
    box-sizing: border-box;
  }

  /* Pour forcer une taille identique aux images du slider de genres :
       On utilise une propriété d'aspect-ratio pour définir une zone fixe.
       Vous pouvez ajuster l'aspect-ratio selon le format désiré (ex. 16/9, 1/1, etc.) */
  .genre-cover {
    width: 100%;
    aspect-ratio: 16/9; /* ou utilisez par exemple 1/1 pour des images carrées */
    overflow: hidden;
  }

  .genre-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* Masquer les informations textuelles sur mobile */
  .genre-info {
    display: none !important;
  }

  /* Organisation des boutons de genre :
       On affiche 4 boutons par ligne, les autres passent à la ligne suivante */
  .genre-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* espace entre les boutons (ajustable) */
  }

  .genre-button {
    flex: 0 0 25%;
    max-width: 25%;
    box-sizing: border-box;
    text-align: center;
    margin-bottom: 8px;
  }
}

/* ====================================================
   Media Queries pour Mobile - Section News
   ==================================================== */

@media screen and (max-width: 768px) {
  .news-slider-wrapper {
    height: auto; /* Hauteur automatique pour s'adapter au contenu */
    margin-left: 0; /* Supprimer la marge gauche */
    width: 100%; /* Pleine largeur de l'écran */
  }

  .news-slider-content {
    padding: var(--spacing-medium) var(--spacing-small); /* Réduire le padding */
    width: 100%;
    box-shadow: none; /* Supprimer l'ombre */
    border-radius: 0;
  }

  .news-slider-heading {
    font-size: 1.8em; /* Réduire la taille du titre */
    margin-bottom: var(--spacing-small); /* Réduire la marge en dessous du titre */
    text-align: center;
    letter-spacing: normal;
  }

  .news-slider-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .news-slider-content:hover .news-slider-heading::after {
    width: 60px;
  }

  .news-slider-items {
    flex-direction: column; /* Afficher les éléments en colonne */
    padding-bottom: var(--spacing-small);
  }

  .news-slider-item {
    grid-template-columns: 1fr; /* Une seule colonne pour le texte */
    padding: var(--spacing-small);
    gap: var(--spacing-small);
  }

  .news-slider-item .news-slider-image {
    display: none; /* Masquer l'image */
  }

  .news-slider-item .news-slider-text {
    margin-top: 0;
  }

  .news-slider-item .news-slider-title {
    font-size: 1.6em;
  }

  .news-slider-item .news-slider-description {
    font-size: 0.9em; /* Réduire la taille du texte */
    margin-bottom: 0; /* Supprimer la marge */
  }

  /* Suppression des effets */
  .news-slider-item:hover .news-slider-image img {
    transform: none;
  }

  .news-slider-item:hover .news-slider-image {
    box-shadow: none;
  }

  .news-slider-item:hover .news-slider-title,
  .news-slider-item:hover .news-slider-description {
    transform: none;
  }

  .news-slider-indicators {
    bottom: var(--spacing-small);
  }
}

@media (max-width: 768px) {

  .editor-choice-list.slider-container .editor-choice-card {
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  /* Optionnel : Aligner les items à gauche dans le conteneur de la liste, sans modifier le reste */
  .editor-choice-list.slider-container {
    justify-content: flex-start !important;
  }

  .editor-choice-cover {
    width: 130px !important;
    /* Vous pouvez ajuster la hauteur si besoin pour conserver un bon ratio */
    height: auto !important;
  }
  .editor-choice-rating {
    left: calc(var(--spacing-small)) !important;
  }
}

@media screen and (max-width: 768px) {
  .featured-oeuvre {
    width: 100vw;
    height: 540px;
    min-height: 540px;
    margin-left: calc(-50vw + 50%);
    /* Comme sur desktop : le perso déborde vers le haut (lignes dorées = pseudos). */
  }

  .featured-oeuvre__content {
    min-height: 540px;
    justify-content: center;
    padding: 40px 24px;
    background: linear-gradient(0deg, rgba(5, 6, 9, 0.94) 0%, rgba(5, 6, 9, 0.55) 50%, rgba(5, 6, 9, 0.2) 100%);
  }

  .featured-oeuvre__copy {
    width: 100%;
  }

  .featured-oeuvre__eyebrow {
    margin-bottom: 12px;
    font-size: 0.64rem;
    letter-spacing: 0.24em;
  }

  .featured-oeuvre__title {
    max-width: 100%;
    font-size: clamp(2.6rem, 12vw, 4rem);
    line-height: 0.9;
    text-align: left;
    white-space: normal;
  }

  .featured-oeuvre__genre {
    margin-top: 10px;
    font-size: 0.66rem;
  }

  .featured-oeuvre__rule {
    margin: 14px 0;
  }

  .featured-oeuvre__desc {
    max-width: 100%;
    margin-bottom: 20px;
    font-size: 0.86rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .featured-oeuvre__cta {
    padding: 12px 16px;
    font-size: 0.68rem;
  }

  .featured-oeuvre__background {
    object-position: 64% center;
  }

  .featured-oeuvre__character-wrap {
    right: -20%;
    bottom: 0;
    width: 88vw;
    height: 112%;
    z-index: 2;
  }

  /* Tap/hover : le perso passe DEVANT les infos. */
  .featured-oeuvre:hover .featured-oeuvre__character-wrap,
  .featured-oeuvre:active .featured-oeuvre__character-wrap {
    z-index: 6;
  }

  .featured-oeuvre__character {
    opacity: 0.96;
  }

  .featured-oeuvre__foreground {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom center;
    opacity: 0.64;
  }

  .resume-invite {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .resume-login {
    align-self: stretch;
    justify-content: center;
  }

  .featured-oeuvre__index {
    display: none;
  }
}

.novel-info .star-rating.sr {
  gap: 4px;
}

.novel-info .star-rating i.sr-star {
  width: 20px;
  height: 20px;
  margin: 0;
  font-size: inherit;
}

.small-stars .star-rating.sr {
  gap: 3px;
}

.small-stars .star-rating i.sr-star {
  width: 16px;
  height: 16px;
  margin: 0;
  font-size: inherit;
}

@media (max-width: 767px) {
  .novel-info .star-rating i.sr-star {
    width: 18px;
    height: 18px;
  }
}

