/* Fournitures du marché : la liste, l'ajout en trois temps, le choix depuis une fiche. Variables de style.css. */
.fo-ecran { display: grid; gap: 22px; }
.fo-ecran > * { min-width: 0; }
.fo-tete { display: grid; gap: 8px; }
.fo-chapeau { max-width: 720px; font-size: 17px; color: var(--texte-doux); }
.fo-reference { font-family: var(--mono); font-weight: 500; color: var(--encre); }

/* ------------------------------------------------------------------ liste */
.fo-filtres { display: flex; flex-wrap: wrap; gap: 10px; }
.fo-filtres .recherche { flex: 2 1 320px; }
.fo-filtres select { flex: 1 1 200px; width: auto; max-width: 320px; }
.fo-resultats { display: grid; gap: 12px; scroll-margin-top: 70px; }
.fo-filtres { scroll-margin-top: 70px; }
.fo-total { font-size: 14.5px; font-weight: 600; color: var(--texte-doux); }
.fo-article { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; }
.fo-identite { display: grid; gap: 3px; align-content: start; justify-items: start; min-width: 0; text-align: left; }
.fo-origine { display: block; font-size: 14.5px; color: var(--texte-doux); overflow-wrap: anywhere; }
.fo-article .lien.discret { margin-top: 4px; }
.fo-marge { display: flex; align-items: center; justify-content: flex-end; gap: 6px 14px; flex: none; }
.fo-trouvee .fo-marge { flex-direction: column; align-items: flex-end; }
.fo-composant { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 650; background: var(--info-clair); color: var(--info); max-width: 240px; text-align: center; }
.fo-composant.inconnu { background: var(--papier2); color: var(--texte-doux); border: 1px solid var(--trait); font-weight: 500; }
.fo-prix { font-family: var(--mono); font-weight: 500; color: var(--encre); white-space: nowrap; }
.fo-supprimer { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--texte-doux); }
.fo-supprimer:hover { color: var(--accent-sombre); border-color: var(--accent); background: var(--accent-clair); }
.fo-pages { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 14.5px; color: var(--texte-doux); }
.fo-vider { justify-self: start; }
.fo-vider:hover { color: var(--accent-sombre); }
.fo-panne > div { display: grid; gap: 10px; justify-items: start; }

/* ------------------------------------------------------------------ ajout */
.fo-retour { border: 0; background: none; padding: 0; justify-self: start; }
.fo-etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 14.5px; font-weight: 600; color: var(--texte-doux); }
.fo-etapes li { display: flex; align-items: center; gap: 8px; }
.fo-etapes span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 99px; border: 1px solid var(--trait-fort); background: var(--papier); font-size: 13px; }
.fo-etapes span svg { width: 14px; height: 14px; stroke-width: 2.6; }
.fo-etapes .ici { color: var(--encre); }
.fo-etapes .ici span { background: var(--encre); border-color: var(--encre); color: #fff; }
.fo-etapes .fait span { background: var(--succes-clair); border-color: transparent; color: var(--succes); }

.fo-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; max-width: 900px; }
.fo-source { display: grid; gap: 8px; align-content: start; justify-items: start; padding: 26px 24px; text-align: left; transition: border-color 0.12s, translate 0.12s; }
.fo-source:hover { border-color: var(--accent); translate: 0 -2px; }
.fo-source svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 6px; }
.fo-source h3 { font-size: 19px; }
.fo-source p { color: var(--texte-doux); }

.fo-depot { position: relative; display: grid; justify-items: center; gap: 10px; padding: 38px 20px; max-width: 900px; border: 2px dashed var(--trait-fort); border-radius: var(--rayon); background: var(--papier); text-align: center; cursor: pointer; }
.fo-depot:hover, .fo-depot.survol, .fo-depot:focus-within { border-color: var(--accent); }
.fo-depot.survol { background: var(--accent-clair); }
.fo-depot.occupe { opacity: 0.55; pointer-events: none; }
.fo-depot > svg { width: 36px; height: 36px; color: var(--texte-doux); }
.fo-depot strong { font-size: 19px; color: var(--encre); }
.fo-depot input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fo-collage, .fo-fournisseur { max-width: 900px; }
.fo-fournisseur, .fo-lot { max-width: 460px; }
.fo-ecran .erreur-formulaire, .fo-ecran .bandeau, .fo-note { max-width: 900px; }

.fo-fichier { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fo-fichier svg { color: var(--succes); stroke-width: 2.6; }
.fo-fichier .lien { margin-left: 8px; color: var(--accent-sombre); }
.fo-colonnes { display: grid; gap: 10px; }
.fo-colonnes .aide { max-width: 900px; font-size: 14.5px; }
.fo-defile { overflow-x: auto; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--papier); }
.fo-apercu { border-collapse: collapse; font-size: 14px; }
.fo-apercu th, .fo-apercu td { min-width: 170px; max-width: 260px; padding: 7px 10px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--trait); }
.fo-apercu tr:first-child th { padding: 8px 6px; background: var(--papier2); overflow: visible; }
.fo-apercu select { min-height: 40px; padding: 6px 8px; font-weight: 600; }
.fo-apercu tr:nth-child(2) th { color: var(--encre); font-weight: 650; border-bottom-color: var(--trait-fort); }
.fo-apercu tbody tr:last-child td { border-bottom: 0; }
.fo-apercu .ignoree { color: var(--trait-fort); text-decoration: line-through; }
.fo-apercu tr:first-child .ignoree { text-decoration: none; }
.fo-apercu .ignoree select { color: var(--texte-doux); font-weight: 400; }
/* Une colonne qui remplit une cote de la fiche se repère d'un coup d'œil. */
.fo-apercu .fiche { background: var(--info-clair); }
.fo-apercu .fiche select { color: var(--info); }

.fo-suites { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.fo-lancer { min-height: 54px; font-size: 17px; padding: 12px 24px; }
.fo-note { background: var(--alerte-clair); color: #5d3804; padding: 10px 12px; border-radius: var(--rayon); font-size: 14.5px; overflow-wrap: anywhere; }
.fo-references { max-width: 360px; font-family: var(--mono); font-size: 17px; }

.fo-avancement { height: 10px; max-width: 900px; }
.fo-compte { font-family: var(--mono); font-weight: 500; color: var(--encre); }
.fo-partiel { background: var(--papier); border: 1px solid var(--trait); }
.fo-ecran .bandeau > div { display: grid; gap: 8px; justify-items: start; }
.fo-ecran .bandeau strong { font-size: 18px; }
.fo-refus { display: grid; gap: 8px; max-width: 900px; }
.fo-refus details { background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 10px 14px; }
.fo-refus summary { cursor: pointer; font-weight: 600; color: var(--encre); }
.fo-nombre { margin-left: 6px; padding: 1px 9px; border-radius: 99px; background: var(--papier2); border: 1px solid var(--trait); font-size: 12.5px; color: var(--texte-doux); white-space: nowrap; }
.fo-refus details p { margin-top: 8px; font-size: 14px; overflow-wrap: anywhere; }

.fo-suivis { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-width: 900px; }
.fo-suivis li { display: grid; grid-template-columns: 22px 110px 1fr; align-items: center; gap: 10px; padding: 8px 12px; background: var(--papier); border: 1px solid var(--trait); border-radius: 6px; font-size: 14.5px; }
.fo-etat { display: grid; place-items: center; width: 22px; height: 22px; }
.fo-suivis [data-etat='attente'] { color: var(--texte-doux); }
.fo-suivis [data-etat='attente'] .fo-etat::before { content: ''; width: 8px; height: 8px; border-radius: 99px; background: var(--trait-fort); }
.fo-suivis [data-etat='encours'] .fo-etat::before { content: ''; width: 14px; height: 14px; border-radius: 99px; border: 2px solid var(--trait); border-top-color: var(--accent); animation: fo-tourne 0.8s linear infinite; }
.fo-suivis [data-etat='trouvee'] .fo-etat { color: var(--succes); }
.fo-suivis [data-etat='echec'] { background: var(--alerte-clair); border-color: transparent; color: #5d3804; }
@keyframes fo-tourne { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .fo-suivis [data-etat='encours'] .fo-etat::before { animation: none; } }

/* ------------------------------------------------------------------ choix depuis une fiche */
.fo-boite { width: min(760px, calc(100vw - 24px)); max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: 12px; background: var(--papier2); color: var(--texte); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6); }
.fo-boite[open] { display: flex; }
.fo-boite::backdrop { background: rgba(28, 28, 31, 0.55); }
.fo-cadre { display: flex; flex-direction: column; gap: 12px; width: 100%; min-height: 0; padding: 18px 20px 20px; }
.fo-cadre > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fo-cadre h2 { font-size: 20px; letter-spacing: 0; text-transform: none; color: var(--encre); }
.fo-fermer { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid var(--trait-fort); border-radius: 99px; background: var(--papier); }
.fo-fermer:hover { border-color: var(--encre); }
.fo-cadre .recherche { max-width: none; flex: none; }
.fo-case { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.fo-case input { width: 20px; height: 20px; accent-color: var(--accent); }
/* Seule la liste défile : la recherche reste sous les yeux. */
.fo-trouvees { display: grid; gap: 8px; align-content: start; flex: 1 1 auto; min-height: 120px; overflow-y: auto; margin: 0 -6px -6px; padding: 2px 6px 6px; }
.fo-trouvee { display: flex; justify-content: space-between; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); text-align: left; }
.fo-trouvee:hover { border-color: var(--accent); }
.fo-trouvee strong { color: var(--encre); font-weight: 650; }
.fo-cotes { font-size: 13px; font-weight: 650; color: var(--succes); white-space: nowrap; }
.fo-cotes.aucune { color: var(--texte-doux); font-weight: 500; }
.fo-trouvees > .bouton { justify-self: start; }

@media (max-width: 640px) {
  .fo-article, .fo-trouvee { flex-direction: column; align-items: stretch; gap: 8px; }
  .fo-marge { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
  .fo-article .fo-supprimer { margin-left: auto; }
  .fo-filtres select { flex-basis: 100%; max-width: none; }
  .fo-suivis li { grid-template-columns: 22px 1fr; }
  .fo-suivis li > :last-child { grid-column: 2; }
  .fo-boite { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
}
