/* =========================================
   VARIABLES CSS - Manga Zenshu
   ========================================= */
:root {
  --color-primary: #8F1B13;
  --color-primary-hover: #e13228;
  --color-secondary: #FE4C3F;
  --color-dark: #150202;
  --color-dark-gradient: #501616;
  --color-card-bg: #1F1F1F;
  --color-card-bg-alt: #1c1c1c;
  --color-border: #575757;
  --color-text: #ffffff;
  --color-text-muted: #ccc;
  --color-text-subtle: #9ca3af;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-round: 50%;
  --font-family: 'Space Grotesk', sans-serif;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* =========================================
   CLASSES UTILITAIRES
   ========================================= */
.mobile-only {
  display: block;
}

.desktop-only {
  display: none;
}

@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }
  .desktop-only {
    display: block;
  }
}

/* Classe pour masquer visuellement mais garder accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================
   BASE STYLES
   ========================================= */
html {
  background-color: var(--color-dark);
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Space Grotesk', sans-serif;
  color: white;
  padding-bottom: 110px;
  background-image: linear-gradient(to bottom, #501616 50%, #150202 100%);
  background-size: 100% 60vh;
  background-repeat: no-repeat;
  background-position: 0 env(safe-area-inset-top);
  padding-top: env(safe-area-inset-top);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top);
  background-color: #150202;
  z-index: 1000;
}

body.login {
  display: flex;
  justify-content: center; /* centre horizontalement */
  align-items: center;     /* centre verticalement */
}


body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

header {
  padding: 16px;
  font-size: 24px;
  font-weight: 600;
}


#weeklyList .manga-card.vertical-design {
  width: 150px;
}

#weeklyList .manga-image-wrapper {
  width: 100%;
  aspect-ratio: 2 / 3;
}

#weeklyList .manga-image-wrapper .manga-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#weeklyList .manga-info-block {
  margin: 8px;
  gap: 2px;
}

#weeklyList .info-title {
  font-size: 0.8rem;
}

#weeklyList .info-volume,
#weeklyList .info-edition,
#weeklyList .info-date {
  font-size: 0.7rem;
}

.weekly-empty-message {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  padding: 24px;
  background-color: var(--color-card-bg, #1a1a1a);
  border: 1px solid var(--color-border, #2a2a2a);
  border-radius: var(--border-radius-sm, 6px);
  color: var(--color-text-muted, #888);
  font-size: 0.9rem;
  margin: 0;
  text-align: center;
}

.manga-card.vertical-design {
    display: flex;
    flex-direction: column;
    background-color: var(--color-card-bg);
    text-decoration: none;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    overflow: visible;
    width: 290px;
    flex-shrink: 0;
}

/* L'image */
.vertical-design .manga-image-wrapper {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.vertical-design .manga-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Bloc d'infos en dessous */
.manga-info-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Tout aligné à gauche */
    gap: 4px; 
    margin: 16px;
}

/* 1. La Date (DD/MM/YYYY) */
.info-date {
    font-family: var(--font-family);
    font-size: 0.8rem;
    color: var(--color-text-subtle);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.info-volume {
    font-family: var(--font-family);
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.info-title {
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.info-edition {
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-top: 2px;
}

.collection-total-price {
  font-size: 1.2em;
  color: white; 
  font-weight: 400; 
  padding: 16px 15px;
  margin: 0 6px;
}

/* --- NOUVEAU CSS POUR BADGES IMAGES --- */

/* Le conteneur span (défini dans bibliotheque.html) */
#bibliothequeBadge {
  display: inline-block;
  vertical-align: middle; /* Alignement vertical avec le texte */

  /* Gestion de l'apparition en douceur */
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

/* Quand le JS ajoute cette classe, le badge apparaît */
#bibliothequeBadge.visible {
  opacity: 1;
}

/* La classe ajoutée à la balise <img> par le JS */
.badge-img {
  /* Ajustez la hauteur selon la taille désirée de vos images */
  height: 150px;
  width: auto; /* Conserve les proportions */
  display: block; /* Évite les petits espaces fantômes sous l'image */

  /* Optionnel : un petit effet d'ombre portée sur l'image elle-même */
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

section {
  padding: 0 16px 24px 16px;;
}

h1 {
  margin: 16px 0 8px;
  font-size: 3rem;
  font-weight: 600;
}


h2 {
  margin: 12px 0 8px;
  font-size: 1.8rem;
  font-weight: 600;
}

.slider-container {
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.slider-container::-webkit-scrollbar {
  display: none;
}

.mobile-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}

.mobile-title {
  font-size: 2rem;
  font-weight: bold;
  color: white;
  margin: 0;
}

.mobile-calc-icon {
  background-color: #222;
  padding: 10px;
  border-radius: var(--border-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-calc-icon img {
  display: block;
  width: 20px;
  height: 20px;
}

/* Cacher sur desktop */
@media (min-width: 768px) {
  .mobile-header-bar {
    display: none;
  }
}

/* CACHER PAR DÉFAUT */
.desktop-header {
  display: none;
}

@media (min-width: 960px) {
  .desktop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000;
    padding: 16px 32px;
    border-bottom: 1px solid #222;
    max-width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .logo-img {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
  }

  a {
  text-decoration: none;
}

a .site-title,
.site-title {
  text-decoration: none;
  background: none;
  box-shadow: none;
  color: white; /* ou la couleur souhaitée */
}

  .site-title {
    font-size: 1.6rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
  }

  .desktop-nav {
    display: flex;
    gap: 24px;
    margin-left: 32px; /* espace entre "Manga Zenshu" et les liens */
  }

  .desktop-nav .nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color var(--transition-fast);
  }

  .desktop-nav .nav-link:hover {
    color: #f55;
  }

  .desktop-nav .nav-link.active {
    color: #f55;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .icon-button {
    background: #222;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
  }

  .icon-button:hover {
    background: #333;
  }

  body {
    padding-top: 80px;
  }
}

.slider {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.filter-btn {
  padding: 6px 14px;
  background: black;
  color: white;
  border-radius: var(--border-radius-sm);
  border: 1px solid white;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
}

.filter-btn.active {
  background: red;
  color: white;
  border: none;
}

.profile-container {
  width: 100%;
  max-width: 600px;   /* limite sur desktop */
  margin: 40px auto;  /* centré */
  padding: 20px;
  box-sizing: border-box;
}

/* Style spécifique au compteur de wishlist */
.wishlist-count {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  margin: 0 6px;
  text-align: center;
  border-radius: 10px;
  width: fit-content;
  color: white;
  font-weight: 100;
  padding: 4px 16px;
}

.wishlist-count span {
  color: white;
  font-size: 3rem;
}

/* À ajouter dans style.css si nécessaire */
#userRecommendationsList .manga-cover {
    height: 250px;
    width: auto;
    border-radius: var(--border-radius-sm);
    transition: transform var(--transition-normal);
}

#userRecommendationsList .manga-card {
    flex: 0 0 auto;
    width: 165px;
}

/* =========================================
   ANIMATIONS BOUTONS & ERREURS
   ========================================= */

/* 1. Animation de "Secousse" (Shake) pour les erreurs */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.shake-animation {
  animation: shake 0.4s ease-in-out;
}

/* 2. État "Loading" du bouton */
.auth-btn {
  position: relative; /* Nécessaire pour positionner le loader */
  transition: all 0.3s ease;
}

/* Quand la classe .loading est ajoutée via JS */
.auth-btn.loading {
  color: transparent !important; /* On rend le texte invisible */
  pointer-events: none;          /* On empêche de cliquer à nouveau */
  opacity: 0.8;
}

.btn-buy-fnac {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    padding: 15px;
    font-size: 16px;
    border-radius: 12px;
    color: #000000; 
    background-color: #f5b027; 
    border: 2px solid #f5b027;
    transition: background-color 0.2s, color 0.2s;
    width: 100%; 
    box-sizing: border-box; 
}


.btn-buy-fnac:hover, .btn-buy-fnac:focus {
    background-color: #e09f25; 
    border-color: #e09f25;
}

/* Création du cercle qui tourne (Spinner) */
.auth-btn.loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  /* On centre parfaitement le loader */
  margin-left: -10px; 
  margin-top: -10px;
  
  /* Design du cercle */
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent; /* Crée l'effet de rotation visuel */
  
  /* Animation */
  animation: spin 0.8s linear infinite;
}

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

.icon-group {
  display: flex;
  align-items: center;
  gap: 10px; /* espace entre les deux boutons */
}

.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 4px;
  background-color: #222;
  border-radius: var(--border-radius-sm);
}


/* Responsive mobile */
@media (max-width: 768px) {
  .profile-container {
    max-width: 100%;   
    margin: 0;         
    padding: 15px;    
    border-radius: 0; 
  }

  .profile-info {
    border-radius: var(--border-radius-md);
    padding: 15px;
  }
}

.profile-info {
  background: #1e1e1e;
  border-radius: var(--border-radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.toggle-password-icon {
  width: 20px;
  height: 20px;
  margin-left: 10px; 
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.toggle-password-icon:hover {
  opacity: 1;
}

.auth-input > .fas {
    margin-right: 10px;
    color: #aaa;
}

.profile-block h2,
.password-block h2,
.social-section h2 {
  margin-bottom: 10px;
}

/* Section réseaux sociaux */
.social-section {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 40px;
  padding: 0 20px;
  box-sizing: border-box;
}

.social-section .social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-card-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.95rem;
  transition: background 0.2s;
}

.social-link:hover {
  background: var(--color-border);
}

.social-link img {
  flex-shrink: 0;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .social-section {
    padding: 0 15px;
    margin-bottom: 30px;
  }
}

.auth-input {
  margin-bottom: 15px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  margin: auto auto;
  max-width: 100%;
  background: #1e1e1e;
  border-radius: var(--border-radius-md);
  padding: 20px;
  border: 1px solid var(--color-border);
}

.auth-form-register {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 90%;
  max-width: 400px;
  margin: 100px auto;
}


.auth-input {
  display: flex;
  align-items: center;
  border: 1px solid #fff;
  border-radius: var(--border-radius-sm);
  padding: 12px;
  background: #111;
  color: var(--color-text);
  font-size: 16px;
}

.auth-input input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text);
  font-size: 14px;
  padding-left: 10px;
  font-family: var(--font-family);
}

.auth-input input::placeholder {
  color: #aaa;
}

.auth-input i {
  color: #aaa;
  font-size: 18px;
}

.auth-btn {
  background: var(--color-primary);
  color: var(--color-text);
  border: none;
  padding: 14px;
  font-size: 16px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-normal);
  font-family: var(--font-family);
  width: 100%;
}

.auth-btn:hover {
  background: var(--color-primary-hover);
}

/* ✅ Optimisation desktop — supprimé (doublon avec bloc plus bas) */

/* === Wishlist alignée sur Collection === */
.wishlist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--color-card-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 12px;
  color: var(--color-text);
  text-decoration: none;
}

.wishlist-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
}

.wishlist-item h3 {
  margin: 8px 0 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.wishlist-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.wishlist-edition {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.wishlist-main {
    padding: 6px 20px 10px 20px; /* identique à calendar-main */
}

.btn-wishlist {
    display: inline-flex;
    align-items: center;
    background: var(--color-secondary);
    color: var(--color-text);
    border: none;
    padding: 16px 16px;
    border-radius: var(--border-radius-md);
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    min-width: 180px;
    justify-content: center;
    font-family: var(--font-family);
}

.btn-wishlist:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

@media (max-width: 768px) {
    .btn-wishlist {
        width: 100%;
        min-width: unset;
        margin-top: 8px;
    }
}

/* Version mobile : affichage en ligne comme la collection */
@media (max-width: 767px) {
  .wishlist-item {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
    padding: 12px;
  }

  .wishlist-item img {
    width: 75px;
    height: auto;
    flex-shrink: 0;
  }

  .wishlist-item div {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .wishlist-item h3 {
    margin: 0 0 4px;
    font-size: 1.2rem;
  }

  .wishlist-item p {
    font-size: 0.9rem;
    color: #ccc;
  }
}

.wishlist-link {
  display: flex;
  gap: 16px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex: 1;
  color: #ccc;
  font-size: 0.9rem;
  align-items: flex-start;
}

.wishlist-link img {
  width: 75px;
  height: auto;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.wishlist-link div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wishlist-link h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
}

.wishlist-link p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Style du bouton retirer */
.btn-remove {
  background: #e63946;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 25%;
  font-size: 18px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-remove:hover {
  background: #c92f3a;
}

.collection-count {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  margin: 0 6px;
  padding: 10px 15px;
  text-align: center;
  border-radius: 10px;
  width: fit-content;
  color: white;
  font-weight: 100;
}

.collection-count span {
  color: white;
  font-size: 3rem;
}

#addToWishlistBtn.in-wishlist {
    color: white;
}

#addToWishlistBtn.in-wishlist #wishlistIcon {
    filter: brightness(0) invert(1); 
}

#addToBibliothequeBtn {
    color: white;
    transition: all 0.3s ease;
}

#addToBibliothequeBtn.in-bibliotheque {
    color: white; 
}

#addToBibliothequeBtn.in-bibliotheque #bibliothequeIcon {
    filter: brightness(0) invert(1);
}

.bibliotheque-section {
   display: flex;
  flex-direction: column;
  gap: 15px;
}



.bibliotheque-series-title {
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 15px;
  padding-left: 10px;
  border-left: 4px solid #e63946;
}

.librairie-section {
  background: #1b1b1b;
  color: var(--color-text);
  padding: 16px 16px;
  margin: 20px 20px;
  border-radius: var(--border-radius-sm);
  text-align: center;
  border: 1px solid var(--color-border);
}
.librairie-section h2 {
  font-size: 1.4em;
  margin-bottom: 10px;
}

.librairie-section p {
    line-height: 1.6;
    color: white;
    font-size: 15px;
}

.btn-libre {
  display: block;
  padding: 16px 0px;
  width: 100%;
  text-align: center;
  background: #e63946;
  color: var(--color-text);
  border-radius: var(--border-radius-md);
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}
.btn-libre:hover {
  background: #ff5b5b;
}

.tight-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 8px; 
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .tight-grid .manga-card {
      width: 100% !important;         /* Surcharge le width: 290px de style.css */
      margin: 0 !important;           /* Enlève les marges externes */
      background: transparent !important; /* Enlève le fond gris */
      border: none !important;        /* Enlève la bordure grise */
      box-shadow: none !important;
      min-height: auto !important;    /* Ajustement hauteur */
    }

    /* Style de l'image pour qu'elle remplisse sa case */
    .tight-grid .volume-link img {
      width: 100%;
      aspect-ratio: 5 / 7;  /* Ratio manga standard */
      display: block;
      border-radius: 4px;
      transition: transform 0.2s ease;
      object-fit: cover;
    }

    /* Placeholder cover dans tight-grid - garde son propre style */
    .tight-grid .volume-link .placeholder-cover {
      width: 100%;
      aspect-ratio: 5 / 7;  /* Même ratio que les images */
      border-radius: 4px;
      transition: transform 0.2s ease;
    }

    /* Petit effet de zoom au survol */
    .tight-grid .volume-link:hover img,
    .tight-grid .volume-link:hover .placeholder-cover {
        transform: scale(1.05);
        z-index: 2;
    }

    @media (max-width: 768px) {
      .tight-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 5px;
      }
    }

    .collection-shelf {
      padding: 0 20px;
    }

    .shelf-title {
      font-family: 'Space Grotesk', sans-serif; /* Reprend votre font */
      font-size: 2rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 20px;
      text-transform: uppercase;
      letter-spacing: 1px;
      text-align: left;
    }

    /* Ajustement mobile pour les titres */
    @media (max-width: 768px) {
      .shelf-title {
        text-align: left;
        font-size: 2rem;
        margin-bottom: 15px;
      }
    }

#calendarTabs,
#cwTabs {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 4px;
  width: fit-content;
  margin: 20px auto;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.segment {
  position: relative;
  z-index: 2;
  padding: 8px 20px;
  color: white;
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  border-radius: 50px;
  background: transparent;
  border: none;
  transition: color 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.segment.is-active {
  color: #fff;
  font-weight: 700;
}

.active-bg {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  background-color: #501616;
  border-radius: 50px;
  z-index: 1;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), width 0.3s ease;
  pointer-events: none;
}

.segmented-tabs {
  position: relative;
  display: flex;
  padding: 4px;
  margin: 0 16px;
  background: var(--color-card-bg);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  isolation: isolate;
}

@media (min-width: 768px) {
  .segmented-tabs {
    max-width: 420px;
    margin: 24px auto;
  }
}

.segmented-tabs .active-bg {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  background: #ff4d40;
  border-radius: 6px;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.2s ease;
}

.segmented-tabs .segment {
  flex: 1;
  position: relative;
  z-index: 2; /* Devant le fond rouge */
  text-align: center;
  padding: 10px 0;
  color: #f0f0f0;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 14px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.segmented-tabs .active-bg.loaded {
  opacity: 1;
}

.segmented-tabs .segment.is-active {
  color: #fff;
}

.styled-card {
  width: 300px;
  flex-shrink: 0;
  position: relative;
  background-color: var(--color-card-bg);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.homepage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
}


.calculator-button {
  background-color: #3b2e2e;
  padding: 12px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: white;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.calculator-button img {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

@media (min-width: 768px) {
  .homepage-header {
    justify-content: center;
  }

  .homepage-title {
    text-align: center;
    position: relative;
  }

  .calculator-button {
    position: absolute;
    right: 16px;
  }
}

.styled-card img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.card-overlay {
  padding: 16px 16px 16px 16px;
}

.card-overlay h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.card-overlay .subtitle {
  font-size: 12px;
  color: #aaa;
}

.card-overlay .manga-date {
  font-size: 13px;
  color: white;
  margin-top: 4px;
}

.card-overlay .tag {
  background-color: #E6DD39;
  color: black;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.9em;
  margin-top: 5px;
}

.badge-fav img {
  width: 18px;
  height: 18px;
  opacity: 0.9;
}

.badge-fav:hover {
  transform: scale(1.1);
}

.badge-favorite {
  display: inline-block;
  padding: 4px 10px;
  background-color:#e63946;
  color: white;
  border-radius: 12px;
  font-size: 0.9rem;
}


.badge-classic {
  display: inline-block;
  background-color: white;
  color: black; 
  font-size: 0.9rem;
  padding: 4px 10px;
  border-radius: 12px;
}

.tag-gem {
  display: inline-block;
  background-color: #E6DD39;
  color: black;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.9em;
}

.badge-gem {
  display: inline-block;
  background-color: #FEE13F;
  color: black;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.9em;
}

.badge-mustread {
  display: inline-block;
  background: #C53FFE;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.9em;
}

.badge-madeinfrance {
  display: inline-block;
  background-color: #3F92FE;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.9em;
}

.badge-series-encours {
  display: inline-block;
  background-color: #d4edda;
  color: #155724;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85em;
  border: 1px solid #c3e6cb;
}

.badge-series-termine {
  display: inline-block;
  background-color: #f8d7da;
  color: #721c24;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85em;
  border: 1px solid #f5c6cb;
}

.tag-madeinfrance {
  display: inline-block;
  background-color: #3F92FE;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.manga-card {
  flex: 0 0 auto;
  text-align: left;
  text-decoration: none;
  color: white;
}

/* Consolidation des styles h3 et volume */
.manga-card h3,
.manga-card .volume {
  color: #fff;
  margin: 0;
}

.manga-card h3 {
  font-size: 22px;
  font-weight: 600;
}

.manga-card img {
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius-sm) var(--border-radius-sm) 0px 0px;
}

.manga-main {
  padding: 0px 20px 0px 20px;
}

.rating {
  display: flex;
  gap: 5px;
  cursor: pointer;
  margin-top: 10px;
}

.rating span {
  font-size: 14px;
  color: #ccc;
  transition: color 0.2s;
}

.rating span.active {
  color: gold;
}

.manga-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 20px;
}

.genre-page h1 {
  color: #ef4444;
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  padding-top: 1rem;
}

.genre-entry-section {
  padding: 24px 16px;
}

.genre-bloc {
    background-color: var(--color-card-bg-alt);
    border: 1px solid var(--color-border);
    flex: 0 0 auto;
    color: var(--color-text);
    text-decoration: none;
    padding: 2rem 2rem;
    border-radius: var(--border-radius-sm);
    font-weight: bold;
    transition: background-color var(--transition-normal);
}

.genre-slider {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;

  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
}

.genre-slider::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.genre-tag {
  flex: 0 0 auto;
  scroll-snap-align: start;
  background-color: #1a1a1a;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: var(--border-radius-md);
  font-weight: bold;
  border: 2px solid white;
  transition: background-color var(--transition-normal);
}

.genre-tag:hover {
  background-color: #333;
}


.review-section {
    padding: 20px;
    margin: 16px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    background-color: #1b1b1b;
    line-height: 1.6;
    box-sizing: border-box;
}

.review-section h2 {
    color: white;
    margin-top: 0;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.4rem; 
}

.review-section p {
    color: white;
    margin-bottom: 10px;
    font-size: 1rem;
}

.review-title-container {
  display: flex; 
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
  border: 1px solid #ddd;
}

.review-section .review-title-container h2 {
  margin-top: 0;
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
  color: white;
  font-size: 1.4rem;
}

.review-divider {
  border: 0;
  height: 1px;
  background-color: #eee;
  margin: 25px 0;
}

.review-extra-info {
  margin-top: 15px;
}

.review-extra-info h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: white;
  font-size: 1.1rem;
}

.review-extra-info p {
  font-size: 0.95rem;
  color: white;
}

.review-link-container {
  border-radius: 6px;
  margin-top: 15px;
  transition: box-shadow 0.3s ease;
}

.btn-collection {
  background-color: #ff4d4d;
  color: white;
  border: none;
  padding: 15px;
  font-size: 16px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: background-color var(--transition-fast);
}

.btn-collection:hover {
  background-color: #ff6666;
}

.btn-collection:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #aaa; /* ou garde la couleur si tu veux juste un effet visuel */
}

.scroll-row_collection {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 12px 0;
}

.collection-store-highlight {
  background-color: #8b1c1c;
  padding: 1.5em;
  margin: 2em 0;
}

.collection-store-highlight h2 {
  margin-top: 0;
}

@media (min-width: 768px) {
  .collection-store-highlight {
    border-radius: var(--border-radius-md);
    overflow: hidden;
  }
}

.store-link-button {
  display: inline-block;
  margin-top: 1em;
  padding: 0.5em 1em;
  background-color: #0077cc;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}

.store-link-button:hover {
  background-color: #005fa3;
}

.store-logo {
  height: auto;
  width: 100%;
  max-width: 400px;
    display: block;
  margin: 0 auto;
}

.theme-manga-section {
  padding: 1rem;
}


.top5-liked-visual {
  padding: 1rem;
}

.top5-liked-visual h2 {
  text-align: left;
  font-size: 1.2rem;
}

.top5-slider-visual {
  display: flex;
  overflow-x: auto;
  gap: 4rem;
  padding: 1rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-padding-left: 1rem;
  margin-left: 0;          
  padding-left: 1rem;      
  scrollbar-width: none;
  -ms-overflow-style: none;
  overflow-y: hidden;
}

.top5-item {
    position: relative;
    flex: 0 0 auto;
    width: 160px;
    scroll-snap-align: start;
    display: block;
    text-decoration: none;
}

.top5-item img {
  width: 100%;
  height: 232px;
  border-radius: var(--border-radius-sm);
  display: block;
  z-index: 2;
  position: relative;
}

.top5-slider-visual::-webkit-scrollbar {
  display: none;
}

.rank-number {
  position: absolute;
  top: 87px;
  left: -55px;
  font-size: 8rem;
  font-weight: bold;
  color: var(--color-secondary);
  z-index: 1;
}

.friend-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px; 
  width: 180px;
  flex-shrink: 0; 
  text-decoration: none;
  cursor: pointer;
}

.friend-avatar {
  width: 180px; 
  height: 180px;
}

.friend-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 15%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--color-border);
  background-color: #333;
}

.friend-card span {
  font-size: 0.85rem; /* Texte légèrement plus grand */
  color: #ddd; /* Couleur de texte claire */
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis; /* Ajoute "..." si le nom est trop long */
  white-space: nowrap;
  width: 100%;
}

.theme-manga-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
}

.theme-manga-list {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge */
}

.theme-manga-list::-webkit-scrollbar {
  display: none;                /* Chrome/Safari */
}

.theme-manga-card {
  flex: 0 0 auto;
  width: 250px;
  text-align: center;
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.theme-manga-card img {
  width: 100%;
  border-radius: var(--border-radius-sm);
}

.manga-same-series {
  padding: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: 20px 0px 20px 20px;
  background: #501616;
}

.volume-card img {
  width: 100px;
  height: auto;
  border-radius: var(--border-radius-sm);
}

.volume-card {
  flex: 0 0 auto;
  text-align: center;
  width: 100px;
  color: inherit;
  text-decoration: none;
}

.volume-card img {
  width: 100%;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
}

.volume-card .volume-num {
  margin-top: 6px;
  font-weight: 500;
  display: block;
}

.volume-slider {
  padding: 12px 40px 40px 0px;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;      
  -ms-overflow-style: none;
}


.volume-slider::-webkit-scrollbar {
  display: none;                 /* Chrome/Safari */
}

.volume-slider a {
  flex: 0 0 auto;
  scroll-snap-align: start;
  text-align: center;
  text-decoration: none;
  color: inherit;
  width: 250px;
}

.volume-slider img {
  width: 250px;
  height: auto;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25), 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.collection-card {
  background-color: #1a1a1a;
  border-radius: var(--border-radius-md);
  padding: 16px;
  margin: 10px 0 24px 0;
  border: 1px solid #333;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}


.progress-track {
  background-color: #333;   
  height: 8px;              
  border-radius: 10px;      
  overflow: hidden;
  margin-bottom: 12px;      
}

.progress-fill {
  background-color: #ff4d4d; 
  height: 100%;
  border-radius: 10px;
  width: 0%;               
  transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}


.progress-fill.completed {
  background-color: #ff4d4d; 
}


.progress-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e0e0e0;
  font-family: var(--font-family);
  font-size: 0.95rem;
}

.stats-text {
  font-weight: 400; 
}

.stats-percent {
  font-weight: 700; 
  font-size: 1.1em;
}

.btn-buy {
  background-color: #2a1e1d;
  color: white;
  border: none;
  padding: 15px;
  font-size: 16px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.btn-buy:hover {
  background-color: #443433;
}

.btn-buy-fugue {
  background-color: #E30614;
  color: var(--color-text);
  border: none;
  padding: 15px;
  font-size: 16px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-buy-ebay {
  background-color: #ffffff;
  color: black;
  border: none;
  padding: 15px;
  font-size: 16px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-buy-leboncoin {
  background-color: #EC5915;
  color: var(--color-text);
  border: none;
  padding: 15px;
  font-size: 16px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-buy-vinted {
  background-color: #027782;
  color: var(--color-text);
  border: none;
  padding: 15px;
  font-size: 16px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-buy-amazon {
  background-color: #FFD812;
  color: black;
  border: none;
  padding: 15px;
  font-size: 16px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.like-block {
  margin-top: 10px;
}

.like-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  color: var(--color-text);
  border: 2px solid white;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  cursor: pointer;
  padding: 16px 16px;
  margin-top: 20px;
  font-family: var(--font-family);
  font-weight: 600;
}

.like-button img {
  width: 14px;
  height: 14px;
  filter: brightness(100); 
}

.like-count {
  font-weight: bold;
  color: white;
}

.like-button.liked {
  opacity: 0.5;
  pointer-events: none;
}

.top-nav a.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.manga-user-actions {
  display: flex;
  justify-content: space-around;
  margin: 20px 20px;
}


.icon {
  width: 14px;
  height: 14px;
  margin-left: 8px;
  vertical-align: middle;
}

.manga-summary {
  padding: 0px 20px;
}

.manga-summary p {
  line-height: 1.6;
  color: white;
  font-size: 15px;
}

.manga-series {
  background-color: #8b1c1c;
  padding: 24px 16px;
  color: #fff;
}

.manga-series h2 {
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: bold;
}

.manga-series p {
  margin-bottom: 16px;
  font-size: 14px;
  color: #f0f0f0;
}

.collection-link {
  display: inline-block;
  color: #fff;
  text-decoration: underline;
  font-size: 14px;
}

.scroll-row-related {
  display: flex;
  gap: 16px;
  overflow-x: auto;
}

.scroll-row-related img {
  width: 100%;
  object-fit: cover;
}

.scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
}

.scroll-row img {
  width: 100%;
  object-fit: cover;
}

.scroll-row_collection {
  display: flex;
  gap: 12px; /* espace horizontal entre les images */
  overflow-x: auto;
  padding: 8px 0;
}

.scroll-row_collection img {
  width: 120px;
  object-fit: cover;
  box-shadow:
    1.51px 18.09px 45.23px -15.08px rgba(0, 0, 0, 0.20),
   -6.03px  9.05px 30.15px   0px  rgba(0, 0, 0, 0.25),
     0px   64.83px 42.21px -24.12px rgba(0, 0, 0, 0.35);
}


.second-hand-link {
  text-align: center;
  font-size: 14px;
  color: white;
  text-decoration: underline;
  cursor: pointer;
}

.average-text {
  margin-left: 10px;
  font-size: 16px;
  color: #555;
  align-self: center;
}

.manga-detail-button {
  display: inline-block;
  margin: 24px 0;
  padding: 12px 20px;
  background-color: #e63946;
  color: var(--color-text);
  font-weight: bold;
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  transition: background-color var(--transition-fast);
}

.manga-detail-button:hover {
  background-color: #d12f3c;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #111;
  border-top: 1px solid #333;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  height: 80px;
  box-sizing: border-box;

  /* ✅ Gestion du safe area iOS */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ✅ Fix pour Safari iOS : le viewport dynamique */
@supports (-webkit-touch-callout: none) {
  .bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    /* Utilise la hauteur dynamique du viewport visible */
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    background-color: #000;
  }
}

.nav-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.nav-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  margin: 0;
}

.nav-item .nav-icon {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: opacity var(--transition-normal);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

@media screen and (min-width: 768px) {
  .bottom-nav {
    display: none !important;
  }
}

.top-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    background: #111;
    padding: 16px 0;
  }

  .top-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
  }

  .top-nav a.active {
    color: #f55;
  }

.related-manga-section {
  padding: 1rem;
}

.scroll-row {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
}


.carousel-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 1rem;
  padding: 1rem 0;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.carousel-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Snap alignement (optionnel pour effet carrousel fluide) */
.carousel-container {
  scroll-snap-type: x mandatory;
}

.carousel-container > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 200px; /* ou ce que tu veux */
}

.top-carousel {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 16px;
}

.top-carousel::-webkit-scrollbar {
  display: none;
}

.top-card {
  flex: 0 0 auto;
  width: 160px;
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background-color: var(--color-card-bg);
}

.top-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  border-radius: var(--border-radius-md);
}

.top-rank {
  position: absolute;
  top: 8px;
  left: -5px;
  background-color: black;
  color: var(--color-text);
  font-size: 56px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
  z-index: 1;
}

.exclusives-section {
  padding: 1rem;
  text-align: center;
}

.exclusives-section p {
  margin: 2rem 0;
  text-align: center;
}


.exclusives-section a {
  text-decoration: none;
  color: #e63946;
}


.event-banner {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: var(--border-radius-md);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  transition: transform var(--transition-normal);
}


.exclusives-section {
  margin: 2rem 0;
  padding: 1rem;
}

.exclusives-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
}

.exclusives-box {
  padding: 1rem 1rem 1rem 1rem;
  text-align: center;
}

.app-promo-section {
  padding: 1rem 1rem;
  display: flex;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: #0d0303;
  background-size: auto, 26px 26px;
}

.app-promo-section::before {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(254, 76, 63, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.app-promo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
  max-width: 820px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.app-promo-box h2 {
  font-size: 3.4rem;
  margin: 0;
}

.app-preview-img {
  width: 100%;
  max-width: 820px;
  height: auto;
  border-radius: var(--border-radius-md);
  transition: filter var(--transition-normal);
}

.app-preview-img:hover {
  filter: drop-shadow(0 0 24px rgba(254, 76, 63, 0.35)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.app-store-badge {
  max-width: 160px;
  height: auto;
  transition: opacity var(--transition-normal);
}

.app-store-badge:hover {
  opacity: 0.85;
}

.exclusives-banner {
  width: 100%;
  max-width: 177px;
  height: auto;
  transition: transform var(--transition-normal);
}

/* === TikTok Section === */
.tiktok-section {
  padding: 24px 16px;
}

.tiktok-section .subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.tiktok-video {
  width: 354px;
  max-width: 90vw;
  flex: 0 0 auto;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background-color: var(--color-card-bg-alt);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#tiktokVideos {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-top: 16px;
}

.tiktok-video iframe {
  width: 100%; 
  height: auto; 
  aspect-ratio: 354 / 630; 
  display: block; 
  border: none;
}

#tiktokVideos::-webkit-scrollbar {
  display: none;
}


.recommendation-section {
  padding: 24px 16px;
}


.recommendation-section .subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"] {
  font-size: 16px !important; 
}

.recommendation-card {
  width: 170px;
  height: 250px;
  flex-shrink: 0;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  position: relative;
  background-color: #000;
  border: 1px solid #333;
  margin-right: 12px;
}

.recommendation-card a {
  display: block;       
  width: 100%;
  height: 100%;
}

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

.recommendation-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px;
}

.recommendation-card .overlay .title {
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

#wishlistContainer {
  display: grid;
  gap: 16px;
  padding: 16px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.wishlist-section {
  padding: 12px 24px 42px 24px;;
  background-color: #5C1D1D;
}

.wishlist-section .subtitle {
  font-size: 14px;
  color: #f0f0f0;
  margin: 0 0 12px 0;
}

.section-header .subtitle {
    font-size: 14px;
    color: #f0f0f0;
    margin: 0 0 12px 0;
}

.wishlist-card {
  width: 250px;
  flex-shrink: 0;
  overflow: hidden;
  background: #000;
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25), 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.15s ease;
}


.wishlist-card img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

/* Desktop : wishlist comme collection */
@media (min-width: 768px) {
  #wishlistContainer {
    display: grid;
    gap: 24px;
    padding: 24px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .wishlist-item {
    background-color: var(--color-card-bg-alt);
    border-radius: var(--border-radius-md);
    padding: 16px;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    text-decoration: none;
  }

  .wishlist-item:hover {
    border-color: white;
    transition: border-color 0.15s ease;
  }

  .wishlist-link {
    display: block;
    text-decoration: none;
    color: inherit;
    text-align: left;
    flex: 1;
  }

  .wishlist-link img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
  }

  .wishlist-link h3 {
    margin: 8px 0 4px;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    color: #fff;
  }

  .wishlist-link p,
  .wishlist-link .wishlist-edition {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
  }

  .btn-remove {
    margin-top: 8px;
    padding: 10px;
    width: 100%;
    border-radius: var(--border-radius-sm);
    border: none;
    background-color: #e63946;
    color: var(--color-text);
    cursor: pointer;
    text-align: center;
    font-size: 0;
  }

  .btn-remove::before {
    content: "Retirer";
    font-size: 14px;
  }

  .btn-remove:hover {
    background-color: #c92f3a;
  }
}



.featured-section {
  padding: 24px 16px;
}

.featured-section .subtitle {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 16px;
}

.featured-theme {
  background: #8b1c1c;
  border-radius: var(--border-radius-md);
  padding: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-fast);
}

.featured-theme .theme-title {
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 6px;
  color: white;
  text-align: center;
}

.featured-theme .manga-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
 
}

.featured-theme .manga-thumbnails img {
  height: 130px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  object-fit: cover;
}

.article-card {
  max-width: 250px;
  display: flex;
  background-color: var(--color-card-bg-alt);
  flex-direction: column;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.article-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.article-info h3 {
  font-size: 1rem;
}

.article-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 32px 16px;
}
.article-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 8px;
}

.article-content p {
  line-height: 1.6;
  margin-bottom: 16px;
}
.article-manga-list {
  margin-top: 32px;
}
.article-manga-list h3 {
  margin-bottom: 12px;
}
.manga-thumbnails {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.manga-thumbnails img {
  width: 100px;
  object-fit: cover;
}

.back-button {
  display: block;
  color: #e63946;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: inline-block;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .back-button {
    display: none;
  }
}

.back-button:hover {
  text-decoration: underline;
}

.top-nav {
  display: none;
}

.manga-hero {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 55px 0 55px 0; 
  }

/* ===================================================
   COLLECTION HERO — Style Crunchyroll
   =================================================== */
.manga-hero-details {
  position: relative;
  /* Sortir du page-wrapper pour prendre 100vw */
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  min-height: 280px;
  background-repeat: no-repeat;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

/* Toutes tailles : image desktop par défaut */
.manga-hero-details.collection-hero {
  background-image: var(--hero-bg-desktop);
  background-size: cover;
  background-position: center top;
  min-height: 420px;
}

/* Mobile : image portrait si elle existe (classe ajoutée par JS après test) */
@media (max-width: 767px) {
  .manga-hero-details.collection-hero.has-mobile-banner {
    background-image: var(--hero-bg-mobile);
    background-position: center top;
  }
}

/* Gradient mobile : léger, sombre uniquement en bas */
.manga-hero-details.collection-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 5, 5, 0.82) 0%,
    rgba(10, 5, 5, 0.25) 40%,
    rgba(10, 5, 5, 0.0) 100%
  );
  z-index: 1;
}

/* Contenu texte positionné en bas du hero (mobile) */
.collection-hero-content {
  position: relative;
  z-index: 2;
  padding: 24px 20px;
  width: 100%;
}

.collection-hero-content .hero-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.15;
  color: #fff;
}

.collection-hero-content .hero-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===================================================
   VERSION DESKTOP — Crunchyroll full
   =================================================== */
@media (min-width: 768px) {
  .manga-hero-details {
    min-height: 480px;
    align-items: center;
  }

  /* Desktop : image landscape, artwork à droite */
  .manga-hero-details.collection-hero {
    background-image: var(--hero-bg-desktop);
    background-position: center right;
  }

  /* Gradient desktop : doux à gauche + légèrement sombre en bas */
  .manga-hero-details.collection-hero::after {
    background:
      linear-gradient(
        to right,
        rgba(10, 5, 5, 0.88) 0%,
        rgba(10, 5, 5, 0.6) 30%,
        rgba(10, 5, 5, 0.15) 55%,
        rgba(10, 5, 5, 0) 100%
      ),
      linear-gradient(
        to top,
        rgba(10, 5, 5, 0.45) 0%,
        rgba(10, 5, 5, 0) 25%
      );
  }

  .collection-hero-content {
    padding: 60px;
    max-width: 52%;
    align-self: center;
  }

  .collection-hero-content .hero-title {
    font-size: 3.2rem;
    margin-bottom: 14px;
  }

  .collection-hero-content .hero-desc {
    font-size: 1rem;
    -webkit-line-clamp: 3;
    margin-top: 12px;
  }
}

 .manga-glenat-details {
  position: relative;
  width: 100%;
  background: #BF141F;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 25px 0; 
  }

.manga-mangetsu-details {
  position: relative;
  width: 100%;
  background: #71AD7B;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 25px 0; 
}

.manga-shiba-details {
  position: relative;
  width: 100%;
  background: #181818;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 25px 0; 
}

.manga-soleil-details {
  position: relative;
  width: 100%;
  background: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 25px 0; 
}

  .manga-crunchyroll-details {
  position: relative;
  width: 100%;
  background: #FD5E01;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 25px 0; 
  }

  .manga-kana-details {
  position: relative;
  width: 100%;
  background: #F1EB63;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 25px 0; 
  }

  .manga-kioon-details {
  position: relative;
  width: 100%;
  background: #00A3E0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 25px 0; 
  }

  .manga-kurokawa-details {
  position: relative;
  width: 100%;
  background: #E2001A;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 25px 0; 
  }

  .manga-meian-details {
  position: relative;
  width: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 25px 0; 
  }

  .manga-pika-details {
  position: relative;
  width: 100%;
  background: #FFE500;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 25px 0; 
  }

  .manga-panini-details {
  position: relative;
  width: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 25px 0; 
  }

  .story-share-button {
  display: inline-block;
  margin-top: 1rem;
  background: linear-gradient(45deg, #f43f5e, #ec4899);
  color: var(--color-text);
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius-sm);
  font-weight: bold;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

/* === Styles Bibliothèque (même rendu que Wishlist) === */
.bibliotheque-item {
  background-color: var(--color-card-bg-alt);
  border-radius: var(--border-radius-md);
  padding: 12px;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  gap: 16px;
}

.bibliotheque-link {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.bibliotheque-link img {
  width: 75px;
  height: auto;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.bibliotheque-link div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bibliotheque-link h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
}

.bibliotheque-volume {
  font-size: 0.9rem;
  color: var(--color-secondary);
  font-weight: 600;
  margin-top: 2px;
}

.bibliotheque-author {
  font-size: 0.85rem;
  color: #aaa;
  margin: 4px 0 0 0;
}

.bibliotheque-link p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.bibliotheque-main {
  padding: 14px 20px 0px 0px; /* même espacement que wishlist-main */
  display: flex;
}

/* Bouton retirer */
.bibliotheque-item .btn-remove {
  background: #e63946;
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 25%;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bibliotheque-item .btn-remove:hover {
  background: #c92f3a;
}

#bibliothequeContainer {
        display: flex;
        flex-direction: column;
        gap: 40px;
        padding: 10px 16px;
    }

/* ✅ Responsive desktop */
@media (min-width: 768px) {
  #bibliothequeContainer {
display: flex;
    flex-direction: column;
    gap: 60px;
  }

 .bibliotheque-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    align-items: start;
  }

  .bibliotheque-section .bibliotheque-series-title,
  .bibliotheque-section .collection-card {
    grid-column: 1 / -1;
  }

  .bibliotheque-section .collection-card:hover {
    border-color: var(--color-border);
  }

  .bibliotheque-item:hover {
    border-color: white;
    transition: border-color 0.15s ease;
  }

  .bibliotheque-item {
    background-color: var(--color-card-bg-alt);
  border-radius: var(--border-radius-md);
  padding: 16px;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  }

  .bibliotheque-link {
     display: block;
  text-decoration: none;
  color: inherit;
  }

  .bibliotheque-link img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
  }

  .bibliotheque-link h3 {
    margin: 8px 0 4px;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
  }

  .bibliotheque-link p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
  }

  .bibliotheque-item .btn-remove {
    margin-top: 8px;
    padding: 10px;
    width: 100%;
    font-size: 14px;
    border-radius: var(--border-radius-sm);
    border: none;
    background-color: #e63946;
    color: var(--color-text);
    cursor: pointer;
    text-align: center;
  }

  .bibliotheque-item .btn-remove:hover {
    background-color: #c92f3a;
  }

  /* Remplace le "−" par "Retirer" sur desktop */
  .bibliotheque-item .btn-remove::before {
    content: "Retirer";
  }
  .bibliotheque-item .btn-remove {
    font-size: 0; /* masque le "-" */
  }
}

.price-total {
  color: white;
  font-weight: 400;
  font-size: 1.1rem;
 padding: 10px 15px;
  margin-bottom: 15px;
}
.price-total span {
  font-weight: 700;
  color: #e63946;
}

.share-launch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 1rem;
  border: none;
}

.share-icon-inline {
  width: 20px;
  height: 20px;
}

.share-main {
    padding: 0px 20px 6px 20px;
    
}

.share-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 9999;
  padding: 0;
}

.share-options {
  background: #111;
  width: 100%;
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
  padding: 1.5rem 1.5rem 3.5rem 1.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 100%;
}

.share-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  background: #222;
  border: none;
  border-radius: 10px;
  color: var(--color-text);
  text-align: left;
}

.share-icon {
  width: 20px;
  height: 20px;
}

@media (min-width: 768px) {
  .share-modal {
    align-items: center;
  }

  .share-options {
    width: 600px;
    border-radius: var(--border-radius-lg);
  }
}

.close-share {
  background: transparent;
  color: #aaa;
  border: none;
  font-size: 1rem;
  margin-top: 1rem;
}

.hidden {
  display: none;
}

.manga-cover-wrapper {
  position: relative;
  width: 100%;
  max-width: 260px;
}

.manga-cover-skeleton {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
}

.manga-cover {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 6px;
  width: 100%;
  max-width: 260px;
 box-shadow: 1.51px 18.09px 45.23px -15.08px rgba(0, 0, 0, 0.20), -6.03px 9.05px 30.15px 0px rgba(0, 0, 0, 0.25), 0px 64.83px 42.21px -24.12px rgba(0, 0, 0, 0.35);
}

.manga-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

/* ✅ Texture adaptative */
.manga-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
  opacity: 0.5;
}

   .manga-coverdetails {
    width: 100%;
    max-width: 100%;
  }

   .manga-details {
    margin: 20px;;
  }


  .close-btn {
    position: fixed;
    top: 40px;
    right: 16px;
    left: auto;
    z-index: 1000;
    background-color: rgba(97, 99, 101, 0.85);
    color: #111;
    text-decoration: none;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background-color var(--transition-fast);
  }

  .close-btn:hover {
    background-color: rgba(122, 124, 126, 1);
  }


  .install-prompt {
    position: fixed;
    bottom: 80px;
    left: 16px;
    right: 16px;
    background-color: #111;
    color: var(--color-text);
    padding: 16px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    font-size: 15px;
    z-index: 9999;
    text-align: center;
  }
  
  .install-prompt .icon-inline {
    width: 18px;
    vertical-align: middle;
    margin: 0 4px;
  }
  
  .install-prompt .small {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 4px;
  }
  
  .install-prompt .close-install {
    margin-top: 10px;
    background: #e63946;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
  }

  .site-footer {
    color: #bbb;
    text-align: center;
    padding: 24px 16px;
    font-size: 14px;
    margin-top: 40px;
  }
  
  .site-footer .footer-links {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .site-footer .footer-links a {
    color: #999;
    text-decoration: none;
    font-weight: 500;
  }
  
  .site-footer .footer-links a:hover {
    text-decoration: underline;
  }

  .site-footer .social-links {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.site-footer .social-links img {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-fast);
  filter: brightness(0) invert(1);
}

.site-footer .social-links img:hover {
  transform: scale(1.1);
}

@media (max-width: 767px) {
  .site-footer {
    display: none;
  }
}

@keyframes shimmer {
  0% { background-position: -400% 0; }
  100% { background-position: 400% 0; }
}

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

.edition-note {
  margin-top: 24px;
  padding: 0px 20px;
}

.collection-header {
  padding: 0px 20px 0px 20px;
  color: #fff;
}

.collection-header h1 {
  font-size: 3rem;
  margin: 20px 0 8px;
}

.collection-header p {
  font-size: 1rem;
  margin: 10px 0 8px;
}

.status-tag {
  display: inline-block;
  margin-top: 12px;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--border-radius-md);
}

.collection-actions {
  margin: 24px 0px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.collection-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: none;
  border-radius: 14px;
  padding: 14px;
  gap: 12px;
}

.calendar-main {
    padding: 6px 20px 10px 20px;
}

.btn-calendar {
    display: inline-flex;
    align-items: center;
    background: var(--color-secondary);
    color: var(--color-text);
    border: none;
    padding: 16px 16px;
    border-radius: var(--border-radius-md);
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    min-width: 180px;
    justify-content: center;
    font-family: var(--font-family);
}


.btn-calendar:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.btn-calendar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-calendar svg {
    flex-shrink: 0;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .btn-calendar {
        width: 100%;
        min-width: unset;
        margin-top: 8px;
    }
}

.scroll-row,
.scroll-row-articles,
.scroll-row_collection,
.publisher-scroll {
  scrollbar-width: none; 
  -ms-overflow-style: none; 
}

.scroll-row::-webkit-scrollbar,
.scroll-row-articles::-webkit-scrollbar,
.scroll-row_collection::-webkit-scrollbar,
.publisher-scroll::-webkit-scrollbar {
  display: none; 
}

.filter-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; 
  justify-content: flex-start;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}



.tab {
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  background-color: #000;
  color: var(--color-text);
  border: 1px solid white;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  font-size: 1rem;
}

.tab.active {
  background-color: #ff4d4d;
  color: white;
  border: none;
}

.btn-collection-all {
  background-color: #ff4d4d;
  color: #fff;
}

.collection-search-bar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
}

.collection-search-bar .custom-select {
  display: flex;
  flex-shrink: 0;
  flex-grow: 0;
}

.collection-search-bar .custom-select-btn {
  background-color: var(--color-card-bg-alt);
  padding: 0.5rem 0.75rem;
  align-self: stretch;
}

@media (min-width: 768px) {
  .collection-search-bar {
    padding: 12px 24px;
  }
}

.collection-search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
  background-color: var(--color-card-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--color-text-muted);
}

.collection-search-inner input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
}

.collection-search-inner input::placeholder {
  color: var(--color-text-muted);
}

.collection-search-clear {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  display: none;
  line-height: 1;
}

.collection-search-clear.visible {
  display: block;
}


.custom-select {
  position: relative;
  display: inline-block;
}

.custom-select-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #000;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.custom-select-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.custom-select.is-open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  background-color: #000;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 100;
}

.custom-select.is-open .custom-select-dropdown {
  display: block;
}

.custom-select-option {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  color: var(--color-text);
}

.custom-select-option:hover {
  background-color: rgba(255,255,255,0.08);
}

.custom-select-option.is-selected {
  color: #ff4d4d;
}

.btn-wishlist-all {
  background-color: #352e2e;
  color: #fff;
}



.btn-wishlist-all:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #aaa;
}

.btn-collection-all:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #aaa;
}

.next-release {
  background: linear-gradient(to bottom, #F77764, #A72E17);
  color: #fff;
  text-align: center;
  padding: 32px 16px;
  margin-top: 20px;
}

.next-release h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.next-release p {
  font-size: 16px;
  color: #ddd;
  margin-bottom: 16px;
}

.next-release img {
  max-width: 300px;
  width: 100%;
  border-radius: var(--border-radius-md);
}

.volume-list {
  padding: 0;
  display: block; /* Indispensable pour que les rayons s'empilent verticalement */
  width: 100%;
  overflow: visible; /* On laisse la page s'agrandir selon le nombre de tomes */
}

.volume-list div[id^="shelf-"] {
  margin-bottom: 40px; /* Espace entre les éditions */
  display: none; /* Le JS l'affichera seulement s'il y a des tomes */
}

.volume-list h2 {
  margin: 20px 0 10px 16px;
  font-size: 1.25rem;
  color: #fff;
  font-weight: bold;
}

.volume-list-grid {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 10px 16px;
  list-style: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 30px; /* Espace entre les listes de tomes */
}

div[id^="shelf-"] {
  margin-bottom: 40px; /* Évite que le rayon suivant ne remonte sur le précédent */
}

.volume-list-grid li {
  background: var(--color-card-bg-alt);
  border: 1px solid var(--color-border);
  padding: 12px;
  border-radius: var(--border-radius-md);
  text-align: left;
  color: var(--color-text);
}

.volume-list-grid::-webkit-scrollbar {
  height: 4px;
}
.volume-list-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.edition-label {
    font-size: 12px;
    color: var(--color-secondary);
    font-weight: bold;
    margin-top: 4px;
}

.volume-list-grid img {
  width: 100%;
  border-radius: var(--border-radius-sm);
  margin-bottom: 8px;
}

.collection-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 8px;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.volume-list-grid button {
  margin-top: 8px;
  padding: 10px 10px;
  font-size: 14px;
  border-radius: var(--border-radius-sm);
  border: none;
  background-color: #ff4d4d;
  color: var(--color-text);
  cursor: pointer;
  width: 100%;
}

.btn-add:disabled {
  opacity: 1;
  cursor: not-allowed;
  background-color: #444;
  width: 100%;

}

.volume-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.volume-link img {
  width: 100%;
  height: auto;
  display: block;
}

.volume-info {
  padding: 10px;
}

.volume-title {
  font-size: 14px;
  font-family: var(--font-family);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.theme-list {
  padding: 0rem 1rem;
}

.theme-list-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.theme-text-link {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  display: block;
  padding: 0.3rem 0;
  transition: color var(--transition-fast);
}

.theme-text-link:hover {
  color: #f87171; /* rouge clair au survol */
}

.theme-list-grid li {
  padding-left: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .theme-list-grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0rem 1rem;
    max-width: 100%;
  }

  .theme-list-grid li {
    width: auto;
  }
}

.theme-title {
  margin-top: 0.5rem;
  font-weight: bold;
  font-size: 0.95rem;
  color: #fff;
  line-height: 1.3;
}


.bdfugue-banner {
  text-align: center;
}

.bdfugue-banner img {
  max-width: 100%;
  height: auto;
  transition: transform var(--transition-fast);
}

.bdfugue-banner img:hover {
  transform: scale(1.02);
}

.bdfugue-title {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 16px;
  text-align: left;
}

.empty-state-default {
    max-width: 1200px;
}

.empty-state-default h2 {
    color: white; 
    margin-bottom: 1.5rem;
    margin-left: 0; 
    font-size: 2rem; 
    text-align: left;
}

.categories-grid {
    display: grid;
    gap: 1rem; 
    width: 100%;
    grid-template-columns: repeat(2, 1fr); 
    justify-items: stretch;
}

.category-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 90px;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    background-image: linear-gradient(135deg, #F77764, #A72E17);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.category-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
}

.genre-text {
    color: white;
    font-size: 1.1rem; 
    line-height: 1;
    margin: 0;
}

.genre-category-image {
    width: 60px; 
    height: 60px;
    border-radius: 4px; /* Optionnel : petits coins arrondis */
    margin-bottom: 12px; /* Espace entre l'image et le texte */
    
}


.category-link {
    background-size: cover; 
    background-repeat: no-repeat;
    background-position: center; 
    background-color: transparent;
}

@media (min-width: 601px) {
    .categories-grid {
        grid-template-columns: repeat(5, 1fr); 
        gap: 20px;
        width: 100%;
         justify-content: center;
    }

    .genre-category-image {
        width: 60px;
        height: 60px;
    }

    .category-link {
        height: 150px;
        width: 150px;
        border-radius: var(--border-radius-lg);
    }
    
    .genre-text {
        font-size: 1.6rem;
    }
}

/* --- Style pour l'Historique de Recherche --- */
.search-history-section {
    padding: 0 16px;
    margin-top: 24px;
    margin-bottom: 16px; 
}

.history-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    margin: 0 0 12px 0;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.history-item {
    background: var(--color-card-bg-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
    font-family: var(--font-family);
    font-weight: 400;
}

.history-item:hover {
    background-color: #5C1D1D;
    border-color: #8D3333;
}

.search-bar {
  border: 1px solid #8D3333;
  display: flex;
  align-items: center;
  background-color: #5C1D1D;
  border-radius: var(--border-radius-sm);
  padding: 10px 16px;
  margin: 16px;
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  color: white;
  font-size: 16px;
  outline: none;
}

.search-bar input::placeholder {
  color: white; /* Force le texte du placeholder en blanc */
  opacity: 0.8; /* Optionnel : pour le rendre légèrement moins intrusif que le texte tapé */
}


.search-icon-btn, 
.clear-icon-btn { 
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Positionnement de la loupe */
.search-icon-btn {
  margin-left: 12px;
}

.clear-icon-btn {
    margin-left: 8px; 
}

#clearSearchBtn.hidden + .search-icon-btn {
    display: flex; 
}

.search-icon-btn {
    /* La loupe sera affichée par le sélecteur ci-dessous si la croix est masquée */
    display: none; 
    margin-left: 12px; /* Marge à gauche de la loupe */
}

.search-icon-btn img,
.clear-icon-btn img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1); /* Rendre les icônes blanches */
}


.hidden {
  display: none !important;
}

.search-suggestion {
  color: var(--color-text);
  background-color: var(--color-card-bg-alt);
  border-radius: var(--border-radius-md);
  padding: 16px;
}

.search-suggestion h2 {
  font-size: 26px;
  margin: 0px 0 8px;
}

.search-suggestion p {
  font-size: 14px;
  margin: 0px 0 8px;
}


@media (max-width: 959px) { 
.search-bar {
      
        position: static; 
        margin: 16px; 
        width: auto;
        bottom: auto;
        left: auto;
        right: auto;
        z-index: initial;
        background-color: #5C1D1D; 
    }

   
    @supports (-webkit-touch-callout: none) {
        body {
          
            padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        }
        
        .search-bar {
          
            bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        }
    }
}


/* Cacher sur Desktop pour réutiliser le flux normal */
@media (min-width: 960px) {
    .search-bar {
        /* Réinitialiser le style pour le desktop */
        position: static;
        margin: 16px; /* Ou la marge que vous utilisez normalement */
        background-color: #1c1c1c; 
        z-index: initial;
    }
}

/* --- Style pour la Suggestion du Moment --- */
.suggestion-of-the-day-block {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-card-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 12px 16px;
    margin: 0 0 20px 0;
    width: 90%;
    max-width: 900px;
    text-decoration: none;
    color: var(--color-text);
    transition: transform var(--transition-fast);
}

.suggestion-of-the-day-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.suggestion-of-the-day-block img {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.suggestion-info {
    flex: 1;
}

.suggestion-tag {
    display: block;
    font-size: 0.8rem;
    font-weight: bold;
    color: #F77764; /* Couleur de votre dégradé */
    margin-bottom: 4px;
    text-transform: uppercase;
}

.suggestion-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.suggestion-info p {
    margin: 2px 0 0;
    font-size: 0.9rem;
    color: #aaa;
}

.suggested-manga {
  display: flex;
  background: none;
  text-decoration: none;
  color: inherit;
  gap: 16px;
}

.suggested-manga img {
  width: 80px;
  height: auto;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.15);
}

.suggestion-text h3 {
  font-size: 16px;
  margin: 0;
  font-weight: 700;
}

.suggestion-text p {
  margin: 2px 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

.suggestion-arrow {
  margin-left: auto;
  font-size: 20px;
  color: white;
}

#youtubeShortSection {
  padding: 16px 16px 16px 16px;
  background-color: #5C1D1D; 
  max-width: 900px; 
  box-sizing: border-box;
  height: 600px;
  margin: 20px auto;
}

#youtubeShortSection h2 {
    margin-top: 0; 
    margin-bottom: 16px;
    font-size: 1.2rem;
    font-weight: 600;
}

.youtube-short-container {
    position: relative;
    width: 100%;
    padding-bottom: 177.77%; 
    height: 0;
    overflow: hidden;
    max-width: 100%; 
    margin: 0; /* Pas de centrage sur mobile */
}

.youtube-short-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 500px;
    border: 0;
    border-radius: var(--border-radius-sm);
}

@media (min-width: 768px) {
    .youtube-short-container {
        width: 300px; 
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}

.category-link.genre-shonen {
    /* Utilise une couleur rouge vif et saturée */
    background-image: linear-gradient(135deg, #FF4500, #E63946); 
    background-color: #E63946;
}

.category-link.genre-seinen {
    /* Utilisation d'un dégradé de bleu nuit à gris anthracite */
    background-image: linear-gradient(135deg, #1A2930, #303F54); 
    background-color: #1A2930;
}

.category-link.genre-shojo {
    /* Utilisation d'un dégradé de rose à violet */
    background-image: linear-gradient(135deg, #FF69B4, #9370DB); 
    background-color: #FF69B4;
}

.category-link.genre-josei {
    background-image: linear-gradient(135deg, #008080, #009688); 
    background-color: #008080;
}

header {
  padding: 10px 10px 0px 16px;
  color: white;
}

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

@media (min-width: 768px) {
  .collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    padding: 24px;
  }

  .collection-grid .collection-card img {
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
  }

  .collection-grid .collection-card h3 {
    font-size: 1.25rem;
    margin-top: 6px;
    margin-bottom: 2px;
  }

  .collection-grid .collection-card p {
    margin: 0 0 4px;
  }
}


@media (max-width: 767px) {
  /* Conteneur objets : liste verticale */
  #collectionContainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
  }

  #wishlistContainer{
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
  }


  a.collection-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-decoration: none;
    width: 100% !important;
    max-width: 100%;
    gap: 16px;
    padding: 12px;
    background-color: var(--color-card-bg-alt);
    border-radius: var(--border-radius-md);
    box-sizing: border-box;
    border: 1px solid var(--color-border);
  }

  a.collection-card img {
    width: 75px;
    height: auto;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
  }

  a.collection-card > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  a.collection-card h3 {
    margin: 0 0 4px;
    font-size: 1.2rem;
    color: white;
  }

  a.collection-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
  }
}



.series-cover {
  width: 100%;
  max-width: 390px;
  height: auto;
  display: block;
  margin: 12px auto;
}

.collection-card {
  background-color: var(--color-card-bg-alt);
  border-radius: var(--border-radius-md);
  padding: 16px;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  margin: 0;
  text-decoration: none;
}

.collection-card h3,
.collection-card p {
  text-decoration: none;
}

@media (min-width: 768px) {
  .collection-grid .collection-card:hover {
    border-color: white;
    transition: border-color 0.15s ease;
  }

  .calendar-grid .event:hover {
    border-color: white;
    transition: border-color 0.15s ease;
  }

  .manga-card.vertical-design:hover {
    border-color: white;
    transition: border-color 0.15s ease;
  }

  .recommendation-card:hover {
    border-color: white;
    transition: border-color 0.15s ease;
  }

  .wishlist-card:hover {
    border-color: white;
  }

  .theme-manga-card:hover {
    border-color: white;
  }
}

.card-publisher {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: #aaa;
  font-size: 16px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  background: #2a2a2a;
  background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

.skeleton-line {
  height: 12px;
  width: 80%;
  border-radius: 4px;
}

.skeleton-line.short {
  width: 40%;
}

.skeleton-card-vertical {
  min-width: 140px;     
  margin-right: 16px;    
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;        /* Empêche l'écrasement dans le flexbox */
}

/* La fausse couverture */
.skeleton-cover-vertical {
  width: 100%;
  height: 200px;
  border-radius: var(--border-radius-sm);
}

/* Ajustement spécifique pour la section "Articles" qui est plus large */
#featuredLists .skeleton-card-vertical {
  min-width: 250px;
}
#featuredLists .skeleton-cover-vertical {
  height: 140px;
}

/* --- SKELETON GÉANT (300x600) --- */

.skeleton-card-xl {
  min-width: 300px;      /* Largeur fixe de 300px */
  width: 300px;
  margin-right: 16px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-shrink: 0;
}

/* On cible l'image à l'intérieur de la carte XL pour lui donner 600px */
.skeleton-card-xl .skeleton-cover-vertical {
  height: 500px;
  width: 100%;
  border-radius: var(--border-radius-md);
}

/* --- SKELETON SMALL (pour les carrousels simples type classiques/wishlist) --- */
.skeleton-card-sm {
  min-width: 140px;
  width: 140px;
  margin-right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.skeleton-card-sm .skeleton-cover-vertical {
  height: 200px;
  width: 100%;
  border-radius: var(--border-radius-sm);
}

/* --- SKELETON ROUND (pour éditeurs et créateurs) --- */
.skeleton-card-round {
  min-width: 80px;
  width: 80px;
  margin-right: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.skeleton-cover-round {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius-round);
}

/* --- SKELETON ARTICLE (pour la section actualités) --- */
.skeleton-card-article {
  min-width: 250px;
  width: 250px;
  margin-right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.skeleton-card-article .skeleton-cover-article {
  height: 140px;
  width: 100%;
  border-radius: var(--border-radius-sm);
}

.collection-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
}

.collection-card .status {
  background: white;
  color: black;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
  display: inline-block;
  margin: 4px 0;
  width: fit-content;
}

.series-status-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  margin: 2px 0;
  width: fit-content;
}

.serie-en-cours {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.serie-terminee {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.progress-bar {
  height: 6px;
  border-radius: 4px;
  background: #444;
  margin-top: 8px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: red;
}

.manga-edition {
  font-size: 12px;
  color: var(--color-secondary);
  font-weight: bold;
  margin-top: 4px;
}

.price {
  font-size: 14px;
  font-weight: bold;
  margin-top: 8px;
  color: #fff;
}

.price.used {
  font-size: 14px;
  color: #fff;
  margin-top: -8px;
}

.search-results {
  padding: 24px 16px;
}

.search-results h2 {
  font-size: 26px;
  margin: 0px 0 0px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.result-card {
  background-color: var(--color-card-bg-alt);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition: transform var(--transition-fast);
}

.result-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-info {
  padding: 2px;
  text-align: left;
}

.card-info h3 {
  font-size: 14px;
  color: #fff;
  margin: 0;
}

.card-info p {
  font-size: 12px;
  color: #bbb;
  margin: 4px 0 0;
}

.search-results {
  padding: 12px 16px 0px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-result-item {
  display: flex;
  background-color: var(--color-card-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  padding: 12px;
  text-decoration: none;
  color: var(--color-text);
}

.search-result-item:hover {
  background-color: #2a2a2a;
}

.search-result-item img {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 16px;
}

.info-block {
  flex: 1;
}

.info-block strong {
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
}

.info-block p {
  font-size: 14px;
  color: white;
  margin: 2px 0;
}

.empty-state {
  text-align: center;
  color: var(--color-text);
  padding: 40px 16px;
  background-color: var(--color-card-bg-alt);
  border-radius: var(--border-radius-md);
  font-size: 14px;
}

.badge-fav {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border-radius: var(--border-radius-round);
  padding: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  transition: transform var(--transition-fast);
}

/* Style du bouton CTA sous le prix */
.header-cta {
  display: inline-block;
  padding: 10px 24px;
  color: #e63946;
  text-decoration: none;
  font-size: 0.9rem;

}

#otherVolumes {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#otherVolumes::-webkit-scrollbar {
    display: none;
}

.other-volume-item {
    flex: 0 0 auto;
    width: 250px;
    scroll-snap-align: start;
}

.other-volume-link {
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.other-volume-img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform var(--transition-fast);
}

.other-volume-link:hover .other-volume-img {
    transform: translateY(-4px);
}

.other-volume-number {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}


/* Centre le bouton si le conteneur parent est en flex column */
.collection-stats-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* Important pour centrer le bouton */
}

.manga-card .manga-image-wrapper img.manga-cover {
  display: block;
  width: 100% !important;
  height: 450px; /* même hauteur pour tout */
  max-width: 100% !important;
  object-fit: cover;
}

.manga-card .manga-image-wrapper {
  position: relative;
  overflow: hidden;
}

.manga-image-wrapper img.manga-cover {
  width: 100%;
  height: auto;
  display: block;
}

.desktop-only {
  display: inline-block !important;
}

.mobile-only {
  display: none !important;
}

/* En mobile (max 767px) : on inverse */
@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: inline-block !important;
    margin-top: 6px;
    font-weight: 500;
    color: #fff;
    text-decoration: underline;
  }
}

.featured-theme {
  display: block;
  width: 300px;
  padding: 16px;
  border-radius: var(--border-radius-md);
  background-color: var(--color-card-bg-alt);
  color: #000;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform var(--transition-fast);
}

.article-image {
  width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: var(--border-radius-sm);
}

.article-image img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  display: block;
  border-radius: var(--border-radius-sm);
}

.article-meta {
  font-size: 12px;
  font-weight: bold;
  color: #999;
  margin-top: 8px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}

.article-title {
  font-size: 1rem;
  font-weight: bold;
  margin: 8px 0;
  color: white;
}

.article-readtime {
  font-size: 12px;
  color: #777;
}

.articles-archive-grid {
  display: grid;
  gap: 1.5rem;
  padding: 1rem;
}



.article-cover {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius-md);
  display: block;
}

.article-date {
  font-size: 0.9rem;
  color: #777;
}

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--color-secondary);
  text-decoration: underline;
}

/* MOBILE — Scroll horizontal pour actualités */
.scroll-row-articles {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.scroll-row-articles > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
}


.articles-archive-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  padding: 20px;
}

.view-all-link {
  display: block;
  text-align: right;
  font-size: 14px;
  color: #e63946;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 12px;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* Section grosses sorties */
.monthly-releases {
  position: relative;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h1 {
  font-size: 3rem;
  margin: 0;
}

.section-header h2 {
  font-size: 1.8rem;
  margin: 12px 0 0 0;
}

.monthly-releases p {
  font-size: 14px;
    color: #f0f0f0;
    margin: 0 0 12px 0;
}

.arrow-controls {
  display: none; /* masqué sur mobile */
  gap: 10px;
}

.arrow {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-round);
  border: var(--color-border);
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.arrow:hover {
  transform: scale(1.08);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Icônes SVG (adaptables à ta charte) */
.arrow img {
  width: 16px;
  height: 16px;
}

/* Desktop uniquement */
@media (min-width: 768px) {
  .arrow-controls {
    display: flex;
    padding-right: 20px;
  }
}



.publisherMangaList {
  padding: 24px 16px;
}

.publisher-section {
  padding: 24px 16px;
}

.publisher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 16px;
    
}

.publisher-section .subtitle {
  font-size: 14px;
  color: #f0f0f0;
  margin: 0 0 8px 0;
}

.publisher-scroll {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  scroll-snap-type: x mandatory;
}

.publisher-card {
    display: block;
    width: 120px;
    text-decoration: none;
    color: inherit;
    background-color: var(--color-card-bg-alt);
    padding: 20px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
}

.creator-card img {
    border-radius: var(--border-radius-round);
    aspect-ratio: 1 / 1;
    object-fit: cover;
}


.publisher-card img {
    width: 120px;
    border-radius: var(--border-radius-sm);
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.volume-item {
  background: var(--color-card-bg-alt);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition: transform var(--transition-fast);
}

.volume-list-grid .manga-card {
  background: var(--color-card-bg-alt);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  text-align: center;
  transition: transform var(--transition-fast);
}

.volume-list-grid .manga-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.volume-list-grid .card-overlay {
  padding: 10px;
}

.volume-list-grid .card-overlay h3 {
  margin: 0;
  font-size: 15px;
  color: white;
}

.volume-list-grid .card-overlay .subtitle {
  font-size: 13px;
  color: #bbb;
}

.centered-message {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background-color: var(--color-card-bg-alt);
  margin: 20px;
  border-radius: var(--border-radius-sm);
}

.centered-message p {
  font-size: 1.4rem;
  color: white;
  max-width: 500px;
}

/* Conteneur principal pour espacer la vidéo du reste */
.section-video {
  max-width: 971px; /* La largeur maximale souhaitée sur grand écran */
  margin: 20px auto; /* Centrer la section */
  padding: 0 15px; /* Marge de sécurité sur mobile */
}

/* Le conteneur magique qui gère le ratio */
.video-responsive {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* L'iframe s'adapte au conteneur */
.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.youtube-coverdetails {
  display: block;     /* Supprime l'espace fantôme sous l'image */
  width: 100%;
  height: auto;       /* Garde le ratio de l'image */
  max-height: 400px;  /* Limite la hauteur sur desktop pour ne pas prendre tout l'écran */
  object-fit: cover;  /* Recadre l'image intelligemment pour remplir l'espace sans déformation */
  object-position: center;
}

.youtube-header {
  position: relative; /* Indispensable pour positionner le bouton à l'intérieur */
  width: 100%;
  max-width: 1000px;  /* S'aligne avec la largeur standard de votre contenu (comme .slider-container) */
  margin: 0 auto;     /* Centre le bloc sur les grands écrans */
  overflow: hidden;   /* Coupe proprement les bords si nécessaire */
  background-color: #000; /* Fond de sécurité pendant le chargement de l'image */
}

@media (max-width: 768px) {
  .youtube-header {
    max-width: 100%;  /* Pleine largeur sur mobile */
    border-radius: 0;
  }

  .youtube-coverdetails {
    height: auto;
    aspect-ratio: 16/9; /* Force un ratio agréable sur mobile si l'image charge mal */
    max-height: unset;  /* Laisse l'image prendre sa place naturelle */
  }

  .youtube-header .close-btn {
    top: 12px;
    right: 12px;
    width: 32px; /* Un peu plus petit sur mobile mais toujours tactile */
    height: 32px;
  }
}



.boutique-coverdetails {
    width: 100%;
    max-width: 100%;
}

.boutique-card {
 background-color: var(--color-card-bg-alt);
 color: var(--color-text);
 padding: 16px;
 border-radius: var(--border-radius-sm);
 box-sizing: border-box;
 border: 1px solid var(--color-border);
 display: block;
 text-decoration: none;
 transition: transform 0.1s, box-shadow var(--transition-fast);
 position: relative;
 gap: 4;
}

.boutique-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px;
}

.boutique-card-content {
  display: flex;
  align-items: center;
  gap: 24px;
}


.boutique-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 8px
}

.boutique-card strong {
  font-size: 1em;
  font-weight: 700;
  color: #fff;
}

.boutique-card p {
  font-size: 0.8em;
  color: #fff;
}

.boutique-info {
  flex: 1; /* prend toute la place restante */
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 16px;
}

.boutique-header {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 768px) {
  .boutique-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 16px;
  }

  .boutique-card {
    background-color: #1c1c1c;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #575757;
    display: block;
    text-decoration: none;
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .boutique-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.3);
  }

  /* En desktop : image en haut et infos dessous */
  .boutique-card-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .boutique-img {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    margin-bottom: 10px;
    object-fit: cover;
  }

  .boutique-info {
    padding: 0 5px;
  }

  .boutique-info strong {
    font-size: 1rem;
    display: block;
    margin-bottom: 4px;
  }
}

.button-secondary {
    display: inline-block;
    padding: 12px 20px;
    background-color: #382B2B;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast);
    cursor: pointer;
    justify-content: center;
    align-items: center;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.itineraire-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.itineraire-modal[style*="display: flex"] {
  pointer-events: auto;
}
.itineraire-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 20, 0.65);
  backdrop-filter: blur(2px);
  z-index: 1;
}
.itineraire-modal-content {
  position: relative;
  z-index: 10;
  background: black;
  color: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 8px 40px rgba(0,0,0,0.17);
  padding: 28px 18px 16px 18px;
  max-width: 480px;
  min-width: 220px;
  width: 100%;
  margin-bottom: calc(env(safe-area-inset-bottom,0px) + 2px);
  text-align: center;
}
@keyframes modalSlideUp {
  from {transform: translateY(80px); opacity: 0;}
  to {transform: translateY(0); opacity: 1;}
}
@media (min-width: 601px) {
  .itineraire-modal { align-items: center; }
  .itineraire-modal-content {
    border-radius: 22px;
    margin-bottom: 0;
    animation: modalZoomIn 0.2s;
  }
  @keyframes modalZoomIn {
    from {transform: scale(0.96); opacity:0;}
    to {transform: scale(1); opacity:1;}
  }
}
.itineraire-link {
  display: block;
  margin: 12px 0 0 0;
  color: white;
  background: #222;
  font-size: 1em;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  text-align: left;
  align-items: center;
  gap: 0.75rem;
}
.itineraire-link:hover {
  background: #272323;
}
.close-modal {
  display: inline-block;
  color: #aaa;
  font-size: 1em;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-top: 10px;
}
body.modal-open {
  overflow: hidden;
}

.section-horaires {
  background: #1b1b1b;
  border-radius: var(--border-radius-sm);
  padding: 16px 16px;
  margin: 20px 20px;
  border: 1px solid var(--color-border);
}

.section-horaires h2 {
  margin-bottom: 14px;
  color: white;
  font-size: 1.18em;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.horaire-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.horaire-list li {
  font-size: 1.05em;
  color: #eee;
  padding: 7px 0 7px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.horaire-list li:last-child {
  border-bottom: none;
}
.horaire-list span {
  color: white;
  font-weight: bold;
}

.section-coordonnees {
  background: #1b1b1b;
  border-radius: var(--border-radius-sm);
  padding: 16px 16px;
  margin: 20px 20px;
  border: 1px solid var(--color-border);
}

.coordonnees-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.coordonnees-list li {
  font-size: 1.06em;
  color: #ededed;
  padding: 8px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.coordonnees-list li:last-child {
  border-bottom: none;
}

.coordonnees-list span {
  min-width: 14px;
  color: #ff977b;
  font-weight: 500;
  padding-right: 10px;
  font-size: 0.99em;
}

.coordonnees-list a {
  color: white;
  text-decoration: none;
  font-size: 1em;
  word-break: break-all;
}

.section-reseaux {
  background: #1b1b1b;
  border-radius: var(--border-radius-sm);
  padding: 16px 16px;
  margin: 20px 20px;
  border: 1px solid var(--color-border);
}

.reseaux-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.reseaux-list li {
  margin: 0;
}

.reseau-nom {
  /* Possibilité d'ajouter une icône SVG ici */
  margin-left: 0;
}

.section-mangas {
  margin-top: 28px;
}

.section-mangas h2 {
  margin-bottom: 14px;
  color: #ff977b;
  font-size: 1.18em;
  font-weight: 700;
}

.mangas-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;  
  scrollbar-width: none;        
  -ms-overflow-style: none;      
}

.mangas-scroll::-webkit-scrollbar {
  display: none;                   /* Chrome, Safari, Opera */
}

.bmanga-card {
  min-width: 250px;
  max-width: 360px;
  flex: 0 0 auto;
  background: #1b1b1b;
  border-radius: var(--border-radius-sm);
  text-align: center;
  padding: 16px;
  scroll-snap-align: start;
  transition: transform 0.12s;
}

.bmanga-card img {
  width: 250px;
  height: 360px;
  object-fit: cover;
  border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
  margin-bottom: 8px;
}

.manga-titre {
  color: #fff;
  font-size: 1.2em;
  font-weight: bold;
  text-align: left;
}

@media (max-width: 600px) {
  .bmanga-card {
    min-width: 110px;
    max-width: 250px;
  }
  .bmanga-card img {
    width: 250px;
    height: 360px;
  }
}

.section-faq {
  margin-top: 28px;
}
.section-faq h2 {
  color: white;
  font-size: 1.16em;
  margin-bottom: 16px;
}

.instagram-wrapper {
  display: flex;
  justify-content: center;
}

.instagram-wrapper iframe {
  max-width: 100%;
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  background: white;
}

.instagram-wrapper iframe {
  max-width: 100%;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: white;
}

.instagram-row {
  display: flex;            
  justify-content: center;   
  gap: 40px;                
  flex-wrap: wrap;           
  margin: 30px auto;       
  max-width: 1200px;        
}

.accordion {
  width: 100%;
  margin: 0 auto;
}

.accordion-item {
  background: #181b1f;
  border-radius: var(--border-radius-md);
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  margin-bottom: 12px;
  overflow: hidden;
}

.accordion-header {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  outline: none;
  padding: 18px 16px;
  color: var(--color-text);
  font-size: 0.875em;
  cursor: pointer;
  font-family: var(--font-family);
  transition: background 0.13s;
  text-align: left;
  position: relative;
  padding-right: 38px;
}

.accordion-icon {
  display: inline-block;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 22px;
  height: 22px;
  pointer-events: none;
  transition: transform 0.22s;
  /* Ajoute ici le SVG comme background */
  background: url('data:image/svg+xml;utf8,<svg fill="gray" height="22" viewBox="0 0 20 20" width="22" xmlns="http://www.w3.org/2000/svg"><path d="M7.293 14.707a1 1 0 0 1 0-1.414l4.293-4.293-4.293-4.293a1 1 0 0 1 1.414-1.414l5 5a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0z"/></svg>') no-repeat center/80%;
}
.accordion-header.active .accordion-icon {
  transform: translateY(-50%) rotate(90deg); /* ou 180deg selon le style ! */
}

.accordion-content {
  max-height: 0;
  opacity: 0;
  padding: 0 16px;
  color: #eee;
  font-size: 0.98em;
  transition: all 0.26s;
  background: #202124;
}

.accordion-header.active + .accordion-content {
  max-height: 220px;
  opacity: 1;
  padding: 13px 16px 18px 16px;
}

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

@media (min-width: 768px) {
  .calendar-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    padding: 24px;
  }
}

@media (max-width: 767px) {
  #calendar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
  }

  .event {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    background-color: var(--color-card-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 12px;
    gap: 16px;
    cursor: pointer;
  }

  .event-cover {
    width: 75px;
    height: auto;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
  }

  .event-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .event-info h3 {
    margin: 0 0 4px;
    font-size: 1.2rem;
    color: white;
  }

  .event-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
  }

.month-separator {
  top: 0; /* mobile: colle tout en haut */
  padding: 8px 12px;
  z-index: 99; /* au-dessus des cartes */
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
}
}

@media (min-width: 768px) {
  .event {
    background-color: var(--color-card-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 16px;
    text-align: left;
    cursor: pointer;
  }

  .event-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    margin-bottom: 8px;
  }

  .event-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 8px 0 4px;
    color: #fff;
    text-align: left;
  }

  .event-info p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 2px 0;
    text-align: left;
  }

  .month-separator {
    grid-column: 1 / -1;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--color-secondary);
  }
}


@media (max-width: 600px) {
  .collection-header .button-secondary {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }

    .itineraire-modal-content {
    border-radius: 16px 16px 0 0;
    min-width: 0;
    width: 100vw;
    max-width: 100vw;
  }

}


/* Responsive */

@media (min-width: 768px) {
  .slider-container, section {
    padding: 10px 20px;
  }

  .styled-card {
    width: 300px;
  }

  #page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
  }

   .manga-summary {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

   .manga-details {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

 .manga-series {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  .scroll-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    scroll-snap-type: x mandatory;
  }

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000;
  border-top: 1px solid #333;
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(60px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

  .top-nav {
    display: none;
  }

    header,
  .slider-container {
    max-width: 1000px;
    margin: 0 auto;
  }

  .slider {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .collection-card img {
    height: 230px;
    aspect-ratio: auto;
  }

    .top-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    background: #000;
    padding: 16px 0;
  }

  .top-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.625rem;
    font-weight: 500;
  }

  .top-nav a.active {
    color: #f55;
  }
}

/* DESKTOP — Grille d’articles */
@media screen and (min-width: 768px) {
  .scroll-row-articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    overflow: visible;
  }

  .scroll-row-articles > * {
    flex: unset;
    scroll-snap-align: unset;
  }
}

@media (max-width: 480px) {
  h1#mangaTitle {
    font-size: 1.8rem;
    word-wrap: break-word;
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  h1#mangaTitle {
    font-size: 2.2rem;
  }
}

@media (min-width: 768px) {
  h1#mangaTitle {
    font-size: 2.8rem;
    text-align: left;
  }
}

@media screen and (min-width: 768px) {
  .filter-tabs {
    justify-content: center;
  }

}

/* =========================================================
   PLACEHOLDER COVER – Visuel généré quand il n'y a pas d'image
   ========================================================= */
.placeholder-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, #8F1B13 0%, #c0392b 50%, #8F1B13 100%);
  color: #fff;
  aspect-ratio: 5 / 7;
  border-radius: 4px;
  padding: 16px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.placeholder-cover::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  pointer-events: none;
}

.placeholder-cover .placeholder-title {
  font-size: clamp(11px, 3.5vw, 18px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  word-break: break-word;
}

.placeholder-cover .placeholder-volume {
  font-size: clamp(28px, 8vw, 48px);
  font-weight: 900;
  margin-top: 8px;
  line-height: 1;
  opacity: 0.9;
}

.placeholder-cover .placeholder-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.6;
  margin-top: 4px;
}

/* Ajustements pour les petites cartes (collection-card, search, etc.) */
.collection-card .placeholder-cover {
  width: 75px;
  aspect-ratio: 5 / 7;
}

.collection-card .placeholder-cover .placeholder-title {
  font-size: 8px;
}

.collection-card .placeholder-cover .placeholder-volume {
  font-size: 18px;
}

.collection-card .placeholder-cover .placeholder-label {
  font-size: 6px;
}

.search-result-item .placeholder-cover {
  width: 60px;
  min-width: 60px;
  aspect-ratio: 5 / 7;
}

.search-result-item .placeholder-cover .placeholder-title {
  font-size: 7px;
}

.search-result-item .placeholder-cover .placeholder-volume {
  font-size: 16px;
}

.search-result-item .placeholder-cover .placeholder-label {
  display: none;
}

/* Page manga.html : placeholder plein format */
.manga-page .placeholder-cover {
  max-width: 300px;
  margin: 0 auto;
}

/* Calendrier : placeholder dans les cartes événement */
.event .placeholder-cover {
  width: 75px;
  min-width: 75px;
  aspect-ratio: 5 / 7;
  flex-shrink: 0;
  border-radius: var(--border-radius-sm);
}

.event .placeholder-cover .placeholder-title {
  font-size: 8px;
}

.event .placeholder-cover .placeholder-volume {
  font-size: 18px;
}

.event .placeholder-cover .placeholder-label {
  font-size: 6px;
}

@media screen and (min-width: 768px) {
  .event .placeholder-cover {
    width: 100%;
    min-width: unset;
    margin-bottom: 8px;
  }

  .event .placeholder-cover .placeholder-title {
    font-size: clamp(11px, 3.5vw, 16px);
  }

  .event .placeholder-cover .placeholder-volume {
    font-size: clamp(24px, 6vw, 40px);
  }

  .event .placeholder-cover .placeholder-label {
    font-size: 8px;
  }
}
