/* =========================================================
   Carnet — Liste des notes
   Dépend de base.css et landing.css.
   ========================================================= */

@layer components {
  .note {
    display: flex;
    align-items: baseline;
    gap: var(--space-s);
    padding-block: 1.15rem;
    border-bottom: 1px solid var(--color-border);
  }

  .note__title {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: var(--space-s);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: var(--leading-snug);
    letter-spacing: -0.015em;
    color: var(--color-fg);

    background-image: linear-gradient(var(--color-fg), var(--color-fg));
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size var(--duration-base) var(--ease-out-expo);
  }

  .note__title:hover {
    color: inherit;
    background-size: 100% 1px;
  }

  .note__title::after {
    content: "";
    flex: 1;
    min-width: 1.5rem;
    border-bottom: 1px dotted var(--color-border-strong);
    transform: translateY(-0.3em);
    transition: border-color var(--duration-base) ease;
  }

  .note__title:hover::after {
    border-bottom-color: transparent;
  }

  .note__date {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-fg-muted);
    font-variant-numeric: tabular-nums;
  }

  @media (max-width: 540px) {
    .note { flex-direction: column; align-items: stretch; gap: 0.35rem; }
    .note__title::after { display: none; }
    .note__date { text-align: left; }
  }

  /* Réduit l'espace entre l'en-tête et la liste (le padding de
     l'item suffit). */
  .section__head {
    margin-bottom: 0;
  }
}