/* --- Barre de navigation --- */
header {
  background-color: white;
  padding: 10px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left #logo img {
  height: 100px;
  cursor: pointer;
}

.header-right a.btn-header {
  margin-left: 15px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  padding: 8px 12px;
  background-color: #f0f0f0;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.header-right a.btn-header:hover {
  background-color: #ddd;
}

/* Bouton Déconnexion */
.header-right form button.btn-header {
  background-color: #f0f0f0;
  border: none;
  margin-left: 15px;
  padding: 8px 12px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s;
  color: #333;
}

.header-right form button.btn-header:hover {
  background-color: #ddd;
}

/* Message utilisateur connecté */
.user-info {
  background-color: #dff0d8;
  color: #3c763d;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 6px;
  margin-bottom: 5px;
  font-family: Arial, sans-serif;
}

.navbar {
  width: 100%;
  background-color: #b6b6b6;
  text-align: center;
  margin-top: 10px;
  overflow: hidden;
}

.navbar ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: inline-block;
}

.navbar ul li {
  display: inline-block;
}

.navbar ul li a {
  display: inline-block;
  padding: 14px 20px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.navbar ul li a:hover {
  background-color: #575757;
  color: #fff;
}

/* --- Styles généraux du site --- */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f9;
  color: #333;
}

main {
  padding: 20px;
  max-width: 960px;
  margin: 20px auto;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

section {
  margin-bottom: 30px;
}

/* Titres */
h1, h2, h3 {
  color: #2c3e50;
  margin-bottom: 15px;
}

/* Articles en grille */
section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
}

article {
  background-color: #fff;
  border: 2px solid #4CAF50; /* bordure verte bien visible */
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 280px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

article:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  background-color: #f9f9f9;
  border-color: #2e7d32; /* bordure plus foncée au hover */
}

/* Titres des articles */
article h2 {
  font-size: 1.2em;
  color: #4CAF50;
  font-weight: bold;
}

article h2 a {
  color: #4CAF50;
  text-decoration: none;
}

article h2 a:hover {
  text-decoration: underline;
}

/* Description des articles */
article p {
  font-size: 1em;
  color: #555;
  margin-bottom: 15px;
  font-style: italic;
}

/* Images dans les articles */
article img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  section {
    flex-direction: column;
    align-items: center;
  }

  article {
    width: 90%;
  }
}

/* --- Styles alternés pour articles avec image à gauche ou droite --- */
.article-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2em 0;
  gap: 2em;
  flex-wrap: wrap;
}

.article-image {
  flex: 1;
  max-width: 400px;
}

.article-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.article-text {
  flex: 2;
}

.image-left .article-image { order: 0; }
.image-left .article-text { order: 1; }

.image-right .article-image { order: 1; }
.image-right .article-text { order: 0; }

/* Responsive pour articles alternés */
@media (max-width: 768px) {
  .article-block {
    flex-direction: column;
    text-align: center;
  }
  .article-image, .article-text {
    order: unset !important;
    max-width: 100%;
  }
}

/* Titres gras dans articles alternés */
.article-text h3 {
  font-weight: bold;
  margin-bottom: 0.5em;
}

/* Hover sur bloc article */
.article-block:hover {
  background-color: #f5f5f5;
  transition: background-color 0.3s ease;
  border-radius: 12px;
  padding: 1em;
}

/* Footer */
footer {
  background-color: #ffffff;
  color: black;
  text-align: center;
  padding: 20px;
  position: fixed;
  bottom: 0;
  width: 100%;
}

footer a:hover {
  text-decoration: underline;
}
