/* ——— Frise des ères — Timeline ——— */
/* Architecture : ligne à gauche, date à gauche, carte toujours à droite */

.ere-frise {
  position: relative;
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px 0 0;
}

/* Ligne verticale — positionnée à 220px du bord gauche */
.ere-ligne {
  position: absolute;
  left: 220px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, transparent, #B52240 3%, #B52240 97%, transparent);
}

/* Chaque ère */
.ere-item {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  min-height: 60px;
}

.ere-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Zone date — à gauche de la ligne */
.ere-date-zone {
  width: 200px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 20px;
  padding-top: 18px;
}

.ere-date {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  color: rgba(240,237,232,0.7);
  background: rgba(20,20,18,0.6);
  padding: 4px 10px;
  border-radius: 3px;
  border: 0.5px solid rgba(181,34,64,0.4);
  white-space: nowrap;
}

/* Noeud sur la ligne */
.ere-noeud {
  position: absolute;
  left: 220px;
  top: 14px;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 0 0 3px #141412, 0 0 0 5px #B52240;
  flex-shrink: 0;
}

.ere-noeud span {
  font-size: 20px;
  color: #F0EDE8;
  line-height: 40px;
  width: 40px;
  height: 40px;
  display: block;
  text-align: center;
}

/* Carte — toujours à droite */
.ere-carte {
  flex: 1;
  margin-left: 60px;
  background: #F0EDE8;
  border: 2px solid #B52240;
  border-radius: 8px;
  overflow: visible;
  position: relative;
  max-width: 680px;
}

/* Triangle pointant vers la gauche (vers le noeud) */
.ere-carte::after {
  content: '';
  position: absolute;
  top: 24px;
  left: -12px;
  border-width: 10px 12px 10px 0;
  border-style: solid;
  border-color: transparent #B52240 transparent transparent;
}

/* Image */
.ere-img {
  position: relative;
  width: 100%;
  padding-top: 50%;
  background-size: cover;
  background-position: center;
  border-radius: 6px 6px 0 0;
}

/* Corps texte */
.ere-corps {
  padding: 20px 24px 24px;
  background: #F0EDE8;
  border-radius: 0 0 6px 6px;
}

/* Titre rouge */
.ere-titre {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: #B52240;
  font-weight: 400;
  margin: 0 0 6px;
  line-height: 1.2;
}

/* Sous-titre */
.ere-soustitre {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: #2C2C2A;
  font-weight: 400;
  margin: 0 0 12px;
  letter-spacing: .02em;
}

/* Texte */
.ere-texte {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: rgba(44,44,42,0.75);
  line-height: 1.8;
  margin: 0 0 18px;
}

/* Bouton */
.ere-btn {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 18px;
  border: 1.5px solid #B52240;
  color: #B52240;
  border-radius: 3px;
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.ere-btn:hover {
  background: #B52240 !important;
  color: #F0EDE8 !important;
  border-color: #B52240;
  text-decoration: none;
}

/* ——— MOBILE ——— */
@media (max-width: 680px) {

  .ere-frise { padding: 0 16px; }

  /* Ligne à gauche */
  .ere-ligne { left: 20px; }

  .ere-item {
    flex-direction: column;
    padding-left: 52px;
  }

  /* Date au-dessus */
  .ere-date-zone {
    width: 100%;
    text-align: left;
    padding-right: 0;
    padding-left: 0;
    padding-top: 0;
    margin-bottom: 8px;
  }

  /* Noeud sur la ligne */
  .ere-noeud {
    left: 20px;
    top: 0;
    transform: translateX(-50%);
  }

  /* Carte pleine largeur */
  .ere-carte {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

  /* Triangle vers le haut en mobile */
  .ere-carte::after {
    top: -12px;
    left: 20px;
    right: auto;
    border-width: 0 10px 12px 10px;
    border-color: transparent transparent #B52240 transparent;
  }
}
