/* ==========================================
   1. RÉINITIALISATION ET VARIABLES DE BASE
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Police sans-serif propre et moderne */
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6; /* Gris très clair, presque stérile/médical */
    color: #334155; /* Gris foncé, plus doux à lire que le noir pur */
    line-height: 1.6;
}

/* ==========================================
   2. EN-TÊTE ET NAVIGATION
   ========================================== */
.en-tete {
    background-color: #ffffff;
    display: flex; /* Flexbox pour aligner le logo et le menu sur la même ligne */
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Ombre très légère en dessous */
    position: sticky; /* L'en-tête reste en haut quand on défile */
    top: 0;
    z-index: 1000;
}

.logo h1 {
    color: #0f766e; /* Vert/Bleu médical profond */
    font-size: 1.5rem;
    font-weight: 700;
}

.navigation ul {
    list-style: none; /* Enlève les puces */
    display: flex;
    gap: 2rem; /* Espace entre les liens */
}

.navigation a {
    text-decoration: none; /* Enlève le soulignement */
    color: #475569;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease; /* Animation fluide au survol */
}

.navigation a:hover {
    color: #0f766e;
}

/* ==========================================
   3. CONTENU PRINCIPAL ET SECTIONS
   ========================================== */
main {
    max-width: 1200px; /* Largeur maximale pour les grands écrans */
    margin: 0 auto; /* Centre le contenu */
    padding: 3rem 5%;
}

.section-categorie {
    margin-bottom: 4rem;
}

.titre-categorie {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #ccfbf1; /* Soulignement discret de la catégorie */
    display: inline-block;
}

/* ==========================================
   4. LA GRILLE DE PRODUITS (Le cœur du layout)
   ========================================== */
.conteneur-produits {
    display: grid;
    /* Crée des colonnes automatiques de 300px minimum, qui s'étirent si besoin */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem; /* Espace entre les cartes */
}

/* ==========================================
   5. DESIGN DES CARTES PRODUITS ("Quali")
   ========================================== */
.carte-produit {
    background-color: #ffffff;
    border-radius: 12px; /* Coins arrondis */
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    /* Ombre douce pour l'effet "carte" */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column; /* Permet de pousser le prix tout en bas */
}

/* Effet au survol de la souris */
.carte-produit:hover {
    transform: translateY(-5px); /* La carte se soulève légèrement */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); /* L'ombre s'agrandit */
}

.image-produit {
    max-width: 100%; /* Empêche l'image de déborder si elle est trop grande */
    height: auto;
     height: 220px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    object-fit: contain; /* S'assure que l'image n'est pas déformée */
}

.nom-produit {
    font-size: 1.25rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.ref-produit {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.desc-produit {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Prend l'espace vide pour que tous les prix soient alignés en bas */
}

.prix-produit {
    display: inline-block;
    background-color: #f0fdfa; /* Fond vert très clair */
    color: #0f766e; /* Texte vert foncé */
    font-weight: 700;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-top: auto;
}

/* ==========================================
   6. PIED DE PAGE
   ========================================== */
.pied-de-page {
    background-color: #1e293b; /* Bleu nuit très sombre */
    color: #f8fafc;
    padding: 3rem 5%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* S'adapte sur mobile */
    gap: 2rem;
    border-top: 4px solid #0f766e; /* Ligne de rappel de la couleur principale */
}

.contact h3 {
    color: #ccfbf1;
    margin-bottom: 1rem;
}

.mentions-legales {
    align-self: flex-end;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ==========================================
   7. RESPONSIVE DESIGN (Mobiles et Tablettes)
   ========================================== */
@media (max-width: 768px) {
    .en-tete {
        flex-direction: column;
        gap: 1rem;
    }

    .navigation ul {
        gap: 1rem;
        flex-wrap: wrap; 
        justify-content: center;
    }
    
    .pied-de-page {
        flex-direction: column;
        text-align: center;
    }
    
    .mentions-legales {
        align-self: center;
    }
}

html {
    scroll-behavior: smooth;
}
.btn-commander {
    display: block;
    background-color: #0f766e;
    color: white;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}
.btn-commander:hover {
    background-color: #115e59;
}
.image-produit {
    max-width: 100%; 
    border-radius: 8px;
    margin-bottom: 1.5rem;
    object-fit: contain;
}
/* ==========================================
   BARRE DE RECHERCHE
   ========================================== */
.conteneur-recherche {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 15px;
}

#barre-recherche {
    width: 80%;
    max-width: 400px;
    padding: 10px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px; /* Bords arrondis */
    outline: none;
    transition: all 0.3s ease;
}

/* Effet quand on clique dans la barre de recherche */
#barre-recherche:focus {
    border-color: #2e7d32; /* Vert rappelant la marque Forever */
    box-shadow: 0 0 8px rgba(46, 125, 50, 0.3);
}

/* Classe ajoutée par Javascript pour masquer les produits qui ne correspondent pas */
.masquer-produit {
    display: none !important;
}