/* Variables de thème */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #16a085;
  --background-color: #f9f9f9;
  --text-color: #333333;
  --link-color: #16a085;
  --link-hover-color: #117a60;
  --heading-font: 'Georgia', serif;
  --body-font: 'Helvetica Neue', Arial, sans-serif;
  --max-content-width: 800px;
  --base-spacing: 1.2rem;
}

/* Reset léger */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Corps de page */
body {
  background: var(--background-color);
  color: var(--text-color);
  font-family: var(--body-font);
  line-height: 1.6;
  font-size: 1rem;
  padding: var(--base-spacing);
}

/* Conteneur principal */
article {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: var(--base-spacing) var(--base-spacing);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Entête de l’article */
article header {
  margin-bottom: calc(var(--base-spacing) * 1.5);
  text-align: center;
}
article header h1 {
  font-family: var(--heading-font);
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}
article header em {
  color: var(--secondary-color);
  font-style: normal;
}

/* Breadcrumb */
nav[aria-label="Breadcrumb"] ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: var(--base-spacing);
}
nav[aria-label="Breadcrumb"] a {
  color: var(--link-color);
  text-decoration: none;
}
nav[aria-label="Breadcrumb"] li+li::before {
  content: "›";
  margin: 0 0.5rem;
  color: #888;
}

/* Table des matières */
#toc {
  background: #e8fbf7;
  border-left: 4px solid var(--secondary-color);
  padding: var(--base-spacing);
  margin-bottom: var(--base-spacing);
  border-radius: 4px;
}
#toc h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}
#toc ul {
  list-style: none;
}
#toc li {
  margin-bottom: 0.4rem;
}
#toc a {
  color: var(--link-color);
  text-decoration: none;
  font-size: 0.95rem;
}
#toc a:hover {
  text-decoration: underline;
}

/* Sections */
article section {
  margin-bottom: calc(var(--base-spacing) * 1.5);
}
article section h2 {
  font-family: var(--heading-font);
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--secondary-color);
  display: inline-block;
  padding-bottom: 0.2rem;
}

/* Paragraphes */
article p {
  margin-bottom: var(--base-spacing);
}

/* Liens */
a {
  color: var(--link-color);
  text-decoration: underline;
}
a:hover {
  color: var(--link-hover-color);
}

/* Images responsives */
img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: var(--base-spacing) 0;
}

/* Footer */
article footer {
  border-top: 1px solid #e0e0e0;
  padding-top: var(--base-spacing);
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}

/* Responsive: petites écrans */
@media (max-width: 600px) {
  article {
    padding: calc(var(--base-spacing) / 2);
  }
  article header h1 {
    font-size: 2rem;
  }
  #toc {
    font-size: 0.9rem;
  }
  nav[aria-label="Breadcrumb"] {
    font-size: 0.8rem;
  }
}
