/* Dépôt universel, lot 5 (2026-10-03) : panneau du document déposé (latéral sur ordinateur, feuille du bas sur mobile),
   cartes progressives, détail « Voir les sources » / « Voir le calcul », éditeur d'hypothèses, pastille dans #selectedOptions.
   Palette du composeur (texte #f8fafc sur verre sombre) ; aucune largeur fixe au-delà de 100vw - 32px. */
.depot-panel {
  position: fixed; top: 16px; right: 16px; bottom: 16px; z-index: 60;
  width: min(420px, calc(100vw - 32px)); max-width: calc(100vw - 32px); box-sizing: border-box;
  display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 18px;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  color: #f8fafc; background: rgb(12 14 20 / 0.94); border: 1px solid rgb(255 255 255 / 0.1); border-radius: 14px;
  box-shadow: 0 18px 48px rgb(0 0 0 / 0.45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; word-break: normal;
}
.depot-panel[hidden] { display: none; }
.depot-panel *, .depot-panel *::before, .depot-panel *::after { box-sizing: border-box; min-width: 0; }
.depot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.depot-title { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.depot-steps { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.depot-step { padding: 2px 7px; border-radius: 999px; font-size: 11px; color: rgb(248 250 252 / 0.5); background: rgb(255 255 255 / 0.05); }
.depot-step[data-etat="running"] { color: #f8fafc; background: rgb(96 165 250 / 0.22); }
.depot-step[data-etat="done"] { color: #f8fafc; background: rgb(52 211 153 / 0.2); }
.depot-step[data-etat="partial"] { color: #f8fafc; background: rgb(251 191 36 / 0.22); }
.depot-step[data-etat="failed"] { color: #f8fafc; background: rgb(248 113 113 / 0.26); }
.depot-status { margin: 0; color: rgb(248 250 252 / 0.8); }
.depot-errors { margin: 0; padding: 0 0 0 16px; }
.depot-error { color: #fca5a5; }
.depot-cards { display: flex; flex-direction: column; gap: 8px; }
.depot-cards:empty { display: none; }
.depot-card { padding: 10px 12px; border-radius: 10px; background: rgb(255 255 255 / 0.05); border: 1px solid rgb(255 255 255 / 0.07); }
.depot-card-title { margin: 0 0 2px; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.depot-card-meta, .depot-muted { margin: 0; font-size: 11px; color: rgb(248 250 252 / 0.6); }
.depot-card-line { margin: 4px 0 0; color: rgb(248 250 252 / 0.85); }
.depot-metrics { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; }
.depot-metric { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.depot-metric-name { flex: 1 1 140px; color: rgb(248 250 252 / 0.72); }
.depot-metric-value { flex: 1 1 120px; text-align: right; font-variant-numeric: tabular-nums; }
.depot-metric-non_calculable .depot-metric-value, .depot-metric-donnees_insuffisantes .depot-metric-value { text-align: left; color: rgb(248 250 252 / 0.55); font-size: 11px; }
.depot-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.depot-btn { padding: 5px 10px; border: 1px solid rgb(255 255 255 / 0.16); border-radius: 8px; color: #f8fafc; background: rgb(255 255 255 / 0.08); font: inherit; font-size: 12px; cursor: pointer; }
.depot-btn:hover { background: rgb(255 255 255 / 0.14); }
.depot-btn-ghost { background: transparent; }
.depot-btn:focus-visible, .depot-link:focus-visible, .depot-input:focus-visible { outline: 2px solid rgb(147 197 253 / 0.9); outline-offset: 2px; }
.depot-link { padding: 0; border: 0; color: #93c5fd; background: none; font: inherit; font-size: 11px; text-decoration: underline; cursor: pointer; }
.depot-detail { padding: 10px 12px; border-radius: 10px; background: rgb(255 255 255 / 0.07); border: 1px solid rgb(147 197 253 / 0.2); }
.depot-detail[hidden] { display: none; }
.depot-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.depot-detail-title, .depot-sub { margin: 0; font-size: 13px; font-weight: 600; }
.depot-warning { margin: 0 0 6px; font-size: 11px; color: #fcd34d; }
.depot-source-text { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; color: rgb(248 250 252 / 0.88); }
.depot-formula { margin: 6px 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.depot-result { margin: 4px 0 8px; font-weight: 600; }
.depot-cells { margin: 4px 0 0; padding: 0 0 0 14px; max-height: 40vh; overflow-y: auto; }
.depot-cell { margin: 2px 0; overflow-wrap: anywhere; }
.depot-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.depot-field { display: flex; flex-direction: column; gap: 2px; }
.depot-field-name { font-size: 12px; color: rgb(248 250 252 / 0.85); }
.depot-field-hint { font-size: 11px; color: rgb(248 250 252 / 0.5); }
.depot-input { width: 100%; max-width: 100%; padding: 6px 8px; border: 1px solid rgb(255 255 255 / 0.16); border-radius: 8px; color: #f8fafc; background: rgb(0 0 0 / 0.3); font: inherit; font-size: 16px; }
.depot-check { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; }
.depot-scenario-out { margin-top: 6px; }
/* pastille du document dans #selectedOptions (même gabarit que .option-tag) */
.option-tag.depot-pill { max-width: 100%; background: rgb(96 165 250 / 0.18); }
.depot-pill-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0; border: 0; color: inherit; background: none; font: inherit; cursor: pointer; }
.option-tag.depot-pill .depot-pill-label { display: block; width: auto; height: auto; border-radius: 0; }
.option-tag.depot-pill .depot-pill-label:hover { background: none; text-decoration: underline; }
.depot-pill-remove { flex: none; font-size: 13px; line-height: 1; }
/* glisser-déposer sur le composeur */
#chatForm.depot-drag .chat-container { outline: 2px dashed rgb(147 197 253 / 0.8); outline-offset: 4px; border-radius: 18px; }

/* lot 6 (2026-10-03) : dépôt par URL — étapes optionnelles, lecture du site, DVF, rapport payant */
.depot-step[data-optionnel]:not([data-etat]) { display: none; }
.depot-pages { margin: 4px 0 0; padding: 0 0 0 14px; max-height: 24vh; overflow-y: auto; font-size: 11px; }
.depot-dvf-line { color: rgb(248 250 252 / 0.9); }
.depot-dvf-dl, .depot-dvf-prep { margin-top: 6px; }
.depot-rapport { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgb(255 255 255 / 0.12); }
.depot-select { max-width: 100%; padding: 6px 8px; border: 1px solid rgb(255 255 255 / 0.16); border-radius: 8px; color: #f8fafc; background: rgb(0 0 0 / 0.3); font: inherit; font-size: 16px; }
.depot-devis { margin-top: 6px; }
.depot-btn.depot-btn-payant { border-color: rgb(252 211 77 / 0.6); }
.depot-btn:disabled { opacity: 0.45; cursor: not-allowed; }

@media (max-width: 760px) {
  .depot-panel { top: auto; left: 16px; right: 16px; bottom: 16px; width: auto; max-height: 70vh; border-radius: 16px 16px 12px 12px; }
}
@media (max-width: 430px) {
  .depot-panel { padding: 12px 12px 16px; }
  .depot-metric-value { text-align: left; }
}
