* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

header {
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #ff8a00, #e52e71);
    color: #fff;
    padding: 1rem 0;
}
nav {
    display:flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

nav .logo img {
    width:100px
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 1rem;
    position: relative; /* Ajouté pour positionner la liste des catégories */
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

.search-section {
    position: fixed;
    z-index: 1;
    top: 70px;
    width: 100%;
    margin: 2rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 1rem;
    flex-direction: column;
}
.search-section input {
    width: 70%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    flex: 1;
    min-width: 200px;
}

.search-section button {
    padding: 0.5rem 1rem;
    border: none;
    background: linear-gradient(90deg, #ff8a00, #e52e71);
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    flex: 0 0 auto;
}

.search-section button:hover {
    background-color: #ff8a00;
}

.app-grid {
    position: relative;
    top: 150px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    padding: 0 1rem;
}

.app-card {
    background-color: rgb(0,0,0, 0.5);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: transform 0.3s;
}

.app-card:hover {
    transform: translateY(-10px);
}

.app-card img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.app-card h3 {
    margin: 1rem 0 0.5rem;
    color: #ff8a00;
}

.app-card p {
    color: #ccc;
}

.app-card button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    background-color:rgb(0,0,0, 0.5);
    color: #fff;
    cursor: pointer;
    border: 2px solid orange;
    border-radius: 5px;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

.app-card button i {
    margin-left: 0.5rem;
}

.app-card button:hover {
    background-color: #ff8a00;
}

footer{
    position: fixed;
    z-index: 1;
    bottom:0;
    width: 100%;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin: 0;
}
footer a{
    text-decoration: none;
    color: #fff;
}

/* Media Queries */
@media (max-width: 1200px) {
    nav .logo img {
    width:110px;
    }
    .app-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .search-section button {
        border-radius: 5px;
    }
}

@media (max-width: 992px) {
    .app-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .search-section {
        width: 100%;
        flex-direction: column;
    }
    .search-section button {
        border-radius: 5px;
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: row;
        align-items: center;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .search-section {
        width: 100%;
        flex-direction: column;
    }

    .search-section input {
        border-radius: 5px;
        margin-bottom: 1rem;
    }

    .search-section button {
        border-radius: 5px;
    }

    .app-grid {
        top: 200px;
        grid-template-columns: repeat(1, 1fr);
    }
}
@media (max-width: 600px) {
    .search-section{
        top: 200px;
    }
    .app-grid{
        top: 300px;
    }
    .ads_promo{
        position: fixed;
        z-index: 1;
        top: 77px;
        width: 100%;
    }
    nav .logo img {
    	width:50px
    }


}
@media (max-width: 480px) {

    .app-card{
        width: 100%;
    }
    .app-card h3 {
        font-size: 1rem;
    }

    .app-card p {
        font-size: 0.875rem;
    }

    .app-card button {
        font-size: 0.875rem;
    }

    .app-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}
@media (min-width: 600px){
    .ads_promo{
        display: none;
    }
}

#categoriesList {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    padding: 10px;
    list-style: none;
    margin-top: 10px;
    top: 85px;
}
#categoriesList li {
    margin: 5px 0;
}

#categoriesList li a {
    color: #333;
    text-decoration: none;
}

#categoriesList li a:hover {
    text-decoration: underline;
}

/* Adaptation pour les petits écrans */
@media (max-width: 769px) {
    #categoriesList {
        top: 285px;
    }
}
@media (max-width: 600px) {
    #categoriesList {
        position: static; /* Position statique pour les petits écrans */
        right: 30px;
        width: 150%; /* Prendre toute la largeur de l'écran */
        margin-top: 0; /* Pas de marge supérieure */
        border: none; /* Pas de bordure */
        padding: 0; /* Pas de padding */
        overflow-y: auto;
        height: 220px;
    }

    #categoriesList li {
        margin: 10px 0; /* Augmenter la marge entre les éléments */
    }

    #categoriesList li a {
        display: block; /* Afficher les liens en bloc */
        padding: 10px; /* Ajouter du padding pour les liens */
        background-color: #f9f9f9; /* Couleur de fond pour les liens */
        border-bottom: 1px solid #ccc; /* Bordure inférieure pour les liens */
        white-space: nowrap; /* Empêcher les retours à la ligne */
        overflow: hidden; /* Masquer le texte qui dépasse */
        text-overflow: ellipsis; /* Ajouter des points de suspension pour le texte qui dépasse */
    }

    #categoriesList li a:hover {
        background-color: #e9e9e9; /* Changer la couleur de fond au survol */
    }
}

.about-section {
    position: relative;
    top: 100px;
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-section h1, .about-section h2 {
    color: #333;
    margin-bottom: 1rem;
}

.about-section p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.about-section a {
    color: #ff8a00;
    text-decoration: none;
}

.about-section a:hover {
    text-decoration: underline;
}

/* détails de l'application  */
.app-details {
    width: 80%;
    margin: 50px auto;
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #e0e0e0;
}

.app-details h1 {
    font-size: 2em;
    text-align: center;
    margin-bottom: 20px;
    color: #ff8a00;
}

.app-details img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100px;
    height:100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.app-details p {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 10px;
}

.app-details p strong {
    color: #555;
}

.app-details button {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 10px 20px;
    border: none;
    background-color: #ff8a00;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.app-details button:hover {
    background-color: #e52e71;
}

.image_app {
    background-color: #1a1a1a;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}
.image_app img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Media Queries */
@media (max-width: 768px) {
    .app-details {
        width: 100%;
        padding: 15px;
    }

    .app-details h1 {
        font-size: 1.5em;
    }

    .app-details img {
        width: 80px;
    }

    .app-details p {
        font-size: 0.9em;
    }

    .app-details button {
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    .app-details {
        width: 100%;
        padding: 10px;
    }

    .app-details h1 {
        font-size: 1.2em;
    }

    .app-details img {
        width: 60px;
    }

    .app-details p {
        font-size: 0.8em;
    }

    .app-details button {
        padding: 6px 12px;
    }
}