/* =========================================================
   Chantier 2 – Largeur & Typographie
   Fichier additionnel : à charger APRÈS custom.css
   ========================================================= */

/* ---------------------------------------------------------
   A. LARGEUR DU CONTENU
   Le main passe de 1000px à 1060px pour les articles.
   La page-card (wrapper d'article) suit.
   La home garde sa largeur élargie existante (1500px).
   --------------------------------------------------------- */

/* Contenu principal : un peu plus large */
main#body-inner {
  max-width: 1060px;
  padding: 2rem 2rem;
}

/* Le container Quark : centré avec du padding symétrique */
#body-wrapper .container {
  padding: 0 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* En-tête d'article : profiter de la largeur */
.article-header-card {
  max-width: 960px;
}

/* Page-card (articles génériques, plan du site, etc.) */
.page-card {
  padding: 2.2rem 2.4rem 2.5rem;
}

/* Pages période : un peu plus large aussi */
.period-page {
  max-width: 1060px;
  margin: 0 auto;
}

/* ---------------------------------------------------------
   B. TYPOGRAPHIE
   Hiérarchie plus claire, meilleur rythme vertical.
   On garde Inter pour le corps et on utilise 
   Cormorant Garamond (déjà chargée) pour les gros titres.
   --------------------------------------------------------- */

/* Corps de texte : légèrement plus grand, meilleur interligne */
body {
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.008em;
}

/* Titres : Cormorant Garamond pour un rendu éditorial */
h1 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 0.6rem;
  letter-spacing: 0.01em;
}

h2 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2.5rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.01em;
}

h3 {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--color-accent);
}

h4 {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  color: var(--color-text-main);
}

/* Titre d'article (dans la header card) */
.article-title {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

/* Sous-titre d'article */
.article-subtitle {
  font-size: 1.1rem;
  line-height: 1.45;
}

/* Chapeau d'article */
.article-chapeau {
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ---------------------------------------------------------
   C. RYTHME VERTICAL & ESPACEMENT
   Plus d'air entre les sections.
   --------------------------------------------------------- */

/* Paragraphes */
p {
  margin: 0 0 1.1rem;
}

/* Séparateurs dans les articles */
.article-content hr,
.page-content hr,
main#body-inner hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 2.5rem 0;
}

/* Images dans le contenu : un peu plus d'espace */
.article-content img,
.page-content img {
  margin: 1.8rem auto;
}

/* Légendes sous les images : plus lisible */
.article-content figcaption,
.page-content figcaption,
.figure + em,
img + em {
  font-size: 0.85rem;
  color: #777;
  line-height: 1.45;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Encarts : un poil plus d'espace */
.encart {
  margin: 2.2rem 0;
  padding: 1.4rem 1.6rem;
}

/* Blockquotes */
blockquote {
  margin: 1.8rem 0;
  padding: 1.2rem 1.5rem;
  font-size: 1.02rem;
  line-height: 1.7;
}

/* Listes dans les articles */
.article-content ul,
.article-content ol,
.page-content ul,
.page-content ol {
  margin-bottom: 1.2rem;
  padding-left: 1.6rem;
}

.article-content li,
.page-content li {
  margin-bottom: 0.35rem;
  line-height: 1.65;
}

/* ---------------------------------------------------------
   D. AMÉLIORATIONS VISUELLES MINEURES
   --------------------------------------------------------- */

/* Sources / bibliographie en fin d'article : plus discret */
.article-content h2:last-of-type ~ p,
.article-content .sources p {
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Tableaux : meilleur espacement */
.article-content table th,
.article-content table td {
  padding: 0.65rem 0.85rem;
}

/* ---------------------------------------------------------
   E. RESPONSIVE — Ajustements mobile
   --------------------------------------------------------- */

@media (max-width: 768px) {
  main#body-inner {
    padding: 1.2rem 1rem;
  }

  #body-wrapper .container {
    padding: 0 1rem;
  }

  body {
    font-size: 16px;
    line-height: 1.7;
  }

  h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.4rem;
    margin-top: 2rem;
  }

  .article-title {
    font-size: 1.9rem;
  }

  .article-header-card {
    max-width: 100%;
    padding: 1.4rem 1.3rem;
  }

  .page-card {
    padding: 1.4rem 1.2rem 1.6rem;
  }
}
