* {
    list-style: none;
    text-decoration: none;
}

body{

    background-image: url("../Images/Image_Home.jpg");
    background-position: center;
    background-attachment: fixed; 
    background-repeat: no-repeat;
    background-size: cover;
    font-family: 'Poppins';
}

#logo{
    display: block;
    width: 20%;
    height: auto;
}

#logo2{
    display: block;
    width: 100%;
    height: auto;
}

#logo_compte {
  width: 1.5em !important; /* Ajoute !important si nécessaire */
  height: auto !important;
  align-items: center;
}

.menu{

    position: relative;
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.menu .a {

    width: 20px;
}

.menu .nav_links ul{

    display: flex;
    font-size: 2em;

}

.menu .nav_links ul li{

    margin: 0 20px;

}

.menu .troisb{
    display: none;
    align-items: center;
    width: 35px;
    position: absolute;
    right: 50px;

}

a{
    color: white;
    
}

.nav_links.mobile-menu{

    margin-left: 0
}

@media screen and (max-width: 500px) {
  
  .menu #logo2 {
        margin: 25px;
    	width: 10vh
    }
}


@media screen and (max-width: 900px) {
  
  	 body {
        background-image: url("../Images/Image_Home_mobile.png");
        background-attachment: fixed;
    }

    .menu {
        padding: 0;
        margin: 0;
    }
  	.menu #logo2 {
        margin: 12px;
      	width: 10vh
    }

    .nav_links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(73, 73, 73, 0.9);
        backdrop-filter: blur(7px);
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        z-index: 9999;
        margin-left: -110%;
        transition: all 0.5s ease;
    }


    .nav_links ul {
        display: flex;
        flex-direction: column;
      	align-items: center
    }

    .menu .troisb {
        display: block;
        width: 35px;
        position: absolute;
        top: 15px;
        right: 15px;
        z-index: 10000;
        cursor: pointer;
    }

    .nav_links.mobile-menu {
        margin-left: 0;
    }

    .menu .nav_links ul li {
        margin: 20px 0;
    }
    
}

/* Header styles */
h1 {
    color: rgb(255, 255, 255);
    font-size: 200%;
    font-weight: bold;
    text-align: center;
}

/* Box styling */
#box {
    width: 75%;
    margin: 0 auto;
    background-color: rgb(83, 83, 83);
    border-radius: 10px;
    padding: 20px;
 	order:2;
}

/* Box header */
.tete_box {
    width: 100%;
    background-color: #8c52ff;
    border-radius: 10px;
    text-align: center;
    font-size: 1.5em;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;

    margin: 0 auto;
  	height: 10vh
}

/* Anime container grid */
#anime-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 éléments par ligne */
    gap: 10px;
    justify-items: center;
    margin-top: 20px;
}

/* Anime card styling */
/* Anime card styling */
.anime-card {
    background-color: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 15em;
    min-height: 400px; /* Hauteur minimale de la carte */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.anime-card a {
    color: inherit; /* Lien qui n'altère pas le style de la carte */
    text-decoration: none; /* Supprime le soulignement */
}

/* Gestion des images manquantes */
.anime-card img {
    width: 100%;
    height: 300px; /* Fixe la hauteur de l'image */
    object-fit: cover; /* Remplir sans déformer */
    border-radius: 10px;
}

/* Si l'image est absente, on ajoute une couleur de fond par défaut */
.anime-card img[src=""] {
    background-color: #ddd; /* Une couleur de fond pour les cartes sans image */
    display: block;
    height: 100%;
}

/* Description Voir plus style */
.anime-card .description {
    font-size: 14px;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    color: #555;
    height: 60px; /* Limite la hauteur de la description */
    overflow: hidden; /* Cache le texte au-delà de la limite de hauteur */
    position: relative;
    transition: height 0.3s ease; /* Ajout d'une transition fluide */
}

.anime-card .voir-plus {
    font-weight: bold;
    color: black;
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: white;
    padding-left: 5px;
    padding-right: 5px;
    cursor: pointer;
}

/* Genres style */
.anime-card .genres {
    font-size: 12px;
    color: black;
    font-style: italic;
}

/* Rating */
.anime-card .rating {
    margin-top: 10px;
    font-weight: bold;
    color: #8c52ff;
}




/* Pagination style */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination button {
    padding: 10px;
    margin: 0 20px;
    cursor: pointer;
    background-color: #8c52ff;
    border-radius: 10%;
    color: white;
}

.pagination button:hover {
    background-color: #6a2e99;
}

/* Conteneur pour les filtres de genre et de tri */
#filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-direction: column;
  	gap: 15px;
  	display: none;
}

/* Conteneur de recherche */
#search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

/* Champ de recherche */
#search-input {
    width: 50%;
    max-width: 600px;
    padding: 10px 20px;
    font-size: 16px;
    border: 2px solid #8c52ff;
    border-radius: 30px;
    outline: none;
    background-color: #f9f9f9;
    transition: all 0.3s ease-in-out;
}

/* Placeholder de la barre de recherche */
#search-input::placeholder {
    color: #888;
}

/* Effet au focus */
#search-input:focus {
    border-color: #6a32c6;
    background-color: #fff;
}

/* Bouton "Tri et Genre" */
#filter-btn {
    margin-left: 20px;
    padding: 10px 20px;
    background-color: #8c52ff;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Effet sur le bouton lorsqu'il est cliqué ou au survol */
#filter-btn:hover {
    background-color: #6a32c6;
}



/* Conteneur des genres */
#genre-container {
    display: grid;
    grid-template-columns: 1fr; /* Une seule colonne pour le bouton */
    gap: 10px;
    background-color: #8c52ff;
    color: black;
    padding: 16px;
    border-radius: 10px;
    width: 100%; /* S'adapte à la largeur du parent */
    max-width: 1500px; /* Limite la largeur maximale si besoin */
    align-items: center;
    justify-items: center; /* Centre les éléments à l'intérieur */
    box-sizing: border-box;
  	max-height: 300px; /* limite la hauteur */
    overflow-y: auto;  /* scroll si trop de genres */
  	border: 1px solid #ccc;
  	margin-top: 15px;
    margin-bottom:10px
}

#genre-container label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 8px;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #ccc;
}

/* Style du bouton */
#genre-container button {
    width: 100%; /* Le bouton prend toute la largeur du conteneur */
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    background-color: #fff;
    border: none;
    border-radius: 8px;
    color: #8c52ff;
    transition: background-color 0.3s ease;
}


/* Conteneur du tri */
#sort-container {
    background-color: #8c52ff;
    color: white;
    padding: 16px;
    border-radius: 10px;
    display: grid;
    gap: 10px;
    max-width: 300px;
    margin-bottom: 20px;
    width: 100%; /* S'adapte à la largeur du parent */
  	max-width: 1500px; /* Limite la largeur maximale si besoin */
    align-items: center;
    justify-items: center; /* Centre les éléments à l'intérieur */
    box-sizing: border-box;
  	flex-wrap: wrap;
}

/* Texte "Trier par :" */
#sort-container label {
    font-weight: bold;
    font-size: 14px;
    color: white;
}

/* Select visuellement intégré au style violet */
#sortSelect {
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    background-color: white;
    color: #333;
    cursor: pointer;
}


#genre-toggle{
 	align-items:center; 
}

/* Liste genre */

#genre-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 genres par ligne */
    gap: 10px;
    width: 100%; /* S'adapte à la largeur du parent */
    margin-top: 10px;
}

/* Style de chaque genre */
#genre-list label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    background-color: white;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s ease;
}


/* Cache la case à cocher, mais elle reste active */
#genre-list input[type="checkbox"] {
    display: none;
}

/* Quand le genre est coché, changement de fond */
#genre-list input[type="checkbox"]:checked + .genre-text {
    background-color: #d1a7ff; /* Fond violet */
    color: white; /* Texte en blanc pour contraster avec le violet */
}

/* Texte du genre prend toute la largeur */
.genre-text {
    width: 100%;
    display: block;
    padding: 8px 0;
    text-align: center;
}



@media screen and (max-width: 900px) {
    /* ===== NAVBAR ===== */
    nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
    }

    .logo {
        height: 35px;
    }

    .menu-toggle {
        font-size: 24px;
        background: none;
        border: none;
        color: white;
    }

    /* ===== EN-TÊTE ===== */
    .tete_box {
        font-size: 1.2em;
        padding: 10px 0;
        margin: 10px auto;
        width: 100%;
        text-align: center;
        word-wrap: break-word;
    }

    /* ===== CONTAINER GLOBAL ===== */
    #box {
        width: 90%;
        padding: 15px;
    }

    /* ===== CONTAINER DES FILTRES ===== */
    #filters-container {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        width: 100%;
    }

    /* ===== GENRE CONTAINER ===== */
    #genre-container {
        display: grid;
        grid-template-columns: repeat(1);
        gap: 10px;
        padding: 10px;
        width: 100%;
        max-height: 300px; /* limite la hauteur */
        overflow-y: auto;  /* scroll si trop de genres */
        background-color: #8c52ff;
        border-radius: 8px;
        box-sizing: border-box;
    }

    #genre-container label {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        padding: 8px;
        background: #fff;
        border-radius: 5px;
        cursor: pointer;
        border: 1px solid #ccc;
    }

    /* ===== SORT CONTAINER ===== */
    #sort-container {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
        flex-wrap: wrap;
        gap: 10px;
    }

    #sortSelect {
        width: 100%;
        max-width: 200px;
        font-size: 14px;
        padding: 6px 10px;
    }

    /* ===== ANIME CARDS ===== */
    #anime-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .anime-card {
        width: 90%;
        padding: 8px;
        min-height: 280px;
    }

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

    .anime-card h3 {
        font-size: 14px;
        margin: 8px 0 4px;
    }

    .anime-card .genres {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .anime-card .rating {
        font-size: 13px;
        margin-top: 5px;
    }
}

@media screen and (max-width: 1800px) and (min-width: 900px)  {
    /* ===== NAVBAR ===== */
    nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
    }

    .logo {
        height: 35px;
    }

    .menu-toggle {
        font-size: 24px;
        background: none;
        border: none;
        color: white;
    }

    /* ===== EN-TÊTE ===== */
    .tete_box {
        font-size: 1.2em;
        padding: 10px 0;
        margin: 10px auto;
        width: 100%;
        text-align: center;
        word-wrap: break-word;
    }

    /* ===== CONTAINER GLOBAL ===== */
    #box {
        width: 90%;
        padding: 15px;
    }

    /* ===== CONTAINER DES FILTRES ===== */
    #filters-container {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        width: 100%;
    }

    /* ===== GENRE CONTAINER ===== */
  
    #genre-container {
        max-height: 300px; /* limite la hauteur */
        overflow-y: auto;  /* scroll si trop de genres */
    }

    #genre-container label {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        padding: 8px;
        background: #fff;
        border-radius: 5px;
        cursor: pointer;
        border: 1px solid #ccc;
    }

    /* ===== SORT CONTAINER ===== */
    #sort-container {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
        flex-wrap: wrap;
        gap: 10px;
    }

    #sortSelect {
        width: 100%;
        max-width: 200px;
        font-size: 14px;
        padding: 6px 10px;
    }

    /* ===== ANIME CARDS ===== */
    #anime-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .anime-card {
        width: 90%;
        padding: 8px;
        min-height: 280px;
    }

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

    .anime-card h3 {
        font-size: 14px;
        margin: 8px 0 4px;
    }

    .anime-card .genres {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .anime-card .rating {
        font-size: 13px;
        margin-top: 5px;
    }
}

.watchlist-btn {
    background-color: #ff4f4f;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.2s;
}

.watchlist-btn:hover {
    background-color: #e63939;
}

.watchlist-btn.added {
    background-color: #2ecc71;
    cursor: default;
}
footer {
    text-align: center;
    padding: 3px;
    background-color: #8c52ff;
    color: white;
    margin-top: 10px;
    height:max-content
  }
#pageInfo {
    color: white;               /* Texte en blanc */
    text-align: right;          /* Aligne à droite */
    font-size: 1.2rem;          /* Ajuste la taille du texte */
    margin: 10px 20px;          /* Ajoute un peu d'espace autour du texte */
    padding: 5px;               /* Optionnel : un peu de padding pour mieux espacer */
    background-color: rgba(0, 0, 0, 0.5); /* Fond légèrement sombre pour que le texte soit bien visible */
    border-radius: 5px;         /* Coins arrondis */
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.6); /* Légère ombre pour un effet plus propre */
}

#page {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 1200px) {
	#page {
        flex-direction: column; /* Empile les éléments en colonne sur petits écrans */
        align-items: center;
		}
  
  	#left-ad-container,
    #right-ad-container {
      	display: none;
  		}
    .ad-container {
  	 	width: 75%;  /* Les publicités occupent plus d'espace sur mobile */
        margin-bottom: 15px;
      	height: 7vh   
  		}
}
  
@media (min-width: 1200px) {

  #top-ad-container,
  #bottom-ad-container {
    display: none;
  }
}

.ad-container {
    width: 10%;  /* Taille des blocs publicitaires */
    background-color: #f0f0f0;
    padding: 10px;
    text-align: center;
    margin: 10px;
  	height: 100%;
}

.ad-container2 {
    width: 100%;  
    background-color: #f0f0f0;
    padding: 10px;
    text-align: center;
    margin: 10px;
  	height: 7vh;
}

#left-ad-container {
    order: 1;  /* Publicité à gauche */
	position: sticky; 
    top: 0; 
}

#right-ad-container {
    order: 3;  /* Publicité à droite */
  	height: 100%;
	position: sticky;
    top: 0; 
}

#top-ad-container {
    order: 1;  /* Publicité à gauche */
}

#bottom-ad-container {
    order: 3;  /* Publicité à droite */
}