/* =========================
   Styles généraux
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f8f8f8;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* =========================
   Header (bannière)
   ========================= */
header {
  position: relative;
  width: 100%;
  height: 450px;
  background: url('images/bandeau.jpg') no-repeat center top/cover;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 30px;
}

.header-text {
  max-width: 500px;
}

.header-text h1 {
  font-size: 14px;
  margin: 0 0 10px 0;
  font-weight: normal;
  letter-spacing: 0.5px;
}

.header-text h2 {
  font-size: 36px;
  font-weight: bold;
  line-height: 1.2;
  margin: 0;
}

/* Mobile: header centré + texte plus compact */
@media (max-width: 640px) {
  header {
    justify-content: center;
    padding-left: 0;
    text-align: center;
    height: 360px;
  }
  .header-text {
    padding: 0 16px;
  }
  .header-text h2 {
    font-size: 28px;
  }
}

/* =========================
   Navigation — centré + 1 ligne scrollable
   ========================= */
nav {
  background: #d9232e;
  padding: 10px 0;
  display: flex;
  justify-content: center;
}

nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1200px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-wrap: nowrap;
  white-space: nowrap;
  gap: clamp(10px, 3vw, 24px);

  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
nav ul::-webkit-scrollbar {
  display: none;
}

nav ul li {
  display: block;
}

nav ul li a {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  font-size: clamp(14px, 1.9vw, 16px);
  padding: 8px clamp(6px, 2vw, 12px);
  transition: color 0.3s ease;
}
nav ul li a:hover,
nav ul li a:focus {
  color: #ffd700;
}

/* =========================
   Sections générales
   ========================= */
section {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

/* =========================
   À propos / Contact
   ========================= */
#about {
  background-color: #eef7f2;
  padding: 50px 20px;
}

#contact {
  background-color: #f4e1d2;
  padding: 50px 20px;
}

#contact p:last-child {
  color: red;
  font-weight: bold;
}

/* =========================
   Catégories
   ========================= */
.category-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.category {
  border: none;
  padding: 20px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 280px;
  text-align: center;
}

.category:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

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

/* =========================
   News
   ========================= */
#news {
  background-color: #fff7e6;
  padding: 50px 20px;
}

#news h2 {
  margin-top: 0;
}

.news-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.news-list {
  display: grid;
  gap: 20px;
}

.news-article {
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.news-article h3 {
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.news-meta {
  display: inline-block;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

/* Centrage du bouton dans les cartes News */
.news-article p {
  text-align: center;
}
.news-link {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 12px;
  background-color: #d9232e;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
.news-link:hover,
.news-link:focus {
  background-color: #a81720;
}

/* 2 colonnes à partir de tablettes */
@media (min-width: 768px) {
  .news-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================
   Footer
   ========================= */
footer .credits {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 4px;
}

/* =========================
   Divers accessibilité
   ========================= */
a:focus {
  outline: 2px dashed #ffd700;
  outline-offset: 2px;
}
