:root {
  --primary-color: #1e73be;
  --secondary-color: #333;
  --text-color: #222222;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0; padding: 0;
  background: #f8f8f8;
  color: var(--text-color);
}

a {
  color: var(--secondary-color);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Ensure images in the main content adapt to small screens */
main img {
  max-width: 100%;
  height: auto;
}

header {
  background: var(--primary-color);
  color: #fff;
  padding: 1.2rem 0;
}

.site-header {
  position: relative;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

.social-icons {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.social-icons img {
  width: 28px;
  height: 28px;
}
.site-logo {
  max-height: 64px;
  vertical-align: middle;
}
h1 {
  margin: 0.2em 0 0.3em 0;
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}
.homepage-main {
  text-align: center;
  margin: 2em 0;
}
.homepage-description {
  font-size: 1.3em;
  font-style: italic;
}
.homepage-img {
  width: 100%;
  max-width: 700px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px #0002;
  margin-bottom: 1.5em;
}
.homepage-links ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1.5em;
  flex-wrap: wrap;
  justify-content: center;
}
.homepage-links li {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px #0001;
  padding: 0.8em 1.2em;
  margin: 0.5em;
  min-width: 140px;
  text-align: center;
}
.homepage-links a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}
.homepage-links a:hover {
  color: #ff7300;
}
footer {
  background: #eee;
  color: #555;
  padding: 1em 0;
  text-align: center;
  margin-top: 2em;
}
footer .container {
  text-align: center;
}
/* Lien "Mentions légales" dans le pied de page */
.legal-link {
  font-size: 0.7rem; /* 30% plus petit que le titre du site (2rem) */
  color: inherit;
  text-decoration: none;
}

.legal-link:hover {
  text-decoration: underline;
}
.article-img {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 1.5em;
}
.article-date {
  color: #888; font-size: 0.95em; margin-bottom: 1em;
}

.categories-menu {
  margin: 1em auto 2em;
  max-width: 1280px;
}
.categories-menu ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
}
/* Navigation section under the header */
.nav-section {
  background: var(--primary-color);
  color: #fff;
}

.site-nav .burger {
  display: none;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}

.nav-section .site-nav ul {
  list-style: none;
  margin: 0;
  padding: 15px 0;
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
}

.nav-section .site-nav a {
  color: inherit;
  text-decoration: none;
  padding: 0.5em 0;
  font-weight: 600;
}

/* Grid d'articles pour les pages catégories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5em;
  margin: 2em 0;
}

.category-item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px #0001;
  overflow: hidden;
}

.category-thumb {
  width: 100%;
  height: auto;
  display: block;
}

.category-item h2 {
  font-size: 1.2em;
  margin: 0.8em;
}

.category-item p {
  margin: 0 0.8em 1em;
}

/* Remove underline and default color on category links */
.category-item a {
  text-decoration: none;
  color: inherit;
}

/* Grid d'articles pour la page d'accueil */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5em;
  margin: 2em 0;
}

.post-item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px #0001;
  overflow: hidden;
}

.post-thumb {
  width: 100%;
  height: auto;
  display: block;
}

.post-item h3 {
  font-size: 1.1em;
  margin: 0.8em;
}

/* Remove underline and default color on latest post links */
.post-item a {
  text-decoration: none;
  color: inherit;
}

@media (max-width: 600px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .site-header .container {
    flex-direction: column;
  }
  .site-nav .burger {
    display: block;
    padding: 15px;
  }
  .nav-section .site-nav ul {
    display: none;
    flex-direction: column;
    align-items: center;
  }
  .nav-section .site-nav.open ul {
    display: flex;
  }
  .categories-menu ul {
    flex-direction: column;
    align-items: center;
  }
}

/* Plan du site */
.sitemap-list {
  list-style: none;
  padding: 0;
  line-height: 1.6;
}
.sitemap-list li {
  margin: 0.3em 0;
}
.sitemap-list a {
  color: var(--secondary-color);
  text-decoration: none;
}
.sitemap-list a:hover {
  text-decoration: underline;
}

