/* --------------------------------------------------------------------
   VARIABLES – reprenez les vôtres si vous avez déjà un :root
   -------------------------------------------------------------------- */
:root{
  --accent-color: #c69c6d;     /* beige / sépia pour rappeler les vieux papiers */
  --card-radius: 12px;
  --tl-accent  : var(--theme-primary);   /* flèche + point + bordure */
  --tl-bg      : var(--theme-secondary); /* fond cartes & header */
  --tl-bg-dark : color-mix(in srgb, var(--tl-bg) 80%, #000 20%);
  --tl-text    : var(--theme-text);
  --tl-radius  : 12px;
}

/* --------------------------------------------------------------------
   SECTION & HEADER
   -------------------------------------------------------------------- */
.history-home{
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.history-header{
  text-align: center;
  margin-bottom: 2rem;
}

.history-header input[type="search"]{
  width: 100%;
  max-width: 420px;
  padding: .65rem 1.2rem;
  border: 2px solid var(--accent-color);
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: background .2s;
}

.history-header input[type="search"]:focus{
  background: #f9f4ee;
}

/* ─── Filtres prédéfinis ──────────────────────────────────── */
.preset-filters{
  margin-top: .8rem; display: flex; flex-wrap: wrap;
  justify-content: center; gap: .5rem;
}
.preset-btn{
  --bg: var(--tl-bg); --fg: var(--tl-accent);
  border: 2px solid var(--tl-accent); border-radius: 10px;
  padding: .35rem .9rem; font-size: .85rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--bg); color: var(--fg);
  transition: background .25s, color .25s;
}
.preset-btn:hover,
.preset-btn:focus{ --bg: var(--tl-accent); --fg: #fff; }




/* --------------------------------------------------------------------
   TIMELINE
   -------------------------------------------------------------------- */
.timeline{
  position: relative;
  list-style: none;
  padding-left: 0.1rem;          /* laisse la place au trait vertical */
  border-left: 4px solid var(--theme-primary);
}

.timeline-item{
  position: relative;
  margin-bottom: 3rem;
  display: flex;
  align-items: flex-start;
  color: var(--theme-text);
  padding-left: 0.5rem;          /* laisse la place au trait vertical */
}

.timeline-point{
  position: absolute;
  left: -1.15rem;                /* centre le point sur le trait */
  top: 0;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--theme-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 0 0 2px var(--theme-primary);    /* anneau blanc autour du point */
}

.timeline-content{
  background: var(--theme-tertiary);
  border: 1px solid var(--theme-secondary);
  border-radius: var(--card-radius);
  padding: 1rem 1.25rem;
  flex: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,.07);
}

.timeline-content h3{
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--theme-text-titre);
}

/* --------------------------------------------------------------------
  CONTENU CARTE
  -------------------------------------------------------------------- */
.timeline-content h3 {
   margin-top: 0;
   font-size: 1.25rem;
   color: var(--tl-text);
}

.timeline-date {
   font-weight: 600;
   margin: .4rem 0 .6rem;
   color: var(--tl-accent);
   display: block;
}


/* --------------------------------------------------------------------
   BOUTONS
   -------------------------------------------------------------------- */
.actions{
  margin-top: .8rem;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}

.btn{
  --bg: transparent;
  --fg: var(--accent-color);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: 6px;
  font-size: .9rem;
  border: 2px solid var(--theme-secondary);
  background: var(--theme-primary);
  color: var(--theme-button-primary-text);
  text-decoration: none;
  cursor: pointer;
  transition: background .25s, color .25s;
  width: calc(27.00% - .5rem); /* Changed to take up 1/3 of space minus gap */
  justify-content: center;
  min-width: 100px; /* Added to prevent buttons from getting too small */
}

.btn:hover{
  background: var(--theme-secondary);
  border: 2px solid var(--theme-secondary);
  color: var(--theme-button-secondary-text);
  --fg: #fff;
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,.07);
}

.btn.primary{
  background: var(--theme-secondary);
  --bg: var(--accent-color);
  --fg: #fff;
}

/* --------------------------------------------------------------------
   MOBILE
   -------------------------------------------------------------------- */
@media (max-width: 600px){
  .timeline{
    padding-left: 1.4rem;
  }
  .timeline-point{
    width: 1.5rem; height: 1.5rem; left: -.85rem; font-size: .8rem;
  }
  .actions{
    flex-direction: column;
  }
}
