/* Justificatifs sans effort (page Dépenses) : rappel « photographiez le ticket », pièces attendues, classements automatiques.
   DA : blanc et noir, bleu (--accent) pour ce qui demande un geste, vert (--green) pour le « fait » (payé),
   contour en pointillés pour l'inachevé. Aucune icône décorative ni tuile colorée. */

/* Rappel : tickets de carte à photographier — un toucher ouvre l'appareil photo */
.dp-rappel { display: flex; align-items: center; gap: 18px; padding: 14px 16px 14px 20px; margin-bottom: 14px; border-radius: var(--r-xl);
  background: var(--card); border: 1px solid var(--panel-line); }
.dp-rappel-t { display: flex; flex-direction: column; gap: 2px; flex: 0 0 auto; max-width: 240px; }
.dp-rappel-t b { font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.dp-rappel-t .xs { color: var(--ink-3); }
.dp-photos { display: flex; gap: 10px; flex: 1; min-width: 0; overflow-x: auto; padding: 3px; scrollbar-width: none; }
.dp-photos::-webkit-scrollbar { display: none; }
.dp-photo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-width: 0; max-width: 240px; padding: 9px 14px 9px 9px; border-radius: 14px;
  outline: var(--inacheve-contour); outline-offset: var(--inacheve-decal); background: var(--field); cursor: pointer; transition: transform .2s var(--spring); }
.dp-photo:hover { transform: translateY(-1px); }
.dp-photo:active { transform: scale(.97); }
.dp-photo-ico { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--black); color: var(--on-black); }
.dp-photo-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.dp-photo-t b { overflow-wrap: anywhere; font-size: 13.5px; }
.dp-photo-t .xs { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dp-photo.occupe { pointer-events: none; opacity: .55; }

/* Pièce attendue (abonnement, messagerie, débit à venir) : inachevée mais rien à faire — pointillés, sans couleur */
.dp-ticket.manquant.attendu { cursor: default; }
.dp-ticket.manquant.attendu .dp-mt, .dp-ticket.manquant.attendu .dp-fournisseur { color: var(--ink-2); }
.dp-attendue { overflow-wrap: anywhere; font-size: 12px; font-weight: 600; color: var(--ink-3); min-width: 0; }
.dp-ticket.ecarte .dp-mt { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--ink-3) 60%, transparent); }
.dp-par { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); min-width: 0; }
.dp-ok { min-width: 0; }
.dp-ticket-bas > :first-child { overflow-wrap: anywhere; }

.dp-encours { display: block; margin-top: 16px; padding: 12px 16px; border-radius: var(--r-lg); outline: var(--inacheve-contour); outline-offset: var(--inacheve-decal);
  color: var(--ink-3); font-size: 13px; text-decoration: none; }
.dp-encours:hover { color: var(--ink); }

/* Reprise des anciennes opérations : proposée une fois, sur accord du dirigeant */
.dp-reprise { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -2px 0 14px; padding: 12px 14px 12px 18px;
  border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--panel-line); font-size: 13.5px; }
.dp-reprise .btn { flex-shrink: 0; }

@media (max-width: 820px) {
  .dp-rappel { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; border-radius: var(--r-lg); }
  .dp-rappel-t { max-width: none; }
  .dp-photos { margin: 0 -14px; padding: 3px 14px; }
  .dp-photo { max-width: 78vw; padding: 10px 16px 10px 10px; }
  .dp-photo-ico { width: 40px; height: 40px; }
  .dp-reprise { flex-direction: column; align-items: stretch; }
  .dp-long { display: none; }
}
/* téléphone : les tickets à photographier passent à la ligne (aucun coupé au bord de l'écran) */
@media (max-width: 820px) {
  .dp-photos { flex-wrap: wrap; overflow: visible; padding: 3px 0; }
  .dp-photo { flex: 1 1 100%; max-width: none; }
}

/* =============================================================================
   Dépenses, façon Things (01/12) : une rangée de dépôt, puis une liste — plus de mur de cartes
   ============================================================================= */
.ph-depenses { align-items: flex-end; }
.dp-depot { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 12px 18px 12px 12px; border-radius: var(--r-lg);
  background: var(--card); box-shadow: var(--sh-card); cursor: pointer; transition: box-shadow .2s, transform .2s; }
.dp-depot:hover { box-shadow: var(--sh-card), 0 0 0 1.5px var(--line-2); }
.dp-depot.survol { box-shadow: 0 0 0 2px var(--ink); }
.dp-depot-ico { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--black); color: var(--on-black); }
.dp-depot-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dp-depot-t b { font-size: 14.5px; }
.dp-depot-t span { font-size: 12.5px; color: var(--ink-2); }

.dp-liste { padding: 6px; margin-bottom: 72px; }
.dp-ligne { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) 120px 200px 260px; align-items: center; gap: 14px;
  min-height: 60px; padding: 8px 12px; border-radius: var(--r-sm); cursor: default; transition: background .15s; }
.dp-ligne[data-depot] { cursor: pointer; }
.dp-ligne:hover { background: var(--card-2); }
.dp-ligne.survol { box-shadow: inset 0 0 0 2px var(--ink); }
.dp-ligne + .dp-ligne::before { content: ""; position: absolute; top: 0; left: 12px; right: 12px; height: 1px; background: var(--line); }
.dp-ligne:hover::before, .dp-ligne:hover + .dp-ligne::before { opacity: 0; }
.dp-date { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.dp-qui { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dp-qui b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-qui span { font-size: 12.5px; color: var(--ink-3); }
.dp-montant { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.dp-montant b { font-size: 14.5px; }
.dp-montant span { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.dp-etat { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.dp-etat.ok { color: var(--green); }
.dp-etat.fini { color: var(--ink-3); }
.dp-actions { grid-column: 5; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.dp-actions .btn { white-space: nowrap; flex-shrink: 0; }
.dp-ligne label.btn.occupe { opacity: .6; pointer-events: none; }
@media (hover: hover) and (min-width: 821px) {
  .dp-liens { opacity: 0; transition: opacity .15s; }
  .dp-ligne:hover .dp-liens, .dp-ligne:focus-within .dp-liens { opacity: 1; }
}
@media (max-width: 1100px) and (min-width: 821px) {
  .dp-ligne { grid-template-columns: 48px minmax(0, 1fr) 110px 220px; row-gap: 6px; }
  .dp-etat { grid-column: 2; grid-row: 2; }
  .dp-actions { grid-column: 3 / -1; grid-row: 2; }
}
@media (max-width: 820px) {
  .dp-depot { padding: 12px 14px 12px 12px; }
  .dp-liste.card { background: none; box-shadow: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
  .dp-ligne { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "qui mt" "etat etat" "act act"; padding: 14px; gap: 8px 12px;
    border-radius: var(--r-md); background: var(--card); box-shadow: var(--sh-card); }
  .dp-ligne + .dp-ligne::before { display: none; }
  .dp-ligne:hover { background: var(--card); }
  .dp-date { display: none; }
  .dp-qui { grid-area: qui; } .dp-montant { grid-area: mt; } .dp-etat { grid-area: etat; }
  .dp-actions { grid-area: act; grid-column: 1 / -1; justify-content: space-between; }
  .dp-actions .btn { height: 44px; flex: 1; justify-content: center; }
}

/* À payer : sans facture à régler, pas de bordereau vide à côté */
.ap-cadre.sans-bordereau { grid-template-columns: minmax(0, 1fr) !important; }
.ap-cadre.sans-bordereau .ap-bordereau { display: none; }
.ap-b-tete .xs { text-transform: none; letter-spacing: 0; }
/* Notes de frais : la règle de TVA repliée, à la demande */
.nf-regle { margin: 18px 2px 0; font-size: 13px; color: var(--ink-2); }
.nf-regle summary { cursor: pointer; font-weight: 600; color: var(--ink-2); list-style: none; }
.nf-regle summary::-webkit-details-marker { display: none; }
.nf-regle summary::after { content: " ›"; }
.nf-regle[open] summary::after { content: " ⌄"; }
.nf-regle p { margin: 8px 0 0; max-width: 720px; line-height: 1.5; }
