/* =====================
   RESET & BASE
===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Mode Clair (Par défaut) */
  --vert:        #2d6a4f;
  --vert-clair:  #d8f3dc;
  --vert-hover:  #b7e4c7;
  --texte:       #1a1a1a;
  --texte-doux:  #555555;
  --fond:        #f9f9f7;
  --blanc:       #ffffff;
  --bordure:     #e0e0da;
  --radius:      8px;
  --titre-barre: #ffffff; /* Texte blanc sur barre foncée par défaut */
}

/* =====================
   GESTION DU MODE SOMBRE
===================== */
@media (prefers-color-scheme: dark) {
  :root {
    --vert:        #52b788; 
    --vert-clair:  #1b4332; 
    --vert-hover:  #2d6a4f;
    --texte:       #e0e0e0; 
    --texte-doux:  #a0a0a0;
    --fond:        #121212; 
    --blanc:       #1e1e1e; 
    --bordure:     #333333;
    --titre-barre: #000000; /* Texte noir sur barre claire en mode sombre */
  }

  header img.armoiries, footer img.armoiries-petite {
    filter: brightness(0.8) contrast(1.2);
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Georgia', serif;
  background-color: var(--fond);
  color: var(--texte);
  line-height: 1.8;
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* =====================
   LAYOUT & CONTAINERS
===================== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { padding: 3rem 0 4rem; }

section { margin-bottom: 4rem; }

/* =====================
   HEADER & NAV
===================== */
header {
  background-color: var(--blanc);
  border-bottom: 3px solid var(--vert);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

header img.armoiries {
  width: 90px;
  height: auto;
  margin-bottom: 1rem;
}

header h1 {
  font-size: 2rem;
  color: var(--vert);
  font-weight: bold;
}

nav.breadcrumb {
  background: var(--vert-clair);
  padding: 0.8rem 1.5rem;
  font-size: 0.85rem;
  color: var(--texte-doux);
}

nav.breadcrumb a {
  color: var(--vert);
  text-decoration: none;
  font-weight: bold;
}

/* =====================
   TITRES DE SECTION (Barres vertes)
===================== */
h2.section-title {
  font-size: 1.1rem;
  font-weight: bold;
  background-color: var(--vert);
  color: var(--titre-barre) !important; /* Utilise la variable corrigée */
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.3px;
  display: block;
  width: 100%;
}

/* Style spécifique pour les dates (ex: 1613) dans les barres */
h2.section-title span, h2.section-title strong {
  color: inherit;
}

/* =====================
   CONTENU DES PAGES (Texte & Listes)
===================== */
.page-content p, .retrospective p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

/* UNIFICATION DES LISTES (Correction de l'alignement) */
.page-content ul {
  padding-left: 0; /* On gère l'alignement via le li */
  margin-bottom: 2rem;
  list-style-type: none;
}

.page-content li {
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.5rem; /* Espace pour la puce */
  text-align: left;
}

.page-content li::before {
  content: "•"; 
  color: var(--vert);
  font-weight: bold;
  position: absolute;
  left: 0.2rem; /* Aligne la puce à gauche */
}

/* Blockquotes (Archives) */
blockquote {
  border-left: 3px solid var(--vert);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--texte-doux);
}

/* =====================
   CARTES & GRILLES (Accueil)
===================== */
.card-list { display: flex; flex-direction: column; gap: 1.2rem; }

.card-link, .membre-card {
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: var(--texte);
  font-weight: bold;
  transition: all 0.2s ease;
}

.card-link:hover, .membre-card:hover {
  background: var(--vert-hover);
  border-color: var(--vert);
}

.membres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
}

/* =====================
   RÉTROSPECTIVE (Ajustements titres internes)
===================== */
.retrospective h3 {
  margin-top: 3rem;
  margin-bottom: 0.8rem;
  font-size: 1.25rem;
  color: var(--vert);
  border-left: 4px solid var(--vert);
  padding-left: 0.8rem;
}

/* =====================
   FOOTER
===================== */
footer {
  padding: 3rem 0 5rem;
}

footer hr {
  border: 0;
  border-top: 1px solid var(--bordure);
  margin: 1.5rem 0;
}

footer a { color: var(--vert); font-weight: bold; text-decoration: none; }

footer img {
  width: 20px !important;
  height: auto;
  display: block;
  margin-top: 0.5rem;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 600px) {
  header h1 { font-size: 1.5rem; }
  .membres-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}