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

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Styles du top-header */
.top-header {
	position: relative;
    background: linear-gradient(90deg, #2196f3, #e91e63); /* Dégradé de couleur */
    padding: 10px 0;
    color: white;
    font-family: Arial, sans-serif;
    width: 100%;
}

/* Conteneur principal pour le menu et le logo */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px; /* Assure une largeur maximale égale à celle du site */
    margin: 0 auto; /* Centre le contenu */
    padding: 0 20px; /* Padding pour espacer les éléments à l'intérieur */
}

/* Menu */
.menu {
    display: flex;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
}

.menu-icon {
    font-size: 32px;
    margin-right: 5px; /* Espacement entre l'icône et le texte */
    color: #fff; /* Couleur de l'icône */
}

.menu-text {
    font-size: 18px;
    color: #fff;  /* Couleur du texte */
    text-transform: uppercase;
    font-weight: bold;
}

/* Styles pour le menu alternatif */
.hidden {
    display: none !important;
}

.alternative-menu {
    display: block;
    position: absolute;
    top: 60px; /* Ajuste selon la hauteur de la barre de navigation */
    left: 10px;
    right: 10px;
    max-width: 300px;
    background: linear-gradient(135deg, #2196f3, #e91e63); /* Dégradé bleu-rose */
    border-radius: 12px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2); /* Ombre douce */
    z-index: 1000;
    padding: 10px 0;
    text-align: left;
}

/* Styles des liens */
.alternative-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alternative-menu li {
    margin: 5px 0;
}

.alternative-menu a {
    font-size: 16px;
    font-weight: 900;
    color: #ffffff; /* Texte blanc */
    text-decoration: none;
    padding: 12px 20px; /* Plus d’espace autour du texte */
    display: block;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s; /* Transition douce */
}

.alternative-menu a:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Fond semi-transparent au survol */
    color: #ffffff; /* Texte reste blanc */
    box-shadow: 0px 2px 8px rgba(255, 255, 255, 0.3); /* Légère ombre blanche au survol */
}







/* Empêche le défilement du corps lorsque le menu alternatif est ouvert */
.no-scroll {
    overflow: hidden;
}


/* Logo */
.logo-container .logo {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
}



.main-header {
    background-color: #ffffff;
    padding: 15px 20px;
}

.nav ul {
    display: flex;
    justify-content: space-around;
    list-style-type: none;
    padding: 0;
}

.nav li {
    margin: 0 10px;
}

.nav a {
    text-decoration: none;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.nav a:hover {
    color: #2196f3; /* Change the color on hover */
    border-bottom: 2px solid #2196f3;
}


/* Styles du main-header */
.main-header {
    background-color: #fff;
    padding: 10px 0;
    border-top: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.main-header .nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-header .nav ul li {
    margin: 0 15px;
}

.main-header .nav ul li a {
    text-decoration: none;
    color: #2196f3;
    font-weight: bold;
    font-size: 20px;
    position: relative;
    padding-bottom: 5px;
}

.main-header .nav ul li a::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background-color: #2196f3;
    position: absolute;
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.main-header .nav ul li a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Header */
header {
    background: linear-gradient(135deg, #2d51d6, #8f57d9); /* Gradient de fond */
    color: #fff;
    padding: 20px 30px; /* Ajustement du padding pour plus d'espace */
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Logo */
header .logo {
    font-size: 36px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

/* Titre */
header h1 {
    font-size: 34px; /* Taille du titre */
    font-weight: 700;
    margin-bottom: 10px;
}

/* Description */
header p {
    font-size: 18px;
    margin-bottom: 15px;
    max-width: 600px;
}

/* Champ de recherche */
/* Champ de recherche */
header input[type="text"] {
    padding: 12px 20px;
    width: 100%;
    max-width: 500px;
    border: 2px solid #fff;
    border-radius: 25px;
    font-size: 16px;
    color: #fff; /* Texte en blanc */
    background-color: transparent;
    margin-bottom: 20px;
    outline: none;
    transition: 0.3s;
}

header input[type="text"]::placeholder {
    color: #fff; /* Texte du placeholder en blanc */
}


header input[type="text"]:focus {
    border-color: #ff6f61; /* Bordure rose lors du focus */
}

/* Boutons des filtres */
header .tags button {
    background-color: #ff6f61;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    margin: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}

/* Effet de survol des boutons */
header .tags button:hover {
    background-color: #ff4d40;
}


/* Main Container */
main {
    display: flex;
    padding: 20px;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Conserver le style général du conteneur de filtres */
.filters {
    width: 25%; /* Ajustez la largeur si nécessaire */
    background-color: #fff;
    padding: 17px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 18px; /* Augmenté pour meilleure lisibilité */
}

/* Titre des filtres */
.filters h2 {
    font-size: 22px; /* Augmenté pour meilleure lisibilité */
    color: #2d51d6;
    margin-bottom: 15px;
}

/* Bouton de réinitialisation des filtres */
.filters button {
    display: block;
    background-color: #2d51d6;
    color: #fff;
    padding: 12px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 18px; /* Augmenté pour meilleure lisibilité */
}

/* Style pour chaque bloc "details" */
.filters details {
    margin: 10px 0;
}

/* Style pour le titre cliquable (summary) */
.filters summary {
    font-weight: bold;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    padding: 10px;
    background-color: #f4f4f9;
    border-radius: 5px;
    outline: none;
}

.filters summary:hover {
    color: #2d51d6;
}

/* Style des options à l'intérieur de chaque filtre (affichées lors du clic) */
.filters .filter-category {
    padding: 10px 0;
    margin-left: 15px;
}


/* Sort Section */
.sort {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.sort label {
    font-size: 18px; /* Augmenté pour meilleure lisibilité */
    margin-right: 10px;
}

.sort select {
    font-size: 16px; /* Augmenté pour meilleure lisibilité */
}

/* Content Area */
.content-area {
    width: 75%;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Limité à 3 produits par ligne */
    gap: 20px;
    width: 100%;
}

/* Product Card */
.product-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.product-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Style for Rating Badge */
.product-card .rating {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff4e5b, #ff7d5a); /* Dégradé de couleur */
    color: #fff;
    padding: 10px 12px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

/* Adjust font size and alignment */
.product-card .rating span {
    font-size: 14px;
    text-align: center;
    line-height: 1;
}


.product-card h3 {
    font-size: 18px; /* Augmenté pour meilleure lisibilité */
    margin: 15px 0 10px;
}

/* Style des boutons */
.btn-test {
    background-color: #4e7dff; /* Couleur de fond du bouton "voir le test" */
    color: white; /* Texte en blanc */
    padding: 10px 20px;
    border-radius: 20px;
    text-align: center;
    text-decoration: none; /* Enlève le soulignement du lien */
    font-size: 16px;
    margin-right: 10px; /* Espacement entre les boutons */
    display: inline-block;
    transition: background-color 0.3s ease;
}

.btn-test:hover {
    background-color: #3a68d0; /* Couleur au survol */
}

/* Style des boutons */
.btn-test {
    background-color: #4e7dff; /* Couleur de fond du bouton "voir le test" */
    color: white; /* Texte en blanc */
    padding: 10px 20px;
    border-radius: 20px;
    text-align: center;
    text-decoration: none; /* Enlève le soulignement du lien */
    font-size: 16px;
    margin-bottom: 10px; /* Espacement entre les boutons */
    display: inline-block;
    width: 100%; /* S'assure que les boutons sont de la même taille */
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

.btn-test:hover {
    background-color: #3a68d0; /* Couleur au survol */
}

/* Style des boutons */
.product-card .btn-test,
.product-card .btn-price {
    display: block; /* Assurer que les boutons sont affichés normalement */
    width: 100%; /* Les boutons prennent toute la largeur de la carte */
    text-align: center; /* Centre le texte à l'intérieur du bouton */
    padding: 12px 20px; /* Espacement interne des boutons */
    font-size: 16px; /* Taille de texte uniforme */
    border-radius: 20px; /* Coins arrondis */
    margin-bottom: 10px; /* Espacement entre les boutons */
    box-sizing: border-box; /* Inclure les marges dans le calcul de la largeur */
    transition: background-color 0.3s ease;
    text-decoration:none;
}

/* Style du bouton "Lire le test" */
.btn-test {
    background-color: #4e7dff; /* Bleu pour le bouton "Lire le test" */
    color: #fff; /* Texte en blanc */
}

.btn-test:hover {
    background-color: #3a68d0; /* Couleur au survol */
}

/* Style du bouton "Voir le prix" */
.btn-price {
    background-color: #fe6f61; /* Rouge pour le bouton "Voir le prix" */
    color: white; /* Texte en blanc */
}

.btn-price:hover {
    background-color: #e04347; /* Couleur au survol */
}

/* Pour l'icône panier */
.icon-cart {
    margin-right: 8px; /* Espace entre l'icône et le texte */
    font-size: 18px; /* Taille de l'icône */
}




/* Style for the Sort Container */
.sort {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 18px;
    color: #333;
}

/* Style for the Select Box */
.sort select {
    appearance: none;
    background-color: #fff;
    border: 2px solid #333; /* Applique la bordure uniquement sur le select */
    color: #333;
    font-size: 18px;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    text-align: center;
    padding-right: 30px; /* Espace pour la flèche */
}

/* Custom Arrow */
.sort select::after {
    content: "▼";
    position: absolute;
    right: 15px;
    font-size: 14px;
    color: #333;
}

/* Style for the label */
.sort label {
    margin-right: 10px;
    font-weight: bold;
    color: #333;
}


    .filter-toggle {
        display: none;

}

/* Footer Styling */
footer {
    background-color: #333; /* Couleur de fond sombre */
    color: #fff; /* Texte en blanc */
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    border-top: 3px solid #FF6347; /* Ligne en haut du footer */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

footer p {
    margin: 0;
    font-size: 14px;
    color: #ccc; /* Légèrement plus clair pour un contraste doux */
    margin-bottom: 15px;
}

/* Links in Footer */
footer a {
    text-decoration: none;
    color: inherit;
}

footer a:hover {
    color: #FF6347; /* Changer la couleur lors du hover */
}

footer p a {
    color: #FF6347; /* Couleur des liens en rouge vif */
    text-decoration: none;
    font-weight: bold;
}

footer p a:hover {
    color: #fff; /* Change de couleur au survol */
}

/* Pour desktop : positionner sous les trois barres */
@media (min-width: 768px) {
    .alternative-menu {
        top: 60px; /* Ajustez cette valeur pour qu'il soit directement sous l'icône */
        left: 60px; /* Ajustez cette valeur pour aligner sous les trois barres */
        right: auto;
        width: 200px;
        max-width: 220px;
    }
}





/* Mobile Responsive - Affichage et mise en page pour écrans inférieurs à 768px */
@media (max-width: 768px) {
    /* Layout général */
    main {
        flex-direction: column;
        padding: 10px;
        max-width: 100%;
        gap: 15px;
    }

    /* Header */
    header {
        padding: 20px;
        text-align: center;
    }

    header h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    header p {
        font-size: 14px;
        margin-bottom: 15px;
    }

    header input[type="text"] {
        width: 90%;
        padding: 10px;
        font-size: 14px;
        border-radius: 25px;
        margin-bottom: 15px;
        border: 1px solid #ccc;
    }

    header .tags button {
        font-size: 14px;
        padding: 8px 12px;
        border-radius: 15px;
        margin: 5px;
    }

    /* Section de tri */
    .sort {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        margin-bottom: 15px;
    }

    .sort select {
        font-size: 16px;
        padding: 8px 20px;
        border-radius: 20px;
        border: 2px solid #333;
    }

    /* Centrage du conteneur principal de la grille */
    .content-area {
        
        justify-content: center;
        width: 100%;
    }

    /* Ajustement de la grille de produits pour s'aligner au centre */
    .product-grid {
        display: grid;
        grid-template-columns: 1fr; /* Deux colonnes */
        gap: 1rem;
        width: 100%;
        max-width: 360px; /* Largeur maximum pour éviter de déborder */
        margin: 0 auto;
        justify-content: center;
        align-items: center;
    }

.product-card {
        width: 100%; /* Largeur complète pour la carte produit */
        max-width: 400px; /* Taille maximale pour les cartes de produits */
        margin: 0 auto; /* Centrer les cartes de produits */
    }

    .btn-test, .btn-price {
        width: 100%; /* Les boutons prennent toute la largeur de la carte */
        margin-bottom: 10px; /* Espacement entre les boutons */
    }

    /* Modifications de la taille du texte et de l'icône sur mobile */
    .icon-cart {
        font-size: 18px; /* Taille de l'icône ajustée */
    }

    .product-card p {
        font-size: 14px;
        font-weight: bold;
    }

    /* Badge de note */
    .product-card .rating {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    /* Panneau de filtres masqué par défaut */
    .filters {
        display: none;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 80%;
        background-color: #fff;
        padding: 20px;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        z-index: 1000;
    }

    /* Bouton pour afficher les filtres */
    .filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 15px;
        background-color: #2d51d6;
        color: #fff;
        font-size: 18px;
        font-weight: bold;
        cursor: pointer;
        z-index: 1100;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    /* Style pour le texte du bouton de filtres */
    .filter-toggle span {
        font-size: 18px;
    }

    /* Affichage des filtres quand la classe .show est activée */
    .filters.show {
        display: block;
    }
    
    

    .alternative-menu {
        width: 90%;
        max-width: 350px;
    }
    
    
    .main-header .nav ul {
display: none;
}
}


