/* Les activités, natives Le Fil (js/activites/ : « Trouver », la fiche, créer / modifier, l'historique des versions, les schémas de terrain).
   Préfixe fat-, jetons --f-* de css/fil.css. Ces écrans parlent le kit du budget (css/fil-budget.css : .fb, .fb-carte, .fb-bouton, .fb-segments, .fb-repli, .fb-champ…) ;
   ce fichier ne porte que ce qui leur est propre. Style de Le Fil : encre, filets, aucune couleur décorative (ambre = ce qui manque, sapin = fait), cibles de 44 px et plus,
   sept tailles de texte (12, 14, 16, 18, 24, 30, 64), aucun effet. L'en-tête est l'en-tête commun (js/fil/entete.js, préfixe fh-).
   Remplace css/activites.css, css/activites-trouver.css et css/activites-edition.css (classiques, supprimés). Les pictogrammes SVG (js/activites/pictos.js) et les
   schémas de terrain (js/activites/schema.js, classes .sch-*) sont de l'illustration : leurs couleurs viennent des jetons du Fil.
   Piège payé : css/fil-habillage.css pose font et hauteur sur tout input / select (spécificité > une classe) : une saisie plus grande s'écrit `:root [data-app] .fat-…`. */

.fat-page, .fat-contenu { min-width: 0; }
.fat [hidden] { display: none !important; }
.fat-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fat-vide { color: var(--f-encre-2); }
.fat-pied { margin: 16px 0 0; }
.fat-message { margin: 0 0 12px; }
.fat-message .fb-message { margin: 0 0 12px; }
.fat-kicker { margin: 0; color: var(--f-encre-2); font: 500 14px/1.4 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.fat-sous { margin: 14px 0 4px; color: var(--f-encre-2); font: 500 14px/1.4 Inter, system-ui, sans-serif; }
.fat-svg-absent { display: inline-block; width: 20px; height: 20px; }

/* ---------- Pictogrammes (js/activites/pictos.js) : au trait, à l'encre, toujours avec leur libellé ---------- */
.fat-picto { display: inline-flex; align-items: center; gap: 8px; }
.fat-picto-svg { flex: none; width: 20px; height: 20px; color: var(--f-encre-2); }
.fat-picto-vide { display: inline-block; width: 20px; height: 20px; flex: none; }

/* ---------- Fiche : identité, barre (lectures + actions), grille ---------- */
.fat-ident { margin: 0 0 14px; }
.fat-ident-haut { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 6px; }
.fat-ident-titre { margin: 0 0 4px; font: 600 24px/1.25 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-phrase { max-width: 62ch; margin: 6px 0 0; font: 400 18px/1.5 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-analogie { max-width: 62ch; margin: 8px 0 0; color: var(--f-encre-2); font: 400 16px/1.5 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-alias { margin: 8px 0 0; color: var(--f-encre-2); font: 400 14px/1.4 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-manque { max-width: 62ch; margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--f-attention); border-radius: 0 14px 14px 0; background: var(--f-surface); font: 400 14px/1.45 Inter, system-ui, sans-serif; }
.fat-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--f-filet); }
.fat-barre .fb-segments { margin: 0; }
.fat-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fat-grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; align-items: start; }
.fat-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; margin: 0 0 12px; }
.fat-col > .fb-carte, .fat-col > p { margin: 0; }
.fat-col:empty { display: none; }
@media (min-width: 1000px) {
  .fat-grille { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .fat-fiche[data-lecture="preparer"] .fat-grille { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .fat-grille:has(> .fat-col-g:only-child) { grid-template-columns: minmax(0, 1fr); }
}

/* Carte d'identité complète (Découvrir) et express (Terrain, Préparer) */
.fat-carte-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0 20px; margin: 4px 0 0; }
.fat-carte-i { min-width: 0; padding: 10px 0; border-top: 1px solid var(--f-filet); }
.fat-carte-i dt { display: flex; align-items: center; gap: 8px; color: var(--f-encre-2); font: 500 14px/1.3 Inter, system-ui, sans-serif; }
.fat-carte-i dd { margin: 4px 0 0 28px; min-width: 0; }
.fat-carte-v { display: block; font: 500 16px/1.4 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-carte-d { display: block; margin-top: 2px; color: var(--f-encre-2); font: 400 14px/1.4 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-express { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; padding: 0; list-style: none; }
.fat-express li { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--f-filet); border-radius: 14px; background: var(--f-surface); font: 500 14px/1.3 Inter, system-ui, sans-serif; }

/* Blocs de texte */
.fat-bloc { min-width: 0; }
.fb-carte > .fat-bloc + .fat-bloc { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--f-filet); }
.fat-groupe > .fb-carte-ligne { margin-bottom: 10px; }
.fat-h { margin: 0 0 6px; font: 600 16px/1.3 Inter, system-ui, sans-serif; }
.fat-fiche .fat-bloc p { max-width: 68ch; margin: 0; font: 400 16px/1.5 Inter, system-ui, sans-serif; white-space: pre-line; overflow-wrap: anywhere; }
.fat-fiche .fat-bloc p + p { margin-top: 8px; }
.fat-puces { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font: 400 16px/1.5 Inter, system-ui, sans-serif; }
.fat-exemple { color: var(--f-encre-2); }
.fat-securite { padding-left: 12px; border-left: 3px solid var(--f-attention); }
.fat-a-dire { margin: 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--f-encre); }
.fat-fiche .fat-a-dire p { font-size: 18px; }
.fat-pourquoi { color: var(--f-encre); }
.fat-tout-voir-l { margin: 4px 0 0; }

/* Étapes : numéro, texte, minutage */
.fat-etapes { margin: 0; padding: 0; list-style: none; }
.fat-etapes li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--f-filet); }
.fat-etapes li:first-child { border-top: 0; }
.fat-et-n { color: var(--f-encre-2); font: 600 18px/1.2 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.fat-et-t { min-width: 0; font: 400 16px/1.5 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-et-m { padding: 2px 8px; border: 1px solid var(--f-filet); border-radius: 10px; color: var(--f-encre-2); font: 500 12px/1.4 Inter, system-ui, sans-serif; white-space: nowrap; }
.fat-fiche .fat-bloc .fat-etapes-total { margin-top: 8px; color: var(--f-encre-2); font-size: 14px; }

/* Ajuster, rôles, postes : définitions */
.fat-ajuster, .fat-roles { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.fat-ajuster dt, .fat-roles dt { font: 600 14px/1.4 Inter, system-ui, sans-serif; }
.fat-ajuster dd, .fat-roles dd { margin: 2px 0 0; font: 400 16px/1.5 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }

/* Préparer */
.fat-tableau { overflow-x: auto; }
.fat-materiel { width: 100%; border-collapse: collapse; font: 400 14px/1.4 Inter, system-ui, sans-serif; }
.fat-materiel th { padding: 0 12px 8px 0; border-bottom: 1px solid var(--f-filet); color: var(--f-encre-2); font-weight: 500; text-align: left; }
.fat-materiel td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--f-filet); vertical-align: top; overflow-wrap: anywhere; }
.fat-materiel td:not(:first-child), .fat-materiel th:not(:first-child) { white-space: nowrap; }
.fat-temps { font-weight: 500; }

/* Famille et variantes */
.fat-fam-nom { font: 600 16px/1.3 Inter, system-ui, sans-serif; }
.fat-liens { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 0; padding: 0; list-style: none; }
.fat-liens a { display: inline-flex; align-items: center; min-height: 44px; color: var(--f-encre); text-underline-offset: 3px; }

/* Lecture Terrain : gros texte */
.fat-fiche[data-lecture="terrain"] .fat-bloc p, .fat-fiche[data-lecture="terrain"] .fat-puces, .fat-fiche[data-lecture="terrain"] .fat-et-t,
.fat-fiche[data-lecture="terrain"] .fat-ajuster dd { font-size: 18px; }
.fat-fiche[data-lecture="terrain"] .fat-h { font-size: 18px; }
.fat-fiche[data-lecture="terrain"] .fat-express li { font-size: 16px; }

/* ---------- Schéma du terrain (js/activites/schema.js) : trait à l'encre, deux équipes aux couleurs dédiées (--f-equipe-a / -b, sans sens) ---------- */
.fat-schema { max-width: 480px; margin: 10px 0 0; }
.fat-schema svg { display: block; width: 100%; height: auto; color: var(--f-encre); }
.sch .sch-txt { fill: currentColor; font-size: 13px; font-weight: 500; }
.sch .sch-txt-fort { font-weight: 650; }
.sch .sch-txt-2 { fill: var(--f-encre-2); }
.sch .sch-txt-l { font-weight: 450; }
.sch .sch-txt-p { font-size: 13px; font-weight: 600; }
.sch .sch-txt-n { font-size: 14px; font-weight: 700; }
.sch .sch-halo { paint-order: stroke; stroke: var(--f-surface); stroke-width: 4px; stroke-linejoin: round; }
.sch .sch-trait { fill: none; stroke: currentColor; stroke-width: 1.6; }
.sch .sch-fin { stroke-width: 1; opacity: .55; }
.sch .sch-pointe { stroke-linecap: round; stroke-linejoin: round; }
.sch .sch-tirets { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-dasharray: 6 4; }
.sch .sch-ligne-forte { stroke: currentColor; stroke-width: 3; }
.sch .sch-a { fill: var(--f-equipe-a); fill-opacity: .2; }
.sch .sch-b { fill: var(--f-equipe-b); fill-opacity: .2; }
.sch .sch-n { fill: currentColor; fill-opacity: .05; }
.sch .sch-joueur { stroke: currentColor; stroke-width: 1; }
.sch .sch-joueur-a { fill: var(--f-equipe-a); }
.sch .sch-joueur-b { fill: var(--f-equipe-b); }
.sch .sch-joueur-n { fill: currentColor; }
.sch .sch-fanion { stroke: currentColor; stroke-width: 1; stroke-linejoin: round; }
.sch .sch-plot { fill: currentColor; }
.sch .sch-plein { fill: currentColor; }
.sch .sch-chasseur { fill: var(--f-surface); stroke: currentColor; stroke-width: 2.4; }
.sch .sch-ballon { fill: var(--f-surface); stroke: currentColor; stroke-width: 1.6; }
.sch .sch-arbre { fill: currentColor; fill-opacity: .1; stroke: currentColor; stroke-width: 1.4; }
.sch .sch-prison { fill: currentColor; fill-opacity: .06; stroke: currentColor; stroke-width: 1.4; stroke-dasharray: 3 3; }
.sch .sch-base { fill: var(--f-surface); stroke: currentColor; stroke-width: 2; }
.sch .sch-poste { fill: var(--f-surface); stroke: currentColor; stroke-width: 2; }
.sch .sch-circuit { fill: none; stroke: currentColor; stroke-width: 6; stroke-opacity: .16; }
.sch .sch-sans-fond { fill: none; }

/* ---------- Trouver : vues, situation en phrase, raccourcis, filtres ---------- */
.fat-biblio { min-width: 0; }
.fat-vue-n { margin-left: 6px; opacity: .8; font-variant-numeric: tabular-nums; }
.fat-trouver { display: flex; flex-direction: column; gap: 14px; margin: 0 0 14px; padding: 16px; background: var(--f-surface); border: 1px solid var(--f-filet); border-radius: 24px; }
.fat-sit-phrase { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font: 500 18px/1.4 Inter, system-ui, sans-serif; }
.fat-sit-c { display: inline-flex; align-items: center; gap: 6px; }
.fat-sit-m { color: var(--f-encre-2); }
.fat-sit-sep { display: none; }
@media (max-width: 639px) { .fat-vues .fb-segment { padding: 0 4px; } .fat-vue-n { margin-left: 4px; } }
.fat-zone-resultats > .fb-note { margin: 0 0 10px; }
:root [data-app] .fat-sit .fat-sit-i { width: 72px; min-height: 48px; padding: 8px; text-align: center; font: 500 18px/1.2 Inter, system-ui, sans-serif; }
:root [data-app] .fat-sit .fat-sit-i[name="ages"] { width: 88px; }
:root [data-app] .fat-sit .fat-sit-i[name="animateurs"] { width: 64px; }
:root [data-app] .fat-sit .fat-sit-i[name="minutes"] { width: 80px; }
:root [data-app] .fat-sit .fat-sit-s { width: auto; max-width: 100%; padding: 8px 12px; text-align: left; font: 500 16px/1.3 Inter, system-ui, sans-serif; cursor: pointer; }
.fat-dire { max-width: 62rem; }
.fat-dire-r { display: flex; flex-wrap: wrap; gap: 8px; }
:root [data-app] .fat-dire .fat-dire-i { flex: 1 1 260px; width: auto; min-width: 0; }
.fat-dire-retour { margin: 8px 0 0; color: var(--f-encre-2); font: 400 14px/1.4 Inter, system-ui, sans-serif; }
.fat-dire-retour:empty { display: none; }
.fat-raccs { display: flex; flex-wrap: wrap; gap: 8px; }
.fat-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--f-filet); border-radius: 99px; background: var(--f-surface); color: var(--f-encre); font: 500 14px/1.2 Inter, system-ui, sans-serif; cursor: pointer; }
.fat-chip:hover { background: var(--f-surface-2); }
.fat-chip[aria-pressed="true"] { background: var(--f-encre); border-color: var(--f-encre); color: var(--f-fond); }
.fat-raccourcis { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fat-recherche { margin: 0 0 14px; }
.fat-rech { max-width: 34rem; }
.fat-resume { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--f-encre-3); border-radius: 0 14px 14px 0; background: var(--f-surface); font: 400 14px/1.45 Inter, system-ui, sans-serif; }
.fat-filtres { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.fat-filtre { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--f-encre-3); border-radius: 99px; background: var(--f-surface); color: var(--f-encre); font: 500 14px/1.2 Inter, system-ui, sans-serif; cursor: pointer; }
.fat-filtre-x { color: var(--f-encre-2); font: 400 18px/1 Inter, system-ui, sans-serif; }
.fat-filtre-efface { border-color: var(--f-filet); color: var(--f-encre-2); }

/* Résultats : titre de zone, cartes, rayons */
.fat-zone-titre { margin: 18px 0 10px; font: 600 18px/1.3 Inter, system-ui, sans-serif; }
.fat-zone-titre:first-child { margin-top: 0; }
.fat-res-n { margin-left: 4px; color: var(--f-encre-2); font: 500 14px/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.fat-res-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.fat-res { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px; background: var(--f-surface); border: 1px solid var(--f-filet); border-radius: 24px; cursor: pointer; }
.fat-res:hover { background: var(--f-surface-2); }
.fat-res-brouillon { border-left: 3px solid var(--f-attention); }
.fat-res-variante { margin-left: 16px; }
.fat-res-haut { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.fat-res-titre { margin: -6px 0 -4px; font: 600 18px/1.3 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-res-lien { display: inline-flex; align-items: center; min-height: 44px; color: var(--f-encre); text-decoration: none; }
.fat-res-lien:hover { text-decoration: underline; text-underline-offset: 3px; }
.fat-res-phrase { margin: 0; color: var(--f-encre-2); font: 400 14px/1.45 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-res-manque { margin: 0; font: 400 14px/1.45 Inter, system-ui, sans-serif; color: var(--f-attention); }
.fat-res-manque-socle { color: var(--f-encre-2); }
.fat-res-pictos { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.fat-pf { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border: 1px solid var(--f-filet); border-radius: 14px; background: transparent; color: var(--f-encre); font: 500 14px/1.2 Inter, system-ui, sans-serif; cursor: pointer; }
.fat-pf:hover { background: var(--f-surface-2); }
.fat-res-actions { margin-top: 6px; }
.fat-sel { width: 100%; }
.fat-vide-res { margin: 8px 0; }
.fat-relacher { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0; padding: 12px 14px; border: 1px solid var(--f-filet); border-radius: 18px; background: var(--f-surface); }
.fat-relacher p { margin: 0; flex: 1 1 240px; font: 400 14px/1.45 Inter, system-ui, sans-serif; }
.fat-rayons { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; margin-top: 12px; align-items: start; }
.fat-rayon > .fb-carte-ligne { margin-bottom: 8px; }
.fat-rayon-l { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.fat-rayon-l li { border-top: 1px solid var(--f-filet); }
.fat-rayon-l li:first-child { border-top: 0; }
.fat-rayon-b { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 0 4px; border: 0; background: transparent; color: var(--f-encre); font: 500 16px/1.3 Inter, system-ui, sans-serif; text-align: left; cursor: pointer; }
.fat-rayon-b:hover { background: var(--f-surface-2); }
.fat-rayon-n { color: var(--f-encre-2); font: 500 14px/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.fat-tout-p { margin: 14px 0 0; }
.fat-famille-page { margin: 0 0 12px; }
.fat-fam-titre { margin: 2px 0 6px; font: 600 24px/1.25 Inter, system-ui, sans-serif; }
.fat-famille-page .fat-fam-meca { margin: 0; font: 400 16px/1.5 Inter, system-ui, sans-serif; max-width: 62ch; }
.fat-famille-page .fat-fam-ex { margin: 6px 0 0; color: var(--f-encre-2); font: 400 14px/1.45 Inter, system-ui, sans-serif; }
@media (max-width: 899px) { .fat-retour-sel, .fat-creer { flex: 1 1 auto; } }

/* ---------- Créer / modifier ---------- */
.fat-edition { display: flex; flex-direction: column; min-width: 0; }
.fat-progres { margin: 0 0 14px; }
.fat-pas { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fat-pas-b { width: 44px; height: 44px; padding: 0; border: 1px solid var(--f-filet); border-radius: 50%; background: var(--f-surface); color: var(--f-encre-2); font: 600 14px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.fat-pas li[data-fait="oui"] .fat-pas-b { background: var(--f-encre); border-color: var(--f-encre); color: var(--f-fond); }
.fat-progres-t { margin: 8px 0 0; color: var(--f-encre-2); font: 400 14px/1.4 Inter, system-ui, sans-serif; }
.fat-progres-t strong { color: var(--f-encre); font-weight: 600; }
.fat-alertes:empty { display: none; }
.fat-bandeau { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--f-encre-3); border-radius: 0 14px 14px 0; background: var(--f-surface); font: 400 14px/1.45 Inter, system-ui, sans-serif; }
.fat-bandeau-ok { border-left-color: var(--f-fait); }
.fat-bandeau-erreur { border-left-color: var(--f-urgent); }
.fat-grille-ed { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.fat-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fat-form > .fb-carte { margin: 0; }
.fat-apercu { min-width: 0; }
@media (min-width: 1100px) {
  .fat-grille-ed { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: start; }
  .fat-apercu { position: sticky; top: 88px; max-height: calc(100dvh - 104px); overflow: auto; order: 2; }
}
.fat-apercu-d { padding: 4px 16px; background: var(--f-surface); border: 1px solid var(--f-filet); border-radius: 24px; }
.fat-apercu-barre { margin: 0 0 12px; }
.fat-apercu-corps .fat-grille { grid-template-columns: minmax(0, 1fr); }
.fat-apercu-corps .fb-carte { padding: 12px; }

/* Étapes racontées */
.fat-etape { display: flex; flex-direction: column; gap: 12px; }
.fat-etape[data-fait="oui"] { border-left: 3px solid var(--f-fait); }
.fat-etape-t { display: flex; align-items: baseline; gap: 12px; margin: 0; font: 600 18px/1.3 Inter, system-ui, sans-serif; }
.fat-n { min-width: 24px; color: var(--f-encre-2); font: 600 24px/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.fat-champ + .fat-champ { margin-top: 12px; }
.fat-aide { margin: 0; }
.fat-aide:empty { display: none; }
.fat-erreur { margin: 0; color: var(--f-urgent); font: 500 14px/1.4 Inter, system-ui, sans-serif; }
.fat-en-erreur > .fb-champ-lib { color: var(--f-urgent); }
.fat-en-erreur .fb-saisie { border-color: var(--f-urgent); }
:root [data-app] .fat .fat-input-grand { min-height: 56px; font: 600 24px/1.25 Inter, system-ui, sans-serif; }
.fat-texte { min-height: 88px; max-height: 24rem; }
.fat-texte-ligne { min-height: 64px; }
.fb .fat-nombre { width: 88px; text-align: center; }
.fb .fat-nombre-petit { width: 80px; }
.fb .fat-select { width: auto; max-width: 100%; }
.fb .fat-select-court { min-width: 9rem; }
.fat-paire { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fat-mini { display: inline-flex; align-items: center; gap: 6px; font: 400 14px/1.3 Inter, system-ui, sans-serif; }
.fat-unite { color: var(--f-encre-2); font: 400 14px/1.3 Inter, system-ui, sans-serif; }
.fat-minutes { display: inline-flex; align-items: center; gap: 6px; }

/* Puces de choix : un <input> caché sous une étiquette de 44 px (l'état se lit sur :checked) */
.fat-choix-groupe { display: flex; flex-wrap: wrap; gap: 8px; }
.fat-choix { position: relative; display: inline-flex; }
.fat-choix input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fat-choix-lib { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--f-filet); border-radius: 99px; background: var(--f-surface); color: var(--f-encre); font: 500 14px/1.2 Inter, system-ui, sans-serif; }
.fat-choix input:checked + .fat-choix-lib { background: var(--f-encre); border-color: var(--f-encre); color: var(--f-fond); }
.fat-choix input:focus-visible + .fat-choix-lib { outline: 2px solid var(--f-encre); outline-offset: 2px; }
.fat-choix input:disabled + .fat-choix-lib { opacity: .5; }
.fat-autres { margin-top: 10px; }
.fat-autres > summary { display: flex; align-items: center; min-height: 44px; margin-bottom: 8px; color: var(--f-encre-2); font: 500 14px/1.3 Inter, system-ui, sans-serif; cursor: pointer; }

/* Doublons, variante, famille choisie */
.fat-doublon-c { padding: 12px 14px; border: 1px solid var(--f-filet); border-left: 3px solid var(--f-attention); border-radius: 18px; background: var(--f-surface-2); }
.fat-doublon-t { margin: 0 0 4px; font: 600 16px/1.3 Inter, system-ui, sans-serif; }
.fat-doublon-l { display: flex; flex-direction: column; margin: 8px 0 0; padding: 0; list-style: none; }
.fat-doublon-i { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--f-filet); }
.fat-doublon-texte { flex: 1 1 220px; min-width: 0; }
.fat-doublon-nom { margin: 0; font: 500 16px/1.3 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-doublon-meta { color: var(--f-encre-2); font-weight: 400; }
.fat-doublon-phrase { margin: 2px 0 0; color: var(--f-encre-2); font: 400 14px/1.4 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-doublon-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fat-doublon-fin { margin: 10px 0 0; }
.fat-variante { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; }
.fat-variante-t { font: 500 14px/1.3 Inter, system-ui, sans-serif; }
.fat-famille { padding: 12px 14px; border: 1px solid var(--f-filet); border-radius: 18px; background: var(--f-surface-2); }
.fat-famille-nom { margin: 0; font: 600 16px/1.3 Inter, system-ui, sans-serif; }
.fat-famille-meca, .fat-famille-ex, .fat-defauts { margin: 6px 0 0; font: 400 14px/1.45 Inter, system-ui, sans-serif; }
.fat-famille-ex { color: var(--f-encre-2); }
.fat-defauts { color: var(--f-fait); }

/* Listes éditables : étapes, sécurité, matériel… */
.fat-lignes { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fat-ligne { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 6px 10px; align-items: start; padding: 10px; border: 1px solid var(--f-filet); border-radius: 18px; background: var(--f-surface-2); }
.fat-ligne-n { color: var(--f-encre-2); font: 600 14px/44px Inter, system-ui, sans-serif; text-align: center; font-variant-numeric: tabular-nums; }
.fat-ligne-corps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.fat-ligne-corps > textarea, .fat-ligne-corps > .fat-input { flex: 1 1 100%; }
.fat-ligne-actions { grid-column: 2; display: flex; justify-content: flex-end; gap: 6px; }
.fat-ico { width: 44px; height: 44px; padding: 0; border: 1px solid var(--f-filet); border-radius: 14px; background: var(--f-surface); color: var(--f-encre); font: 500 18px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.fat-ico:disabled { opacity: .4; cursor: default; }
.fat-ico-retirer { color: var(--f-urgent); }
@media (min-width: 720px) {
  .fat-ligne { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .fat-ligne-actions { grid-column: auto; }
  .fat-ligne-etapes > textarea { flex: 1 1 320px; }
}
.fat-ajouter { margin: 10px 0 0; }
.fat-jauge { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 4px 0 0; color: var(--f-encre-2); font: 400 12px/1.4 Inter, system-ui, sans-serif; }
.fat-jauge:empty { display: none; }
.fat-jauge[data-etat="long"] .fat-jauge-a, .fat-jauge[data-etat="plein"] .fat-jauge-a { color: var(--f-attention); }
.fat-jauge-s { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Publication, conflit */
.fat-publier { display: flex; flex-direction: column; gap: 8px; }
.fat-statut { margin: 0; font: 600 16px/1.3 Inter, system-ui, sans-serif; }
.fat-statut[data-etat="brouillon"], .fat-statut[data-etat="bloque"] { color: var(--f-attention); }
.fat-statut[data-etat="pret"] { color: var(--f-fait); }
.fat-boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.fat-alerte { margin: 4px 0 0; padding: 10px 12px; border-left: 3px solid var(--f-urgent); border-radius: 0 14px 14px 0; background: var(--f-surface-2); font: 500 14px/1.4 Inter, system-ui, sans-serif; }
.fat-conflit { margin: 0 0 12px; padding: 14px; border: 1px solid var(--f-filet); border-left: 3px solid var(--f-attention); border-radius: 18px; background: var(--f-surface); font: 400 14px/1.45 Inter, system-ui, sans-serif; }
.fat-conflit p { margin: 0 0 6px; }
.fat-conflit-t { font-weight: 600; }
.fat-conflit-e { color: var(--f-attention); }
.fat-precis { border-top: 1px solid var(--f-filet); }

/* Schéma du terrain, dans l'éditeur */
.fat-schema-reglages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px 16px; margin-top: 12px; }
.fat-schema-apercu { margin-top: 12px; }

/* ---------- Historique des versions ---------- */
.fat-versions { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.fat-version { padding: 12px 0; border-top: 1px solid var(--f-filet); }
.fat-version:first-child { border-top: 0; }
.fat-version[data-courante="oui"] { border-left: 3px solid var(--f-fait); padding-left: 12px; }
.fat-v-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.fat-v-n { font: 600 16px/1.3 Inter, system-ui, sans-serif; }
.fat-v-motif { color: var(--f-encre-2); font: 500 14px/1.3 Inter, system-ui, sans-serif; }
.fat-v-meta { margin: 2px 0 0; color: var(--f-encre-2); font: 400 14px/1.4 Inter, system-ui, sans-serif; }
.fat-v-resume { margin: 4px 0 0; font: 400 14px/1.45 Inter, system-ui, sans-serif; overflow-wrap: anywhere; }
.fat-v-action { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) { .fat *, .fat *::before, .fat *::after { transition: none !important; animation: none !important; } }
@media print {
  .fat-barre, .fat-actions, .fat-apercu, .fat-pied { display: none !important; }
  .fat-grille { grid-template-columns: minmax(0, 1fr); }
}
