/* Référentiel d'organismes natif Le Fil (spec 2026-09-24 § 10 ; js/organismes/admin.js, mon-organisme.js, formulaire.js) : écran admin #/admin/organismes, espace #/mon-organisme, accueil du rôle organisme,
   revendication d'une fiche. Remplace css/organismes.css (classes org-*, supprimé). Préfixe fog-, jetons --f-* de css/fil.css seulement ; s'appuie sur le kit du budget (css/fil-budget.css : fb-carte,
   fb-bouton, fb-champ, fb-saisie, fb-case, fb-puce, fb-note, fb-message) et sur css/fil-formulaire.css. Filets plutôt qu'ombres, cibles de 44 px et plus, aucun emoji. */
.fog-pile { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fog-bloc { min-width: 0; }
.fog-bloc > * + * { margin-top: 12px; }
.fog-bloc > .fb-carte-titre + *, .fog-bloc > .fb-carte-ligne + * { margin-top: 8px; }
.fog-texte { margin: 0; font: 400 16px/1.5 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fog-retour { align-self: flex-start; text-decoration: none; }
.fog-compte { margin: 0; }
.fb-puce[data-etat="refus"] { color: var(--f-urgent); border-color: var(--f-urgent); }
.fog .fb-message[data-etat="attention"] { color: var(--f-attention); }

/* Onglets de l'écran admin */
.fog-onglets { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 12px; background: var(--f-surface-2); border: 1px solid var(--f-filet); border-radius: 14px; }
.fog-onglet { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1 1 auto; min-height: 44px; padding: 0 14px; border-radius: 10px; color: var(--f-encre-2); font: 500 14px/1 Inter, system-ui, sans-serif; text-decoration: none; }
.fog-onglet:hover { color: var(--f-encre); }
.fog-onglet.est-actif { background: var(--f-encre); color: var(--f-fond); }
.fog-onglet-n { min-width: 22px; padding: 4px 6px; border-radius: 99px; background: var(--f-surface); color: var(--f-encre); font: 600 12px/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; text-align: center; }
.fog-onglet.est-actif .fog-onglet-n { background: var(--f-fond); color: var(--f-encre); }

/* Liste des fiches */
.fog-filtres { margin: 0 0 4px; }
.fog-liste { display: flex; flex-direction: column; }
.fog-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 6px; min-height: 64px; padding: 10px 0; border-top: 1px solid var(--f-filet); color: var(--f-encre); text-decoration: none; }
.fog-ligne:first-child { border-top: 0; }
.fog-ligne:hover { background: var(--f-surface-2); }
.fog-ligne-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fog-ligne-nom { font: 500 16px/1.3 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fog-ligne-meta { color: var(--f-encre-2); font: 400 14px/1.4 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fog-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.fog-ligne .fog-badges { justify-content: flex-end; }
@media (max-width: 520px) { .fog-ligne { grid-template-columns: minmax(0, 1fr); } .fog-ligne .fog-badges { justify-content: flex-start; } }

/* Provenance d'un champ : un point (anneau = public, plein = déclaré, carré = admin) et son libellé */
.fog-prov { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 6px; max-width: 100%; color: var(--f-encre-2); font: 400 12px/1.4 Inter, system-ui, sans-serif; }
.fog-prov-point { flex: none; width: 8px; height: 8px; border-radius: 50%; border: 2px solid currentColor; box-sizing: border-box; }
.fog-prov--declare { color: var(--f-encre); font-weight: 600; }
.fog-prov--declare .fog-prov-point { background: currentColor; }
.fog-prov--admin { color: var(--f-encre); }
.fog-prov--admin .fog-prov-point { background: currentColor; border-radius: 2px; }
.fog-prov--veille .fog-prov-point { border-style: dashed; }
.fog-prov--aucune { color: var(--f-encre-3); font-style: italic; }
.fog-prov-lien, .fog-lien-ext { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin-block: -16px; }
.fog-prov-lien { color: inherit; }

/* Fiche : en-tête, détails, actions */
.fog-fiche-nom { margin: 0; font: 600 24px/1.25 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fog-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 16px; margin: 0; }
.fog-detail { min-width: 0; }
.fog-detail dt { color: var(--f-encre-3); font: 500 12px/1.4 Inter, system-ui, sans-serif; }
.fog-detail dd { margin: 0; font: 400 14px/1.4 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fog-actions-fiche { display: flex; flex-direction: column; gap: 8px; }
.fog-actions-fiche .fb-actions { margin-top: 0; }
.fog-zone { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--f-filet); border-radius: 18px; background: var(--f-surface-2); }
.fog-zone .fb-actions { margin-top: 0; }

/* Formulaire de fiche, par groupes */
.fog-form { display: flex; flex-direction: column; gap: 20px; }
.fog-groupe { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fog-groupe-titre { margin: 0; padding-bottom: 6px; border-bottom: 1px solid var(--f-filet); }
.fog-groupe-note { margin: 0; }
.fog-groupe-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px 16px; }
.fog-champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fog-champ--liste, .fog-champ--texte, .fog-champ--regions, .fog-champ--url { grid-column: 1 / -1; }
.fog-compteur { align-self: flex-end; font-variant-numeric: tabular-nums; }
.fog-cases { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fog-cases > legend { padding: 0; margin-bottom: 4px; color: var(--f-encre-2); font: 500 14px/1.3 Inter, system-ui, sans-serif; }
.fog-cases-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0 12px; }
.fog-champ--periodes .fog-cases-grille { grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); }
.fog-cases .fb-case-lib { overflow-wrap: anywhere; }
.fog-champ .fb-saisie[aria-invalid="true"], .fog-cases [aria-invalid="true"] { border-color: var(--f-urgent); outline: 1px solid var(--f-urgent); }

/* Barre d'enregistrement : en fin de formulaire, collée en bas dès la première saisie */
.fog-barre { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--f-filet); }
.fog-barre.est-sale { position: sticky; bottom: var(--nav-bas-h, 0px); z-index: 5; margin-inline: -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--f-surface); border-top: 1px solid var(--f-encre-3); }
.fog-barre-ligne { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.fog-barre .fb-message { margin: 0; }
.fog-enregistrer { min-width: 150px; }
@media (max-width: 640px) { .fog-barre-ligne .fog-enregistrer { flex: 1 1 auto; } }

/* Blocs secondaires : citations, historique, signalements, revendications, veille */
.fog-citation { margin: 0; padding: 10px 14px; border-left: 2px solid var(--f-encre-3); display: flex; flex-direction: column; gap: 8px; }
.fog-citation-texte { margin: 0; font: 400 16px/1.5 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fog-citation-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 400 14px/1.4 Inter, system-ui, sans-serif; }
.fog-citation-saisie { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; border-top: 1px solid var(--f-filet); }
.fog-histo-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fog-histo-ligne { padding: 10px 0; border-top: 1px solid var(--f-filet); min-width: 0; }
.fog-histo-ligne:first-child { border-top: 0; }
.fog-histo-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fog-histo-champ { font: 600 14px/1.3 Inter, system-ui, sans-serif; }
.fog-histo-origine { font: 400 12px/1.4 Inter, system-ui, sans-serif; color: var(--f-encre-2); }
.fog-histo-date { margin-left: auto; color: var(--f-encre-3); font: 400 12px/1.4 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.fog-histo-diff { margin: 4px 0 0; color: var(--f-encre-2); font: 400 14px/1.45 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fog-histo-avant { color: var(--f-encre-3); text-decoration: line-through; }
.fog-histo-apres { color: var(--f-encre); }
.fog-items { display: flex; flex-direction: column; }
.fog-item { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--f-filet); min-width: 0; }
.fog-item:first-child { border-top: 0; }
.fog-item-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.fog-item-titre { font: 600 16px/1.3 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fog-item .fb-actions { margin-top: 0; }
.fog-mention { margin: 0; font: 500 14px/1.4 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fog-mention[data-etat="attention"] { color: var(--f-attention); }
.fog-message { margin: 0; font: 400 16px/1.5 Inter, system-ui, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.fog-proches { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--f-encre-2); font: 400 14px/1.45 Inter, system-ui, sans-serif; }
.fog-proches li { overflow-wrap: anywhere; }
.fog-sentinelle[data-etat="erreur"] { color: var(--f-urgent); }
.fog-sentinelle[data-etat="ok"] { color: var(--f-fait); }

/* Import */
.fog-import-rapport { display: flex; flex-direction: column; gap: 10px; }
.fog-import-synthese { margin: 0; font: 400 16px/1.5 Inter, system-ui, sans-serif; }
.fog-refuses { margin: 0; padding-left: 18px; color: var(--f-urgent); font: 400 14px/1.45 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fog-import-lancer { min-width: 170px; }

/* Accueil du rôle organisme et revendication */
.fog-accueil-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.fog-tuile { display: flex; flex-direction: column; gap: 8px; min-height: 120px; color: var(--f-encre); text-decoration: none; }
.fog-tuile:hover { background: var(--f-surface-2); }
.fog-tuile-titre { font: 600 18px/1.3 Inter, system-ui, sans-serif; }
.fog-tuile-texte { color: var(--f-encre-2); font: 400 14px/1.45 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fog-demande { display: flex; flex-direction: column; gap: 12px; }
.fog-demande .fb-actions { margin-top: 0; }
.fog-exp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
