/* =============================================================
   entries.css — Affichage des rendez-vous et des tâches
   -------------------------------------------------------------
   Lignes d'entrée (sur les pages de l'agenda) et fiche de détails.
   ============================================================= */

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Version compacte (vue semaine) : lignes plus serrées. */
.entry-list.is-compact {
  gap: 0.35rem;
}

.entry-list.is-compact .entry-main {
  padding: 0.35rem 0.7rem;
}

/* ---------- Une ligne d'entrée ---------- */
.entry {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 0.75rem;
  background: var(--color-surface);
}

.entry-task {
  border-left-color: var(--color-border-strong);
}

.entry-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 0;
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.entry-main:hover {
  background: var(--color-accent-soft);
}

.entry-main:focus-visible {
  outline-offset: -3px;
}

.entry-time {
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.entry-kind,
.entry-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.entry-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.entry-meta {
  overflow-wrap: anywhere;
}

.entry-priority {
  color: var(--color-danger);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Case « faite » d'une tâche : zone tactile de 48 px de large. */
.entry-check {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 3rem;
  min-height: 44px;
  border-right: 1px solid var(--color-border);
  cursor: pointer;
}

.entry-check input {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.entry.is-done .entry-title {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

/* ---------- Fiche de détails ---------- */
.entry-badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.entry-badge-task {
  background: var(--color-surface-2);
  color: var(--color-text);
}

.details-list {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.details-row {
  display: grid;
  grid-template-columns: minmax(7rem, 30%) 1fr;
  gap: 0.25rem 1rem;
}

.details-row dt {
  color: var(--color-text-muted);
  font-weight: 600;
}

.details-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Sur écran étroit, l'intitulé passe au-dessus de la valeur. */
@media (max-width: 30rem) {
  .details-row {
    grid-template-columns: 1fr;
  }
}

.rich-text {
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* ---------- Texte enrichi : surlignages ----------
   Fond doux + trait en bas, dans les couleurs du thème. */
mark {
  padding: 0 0.15em;
  border-radius: 0.2em;
  color: inherit;
}

mark.hl-jaune { background: var(--hl-jaune); box-shadow: inset 0 -2px 0 var(--hl-jaune-edge); }
mark.hl-vert { background: var(--hl-vert); box-shadow: inset 0 -2px 0 var(--hl-vert-edge); }
mark.hl-bleu { background: var(--hl-bleu); box-shadow: inset 0 -2px 0 var(--hl-bleu-edge); }
mark.hl-rose { background: var(--hl-rose); box-shadow: inset 0 -2px 0 var(--hl-rose-edge); }

.rich-text u,
.rich-editor u {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}
