/* Validations (#/validations) : prototype Validations.dc.html et ValidationsMobile.dc.html.
   Styles propres à cet écran (refonte du prototype v73) : un fichier par écran, chargé par index.html après
   shell.css. Téléphone : @media (max-width: 767px), comme la coque. Classes « vc- » : les anciennes règles .vcard
   d'app.css sont remises à plat ici. */

.vc-holder, .vc {
  --vc-soft: #EEF2EA;            /* bouton ouvert (téléphone) */
  --vc-field-line: #B9C4B4;
  --vc-flag-ink: #8E1B26;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .vc-holder, :root[data-theme="auto"] .vc {
    --vc-soft: var(--fr-surface-2); --vc-field-line: var(--fr-line); --vc-flag-ink: var(--fr-danger);
  }
}
:root[data-theme="dark"] .vc-holder, :root[data-theme="dark"] .vc {
  --vc-soft: var(--fr-surface-2); --vc-field-line: var(--fr-line); --vc-flag-ink: var(--fr-danger);
}

.vc [hidden], .vc-holder [hidden] { display: none !important; }
.vc-short { display: none; }

/* En-tête de page et compteur */
.vc-count { margin: 0; font-size: 14px; color: var(--fr-muted); }

/* Liste : cartes en grille de 280 px au moins */
.vc-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.vc { display: grid; gap: 8px; align-content: start; padding: 14px 16px; background: var(--app-surface);
  border: 1px solid var(--app-line); border-radius: 16px; min-width: 0; color: var(--app-ink); }
.vc p { margin: 0; }
.vc.vcard--focus { border-color: var(--app-primary); box-shadow: 0 0 0 2px var(--app-primary); }

.vc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.vc .vc-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.vc .vc-kind-m { display: none; }
.vc-line, .vc-sub { font-size: 14px; }
.vc-sub { color: var(--app-muted); }

/* Pastilles : type du point et statut */
.vc-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; line-height: 1.4;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap; vertical-align: baseline; }
.vc-pill__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.vc-pill--ok { background: var(--app-ok-bg); color: var(--app-ok-ink); }
.vc-pill--ok .vc-pill__dot { background: var(--app-ok-dot); }
.vc-pill--warn { background: var(--app-warn-bg); color: var(--app-warn-ink); }
.vc-pill--warn .vc-pill__dot { background: var(--app-warn-dot); }
.vc-pill--bad { background: var(--app-bad-bg); color: var(--app-bad-ink); }
.vc-pill--bad .vc-pill__dot { background: var(--app-bad-dot); }

/* Trois gestes : Valider (vert plein), Vérifier et Signaler à Fraum (blancs) */
.vc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vc-btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
  padding: 0 12px; border: 1px solid var(--app-line); border-radius: 12px; background: var(--app-surface);
  color: var(--fr-ink); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer; }
.vc-btn--ok { border-color: transparent; background: var(--app-primary); color: var(--app-on-primary); }
.vc-btn--ok:hover { background: var(--app-primary-hover); }
.vc-btn--alt:hover { background: var(--app-bg); }
.vc-btn:disabled { opacity: .6; cursor: progress; }

/* Dépliés Vérifier et Signaler à Fraum */
.vc-panel { display: grid; gap: 4px; padding: 10px 12px; background: var(--app-bg); border-radius: 12px; }
.vc-panel__t { margin: 0; font-size: 14px; font-weight: 700; }
.vc-vrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; }
.vc-check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: 14px; font-weight: 400; cursor: pointer; }
.vc-check input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex: none; }
.vc-link { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none;
  color: var(--fr-brand); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; }
.vc-link:hover { color: var(--app-link-hover); }
.vc-link:disabled { cursor: progress; opacity: .7; }
.vc-chev { display: none; flex: none; width: 8px; height: 8px; border-top: 2px solid var(--app-muted);
  border-right: 2px solid var(--app-muted); transform: rotate(45deg); }
.vc-dl { font-size: 13px; color: var(--app-muted); }
.vc-dl--ok { color: var(--app-ok-ink); }
.vc-dl--warn { color: var(--app-warn-ink); }
.vc-dl--bad { color: var(--app-bad-ink); }

.vc-fraum { gap: 8px; }
.vc-note { display: block; width: 100%; box-sizing: border-box; height: 40px; min-height: 40px; padding: 9px 10px;
  border: 1px solid var(--vc-field-line); border-radius: 10px; background: var(--app-surface); color: var(--app-ink);
  font: inherit; font-size: 14px; line-height: 1.4; resize: none; overflow: hidden; white-space: pre; }
.vc-note:focus-visible { outline: 2px solid var(--app-primary); outline-offset: 0; border-color: var(--app-primary); }
.vc-fraum__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vc-confirm { gap: 8px; }
.vc-confirm .vc-sub, .vc-confirm .vc-meta { margin: 0; }
.vc-send, .vc-cancel { display: inline-flex; align-items: center; justify-content: center; min-height: 36px;
  border-radius: 12px; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer; }
/* un doute envoyé à Fraum n'est pas une alarme (fos-novice-12, décision d'Amine) : bouton sobre, jamais rouge */
.vc-send { padding: 0 14px; border: 1px solid var(--app-primary); background: transparent; color: var(--app-primary); }
.vc-send:hover { background: var(--app-bg); }
.vc-cancel { padding: 0 10px; border: 0; background: transparent; color: var(--fr-brand); }
.vc-cancel:hover { text-decoration: underline; }

/* Écart : la piste de Fraum sous le point, puis « Expliquer » (cause, suite, note) — 27/10/2026 */
.vc-lead { padding: 8px 10px; border-radius: 10px; font-size: 14px; background: var(--app-bg); color: var(--app-ink); }
.vc-lead--none { color: var(--app-muted); }
.vc-explain { gap: 8px; }
.vc-choices { display: grid; gap: 0; margin: 0; padding: 0; border: 0; min-width: 0; }
.vc-choices legend { padding: 0; margin-bottom: 2px; }
.vc-radio { align-items: flex-start; padding: 6px 0; line-height: 1.35; }
.vc-check input[type="radio"] { width: 18px; height: 18px; margin: 1px 0 0; flex: none; }
.vc-mark { font-weight: 600; color: var(--app-ok-ink); }
.vc-explain .vc-note { height: auto; min-height: 64px; white-space: pre-wrap; overflow: auto; resize: vertical; }
.vc-save { flex: 0 1 auto; min-height: 36px; padding: 0 14px; }
.vc-expl { font-size: 14px; }

.vc-err { padding: 8px 10px; border-radius: 10px; font-size: 14px; background: var(--app-bad-bg); color: var(--app-bad-ink); }

/* Après la décision */
.vc-flag { font-size: 14px; color: var(--vc-flag-ink); }
.vc-reopen { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--app-line); border-radius: 12px; background: var(--app-surface); color: var(--fr-ink);
  font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer; }
.vc-reopen:hover { background: var(--app-bg); }
.vc-meta { font-size: 14px; color: var(--app-muted); }
.vc-comment { overflow-wrap: anywhere; }

/* Téléphone (ValidationsMobile.dc.html) */
@media (max-width: 767px) {
  .vc-lede { display: none; }
  .vc-page-head { margin-bottom: 0; }
  .vc-count { margin-top: 4px; color: var(--app-muted); }
  .vc-list { display: flex; flex-direction: column; }
  .vc { display: flex; flex-direction: column; }
  .vc-long { display: none; }
  .vc-short { display: inline; }

  /* le type à gauche et le statut à droite sur une ligne, puis le titre ; pas de phrase du point */
  .vc-head { display: grid; grid-template-columns: auto auto; justify-content: space-between; align-items: center; gap: 8px; }
  .vc .vc-kind-m { display: inline-flex; grid-column: 1; grid-row: 1; justify-self: start; }
  .vc-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .vc .vc-title { grid-column: 1 / -1; grid-row: 2; overflow-wrap: anywhere; }
  .vc-pill { padding: 3px 10px; }
  .vc-line { display: none; }

  .vc-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 4px; }
  .vc-btn { min-height: 48px; padding: 0 8px; font-size: 15px; text-align: center; }
  .vc-btn--ok { grid-column: 1 / -1; min-height: 52px; font-size: 16px; }
  .vc-btn--alt[aria-expanded="true"] { border-color: var(--app-primary); background: var(--vc-soft); }

  .vc-panel { display: flex; flex-direction: column; }
  .vc-verif { padding: 10px 12px 6px; }
  .vc-verif .vc-panel__t { margin-bottom: 4px; }
  .vc-vrow { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 4px; }
  .vc-vrow .vc-link { order: -1; justify-content: space-between; min-height: 44px; padding: 0 14px;
    border: 1px solid var(--app-line); border-radius: 10px; background: var(--app-surface); font-size: 15px;
    text-decoration: none; }
  .vc-chev { display: inline-block; }
  .vc-check { display: flex; gap: 10px; min-height: 44px; font-size: 15px; }
  .vc-check input[type="checkbox"] { width: 22px; height: 22px; }

  .vc-fraum, .vc-explain { padding: 12px; }
  .vc-radio { min-height: 44px; align-items: center; padding: 4px 0; }
  .vc-check input[type="radio"] { width: 22px; height: 22px; margin: 0; }
  .vc-save { width: 100%; min-height: 48px; font-size: 16px; }
  .vc-note { height: auto; min-height: 76px; padding: 10px 12px; font-size: 16px; line-height: 1.35; resize: vertical;
    overflow: auto; white-space: pre-wrap; }
  .vc-fraum__actions { flex-direction: column; gap: 8px; }
  .vc-send { width: 100%; min-height: 48px; font-size: 16px; }
  .vc-cancel { width: 100%; min-height: 44px; font-size: 15px; }

  .vc-flag { font-weight: 600; }
  .vc-reopen { width: 100%; min-height: 44px; font-size: 15px; }
  .vc-when { font-size: 13px; }
}
