/* =========================================================
   ARTICLE V2 — Template d'article enrichi
   ========================================================= */

/* --- Conteneur --- */
.av2 {
  max-width: 1500px;
  margin: 0 auto;
}

.av2.v2-card-wrap {
  padding: 0;
  overflow: hidden;
}

body.page-article main#body-inner {
  max-width: 1500px !important;
}

/* Forcer la largeur pour les articles avec sidebar */
main#body-inner:has(.av2) {
  max-width: 1500px !important;
  padding-inline: 1.5rem !important;
}

body.page-article #body-wrapper .container {
  max-width: 1400px !important;
}

/* ---------------------------------------------------------
   FIL D'ARIANE
   --------------------------------------------------------- */

.av2-breadcrumb {
  padding: 1rem 2.2rem 0;
  font-size: 0.82rem;
  color: #999;
}

.av2-breadcrumb a {
  color: #888;
  text-decoration: none;
  font-weight: 400;
}

.av2-breadcrumb a:hover {
  color: var(--color-accent, #506c91);
  text-decoration: underline;
}

.av2-breadcrumb__sep {
  margin: 0 0.35rem;
  color: #ccc;
}

.av2-breadcrumb__current {
  color: #666;
  font-weight: 500;
}


/* ---------------------------------------------------------
   HERO D'ARTICLE
   --------------------------------------------------------- */

.av2-hero {
  position: relative;
  padding: 1.8rem 2.2rem 1.6rem;
  background: #f5f2ea;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.av2-hero__bg {
  position: absolute;
  inset: 0;
  right: -15%;
  background-position: center right;
  background-size: cover;
  opacity: 0.18;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.av2-hero__inner {
  position: relative;
  z-index: 1;
}

.av2-hero__top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.av2-hero__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.av2-hero__date {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b6a4a;
  margin-bottom: 0.15rem;
}

.av2-hero__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--color-accent, #506c91);
  margin: 0;
  line-height: 1.15;
}

.av2-hero__subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: #8b6a4a;
  margin: 0.2rem 0 0;
}

.av2-hero__lead {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin: 0 0 0.8rem;
}

/* Tags dans le hero */
.av2-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.av2-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.12s;
}

.av2-tag:hover { opacity: 0.8; }

.av2-tag--period {
  background: rgba(80, 108, 145, 0.12);
  color: #2f4261;
  border: 1px solid rgba(80, 108, 145, 0.25);
}

.av2-tag--theme {
  background: rgba(139, 106, 74, 0.10);
  color: #5b3e27;
  border: 1px solid rgba(139, 106, 74, 0.25);
}

.av2-tag--place {
  background: rgba(110, 139, 106, 0.10);
  color: #325c3f;
  border: 1px solid rgba(110, 139, 106, 0.25);
}


/* ---------------------------------------------------------
   LAYOUT 2 COLONNES
   --------------------------------------------------------- */

.av2-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2rem;
  padding: 2rem 2.2rem 2.5rem;
  align-items: start;
}


/* --- Contenu principal --- */
.av2-content {
  min-width: 0;
}


/* --- Sidebar --- */
.av2-sidebar {
  position: sticky;
  top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.av2-sidebar__block {
  padding: 1rem 1.1rem;
  background: #f9f7f2;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.av2-sidebar__title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b6a4a;
  margin: 0 0 0.6rem;
}

.av2-sidebar__item {
  margin-bottom: 0.7rem;
}

.av2-sidebar__item:last-child {
  margin-bottom: 0;
}

.av2-sidebar__label {
  display: block;
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 0.2rem;
}

.av2-sidebar__value {
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
}

.av2-sidebar__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* Mini-tags dans la sidebar */
.av2-mini-tag {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.12s;
}

.av2-mini-tag:hover { opacity: 0.75; }

.av2-mini-tag--period {
  background: rgba(80, 108, 145, 0.12);
  color: #2f4261;
}

.av2-mini-tag--theme {
  background: rgba(139, 106, 74, 0.10);
  color: #5b3e27;
}

.av2-mini-tag--place {
  background: rgba(110, 139, 106, 0.10);
  color: #325c3f;
}

/* Lien retour */
.av2-sidebar__back {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent, #506c91);
  text-decoration: none;
}

.av2-sidebar__back:hover {
  text-decoration: underline;
}


/* ---------------------------------------------------------
   TABLE DES MATIÈRES (sidebar)
   --------------------------------------------------------- */

.av2-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.av2-toc__list li {
  margin-bottom: 0.2rem;
}

.av2-toc__list li a {
  display: block;
  padding: 0.2rem 0;
  font-size: 0.8rem;
  color: #555;
  text-decoration: none;
  line-height: 1.35;
  border-left: 2px solid transparent;
  padding-left: 0.6rem;
  transition: color 0.12s, border-color 0.12s;
}

.av2-toc__list li a:hover {
  color: var(--color-accent, #506c91);
  border-left-color: var(--color-accent, #506c91);
}

.av2-toc__sub a {
  padding-left: 1.2rem;
  font-size: 0.76rem;
  color: #888;
}


/* ---------------------------------------------------------
   ARTICLES CONNEXES
   --------------------------------------------------------- */

.av2-related {
  padding: 2rem 2.2rem 2.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.av2-related__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent-warm, #8b6a4a);
  margin: 0 0 1rem;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 900px) {
  .av2-layout {
    grid-template-columns: 1fr;
    padding: 1.5rem 1.3rem 2rem;
  }

  .av2-sidebar {
    position: static;
    order: -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .av2-sidebar__block {
    flex: 1 1 200px;
  }

  /* Cacher la TOC sur mobile (pas assez de place) */
  .av2-toc {
    display: none;
  }

  .av2-hero {
    padding: 1.4rem 1.3rem;
  }

  .av2-hero__title {
    font-size: 1.7rem;
  }

  .av2-breadcrumb {
    padding: 0.8rem 1.3rem 0;
  }

  .av2-related {
    padding: 1.5rem 1.3rem 2rem;
  }
}

@media (max-width: 600px) {
  .av2-hero__top {
    flex-direction: column;
    gap: 0.5rem;
  }

  .av2-sidebar {
    flex-direction: column;
  }
}

/* Forcer le fond blanc sur l'article */
.av2.v2-card-wrap {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  padding: 0;
  overflow: hidden;
}

/* Grille des articles connexes — forcer la mise en forme */
.av2-related .v2-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.8rem;
}

.av2-related .v2-article-card {
  background: #f9f7f2;
}