/* styles.css */
.alert {
  background: #fef3f2; /* rose très clair */
  color: #b91c1c;     /* rouge vif */
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.alert-info {
  background: #818adb; /* vert très clair */
  color: #0515a9;     /* vert vif */
}
.alert-success {
  background: #f0fdf4; /* vert très clair */
  color: #166534;     /* vert vif */
}
.alert-warning {
  background: #fffbeb; /* jaune très clair */
  color: #ca8a04;     /* jaune vif */
}
.alert-error {
  background: #fee2e2; /* rouge très clair */
  color: #b91c1c;     /* rouge vif */
}

body {
    font-family:Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    margin: 0;
    padding: 0;
    background: #fdfdfd;
    color: #333;
}

header {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 0 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;

    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 1.1em;
    color: #000000;
    font-weight: normal;
}

header h1 a {
    cursor: pointer;
    text-decoration: none;
    color: #000000;

}

header form {
    display: flex;
    gap: 0.5em;
}

input[type="text"] {
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 250px;
}

button {
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button:hover {
    background: rgb(201, 201, 201);
}

main {
    padding: 1em 1em;
    margin-top: 60px;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    /* border-bottom: 1px solid #ddd; */
}

main h3, h4, h5 {
    /*margin-top: 0;*/
    color: #000000;
    font-weight: normal;
    margin: 5px;
    padding: 0;
}

footer {
    text-align: center;
    padding: 1em;
    font-size: 0.9em;
    color: #aaa;
    border-top: 1px solid #ddd;
    margin-bottom: 60px;
}

nav {
  height: 60px;
  display: flex;
  flex-direction: row;
  position: fixed;
  bottom: 0px; 
  left: 0px;
  right: 0px;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  border-top: 1px solid #ddd;
  z-index: 1001;
}
nav form {
   margin: 5px; 
}
nav form button {
   font-size: 20px; 
}

.btn-panier {
  padding: 0.5em 1em;
  background: #eee;
  color: #333;
  border-radius: 8px;
  text-decoration: none;
  font-size: 20px;
}

.btn-panier-filled {
  background: #cee5db;
  color: white;
  font-weight: bold;
  position: relative;
}

.badge {
  background: red;
  color: white;
  border-radius: 999px;
  padding: 0.15em 0.5em;
  font-size: 0.7rem;
  margin-left: 0.4em;
}

.category-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2em;
    justify-content:center;
    margin-top: 2em;
}

.category-item {
    width: 25%;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    transition: transform 0.2s ease;
    display: flex; /* Active Flexbox */
    flex-direction: column; /* Empile les enfants verticalement */
    height: 100%; /* Assure que toutes les cartes ont la même hauteur */
}

.category-item img {
    width: 100%;
    height: auto;
    display: block;
    flex-grow: 0; /* Empêche l'image de grandir */
}

.category-item h3 {
    margin: 0;
    padding: 1em 0;
    font-size: 1.1em;
    background: #f8f8f8;
    margin-top: auto; /* Pousse le h3 vers le bas */
}
.category-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* css pour les fiches articles */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  /*margin-top: 20px;*/
}

.articles-grid div p {
  margin: 5px;
  /*padding: 0px;*/
}

.article-card {
  /* background: #f9f9f9; */
  background: white;
  padding: 0px;
  /* border-radius: 8px;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
  text-align: center; */
  /*outline: 1px solid red;*/ /* temporaire pour visualiser les contours */
}

.article-card img {
  width: 100%;
  height: auto;
  display: block;
  /* border-radius: 6px; */
}
/* fin css pour les articles

/* css article détail */
/* fin css article détail */

/* css pour le panier */
/* fin css panier */


@media (max-width: 768px) {
  .article-card h3 {
    font-size: 1.1em;
  }

  .article-card p {
    font-size: 0.95em;
  }

  /* .articles-grid {
    grid-template-columns: 1fr;
  } */

  .category-item {
    width:90%;
  }

  input[type="text"] {
    width: 130px;
  }

  /* header h1 {
    font-size: 1em;
  } */

}
