/* Categories CSS - Version desktop réorganisée */

/* ===============================
   1. STRUCTURE GÉNÉRALE
   =============================== */
   body.category #main,
   body.categories #main {
    margin-top: 0px;
    padding: 10px 0;
  }
  
  body.category .full-width {
    width: 100%;
  }
  
  body.category #catRight {
    width: 100%;
  }
  
  .nocontent.full-width #catRight {
    width: 100%;
  }
  
  /* ===============================
     2. TITRES ET ENTÊTES
     =============================== */
  body.category h1 {
    font-family: 'Amaranth', sans-serif;
    color: #000;
    margin: 0 0 20px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    padding: 10px 8px;
    text-align: center;
    font-weight: 400;
    font-size: 22px;
  }
  
  body.category h1 a {
    color: #000;
    text-decoration: underline;
  }
  
  body.category #master h1 {
    color: #000;
    padding: 8px;
    margin: 0 0 15px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    background-color: #ffda00;
  }
  
  body.category h2.catMenu {
    background-color: #fff;
    padding: 10px;
    border: 1px solid #f0f0f0;
    margin-bottom: 10px;
    color: #000;
    font-size: 13px;
    line-height: 1.4em;
  }
  
  body.category .catmenu a {
    text-decoration: underline;
  }
  
  body.category h3 {
    font-family: 'Amaranth', sans-serif;
    color: #000;
    margin: 0 0 8px 0;
    padding: 3px 8px;
    text-align: left;
    font-weight: 400;
    font-size: 180%;
    line-height: 1.3em;
  }
  
  body.front.category.index #main #description {
    display: inline-block;
    width: auto;
    font-size: 13px;
    line-height: 1.2em;
    padding: 10px;
    margin: 10px 0 0;
    background: #c1efff;
    border: 1px solid #b0deec;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
  }
  
  /* ===============================
     3. TOUTES LES CATÉGORIES
     =============================== */
  body.categories h1 {
      color: #000;
      margin: 0 0 15px;
      padding:8px;
      -moz-border-radius: 5px;
      -webkit-border-radius: 5px;
      border-radius: 5px;
      background-color: #ffda00;
      text-align: center;
      font-weight: 400;
      font-size: 22px;
      font-family: 'Amaranth', sans-serif;
  }
  body.categories h2 {
    background-color: #fff;
    padding: 10px;
    border: 1px solid #f0f0f0;
    margin-bottom: 10px;
    color: #000;
    font-size: 13px;
    line-height: 1.4em;
}

  body.categories p {
    background-color: #fff;
    padding: 10px;
    border: 1px solid #f0f0f0;
    margin-bottom: 10px;
    color: #000;
    font-size: 1em
    line-height: 1.4em;
  }
  
  body.categories .categories-list {
    margin: 20px 0;
  }
  
  body.categories .category-card {
    display: flex;
    background: white;
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    align-items: center;
  }
  
  body.categories .category-image {
    flex: 0 0 auto;
    margin-right: 20px;
  }
  
  body.categories .category-image img {
    width: auto;
    height: auto;
    max-width: 150px;
    border-radius: 5px;
  }
  
  body.categories .category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  body.categories .category-info h2 {
    margin: 0 0 15px 0;
    font-size: 22px;
    color: #000;
  }
  
  body.categories .category-button {
    display: inline-block;
    background: #ffc000;
    color: #000;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
    width: fit-content;
    font-size:16px;
  }
  
  body.categories .category-button:hover {
    background:rgb(255, 191, 0);
    text-decoration: none;
    color: #000;
  }
  
  
  /* ===============================
   3B. PERSONNAGE DEMO 
=============================== */

/* Layout en 2 colonnes pour la démo personnage */
.layout-with-demo {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.demo-column {
    flex: 0 0 340px;
    max-width: 340px;
}

.demo-column .demo-text {
    font-size: 16px;
    color: #C50A62;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 15px;
}

.demo-column img {
    width: 100%;
    height: auto;
    border-radius: 0;
    border: 3px solid #ffffff;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.cards-column {
    flex: 1;
    min-width: 0;
}

/* Forcer les cartes à s'afficher par 3 dans la colonne de droite */
.layout-with-demo .cards-column #cartes {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px; /* Réduire l'espace entre les cartes */
}

/* Réduire la taille des images dans ce mode */
.layout-with-demo .cards-column #cartes img {
    max-width: 90%;
    height: auto;
}

.personnage-demo-mobile {
    display: none;
}

  /* ===============================
     4. OPTIONS D'AFFICHAGE ET FILTRES
     =============================== */
  /* Options d'affichage */
  body.category .display-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
  }
  
  body.category .left-content {
    flex: 1;
  }
  
  body.category .left-content h3 {
    margin: 0;
  }
  
  /* body.category .right-content {
    display: none;
  } */
   body.category .right-content {
    display: flex;
    align-items: center;
}
  
  body.category .display-options h3 {
    margin: 0;
  }
  
  /* Sélecteur de tri */
  body.category .sort-options {
    display: flex;
    align-items: center;
    margin-right: 15px;
  }
  
  body.category .sort-options label {
    margin-right: 10px;
    font-size: 14px;
  }
  
  body.category .sort-select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    cursor: pointer;
  }
  
  /* Basculement vue grille/liste */
  /* body.category .view-toggle {
    display: none;
  } */
  body.category .view-toggle {
    display: flex;
    gap: 8px;
}
  
  body.category .view-mode {
    cursor: pointer;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
  }
  
  body.category .view-mode:hover {
    background-color: #f0f0f0;
  }

  body.category .view-mode.active {
      background-color: #FE57A1;
      color: white;
      border-color: #FE57A1;
  }

  /* Filtres */
  /* Styles pour le bouton et le panneau de filtres */


/* Empêche le scroll du body quand le panneau est ouvert */
body.filters-panel-open {
  overflow: hidden;
}


.filter-button-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-trigger {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #7ec6dc;
  border-radius: 4px;
  padding: 8px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2em;
}

.filter-trigger i {
  margin-right: 5px;
}

.selected-filters {
  margin-left: 10px;
  color: #FE57A1;
  font-size: 0.9em;
}

.filters-slide-panel {
  position: fixed;
  top: 0;
  left: -100%;
  width: 350px;
  height: 100vh; /* Utiliser 100vh au lieu de 100% */
  background-color: #b5e8f7;
  transition: left 0.3s ease;
  z-index: 1000;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Empêche le débordement du panneau lui-même */
}

.filters-slide-panel.open {
  left: 0;
}

.filters-slide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0; /* Changé de 20px à 0 */
  border-bottom: 1px solid #7ec6dc;
  padding: 20px 20px 10px 20px; /* Ajout du padding ici */
  flex-shrink: 0; /* Empêche la compression */
}

.filters-slide-header h3 {
  margin: 0;
  font-size: 1.2em;
}

.close-filters {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
}

.filters-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden; /* Empêche le scroll horizontal */
  padding: 0 20px 20px 20px;
  overscroll-behavior: contain; /* Empêche le scroll de se propager au body */
}

/* Style spécifique pour les éléments de filtre */
.filter-slide-item {
  padding: 10px;
  background-color: #ffffff;
  margin-bottom: 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  flex-shrink: 0; /* Empêche la compression des éléments */
}

.filter-slide-item:hover {
  background-color: #f0f8ff;
}

.filter-slide-item.filter-reset {
  background-color: #f8f8f8;
  color: #258ca9;
  font-weight: bold;
  text-align: center;
}

.selected-filter {
  background-color: #d4faff;
  color: black;
  border-radius: 4px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.selected-filter:hover {
  background-color: #e0e0e0;
}

.remove-filter {
  margin-left: 5px;
  cursor: pointer;
  color: #888;
  font-weight: bold;
  pointer-events: none; /* Empêche l'interception du clic sur la croix */
}

.remove-filter:hover {
  color: #FF0000;
}

.reset-filters-inline {
  background: none;
  border: none;
  color: #df2b7b;
  text-decoration: underline;
  cursor: pointer;
  margin-left: 10px;
}
  
  /* Messages */
  body.category .no-results-message {
    padding: 20px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    margin: 20px 0;
  }
  
  body.category .loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
    font-size: 1.3em;
  }
  
  /* ===============================
     5. AFFICHAGE DES CARTES - GRILLE
     =============================== */
  /* Conteneur des cartes */
  #cartes {
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  
  #cartes.loaded {
    opacity: 1;
  }
  
  body.category #cartes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0;
    list-style: none;
    margin: 0;
  }
  
  body.category ul#cartes {
    margin: 10px 0 20px 0;
  }
  
  body.category #cartes li.carte {
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
  }
  
  body.category #cartes li {
    position: relative;
    display: inline-block;
    width: 225px;
    margin: 0 0 10px 0;
    text-align: center;
    padding: 0 0 7px 0;
    vertical-align: top;
    background: #FFF;
  }
  
  /* Éléments communs de cartes */
  body.category #cartes img {
    height: 166px;
    width: 212px;
    border: 1px solid #fff;
    background: #fff;
    padding: 5px;
    margin-top: 5px;
    vertical-align: top;
  }
  
  body.category #cartes img:hover {
    background: #FFDA00;
    border: 1px solid #FFDA00;
    padding: 5px;
  }
  
  body.category #cartes .titre_carte {
    padding-top: 3px;
    color: #000;
    font-weight: 600;
    font-size: 15px;
  }
  
  body.category #cartes li .content {
    text-align: left;
    font-size: 13px;
    line-height: 1.2em;
    font-family: arial, sans-serif;
    padding: 0 5px 5px 20px;
  }
  
  body.category #cartes .carteAnimee {
    margin: 0 auto;
    color: #ff7e00;
    font-weight: 500;
    font-size: 12px;
  }
  
  body.category .card-badge {
    color: #00a3d4;
    font-size: 12px;
    display: block;
    margin-top: 5px;
    margin-bottom: 5px;
  }
  body.category .card-badge.gratuit {
    color: #8d21b5;
  }
  
  /* ===============================
     6. AFFICHAGE DES CARTES - LISTE
     =============================== */

  /* Mode liste */
body.category #cartes.list-view {
  display: block;
}

body.category #cartes.list-view li.carte {
  display: flex;
  background-color: #fff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  align-items: flex-start;
}

body.category #cartes.list-view li.carte .image {
  flex: 0 0 auto;
  margin-right: 20px;
  width: 150px;
}

body.category #cartes.list-view li.carte .image img {
  width: 100%;
  height: auto;
}

body.category #cartes.list-view li.carte .card-details {
  flex: 1;
  padding-left: 20px;
  text-align: left;
}

body.category #cartes.list-view li.carte .card-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

body.category #cartes.list-view li.carte .card-text {
  flex: 1;
}

body.category #cartes.list-view li.carte .view-button {
  margin-left: 15px;
  align-self: center;
}

body.category #cartes.list-view li.carte .view-button a {
  display: inline-block;
  padding: 8px 15px;
  background-color: #FE57A1;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

body.category #cartes.list-view li.carte .view-button a:hover {
  background-color: #e0497b;
}
  
  /* ===============================
     7. PAGINATION
     =============================== */
  body.category #nav_categorie {
    height: 34px;
    line-height: 34px;
    vertical-align: middle;
    margin: 0 0 12px;
    padding: 0;
  }
  
  div.pagination {
    display: inline-block;
    width: 270px;
    font-size: 26px;
    line-height: 13px;
    margin: 10px 0 15px;
  }
  
  div.pagination a.button {
    margin-right: 3px;
  }
  
  div.pagination a {
    text-decoration: none;
    color: #444;
  }
  
  div.pagination a.button {
    text-decoration: none;
    color: #000;
    padding: 3px 8px;
    height: auto;
    background: #A0DFF4;
    border: 1px solid #73C5E0;
  }
  
  div.pagination a.button.current {
    background: #2f95b7;
    margin-left: 5px;
    border: 1px solid #0d7699;
    color: #FFF;
  }
  
  div.pagination a:hover {
    text-decoration: none;
    background: #ccf2ff;
    border: 1px solid #0d7699;
  }
  
  /* ===============================
     8. TEXTE ACCUEIL CATÉGORIE
     =============================== */
  body.category .texte_accueil_categorie {
    clear: both;
    padding: 15px;
    background: #FFF;
    line-height: 1.6em;
    border: 1px solid #d5d5d5;
  }
  
  body.category .texte_accueil_categorie h3 {
    font-family: 'Amaranth', sans-serif;
    border-bottom: 1px solid #FE57A1;
    color: #000;
    margin: 0;
    padding: 10px 0 15px 0;
    text-align: left;
    font-weight: 400;
    font-size: 22px;
    line-height: 1.3em;
    background: #FFF;
  }
  
  body.category .texte_accueil_categorie h4 {
    text-align: left;
    line-height: 1.3em;
    font-family: 'Amaranth', arial, sans-serif;
    margin: 18px 0 8px 0;
    padding: 0 5px 3px 0;
    font-size: 18px;
    font-weight: 400;
  }
  
  body.category .texte_accueil_categorie h5 {
    text-align: left;
    line-height: .8em;
    margin: 18px 0 8px 0;
    padding: 0 5px 3px 0;
    font-size: 13px;
    font-weight: 600;
  }
  
  body.category .texte_accueil_categorie p {
    font-size: 12px;
    margin-bottom: 8px;
  }
  
  body.category .texte_accueil_categorie a:hover {
    color: #0091D8;
  }
  
  body.category .texte_accueil_categorie ul {
    padding-left: 15px;
  }
  
  /* ===============================
     9. LIENS THÉMATIQUES
     =============================== */
  .theme-links-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
  }
  
  body.category .theme-links-column {
    flex: 1;
  }
  
  /* ===============================
     10. AUTRES ÉLÉMENTS
     =============================== */
  body.category p {
    font-size: 14px;
  }
  
  body.category p a {
    text-decoration: underline;
    color: #FE57A1;
  }
  
  body.category .versMultiOccasions {
    padding: 8px;
    background: #FFF;
    border: 1px solid #C5C5C5;
    margin-top: 10px;
  }