/* styles.css */

/* Variables de couleurs pour faciliter la maintenance */
:root {
    --primary-color: #004a99;
    --secondary-color: #25D366;
    --text-color: #eee;
    /* Texte clair */
    --background-color: #121212;
    /* Fond sombre */
    --card-background: #212121;
    /* Fond des cartes */
    --white: #fff;
    --star-color: #ffc107;
}

/* Basic Reset */
*,
::before,
::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Styles pour Particles.js */
#particles-container {
    position: relative;
    overflow: hidden;
    background: var(--background-color);
    /* Assurer un fond noir */
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Derrière le contenu */
}

.products,
.promotions,
.brands,
.new-products {
    position: relative;
    z-index: 1;
    /* Devant les particules */
    padding: 50px 0;
}

/* Header */
header {
    background: var(--primary-color);
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: flex;  /* Ajout d'un flex container */
    justify-content: center; /* Centrer horizontalement */
    align-items: center;     /* Centrer verticalement */
}

.logo {
    max-width: 200px;
    height: auto;
    display: block;
    /* margin: 0 auto; Supprimer la marge automatique */
}


/* Barre de recherche */
.search-bar {
    text-align: center;
    padding: 20px;
    background-color: var(--card-background);
    margin-bottom: 20px;
}

.search-bar input[type="text"] {
    padding: 10px;
    width: 70%;
    border: none;
    border-radius: 5px;
    background-color: #333;
    color: var(--text-color);
}

.search-bar button {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #1EBE57;
}

/* Général */
h1,
h2,
h3,
h4 {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    /* Ajout d'une ombre */
}

h2 {
    font-size: 2.5em;
    /* Augmenter la taille des titres de section */
    margin-bottom: 1em;
    text-align: center;
}

h4 {
    font-size: 1.2em;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: center;
}

p {
    margin-bottom: 1em;
}

/* Products Section */
.products {
    padding: 50px 20px;
}

.brand-category {
    margin-bottom: 30px;
}

.product-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.product {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    max-width: 300px;
    margin: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.7);
}

.product img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* Boutons */
.Commander-button,
.whatsapp-button,
.login-button {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.3s;
    /* Ajout d'une transition sur transform */
    border: none;
    cursor: pointer;
}

.Commander-button {
    background-color: var(--secondary-color);
}

.Commander-button:hover {
    background-color: #1EBE57;
    transform: scale(1.05);
    /* Légèrement agrandir au survol */
}

.whatsapp-button {
    background-color: #82b997;
}

.whatsapp-button:hover {
    background-color: #1EBE57;
    transform: scale(1.05);
    /* Légèrement agrandir au survol */
}

/* Login Button */
.login-button {
    background-color: var(--primary-color);
}

.login-button:hover {
    background-color: #003366;
    transform: scale(1.05);
}

/* Promotions */
.promotions {
    background-color: transparent;
    /* Fond transparent pour laisser voir l'effet particles */
}

.promotions .container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

.promotions h2 {
    font-size: 2.5em;
    color: var(--text-color);
    margin-bottom: 15px;
}

.promotions p {
    font-size: 1.1em;
    color: #ccc;
    margin-bottom: 30px;
}

/* Aide */
.help {
    text-align: center;
    padding: 50px 0;
}

/* Chatbot Button */
.chatbot-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    color: var(--white);
    background-color: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: fixed;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, transform 0.3s;
}

.chatbot-button:hover {
    background-color: #003366;
    transform: scale(1.1);
}

.chatbot-button i {
    font-size: 1.5em;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 20px;
    margin-top: 40px;
    text-align: center;
}

footer a {
    color: var(--white);
}

/* Styles pour la section "Marques" */
.brands {
    text-align: center;
}

.brand-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.brand {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    max-width: 300px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.brand:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.7);
}

/* Media Queries pour l'adaptation mobile */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: center;
    }

    nav a {
        padding: 10px;
        font-size: 14px;
    }

    .product-grid {
        flex-direction: column;
        align-items: center;
    }

    .product {
        max-width: 90%;
    }

    .chatbot-button {
        bottom: 10px;
        right: 10px;
    }

    h2 {
        font-size: 2em;
        /* Réduire la taille des titres sur mobile */
    }
}