/* « Liaisons du jour » (10/11/2026) : feuille légère, à la manière des listes groupées d'iOS. Une seule couleur d'accent
   (la sauge de la marque) ; le rouge seulement pour « Défaire ». Petits détails : soleil le jour, lune le soir, pastille
   de la saison ; entrée en cascade et effacement doux d'une ligne défaite (rien si « réduire les animations »). */
.ldj {
  --ldj-saison: transparent;
  position: fixed; width: min(560px, calc(100% - 32px)); max-height: min(820px, 90dvh); padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 28px; background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 100px rgb(10 20 15 / 22%), 0 2px 8px rgb(10 20 15 / 6%);
  display: none; flex-direction: column;
}
.ldj[open] { display: flex; }
.ldj::backdrop { background: rgb(18 24 20 / 34%); -webkit-backdrop-filter: blur(8px) saturate(120%); backdrop-filter: blur(8px) saturate(120%); }
:root[data-theme=dark] .ldj { box-shadow: 0 30px 100px rgb(0 0 0 / 55%); }
:root[data-theme=dark] .ldj::backdrop { background: rgb(0 0 0 / 50%); }
.ldj-ouverte { overflow: hidden; }
:root[data-saison=automne] .ldj { --ldj-saison: #d0892f; }
:root[data-saison=hiver] .ldj { --ldj-saison: #8db4dc; }
:root[data-saison=printemps] .ldj { --ldj-saison: #e59bb2; }
:root[data-saison=ete] .ldj { --ldj-saison: #e6b53c; }

.ldj-fermer {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; min-height: 44px; padding: 0;
  display: grid; place-items: center; border-radius: 999px; background: transparent; color: var(--muted); font-size: 22px; line-height: 1;
}
.ldj-fermer span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--inset); }
.ldj-fermer:hover { color: var(--ink); }

.ldj-tete { padding: 34px 28px 10px; text-align: center; }
.ldj-embleme {
  position: relative; display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 17px;
  background: linear-gradient(155deg, #7f978a 0%, #557161 55%, #43604f 100%);
  box-shadow: 0 10px 24px rgb(72 99 84 / 28%), inset 0 1px 0 rgb(255 255 255 / 25%);
}
.ldj-embleme-glyphe { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ldj-embleme-moment {
  position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; padding: 3px; border-radius: 999px;
  background: var(--surface); box-shadow: 0 1px 4px rgb(0 0 0 / 14%); fill: none; stroke: #c98a1b; stroke-width: 2; stroke-linecap: round;
}
:root[data-moment=soir] .ldj-embleme-moment, :root[data-moment=nuit] .ldj-embleme-moment { stroke: #6f7fb3; }
.ldj-embleme::after {
  content: ''; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 999px;
  background: var(--ldj-saison); box-shadow: 0 0 0 3px var(--surface);
}
:root:not([data-saison]) .ldj-embleme::after { display: none; }
.ldj-h { margin: 14px 0 4px; font-size: 26px; line-height: 1.15; font-weight: 750; letter-spacing: -.7px; outline: none; }
.ldj-sous { margin: 0; min-height: 20px; color: var(--muted); font-size: 15px; }
.ldj-jours { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; padding: 3px; border-radius: 999px; background: var(--inset); }
.ldj-jour-bouton { width: 36px; height: 36px; min-height: 36px; padding: 0; display: grid; place-items: center; border-radius: 999px; background: transparent; color: var(--ink); }
.ldj-jour-bouton:hover:not(:disabled) { background: var(--surface); }
.ldj-jour-bouton:disabled { opacity: .3; }
.ldj-jour-bouton .ldj-glyphe { width: 18px; height: 18px; }
.ldj-jour-lib { min-width: 120px; font-size: 14px; font-weight: 650; text-transform: capitalize; }

.ldj-defile { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 20px 22px; }
.ldj-etat { margin: 0; color: var(--muted); font-size: 15px; text-align: center; }
.ldj-etat:empty { display: none; }
.ldj-etat.ldj-vide { padding: 26px 0 18px; }
.ldj-liste { list-style: none; margin: 0; padding: 0; border-radius: 16px; background: var(--inset); overflow: hidden; }
.ldj-liste:empty { display: none; }
.ldj-ligne {
  position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 13px 14px 13px 12px;
}
.ldj-ligne + .ldj-ligne::before { content: ''; position: absolute; top: 0; left: 60px; right: 0; border-top: 1px solid var(--line); }
.ldj-tuile { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--soft); color: var(--accent); }
.ldj-glyphe { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ldj-texte { min-width: 0; }
.ldj-haut { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.ldj-libelle { font-size: 15.5px; font-weight: 650; letter-spacing: -.15px; overflow-wrap: anywhere; }
.ldj-badge { padding: 1px 7px; border-radius: 6px; background: var(--soft); color: var(--accent); font-size: 12px; font-weight: 650; }
.ldj-vers { margin: 2px 0 0; font-size: 14.5px; color: var(--ink); overflow-wrap: anywhere; }
.ldj-fleche { color: var(--muted); }
.ldj-dossier { min-height: 0; padding: 0; background: transparent; color: var(--accent); font: inherit; font-weight: 600; text-align: left; border-radius: 4px; }
.ldj-dossier:hover { text-decoration: underline; text-underline-offset: 3px; }
.ldj-meta { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.ldj-preuve { overflow-wrap: anywhere; }
.ldj-heure { font-variant-numeric: tabular-nums; }
.ldj-motif { flex-basis: 100%; font-style: italic; overflow-wrap: anywhere; }
.ldj-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ldj-defaire {
  min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--error-bg); color: var(--error);
  font-size: 14px; font-weight: 650;
}
.ldj-defaire:hover { filter: brightness(.97); }
.ldj-etiquette { padding: 4px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.ldj-confirmer { grid-column: 2 / -1; justify-self: end; display: grid; gap: 8px; width: min(360px, 100%); padding-top: 2px; }
.ldj-motif-lib { font-size: 12.5px; color: var(--muted); text-align: left; }
.ldj-motif-champ { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }
.ldj-boutons { display: flex; gap: 8px; justify-content: flex-end; }
.ldj-ok { min-height: 36px; padding: 0 16px; border-radius: 999px; background: var(--error); color: #fff; font-weight: 650; font-size: 14px; }
:root[data-theme=dark] .ldj-ok { color: #2a1414; }
.ldj-non { min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; }
.ldj-message { margin: 0; font-size: 13px; color: var(--muted); text-align: left; }
.ldj-message:empty { display: none; }
.ldj-message.ldj-erreur { color: var(--error); }
.ldj-defaite .ldj-libelle, .ldj-defaite .ldj-vers { color: var(--muted); }
.ldj-defaite .ldj-libelle { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.ldj-defaite .ldj-tuile { opacity: .55; }
.ldj-aide { margin: 14px 4px 0; font-size: 13px; line-height: 1.45; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .ldj[open] { animation: ldj-ouvrir .32s cubic-bezier(.2, .9, .25, 1); }
  .ldj-entree { animation: ldj-entree .38s cubic-bezier(.2, .9, .25, 1) both; animation-delay: calc(var(--ldj-i, 0) * 28ms); }
  .ldj-anime { animation: ldj-efface .5s ease both; }
}
@keyframes ldj-ouvrir { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes ldj-entree { from { opacity: 0; transform: translateY(6px); } }
@keyframes ldj-efface { from { background: color-mix(in srgb, var(--error-bg) 70%, transparent); } to { background: transparent; } }

@media (max-width: 560px) {
  .ldj { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; border-bottom: 0; }
  .ldj-tete { padding: 28px 18px 8px; }
  .ldj-defile { padding: 12px 12px calc(20px + env(safe-area-inset-bottom)); }
  .ldj-ligne { grid-template-columns: 32px minmax(0, 1fr); padding: 12px 12px 12px 10px; }
  .ldj-ligne + .ldj-ligne::before { left: 52px; }
  .ldj-tuile { width: 32px; height: 32px; }
  .ldj-actions { grid-column: 2; align-items: flex-start; }
  .ldj-confirmer { width: 100%; }
  .ldj-boutons { justify-content: flex-start; }
}
