/* --- VARIABLES ET RESET --- */
:root {
    --primary-color: #1b4332;   /* Vert forêt foncé */
    --secondary-color: #2d6a4f; /* Vert moyen */
    --bg-light: #f4f7f6;        /* Gris-vert très clair */
    --text-dark: #2d3436;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}
body::-webkit-scrollbar {
    display: none;
  }
  /* scrolbar */
  
    /* Pour Chrome, Edge, Safari */
    ::-webkit-scrollbar {
      width: 0px; /* largeur de la barre */
    }
    
    ::-webkit-scrollbar-track {
      background: #fff; /* couleur de l'arrière-plan */
    }
    
    ::-webkit-scrollbar-thumb {
      background: var(--secondary-color); /* couleur de la barre */
      border-radius: 6px; /* coins arrondis */
    }
    
    ::-webkit-scrollbar-thumb:hover {
       background: var(--primary-color); /* couleur au survol */
    }
    
    /* Pour Firefox */
    html {
      scrollbar-width: thin;
      scrollbar-color: var(--secondary-color) white; /* premier = barre, second = arrière-plan */
    }
    
    ::-webkit-scrollbar-y{
      display: none;
    }

a{
    text-decoration: none;
}

/* --- NAVIGATION --- */
.navbar {
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    padding: 1rem 5%;
    align-items: center;
    position:fixed;
    width: 100%;
    z-index: 100;
}

.navbar ul { display: flex; list-style: none; }
.navbar ul li { margin-left: 20px; }
.navbar a { color: var(--white); text-decoration: none; transition: 0.3s; }
/*.navbar a:hover,*/ .navbar a.active { color: #95d5b2; }

/* --- HEADER --- */
.mini-hero {
    display: flex;
    flex-direction: column;
    justify-content: baseline;
    align-items: center;
    background: linear-gradient(rgba(27, 67, 50, 0.8), rgba(27, 67, 50, 0.8));
               /* url('images/fond-header.jpg') center/cover;*/
    color: var(--white);
    text-align: center;
    padding: 70px 20px 20px 30px;
    
}

@media (max-width:950px) {
.mini-hero{
    padding: 110px 20px 20px 30px;
}
    
    
}

/* Positionnement du conteneur */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-container {
    display: flex;
    align-items: center;
    position: relative;
    
}

/* Style du champ de recherche (caché par défaut) */
#search-input {
    width: 0;
    opacity: 0;
    transition: all 0.4s ease-in-out;
    padding: 8px 0;
    border: none;
    border-bottom: 2px solid #2e7d32; /* Vert forêt */
    outline: none;
    background: transparent;
    color:var(--white)
}

/* Classe activée en JS */
#search-input.active {
    width: 100px;
    opacity: 1;
    padding: 8px 10px;
}

#search-trigger {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}

/* --- Responsive (Petit écran) --- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    
    .search-container {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        order: 3; /* Place la recherche sous le menu */
    }

    #search-input.active {
        width: 80%; /* Plus large sur mobile */
    }
}
 
main{
    min-height: 730px;
}

/* --- GRILLE D'ESSENCES --- */

.photo{
    width: 250px;
    height: 300px;
}

.essences-grid {
    display: grid;
    /* Crée des colonnes responsives (minimum 300px) */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr ));
    gap: 25px;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- CARTES --- */
.card {
    background: linear-gradient(to right, #f7fff7, #e2f3e2);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    border-top: 5px solid var(--secondary-color);
}

.card:hover { transform: translateY(-5px); -webkit-transform: translateY(-5px); -moz-transform: translateY(-5px); -ms-transform: translateY(-5px); -o-transform: translateY(-5px); }

.card-content { 
    padding: 22px;
    font-size: 20px;
}

.card-famille {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
}

.card h3 { margin: 10px 0; color: var(--primary-color); }

.card-description {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #636e72;
}

.card-content a{
    color:var(--primary-color);
    /*color:blue;*/
    font-weight: 600;
    margin-bottom: 20px;
}

.card-footer{
    margin-top: 10px;
}

/* --- PAGINATION --- */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding-bottom: 50px;
}

.btn-pagin {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-pagin:disabled {
    background: #b2bec3;
    cursor: not-allowed;
}

button {
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background-color: #2d5a27;
    color: white;
    transition: background 0.3s;
}

button:hover:not(:disabled) {
    background-color: #3e7a36;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#page-info { font-weight: 600; }

/* --- FOOTER --- */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 20px;
}
