/* Crewvaluation : feuille du lot A — A11, pièces jointes d'une évaluation. N'emploie que les variables du thème
   Signal de style.css (aucune couleur codée en dur ; le lime seulement sur marine). */

.carte-pieces .pieces-entete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; }
.pieces-compteur {
  padding: 2px 12px; border-radius: var(--rayon-pastille);
  background: var(--bleu-pale); color: var(--marine); font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums;
}

.pieces-liste { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pieces-etat { padding: 6px 0; color: var(--texte-2); }
.piece {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 14px;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon);
}
.piece-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: var(--rayon-petit); font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
}
.piece-badge-image { background: var(--bleu-pale); color: var(--marine); }
.piece-badge-pdf { background: var(--marine); color: var(--lime); }
.piece-badge-doc { background: var(--bleu); color: var(--blanc); }
.piece-badge-tableur { background: var(--note-3); color: var(--note-3-texte); }
.piece-badge-texte, .piece-badge-autre { background: var(--surface-douce); color: var(--marine); box-shadow: inset 0 0 0 1px var(--bordure); }
.piece-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.piece-nom { font-weight: 700; overflow-wrap: anywhere; }
.piece-details { font-size: 13px; color: var(--texte-2); }
.piece-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.pieces-ajout { margin-top: 16px; }
.pieces-boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.pieces-aide { margin-top: 8px; }
/* « Prendre une photo » : seulement sur un écran tactile (téléphone, tablette). */
.pieces-bouton-photo { display: none; }
@media (hover: none) and (pointer: coarse) {
  .pieces-bouton-photo { display: inline-flex; }
}

.pieces-progression {
  display: grid; gap: 8px; margin-top: 14px; padding: 12px 14px;
  background: var(--bleu-pale); color: var(--marine); border-radius: var(--rayon);
}
.pieces-progression-ligne { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.pieces-progression-nom { font-weight: 700; overflow-wrap: anywhere; }
.pieces-pourcentage { font-weight: 800; font-variant-numeric: tabular-nums; }
.pieces-barre {
  width: 100%; height: 10px; border: 0; border-radius: var(--rayon-pastille); overflow: hidden;
  appearance: none; background: var(--surface); color: var(--bleu);
}
.pieces-barre::-webkit-progress-bar { background: var(--surface); border-radius: var(--rayon-pastille); }
.pieces-barre::-webkit-progress-value { background: var(--bleu); border-radius: var(--rayon-pastille); }
.pieces-barre::-moz-progress-bar { background: var(--bleu); border-radius: var(--rayon-pastille); }
.pieces-progression .bouton { justify-self: start; }
.pieces-erreur { margin-top: 12px; }

@media (max-width: 600px) {
  .piece { grid-template-columns: auto minmax(0, 1fr); padding: 10px; }
  .piece-actions { grid-column: 1 / -1; }
  .piece-actions .bouton, .pieces-boutons .bouton { flex: 1 1 0; }
  .pieces-progression .bouton { justify-self: stretch; }
}
