/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════
   DTISoft — Fiches techniques (chantier « Pilotage », lot 8, 2026-10-27) — js/modules/fiches-tech.js. Préfixe ft-.
   Fenêtres enfants directs de <body> (.ft-overlay : DTIOverlay les reconnaît par « -overlay »), z-index en ligne :
   lot / import 10300 (au-dessus des Options 10000), formulaires 10900, aperçu PDF 10700, messages 10950.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */
.ft-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; }
.ft-fenetre { background: #fff; border-radius: 8px; box-shadow: 0 10px 34px rgba(0, 0, 0, .3); display: flex; flex-direction: column;
              width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); min-width: 0; font-size: 13px; color: #1f2937; }
.ft-fenetre--msg { width: min(460px, calc(100vw - 32px)); }
.ft-fenetre--form { width: min(620px, calc(100vw - 32px)); }
.ft-fenetre--large { width: min(980px, calc(100vw - 32px)); height: min(760px, calc(100vh - 32px)); }
.ft-fenetre--apercu { width: min(1000px, calc(100vw - 32px)); height: calc(100vh - 32px); }
.ft-tete { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #f5f5f5; border-bottom: 1px solid #ddd; border-radius: 8px 8px 0 0; }
.ft-titre { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-corps { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ft-pied { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid #e5e7eb; flex-wrap: wrap; }
.ft-msg { margin: 0 0 6px; line-height: 1.45; }
.ft-btn { padding: 6px 12px; border: 1px solid #d1d5db; background: #fff; color: #374151; border-radius: 4px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.ft-btn:hover:not(:disabled) { background: #f3f4f6; }
.ft-btn:disabled { opacity: .55; cursor: not-allowed; }
.ft-btn:focus-visible, .ft-input:focus-visible, .ft-select:focus-visible, .ft-textarea:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }
.ft-btn--prim { background: #2563eb; border-color: #2563eb; color: #fff; }
.ft-btn--prim:hover:not(:disabled) { background: #1d4ed8; }
.ft-btn--icone { border: none; background: none; padding: 4px 6px; color: #6b7280; }
.ft-btn--lien { border: none; background: none; color: #2563eb; padding: 2px 4px; font-size: 12px; }
.ft-btn--langue { min-width: 42px; }
.ft-btn--langue.ft-actif { background: #1e40af; border-color: #1e40af; color: #fff; }
.ft-barre { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ft-langues { display: flex; gap: 4px; }
.ft-notes:empty { display: none; }
.ft-avert { margin: 0; padding: 6px 10px 6px 26px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 4px; color: #78350f; font-size: 12px; }
.ft-avert li { margin: 2px 0; }
.ft-pdf-zone { flex: 1; min-height: 0; display: flex; color: #6b7280; }
.ft-pdf { flex: 1; width: 100%; min-height: 420px; border: 1px solid #e5e7eb; border-radius: 4px; }
.ft-etat { padding: 10px; color: #6b7280; }
.ft-etat--erreur { color: #b91c1c; }
.ft-info { padding: 6px 10px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 4px; color: #1e3a8a; font-size: 12px; }
.ft-aide { color: #6b7280; font-size: 12px; line-height: 1.4; }
.ft-vide { color: #6b7280; font-style: italic; padding: 8px; }
.ft-discret { color: #6b7280; font-size: 12px; }
.ft-ok { color: #15803d; }
.ft-badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; background: #e0f2fe; color: #075985; font-size: 11px; }
.ft-onglet { display: flex; flex-direction: column; gap: 8px; padding: 8px; min-width: 0; }
.ft-onglet-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ft-onglet-info { flex: 1; min-width: 200px; }
.ft-onglet-pied { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ft-sous-titre { font-weight: 600; margin-top: 6px; }
.ft-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ft-table th { text-align: left; background: #f9fafb; border-bottom: 1px solid #e5e7eb; padding: 4px 6px; font-weight: 600; position: sticky; top: 0; z-index: 1; }
.ft-table td { border-bottom: 1px solid #f3f4f6; padding: 4px 6px; vertical-align: top; }
.ft-table tr.ft-groupe td { background: #f1f5f9; font-weight: 600; color: #334155; }
.ft-table tr.ft-inactif td { color: #9ca3af; }
.ft-table .ft-num { text-align: right; white-space: nowrap; }
.ft-table .ft-act { width: 1%; white-space: nowrap; text-align: right; }
.ft-lib { font-weight: 500; }
.ft-oblig { color: #dc2626; margin-left: 3px; font-weight: 700; }
.ft-origine { color: #6b7280; font-size: 11px; }
.ft-val { min-width: 220px; }
.ft-input, .ft-select, .ft-textarea { padding: 4px 6px; border: 1px solid #d1d5db; border-radius: 3px; font: inherit; font-size: 12px; max-width: 100%; box-sizing: border-box; }
.ft-input--nombre { width: 130px; }
.ft-input--texte { width: 100%; }
.ft-input--court { width: 80px; }
.ft-input--ref { width: 180px; }
.ft-textarea { width: 100%; resize: vertical; }
.ft-select--liste { width: 100%; }
.ft-unite { margin-left: 6px; color: #374151; }
.ft-trad { margin-top: 3px; }
.ft-trad summary { cursor: pointer; color: #2563eb; font-size: 11px; }
.ft-trad-ligne { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.ft-trad-code { width: 24px; color: #6b7280; font-size: 11px; }
.ft-trad-ligne .ft-input { flex: 1; }
.ft-etat-sauve { font-size: 12px; color: #6b7280; }
.ft-etat-sauve--modif { color: #b45309; }
.ft-etat-sauve--ok { color: #15803d; }
.ft-etat-sauve--erreur { color: #b91c1c; }
.ft-champ { display: flex; flex-direction: column; gap: 2px; }
.ft-champ-lib { font-size: 12px; color: #374151; font-weight: 500; }
.ft-case { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.ft-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 14px; }
.ft-fieldset { border: 1px solid #e5e7eb; border-radius: 4px; padding: 6px 10px; display: flex; flex-direction: column; gap: 4px; }
.ft-fieldset legend { font-size: 12px; font-weight: 600; padding: 0 4px; }
.ft-couleurs { display: flex; align-items: center; gap: 4px; }
.ft-couleurs input[type="color"] { width: 42px; height: 26px; padding: 0 2px; }
.ft-options { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ft-options-dico { min-width: 0; }
.ft-dico { display: flex; flex-direction: column; gap: 8px; }
.ft-modes { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.ft-zone { display: flex; flex-direction: column; gap: 4px; }
.ft-zone[hidden] { display: none; }
.ft-barre-prog { height: 10px; background: #e5e7eb; border-radius: 5px; overflow: hidden; }
.ft-barre-prog[hidden] { display: none; }
.ft-barre-prog-rempli { height: 100%; width: 0; background: #2563eb; transition: width .3s; }
.ft-progression { font-size: 12px; }
.ft-resultat { display: flex; flex-direction: column; gap: 6px; }
.ft-lien { color: #2563eb; font-size: 12px; }
.ft-fichier { font-size: 12px; }
@media (max-width: 640px) { .ft-val { min-width: 0; } .ft-input--nombre { width: 100%; } }
