/* FRISES — cartes datees, chronologies, selecteur emoji, bascule %/euro
 *
 * Tranche 06 de public/styles.css, decoupe le 2026-08-24. Les fichiers sont
 * NUMEROTES parce que l'ordre de chargement compte : une regle plus bas l'emporte sur une
 * regle de meme portee plus haut. Ne pas reordonner les <link> de index.html.
 */
.timeline-list > .timeline-card:first-child { padding-top: 0.15rem; }
.timeline-card:last-child { border-bottom: none; }
.timeline-card:hover { background: var(--bg-hover); }
.timeline-card-head {
  grid-area: head;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  border-right: 1px solid var(--border);
  padding-right: 0.9rem;
}
.timeline-month {
  display: block; font-size: 0.78rem; font-weight: 600; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.3;
}
.timeline-year {
  display: block; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em;
  color: var(--text-strong); line-height: 1.15; font-variant-numeric: tabular-nums;
}
.timeline-card-title-row {
  grid-area: titlerow;
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
}
.timeline-card-tags { display: flex; align-items: center; gap: 0.7rem; flex: 0 0 auto; }
.timeline-cat {
  position: relative;
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0 0 0 0.85rem; border-radius: 0; font-weight: 600;
  background: none !important; color: var(--muted);
}
.timeline-cat::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
}
.timeline-cat.cat-vie::before, .timeline-cat.cat-courant::before { background: var(--cat-vie); }
.timeline-cat.cat-projet::before, .timeline-cat.cat-creation::before { background: var(--purple); }
.timeline-cat.cat-apport::before, .timeline-cat.cat-gros_achat::before { background: var(--orange); }
.timeline-cat.cat-strategie::before, .timeline-cat.cat-investissement::before { background: var(--accent); }
.timeline-cat.cat-prevoyance::before { background: var(--pink); }
.cat-patrimoine { background: color-mix(in srgb, var(--gold) 13%, transparent); color: var(--gold); }
.cat-vie { background: color-mix(in srgb, var(--cat-vie) 13%, transparent); color: var(--cat-vie-text); }
.cat-projet { background: color-mix(in srgb, var(--purple) 13%, transparent); color: var(--purple); }
.cat-apport { background: color-mix(in srgb, var(--orange) 13%, transparent); color: var(--orange-text); }
.cat-strategie { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.cat-courant { background: color-mix(in srgb, var(--cat-vie) 13%, transparent); color: var(--cat-vie-text); }
.cat-gros_achat { background: color-mix(in srgb, var(--orange) 13%, transparent); color: var(--orange-text); }
.cat-investissement { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.cat-creation { background: color-mix(in srgb, var(--purple) 13%, transparent); color: var(--purple); }
.cat-prevoyance { background: color-mix(in srgb, var(--pink) 13%, transparent); color: var(--pink); }
.timeline-card-title { font-size: 0.92rem; font-weight: 600; letter-spacing: -0.005em; color: var(--text-strong); line-height: 1.3; }
.timeline-card-detail { grid-area: detail; font-size: 0.78rem; color: var(--muted); line-height: 1.4; }
.timeline-card-cat-label { font-weight: 600; background: none; padding: 0; }
.timeline-card-cat-label.cat-vie, .timeline-card-cat-label.cat-courant { color: var(--cat-vie); }
.timeline-card-cat-label.cat-projet, .timeline-card-cat-label.cat-creation { color: var(--purple); }
.timeline-card-cat-label.cat-apport, .timeline-card-cat-label.cat-gros_achat { color: var(--orange); }
.timeline-card-cat-label.cat-strategie, .timeline-card-cat-label.cat-investissement { color: var(--accent); }
.timeline-card-cat-label.cat-prevoyance { color: var(--pink); }
.timeline-card-actions {
  grid-area: actions;
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: center; gap: 0.3rem;
  align-self: center;
}
/* Les boutons de carte sont des `.btn-sm` poses dans le balisage : cette regle ne dit
   plus que leur APPARENCE (fond efface), plus jamais leur taille. */
.timeline-card-actions .btn { background: transparent; box-shadow: none; }
.timeline-card-actions .btn:hover { background: var(--bg-hover); box-shadow: none; transform: none; }
.timeline-card-actions .btn-tree-edit { border-color: var(--border-strong); color: var(--text); font-weight: 600; }
.timeline-card-actions .btn.danger { background: transparent; border-color: transparent; color: var(--muted); }
.timeline-card-actions .btn.danger:hover { background: color-mix(in srgb, var(--red) 12%, transparent); border-color: color-mix(in srgb, var(--red) 35%, transparent); color: var(--red-text); }
.chrono-add-group { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.chrono-add-group select { font-size: 0.82rem; min-width: 200px; }
.timeline-card .btn-tree-edit { position: static; }
.timeline-card.is-inactive { opacity: 0.6; }
.timeline-card.is-liquidite-alerte { background: color-mix(in srgb, var(--orange) 5%, transparent); }
.timeline-alerte-triangle { display: inline-flex; color: var(--orange-text); cursor: help; line-height: 1; }
.timeline-card-title-group { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.timeline-tree-toggle {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 1.1rem; height: 1.1rem; padding: 0; margin: 0; border: none; background: none;
  color: var(--muted); cursor: pointer;
}
.timeline-tree-toggle svg { transition: transform 0.15s ease; }
.timeline-tree-toggle.is-open svg { transform: rotate(90deg); }
/* Aucune marge a DROITE : c'est l'indentation a gauche qui dit qu'on est en dessous, et
   la colonne d'actions d'un enfant doit finir exactement ou finit celle de son parent. */
.timeline-declencheur-children { margin: 0.4rem 0 0.5rem 2.6rem; }
.timeline-declencheur-children .timeline-card--child { margin: 0 0 0.4rem 0; }
/* Un evenement dependant est INDENTE, pas retreci. Il portait un `transform: scale(0.92)`
   et des boutons plus petits que ceux des evenements independants : deux gabarits pour la
   meme carte, et une mise a l'echelle qui decalait tout ce qu'elle contenait par rapport
   aux cartes voisines. L'indentation de `.timeline-declencheur-children` suffit a dire
   qu'on est en dessous. */
.timeline-card--child { margin-bottom: 0; }
