/* =========================================================
   Styles spécifiques à la page "Histoire complète"
   ========================================================= */

/* --- Page intégrale : emplacements photo à remplir, marqueurs à vérifier --- */
/* Repère discret de page du livret */
.page-marker {
  text-align: center; text-transform: uppercase; letter-spacing: .14em;
  font-size: .72rem; font-weight: 700; color: var(--terracotta);
  margin: 48px 0 18px; opacity: .8;
}
.page-marker.missing { color: var(--ink-soft); font-style: italic; text-transform: none; letter-spacing: 0; }

/* Emplacement photo vide à remplir */
.photo-slot {
  border: 2px dashed var(--terracotta);
  background: repeating-linear-gradient(45deg, #faf4ec, #faf4ec 12px, #f3ebdd 12px, #f3ebdd 24px);
  border-radius: var(--radius);
  min-height: 220px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 24px; color: var(--ink-soft);
}
.photo-slot .photo-slot-icon { font-size: 2rem; }
.photo-slot .photo-slot-label { font-weight: 700; color: var(--terracotta-d); }
.photo-slot .photo-slot-caption { font-size: .92rem; font-style: italic; max-width: 36ch; }
.figure-todo { margin: 32px 0; }

/* Marqueur « à vérifier » bien visible (orthographe, mot illisible…) */
mark.todo {
  background: #fff1c2; color: #8a5a00;
  padding: 1px 5px; border-radius: 5px; font-weight: 600; font-size: .92em;
}

/* Tableau du livret (ex. répartition des classes) */
.livret-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .95rem; }
.livret-table th, .livret-table td { border: 1px solid rgba(43,41,38,.15); padding: 8px 12px; text-align: left; }
.livret-table th { background: var(--sand); font-family: var(--sans); }

/* Bandeau d'avertissement en haut de la page intégrale */
.draft-note {
  background: #fff8e6; border: 1px solid #f1d99a; border-radius: var(--radius);
  padding: 18px 22px; margin: 0 0 36px; font-size: .95rem; color: #6b5413;
}
.draft-note strong { color: #5a4610; }

.article-hero {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  padding: 70px 0 60px;
}
.article-hero .back-link { color: #ffd9bf; font-weight: 700; display: inline-block; margin-bottom: 24px; }
.article-hero .back-link:hover { color: #fff; }
.article-hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 14px; }
.article-sub { color: rgba(255,255,255,.9); font-size: 1.15rem; }

/* Barre de progression de lecture */
.read-progress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0;
  background: var(--terracotta); z-index: 60; transition: width .1s linear;
}

.article { padding: 70px 0 90px; }
.article-body { max-width: 760px; }

/* Sommaire */
.toc {
  background: var(--sand); border-radius: var(--radius);
  padding: 24px 28px; margin: 0 0 48px;
}
.toc-title {
  font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
  margin-bottom: 12px; color: var(--green-dark);
}
.toc ol { margin: 0; padding-left: 20px; columns: 2; }
.toc li { margin-bottom: 8px; color: var(--ink-soft); }
.toc a { font-weight: 600; }
.toc a:hover { color: var(--terracotta); }

.chapter { scroll-margin-top: 90px; }

/* Image large */
.figure-wide { margin: 44px 0; }
.figure-wide img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
  aspect-ratio: 16/9; object-fit: cover; background: var(--sand);
}

/* Grille de petites images (ex. les 4 étapes de fabrication des briques) */
.figure-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 40px 0; }
.figure-grid figure { margin: 0; }
.figure-grid img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 12px; box-shadow: var(--shadow); background: var(--sand);
}
.figure-grid figcaption { margin-top: 8px; font-size: .85rem; color: var(--ink-soft); text-align: center; font-style: italic; }

/* Image + texte côte à côte */
.figure-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  align-items: center; margin: 40px 0;
}
.figure-split-reverse .figure-split-media { order: 2; }
.figure-split-media img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
  aspect-ratio: 4/3; object-fit: cover; background: var(--sand);
}
.figure-split-reverse .low-ratio { order: 2; }
.low-ratio img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
  aspect-ratio: 4/2.5; object-fit: cover; background: var(--sand);
}
.figure-split-text p { margin-bottom: 14px; }
.article-body .lead {
  font-size: 1.3rem; line-height: 1.6; color: var(--ink);
  font-family: var(--serif); font-weight: 500;
  border-left: 4px solid var(--terracotta); padding-left: 22px; margin-bottom: 44px;
}
.article-body h2 {
  font-size: 1.8rem; margin: 48px 0 16px;
  padding-top: 8px;
}
.article-body p { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 20px; }
.article-body figure { margin: 40px 0; }
.article-body figure img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
  aspect-ratio: 16/9; object-fit: cover; background: var(--sand);
}
.article-body figcaption { margin-top: 12px; font-size: .9rem; color: var(--ink-soft); text-align: center; font-style: italic; }
.article-body blockquote {
  margin: 44px 0; padding: 28px 32px;
  background: var(--sand); border-radius: var(--radius);
  font-family: var(--serif); font-size: 1.35rem; font-style: italic; color: var(--green-dark);
  border-left: 4px solid var(--terracotta);
}
.article-body blockquote cite {
  display: block; margin-top: 14px; font-size: .95rem; font-style: normal;
  font-family: var(--sans); font-weight: 700; color: var(--ink-soft);
}

.article-cta {
  margin-top: 60px; padding: 40px; text-align: center;
  background: var(--sand); border-radius: var(--radius);
}
.article-cta h3 { font-size: 1.6rem; margin-bottom: 10px; }
.article-cta p { color: var(--ink-soft); margin-bottom: 24px; }

.article-cta1 {
  padding: 40px; text-align: center; margin-bottom: 40px;
  background: var(--sand); border-radius: var(--radius);
}
.article-cta1 h3 { font-size: 1.6rem; margin-bottom: 10px; }
.article-cta1 p { color: var(--ink-soft); margin-bottom: 24px; }

@media (max-width: 680px) {
  .article-body .lead { font-size: 1.12rem; }
  .article-body h2 { font-size: 1.5rem; }
  .toc ol { columns: 1; }
  .figure-split { grid-template-columns: 1fr; gap: 20px; }
  .figure-split-reverse .figure-split-media { order: 0; }
  .article-body blockquote { font-size: 1.15rem; padding: 22px 24px; }
}
