/* =========================================================
   HOME V2 – Redesign page d'accueil
   ========================================================= */

/* --- Reset de la home pour le nouveau design --- */

.home.hv2 {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

/* Titre de section récurrent */
.hv2-section-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--color-accent, #506c91);
  margin: 0 0 1rem;
  line-height: 1.25;
}


/* =========================================================
   SECTION 1 – HERO (bandeau photo + texte)
   ========================================================= */

.hv2-hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-start;
  background-position: center 40%;
  background-size: cover;
  background-repeat: no-repeat;
}

.hv2-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30, 42, 66, 0.6) 0%,
    rgba(30, 42, 66, 0.2) 40%,
    transparent 70%
  );
}

.hv2-hero__inner {
  position: relative;
  z-index: 1;
  padding: 2rem 2.5rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hv2-hero__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.5rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.hv2-hero__subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #d0d8e8;
  max-width: 36rem;
  margin: 0 0 1.2rem;
}

.hv2-hero__stats {
  display: flex;
  gap: 2rem;
}

.hv2-hero__stat {
  font-size: 0.82rem;
  color: #f6f8fa;
}

.hv2-hero__stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f0f0f0;
  line-height: 1.2;
}


/* =========================================================
   SECTION 2 – PAR OÙ COMMENCER
   ========================================================= */

.hv2-start {
  margin: 2.5rem 0 2rem;
}

.hv2-start__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.hv2-start__card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.2rem 1.3rem;
  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);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.hv2-start__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  border-color: rgba(80, 108, 145, 0.3);
}

.hv2-start__icon {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.hv2-start__label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-accent, #506c91);
}

.hv2-start__desc {
  font-size: 0.88rem;
  color: #777;
  line-height: 1.45;
}


/* =========================================================
   SECTION 3 – À LA UNE (articles phares)
   ========================================================= */

.hv2-featured {
  margin: 0 0 2.5rem;
}

.hv2-featured__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.hv2-featured__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;
}

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

/* Image de couverture */
.hv2-featured__img {
  height: 140px;
  overflow: hidden;
  background: #f0ede5;
}

.hv2-featured__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}

/* Corps de la carte */
.hv2-featured__body {
  padding: 1rem 1.2rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

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

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

.hv2-featured__card:hover .hv2-featured__title {
  color: var(--color-accent, #506c91);
}

.hv2-featured__sub {
  font-size: 0.85rem;
  color: #777;
  line-height: 1.4;
  margin: 0.15rem 0 0;
}

/* Badges */
.hv2-featured__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.hv2-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hv2-badge--period {
  background: rgba(80, 108, 145, 0.10);
  color: #3a547a;
}

.hv2-badge--theme {
  background: rgba(139, 106, 74, 0.10);
  color: #7a4c24;
}

.hv2-badge--place {
  background: rgba(110, 139, 106, 0.10);
  color: #3e5036;
}


/* =========================================================
   SECTION 4 – FRISE COMPACTE DES PÉRIODES
   ========================================================= */

.hv2-timeline {
  margin: 0 0 2.5rem;
}

.hv2-timeline__row {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.hv2-timeline__chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 130px;
  max-width: 170px;
  padding: 0.85rem 1rem;
  background: #ffffff;
  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 ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.hv2-timeline__chip:hover {
  transform: translateY(-2px);
  border-color: rgba(80, 108, 145, 0.3);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

/* Accent bleu pour les périodes avec articles */
.hv2-timeline__chip--has-art {
  border-left: 3px solid var(--color-accent, #506c91);
}

.hv2-timeline__icon {
  font-size: 1.2rem;
}

.hv2-timeline__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #2f3f5c;
  line-height: 1.25;
}

.hv2-timeline__count {
  font-size: 0.78rem;
  color: #999;
}

.hv2-timeline__chip--has-art .hv2-timeline__count {
  color: var(--color-accent, #506c91);
  font-weight: 500;
}


/* =========================================================
   SECTION 5 – LES LIEUX
   ========================================================= */

.hv2-places {
  margin: 0 0 2rem;
}

.hv2-places__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hv2-places__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  background: #ffffff;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.hv2-places__pill:hover {
  transform: translateY(-1px);
  border-color: rgba(80, 108, 145, 0.3);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.07);
}

.hv2-places__icon {
  font-size: 1rem;
}


/* =========================================================
   CTA FINAL
   ========================================================= */

.hv2-cta {
  text-align: center;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.hv2-cta a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent, #506c91);
  text-decoration: none;
}

.hv2-cta a:hover {
  text-decoration: underline;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {

  .home.hv2 {
    padding: 0 1rem 2rem;
  }

  .hv2-hero {
    min-height: 300px;
  }

  .hv2-hero__inner {
    padding: 2rem 1.5rem 2rem;
  }

  .hv2-hero__title {
    font-size: 1.8rem;
  }

  .hv2-hero__subtitle {
    font-size: 0.95rem;
  }

  .hv2-hero__stats {
    gap: 1.2rem;
  }

  .hv2-hero__stat strong {
    font-size: 1.2rem;
  }

  /* "Par où commencer" en colonne */
  .hv2-start__grid {
    grid-template-columns: 1fr;
  }

  /* Articles à la une en colonne */
  .hv2-featured__grid {
    grid-template-columns: 1fr;
  }

  .hv2-featured__img {
    height: 120px;
  }

  /* Frise : déjà scrollable, ok */

  /* Lieux : wrap naturellement */
}

@media (max-width: 480px) {
  .hv2-hero {
    min-height: 260px;
  }

  .hv2-hero__stats {
    flex-wrap: wrap;
    gap: 0.8rem 1.5rem;
  }

  .hv2-section-title {
    font-size: 1.4rem;
  }
}

/* Chips de périodes avec image de fond */
.hv2-timeline__chip {
  position: relative;
  overflow: hidden;
}

.hv2-timeline__chip-bg {
  position: absolute;
  inset: 0;
  background: var(--chip-bg) center / cover no-repeat;
  opacity: 0.15;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.hv2-timeline__chip .hv2-timeline__icon,
.hv2-timeline__chip .hv2-timeline__name,
.hv2-timeline__chip .hv2-timeline__count {
  position: relative;
  z-index: 1;
}

/* Couleurs de fond par période */
.hv2-timeline__chip--geologie       { background: #dce4f0; }
.hv2-timeline__chip--prehistoire    { background: #eee5d2; }
.hv2-timeline__chip--protohistoire  { background: #eeddd4; }
.hv2-timeline__chip--antiquite      { background: #dde3f2; }
.hv2-timeline__chip--moyenage       { background: #e3dced; }
.hv2-timeline__chip--modernes       { background: #edddd8; }
.hv2-timeline__chip--contemporaine  { background: #ddeade; }