/* « Mes documents » du client (12 novembre 2026, demande d'Alexandre : la page ne ressemblait pas au reste de
   l'application). Deux pièces, dans la langue des autres écrans du dossier :
   — le dossier complet sur la carte d'ENCRE de la vue d'ensemble (celle du budget conseillé), le ZIP montré fichier par fichier ;
   — l'historique en frise : les pastilles à icône de la frise du dossier, reliées par un trait.
   Couleurs et tailles par jetons seulement (jetons_test). */

.docs-page { max-width: 1100px; display: grid; gap: 16px; }
.docs-page > * { margin: 0; min-width: 0; }
#deliverables .docs-page { margin-bottom: 16px; }

/* ---- Votre dossier complet ------------------------------------------------------------------------------------- */
.docs-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); background: var(--ln-ink); color: var(--ln-on-dark); border-radius: var(--ln-radius); overflow: hidden; }
.docs-hero__main { display: flex; gap: 22px; align-items: flex-start; padding: 26px 28px; min-width: 0; }
.docs-hero__text { min-width: 0; }
.docs-hero h2 { margin: 0 0 8px; font-size: var(--ln-text-xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--ln-on-dark); text-wrap: balance; }
.docs-hero__line { margin: 0 0 20px; max-width: 58ch; font-size: var(--ln-text-base); line-height: 1.6; color: var(--ln-on-dark-muted); }
.docs-hero__line b { color: var(--ln-on-dark); font-weight: 600; }
.docs-hero__stamp { flex: none; margin: 2px 0 0; width: 108px; padding: 14px 12px 12px; border: 1px solid var(--ln-on-dark-hover); border-radius: var(--ln-radius-sm); background: var(--ln-on-dark-hover-soft); display: grid; gap: 3px; text-align: center; }
.docs-hero__stamp strong { font-size: var(--ln-text-display); font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.docs-hero__stamp span { font-size: var(--ln-text-xs); line-height: 1.35; color: var(--ln-on-dark-muted); }
.docs-hero__actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 0 0 16px; }
.body--app .docs-hero .docs-hero__download { background: var(--ln-on-dark); border-color: var(--ln-on-dark); color: var(--ln-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: background var(--ln-ease), transform var(--ln-ease); }
.body--app .docs-hero .docs-hero__download:hover { background: var(--ln-sky); border-color: var(--ln-sky); color: var(--ln-ink); }
.body--app .docs-hero .docs-hero__download:active { transform: translateY(1px); }
.docs-hero__download .ln-icon { width: 18px; height: 18px; }
.docs-hero__read { display: inline-flex; align-items: center; gap: 6px; color: var(--ln-on-dark); font-weight: 600; text-decoration: underline; text-decoration-color: var(--ln-on-dark-line); text-underline-offset: 4px; }
.docs-hero__read:hover { color: var(--ln-on-dark); text-decoration-color: var(--ln-on-dark); }
.docs-hero__read .ln-icon { transition: transform var(--ln-ease); }
.docs-hero__read:hover .ln-icon { transform: translateX(3px); }
.docs-hero__fine { margin: 0; font-size: var(--ln-text-sm); color: var(--ln-on-dark-muted); }
.docs-hero__fine a { color: var(--ln-on-dark); text-underline-offset: 3px; }
.docs-hero a:focus-visible { outline: 2px solid var(--ln-on-dark); outline-offset: 3px; }

.docs-hero__zip { padding: 24px 26px; background: var(--ln-on-dark-hover-soft); border-left: 1px solid var(--ln-on-dark-hover); min-width: 0; }
.docs-hero__zip h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: var(--ln-text-sm); font-weight: 600; color: var(--ln-on-dark-muted); }
.docs-files { list-style: none; margin: 0; padding: 0; }
.docs-files li { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 0; border-top: 1px solid var(--ln-on-dark-hover); font-size: var(--ln-text-base); color: var(--ln-on-dark); }
.docs-files li:first-child { border-top: 0; }
.docs-files .ln-icon { flex: none; width: 16px; height: 16px; color: var(--ln-cyan); }
.docs-files span { flex: 1; min-width: 0; }
.docs-files abbr { flex: none; font-size: var(--ln-text-xs); font-weight: 600; letter-spacing: 0.04em; color: var(--ln-on-dark-muted); text-decoration: none; font-variant-numeric: tabular-nums; }

/* Aucune version encore : la même carte, claire, qui attend. */
.docs-hero--pending { grid-template-columns: minmax(0, 1fr); background: var(--ln-page); color: var(--ln-ink); border: 1px dashed var(--ln-dash-line); }
.docs-hero--pending .docs-hero__main { align-items: center; }
.docs-hero--pending h2 { color: var(--ln-ink); font-size: var(--ln-text-lg); margin-bottom: 4px; }
.docs-hero--pending .empty { margin: 0; }
.docs-hero__wait { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ln-sky); color: var(--ln-accent); }
.docs-hero__wait .ln-icon { width: 22px; height: 22px; }

/* ---- Historique : une frise ------------------------------------------------------------------------------------ */
.docs-history .ld-card__head { justify-content: space-between; }
.docs-history__order { font-size: var(--ln-text-sm); color: var(--ln-muted); }
.docs-timeline { width: 100%; border-collapse: collapse; }
.docs-timeline td { padding: 18px 18px 18px 0; vertical-align: top; border-top: 1px solid var(--ln-line); }
.docs-timeline tbody tr:first-child td { border-top: 0; }
.docs-timeline .docs-timeline__when { position: relative; width: 158px; padding-left: 66px; border-top: 0; white-space: nowrap; }
.docs-timeline__when::before { content: ""; position: absolute; left: 33px; top: 0; bottom: 0; width: 2px; background: var(--ln-line-strong); }
.docs-timeline tbody tr:first-child .docs-timeline__when::before { top: 30px; }
.docs-timeline tbody tr:last-child .docs-timeline__when::before { bottom: auto; height: 30px; }
.docs-timeline tbody tr:first-child:last-child .docs-timeline__when::before { content: none; }
.docs-timeline__node { position: absolute; left: 18px; top: 13px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ln-page); border: 2px solid var(--ln-line-strong); color: var(--ln-muted); }
.docs-timeline__node .ln-icon { width: 16px; height: 16px; }
.history-row--delivered .docs-timeline__node { background: var(--ln-accent); border-color: var(--ln-accent); color: var(--ln-on-dark); }
.history-row--running .docs-timeline__node { border-color: var(--ln-accent); color: var(--ln-accent); box-shadow: 0 0 0 4px var(--ln-sky); }
.history-row--failed .docs-timeline__node { border-color: var(--ln-danger-line); color: var(--ln-danger); }
.docs-timeline__when time { display: grid; gap: 1px; }
.docs-timeline__when time b { font-weight: 600; color: var(--ln-ink); font-variant-numeric: tabular-nums; }
.docs-timeline__when time span { font-size: var(--ln-text-sm); color: var(--ln-muted); font-variant-numeric: tabular-nums; }
.docs-timeline__what { width: 36%; }
.docs-timeline__what strong { display: block; font-weight: 600; color: var(--ln-ink); }
.docs-timeline__scenario { display: block; margin-top: 2px; font-size: var(--ln-text-sm); color: var(--ln-muted); }
.docs-timeline__version { display: flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ln-ink); }
.docs-timeline__version .ln-icon { flex: none; color: var(--ln-accent); }
.docs-timeline__links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: var(--ln-text-sm); }
.docs-timeline__links a { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; text-underline-offset: 3px; }
.docs-timeline__links .ln-icon { width: 14px; height: 14px; }
.docs-timeline__state { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.docs-timeline__state--running { color: var(--ln-accent-strong); }
.docs-timeline__state--failed { color: var(--ln-danger); }
.docs-timeline .docs-timeline__cost { width: 120px; text-align: right; white-space: nowrap; font-weight: 600; color: var(--ln-ink); font-variant-numeric: tabular-nums; }
.docs-timeline .docs-timeline__cost--free { font-weight: 400; color: var(--ln-muted); }
@media (prefers-reduced-motion: no-preference) {
  .docs-timeline__state--running .ln-icon { animation: analysis-spin 1.1s linear infinite; }
}

/* ---- « Aussi dans ce dossier » : ce qui a été commandé en plus (les options se commandent sur « Aller plus loin ») ---- */
.docs-also__list { list-style: none; margin: 0; padding: 0; }
.docs-also__list > li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--ln-line); font-size: var(--ln-text-base); }
.docs-also__list .ln-icon { width: 16px; height: 16px; flex: none; color: var(--ln-muted); }
.docs-also__kind { color: var(--ln-muted); }
.docs-also__state { margin-left: auto; color: var(--ln-muted); font-size: var(--ln-text-sm); }
.docs-also__more { margin: 0; padding: 12px 18px; color: var(--ln-muted); font-size: var(--ln-text-sm); }

/* ---- Écrans étroits -------------------------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .docs-hero { grid-template-columns: minmax(0, 1fr); }
  .docs-hero__zip { border-left: 0; border-top: 1px solid var(--ln-on-dark-hover); }
}
@media (max-width: 720px) {
  .docs-hero__main { flex-direction: column; gap: 16px; padding: 22px 20px; }
  .docs-hero__stamp { width: auto; grid-auto-flow: column; align-items: baseline; gap: 10px; padding: 8px 12px; text-align: left; }
  .docs-hero__stamp strong { font-size: var(--ln-text-xl); margin: 0; }
  .docs-hero__zip { padding: 20px; }
  .body--app .docs-hero .docs-hero__download { width: 100%; justify-content: center; }
  .docs-history__order { display: none; }
  .docs-timeline, .docs-timeline tbody { display: block; }
  .docs-timeline tr { display: block; position: relative; padding: 14px 18px 16px 66px; }
  .docs-timeline td, .docs-timeline .docs-timeline__when, .docs-timeline .docs-timeline__what, .docs-timeline .docs-timeline__cost { display: block; position: static; width: auto; padding: 0; border: 0; text-align: left; white-space: normal; }
  .docs-timeline__when::before { content: none; }
  .docs-timeline tbody tr::before { content: ""; position: absolute; left: 33px; top: 0; bottom: 0; width: 2px; background: var(--ln-line-strong); }
  .docs-timeline tbody tr:first-child::before { top: 30px; }
  .docs-timeline tbody tr:last-child::before { bottom: auto; height: 30px; }
  .docs-timeline tbody tr:first-child:last-child::before { content: none; }
  .docs-timeline__when time { display: block; font-size: var(--ln-text-sm); }
  .docs-timeline__what { margin-top: 2px; }
  .docs-timeline__result:not(:empty) { margin-top: 10px; }
  .docs-timeline .docs-timeline__cost { margin-top: 8px; font-size: var(--ln-text-sm); }
}
