/* =========================================================
   SECTIONS V2 — CSS unifié
   Pages index (périodes, thèmes, lieux) +
   Pages individuelles (period, theme, place) +
   Grille de cartes d'articles (partial)
   ========================================================= */


/* ---------------------------------------------------------
   A. INDEX : HEADER COMMUN
   --------------------------------------------------------- */

.v2-index {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 0 3rem;
}

/* Fond blanc englobant — rétablit la "carte" blanche */
.v2-card-wrap {
  background: #ffffff;
  border-radius: 14px;
  padding: 2rem 2.2rem 2.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

/* Quand v2-card-wrap est dans v2-index, pas de double padding */
.v2-index > .v2-card-wrap {
  padding: 2rem 2.2rem 2.5rem;
}

/* Les pages individuelles avec v2-card-wrap */
.v2-single.v2-card-wrap {
  padding: 0;
  overflow: hidden;
}

.v2-single.v2-card-wrap .v2-single__content,
.v2-single.v2-card-wrap .v2-single__section {
  padding-left: 2.2rem;
  padding-right: 2.2rem;
}

.v2-index__header {
  margin-bottom: 2rem;
}

.v2-index__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b6a4a;
  margin-bottom: 0.3rem;
}

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

.v2-index__intro {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  max-width: 40rem;
}

.v2-index__intro p { margin-bottom: 0.5rem; }


/* ---------------------------------------------------------
   B. PERIODS INDEX — Frise verticale
   --------------------------------------------------------- */

.v2-periods-frise {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  position: relative;
  padding-left: 2.2rem;
}

/* Axe vertical */
.v2-periods-frise::before {
  content: "";
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 0.7rem;
  width: 3px;
  background: rgba(80, 108, 145, 0.3);
  border-radius: 2px;
}

/* Carte de période */
.v2-period-card {
  position: relative;
  display: block;
  padding: 1.2rem 1.4rem;
  background: var(--period-bg, #ffffff);
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.v2-period-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  border-color: rgba(80, 108, 145, 0.25);
}

/* Point sur l'axe */
.v2-period-card::before {
  content: "";
  position: absolute;
  left: -1.85rem;
  top: 1.2rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--color-accent, #506c91);
  background: #fff;
}

/* Image de fond */
.v2-period-card__bg {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 55%;
  background-size: cover;
  background-position: center right;
  opacity: 0.2;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.v2-period-card__inner { position: relative; z-index: 1; }

.v2-period-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.v2-period-card__icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
}

.v2-period-card__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b6a4a;
  margin-bottom: 0.1rem;
}

.v2-period-card__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #2f3f5c;
  margin: 0;
  line-height: 1.25;
}

.v2-period-card:hover .v2-period-card__title {
  color: var(--color-accent, #506c91);
}

.v2-period-card__desc {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin: 0 0 0.6rem;
}

.v2-period-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.82rem;
}

.v2-period-card__count {
  color: #999;
}

.v2-period-card__count.has-articles {
  color: var(--color-accent, #506c91);
  font-weight: 600;
}

.v2-period-card__cta {
  font-weight: 600;
  color: var(--color-accent, #506c91);
}

/* Couleurs par thème de période */
.v2-period-card--geologie       { --period-bg: #dce4f0; border-left: 4px solid #506c91; }
.v2-period-card--prehistoire    { --period-bg: #eee5d2; border-left: 4px solid #c18a4a; }
.v2-period-card--protohistoire  { --period-bg: #eeddd4; border-left: 4px solid #b36239; }
.v2-period-card--antiquite      { --period-bg: #dde3f2; border-left: 4px solid #8a6b3a; }
.v2-period-card--moyenage       { --period-bg: #e3dced; border-left: 4px solid #3f5b83; }
.v2-period-card--modernes       { --period-bg: #edddd8; border-left: 4px solid #7a5b3e; }
.v2-period-card--contemporaine  { --period-bg: #ddeade; border-left: 4px solid #5c8455; }


/* ---------------------------------------------------------
   C. THEMES INDEX — Grille de cartes
   --------------------------------------------------------- */

.v2-themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.8rem;
}

.v2-theme-card {
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.4rem;
  background: #f9f7f2;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.v2-theme-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  border-color: rgba(80, 108, 145, 0.25);
}

.v2-theme-card__head {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}

.v2-theme-card__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.v2-theme-card__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2f3f5c;
  margin: 0;
  line-height: 1.25;
}

.v2-theme-card:hover .v2-theme-card__title {
  color: var(--color-accent, #506c91);
}

.v2-theme-card__desc {
  font-size: 0.88rem;
  color: #777;
  line-height: 1.45;
  margin: 0.15rem 0 0;
}

.v2-theme-card__articles {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #555;
}

.v2-theme-card__articles li {
  padding: 0.2rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
  line-height: 1.4;
}

.v2-theme-card__articles li:last-child { border-bottom: none; }

.v2-theme-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.82rem;
}

.v2-theme-card__count { color: #999; }
.v2-theme-card__count.has-articles { color: var(--color-accent, #506c91); font-weight: 600; }
.v2-theme-card__cta { font-weight: 600; color: var(--color-accent, #506c91); }


/* ---------------------------------------------------------
   D. PLACES INDEX — Layout carte + cartes
   --------------------------------------------------------- */

.v2-places-layout {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .v2-places-layout { grid-template-columns: 1fr; }
}

/* Carte */
.v2-places-map { position: sticky; top: 5rem; }

.v2-places-map__frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.v2-places-map__img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.v2-places-map__hotspots { position: absolute; inset: 0; }

.v2-places-map__hotspot {
  position: absolute;
  left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  background: transparent;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.v2-places-map__hotspot:hover,
.v2-places-map__hotspot.is-active {
  background: rgba(80, 108, 145, 0.15);
  border-color: rgba(80, 108, 145, 0.5);
}

.v2-places-map__hotspot.is-debug {
  background: rgba(255, 0, 0, 0.1);
  outline: 2px dashed rgba(255, 0, 0, 0.7);
}

.v2-places-map__debug-label {
  position: absolute;
  left: 4px; top: 4px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  padding: 1px 5px;
  font-size: 11px;
}

.v2-places-map__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

/* Cartes de lieux */
.v2-places-cards {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.v2-place-card {
  display: block;
  padding: 1.1rem 1.3rem;
  background: #f9f7f2;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.v2-place-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  border-color: rgba(80, 108, 145, 0.25);
}

.v2-place-card__head {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.v2-place-card__icon { font-size: 1.3rem; flex-shrink: 0; }

.v2-place-card__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #2f3f5c;
  margin: 0;
  line-height: 1.25;
}

.v2-place-card:hover .v2-place-card__title { color: var(--color-accent, #506c91); }

.v2-place-card__desc {
  font-size: 0.88rem;
  color: #777;
  line-height: 1.4;
  margin: 0.15rem 0 0;
}

.v2-place-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.82rem;
}

.v2-place-card__count { color: #999; }
.v2-place-card__count.has-articles { color: var(--color-accent, #506c91); font-weight: 600; }
.v2-place-card__cta { font-weight: 600; color: var(--color-accent, #506c91); }


/* ---------------------------------------------------------
   E. PAGE INDIVIDUELLE (period, theme, place) — Hero
   --------------------------------------------------------- */

.v2-single {
  max-width: 1060px;
  margin: 0 auto;
}

.v2-single__hero {
  position: relative;
  padding: 2rem 2.2rem 1.8rem;
  border-radius: 16px 16px 0 0;
  background: var(--period-bg, #f5f2ea);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.v2-single__hero--theme { background: #f0edf8; }
.v2-single__hero--place { background: #edf5f0; }

.v2-single__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;
}

.v2-single__hero-inner { position: relative; z-index: 1; }

.v2-single__hero-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.v2-single__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;
}

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

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

.v2-single__meta {
  display: block;
  font-size: 0.9rem;
  color: #665c55;
  margin-top: 0.2rem;
}

.v2-single__lead {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

.v2-single__zones,
.v2-single__related {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
  align-items: center;
}

/* Content + sections */
.v2-single__content {
  padding: 2rem 2.2rem;
}

.v2-single__section {
  padding: 0 2.2rem 2rem;
}

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


/* ---------------------------------------------------------
   F. SOUS-PÉRIODES
   --------------------------------------------------------- */

.v2-subperiods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.v2-subperiod-card {
  padding: 1rem 1.2rem;
  background: #f9f7f2;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s, border-color 0.12s;
}

.v2-subperiod-card:hover {
  transform: translateY(-2px);
  border-color: rgba(80, 108, 145, 0.3);
}

.v2-subperiod-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2f3f5c;
  margin: 0 0 0.2rem;
}

.v2-subperiod-card__meta {
  font-size: 0.8rem;
  color: #8b6a4a;
  display: block;
  margin-bottom: 0.3rem;
}

.v2-subperiod-card p {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.45;
  margin: 0;
}


/* ---------------------------------------------------------
   G. GRILLE DE CARTES D'ARTICLES (partial)
   --------------------------------------------------------- */

.v2-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.8rem;
}

.v2-article-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.v2-article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  border-color: rgba(80, 108, 145, 0.25);
}

.v2-article-card__img {
  height: 140px;
  overflow: hidden;
  background: #f0ede5;
}

.v2-article-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}

.v2-article-card__body {
  padding: 1rem 1.2rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.v2-article-card__year {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b6a4a;
}

.v2-article-card__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2f3f5c;
  margin: 0;
  line-height: 1.25;
}

.v2-article-card:hover .v2-article-card__title {
  color: var(--color-accent, #506c91);
}

.v2-article-card__sub {
  font-size: 0.85rem;
  color: #777;
  line-height: 1.4;
  margin: 0.1rem 0 0;
}

.v2-article-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.4rem;
}


/* ---------------------------------------------------------
   H. BADGES & PILULES (réutilisables)
   --------------------------------------------------------- */

.v2-badge {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.v2-badge--period { background: rgba(80, 108, 145, 0.10); color: #3a547a; }
.v2-badge--theme  { background: rgba(139, 106, 74, 0.10); color: #7a4c24; }
.v2-badge--place  { background: rgba(110, 139, 106, 0.10); color: #3e5036; }

.v2-badge--zone-plateau { background: rgba(110, 139, 106, 0.12); color: #445a3f; border: 1px solid rgba(110, 139, 106, 0.3); }
.v2-badge--zone-vallee  { background: rgba(80, 108, 145, 0.10); color: #2e4666; border: 1px solid rgba(80, 108, 145, 0.3); }
.v2-badge--zone-village { background: rgba(139, 106, 74, 0.10); color: #5b3e27; border: 1px solid rgba(139, 106, 74, 0.3); }

/* Pilules de filtre */
.v2-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 500;
  color: #4b4b4b;
  cursor: pointer;
  transition: all 0.12s ease;
  font-family: inherit;
}

.v2-pill:hover {
  border-color: rgba(0, 0, 0, 0.18);
  background: #f5f2ea;
}

.v2-pill.is-active {
  background: #e7f4ec;
  border-color: rgba(110, 139, 106, 0.4);
  color: #325c3f;
  box-shadow: 0 2px 8px rgba(110, 139, 106, 0.15);
}


/* ---------------------------------------------------------
   I. UTILITAIRES
   --------------------------------------------------------- */

.v2-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #999;
  font-size: 0.95rem;
}

.v2-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
}

.v2-highlights li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
  font-size: 0.95rem;
  line-height: 1.5;
}

.v2-highlights li:last-child { border-bottom: none; }


/* ---------------------------------------------------------
   J. RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 768px) {
  .v2-index { padding-inline: 1rem; }

  .v2-card-wrap {
    padding: 1.4rem 1.2rem 1.8rem;
    border-radius: 10px;
  }

  .v2-index__title { font-size: 1.8rem; }

  .v2-periods-frise { padding-left: 1.8rem; }
  .v2-period-card::before { left: -1.5rem; }

  .v2-single__hero { padding: 1.5rem 1.3rem; }
  .v2-single__content,
  .v2-single__section { padding-inline: 1.3rem; }
  .v2-single__title { font-size: 1.7rem; }

  .v2-articles-grid { grid-template-columns: 1fr; }
  .v2-themes-grid { grid-template-columns: 1fr; }
}

/* Teinter légèrement les cartes pour les détacher du fond blanc */
.v2-theme-card,
.v2-place-card,
.v2-article-card,
.v2-subperiod-card {
  background: #f9f7f2;
}