/* ==== Base du site ===== */
/* largeur et calculs fiables pour toute la page */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* on évite tout défilement horizontal */
html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* police et couleurs globales */
body {
  font-family: Arial, sans-serif;
  background-color: #f8f8f8;
  color: #333;
}

/* ===== En-tête (barre du haut) ===== */
/* Titre + menu, alignés à gauche, barre un peu moins haute */
header {
  background-color: #222;        /* fond foncé pour du contraste */
  color: white;                  /* texte blanc lisible */
  padding: 0.8em 40px;           /* plus fin que d’origine */
  display: flex;
  align-items: center;
  gap: 2rem;                     /* espace entre le titre et le menu */
}

/* titre du site à gauche, sans marges parasites */
header h1 {
  margin: 0;
  font-size: 1.5em;              /* taille raisonnable */
  font-weight: bold;
}

/* ===== Navigation (menu) ===== */
/* menu collé à gauche comme le reste du contenu */
nav {
  margin: 0;
}

nav ul {
  list-style: none;              /* pas de puces */
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: flex-start;   /* bien à gauche */
  gap: 1.5em;                    /* espace régulier entre les liens */
}

/* liens du menu */
nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.3px;
  transition: color 0.3s;        /* petit effet au survol */
}

/* survol/focus */
nav a:hover,
nav a:focus {
  color: #ffcc00;
  outline: none;
}

/* lien actif (page courante) */
nav a.active {
  color: #ffcc00;
  text-decoration: underline;
}

/* ===== Zone de contenu ===== */
/* même largeur partout pour un alignement propre */
main {
  max-width: 1200px;             /* largeur max confortable */
  margin: 0 auto;                /* centré dans la fenêtre */
  padding: 0 40px 80px;          /* même retrait que l’en-tête */
}

/* titres courants */
h1,
h2 {
  color: #222;
}

/* ===== Bannière (image large) ===== */
.banner {
  position: relative;
  overflow: hidden;
}

.banner img {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  margin-top: 10px;
}

/* léger assombrissement pour lire le texte si besoin */
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}

/* ===== Formulaires (contact) ===== */
form {
  max-width: 500px;              /* largeur lisible */
  margin: 20px 0 40px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

label { font-weight: bold; }

input,
textarea {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}

button {
  background: #333;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}

button:hover,
button:focus {
  background: #555;
}

/* ===== Liste d’articles (page “Articles”) ===== */
.articles-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5em;
  margin-top: 1.5em;
}

.articles-list article {
  background: white;
  padding: 1em;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.articles-list article:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* liens des cartes d’articles */
.articles-list a {
  color: #222;
  text-decoration: none;
  font-weight: bold;
}

.articles-list a:hover {
  color: #ffcc00;
}

/* infos auteur/date sous les titres d’articles */
.meta {
  font-size: 0.95em;
  color: #555;
  font-style: italic;
  margin: 0.3em 0 1em;
}

.meta strong { color: #222; }

/* ===== Section d’intro (homepage) ===== */
.intro {
  margin: 40px 0 28px 0;         /* même rythme que le reste */
  max-width: none;
}

.intro h2 {
  font-size: 1.8em;
  color: #222;
  margin-bottom: 0.5em;
}

.intro p {
  font-size: 1.05em;
  color: #444;
  line-height: 1.7;
  margin: 0 0 0.9em 0;
}

/* ===== 3 images “boîtes” (homepage) ===== */
/* Grille fluide, alignée comme les paragraphes */
.features-vertical {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 24px;
  margin: 20px 0 40px 0;
  justify-content: start;         /* collé au bord gauche du contenu */
  align-items: stretch;
  width: 100%;
}

/* liens autour des boxes (accueil) */
.feature-link {
  text-decoration: none;          /* pas de soulignement */
  display: block;
  color: inherit;                 /* garde les couleurs du texte */
}
.feature-link:hover {
  cursor: pointer;
}


/* on supprime les marges par défaut de <figure> */
.feature-box {
  margin: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;            /* ratio vertical (≈ 600x800) */
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

/* légende affichée au survol */
.feature-box figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.95em;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

/* effets au survol pour donner un peu de vie */
.feature-box:hover img {
  transform: scale(1.08);
  opacity: 0.9;
}
.feature-box:hover figcaption {
  transform: translateY(0);
}
.feature-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* ===== Pied de page (en bas) ===== */
/* Plus riche, aligné à gauche, même largeur que le contenu */
footer {
  background-color: #222;
  color: white;
  padding: 1.5em 40px;
  text-align: left;               /* cohérent avec le reste */
}

/* conteneur interne du footer (liens + mention) */
footer .footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;                /* passe sur 2 lignes si besoin */
  justify-content: space-between;
  align-items: flex-start;
  gap: 1em;
}

/* liste des liens du footer */
footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

/* style des liens du footer */
footer nav a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

footer nav a:hover {
  color: #ffcc00;
}

/* petit texte du footer */
footer p {
  font-size: 0.9em;
  color: #aaa;
  margin: 0;
}

/* ===== Responsive (petits écrans) ===== */
@media (max-width: 1100px) {
  .features-vertical {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 700px) {
  .features-vertical {
    grid-template-columns: 1fr;  /* une seule colonne */
  }
}


/* ===== Ajustements pour petits écrans (smartphones) ===== */
/* Quand la largeur est inférieure à 600px, on empile le titre et le menu
   pour éviter qu’ils se chevauchent sur la même ligne */
   @media (max-width: 600px) {
    header {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5em;
    }
  
    nav ul {
      flex-direction: column;
      gap: 0.5em;
    }
  }
  