/* Choix de l'espace à l'ouverture (index.html) et espace « Chantiers – situations » (chantiers.html) */

/* ---------- Choix du logiciel (maquette « socara-portail-logiciels » de Thomas, 09/11/2026) ---------- */
#voileEspace[hidden] { display: none !important; }
#voileEspace { position: fixed; inset: 0; z-index: 105; overflow: auto; background: var(--gris-clair); color: var(--anthracite);
  font-family: 'Mont', 'Barlow', sans-serif; -webkit-font-smoothing: antialiased; --bordure: #E5E5E2; --panneau: var(--rouge-fonce); }
#voileEspace .sl-layout { display: flex; min-height: 100vh; }
#voileEspace .sl-panel { position: relative; overflow: hidden; flex: 0 0 37.5%; max-width: 600px; min-width: 380px; background: var(--panneau); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; padding: 56px 56px 48px; }
#voileEspace .sl-panel::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--jaune); }
#voileEspace .sl-panel::after { content: ''; position: absolute; right: -260px; bottom: -200px; width: 720px; height: 720px;
  background: url('img/logo_casque_blanc.png') center / contain no-repeat; opacity: .08; pointer-events: none; }
#voileEspace .sl-panel > * { position: relative; z-index: 1; }
#voileEspace .sl-logo { width: 56px; height: 56px; display: block; }
#voileEspace .sl-brand { display: flex; flex-direction: column; gap: 14px; }
#voileEspace .sl-kicker { font-weight: 700; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--jaune); }
#voileEspace .sl-title { margin: 0; padding: 0; border: 0; font-weight: 700; font-size: 44px; line-height: 1.1; letter-spacing: -.5px; color: #fff; }
#voileEspace .sl-l1 { display: block; }
#voileEspace .sl-rule { width: 48px; height: 4px; border-radius: 2px; background: var(--jaune); }
#voileEspace .sl-meta { font-weight: 300; font-size: 12px; color: rgba(255,255,255,.85); }
#voileEspace .sl-main { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
#voileEspace .sl-head { display: flex; flex-direction: column; gap: 6px; }
#voileEspace .sl-label-caps { font-weight: 700; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--rouge-fonce); }
#voileEspace .sl-h2 { margin: 0; padding: 0; border: 0; font-weight: 700; font-size: 26px; letter-spacing: -.5px; color: var(--anthracite); }
#voileEspace .sl-choice { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 24px; }
#voileEspace .sl-apps { display: flex; flex-direction: column; gap: 16px; }
#voileEspace .sl-app { display: flex; align-items: center; gap: 20px; width: 100%; padding: 22px 24px; background: #fff; border: 1.5px solid var(--bordure); border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06); text-decoration: none; text-align: left; font: inherit; color: var(--anthracite); cursor: pointer; transition: all .25s ease; }
#voileEspace .sl-app[hidden] { display: none; }
#voileEspace .sl-app:hover, #voileEspace .sl-app:focus-visible { outline: none; border-color: var(--rouge); box-shadow: 0 8px 32px rgba(0,0,0,.08); transform: translateY(-2px); }
#voileEspace .sl-app-icon { width: 56px; height: 56px; flex-shrink: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: rgba(227,6,19,.08); color: var(--rouge-fonce); }
#voileEspace .sl-app--jaune .sl-app-icon { background: rgba(255,221,0,.22); color: var(--anthracite); }
#voileEspace .sl-app--anthracite .sl-app-icon { background: var(--anthracite); color: var(--jaune); }
#voileEspace .sl-app-icon svg { width: 28px; height: 28px; }
#voileEspace .sl-app-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#voileEspace .sl-app-name { font-weight: 700; font-size: 18px; }
#voileEspace .sl-app-desc { font-weight: 300; font-size: 13px; color: var(--gris-fer); }
#voileEspace .sl-app-arrow { width: 22px; height: 22px; flex-shrink: 0; color: var(--gris-fer); transition: transform .25s ease, color .25s ease; }
#voileEspace .sl-app:hover .sl-app-arrow, #voileEspace .sl-app:focus-visible .sl-app-arrow { color: var(--rouge); transform: translateX(4px); }
#voileEspace .sl-session { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; border-top: 1px solid var(--bordure);
  font-weight: 300; font-size: 12px; color: var(--gris-fer); }
#voileEspace .sl-logout { font: inherit; font-weight: 700; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--rouge-fonce); background: none; border: 0; padding: 12px 0; cursor: pointer; }
#voileEspace .sl-logout:hover { color: var(--rouge); }
#voileEspace .sl-logout[hidden] { display: none; }
@media (max-width: 900px) {
  #voileEspace .sl-layout { flex-direction: column; }
  #voileEspace .sl-panel { flex: 0 0 auto; max-width: none; min-width: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 16px; padding: 24px 24px 20px; }
  #voileEspace .sl-panel::after { width: 320px; height: 320px; right: -120px; bottom: -140px; }
  #voileEspace .sl-logo { width: 40px; height: 40px; }
  #voileEspace .sl-brand { gap: 4px; }
  #voileEspace .sl-title { font-size: 24px; }
  #voileEspace .sl-l1 { display: inline; }
  #voileEspace .sl-rule, #voileEspace .sl-meta { display: none; }
  #voileEspace .sl-main { align-items: flex-start; padding: 32px 20px; }
  #voileEspace .sl-app { padding: 18px; gap: 16px; }
  #voileEspace .sl-app-icon { width: 48px; height: 48px; }
}

/* ---------- Page Chantiers ---------- */
body.chantiers { margin: 0; background: var(--gris-clair); color: var(--anthracite); font-family: var(--police, 'Mont', 'Barlow', sans-serif); font-size: 13px; }
.ch-tete { display: flex; align-items: center; gap: 14px; padding: 10px 20px; background: var(--rouge-fonce); color: #fff; border-bottom: 4px solid var(--jaune); }
.ch-tete img { width: 30px; height: 30px; }
.ch-tete .ch-titre { font-weight: 700; font-size: 16px; }
.ch-tete .ch-titre small { display: block; font-weight: 400; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--jaune); }
.ch-tete .ch-espace { margin-left: auto; }
.ch-tete .bt { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.ch-tete .bt:hover { border-color: #fff; }
.ch-tete .ch-nom { font-size: 12px; opacity: .9; }
.ch-corps { padding: 18px 20px 40px; max-width: 1280px; margin: 0 auto; }
.ch-carte { background: #fff; border: 1px solid var(--bord); border-radius: 8px; padding: 16px 18px; margin-bottom: 16px; }
.ch-carte h2 { margin: 0 0 10px; font-size: 15px; border: 0; padding: 0; display: flex; align-items: center; gap: 10px; }
.ch-carte h2 .bt { margin-left: auto; }
.ch-barre { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.ch-barre input[type=search] { flex: 1 1 280px; padding: 6px 10px; border: 1.5px solid var(--bord); border-radius: 6px; font: inherit; }
.ch-table { width: 100%; border-collapse: collapse; }
.ch-table th { text-align: left; font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--gris-fer); padding: 6px 8px; border-bottom: 2px solid var(--bord); background: #FAFAF8; position: sticky; top: 0; }
.ch-table td { padding: 6px 8px; border-bottom: 1px solid var(--bord-doux); vertical-align: middle; }
.ch-table td.n, .ch-table th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ch-table tr.cliquable { cursor: pointer; }
.ch-table tr.cliquable:hover td { background: var(--survol, #F6F6F2); }
.ch-vide { color: var(--gris-beton); padding: 14px 4px; }
.ch-defile { max-height: 52vh; overflow: auto; }
.ch-legende { color: var(--gris-fer); font-size: 12px; margin: 6px 0 0; }
.ch-pastille { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 10.5px; font-weight: 700; background: #EEE; color: var(--gris-fer); }
.ch-pastille.gagnee { background: #E3F1E4; color: #2E7D32; }

/* Préparation de la MS */
.pm-entete { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; align-items: center; max-width: 760px; }
.pm-entete input { padding: 6px 9px; border: 1.5px solid var(--bord); border-radius: 6px; font: inherit; }
.pm-entete input[name=code] { width: 140px; font-weight: 700; }
.pm-dalle { border: 1px solid var(--bord); border-radius: 6px; margin: 6px 0; }
.pm-ligne-dalle { display: grid; grid-template-columns: 26px 22px 120px 1fr 80px 70px 80px 80px 110px; gap: 8px; align-items: center; padding: 6px 8px; }
.pm-ligne-dalle.titres { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--gris-fer); font-weight: 700; padding-top: 0; }
.pm-ligne-dalle .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-dalle.ouverte > .pm-ligne-dalle { background: #FAFAF8; border-bottom: 1px solid var(--bord); }
.pm-dalle.exclue { opacity: .55; }
.pm-plier { border: 0; background: none; cursor: pointer; font-size: 12px; color: var(--gris-fer); padding: 0; }
.pm-ctrl { font-weight: 700; white-space: nowrap; text-align: right; }
.pm-ctrl.ok { color: #2E7D32; }
.pm-ctrl.ecart { color: #B42318; }
.pm-detail { padding: 6px 8px 10px 56px; }
.pm-sd { width: 100%; border-collapse: collapse; font-size: 12px; }
.pm-sd td { padding: 3px 6px; border-bottom: 1px solid var(--bord-doux); }
.pm-sd td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-sd tr.nota td { color: var(--gris-beton); }
.pm-cote { display: inline-flex; border: 1.5px solid var(--bord); border-radius: 50px; overflow: hidden; }
.pm-cote button { border: 0; background: #fff; padding: 2px 10px; font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; color: var(--gris-fer); }
.pm-cote button + button { border-left: 1px solid var(--bord); }
.pm-cote button.actif[data-c=A] { background: #1d4f91; color: #fff; }
.pm-cote button.actif[data-c=B] { background: #8a5a00; color: #fff; }
.pm-cote button.actif[data-c=P] { background: var(--gris-fer); color: #fff; }
.pm-A { color: #1d4f91; font-weight: 700; }
.pm-B { color: #8a5a00; font-weight: 700; }
.pm-pied { position: sticky; bottom: 0; background: #fff; border-top: 2px solid var(--bord); padding: 12px 18px; display: flex; gap: 14px; align-items: center; margin: 12px -18px -16px; border-radius: 0 0 8px 8px; }
.pm-pied .pm-resume { margin-right: auto; color: var(--gris-fer); }
.pm-erreur { color: #B42318; font-weight: 600; }
.pm-bilan { border-collapse: collapse; }
.pm-bilan td { padding: 4px 14px 4px 0; }
.pm-bilan td:first-child { color: var(--gris-fer); }

/* MS ouverte (lecture seule) */
.ch-ms-lib { font-weight: 400; color: var(--gris-fer); font-size: 13px; }
.ms-infos { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.ms-infos small { display: block; font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--gris-fer); }
.ms-defile { max-height: calc(100vh - 330px); min-height: 300px; overflow: auto; }
.ms-devis td { font-size: 12.5px; }
.ms-titre { cursor: pointer; }
.ms-titre td { font-weight: 700; background: #FAFAF8; }
.ms-titre.n0 td { color: var(--rouge-fonce); background: #F4F1EC; }
.ms-pm td { color: var(--gris-beton); }
.ms-fini td { background: #FFF8DC; }
.ms-cote { display: inline-block; min-width: 16px; text-align: center; border-radius: 4px; font-size: 10px; font-weight: 700; color: #fff; padding: 0 4px; }
.ms-cote.A { background: #1d4f91; }
.ms-cote.B { background: #8a5a00; }
.ms-leg { margin-left: auto; font-size: 12px; color: var(--gris-fer); display: inline-flex; gap: 6px; align-items: center; }
.ch-carte h2 .bt + .bt { margin-left: 0; }
.ms-devis { table-layout: fixed; }
.ms-devis th:nth-child(1) { width: 150px; }
.ms-devis th:nth-child(3) { width: 70px; }
.ms-devis th:nth-child(4) { width: 100px; }
.ms-devis th:nth-child(5) { width: 110px; }
.ms-devis th:nth-child(6) { width: 130px; }
.ms-devis td:nth-child(2) { overflow-wrap: anywhere; }
.ms-annexes { margin-top: 8px; font-size: 12px; color: var(--gris-fer); }
.ms-annexes summary { cursor: pointer; }
.ms-annexes td.n { text-align: right; white-space: nowrap; }
.ms-suppr { color: #B42318; }
.ms-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; padding: 10px 12px; background: #FFF4F2; border: 1px solid #F3C9C4; border-radius: 6px; font-size: 12.5px; }
.ms-confirm input { padding: 4px 8px; border: 1.5px solid var(--bord); border-radius: 6px; font: inherit; width: 140px; text-transform: uppercase; }

/* Onglets de la MS */
.ms-onglets { display: flex; gap: 4px; border-bottom: 2px solid var(--bord); margin: -4px 0 12px; }
.ms-onglets button { border: 0; background: none; padding: 8px 14px; font: inherit; font-weight: 700; font-size: 12.5px; color: var(--gris-fer); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.ms-onglets button.actif { color: var(--rouge-fonce); border-bottom-color: var(--rouge); }
.ms-onglets button:hover { color: var(--anthracite); }

/* Découpage et saisie */
.sit-zones { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; padding: 10px 12px; background: #FAFAF8; border: 1px solid var(--bord-doux); border-radius: 6px; }
.sit-zones label { display: flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; }
.sit-zones input { padding: 4px 8px; border: 1.5px solid var(--bord); border-radius: 6px; font: inherit; font-weight: 400; width: 120px; }
.sit-zones label.large input { width: 460px; max-width: 60vw; }
.sit-bats { display: inline-flex; gap: 4px; }
.sit-defile { max-height: calc(100vh - 300px); min-height: 320px; overflow: auto; border: 1px solid var(--bord-doux); border-radius: 6px; }
.sit-grille { font-size: 12px; }
.sit-grille th { position: sticky; top: 0; z-index: 2; }
.sit-grille td { padding: 3px 6px; }
.sit-grille .sit-code { white-space: nowrap; }
.sit-grille .sit-des { max-width: 280px; min-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sit-grille th.sit-z, .sit-grille td.sit-z { min-width: 84px; border-left: 2px solid #8C96A3; }
.sit-grille .ms-titre td { padding: 5px 6px; }
.sit-q { width: 100%; min-width: 64px; box-sizing: border-box; padding: 2px 4px; border: 1px solid var(--bord); border-radius: 4px; font: inherit; text-align: right; background: #fff; }
.sit-q:focus { outline: 2px solid var(--jaune); border-color: var(--jaune-dore); }
.sit-q:not(:placeholder-shown) { background: #F4F8FF; }
.sit-fixe { display: inline-block; margin: 1px 3px 1px 0; padding: 0 4px; border-radius: 4px; background: #EEE; color: var(--gris-fer); font-size: 11px; }
.sit-reste { color: #B42318; font-weight: 700; }
.sit-mini { border: 1px solid var(--bord); background: #fff; border-radius: 4px; font-size: 10px; font-weight: 700; padding: 0 4px; cursor: pointer; color: #8a5a00; }
.sit-clic { cursor: pointer; }
.sit-clic:hover { background: #FFF8DC !important; }
.sit-commandes { gap: 10px 14px; }
.sit-sorte { display: inline-flex; gap: 0; }
.sit-sorte .bt:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.sit-sorte .bt:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.sit-nouvelle { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.sit-nouvelle input { padding: 3px 6px; border: 1.5px solid var(--bord); border-radius: 6px; font: inherit; }
.sit-total { margin-left: auto; font-size: 12px; color: var(--gris-fer); }
.sc { display: inline-block; margin: 1px 0 1px 2px; padding: 1px 5px; min-width: 38px; border: 1.5px solid var(--bord); border-radius: 5px; background: #fff; font: inherit; font-size: 11px; font-variant-numeric: tabular-nums; cursor: pointer; }
.sc-libre:hover { border-color: var(--anthracite); }
.sc-apres { background: repeating-linear-gradient(45deg, #fff, #fff 3px, #EEE 3px, #EEE 6px); color: var(--gris-beton); cursor: not-allowed; }
.sc sup { font-size: 8px; margin-left: 2px; }
.sit-pct.plein { color: #2E7D32; font-weight: 700; }

/* Récapitulatif de situation (écran et impression) */
.sr-entete { margin: 4px 0 12px; font-size: 13px; line-height: 1.5; }
.sr-titre { font-size: 16px; font-weight: 700; color: var(--rouge-fonce); }
.sr-sorte { color: var(--gris-fer); font-weight: 400; font-size: 13px; }
.sr-table td { font-size: 12px; padding: 4px 8px; }
.sr-totaux td { font-weight: 600; border-top: 1px solid var(--bord); }
.sr-annexe td { font-weight: 400; color: var(--gris-fer); }
.sr-ht td { font-weight: 800; font-size: 13px; border-top: 2px solid var(--anthracite); }

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; }
  body.chantiers > #chCorps { display: block !important; } /* style.css masque tout le corps à l'impression, sauf la fiche affaire */
  .ch-tete, #toast, .ms-onglets, .sr-barre, .ch-corps > .ch-carte:first-child, .ch-legende { display: none !important; }
  .ch-corps { padding: 0; max-width: none; }
  .ch-carte { border: 0; padding: 0; margin: 0; }
  .sr-table th { position: static; }
  .sr-table tr { break-inside: avoid; }
  .sr-entete::before { content: 'SOCARA'; display: block; font-weight: 800; letter-spacing: 2px; color: #B00010; }
}

/* Situation client (bleu) / situation interne (vert canard) : couleurs franches pour ne pas se tromper de saisie */
.ms-onglets button.og-client, .sorte-couleur .og-client { --og: #1d4f91; }
.ms-onglets button.og-interne, .sorte-couleur .og-interne { --og: #9A6B00; }
.ms-onglets button.og-client, .ms-onglets button.og-interne { color: var(--og); }
.ms-onglets button.og-client.actif, .ms-onglets button.og-interne.actif { background: var(--og); color: #fff; border-bottom-color: var(--og); border-radius: 6px 6px 0 0; }
.sorte-couleur .bt.og-client, .sorte-couleur .bt.og-interne { color: var(--og); border-color: var(--og); }
.sorte-couleur .bt.actif { background: var(--og); color: #fff; }
.sit-bandeau { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 9px 14px; margin: -4px 0 10px; border-radius: 6px; color: #fff; }
.sit-bandeau b { font-size: 15px; letter-spacing: .02em; text-transform: uppercase; }
.sit-bandeau span { font-size: 12.5px; opacity: .95; }
.sit-bandeau.client { background: #1d4f91; }
.sit-bandeau.interne { background: #FFC000; color: #2B1F00; }
.sit-defile.bord-client { border: 2px solid #1d4f91; }
.sit-defile.bord-interne { border: 2px solid #FFC000; }
/* Découpage : reste à répartir, juste après le marché */
.sit-grille th.sit-reste-t { min-width: 78px; border-left: 1px solid var(--bord-doux); }
.sit-grille td.sit-reste-c { font-weight: 700; border-left: 1px solid var(--bord-doux); white-space: nowrap; }
.sit-grille td.sit-reste-c.reste { color: #B42318; background: #FFF4F2; }
.sit-grille td.sit-reste-c.trop { color: #fff; background: #B42318; }
.sit-grille td.sit-reste-c.ok { color: #2E7D32; }
.sit-q.sit-partie { width: 70px; min-width: 0; outline: 2px solid var(--jaune); }
/* Retour de Fred (10/11/2026) */
.ch-corps:has(.ms-onglets) { max-width: none; }   /* la MS prend toute la largeur de l'écran */
.ms-onglets button.og-interne.actif, .sorte-couleur .bt.og-interne.actif { background: #FFC000; color: #2B1F00; border-bottom-color: #FFC000; }
.sit-defile { max-height: calc(100vh - 230px); }
.sit-grille td, .sit-grille th { border-bottom: 1px solid #D5DAE1; }
.sit-grille th.sit-z.zp, .sit-grille td.sit-z.zp { background: #F3F6FA; }
.sit-grille th.sit-z.zs, .sit-grille td.sit-z.zs { background: #FFF3C4; }
.sit-grille th.sit-z.zs { box-shadow: inset 0 -3px 0 #E0A800; }
/* colonnes figées (code, désignation… jusqu'au reste à répartir) */
.sit-grille .fg { position: sticky; background: #fff; z-index: 1; }
.sit-grille thead th.fg { z-index: 4; background: #FAFAF8; }
.sit-grille thead th { z-index: 3; }
.sit-grille .ms-titre td.fg { background: #FAFAF8; }
.sit-grille .ms-titre.n0 td.fg { background: #F4F1EC; }
.sit-grille .fg-der { box-shadow: 3px 0 0 #8C96A3; }
.sit-grille td.sit-reste-c.fg.reste { background: #FFF4F2; }
.sit-grille td.sit-reste-c.fg.trop { background: #B42318; }
/* une case : quantités déjà situées puis champ, sans déborder sur la colonne voisine */
.sit-cel { display: flex; align-items: center; gap: 3px; justify-content: flex-end; }
.sit-cel .sit-q { flex: 1 1 60px; min-width: 52px; }
.sit-cel .sit-fixe { flex: none; margin: 0; }
/* situation interne : case cochée autrement que dans la situation client */
.sc.sc-diff { outline: 2px dashed #E07B00; outline-offset: 1px; }
.sit-grille .sit-tt { font-weight: 700; }
.sit-tot-devis td { font-weight: 700; background: #EDEFF2; border-top: 2px solid #8C96A3; }
.sit-confirme, .sit-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; margin: 0 0 10px; border-radius: 6px; background: #FFF8E1; border: 1px solid #E0A800; }
.sit-confirme[hidden], .sit-invite[hidden] { display: none; }
.sit-confirme label { display: inline-flex; gap: 6px; align-items: center; }
.sit-invite { background: #FFF3C4; border: 2px solid #FFC000; }
.sr-dossier { display: inline-flex; gap: 6px; align-items: center; }
@media print { .sr-saut { break-after: page; } }

/* Lot 2 (retour de Fred) : type d'ouvrage, heures (magenta) et béton (bleu), totaux par niveau et par type */
.sit-grille td.sit-type-c { padding: 0 4px; text-align: center; font-weight: 700; }
.sit-grille select.sit-type { font: inherit; font-size: 12px; font-weight: 700; padding: 1px 2px; border: 1px solid var(--bord-doux); border-radius: 4px; background: #fff; }
.sit-grille select.sit-type.suggere, .sit-grille td.sit-type-c.suggere { color: #8C96A3; font-style: italic; font-weight: 400; }
.sit-grille select.sit-type-ch { color: #8C96A3; font-weight: 400; }
.sit-rh { color: #A0007A; }
.sit-rb { color: #1565C0; }
.sit-grille th.sit-r1, .sit-grille td.sit-r1 { border-left: 2px solid #8C96A3; }
.sit-tbadge { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 3px; font-size: 10px; font-weight: 700; background: #EDEFF2; color: #2B3440; }
.sit-tbadge.suggere { color: #8C96A3; font-style: italic; font-weight: 400; }
.sit-totaux { margin-top: 14px; }
.sit-totaux > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.sit-defile-t { overflow-x: auto; }
.sit-tx td, .sit-tx th { white-space: nowrap; }
.sit-tx tr.sit-tx-s td { font-weight: 700; background: #F4F1EC; }
.sit-tx td.sit-tx-type { font-weight: 700; color: #1C1C1C; border-right: 1px solid #8C96A3; min-width: 84px; }
.sit-tx td.sit-tx-code { font-weight: 700; color: #2E7D32; text-align: center; width: 28px; }
.sit-tx th.sit-tx-niv { text-align: center; border-left: 2px solid #8C96A3; }
.sit-tx tr.sit-tx-s td { border-top: 2px solid #1C1C1C; }
.sit-grille select.sit-type.suggere { opacity: .75; }
.sit-grille td.sit-type-c.suggere { opacity: .8; }
.sit-grille td.sit-type-c.fg { background-clip: padding-box; }
/* Récap volumes / heures : type et code restent visibles au défilement horizontal */
.sit-tx td.sit-tx-type { position: sticky; left: 0; z-index: 2; width: 96px; min-width: 96px; max-width: 96px; box-sizing: border-box; }
.sit-tx td.sit-tx-code { position: sticky; left: 96px; z-index: 2; background: #fff; width: 36px; min-width: 36px; box-sizing: border-box; border-right: 2px solid #8C96A3; }
.sit-tx tr.sit-tx-s td.sit-tx-type, .sit-tx tr.sit-tx-s td.sit-tx-code { background: #F4F1EC; }
.sit-tx thead th:first-child { position: sticky; left: 0; z-index: 3; background: #FAFAF8; border-right: 2px solid #8C96A3; }
.sit-tx td.sit-tx-code, .sit-tx thead th:first-child { box-shadow: inset -2px 0 0 #8C96A3; }
/* Type : seule la liste est en couleur, texte noir ; un type seulement proposé a une bordure en pointillé */
.sit-grille select.sit-type, .sit-grille select.sit-type.suggere { color: #1C1C1C; font-style: normal; font-weight: 700; opacity: 1; }
.sit-grille select.sit-type.suggere { border: 1px dashed #5A6472; }
.sit-grille select.sit-type option { color: #1C1C1C; }
.sit-grille select.sit-type.sit-type-ch { color: #8C96A3; font-weight: 400; }
/* Découpage : repère de la case active (ligne et colonne), teinte posée par-dessus les fonds existants */
.sit-grille tr.lc-ligne > td, .sit-grille td.lc-col { box-shadow: inset 0 0 0 9999px rgba(255, 205, 0, .16); }
.sit-grille tr.lc-ligne > td.lc-col { box-shadow: inset 0 0 0 9999px rgba(255, 205, 0, .30); }
.sit-grille th.lc-col { box-shadow: inset 0 -3px 0 #E0A800; color: #1C1C1C; }
/* Annexes du devis : montants à côté de leur libellé (et non au bord droit de la page) */
.ms-annexes .pm-bilan { width: auto; margin-top: 4px; }
.ms-annexes .pm-bilan td.n { padding-left: 24px; padding-right: 0; }
/* Bandeau gauche, comme l'application Études de prix ; « « » le réduit aux icônes */
.ch-cadre { display: flex; align-items: flex-start; }
.ch-cote { width: 210px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--cote-bg); color: var(--cote-txt); border-right: 1px solid var(--bord); display: flex; flex-direction: column; }
.ch-cote .menu-cote { flex: none; }
.ch-replier { align-self: flex-end; margin: 8px 8px 0; background: none; border: 1px solid rgba(127,127,127,.4); color: inherit; border-radius: 6px; width: 26px; height: 24px; cursor: pointer; font-size: 14px; line-height: 1; }
.ch-replier:hover { background: var(--cote-sel); }
.ch-cadre > .ch-corps { flex: 1; min-width: 0; }
body.ch-cote-reduit .ch-cote { width: 56px; }
body.ch-cote-reduit .ch-cote .menu-cote button { padding: 9px 0 9px 14px; }
body.ch-cote-reduit .ch-cote .menu-cote button span, body.ch-cote-reduit .ch-cote .menu-groupe { display: none; }
body.ch-cote-reduit .ch-replier { align-self: center; transform: rotate(180deg); }
@media print { .ch-cote { display: none !important; } }
/* Page Statistiques */
.st-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.st-tuile { border: 1px solid var(--bord); border-radius: 8px; padding: 10px 14px; background: #FCFCFA; }
.st-tuile small { display: block; font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--gris-fer); }
.st-tuile b { display: block; font-size: 20px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; color: #1C1C1C; }
.st-tuile span { font-size: 11.5px; color: var(--gris-fer); }
.st-graph { position: relative; }
.st-graph svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.st-table td:first-child { white-space: nowrap; }
.st-b { transition: opacity .12s; }
.st-col.survol .st-b { opacity: .85; }
.st-col.survol rect { fill: rgba(29, 79, 145, .06); }
.st-axe { stroke: #C9C9C4; stroke-width: 1; }
.st-val { font-size: 11px; fill: #3a3a3a; font-variant-numeric: tabular-nums; }
.st-ax { font-size: 11px; fill: var(--gris-fer, #6b6b6b); }
.st-bulle { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--bord); border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.12); padding: 7px 10px; font-size: 12px; white-space: nowrap; z-index: 5; }
.st-chiffres { margin-top: 8px; font-size: 12px; }
.st-chiffres summary { cursor: pointer; color: var(--gris-fer); }
.st-table td small { color: var(--gris-fer); }
.st-av { min-width: 120px; }
.st-barre { height: 8px; border-radius: 4px; background: #E7E7E2; overflow: hidden; margin-bottom: 2px; }
.st-barre i { display: block; height: 100%; background: #1d4f91; border-radius: 4px; }
.ms-conducteur select { font: inherit; font-size: 13px; padding: 2px 6px; border: 1px solid var(--bord); border-radius: 4px; width: 170px; background: #fff; }
.st-filtre { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--gris-fer); display: flex; align-items: center; gap: 6px; }
.st-filtre select { font: inherit; font-size: 13px; color: #1C1C1C; padding: 3px 6px; border: 1px solid var(--bord); border-radius: 4px; background: #fff; }
.st-legende-g { display: flex; gap: 18px; align-items: center; font-size: 12px; margin: 0 0 6px; }
.st-legende-g i, .st-bulle i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.st-legende-g .st-unite { margin-left: auto; color: var(--gris-fer); }
.st-bulle table { border-collapse: collapse; margin-top: 4px; }
.st-bulle td { padding: 1px 0; }
.st-bulle td.n { text-align: right; padding-left: 16px; font-variant-numeric: tabular-nums; }
.st-bulle tr.st-bd td { color: var(--gris-fer); font-size: 11px; }
.ch-table tr.ch-groupe td { background: #F3F1EA; font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--gris-fer); padding: 5px 8px; }

/* Page Fonctionnement : parcours de l'étude gagnée à l'impression des situations */
.fn-phase { border: 1px solid var(--bord); border-radius: 10px; background: var(--gris-clair); padding: 12px 14px 14px; --fn: var(--gris-fer); border-top: 4px solid var(--fn); }
.fn-p-etude { --fn: var(--rouge); }
.fn-p-unefois { --fn: var(--anthracite); }
.fn-p-mois { --fn: #1d4f91; }
.fn-p-stats { --fn: var(--gris-beton); }
.fn-phase-t { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.fn-phase-t b { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--fn); }
.fn-phase-t small { color: var(--gris-fer); font-size: 12px; }
.fn-etapes { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; flex-wrap: wrap; gap: 0; }
.fn-etape { flex: 1 1 230px; max-width: 360px; background: #fff; border: 1px solid var(--bord); border-left: 4px solid var(--fn); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.fn-etape.fn-client { border-left-color: #1d4f91; }
.fn-etape.fn-interne { border-left-color: #FFC000; }
.fn-etape.fn-impression { border-left-color: var(--anthracite); }
.fn-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fn-tete b { font-size: 14px; }
.fn-num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--anthracite); color: #fff; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.fn-client .fn-num { background: #1d4f91; }
.fn-interne .fn-num { background: #FFC000; color: #2B1F00; }
.fn-p-etude .fn-num { background: var(--rouge); }
.fn-quand { margin-left: auto; font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--gris-clair); color: var(--gris-fer); white-space: nowrap; }
.fn-ou { font-size: 12px; color: var(--anthracite); background: #FFF6BF; border-radius: 5px; padding: 4px 7px; }
.fn-ou span { font-weight: 700; margin-right: 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--gris-fer); }
.fn-etape ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.45; }
.fn-aller { align-self: flex-start; margin-top: auto; }
/* Flèche entre deux étapes d'une même phase */
.fn-suite { flex: 0 0 28px; display: flex; align-items: center; justify-content: center; }
.fn-suite::before { content: '→'; font-size: 20px; color: var(--gris-beton); }
/* Lien entre deux phases */
.fn-lien { display: flex; flex-direction: column; align-items: center; margin: 4px 0; color: var(--gris-fer); font-size: 11.5px; font-style: italic; }
.fn-lien::before { content: ''; width: 2px; height: 14px; background: var(--gris-beton); }
.fn-lien::after { content: '▼'; font-size: 11px; color: var(--gris-beton); line-height: 1; font-style: normal; }
.fn-lien span { padding: 2px 0; }
/* Retour au début du mois suivant */
.fn-boucle { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #1d4f91; border: 2px dashed #1d4f91; border-radius: 8px; padding: 6px 10px; background: #fff; }
.fn-boucle-fl { font-size: 20px; line-height: 1; font-weight: 700; }
.fn-stats { margin: 0; font-size: 12.5px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .fn-etapes { flex-direction: column; }
  .fn-etape { max-width: none; }
  .fn-suite { flex-basis: 22px; }
  .fn-suite::before { content: '↓'; }
}

/* Libellés des dalles A / B : préparation de la MS et onglet Devis */
.pm-libs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 0 8px 8px 64px; }
.pm-libs label { display: flex; align-items: center; gap: 6px; flex: 1 1 320px; }
.pm-libs input, .ms-lib-champ { flex: 1; width: 100%; min-width: 0; font: inherit; font-size: 12.5px; padding: 3px 6px; border: 1px solid var(--bord); border-radius: 4px; background: #fff; }
.pm-libs input:focus, .ms-lib-champ:focus { outline: 2px solid #1d4f91; outline-offset: -1px; }
.ms-libs { border: 1px solid var(--bord); border-radius: 8px; background: #FAFAF8; padding: 10px 12px; margin: 8px 0; }
.ms-libs .ms-defile { max-height: 50vh; margin-top: 8px; }
.ms-libs td:nth-child(4) { width: 45%; }
.ms-libs td:nth-child(4) .ms-lib-champ { width: calc(100% - 80px); }
.ms-libs td:first-child { width: 24px; }
.ms-libs tr.ms-libs-groupe td { font-weight: 600; color: #1d4f91; background: #EEF2F8; }
.ms-devis td[data-renommer] { cursor: text; }
/* Bulle du texte complet d'un ouvrage (survol d'une désignation) */
.ch-bulle-texte { position: fixed; z-index: 50; max-width: min(640px, calc(100vw - 24px)); max-height: 60vh; overflow: hidden; white-space: pre-line;
  background: #fff; color: var(--anthracite); border: 1px solid var(--bord); border-left: 4px solid #1d4f91; border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18); padding: 8px 12px; font-size: 12px; line-height: 1.45; pointer-events: none; }
.ch-bulle-texte[hidden] { display: none; }
.ch-bulle-texte small { display: block; margin-top: 6px; color: var(--gris-fer); font-style: italic; }

/* ===== Thème d'Études de prix (12/11/2026) : Tahoma, logo en haut du menu de gauche, en-tête clair à droite. Écran seulement. ===== */
@media screen {
body.chantiers { --police: Tahoma, Verdana, sans-serif; font-size: 12.5px; }
.ch-droite { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-droite > .ch-corps { width: 100%; box-sizing: border-box; }
/* en-tête clair, comme le bandeau d'Études */
.ch-tete { background: #F4F4F2; color: #1A1A1A; border-bottom: 1px solid #E5E5E2; padding: 8px 32px; min-height: 62px; box-sizing: border-box; }
.ch-tete .ch-titre { font: 700 20px/26px 'Mont', 'Barlow', sans-serif; letter-spacing: -.3px; color: #1A1A1A; }
.ch-tete .ch-nom { color: #1A1A1A; opacity: 1; font-weight: 700; border: 1px solid #C9C9C4; border-radius: 999px; padding: 6px 14px; background: #fff; font-size: 12.5px; }
.ch-tete .bt { background: #fff; color: #1A1A1A; border: 1px solid #C9C9C4; border-radius: 999px; }
.ch-tete .bt:hover { border-color: #1A1A1A; }
/* menu de gauche : celui d'Études (232 px, anthracite, entrées arrondies, icône active en jaune) */
.ch-cote { width: 232px; background: #1a1a1a; color: #d6d6d0; border-right: none; }
.ch-cote .ch-marque { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 62px; box-sizing: border-box; position: relative; color: #fff; font: 700 15px/1.1 'Mont', 'Barlow', sans-serif; flex: none; }
.ch-cote .ch-marque::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: #FFDD00; }
.ch-cote .ch-marque img { height: 32px; }
.ch-cote .ch-marque small { display: block; font: 400 12px Tahoma, Verdana, sans-serif; color: #a8a8a2; }
.ch-cote .ch-marque .ch-replier { margin: 0 0 0 auto; align-self: center; }
.ch-cote .menu-cote { padding: 8px 12px; gap: 2px; }
.ch-cote .menu-cote button { min-height: 40px; padding: 8px 12px; border-left: none; border-radius: 8px; font-size: 13px; color: #d6d6d0; }
.ch-cote .menu-cote button:hover:not(:disabled) { background: #2d2d2a; color: #fff; }
.ch-cote .menu-cote button.actif { background: #2d2d2a; color: #fff; font-weight: 700; }
.ch-cote .menu-cote button.actif svg { stroke: #FFDD00; opacity: 1; }
.ch-cote .menu-groupe { margin: 12px 12px 4px; padding-top: 0; border-top: none; color: #a8a8a2; opacity: 1; font: 700 11px 'Mont', 'Barlow', sans-serif; letter-spacing: .08em; }
/* menu réduit : seul le bouton « » » reste en haut */
body.ch-cote-reduit .ch-cote .ch-marque { justify-content: center; padding: 12px 0; }
body.ch-cote-reduit .ch-cote .ch-marque > img, body.ch-cote-reduit .ch-cote .ch-marque > span { display: none; }
body.ch-cote-reduit .ch-cote .ch-marque .ch-replier { margin: 0; transform: none; }  /* le script affiche déjà « » » */
body.ch-cote-reduit .ch-cote .menu-cote { padding: 8px 0; }
}

/* Boutons comme dans Études de prix (validé le 12/11/2026) : pilule blanche, casse normale, 13 px ;
   action principale (.bt-plein) anthracite, rouge au survol. Les boutons Situation client / interne gardent leurs couleurs. */
@media screen {
  .ch-corps .bt { padding: 6px 16px; min-height: 34px; font-size: 13px; letter-spacing: 0; text-transform: none; background: #fff; color: #1A1A1A; border: 1px solid #C9C9C4; }
  .ch-corps .bt:hover:not(:disabled) { border-color: #1A1A1A; }
  .ch-corps .bt:disabled { opacity: .45; }
  .ch-corps .bt.bt-plein { background: #1A1A1A; color: #fff; border-color: #1A1A1A; }
  .ch-corps .bt.bt-plein:hover:not(:disabled) { background: #E30613; border-color: #E30613; }
  .ch-corps .bt.ms-suppr { color: #B42318; }
  .ch-corps .bt.ms-suppr:hover:not(:disabled) { border-color: #B42318; }
}

/* Pastille du nom en haut à droite : masquée tant qu'aucun nom n'est connu (12/11/2026) */
.ch-tete .ch-nom:empty { display: none; }

/* Haut du menu identique à Études de prix (12/11/2026) : police Mont du sélecteur (la variable manquait sur cette page),
   sous-titre à la même hauteur, bouton « au contour blanc. Écran seulement. */
@media screen {
  body.chantiers { --font-mont: 'Mont', 'Barlow', sans-serif; }
  .ch-cote .ch-marque small { line-height: 16.5px; }
  .ch-cote .ch-marque .ch-replier { border-color: rgba(255,255,255,.4); color: #fff; }
  .ch-cote .ch-marque .ch-replier:hover { background: rgba(255,255,255,.18); }
}
