/* =========================================================
   VARIABLES – CHARTE GRAPHIQUE
========================================================= */

:root {
  /* Couleurs (palette rafraîchie) */
  --color-primary: #2A4D69;       /* Bleu profond */
  --color-secondary: #489F7B;     /* Vert dynamique */
  --color-accent: #D4A574;        /* Ocre chaud */
  --color-text: #333333;
  --color-text-muted: #777777;
  --color-bg: #FFFFFF;
  --color-bg-light: #F8F9FA;
  --color-border: #E0E0E0;
  --color-error: #E74C3C;
  --color-success: #27AE60;

  /* Typographies (polices modernes) */
  --font-title: 'Montserrat', sans-serif;
  --font-text: 'Source Sans 3', sans-serif;

  /* Layout */
  --max-width: 1200px;
  --radius: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* =========================================================
   RESET + BASE
========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* =========================================================
   ACCESSIBILITÉ
========================================================= */

:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* =========================================================
   TYPOGRAPHIE
========================================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--color-primary);
  margin-top: 0;
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }

p {
  margin: 0 0 1rem;
}

/* =========================================================
   STRUCTURE GÉNÉRALE
========================================================= */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
}

/* =========================================================
   EN-TÊTE / NAVIGATION
========================================================= */

.header {
  background-color: var(--color-primary);
  color: white;
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 1.2rem;
}

.logo img {
  height: 50px;
  width: auto;
}

.logo:hover img {
  filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(347deg) brightness(118%) contrast(119%);
}

.nav {
  display: flex;
  align-items: center;
}

.nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.2rem;
}

.nav a {
  color: white;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav a:hover {
  color: var(--color-accent);
	text-decoration: none;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

/* Champ de recherche moderne */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 300px;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border: none;
  border-radius: 25px;
  font-family: var(--font-text);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  placeholder-color: rgba(255, 255, 255, 0.7);
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
  background-color: rgba(255, 255, 255, 0.2);
  width: 100%;
}

.search-box button {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
}

.search-box button:focus {
  outline: none;
}

/* Menu burger pour mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 992px) {
  .menu-toggle {
    display: block;
  }

  .nav ul {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--color-primary);
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    gap: 0.8rem;
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  .nav ul.active {
    transform: translateY(0);
  }

  .search-box {
    order: 1;
    max-width: 100%;
    margin-top: 1rem;
  }
}


/* =========================================================
   BANNIÈRE HERO
========================================================= */

.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/images/hero-bg.jpg') center/cover no-repeat;
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

/* =========================================================
   CARTES D'ARTICLES / ACTUALITÉS
========================================================= */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.article-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-content {
  padding: 1.5rem;
}

.article-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* =========================================================
   BOUTONS
========================================================= */

.button {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-title);
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.button-primary {
  background-color: var(--color-primary);
  color: white;
}

.button-primary:hover {
  background-color: #1A354A;
}

.button-secondary {
  background-color: var(--color-secondary);
  color: white;
}

.button-secondary:hover {
  background-color: #3A8A6A;
}

/* =========================================================
   PIED DE PAGE
========================================================= */

.footer {
  background-color: var(--color-primary);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.footer-links a {
  color: white;
}

.copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* =========================================================
   RESPONSIVE – MOBILE
========================================================= */

@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav ul {
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

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