/* ART CONSTRUCTION - outils du Pilier 1 (1.1 radar, 1.2 SIA 451, 1.3 IFC, 1.4 codes, 1.5 seuils AIMP) : complements au style « Soft SaaS » de outils-salaires.css (.os-*).
   Prefixe .om-* ; couleurs : fond #F8FAFC, bordure #E2E8F0, texte #1E293B, accent #2563EB. */
.om { --om-bleu: #2563EB; --om-bord: #E2E8F0; --om-txt: #1E293B; --om-fond: #F8FAFC; }
.om-mut { color: #64748B; font-size: 13.5px; }
.om-nd { color: #94A3B8; font-size: 13px; }
.om-avis { padding: 14px 18px; border: 1px solid #BFDBFE; border-radius: 14px; background: #EFF6FF; color: #1E3A8A; font-size: 14px; line-height: 1.6; }
.om-avis p { margin: 0; }
.om-avis a { color: #1D4ED8; font-weight: 600; }
.om-partie { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--om-txt); }
.om-partie .os-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--om-bleu); color: #fff; font-size: 14px; }
.om-compte { margin: 0; color: #475569; font-size: 14px; font-weight: 600; }
.om-vide { padding: 22px 16px; color: #64748B; text-align: center; }
.os-champ input[type=search], .os-champ input[type=text] { width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid #CBD5E1; border-radius: 12px; background: #fff; color: var(--om-txt); font: 400 15px/1.3 inherit; font-family: inherit; }
.os-champ input[type=search]:focus, .os-champ input[type=text]:focus { outline: none; border-color: var(--om-bleu); box-shadow: 0 0 0 3px rgba(37,99,235,.16); }
.os-champ .os-saisie input { width: 150px; }

/* --- 1.1 : cartes et detail */
.om-appels { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.om-appel { display: grid; align-content: start; gap: 8px; padding: 16px; border: 1px solid var(--om-bord); border-radius: 16px; background: #fff; color: var(--om-txt); text-align: left; cursor: pointer; font: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s; }
.om-appel:hover { border-color: #93C5FD; transform: translateY(-1px); box-shadow: 0 10px 24px -16px rgba(37,99,235,.55); }
.om-appel:focus-visible { outline: 3px solid rgba(37,99,235,.4); outline-offset: 2px; }
.om-appel-actif { border-color: var(--om-bleu); background: #F5F9FF; box-shadow: 0 0 0 2px rgba(37,99,235,.18); }
.om-appel-haut { display: flex; align-items: center; gap: 8px; }
.om-canton { display: inline-grid; place-items: center; min-width: 34px; padding: 3px 8px; border-radius: 8px; background: var(--om-bleu); color: #fff; font-size: 12.5px; font-weight: 800; letter-spacing: .03em; }
.om-commune { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.om-j { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.om-j-vert { background: #ECFDF5; color: #047857; } .om-j-ambre { background: #FFFBEB; color: #B45309; } .om-j-rouge { background: #FEF2F2; color: #B91C1C; }
.om-appel-titre { font-size: 15px; font-weight: 700; line-height: 1.35; }
.om-appel-adj { color: #64748B; font-size: 13px; }
.om-puces { display: flex; flex-wrap: wrap; gap: 6px; }
.om-puce { padding: 3px 9px; border-radius: 999px; background: #F1F5F9; color: #475569; font-size: 12px; font-weight: 600; }
.om-appel-bas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding-top: 8px; border-top: 1px dashed var(--om-bord); }
.om-seuil { font-size: 13px; font-weight: 700; color: #1E40AF; }
.om-exemple { padding: 2px 8px; border-radius: 6px; background: #FEF3C7; color: #92400E; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.om-detail { display: grid; gap: 14px; padding: 20px; border: 2px solid var(--om-bleu); border-radius: 18px; background: #fff; box-shadow: 0 16px 36px -24px rgba(37,99,235,.6); }
.om-detail-haut { display: flex; justify-content: space-between; gap: 12px; }
.om-detail-lieu { margin: 0 0 4px; color: var(--om-bleu); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.om-detail-titre { margin: 0 0 4px; font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.om-fermer { align-self: flex-start; width: 36px; height: 36px; border: 1px solid #CBD5E1; border-radius: 10px; background: #fff; color: #475569; font-size: 22px; line-height: 1; cursor: pointer; }
.om-fermer:hover { border-color: var(--om-bleu); color: var(--om-bleu); }
.om-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.om-bloc { padding: 14px 16px; border: 1px solid var(--om-bord); border-radius: 14px; background: var(--om-fond); }
.om-bloc-titre { margin: 0 0 8px; color: #64748B; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.om-liste { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.5; }
.om-liste a { color: #1D4ED8; font-weight: 600; }
.om-criteres { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.om-crit { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: #fff; font-size: 13.5px; overflow: hidden; }
.om-crit i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--om-bleu); }
.om-modif { margin: 0; padding: 10px 14px; border-radius: 12px; background: #ECFDF5; color: #064E3B; font-size: 14px; }
.om-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.om-note { margin: 0; color: #64748B; font-size: 12.5px; line-height: 1.55; }

/* --- 1.2 / 1.3 : zone de depot, tableaux */
.om-zone { position: relative; border: 2px dashed #93C5FD; border-radius: 18px; background: #F8FBFF; transition: background .15s, border-color .15s; }
.om-zone-survol { border-color: var(--om-bleu); background: #EFF6FF; }
.om-fichier { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.om-zone-lib { display: grid; justify-items: center; gap: 6px; padding: 30px 18px; text-align: center; color: #334155; font-size: 14.5px; line-height: 1.5; pointer-events: none; }
.om-zone-lib strong { font-size: 1.05rem; color: var(--om-txt); }
.om-zone-ic { font-size: 34px; }
.om-zone-note { color: #047857; font-size: 13px; font-weight: 600; }
.om-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.om-msg { padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.55; }
.om-msg p { margin: 0; font-weight: 600; } .om-msg ul { margin: 6px 0 0; padding-left: 20px; }
.om-msg-ok { border: 1px solid #A7F3D0; background: #ECFDF5; color: #064E3B; }
.om-msg-err { border: 1px solid #FECACA; background: #FEF2F2; color: #7F1D1D; }
.om-resultat-sia { display: grid; gap: 20px; }
.om-meta { margin: 0; font-size: 15px; line-height: 1.5; }
.om-bilan { margin: 0; color: #475569; font-size: 13.5px; }
.om-tableau { max-height: 70vh; overflow: auto; }
.om-table { min-width: 720px; }
.om-table th, .om-table td { vertical-align: top; }
.om-table-ifc small { display: block; margin-top: 2px; color: #64748B; font-size: 11.5px; font-weight: 400; word-break: break-word; }
.om-l-chap th { background: #EFF6FF; color: #1E3A8A; font-size: 14px; }
.om-no { font-variant-numeric: tabular-nums; font-weight: 700; color: #334155; white-space: nowrap; }
.om-texte { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; line-height: 1.5; user-select: text; }
.om-verrou { float: left; margin: 0 6px 0 0; font-size: 12px; opacity: .6; }
.om-av { display: inline-block; margin-top: 4px; color: #B45309; font-size: 12px; font-weight: 600; }
.om-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.om-acip { padding: 2px 8px; border-radius: 6px; background: #EEF2FF; color: #3730A3; font-size: 11.5px; font-weight: 700; }
.om-gamme { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.om-gb { padding: 3px 8px; border: 1px solid #CBD5E1; border-radius: 8px; background: #fff; color: #334155; font-size: 11.5px; cursor: pointer; }
.om-gb:hover { border-color: var(--om-bleu); color: var(--om-bleu); }
.om-gb b { font-variant-numeric: tabular-nums; }
.om-pu { width: 110px; min-height: 38px; padding: 6px 8px; border: 1px solid #CBD5E1; border-radius: 10px; background: #FFFBEB; text-align: right; font: 600 14px/1.2 inherit; font-family: inherit; font-variant-numeric: tabular-nums; }
.om-pu:focus { outline: none; border-color: var(--om-bleu); box-shadow: 0 0 0 3px rgba(37,99,235,.16); background: #fff; }
.om-recap-liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.om-recap-liste div { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--om-bord); border-radius: 12px; background: var(--om-fond); }
.om-recap-liste dt { color: #64748B; font-size: 12px; font-weight: 600; }
.om-recap-liste dd { margin: 0; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.om-recap-ttc { background: #EFF6FF !important; border-color: #BFDBFE !important; }
.om-exports { display: flex; flex-wrap: wrap; gap: 10px; }
.om-libre { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: #475569; }
.om-libre input { width: 90px; min-height: 40px; padding: 6px 10px; border: 1px solid #CBD5E1; border-radius: 10px; font: inherit; }
.om-phrase { margin: 0; padding: 12px 14px; border-radius: 12px; background: #EFF6FF; color: #1E3A8A; font-weight: 600; line-height: 1.55; }

/* --- 1.4 : table des codes */
.om-table-codes { min-width: 860px; }
.om-code { display: block; margin-bottom: 4px; font-size: 13.5px; line-height: 1.4; }
.om-code b { color: #1E3A8A; }
.om-lien { color: #1D4ED8; text-decoration: none; }
.om-lien:hover { text-decoration: underline; }
.om-mini { display: block; margin-top: 2px; color: #047857; font-size: 12px; font-weight: 600; }

/* --- 1.5 : resultat, bandes, checklist */
.om-resultat { display: grid; gap: 12px; padding: 22px; border: 2px solid var(--om-bleu); border-radius: 18px; background: #fff; }
.om-res-label { margin: 0; color: #64748B; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.om-res-titre { margin: 0; font-size: clamp(1.3rem, 1.05rem + 1.2vw, 1.9rem); font-weight: 800; line-height: 1.25; }
.om-res-gre { border-color: #34D399; background: #F0FDF9; } .om-res-gre .om-res-titre { color: #065F46; }
.om-res-inv { border-color: #60A5FA; background: #F5F9FF; } .om-res-inv .om-res-titre { color: #1E40AF; }
.om-res-ouv { border-color: #F59E0B; background: #FFFBEB; } .om-res-ouv .om-res-titre { color: #92400E; }
.om-res-int { border-color: #8B5CF6; background: #F5F3FF; } .om-res-int .om-res-titre { color: #5B21B6; }
.om-bandes th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.om-ligne-actif th, .om-ligne-actif td { background: #EFF6FF; font-weight: 700; color: #1E3A8A; }
.om-checklist { margin-top: 28px; }
.om-barre { height: 14px; overflow: hidden; border-radius: 999px; background: #E2E8F0; }
.om-barre-val { display: block; height: 100%; border-radius: 999px; background: #94A3B8; transition: width .25s ease, background .25s; }
.om-barre-mid { background: #2563EB; } .om-barre-ok { background: #059669; }
.om-barre-txt { margin: 8px 0 0; color: #475569; font-size: 14px; }
.om-barre-txt strong { font-size: 1.4rem; color: var(--om-txt); margin-right: 8px; font-variant-numeric: tabular-nums; }
.om-pieces { display: grid; gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.om-piece { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--om-bord); border-radius: 12px; background: #fff; }
.om-piece label { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.om-piece input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--om-bleu); flex: none; }
.om-piece-aide { margin-left: 30px; color: #64748B; font-size: 12.5px; }
.om-piece:has(input:checked) { border-color: #A7F3D0; background: #F0FDF9; }

/* --- telephone : tableaux en cartes empilees */
@media (max-width: 720px) {
  .om-table, .om-table-codes { min-width: 0; }
  .om-table thead, .om-table-codes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .om-table, .om-table tbody, .om-table tr, .om-table td, .om-table th { display: block; width: 100%; }
  .om-table tr { padding: 10px 12px; border-bottom: 8px solid var(--om-fond); }
  .om-table td, .om-table th { padding: 5px 0; border: 0; }
  .om-table td[data-label]::before { content: attr(data-label); display: block; color: #64748B; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
  .om-table-ifc th[scope=row] { font-size: 15px; }
  .om-tableau { max-height: none; }
  .om-appels { grid-template-columns: minmax(0, 1fr); }
  .om-pu { width: 100%; text-align: left; }
  .om-exports .ot-btn { width: 100%; justify-content: center; }
}

/* --- impression du bordereau (outil 1.2) : seule la zone #om-impression est imprimee */
#om-impression { display: none; }
@media print {
  body.om-impression-active > *:not(#om-impression) { display: none !important; }
  body.om-impression-active #om-impression { display: block !important; padding: 0; color: #000; font: 10pt/1.4 Arial, sans-serif; background: #fff; }
  #om-impression h1 { margin: 0 0 4pt; font-size: 15pt; }
  #om-impression table { width: 100%; border-collapse: collapse; margin: 8pt 0; }
  #om-impression th, #om-impression td { padding: 3pt 4pt; border: .5pt solid #888; vertical-align: top; }
  #om-impression thead th { background: #E2E8F0; font-size: 9pt; }
  #om-impression .c th { background: #EFF6FF; text-align: left; }
  #om-impression .t { white-space: pre-wrap; }
  #om-impression .n { text-align: right; white-space: nowrap; }
  #om-impression .rel { width: 60pt; }
  #om-impression .tot { width: 50%; margin-left: auto; }
  #om-impression .om-p-note { color: #444; font-size: 8.5pt; }
  #om-impression tr { page-break-inside: avoid; }
  @page { size: A4 landscape; margin: 12mm; }
}
