[hidden]{display:none!important}  /* un élément masqué reste masqué, même avec un display:flex/grid */
/* PSR Pilotage — charte PACA SUD RÉGULATION */
:root{
  --vert:#209B6C; --vert-clair:#30BF8A; --vert-fonce:#177A55; --vert-nuit:#0E3B2C; --vert-nav:#1A5C44;
  --vert-pale:#E3F4EC; --vert-texte:#146C4A;
  --ink:#1A211E; --muted:#56605B; --line:#DDE5E0; --line2:#EDF1EE; --bg:#F3F6F4;
  --orange:#9A4508; --orange-pale:#FCEBD9; --rouge:#B3261E;
}
*{box-sizing:border-box}
body{margin:0;font-family:'Inter','Segoe UI',system-ui,sans-serif;background:var(--bg);color:var(--ink);font-size:13.5px;line-height:1.45;-webkit-font-smoothing:antialiased;font-feature-settings:'cv11','ss01'}
a{color:var(--vert-fonce)}
.num{font-variant-numeric:tabular-nums;font-feature-settings:'tnum'}

/* En-tête */
header.top{display:flex;align-items:center;gap:26px;height:64px;padding:0 22px;background:var(--vert-nuit);color:#fff;position:sticky;top:0;z-index:5;border-bottom:3px solid var(--vert-clair)}
.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:#fff}
.brand img{height:42px;width:auto;display:block}
.brand div{display:flex;flex-direction:column;line-height:1.15}
.brand b{letter-spacing:.05em;font-size:15px;white-space:nowrap}
.brand span{font-size:11px;color:#A9CDD9;white-space:nowrap}
nav.menu{display:flex;gap:2px;overflow-x:auto}
nav.menu a,nav.menu span{color:#CFE1E7;text-decoration:none;padding:8px 11px;border-radius:6px;font-weight:500;white-space:nowrap}
nav.menu a:hover{color:#fff;background:rgba(255,255,255,.06)}
nav.menu a.on{background:var(--vert-nav);color:#fff;box-shadow:inset 0 -2px 0 var(--vert-clair)}
nav.menu span{opacity:.45;cursor:default}
.who{margin-left:auto;font-size:13px;color:#CFE1E7;white-space:nowrap;display:flex;align-items:center;gap:10px}
.who .av{width:28px;height:28px;border-radius:50%;background:var(--vert);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;text-transform:uppercase}
.who a{color:#fff;text-decoration:none;border:1px solid rgba(255,255,255,.25);padding:5px 10px;border-radius:6px}
.who a:hover{border-color:var(--vert-clair)}

/* Filtres horizontaux */
.filtres{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap;padding:12px 22px;background:#fff;border-bottom:1px solid var(--line)}
.filtres label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted);font-weight:600}
select,input{font:inherit;padding:8px 10px;border:1px solid #CCD6D0;border-radius:6px;background:#fff;color:var(--ink)}
select:focus,input:focus{outline:2px solid var(--vert-clair);outline-offset:0;border-color:var(--vert)}
.btn{font:inherit;font-weight:600;padding:9px 16px;border-radius:6px;border:1px solid var(--vert-fonce);background:var(--vert-fonce);color:#fff;cursor:pointer;text-decoration:none;display:inline-block}
.btn:hover{background:var(--vert-texte)}
.btn2{font:inherit;font-weight:600;padding:9px 16px;border-radius:6px;border:1px solid #BFCED3;background:#fff;color:var(--vert-fonce);cursor:pointer;text-decoration:none;display:inline-block}
.btn2:hover{border-color:var(--vert)}

main{padding:18px 22px;display:flex;flex-direction:column;gap:16px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.card{background:#fff;border:1px solid var(--line);border-radius:10px}
.kpi{padding:14px 16px;display:flex;flex-direction:column;gap:4px;border-top:3px solid var(--vert)}
.kpi.alerte{border-top-color:#E8893A}
.kpi .lbl{font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;font-weight:600}
.kpi .v{font-size:25px;font-weight:650;letter-spacing:-.02em;line-height:1.2}.kpi .s{font-size:12px;color:var(--muted)}

/* Tableau */
.table-wrap{overflow-x:auto}
table{border-collapse:collapse;width:100%}
th{font-size:11px;color:var(--muted);font-weight:600;text-align:left;padding:9px 10px;border-bottom:2px solid var(--line);text-transform:uppercase;letter-spacing:.05em;white-space:nowrap;background:#fff}
td{padding:9px 10px;border-bottom:1px solid var(--line2);vertical-align:top}
tbody tr:hover td{background:#F6FAF8}
td.r,th.r{text-align:right;white-space:nowrap}
td.small.num{max-width:175px;overflow-wrap:anywhere}
td.chantier{min-width:280px}
td.nw{white-space:nowrap}
td.small{font-size:12.5px}td.muted{color:var(--muted)}

/* Statuts */
.chip{display:inline-block;font-size:12px;padding:2px 9px;border-radius:99px;font-weight:600;white-space:nowrap}
.ok{background:#E3F4EC;color:#146C4A}
.warn{background:var(--orange-pale);color:var(--orange)}
.done{background:#ECEFED;color:#4A524E}
.cmd{background:#fff;color:#4A524E;border:1px solid #C3CEC8}
.fact{background:var(--vert-fonce);color:#fff}
.ret{background:var(--rouge);color:#fff}

/* Connexion */
.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;
  background:radial-gradient(1200px 600px at 20% -10%,#DDF2E8 0,transparent 60%),var(--bg)}
.login{width:100%;max-width:400px;padding:30px 30px 24px;display:flex;flex-direction:column;gap:14px;box-shadow:0 10px 30px rgba(14,59,44,.08)}
.login .logo{display:flex;flex-direction:column;align-items:center;gap:6px;padding-bottom:6px;border-bottom:1px solid var(--line2)}
.login .logo img{height:92px;width:auto}
.login .logo span{font-size:12px;color:var(--muted)}
.login h1{margin:4px 0 0;font-size:19px}
.login label{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:600;color:var(--muted)}
.erreur{background:var(--orange-pale);color:var(--orange);padding:9px 12px;border-radius:6px;font-size:13px}
.foot{font-size:12px;color:var(--muted)}

/* Typographie fine */
td.chantier b{font-weight:600;font-size:13px;letter-spacing:.005em}
td.chantier .foot{margin-top:2px}
.kpi .liste{font-size:14px;font-weight:600;line-height:1.7}
.kpi .liste span{color:var(--muted);font-weight:500;display:inline-block;width:62px}
th{font-weight:600;letter-spacing:.06em}
.brand b{font-weight:700}

/* Fiche affaire et formulaires */
.entete{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.entete h1{margin:4px 0 6px;font-size:22px;letter-spacing:-.01em}
.meta{display:flex;flex-wrap:wrap;gap:16px;color:var(--muted);font-size:13px}
.chip.gros{font-size:13px;padding:5px 12px}
.bandeau{padding:10px 14px;border-radius:8px;font-weight:500}
.bandeau.ok{background:#E3F4EC;color:#146C4A}
.bandeau.err{background:var(--orange-pale);color:var(--orange)}
.grid2{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:16px;align-items:start}
@media (max-width:1100px){.grid2{grid-template-columns:1fr}}
.col{display:flex;flex-direction:column;gap:16px}
.bloc{padding:18px 20px;display:flex;flex-direction:column;gap:12px}
.bloc h2{margin:0;font-size:15px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
.form-grid label,.ajout label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted);font-weight:600}
.form-grid label em{font-style:normal;font-weight:400}
.form-grid .large{grid-column:1/-1}
textarea{font:inherit;padding:8px 10px;border:1px solid #CCD6D0;border-radius:6px;resize:vertical}
.actions{display:flex;justify-content:flex-end;gap:10px}
.ajout{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:end;padding-top:10px;border-top:1px solid var(--line2)}
.ajout input{min-width:0;width:100%}
.lien{background:none;border:0;color:var(--muted);cursor:pointer;font-size:14px;padding:2px 6px}
.lien:hover{color:var(--rouge)}
.consignes{background:#FDF7EF;border-color:#F1DDC4}
.consignes p{margin:0}
.hist{padding:6px 0;border-bottom:1px solid var(--line2);font-size:13px}
.cond select{width:100%;font-size:12.5px;padding:6px 8px}
a.ligne{color:inherit;text-decoration:none}
a.ligne:hover b{color:var(--vert-fonce);text-decoration:underline}

/* Lecture automatique */
.depot{border:1.5px dashed #9FCDB7;background:#F7FCF9}
.fichiers{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end}
@media (max-width:900px){.fichiers{grid-template-columns:1fr}}
.zone{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;color:var(--muted);background:#fff;border:1px solid var(--line);border-radius:8px;padding:10px 12px}
.zone em{font-style:normal;font-weight:400}
.zone input{border:0;padding:0}
.form-grid label>span{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tag{font-size:10.5px;font-weight:600;padding:1px 7px;border-radius:99px;text-transform:none;letter-spacing:0}
.tag.lu{background:var(--vert-pale);color:var(--vert-texte)}
.tag.auto{background:#ECEFED;color:#4A524E}
.tag.verif{background:var(--orange-pale);color:var(--orange)}
.a-verifier input,.a-verifier select{border-color:#E8893A}
.ctrl{display:flex;flex-direction:column;gap:2px;padding:9px 0;border-bottom:1px solid var(--line2);font-size:13px}
.ctrl span{color:var(--muted)}
.ctrl.bon b{color:var(--vert-texte)}
.ctrl.attention b{color:var(--orange)}
.doc{display:flex;align-items:center;gap:8px;padding:5px 0;font-size:13px}
.ajout-doc{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;padding-top:8px;border-top:1px solid var(--line2)}

/* Devis et validations */
.btn2.petit,.btn.petit{padding:5px 10px;font-size:12.5px}
.valid{gap:10px}
.valid.conforme{border-left:4px solid #209B6C}
.valid-tete{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.valid-corps{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:18px}
@media (max-width:1000px){.valid-corps{grid-template-columns:1fr}}
.valid-infos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.valid-infos div{display:flex;flex-direction:column;gap:2px}
.valid .actions form{display:inline}

.client-tag{font-weight:700;color:var(--vert-nuit);background:#EEF3F0;border:1px solid var(--line);border-radius:6px;padding:2px 9px;font-size:13px}

/* ===== Statuts : couleurs reprises de la légende du fichier Excel ===== */
.st-regle      {--c:#00B050; --f:#E3F6EA; --t:#0B6B34}
.st-facture    {--c:#00B0F0; --f:#E0F5FD; --t:#035E82}
.st-situation  {--c:#F02900; --f:#FDE6E0; --t:#A31C00}
.st-afacturer  {--c:#8DB4E2; --f:#E8F0FA; --t:#1F4E79}
.st-commande   {--c:#C06CD6; --f:#F6E8FA; --t:#6E2482}
.st-sanscmd    {--c:#FFC000; --f:#FFF4D1; --t:#7A5400}
.st-validation {--c:#E6D800; --f:#FFFBC9; --t:#5E5700}
.st-retard     {--c:#C00000; --f:#F9DEDE; --t:#8E0000}
.st-sensible   {--c:#E8893A; --f:#FCEBD9; --t:#9A4508}
.st-acompte    {--c:#8FA9BF; --f:#EDF2F6; --t:#3E5568}
.st-cloturee   {--c:#9AA39E; --f:#EEF0EF; --t:#4A524E}
.st-attente    {--c:#9AA39E; --f:#FFFFFF; --t:#4A524E}
.chip[class*="st-"]{background:var(--f);color:var(--t);border:1px solid color-mix(in srgb,var(--c) 45%,transparent);display:inline-flex;align-items:center;gap:6px}
.pastille{width:8px;height:8px;border-radius:50%;background:var(--c);flex:none}
.chip.st-retard{background:var(--c);color:#fff;border-color:var(--c)}
.chip.st-retard .pastille{background:#fff}

/* Légende cliquable (filtre rapide) */
.legende{display:flex;flex-wrap:wrap;gap:8px}
.leg{display:inline-flex;align-items:center;gap:7px;padding:6px 11px;border-radius:99px;background:#fff;border:1px solid var(--line);
     color:var(--ink);text-decoration:none;font-size:12.5px;font-weight:500}
.leg b{font-weight:700;color:var(--t)}
.leg:hover{border-color:var(--c)}
.leg.actif{background:var(--f);border-color:var(--c);box-shadow:inset 0 0 0 1px var(--c)}

/* Tableau de facturation */
table.factu tbody tr td:first-child{box-shadow:inset 4px 0 0 var(--c)}
table.factu tbody tr:nth-child(even) td{background:#FAFCFB}
table.factu tbody tr:hover td{background:#F2F8F5}
table.factu td{padding:12px 12px;vertical-align:top}
table.factu td.chantier{min-width:320px;padding-left:16px}
table.factu td.chantier b{font-size:13.5px}
.sous{font-size:12px;color:var(--muted);margin-top:3px}
td.refs{font-size:12.5px;white-space:nowrap}
td.refs div{display:flex;gap:8px;line-height:1.55}
td.refs span{display:inline-block;width:38px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em;padding-top:1px}
td.refs div{max-width:230px;overflow:hidden;text-overflow:ellipsis}
.fa{display:inline-block;background:#F1F4F2;border:1px solid var(--line);border-radius:5px;padding:1px 6px;margin:0 4px 4px 0;font-size:12px}
td.fort{font-weight:600}

/* Historique des encaissements */
.histo-tete{display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap}
.histo-leg{display:flex;gap:16px;flex-wrap:wrap;font-size:12.5px;align-items:center}
.histo-leg i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px}
.histo-barres{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:10px;align-items:end;height:215px;padding-top:6px}
.histo-col{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;height:100%}
.histo-pile{width:100%;max-width:46px;display:flex;flex-direction:column;border-radius:4px 4px 0 0;overflow:hidden}
.histo-total{font-size:11.5px;color:var(--muted)}
.histo-mois{font-size:12px;color:var(--muted)}
.histo-col.courant .histo-mois{color:var(--ink);font-weight:700}
.histo-col.courant .histo-pile{box-shadow:0 0 0 2px var(--vert-clair)}

/* Choix des mois prévus */
.mois-choix{display:flex;flex-direction:column;gap:8px}
.lbl-mois{font-size:12px;color:var(--muted);font-weight:600}
.lbl-mois em{font-style:normal;font-weight:400}
.mois-liste{display:flex;flex-wrap:wrap;gap:8px}
.mois-case{display:inline-flex}
.mois-case input{position:absolute;opacity:0;pointer-events:none}
.mois-case span{padding:6px 12px;border:1px solid #CCD6D0;border-radius:99px;font-size:13px;cursor:pointer;background:#fff;user-select:none}
.mois-case input:checked+span{background:#F6E8FA;border-color:#C06CD6;color:#6E2482;font-weight:600}
.mois-case input:focus-visible+span{outline:2px solid var(--vert-clair)}

/* ===== Prévisionnel ===== */
.navmois{margin-left:auto;display:flex;gap:6px;align-self:center}
.aide-prev{display:flex;flex-wrap:wrap;gap:18px;align-items:center}
.aide-prev i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px;vertical-align:-1px}
i.pv{background:#E9DDF0;border:1px solid #C06CD6} i.fa-c{background:#E0F5FD;border:1px solid #00B0F0} i.rg{background:#E3F6EA;border:1px solid #00B050}
table.prev{table-layout:fixed;min-width:1350px}
table.prev th.col-aff,table.prev td.col-aff{width:300px;position:sticky;left:0;background:#fff;z-index:1}
table.prev tbody tr td.col-aff{box-shadow:inset 4px 0 0 var(--c)}
table.prev th.col-mois{text-align:center;width:112px}
table.prev th.courant{color:#146C4A}
table.prev th.avant,table.prev td.avant{background:#FFF8F4}
td.case{vertical-align:top;padding:6px;border-left:1px solid var(--line2);min-height:54px;position:relative}
td.case.courant{background:#F4FBF7}
td.case.cible{background:#EEF7FF;box-shadow:inset 0 0 0 2px #00B0F0}
.puce{display:block;margin:0 0 4px;padding:4px 6px;border-radius:6px;font-size:12px;font-variant-numeric:tabular-nums;text-align:right;border:1px solid}
.puce small{color:var(--muted);font-size:10.5px}
.puce.prevu{background:#F3EAF8;border-color:#C06CD6;color:#5A1D6B;cursor:grab}
.puce.prevu:hover{background:#EBDDF3}
.puce.prevu.en-cours{opacity:.4}
.puce.facture{background:#E0F5FD;border-color:#7FD3F2;color:#035E82}
.puce.regle{background:#E3F6EA;border-color:#7FD3A2;color:#0B6B34}
.plus{display:none;width:100%;border:1px dashed #C9D6CE;background:none;border-radius:6px;color:var(--muted);cursor:pointer;font-size:13px;padding:2px 0}
td.case:hover .plus{display:block}
.a-planif{color:var(--orange);font-weight:600;margin-left:6px}
.chip.mini{font-size:11px;padding:1px 7px}
.decal{margin-left:8px;white-space:nowrap}
.decal button{border:1px solid var(--line);background:#fff;border-radius:5px;cursor:pointer;padding:0 6px;font-size:11px;color:var(--vert-fonce);margin-right:2px}
.decal button:hover{border-color:var(--vert)}
table.prev tfoot td{border-top:2px solid var(--line);background:#FAFCFB;font-size:12px;text-align:right;vertical-align:top}
table.prev tfoot td.col-aff{text-align:left}
.t-pv{color:#6E2482}.t-fa{color:#035E82}.t-rg{color:#0B6B34}
.toast{position:fixed;bottom:22px;right:22px;background:var(--vert-nuit);color:#fff;padding:10px 16px;border-radius:8px;z-index:20}
.toast.err{background:var(--rouge)}

/* ===== Harmonisation de tous les écrans ===== */
.legende .leg .foot{margin-left:2px;font-weight:400}
table.factu.compact td{padding:8px 10px}
table.factu.compact tbody tr td:first-child{padding-left:12px}
.titre-lien{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.valid{border-left:4px solid var(--c)}
.valid.conforme{border-left-color:var(--c);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--c) 30%,transparent)}
.st-attente .pastille{background:#9AA39E}
.bloc h2{display:flex;align-items:center;gap:8px}
.bloc h2::before{content:"";width:4px;height:16px;border-radius:2px;background:var(--vert)}
.entete h1{font-weight:700}
.card.kpi{transition:box-shadow .15s}
.card.kpi:hover{box-shadow:0 4px 14px rgba(14,59,44,.07)}
.consignes h2::before{background:#E8893A}

/* Devis : statut « en attente » plus vivant, « perdu », boutons icônes */
.st-attente {--c:#1BA39C; --f:#E1F5F3; --t:#0E6E69}
.st-perdu   {--c:#B7A9A0; --f:#F4F0ED; --t:#6B5E56}
.st-attente .pastille{background:var(--c)}
.actions-ic{display:flex;gap:6px;align-items:center}
.actions-ic form{display:inline}
.ic{width:34px;height:34px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);
    background:#fff;cursor:pointer;padding:0;transition:all .15s}
.ic svg{width:18px;height:18px;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ic-ok svg{stroke:#177A55}
.ic-ok:hover{background:#E3F4EC;border-color:#209B6C}
.ic-perdu svg{stroke:#B3261E}
.ic-perdu:hover{background:#FBE7E5;border-color:#E3A29D}
.ic-retour svg{stroke:#5A6A63}
.ic-retour:hover{background:#EEF3F0;border-color:#9AA39E}

/* ===== Règlements ===== */
.barre-age{display:flex;height:14px;border-radius:7px;overflow:hidden;background:#EEF1EF}
.barre-age div{background:var(--c)}
.grid-regl{display:grid;grid-template-columns:minmax(0,2.3fr) minmax(0,1fr);gap:16px;align-items:start}
@media (max-width:1200px){.grid-regl{grid-template-columns:1fr}}
th.coche,td.coche{width:34px;text-align:center}
td.coche input,th.coche input{width:16px;height:16px;accent-color:var(--vert-fonce)}
details.encaisser{position:relative}
details.encaisser summary{list-style:none}
details.encaisser summary::-webkit-details-marker{display:none}
.pop{position:absolute;right:0;top:40px;z-index:10;background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px;
     box-shadow:0 10px 30px rgba(14,59,44,.15);display:grid;gap:8px;width:230px}
.pop label{display:flex;flex-direction:column;gap:3px;font-size:12px;color:var(--muted);font-weight:600}
.barre-lot{position:sticky;bottom:12px;display:flex;align-items:center;gap:10px;background:var(--vert-nuit);color:#fff;
           padding:10px 14px;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.2);font-size:13.5px}
.barre-lot input,.barre-lot select{padding:5px 8px}
.ligne-client{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--line2);text-decoration:none;color:inherit}
.ligne-client:hover b{color:var(--vert-fonce)}
.ligne-client .sous,.ligne-client span.r .sous{display:block}
.en-ligne{display:flex;gap:6px;align-items:center}
.en-ligne input{padding:5px 8px}

/* ===== Relances ===== */
.ligne-client{align-items:center}
.ligne-client>a:first-child{text-decoration:none;color:inherit;flex:1}
.ic-relance svg{stroke:#9A4508}
.ic-relance:hover{background:#FCEBD9;border-color:#E8893A}
.corps-mail{font-family:inherit;font-size:13.5px;line-height:1.5}
.joindre{display:flex;gap:8px;align-items:center;font-size:13.5px}
.pieces{display:flex;flex-wrap:wrap;gap:6px}
.niveaux{display:grid;gap:8px}
.niveau{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;cursor:pointer}
.niveau input{position:absolute;opacity:0}
.niveau.actif{border-color:#E8893A;background:#FDF7EF}
.liste-fact{display:flex;flex-direction:column;border-top:1px solid var(--line2)}
.liste-fact label{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line2);font-size:13px}
.liste-fact label.echue b{color:#8E0000}
.corps-mail,textarea{font-weight:400}

/* ===== Clients et sous-traitance ===== */
.form-grid.trois{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:12px}
.nouvelle-st summary{list-style:none;display:inline-block;cursor:pointer}
.nouvelle-st summary::-webkit-details-marker{display:none}
button.chip{cursor:pointer;font:inherit;font-size:12px;font-weight:600}

/* ===== Tableau de bord ===== */
.bloc-titre{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:4px 0 -6px}
a.kpi-lien{text-decoration:none;color:inherit}
a.kpi-lien:hover{box-shadow:0 6px 18px rgba(14,59,44,.10);border-color:var(--vert)}
.alerte-ligne{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:8px;border:1px solid var(--line2);
              background:var(--f);color:var(--t);text-decoration:none;font-size:13.5px;font-weight:500}
.alerte-ligne:hover{border-color:var(--c)}
.alerte-ligne .fleche{margin-left:auto;font-size:18px;opacity:.6}
a.histo-col{text-decoration:none;color:inherit}

/* Navigation sans barre de défilement */
nav.menu{overflow:visible;flex-wrap:nowrap}
nav.menu a{padding:8px 10px}
header.top{gap:20px}
.sous-onglets{display:flex;gap:4px;padding:10px 22px 0;background:#fff;border-bottom:1px solid var(--line)}
.sous-onglets a{padding:9px 14px;border-radius:8px 8px 0 0;text-decoration:none;color:var(--muted);font-weight:600;font-size:13.5px;border:1px solid transparent;border-bottom:0;margin-bottom:-1px;display:flex;gap:8px;align-items:center}
.sous-onglets a.on{color:var(--ink);background:var(--bg);border-color:var(--line)}
.sous-onglets a:hover{color:var(--vert-fonce)}

/* ===== Résultats ===== */
.obj-pile{position:relative;overflow:visible}
.trait-obj{position:absolute;left:-5px;right:-5px;height:3px;background:#E8893A;border-radius:2px;z-index:2}
table.resultats td,table.grille td{white-space:nowrap}
table.resultats td:first-child{min-width:170px}
input.cellule{width:88px;text-align:right;padding:4px 6px;font-size:12.5px;border-color:transparent;background:transparent}
input.cellule:hover{border-color:#CCD6D0;background:#fff}
input.cellule:focus{background:#fff;border-color:var(--vert)}
input.cellule.ok{background:#E3F4EC}
details.charges summary{list-style:none;cursor:pointer;display:flex;align-items:baseline;gap:14px}
details.charges summary::-webkit-details-marker{display:none}
details.charges summary h2::after{content:" ▾";color:var(--muted);font-size:12px}
td.lib{min-width:230px;max-width:300px;overflow:hidden;text-overflow:ellipsis}
.badge{display:inline-block;background:#E8893A;color:#1A211E;font-size:11px;font-weight:700;border-radius:99px;padding:1px 7px;line-height:1.5}

/* Menu : pastille alignée */
nav.menu a{display:inline-flex;align-items:center;gap:7px;line-height:20px}
nav.menu a .badge{opacity:1;padding:0 7px;border-radius:99px;font-size:11px;line-height:18px;cursor:pointer;background:#E8893A;color:#1A211E}
/* États des devis */
.st-dv-attente {--c:#5BA4E6; --f:#E6F1FC; --t:#1D5C94}
.st-dv-encours {--c:#7CCB8E; --f:#EAF7EC; --t:#2E7D45}
.st-dv-termine {--c:#1E7B45; --f:#D7EEDF; --t:#10522C}
.chip.st-dv-termine{background:#1E7B45;color:#fff;border-color:#1E7B45}
.chip.st-dv-termine .pastille{background:#fff}

/* ===== Graphiques ===== */
.graphes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.graphes .g-large{grid-column:1 / -1}
@media (max-width:1100px){.graphes{grid-template-columns:1fr}}
.g-tete{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap}
.g-zone{position:relative;height:280px}
.g-large .g-zone{height:320px}
.g-donut{display:flex;align-items:center}
.donut-centre{position:absolute;left:0;width:58%;top:50%;transform:translateY(-50%);text-align:center;pointer-events:none;display:flex;flex-direction:column}
.donut-centre b{font-size:20px}
.donut-centre span{font-size:12px;color:var(--muted)}

/* ===== Suivi des affaires ===== */
.nat-chantier{--c:#00B0F0;--f:#E0F5FD;--t:#035E82}
.nat-armoire{--c:#E8893A;--f:#FCEBD9;--t:#9A4508}
.nat-etude{--c:#C06CD6;--f:#F6E8FA;--t:#6E2482}
.nat-ingenierie{--c:#177A55;--f:#DDF0E6;--t:#10522C}
.leg[class*="nat-"] b{color:var(--t)}
.barre-nat{display:flex;height:10px;border-radius:5px;overflow:hidden;background:#EEF1EF}
.barre-nat span{background:var(--c)}
.pastille-nat{display:inline-block;width:10px;height:10px;border-radius:3px;background:var(--c);margin-right:8px;vertical-align:-1px}
table.factu tbody tr[class*="nat-"] td:first-child{box-shadow:inset 4px 0 0 var(--c)}
.jauge{height:8px;border-radius:4px;background:#EEF1EF;overflow:hidden}
.jauge span{display:block;height:100%;background:#177A55}
.jauge.alerte span{background:#FFC000}
.jauge.depasse span{background:#C00000}
form.affecter{display:flex;gap:6px;align-items:center}
form.affecter select{max-width:240px;padding:5px 6px;font-size:12.5px}

/* Réglages des synthèses */
.synth-tete{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.sections-choix{display:flex;flex-wrap:wrap;gap:8px}
.who a.reglages{border:0;padding:4px 8px;font-size:16px}

/* ===== Rentabilité ===== */
details.methode summary,details.charge-bloc summary{list-style:none;cursor:pointer}
details.methode summary::-webkit-details-marker,details.charge-bloc summary::-webkit-details-marker{display:none}
details.methode summary{display:flex;gap:12px;align-items:baseline}
.charge-kpis{display:flex;flex-wrap:wrap;gap:18px;align-items:center;font-size:13.5px;margin-top:6px}
details.charge-bloc summary h2::after{content:" ▾";color:var(--muted);font-size:12px}
.charge-form select{min-width:200px}
.charge-mini select{margin-top:4px;border:1px dashed #CCD6D0;background:transparent;font-size:12px;padding:2px 6px;color:var(--muted);max-width:260px}
.charge-mini select:hover{border-style:solid;color:var(--ink)}
th.th-nat{white-space:nowrap}
.txt-nat{color:var(--t);font-weight:600}

table.rent-co td,table.rent-co th{padding-left:8px;padding-right:8px}
table.rent-co .sous{white-space:nowrap}
table.rent-co td.chantier{min-width:170px;max-width:200px}
.tronque{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
table.rent-co th{font-size:10.5px}

.form-grid.quatre{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:6px}
.heures-prevues{display:flex;flex-direction:column;gap:4px}

/* Matériel et clôture */
.form-grid.six{grid-template-columns:1.2fr 1.4fr 1.2fr 1fr 1fr auto;align-items:end}
.cloture-bandeau{background:#D7EEDF;border:1px solid #1E7B45;color:#10522C;display:flex;align-items:center;gap:14px;justify-content:space-between}
.controle{padding:9px 0;border-bottom:1px solid var(--line2)}
.controle.ok b{color:#177A55}
.controle.ko b{color:#9A4508}
/* Inscription */
.etapes-insc{display:flex;gap:8px;font-size:12px}
.etapes-insc span{flex:1;text-align:center;padding:5px;border-radius:6px;background:#EEF1EF;color:var(--muted);font-weight:600}
.etapes-insc span.on{background:var(--vert-pale);color:var(--vert-fonce)}
.qr-insc{display:flex;justify-content:center}
.qr-insc svg{width:210px;height:210px}
.consignes-insc{margin:0;padding-left:18px;line-height:1.6}
.lien-invit input{width:100%;margin-top:8px;font-family:monospace;font-size:12px}
.mini-ic{width:28px;height:28px;border-radius:7px;vertical-align:middle;margin-left:4px}
.mini-ic svg{width:14px;height:14px}
.chip.aucun{font-style:italic}

/* Heures prévues : vue compacte */
.prev-liste{display:flex;flex-direction:column;border-top:1px solid var(--line2)}
.prev-ligne{display:grid;grid-template-columns:150px 150px 1fr;gap:14px;align-items:center;padding:8px 10px;border-bottom:1px solid var(--line2);
            box-shadow:inset 4px 0 0 var(--c)}
.prev-ligne.muet{opacity:.55}
.prev-nom{display:flex;align-items:center;font-weight:600;font-size:13.5px}
.prev-saisie{display:flex;align-items:center;gap:6px;justify-content:flex-end}
.prev-input{width:70px;text-align:right;padding:5px 8px}
.prev-unite{color:var(--muted);font-size:12px;width:10px}
.prev-aucune{display:inline-block;width:94px;text-align:center;font-size:12px;font-style:italic;color:var(--muted);background:#F1F3F2;border-radius:6px;padding:5px 0}
.prev-btn{width:26px;height:26px;border-radius:6px;border:1px solid var(--line);background:#fff;cursor:pointer;color:#5A6A63;font-size:13px;line-height:1;padding:0}
.prev-btn.croix{color:#B3261E}
.prev-btn:hover{border-color:currentColor}
.prev-conso{display:flex;flex-direction:column;gap:4px}
.prev-texte{font-size:12.5px;color:var(--ink);display:flex;gap:6px;align-items:baseline}
.prev-pct{margin-left:auto;font-weight:700;color:#177A55}
.prev-pct.alerte{color:#9A5D00}
.prev-pct.depasse{color:#8E0000}
.alerte-txt{color:#9A4508}
.muet-txt{color:var(--muted);font-style:italic}
.prev-total{box-shadow:none;background:#FAFCFB;font-weight:700}
.prev-total .prev-saisie{padding-right:32px}
/* Natures sans heures prévues : regroupées, discrètes */
.sans-prevu{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:8px}
.chip-sans{display:inline-flex;align-items:center;gap:5px;border:1px dashed #CCD6D0;background:#fff;border-radius:99px;padding:2px 9px;
           font:inherit;font-size:12px;color:var(--muted);cursor:pointer}
.chip-sans .pastille-nat{width:8px;height:8px;margin-right:0;opacity:.6}
.chip-sans .retour{opacity:0;transition:opacity .15s}
.chip-sans:hover{border-style:solid;color:var(--ink)}
.chip-sans:hover .retour{opacity:1}

/* Fenêtre de choix d'une affaire */
dialog.choix-affaire{width:min(760px,94vw);max-height:84vh;border:0;border-radius:14px;padding:0;box-shadow:0 24px 70px rgba(10,40,30,.35);display:none;flex-direction:column}
dialog.choix-affaire[open]{display:flex}
dialog.choix-affaire::backdrop{background:rgba(14,59,44,.35)}
.ca-tete{display:flex;justify-content:space-between;gap:12px;padding:16px 18px 10px;border-bottom:1px solid var(--line2)}
.ca-titre{font-weight:700;font-size:16px}
.ca-detail{font-size:13px;color:var(--muted);margin-top:3px}
.ca-fermer{border:0;background:none;font-size:18px;cursor:pointer;color:var(--muted)}
#ca-recherche{margin:12px 18px 6px;padding:11px 14px;font-size:15px;border:2px solid var(--vert);border-radius:10px}
.ca-liste{overflow:auto;padding:4px 10px 10px;flex:1;min-height:200px}
.ca-groupe{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:10px 8px 4px}
.ca-ligne{padding:9px 10px;border-radius:8px;cursor:pointer}
.ca-ligne.actif{background:var(--vert-pale);box-shadow:inset 3px 0 0 var(--vert)}
.ca-nom{font-weight:600;font-size:14px;display:flex;gap:8px;align-items:center}
.ca-meta{font-size:12px;color:var(--muted);margin-top:2px}
.ca-sugg{font-size:11px;font-weight:700;background:#F6E8FA;color:#6E2482;border-radius:99px;padding:1px 7px}
.ca-vide{padding:20px;color:var(--muted);text-align:center}
.ca-pied{display:flex;justify-content:space-between;align-items:center;padding:10px 18px;border-top:1px solid var(--line2);background:#FAFCFB;border-radius:0 0 14px 14px}
.btn-choisir{display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid #CCD6D0;border-radius:8px;background:#fff;cursor:pointer;font:inherit;font-size:13px;color:var(--ink);max-width:340px;text-align:left}
.btn-choisir:hover{border-color:var(--vert)}
.btn-choisir .loupe{opacity:.6}
.achat-replie summary{cursor:pointer;margin-top:8px}

select.deplacer-groupe{display:block;margin-top:3px;font-size:11px;padding:1px 4px;border:1px dashed #CCD6D0;color:var(--muted);background:transparent;max-width:200px}

/* Tableau de bord : graphiques en haut, plus compacts */
.graphes.tdb{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.graphes.tdb .g-large{grid-column:span 2}
.graphes.tdb .card.bloc{padding:12px 14px;gap:6px}
.graphes.tdb h2{font-size:14px}
.graphes.tdb .g-zone{height:210px}
.graphes.tdb .g-large .g-zone{height:210px}
.graphes.tdb .donut-centre b{font-size:16px}
@media (max-width:1200px){.graphes.tdb{grid-template-columns:repeat(2,minmax(0,1fr))}}
.tdb-bas .card.bloc{padding:12px 14px;gap:6px}
.tdb-bas h2{font-size:14px}
.tdb-bas .alerte-ligne{padding:6px 10px;font-size:12.5px}
.tdb-bas .ligne-client{padding:5px 0;font-size:13px}
.tdb-bas .ic{width:28px;height:28px}
.kpis .card.kpi{padding:12px 14px}

/* Petite aide « ? » sur les graphiques */
.aide{position:relative;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;
      border:1px solid #CCD6D0;color:var(--muted);font-size:10.5px;font-weight:700;cursor:help;margin-left:6px;vertical-align:2px;background:#fff}
.aide:hover,.aide:focus{border-color:var(--vert);color:var(--vert-fonce);outline:none}
.aide-bulle{display:none;position:absolute;left:50%;top:22px;transform:translateX(-50%);z-index:30;width:320px;padding:10px 12px;
            background:var(--vert-nuit);color:#fff;border-radius:8px;font-size:12.5px;font-weight:400;line-height:1.5;text-transform:none;
            letter-spacing:0;text-align:left;box-shadow:0 10px 30px rgba(0,0,0,.25);white-space:normal}
.aide-bulle::before{content:"";position:absolute;top:-6px;left:50%;transform:translateX(-50%);border:6px solid transparent;border-top:0;border-bottom-color:var(--vert-nuit)}
.aide:hover .aide-bulle,.aide:focus .aide-bulle{display:block}
.g-large .aide-bulle,.graphes .card:first-child .aide-bulle{left:0;transform:none}
.g-large .aide-bulle::before,.graphes .card:first-child .aide-bulle::before{left:14px}

/* ===== Dépôt de documents ===== */
.zone-depot{border:2px dashed #9CC9B3;border-radius:14px;background:#F4FBF7;padding:34px;text-align:center;display:flex;flex-direction:column;gap:8px;align-items:center}
.zone-depot.survol{background:#E3F4EA;border-color:var(--vert)}
.zd-icone{font-size:34px;color:var(--vert)}
.zd-titre{font-size:17px;font-weight:700}
.zd-attente{font-weight:600;color:var(--vert-fonce)}
.lien-bouton{color:var(--vert-fonce);text-decoration:underline;cursor:pointer}
#depot-global{position:fixed;inset:0;z-index:100;background:rgba(14,59,44,.82);display:flex;align-items:center;justify-content:center}
#depot-global[hidden]{display:none}
.dg-cadre{border:3px dashed #7FD3A2;border-radius:18px;padding:60px 80px;text-align:center;color:#fff;display:flex;flex-direction:column;gap:10px;align-items:center}
.dg-cadre .zd-titre{font-size:24px}
.depot-grille{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:16px;align-items:start}
@media (max-width:1100px){.depot-grille{grid-template-columns:1fr}}
.depot-apercu{padding:0;overflow:hidden;position:sticky;top:80px}
.depot-apercu iframe{width:100%;height:78vh;border:0;display:block}
.depot-apercu img{width:100%;display:block}
.champs-lus{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px}
.champs-lus div{display:flex;flex-direction:column;gap:2px}
.champs-lus span{font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.toute-affaire{display:flex;gap:10px;align-items:center}
.lignes-achat .btn-choisir{max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lignes-achat select{font-size:12.5px;padding:4px 6px}
form.ignorer{text-align:right}

.lignes-achat td,.lignes-achat th{padding-left:6px;padding-right:6px}
.lignes-achat .btn-choisir{max-width:210px}
.lignes-achat input.num{width:84px!important}
.depot-grille{grid-template-columns:minmax(0,.9fr) minmax(0,1.25fr)}
/* Prévisionnel : scission et reste à planifier */
.bascule-vue{display:inline-flex;border:1px solid var(--line);border-radius:8px;overflow:hidden;margin-right:6px}
.bascule-vue a{padding:6px 10px;font-size:12.5px;text-decoration:none;color:var(--muted);background:#fff}
.bascule-vue a.on{background:var(--vert-pale);color:var(--vert-fonce);font-weight:700}
.puce.aplanifier{display:inline-block;background:#FFF4D1;border:1px dashed #E0A800;color:#7A5400;cursor:grab;margin-top:4px}
.puce.prevu{cursor:pointer}
.menu-scinder{position:absolute;z-index:40;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px rgba(14,59,44,.18);padding:8px;display:flex;flex-direction:column;gap:4px;min-width:220px}
.menu-scinder button{border:1px solid var(--line2);background:#fff;border-radius:6px;padding:6px 8px;text-align:left;cursor:pointer;font:inherit;font-size:13px}
.menu-scinder button:hover{background:var(--vert-pale)}
.menu-scinder small{color:var(--muted)}
.avoir-bloc summary{cursor:pointer;margin-top:8px}
.dates-perso{display:inline-flex;gap:10px}.dates-perso[hidden]{display:none}
/* Barre d'encours : montant au survol */
.barre-age{overflow:visible}
.barre-age .seg{position:relative;cursor:help}
.barre-age .seg:first-child{border-radius:7px 0 0 7px}.barre-age .seg:last-child{border-radius:0 7px 7px 0}
.seg-bulle{display:none;position:absolute;bottom:20px;left:50%;transform:translateX(-50%);background:var(--vert-nuit);color:#fff;font-size:12.5px;
           padding:7px 10px;border-radius:7px;white-space:nowrap;z-index:20;box-shadow:0 6px 18px rgba(0,0,0,.2)}
.seg:hover .seg-bulle,.seg:focus .seg-bulle{display:block}
/* Retenues de garantie */
.rg-ligne{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:9px 0 9px 10px;border-bottom:1px solid var(--line2);box-shadow:inset 3px 0 0 #8FA9BF}
.rg-liberable,.rg-reclamee{box-shadow:inset 3px 0 0 #E8893A}
.rg-encaissee{opacity:.55;box-shadow:inset 3px 0 0 #00B050}
.rg-ajout summary{cursor:pointer;margin-top:6px}
.apercu-signature{margin-top:10px;padding:10px;border:1px dashed var(--line);border-radius:8px;background:#fff}
/* Annuaire des entreprises */
.annuaire-recherche{display:flex;gap:8px}
.annuaire-recherche input{flex:1;padding:9px 12px;font-size:14px}
.annuaire-ligne{padding:9px 10px;border-radius:8px;cursor:pointer;border:1px solid var(--line2);margin-top:6px}
.annuaire-ligne:hover{border-color:var(--vert);background:var(--vert-pale)}
input.rempli{background:#EFFAF3}
.annuaire-lot select{max-width:560px;width:100%;font-size:13px}
.menu-scinder .lien-menu{display:block;padding:6px 8px;border-radius:6px;text-decoration:none;color:var(--ink);font-size:13px;border:1px solid var(--line2)}.menu-scinder .lien-menu:hover{background:var(--vert-pale)}.puce.facture,.puce.regle{cursor:pointer}
.menu-scinder .lien-menu.fort{background:var(--vert);color:#fff;border-color:var(--vert);font-weight:700;text-align:center}.menu-scinder .lien-menu.fort:hover{background:var(--vert-fonce)}.menu-scinder .ajuster{display:flex;gap:6px}.menu-scinder .ajuster input{flex:1;padding:6px 8px;text-align:right}
.st-trouvee{border:2px solid #209B6C}
/* Sous-traitance : lecture simplifiée */
.legende-st{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.legende-st .chip{text-decoration:none}
.legende-st .chip.actif{outline:2px solid currentColor}
.st-table td{vertical-align:top}
.actions-st{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:6px}
form.rattacher{margin-top:4px;gap:6px}
details.nouvelle-st>summary{display:inline-flex;width:auto;list-style:none;cursor:pointer}details.nouvelle-st>summary::-webkit-details-marker{display:none}
details#chercher-creneaux>summary{display:flex;gap:12px;align-items:baseline;cursor:pointer;list-style:none}
details#chercher-creneaux>summary::-webkit-details-marker{display:none}
details#chercher-creneaux>summary h2::after{content:" ▾";color:var(--muted);font-size:12px}
.filtres-ligne{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin:10px 0}
.filtres-ligne label{display:flex;flex-direction:column;gap:3px;font-size:12px;font-weight:600;color:var(--muted)}
select.a-renseigner{border-color:#E8893A;background:#FFF7EC}
.btn.danger{background:#B3261E;border-color:#B3261E}
.lien.danger{color:#B3261E}
details.nouvelle-st{align-items:flex-start}details.nouvelle-st>summary{align-self:flex-start}
.fin-travaux{border:2px solid #9FD8F5}
.fin-travaux-lien{display:flex;justify-content:flex-end}
/* Heures prévues en lignes */
.heures-lignes tbody.groupe-nat{border-top:2px solid var(--line2)}
.heures-lignes tr.tete-nat td{padding-top:9px}
.heures-lignes tr.ligne-h td{padding-top:3px;padding-bottom:3px;border-top:0}
.heures-lignes tr.ligne-h input[name=l_designation]{width:100%;max-width:340px;font-size:12.5px;padding:4px 8px}
.heures-lignes input.expr{width:120px;text-align:right;padding:4px 8px}
.heures-lignes .resultat{margin-left:6px}
.heures-lignes tr.ajout-h td{padding-top:0;border-top:0}
.heures-lignes input:disabled{background:#F4F6F5;color:var(--ink);border-color:transparent}
.actions.haut{justify-content:space-between;margin-bottom:6px}
details.deverrou summary,details.histo-prev summary{cursor:pointer;margin-top:8px}
tr.tr-cliquable{cursor:pointer}tr.tr-cliquable:hover td{background:rgba(23,122,85,.045)}
/* Suivi : affaires terminées, en bas et marquées en vert */
tr.ligne-terminee td{background:#F1FAF4}
tr.ligne-terminee td.chantier b{color:#177A55}
.coche-fin{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;background:#00B050;color:#fff;
           font-size:12px;font-weight:700;margin-right:6px;vertical-align:1px}
tr.separateur-fin td{background:transparent!important;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);
                     padding-top:16px;border-bottom:2px solid #9FD9B5;box-shadow:none}
/* ---------- Fiche de suivi d'une affaire ---------- */
.kpis-suivi{grid-template-columns:repeat(4,minmax(0,1fr))}
a.lien-kpi{text-decoration:none;color:inherit}
a.lien-kpi:hover{box-shadow:0 0 0 2px #CFE1E7}
.kpis-suivi .v small{font-size:14px;font-weight:600;color:var(--muted)}
.kpis-suivi .jauge{margin:6px 0 2px}
.a-faire{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;justify-content:flex-start}
.a-faire a{font-weight:600}
.a-faire a::before{content:"• "}
.mo-mat{align-items:start}
.mo-mat>.card{min-height:100%}
table.synthese tr.total td{border-top:2px solid var(--line2);background:#FAFBFA}
details.edition{margin-top:10px}
details.edition>summary{list-style:none;display:inline-flex;cursor:pointer}
details.edition>summary::-webkit-details-marker{display:none}
details.edition[open]>summary{margin-bottom:8px}
details.edition[open]{border-top:1px dashed var(--line2);padding-top:10px}
.actions-mat{display:flex;flex-direction:column;gap:4px}
.actions-mat details.edition{margin-top:6px}
h2.titre-second{margin-top:16px}
.verrou-mat{margin-top:10px}
.aucun-mat{margin:4px 0 0}
details#creneaux>summary{cursor:pointer;list-style:none}
details#creneaux>summary::-webkit-details-marker{display:none}
details#creneaux>summary h2::after,details.edition>summary::after{content:""}
details#creneaux:not([open])>summary h2::after{content:" ▸";color:var(--muted);font-size:12px}
@media (max-width:1100px){.kpis-suivi{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Visualiseur de pièces jointes */
.visu-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;align-items:start}
.visu-pdf{width:100%;height:calc(100vh - 230px);min-height:560px;border:0;border-radius:12px;background:#525659;box-shadow:var(--ombre, 0 1px 2px rgba(0,0,0,.06))}
.visu-liste .doc-lien{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;padding:8px 6px;border-bottom:1px solid var(--line2);text-decoration:none;color:inherit;font-size:13px}
.visu-liste .doc-lien .nom{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.visu-liste .doc-lien:hover,.visu-liste .doc-lien.actif{background:var(--vert-pale, #EAF6EF);border-radius:8px}
@media (max-width:1000px){.visu-grid{grid-template-columns:1fr}}
.pj-liste .doc-lien{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;padding:7px 0;border-bottom:1px solid var(--line2);text-decoration:none;color:inherit;font-size:13px}
.pj-liste .doc-lien .nom{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pj-liste .doc-lien:hover .nom{color:var(--vert-fonce);text-decoration:underline}
.a-faire a{color:inherit}
.lien-affaire{margin-top:3px}.lies{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;margin-top:6px;font-size:13px}
/* ---------- Planning ---------- */
.nav-semaine{display:flex;align-items:center;gap:8px}
.nav-semaine b{min-width:190px;text-align:center}
.legende-planning{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;font-size:12.5px}
.legende-planning .leg-rapp{color:#E8893A;font-weight:600}
table.planning{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}
table.planning th{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);padding:8px 6px;border-bottom:2px solid var(--line2);text-align:left}
table.planning th.aujourdhui{color:var(--vert-fonce, #0F5A3E)}
table.planning .col-nom{width:170px;padding:8px 10px;vertical-align:top}
table.planning td{border-bottom:1px solid var(--line2);border-left:1px solid var(--line2);vertical-align:top}
table.planning td.aujourdhui,table.planning th.aujourdhui{background:#F1FAF4}
table.planning td.we,table.planning th.we{background:#FAFAF8;width:110px}
.case-pl{padding:4px;min-height:64px;height:1px;position:relative}
.case-pl.survol{outline:2px dashed var(--vert);outline-offset:-3px;background:#EAF6EF}
.cr-pl{display:flex;flex-direction:column;gap:1px;background:#fff;border:1px solid var(--line2);border-left:4px solid #9AA5A0;border-radius:6px;
       padding:4px 6px;margin-bottom:4px;font-size:11.5px;line-height:1.25;cursor:pointer;position:relative}
.cr-pl .h{color:var(--muted);font-variant-numeric:tabular-nums;font-size:10.5px}
.cr-pl .t{font-weight:600;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.cr-pl:hover{box-shadow:0 1px 4px rgba(0,0,0,.12)}
.cr-pl.tire{opacity:.4}
.cr-pl.lieu{opacity:.55;border-left-color:#C9C4D6}
.cr-pl.rapp{background:#FFF7EC}
.cr-pl .pt-rapp{position:absolute;top:3px;right:5px;color:#E8893A;font-size:10px}
.cr-pl.nat-chantier{border-left-color:#0EA5E9}.cr-pl.nat-armoire{border-left-color:#E8893A}
.cr-pl.nat-etude{border-left-color:#B464D8}.cr-pl.nat-ingenierie{border-left-color:#177A55}
.cr-pl.nat-absence,.cr-pl.nat-ecole{border-left-color:#9AA5A0;background:#F4F4F2}
.pied-case{display:flex;justify-content:space-between;align-items:center;min-height:18px}
.pied-case .tot{font-size:10.5px;color:var(--muted);font-weight:600}
.pied-case .tot.plein{color:var(--vert-fonce, #0F5A3E)}
.pied-case .plus{border:0;background:transparent;color:var(--muted);font-size:16px;line-height:1;cursor:pointer;opacity:0;padding:0 4px}
.case-pl:hover .plus{opacity:1}
.pied-case .plus:hover{color:var(--vert)}
dialog.dlg-planning{width:min(720px,95vw);border:0;border-radius:14px;padding:20px 22px;box-shadow:0 20px 60px rgba(0,0,0,.25)}
dialog.dlg-planning::backdrop{background:rgba(10,30,20,.35)}
.choix-personnes{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:4px;font-size:13px}
.horaires{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.horaires input[type=time]{width:110px}
.cr-pl .pt-verif{position:absolute;top:3px;right:5px;color:#9AA5A0;font-size:9px}
.legende-planning .leg-verif{color:#7A8580}
dialog.dlg-planning [hidden]{display:none!important}
/* ---------- Planning : vue agenda (comme le mode fractionné d'Outlook) ---------- */
.bascule-vue{display:inline-flex;border:1px solid var(--line2);border-radius:10px;overflow:hidden;align-self:flex-end}
.bascule-vue a{padding:8px 14px;font-weight:600;font-size:13px;text-decoration:none;color:var(--muted);background:#fff}
.bascule-vue a.on{background:var(--vert-pale, #EAF3F6);color:var(--vert-fonce, #0F475A)}
.agenda-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:14px;align-items:start}
.ag-personnes{padding:12px 12px 8px;position:sticky;top:70px}
.ag-p-tete{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px;font-size:13px}
.ag-p{display:flex;align-items:center;gap:8px;padding:5px 2px;font-size:13px;cursor:pointer;border-radius:6px}
.ag-p:hover{background:#F4F6F5}
.ag-p .pastille-p{width:12px;height:12px;border-radius:3px;flex:none}
.ag-p-options{border-top:1px solid var(--line2);margin-top:8px;padding-top:8px;font-size:12.5px}
.ag-zone{padding:0;overflow:hidden}
.ag-scroll{overflow:auto;max-height:calc(100vh - 215px);min-height:420px}
.ag-contenu{display:flex;align-items:flex-start;min-width:max-content}
.ag-axe{position:sticky;left:0;z-index:4;background:#fff;width:40px;flex:none;border-right:1px solid var(--line2)}
.ag-coin{height:34px}.ag-coin2{height:26px;font-size:9px;color:var(--muted);text-align:center;line-height:26px;border-bottom:1px solid var(--line2)}
.ag-coin,.ag-coin2{position:sticky;top:0;background:#fff;z-index:5}
.ag-coin{border-bottom:0}
.ag-heures{position:relative}
.ag-h{position:absolute;right:6px;font-size:11px;color:var(--muted);transform:translateY(-6px)}
.ag-panel{flex:none;border-right:2px solid var(--line2)}
.ag-nom{position:sticky;top:0;z-index:3;background:#fff;height:34px;line-height:34px;padding:0 10px;font-weight:700;font-size:13px;border-top:3px solid;white-space:nowrap}
.ag-jours{display:flex}
.ag-jour{width:118px;flex:none;border-left:1px solid var(--line2)}
.ag-jour.we{background:#FAFAF8}
.ag-jt{height:26px;line-height:26px;font-size:12px;color:var(--muted);padding:0 6px;position:sticky;top:34px;background:inherit;background-color:#fff;z-index:2;border-bottom:1px solid var(--line2);display:flex;gap:4px;align-items:baseline}
.ag-jt b{font-size:14px;color:var(--ink)}
.ag-jour.auj .ag-jt{color:var(--vert-fonce, #0F5A3E);box-shadow:inset 0 -3px 0 var(--vert)}
.ag-tot{margin-left:auto;font-size:10.5px;font-weight:700;color:var(--vert-fonce, #0F5A3E)}
.ag-jrn{min-height:22px;padding:2px;border-bottom:1px solid var(--line2);display:flex;flex-direction:column;gap:2px}
.ag-col{position:relative;cursor:copy;background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 45px,#EEF1EF 45px,#EEF1EF 46px),
         repeating-linear-gradient(to bottom,transparent 0,transparent 22px,#F7F8F7 22px,#F7F8F7 23px)}
.ag-jour.auj .ag-col{background-color:#F6FBF8}
.ag-col[data-modif="0"]{cursor:default}
.ag-col.survol{outline:2px dashed var(--vert);outline-offset:-2px}
.ag-ev{position:absolute;box-sizing:border-box;padding:3px 5px;border-radius:5px;font-size:11px;line-height:1.2;overflow:hidden;cursor:pointer;
       background:color-mix(in srgb, var(--c) 18%, #fff);border-left:4px solid var(--c);color:#1B2A24}
.ag-ev.jrn{position:static;padding:2px 5px;white-space:nowrap;text-overflow:ellipsis}
.ag-ev .ag-t{display:block;font-weight:600;word-break:break-word}
.ag-ev .ag-hh{display:block;font-size:10px;color:#56625D;margin-top:1px}
.ag-ev.lieu{background:#F1F1EF;border-left-color:#B9B9B4;color:#6B6B66}
.ag-ev.rapp{box-shadow:inset 0 0 0 1px #E8893A}
.ag-ev .pt-rapp,.ag-ev .pt-verif{font-style:normal;float:right;font-size:9px;margin-left:3px}
.ag-ev .pt-rapp{color:#E8893A}.ag-ev .pt-verif{color:#9AA5A0}
.ag-ev:hover{filter:brightness(.96);z-index:1}
.ag-ev.tire{opacity:.4}
.ag-maint{position:absolute;left:0;right:0;height:2px;background:#2563EB;z-index:2}
.ag-maint::before{content:"";position:absolute;left:-4px;top:-3px;width:8px;height:8px;border-radius:50%;background:#2563EB}
.ag-vide{padding:40px;color:var(--muted)}
@media (max-width:1000px){.agenda-layout{grid-template-columns:1fr}.ag-personnes{position:static}}
/* alignement exact des heures : en-têtes de hauteur fixe */
.ag-nom,.ag-jt,.ag-jrn,.ag-coin,.ag-coin2{box-sizing:border-box}
.ag-nom{height:34px}.ag-jt{height:26px}.ag-coin{height:60px;position:sticky;top:0}.ag-coin2{height:26px;position:static}
.ag-jrn{height:26px;overflow:hidden;flex-direction:row;flex-wrap:nowrap}
.ag-jrn .ag-ev.jrn{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
/* Planning : couleur par personne, pastille de nature, choix d'affaire classé */
.ag-ev .ag-nat{display:inline-block;width:7px;height:7px;border-radius:2px;margin-right:4px;vertical-align:1px;background:var(--c-nat,#9AA5A0)}
.ag-nat.nat-chantier{background:#0EA5E9}.ag-nat.nat-armoire{background:#E8893A}.ag-nat.nat-etude{background:#B464D8}.ag-nat.nat-ingenierie{background:#177A55}
.sujet-rdv{font-weight:600}
.choix-aff{position:relative;display:flex;flex-direction:column;gap:4px}
.liste-aff{position:absolute;top:100%;left:0;right:0;z-index:20;background:#fff;border:1px solid var(--line2);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.15);
           max-height:300px;overflow:auto;margin-top:2px}
.liste-aff .it-aff{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:8px;align-items:center;width:100%;text-align:left;border:0;background:#fff;
                   padding:7px 10px;font-size:13px;cursor:pointer;border-bottom:1px solid #F1F3F2}
.liste-aff .it-aff:hover{background:#EAF6EF}
.liste-aff .pc{font-weight:700;font-size:12px;color:var(--muted);text-align:right}
.liste-aff .pc.fort{color:#177A55}.liste-aff .pc.moyen{color:#9A4508}
.liste-aff .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.liste-aff .cl{font-size:11.5px;color:var(--muted);white-space:nowrap}
.liste-aff .vide{padding:10px;color:var(--muted);font-size:13px}
/* Jumelage */
.jumelages .prop-jum{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 0;border-top:1px solid var(--line2);flex-wrap:wrap}
.bandeau.jumele{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.jumeler-lien{display:flex;justify-content:flex-end;margin:-4px 0 4px}
.jumeler-lien .lien{font-size:12.5px}
/* Titres généraux hors affaire */
.liste-aff .groupe-aff{padding:6px 10px 3px;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);background:#FAFBFA}
.liste-aff .it-cat .nm{font-weight:600;color:#56625D}
.ag-ev.hors{background:repeating-linear-gradient(135deg,#F3F4F2 0 6px,#ECEEEB 6px 12px);border-left-color:#9AA5A0;color:#4B5550}
.ag-ev.hors-absence,.ag-ev.hors-perso{border-left-color:#C9C4D6}
.ag-ev.hors-ecole{border-left-color:#8764B8}
.ag-ev.hors-medecine{border-left-color:#D13438}
.ag-ev.hors-interne{border-left-color:#69797E}
.ag-ev.parallele{opacity:.75;border-left-style:dashed;background:repeating-linear-gradient(135deg,rgba(255,255,255,.55) 0 5px,transparent 5px 10px),color-mix(in srgb, var(--c) 14%, #fff)}
/* Fenêtre du planning plus grande : une dizaine d'affaires visibles d'un coup */
dialog.dlg-planning{width:min(960px,96vw);max-height:94vh;overflow:auto}
dialog.dlg-planning .liste-aff{position:static;max-height:420px;margin-top:4px;box-shadow:none;border-color:#CFE7DA}
dialog.dlg-planning .liste-aff .it-aff{padding:8px 12px}
dialog.dlg-planning .choix-personnes label,dialog.dlg-planning label.joindre{display:inline-flex;flex-direction:row;align-items:center;gap:6px;font-weight:500;color:var(--ink)}
dialog.dlg-planning label.joindre{align-self:end;padding-bottom:10px}
/* Heures de travail vides au planning : même code que « à rattacher » */
.ag-trou{position:absolute;left:2px;right:2px;box-sizing:border-box;border:1.5px dashed #E8893A;border-radius:6px;background:rgba(232,137,58,.07);
         font-size:10px;color:#B8651E;padding:2px 5px;cursor:pointer;z-index:0}
.ag-trou span{opacity:.85}
.ag-trou .pt-rapp{float:right;font-style:normal;font-size:9px;color:#E8893A}
.ag-trou:hover{background:rgba(232,137,58,.16)}
.ag-trou.futur{border-color:#C9CFCC;background:transparent;color:#9AA5A0}
.ag-ev{z-index:1}
.legende-planning .leg-trou{border:1.5px dashed #E8893A;border-radius:5px;padding:1px 6px;color:#B8651E;font-size:12px}
.ca-sugg{display:inline-block;min-width:42px;text-align:center;margin-right:8px;background:#F1F3F2;color:#56625D}
.ca-sugg.fort{background:#DDF2E6;color:#177A55}
.ca-sugg.moyen{background:#FDEBD9;color:#9A4508}
/* Fenêtres déplaçables, planning visible derrière */
.poignee-dlg{cursor:move;user-select:none}
dialog.dlg-planning::backdrop,dialog.choix-affaire::backdrop{background:rgba(10,30,20,.12)}
/* Agenda : poignées de redimensionnement, copie */
.ag-ev .poignee-h,.ag-ev .poignee-b{position:absolute;left:0;right:0;height:6px;cursor:ns-resize;z-index:2}
.ag-ev .poignee-h{top:0}.ag-ev .poignee-b{bottom:0}
.ag-ev:hover .poignee-b{background:linear-gradient(to top,rgba(0,0,0,.12),transparent)}
.ag-ev:hover .poignee-h{background:linear-gradient(to bottom,rgba(0,0,0,.12),transparent)}
.ag-ev.redim{box-shadow:0 0 0 2px var(--c,#177A55);z-index:5;opacity:.95}
.ag-ev.copie{outline:2px dashed #177A55;outline-offset:1px}
.toast-pl{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:#12352A;color:#fff;padding:10px 16px;border-radius:10px;
          font-size:13px;box-shadow:0 8px 24px rgba(0,0,0,.25);z-index:100}
.ag-ev .poignee-g,.ag-ev .poignee-d{position:absolute;top:6px;bottom:6px;width:6px;cursor:ew-resize;z-index:2}
.ag-ev .poignee-g{left:0}.ag-ev .poignee-d{right:0}
.ag-ev:hover .poignee-d{background:linear-gradient(to left,rgba(0,0,0,.12),transparent)}
.ag-ev:hover .poignee-g{background:linear-gradient(to right,rgba(0,0,0,.12),transparent)}
.ag-col.etendue{background-color:rgba(23,122,85,.10)!important;box-shadow:inset 0 0 0 2px rgba(23,122,85,.45)}
.binomes{display:flex;flex-wrap:wrap;gap:8px;margin-top:-4px}
.binomes label.binome{display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border-radius:999px;font-size:13px;cursor:pointer;
                      border:1.5px solid var(--c);background:color-mix(in srgb, var(--c) 12%, #fff);color:#1B2A24}
.binomes label.binome input{accent-color:var(--c)}
.binomes .pastille-p{width:10px;height:10px;border-radius:3px}
/* case du binôme : une pastille sur une ligne */
dialog.dlg-planning .binomes label.binome{display:inline-flex;flex-direction:row;align-items:center;gap:8px;width:auto;border-radius:999px;padding:6px 14px;font-weight:500}
dialog.dlg-planning .binomes label.binome input{margin:0;width:auto}
dialog.dlg-planning select.a-verifier{box-shadow:0 0 0 3px rgba(232,137,58,.45);border-color:#E8893A}
.liste-aff .it-jum{background:#F1FAF4}
.liste-aff .it-jum .nm{color:#177A55}
.liste-aff .it-jum .pc{color:#177A55;font-size:14px}
/* Jumelage de plusieurs affaires à la fois */
.liste-aff .bloc-jum .liste-jum{padding:6px 12px 10px 64px;background:#F7FBF8;border-bottom:1px solid #E3EFE7;display:flex;flex-direction:column;gap:4px}
.liste-aff .bloc-jum .liste-jum label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:500}
.liste-aff .actions-jum{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:6px}
.prop-jum-g{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:10px 0;border-top:1px solid var(--line2);flex-wrap:wrap}
.prop-jum-g .noms{display:flex;flex-direction:column;gap:3px;font-size:13px}
.prop-jum-g .noms label{display:flex;align-items:center;gap:8px;font-weight:600}
.prop-jum-g .boutons{display:flex;gap:8px}
.ag-ev.hors-fazeos{border-left-color:#0F6CBD;background:repeating-linear-gradient(135deg,#EAF2FB 0 6px,#DDEAF8 6px 12px);color:#0B3A66}
.card.fazeos{border:2px solid #9CC3EA}
.sous-titre-f{font-size:13px;margin:12px 0 4px}

/* ---------- Téléphone : menu repliable et écrans adaptés ---------- */
.menu-tel{display:none;background:transparent;border:1px solid rgba(255,255,255,.35);color:#fff;border-radius:8px;font-size:20px;padding:4px 11px;cursor:pointer}
.menu .lien-journee{display:none}
@media (max-width:900px){
  header.top{height:auto;min-height:56px;padding:8px 12px;padding-top:max(8px, env(safe-area-inset-top));gap:10px;flex-wrap:wrap}
  header.top .brand span{display:none}
  header.top .brand b{font-size:13px}
  header.top .brand img{height:30px}
  .menu-tel{display:block;margin-left:auto;order:2}
  header.top .who{order:1;margin-left:auto;font-size:0}
  header.top .who .av{font-size:13px}
  header.top .who a{font-size:13px}
  header.top nav.menu{display:none;order:3;width:100%;flex-direction:column;gap:2px;padding:6px 0 4px}
  body.menu-ouvert header.top nav.menu{display:flex}
  header.top nav.menu a{padding:11px 12px;border-radius:8px;font-size:15px}
  .menu .lien-journee{display:block}
  main{padding:12px 12px calc(20px + env(safe-area-inset-bottom))}
  .filtres{flex-wrap:wrap;padding:10px 12px;gap:8px}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px}
  .kpi .v{font-size:20px}
  .grid2,.mo-mat,.visu-grid{grid-template-columns:1fr!important}
  .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  h1{font-size:19px}
  dialog.dlg-planning,dialog.choix-affaire{width:100vw;max-width:100vw;max-height:100vh;height:100vh;margin:0;border-radius:0}
}

/* ---------- Ma journée ---------- */
.mj{max-width:640px;margin:0 auto}
.mj-tete{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:4px 0 10px}
.mj-fleche{display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:12px;background:#fff;border:1px solid var(--line2);
           font-size:28px;line-height:1;text-decoration:none;color:var(--vert-fonce,#0F5A3E)}
.mj-date{text-align:center;display:flex;flex-direction:column}
.mj-date b{font-size:20px}.mj-date span{color:var(--muted);font-size:13px}
.mj-personne select{width:100%;padding:11px;font-size:15px;border-radius:10px;margin-bottom:10px}
.mj-cr{padding:14px 16px;margin-bottom:10px;border-left:6px solid var(--c)}
.mj-cr.hors{background:repeating-linear-gradient(135deg,#FAFAF8 0 8px,#F3F4F2 8px 16px)}
.mj-h{font-size:14px;font-weight:700;color:var(--vert-fonce,#0F5A3E);display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.mj-titre{font-size:17px;font-weight:700;margin:4px 0 2px;line-height:1.25}
.mj-sous{font-size:13px;color:var(--muted)}
.mj-avec{font-size:14px;margin-top:6px}
.mj-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.mj-bouton{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;min-height:46px;padding:8px 16px;border-radius:12px;
           background:var(--vert,#177A55);color:#fff;font-weight:700;font-size:15px;text-decoration:none;text-align:center;cursor:pointer;flex:1}
.mj-bouton small{font-weight:500;font-size:11.5px;opacity:.9}
.mj-bouton.secondaire{background:#fff;color:var(--vert-fonce,#0F5A3E);border:1.5px solid #CFE7DA}
.mj-bouton.grand{width:100%;min-height:56px;font-size:16px}
.mj-docs{margin-top:10px}
.mj-docs summary{cursor:pointer;font-size:14px;font-weight:600;padding:6px 0}
.mj-docs a{display:flex;gap:8px;align-items:center;padding:9px 4px;border-top:1px solid var(--line2);font-size:14px;text-decoration:none;color:inherit}
.mj-vide{text-align:center;color:var(--muted);padding:26px}
.mj-photo{margin:14px 0}
.mj-h2{font-size:15px;margin:18px 0 8px}
.mj-semaine{padding:4px 0}
.mj-jour{display:grid;grid-template-columns:64px 1fr;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line2);text-decoration:none;color:inherit}
.mj-jour:last-child{border-bottom:0}
.mj-j{display:flex;flex-direction:column;font-size:12px;color:var(--muted)}.mj-j b{font-size:14px;color:var(--ink)}
.mj-l{display:flex;flex-direction:column;gap:3px;font-size:14px;font-weight:600}
.mj-l small{font-weight:500;color:var(--muted)}
.menu .lien-tel{display:none}
@media (max-width:900px){
  .menu .lien-tel{display:block;border-top:1px solid rgba(255,255,255,.15);margin-top:4px}
  header.top .who{display:none}
  header.top{flex-wrap:wrap}
}
@media (max-width:900px){
  .sous-onglets{overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch;flex-wrap:nowrap;max-width:100vw}
  .filtres label,.filtres select,.filtres input{max-width:100%;min-width:0}
  .filtres label{flex:1 1 150px}
  .filtres select,.filtres input{width:100%}
}
@media (max-width:900px){.filtres input,.filtres select,.filtres .nav-semaine{width:100%!important;max-width:100%!important;min-width:0!important}.filtres>*{max-width:100%}}
/* ---------- Organisation (tableaux façon Trello) ---------- */
.org-main{padding-bottom:10px}
.kanban{display:flex;gap:12px;overflow-x:auto;align-items:flex-start;padding-bottom:12px;min-height:calc(100vh - 230px)}
.kb-col{flex:0 0 272px;background:#EEF2F0;border-radius:12px;display:flex;flex-direction:column;max-height:calc(100vh - 220px)}
.kb-col>header{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px 6px;font-size:12.5px}
.kb-col>header .nb{background:#fff;border-radius:999px;padding:1px 8px;font-size:11.5px;color:var(--muted);font-weight:700}
.kb-col.finie{background:#E4F2EA}
.kb-col.survol{outline:2px dashed var(--vert);outline-offset:-2px}
.kb-cartes{padding:4px 8px 10px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;min-height:40px}
.kb-carte{display:block;background:#fff;border-radius:9px;padding:9px 10px;box-shadow:0 1px 2px rgba(0,0,0,.08);text-decoration:none;color:inherit;cursor:grab}
.kb-carte:hover{box-shadow:0 2px 8px rgba(0,0,0,.12)}
.kb-carte.tire{opacity:.4}
.kb-etiq{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}
.kb-etiq span{color:#fff;font-size:10.5px;font-weight:700;border-radius:5px;padding:1px 7px}
.kb-titre{font-weight:700;font-size:13px;line-height:1.3}
.kb-sous{font-size:11.5px;color:var(--muted);margin-top:2px}
.kb-pied{display:flex;justify-content:space-between;align-items:center;margin-top:8px;min-height:22px}
.kb-av{font-size:11.5px;color:var(--muted);font-weight:600;border-radius:5px;padding:1px 6px;background:#F1F3F2}
.kb-av.complet{background:#DDF2E6;color:#177A55}
.kb-resp{display:flex;gap:2px;margin-left:auto}
.kb-resp i{font-style:normal;width:24px;height:24px;border-radius:50%;color:#fff;font-size:10.5px;font-weight:700;display:flex;align-items:center;justify-content:center}
.org-grid{display:grid;grid-template-columns:minmax(300px,380px) minmax(0,1fr);gap:16px;align-items:start}
.org-grid>form.card{position:sticky;top:78px}
.org-champ{margin-top:12px}
.org-choix{display:flex;flex-wrap:wrap;gap:6px;margin-top:5px}
.org-choix .pill{display:inline-flex;align-items:center;gap:5px;border:1.5px solid var(--c);border-radius:999px;padding:3px 10px;font-size:12.5px;cursor:pointer;
                 background:color-mix(in srgb, var(--c) 8%, #fff)}
.org-choix .pill input{accent-color:var(--c);margin:0}
.org-infos{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.org-infos label{display:flex;flex-direction:column;gap:3px}
.org-infos label.large{grid-column:1 / -1}
.org-planning{margin-top:12px;font-size:12.5px;display:flex;flex-direction:column;gap:3px}
.org-listes{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px;align-items:start}
.org-liste ul{list-style:none;margin:8px 0 6px;padding:0}
.org-liste li{display:flex;align-items:flex-start;gap:6px;padding:5px 2px;border-bottom:1px solid #F1F3F2;font-size:13.5px}
.org-liste li label{display:flex;gap:8px;align-items:flex-start;flex:1;cursor:pointer}
.org-liste li input{margin-top:3px;width:17px;height:17px;accent-color:#177A55;flex:none}
.org-liste li.fait span{text-decoration:line-through;color:var(--muted)}
.org-liste li small{font-size:10.5px;color:var(--muted);white-space:nowrap}
.org-liste li .suppr{border:0;background:transparent;color:#C9CFCC;cursor:pointer;visibility:hidden}
.org-liste li:hover .suppr{visibility:visible}
.org-ajout{display:flex;gap:6px;align-items:flex-start}
.org-ajout textarea{flex:1;resize:vertical;font-size:13px;padding:6px 8px}
.org-suppr-liste{justify-content:flex-end;margin-top:4px;font-size:12px}
@media (max-width:900px){.org-grid{grid-template-columns:1fr}.org-grid>form.card{position:static}.kb-col{flex-basis:84vw}.org-infos{grid-template-columns:1fr}}
.org-fiche{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:4px 0 10px}
.org-fiche .chip{text-decoration:none}
.mj-acces{margin-top:10px;padding:8px 10px;border-radius:10px;background:#FFF7EC;border:1px solid #F3D3AE;font-size:14px}
.mj-matos{margin-top:10px;padding:8px 10px;border-radius:10px;background:#F1FAF4;border:1px solid #CFE7DA}
.mj-matos summary{font-weight:700;font-size:14px;cursor:pointer}
.mj-matos ul{margin:6px 0;padding-left:20px;font-size:14px}
.org-infos input,.org-infos textarea,.org-grid>form.card select{width:100%;box-sizing:border-box;min-width:0}
.org-infos label{min-width:0}
.org-grid>form.card>label{display:flex;flex-direction:column;gap:4px}
/* ---------- Tableaux façon Trello : fond du tableau, colonnes et cartes ---------- */
main.tableau-trello{max-width:none;background:var(--fond);min-height:calc(100vh - 150px);padding:14px 16px}
.tableau-trello .bandeau{margin-bottom:12px}
.tableau-trello .kanban{min-height:calc(100vh - 200px)}
.tableau-trello .kb-col{background:#F1F2F4;flex-basis:272px;box-shadow:0 1px 1px rgba(9,30,66,.25)}
.tableau-trello .kb-col>header{color:#172B4D;font-size:13px;padding:12px 12px 6px}
.tableau-trello .kb-col>header .nb{background:rgba(9,30,66,.08)}
.tableau-trello .kb-carte{border-radius:8px;box-shadow:0 1px 1px rgba(9,30,66,.25),0 0 1px rgba(9,30,66,.31);color:#172B4D}
.tableau-trello .kb-carte:hover{outline:2px solid #388BFF}
.kb-etiq span{border-radius:4px;padding:0 8px;min-height:16px;line-height:16px;font-size:11.5px;font-weight:600}
.kb-etiq span.barre{width:40px;height:8px;min-height:8px;padding:0;border-radius:4px}
.kb-sous.sans-aff{color:#9A4508;font-style:italic}
.kb-badges{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.kb-b{font-size:11.5px;color:#44546F;border-radius:4px;padding:1px 4px;white-space:nowrap}
.kb-b.fait{background:#1F845A;color:#fff}
.kb-b.retard{background:#C9372C;color:#fff}
.org-choix .pill.etiq{border:0;background:transparent;padding:2px 0}
.org-choix .etiq-t{border-radius:4px;padding:2px 10px;font-weight:600;font-size:12.5px;min-width:44px;display:inline-block}
.org-pieces ul{list-style:none;padding:0;margin:6px 0;display:flex;flex-direction:column;gap:5px;font-size:13.5px}
.org-pieces small{color:var(--muted)}
.org-com .com{border-top:1px solid #F1F3F2;padding:8px 0;font-size:13.5px}
.org-com .com small{color:var(--muted)}
.kb-sous.kb-aff{color:#44546F;font-size:11px}
.bandeau.trello-etat{background:#E9F2FF;border-color:#85B8FF;color:#09326C;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.tableau-trello .bandeau.trello-etat{background:rgba(255,255,255,.92)}
.kb-carte .kb-couv{display:block;width:calc(100% + 20px);margin:-9px -10px 8px;border-radius:8px 8px 0 0;max-height:160px;object-fit:cover}
.kb-carte.miroir{cursor:pointer}
fieldset.sans-cadre{border:0;padding:0;margin:0;min-width:0}
.lecture-seule .org-listes .suppr,.lecture-seule .org-ajout,.lecture-seule .org-suppr-liste{display:none}
/* ---------- Tableau de bord personnel ---------- */
.acc-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:18px;align-items:start}
.acc-h{font-size:15px;margin:10px 0 8px;display:flex;justify-content:space-between;align-items:baseline}
.acc-taches a,.acc-cartes a{display:flex;align-items:center;gap:10px;padding:11px 14px;border-bottom:1px solid var(--line2);text-decoration:none;color:inherit}
.acc-taches a:last-child,.acc-cartes a:last-child{border-bottom:0}
.acc-taches a:hover,.acc-cartes a:hover{background:#F4F7F8}
.acc-taches b{min-width:34px;text-align:center;font-size:17px;color:var(--vert-fonce,#0F5A3E)}
.acc-taches span{flex:1;font-size:14px}.acc-taches i{font-style:normal;color:var(--muted);font-size:18px}
.acc-cartes a{flex-direction:column;align-items:flex-start;gap:2px}
.acc-cartes a.urgent{border-left:4px solid #C9372C}
.acc-c-t{font-weight:700;font-size:14px}.acc-c-s{font-size:12px;color:var(--muted)}
.acc-c-b{display:flex;gap:6px;flex-wrap:wrap;margin-top:3px}
@media (max-width:900px){.acc-grid{grid-template-columns:1fr}}
/* ---------- Téléphone : planning en liste ---------- */
.pl-tel{display:none}
@media (max-width:820px){
  .pl-tel{display:block}
  .agenda-layout,.legende-planning,main>.card.table-wrap.pl-grille,.filtres-planning .bascule-vue{display:none!important}
  .pl-tel-modes{display:flex;background:#fff;border:1px solid var(--line2);border-radius:12px;overflow:hidden;margin-bottom:10px}
  .pl-tel-modes button{flex:1;border:0;background:transparent;padding:11px;font-size:15px;font-weight:600;color:var(--muted)}
  .pl-tel-modes button.on{background:#EAF6EF;color:var(--vert-fonce,#0F5A3E)}
  .pl-tel-choix select{width:100%;padding:11px;font-size:15px;border-radius:10px;margin-bottom:10px}
  .pl-tel-jours{display:flex;gap:6px;overflow-x:auto;margin-bottom:10px;padding-bottom:2px}
  .pl-tel-jours button{flex:none;border:1px solid var(--line2);background:#fff;border-radius:999px;padding:8px 14px;font-size:14px;font-weight:600}
  .pl-tel-jours button.on{background:var(--vert,#177A55);color:#fff;border-color:var(--vert,#177A55)}
  .pl-tel-jours button.auj:not(.on){border-color:var(--vert,#177A55)}
  .pl-tel-jour{background:#fff;border:1px solid var(--line2);border-radius:12px;padding:10px 12px;margin-bottom:10px}
  .pl-tel-jour.auj{border:2px solid var(--vert,#177A55)}
  .pl-tel-jour header{display:flex;align-items:center;gap:8px;margin-bottom:6px}
  .pl-tel-jour header b{font-size:15px}
  .pl-tel-jour header span:not(.pastille-p){font-size:12.5px;font-weight:700;color:var(--vert-fonce,#0F5A3E)}
  .pl-tel-jour header .pastille-p{width:12px;height:12px;border-radius:3px}
  .pl-tel-jour header .plus{margin-left:auto;border:1px solid #CFE7DA;background:#F1FAF4;color:var(--vert-fonce,#0F5A3E);border-radius:8px;padding:6px 12px;font-weight:700;font-size:14px}
  .pl-tel-jour .vide{color:var(--muted);font-size:13.5px;margin:4px 0}
  .pl-tel-cr{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;border:0;border-left:5px solid var(--c);
             background:color-mix(in srgb, var(--c) 10%, #fff);border-radius:8px;padding:9px 11px;margin-top:6px;font-size:14px;color:inherit}
  .pl-tel-cr .h{font-size:12.5px;font-weight:700;color:#44546F}.pl-tel-cr .t{font-weight:700}.pl-tel-cr .s{font-size:12.5px;color:var(--muted)}
  .pl-tel-cr.parallele{opacity:.7;border-left-style:dashed}
}
/* ---------- Téléphone : organisation une étape à la fois ---------- */
.kb-onglets{display:none}
@media (max-width:820px){
  body.kb-tel .kb-onglets{display:flex;gap:6px;overflow-x:auto;padding:0 0 10px;scrollbar-width:none}
  body.kb-tel .kb-onglets button{flex:none;border:0;border-radius:999px;padding:8px 13px;font-size:12.5px;font-weight:700;background:rgba(255,255,255,.85);color:#172B4D;white-space:nowrap}
  body.kb-tel .kb-onglets button b{background:rgba(9,30,66,.1);border-radius:999px;padding:0 6px;margin-left:3px}
  body.kb-tel .kb-onglets button.on{background:#fff;box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(9,30,66,.35)}
  body.kb-tel .kanban{display:block;min-height:0}
  body.kb-tel .kb-col{display:none;max-height:none;width:100%}
  body.kb-tel .kb-col.visible{display:flex}
  body.kb-tel .kb-col>header{display:none}
  body.kb-tel .kb-cartes{overflow:visible;padding:8px}
  body.kb-tel main.tableau-trello{padding:10px}
  body.kb-tel .bandeau.trello-etat{font-size:12.5px}
  /* carte : les listes à cocher d'abord, la fiche ensuite */
  .org-grid{display:flex;flex-direction:column}
  .org-grid .org-listes{order:-1;grid-template-columns:1fr}
  .org-liste li{padding:9px 2px;font-size:15px}
  .org-liste li input{width:22px;height:22px}
  .org-liste li .suppr{visibility:visible}
}
/* accueil : quatre zones ; sur ordinateur la journée et la semaine à gauche, le reste à droite */
.acc-grid{grid-template-areas:"jour taches" "jour cartes" "semaine cartes";grid-template-rows:auto auto 1fr}
.acc-jour{grid-area:jour}.acc-taches-z{grid-area:taches}.acc-cartes-z{grid-area:cartes}.acc-semaine{grid-area:semaine}
.acc-rapide{display:none}
@media (max-width:900px){
  .acc-grid{grid-template-areas:"jour" "taches" "cartes" "semaine";grid-template-rows:none;gap:6px}
  .accueil .entete{margin-bottom:4px}
  .accueil h1{font-size:21px}
  .accueil .acc-nouv{display:none}
  .accueil .entete .meta a{display:none}
  .acc-rapide{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:6px 0 10px}
  .acc-rapide form{display:contents}
  .acc-r{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:#fff;border:1px solid var(--line2);border-radius:14px;
         min-height:74px;padding:8px 4px;font-size:11.5px;font-weight:700;text-align:center;text-decoration:none;color:var(--vert-fonce,#0F5A3E);cursor:pointer}
  .acc-r span{font-size:22px;line-height:1}
  .acc-taches a{padding:13px 14px}
  .acc-cartes a{padding:12px 14px}
}
/* planning téléphone : la navigation de semaine revient à la ligne */
@media (max-width:820px){.nav-semaine{flex-wrap:wrap;gap:6px}.nav-semaine b{min-width:0;flex:1 1 150px;text-align:center}.nav-semaine input[type=date]{flex:1 1 100%}}

/* organisation sur téléphone : en-tête compact */
@media (max-width:820px){
  body.kb-tel .filtres{gap:6px;padding:8px 10px}
  body.kb-tel .filtres .bascule-vue{width:100%;display:flex;overflow-x:auto}
  body.kb-tel .filtres .bascule-vue a{flex:1;text-align:center;white-space:nowrap;padding:9px 8px;font-size:12.5px}
  body.kb-tel .filtres label.joindre,body.kb-tel .filtres>.foot,body.kb-tel .filtres>a.btn2,body.kb-tel .filtres>button{display:none}
  body.kb-tel .filtres label{flex:1 1 45%}
  body.kb-tel .bandeau.trello-etat{padding:6px 10px;font-size:11.5px}
  body.kb-tel .bandeau.trello-etat>span:first-child{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
  body.kb-tel .bandeau.trello-etat form{display:none}
}
@media (max-width:820px){
  .filtres-planning .nav-semaine input[type=date]{display:none}
  .filtres-planning .nav-semaine{display:grid!important;grid-template-columns:44px 1fr 44px;gap:6px}
  .filtres-planning .nav-semaine a[href*="equipe"]:not(:first-child):not(:nth-child(3)){grid-column:1 / -1}
  .filtres-planning>label{flex:1 1 55%}
}
.pin-saisie{font-size:28px!important;letter-spacing:.5em;text-align:center;font-variant-numeric:tabular-nums;padding:12px!important}

/* ================= Ma journée (accueil) — refonte ================= */
.accueil{max-width:1320px}
.acc-hero{display:flex;justify-content:space-between;gap:24px;align-items:stretch;border-radius:18px;padding:24px 28px;margin:4px 0 18px;color:#fff;
          background:radial-gradient(120% 140% at 100% 0%,#2F93B6 0%,rgba(47,182,124,0) 55%),linear-gradient(135deg,#0E2F3B 0%,#14495C 60%,#17607A 100%);
          box-shadow:0 10px 30px rgba(14,59,44,.18)}
.acc-hero h1{color:#fff;font-size:30px;margin:2px 0 10px;letter-spacing:-.01em}
.acc-date{font-size:14px;opacity:.8;text-transform:capitalize}
.acc-resume{display:flex;flex-wrap:wrap;gap:8px}
.acc-resume span{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);border-radius:999px;padding:6px 12px;font-size:13.5px}
.acc-hero-actions{display:flex;gap:14px;align-items:center;margin-top:14px}
.btn-clair{background:#fff;color:#0E2F3B;font-weight:700;border-radius:10px;padding:9px 16px;text-decoration:none;font-size:14px}
.lien-clair{color:#CFEAF3;font-size:13.5px}
.acc-hero-mto{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;align-items:center;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.2);
              border-radius:16px;padding:14px 18px;min-width:280px;align-self:center}
.acc-hero-mto .gros{font-size:54px;line-height:1;grid-row:span 1}
.acc-hero-mto .temp{font-size:30px;font-weight:800}.acc-hero-mto .temp small{font-size:17px;opacity:.75;font-weight:600}
.acc-hero-mto .lib{font-size:13.5px;opacity:.9}.acc-hero-mto .det{font-size:12.5px;opacity:.8;margin-top:2px}
.acc-hero-mto .conseil{grid-column:1 / -1;background:#FFE7B8;color:#6B4200;border-radius:10px;padding:6px 10px;font-size:12.5px;margin-top:6px}
.acc-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:24px;align-items:start;grid-template-areas:none;grid-template-rows:none}
.acc-jour,.acc-droite{grid-area:auto}
.acc-h{font-size:15px;margin:6px 0 10px;display:flex;justify-content:space-between;align-items:baseline;color:#1B262A}
.acc-vide{text-align:center;padding:30px;color:var(--muted);font-size:14.5px}.acc-vide .gros{font-size:34px;margin-bottom:6px}
/* frise horaire */
.tl{position:relative;display:flex;flex-direction:column;gap:14px;margin-bottom:22px}
.tl-item{display:grid;grid-template-columns:62px 18px minmax(0,1fr);align-items:start}
.tl-h{text-align:right;padding-top:14px;display:flex;flex-direction:column;font-variant-numeric:tabular-nums}
.tl-h b{font-size:15px;color:#1B2A24}.tl-h span{font-size:12px;color:var(--muted)}
.tl-point{position:relative;height:100%}
.tl-point::before{content:"";position:absolute;left:8px;top:0;bottom:-14px;width:2px;background:#DCE5E0}
.tl-item:last-child .tl-point::before{bottom:0}
.tl-point::after{content:"";position:absolute;left:3px;top:17px;width:12px;height:12px;border-radius:50%;background:var(--c);box-shadow:0 0 0 3px #F4F6F5}
.tl-carte{background:#fff;border:1px solid #E3EAE6;border-left:5px solid var(--c);border-radius:14px;padding:14px 16px;box-shadow:0 2px 8px rgba(14,59,44,.05)}
.tl-item.hors .tl-carte{background:repeating-linear-gradient(135deg,#FAFAF8 0 8px,#F3F4F2 8px 16px)}
.tl-haut{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.tl-titre{font-size:17px;font-weight:800;line-height:1.25;color:#1B2A24}
.tl-sous{font-size:13px;color:var(--muted);margin-top:3px}
.tl-avec{display:flex;align-items:center;gap:4px;margin-top:8px;font-size:13px;color:#44546F}
.tl-avec i{font-style:normal;width:24px;height:24px;border-radius:50%;background:#E4F2EA;color:#0F5A3E;font-size:10.5px;font-weight:800;display:flex;align-items:center;justify-content:center}
.tl-avec span{margin-left:4px}
.tl-alerte{margin-top:8px;background:#FFF4DB;border:1px solid #F5D78E;color:#6B4200;border-radius:8px;padding:6px 10px;font-size:13px}
.tl-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.tl-carte .mj-acces,.tl-carte .mj-matos{margin-top:10px}
.mto{white-space:nowrap;background:#EEF6FF;border:1px solid #CFE2FF;color:#0B3A66;border-radius:999px;padding:3px 10px;font-size:13px;font-weight:700}
.mto small{font-weight:600;opacity:.75}
.mto.alerte{background:#FFF4DB;border-color:#F5D78E;color:#6B4200}
/* semaine */
.acc-sem{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:10px}
.sem-j{background:#fff;border:1px solid #E3EAE6;border-radius:14px;padding:10px 12px;text-decoration:none;color:inherit;display:flex;flex-direction:column;gap:4px;min-height:132px}
.sem-j:hover{border-color:#9FD3B8;box-shadow:0 4px 14px rgba(14,59,44,.08)}
.sem-t{font-size:12.5px;color:var(--muted)}.sem-t b{color:#1B2A24;font-size:14px}
.sem-m{font-size:20px}.sem-m b{font-size:15px}.sem-m small{font-size:12px;color:var(--muted)}
.sem-h{font-size:11.5px;font-weight:800;color:var(--vert-fonce,#0F5A3E)}
.sem-l{display:flex;flex-direction:column;gap:2px;font-size:12px;font-weight:600;line-height:1.25}
.sem-l span{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
/* tâches en tuiles */
.acc-tuiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:22px}
.tuile{display:flex;flex-direction:column;gap:2px;background:#fff;border:1px solid #E3EAE6;border-radius:14px;padding:12px 14px;text-decoration:none;color:inherit;
       box-shadow:0 2px 8px rgba(14,59,44,.04)}
.tuile:hover{border-color:#9FC6D3;box-shadow:0 4px 14px rgba(14,59,44,.09)}
.tuile b{font-size:26px;color:var(--vert-fonce,#0F475A);line-height:1.1}
.tuile span{font-size:13px;color:#44546F}
.acc-cartes{padding:4px 0}
.acc-cartes a{position:relative}
.acc-barre{display:block;width:100%;height:5px;border-radius:3px;background:#EEF2F0;margin-top:5px;overflow:hidden}
.acc-barre span{display:block;height:100%;background:linear-gradient(90deg,#2FB67C,#177A55);border-radius:3px}
.acc-rapide{display:flex;gap:10px;margin:0 0 18px}
.acc-rapide .acc-r{flex:0 0 auto;flex-direction:row;min-height:0;padding:9px 14px;font-size:13px;gap:8px;border-radius:12px;background:#fff;border:1px solid #E3EAE6;
                   color:#0F5A3E;font-weight:700;text-decoration:none;cursor:pointer;display:flex;align-items:center}
.acc-rapide .acc-r span{font-size:17px}
.acc-rapide form{display:contents}
@media (max-width:900px){
  .acc-hero{flex-direction:column;padding:18px;border-radius:16px;gap:14px}
  .acc-hero h1{font-size:24px}
  .acc-hero-mto{min-width:0;align-self:stretch}
  .acc-hero-actions .lien-clair{display:none}
  .acc-grid{grid-template-columns:1fr;gap:10px}
  .acc-rapide{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
  .acc-rapide .acc-r{flex-direction:column;min-height:74px;font-size:11.5px;gap:4px;justify-content:center;text-align:center;padding:8px 4px}
  .acc-rapide .acc-r span{font-size:22px}
  .tl-item{grid-template-columns:48px 16px minmax(0,1fr)}
  .tl-titre{font-size:16px}
  .acc-sem{display:flex;overflow-x:auto;gap:8px;padding-bottom:4px}
  .sem-j{flex:0 0 140px}
  .acc-tuiles{grid-template-columns:1fr 1fr}
}
.mj-mto{margin-top:6px;font-size:13.5px;background:#EEF6FF;border:1px solid #CFE2FF;color:#0B3A66;border-radius:10px;padding:6px 10px}
.mj-mto.alerte{background:#FFF4DB;border-color:#F5D78E;color:#6B4200}
.mj-j-m{font-size:12px;color:#0B3A66;margin-top:2px}
@media (max-width:900px){.acc-grid{grid-template-columns:minmax(0,1fr)!important}.tl-titre{overflow-wrap:anywhere}.acc-sem{max-width:100%}}
.accueil{margin-left:auto;margin-right:auto}
@media (max-width:900px){
  .acc-hero{padding:14px 16px;gap:10px;margin-bottom:12px}
  .acc-hero h1{font-size:22px;margin:0 0 8px}
  .acc-hero-actions{display:none}
  .acc-resume{gap:5px}
  .acc-resume span{font-size:12px;padding:4px 9px}
  .acc-hero-mto{padding:8px 12px;gap:2px 10px;border-radius:12px}
  .acc-hero-mto .gros{font-size:34px}
  .acc-hero-mto .temp{font-size:21px}.acc-hero-mto .temp small{font-size:14px}
  .acc-hero-mto .lib{font-size:12px}.acc-hero-mto .det{display:none}
}
/* navigation entre les jours, mes affaires */
.acc-nav{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.acc-fl{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:9px;background:rgba(255,255,255,.14);
        border:1px solid rgba(255,255,255,.25);color:#fff;text-decoration:none;font-size:20px;line-height:1}
.acc-fl:hover{background:rgba(255,255,255,.25)}
.acc-auj{color:#CFF3E0;font-size:12.5px}
.acc-aff{padding:2px 0;margin-bottom:22px}
.acc-aff a{display:flex;flex-direction:column;gap:3px;padding:12px 14px;border-bottom:1px solid var(--line2);text-decoration:none;color:inherit}
.acc-aff a:last-child{border-bottom:0}
.acc-aff a:hover{background:#F4F7F8}
.aff-t{font-weight:800;font-size:14px}.aff-s{font-size:12px;color:var(--muted)}
.aff-j{display:flex;gap:14px;margin-top:4px}
.aff-g{display:flex;align-items:center;gap:6px;flex:1;font-size:12px}
.aff-g small{color:var(--muted);width:30px}.aff-g b{font-size:12px;min-width:40px;text-align:right}
.aff-g .acc-barre{margin:0;flex:1}
.acc-barre.orange span{background:linear-gradient(90deg,#F5B53D,#E8893A)}
.acc-barre.rouge span{background:linear-gradient(90deg,#F87168,#C9372C)}
@media (max-width:900px){.acc-nav{gap:8px}.aff-j{flex-direction:column;gap:4px}}
/* Mes affaires et Mes cartes côte à côte, sous la journée */
.acc-bas{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;margin-top:6px}
.acc-bas.deux{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.acc-bas .acc-aff,.acc-bas .acc-cartes{margin-bottom:0}
@media (max-width:900px){.acc-bas.deux{grid-template-columns:minmax(0,1fr)}}
/* Actualiser : bouton dans l'application installée sur ordinateur, « tirer pour actualiser » sur téléphone */
.actualiser{display:none;background:transparent;border:1px solid rgba(255,255,255,.35);color:#fff;border-radius:8px;font-size:17px;line-height:1;
            padding:2px 8px;cursor:pointer;margin:0 2px}
.actualiser:hover{background:rgba(255,255,255,.12)}
html.app-installee .actualiser{display:inline-block}
@media (max-width:900px){html.app-installee .actualiser{display:none}}
html.app-installee body{overscroll-behavior-y:contain}
.tirer{position:fixed;top:64px;left:50%;z-index:60;width:40px;height:40px;margin-top:-50px;border-radius:50%;background:#fff;color:#177A55;
       box-shadow:0 3px 12px rgba(0,0,0,.2);display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;
       transform:translate(-50%,0);opacity:0;pointer-events:none;transition:opacity .15s}
.tirer.visible{opacity:1}
.tirer.pret{background:#177A55;color:#fff}
.tirer.charge span{animation:tourne .8s linear infinite}
@keyframes tourne{to{transform:rotate(360deg)}}
@media (max-width:900px){.tirer{top:calc(56px + env(safe-area-inset-top))}}

/* en-tête : sur un écran moyen, les liens du menu se resserrent pour laisser voir le groupe de droite */
@media (min-width:901px) and (max-width:1500px){header.top{gap:14px}.menu a{padding-left:8px;padding-right:8px;font-size:13.5px}header.top .brand span{display:none}}

/* en-tête sans débordement : le menu prend la place disponible et défile en dernier recours, le groupe de droite reste visible */
@media (min-width:901px){
  header.top nav.menu{flex:1 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none;flex-wrap:nowrap}
  header.top nav.menu::-webkit-scrollbar{display:none}
  header.top nav.menu a{white-space:nowrap;flex:none}
  header.top .brand,header.top .who{flex:none}
  .who .deco-i{display:none}
}
@media (min-width:901px) and (max-width:1700px){
  .who .who-nom{display:none}
  .who .deco-t{display:none}
  .who .deco-i{display:inline;font-size:16px}
}
@media (min-width:901px) and (max-width:1600px){
  header.top .brand div{display:none}
  header.top{gap:10px;padding-left:14px;padding-right:14px}
  .menu a{padding-left:7px!important;padding-right:7px!important;font-size:13px!important}
}
@media (min-width:901px) and (max-width:1250px){.menu a{padding-left:5px!important;padding-right:5px!important;font-size:12.5px!important}}
/* Mes tâches (Microsoft To Do) */
.acc-todo{padding:4px 0;margin-bottom:22px}
.todo-l{display:flex;gap:10px;align-items:flex-start;padding:10px 14px;border-bottom:1px solid var(--line2);transition:opacity .3s, height .3s, padding .3s}
.todo-l input{width:19px;height:19px;margin-top:1px;accent-color:#177A55;flex:none;cursor:pointer}
.todo-t{display:flex;flex-direction:column;gap:2px;min-width:0;font-size:14px}
.todo-t small{display:flex;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.todo-t small a{color:#17607A;text-decoration:none}
.todo-ech{font-weight:700;color:#9A4508}
.todo-l.retard .todo-ech{color:#C9372C}
.todo-imp{color:#E6A700}
.todo-l.faite .todo-t span{text-decoration:line-through;color:var(--muted)}
.todo-l.part{opacity:0;height:0!important;padding-top:0;padding-bottom:0;overflow:hidden}
.todo-ajout{padding:10px 14px;display:flex;flex-direction:column;gap:6px;background:#FAFBFA;border-radius:0 0 12px 12px}
.todo-ajout input[name=titre]{width:100%;box-sizing:border-box}
.todo-options{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.todo-options select{max-width:180px;font-size:12.5px;padding:5px 6px}
.todo-imp-c{display:flex;align-items:center;gap:3px;font-size:14px;color:#E6A700;cursor:pointer}
/* ===== Ma journée sur toute la largeur : colonnes selon l'écran ===== */
.accueil{max-width:none!important;padding-left:24px;padding-right:24px}
.acc-hero{margin-left:0;margin-right:0}
.acc-cols{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.3fr);gap:24px;align-items:start}
.col-droite{display:flex;flex-direction:column;gap:0;min-width:0}
.col-a,.col-b,.col-jour{min-width:0}
/* « Ce qui t'attend » en version compacte : chiffre et libellé sur une ligne */
.acc-tuiles{gap:8px;margin-bottom:18px}
.tuile{flex-direction:row;align-items:center;gap:10px;padding:9px 12px;border-radius:12px}
.tuile b{font-size:20px;min-width:30px;text-align:center}
.tuile span{font-size:12.5px;line-height:1.25}
.col-a .acc-aff,.col-a .acc-cartes{margin-bottom:18px}
@media (min-width:1280px){
  .acc-cols{grid-template-columns:minmax(0,1.05fr) minmax(0,1.95fr)}
  .col-droite{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:24px;align-items:start}
}
@media (min-width:1280px) and (max-width:1599px){
  .acc-cols{gap:18px}.col-droite{gap:18px}
  .acc-tuiles{grid-template-columns:1fr 1fr;gap:6px}
  .tuile{padding:6px 9px;gap:7px}.tuile b{font-size:17px;min-width:24px}.tuile span{font-size:11.5px}
  .tl-titre{font-size:15.5px}
  .acc-hero{padding:14px 20px}.acc-hero h1{font-size:25px;margin:0 0 6px}.acc-hero-actions{margin-top:8px}
  .acc-hero-mto{padding:10px 14px}.acc-hero-mto .gros{font-size:42px}.acc-hero-mto .temp{font-size:24px}
}
@media (max-width:1100px){.acc-cols{grid-template-columns:minmax(0,1fr)}}
@media (max-width:900px){.accueil{padding-left:12px;padding-right:12px}.acc-tuiles{grid-template-columns:1fr 1fr}}
/* ordre des blocs sur écran moyen (une seule colonne à droite) : l'attente, les affaires, les tâches, puis les cartes */
@media (max-width:1279px){
  .col-droite,.col-a,.col-b{display:flex;flex-direction:column}
  .col-a,.col-b{display:contents}
  .blk-attente{order:1}.blk-aff{order:2}.blk-todo{order:3}.blk-cartes{order:4}
}
/* sur ordinateur, les raccourcis font doublon avec le menu : on garde la hauteur pour le contenu */
@media (min-width:901px){.accueil .acc-rapide{display:none}}
.acc-aff a{padding:9px 14px;gap:2px}
.aff-j{margin-top:2px}
.acc-hero{padding:18px 24px}
.acc-hero h1{margin-bottom:8px}
/* choix du thème */
.theme-bouton{position:relative;display:inline-flex}
.theme-ouvrir{background:transparent;border:0;cursor:pointer;font-size:15px;padding:2px 4px}
.theme-bouton .choix-theme{position:absolute;top:34px;right:-40px;z-index:20;display:flex;gap:4px;background:#fff;border:1px solid #DCE5E0;border-radius:12px;
                           padding:6px;box-shadow:0 10px 30px rgba(0,0,0,.18)}
.theme-bouton .choix-theme[hidden]{display:none}
.choix-theme button{border:0;background:transparent;border-radius:8px;padding:7px 10px;font-size:13px;font-weight:600;color:#1A211E;cursor:pointer;white-space:nowrap}
.choix-theme button.on{background:#E3F0F4;color:#14556C}
.choix-theme-tel{display:none}
@media (max-width:900px){
  .menu .choix-theme-tel{display:flex;align-items:center;gap:8px;padding:8px 12px;color:#fff}
  .choix-theme-tel .choix-theme{display:flex;gap:4px;background:rgba(255,255,255,.1);border-radius:10px;padding:3px}
  .choix-theme-tel .choix-theme button{color:#fff;padding:7px 9px}
  .choix-theme-tel .choix-theme button.on{background:#fff;color:#0E2F3B}
}
html[data-theme="dark"] .theme-bouton .choix-theme{background:#1C2824;border-color:#2B3934}
html[data-theme="dark"] .choix-theme button{color:#E2E9EB}

/* ===== Ma journée — mise en page ordonnée =====
   1) bandeau ; 2) la journée à gauche, « Ce qui t'attend » et la semaine à droite ;
   3) Mes affaires · Mes tâches · Mes cartes, côte à côte, même largeur et même hauteur (défilement intérieur) */
.acc-cols{display:none}
.acc-haut{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:24px;align-items:start;margin-bottom:8px}
.col-cote{min-width:0}
.col-cote .acc-tuiles{grid-template-columns:1fr 1fr}
.col-cote .acc-sem{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.col-cote .sem-j{min-height:112px;padding:9px 10px}
.acc-trois{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px;align-items:stretch;margin-top:6px}
.acc-trois:empty{display:none}
.acc-trois .blk{display:flex;flex-direction:column;min-width:0}
.acc-trois .blk>.card{flex:1;height:480px;overflow-y:auto;margin-bottom:0}
.acc-trois .acc-todo{display:flex;flex-direction:column}
.acc-trois .acc-todo .todo-ajout{margin-top:auto;position:sticky;bottom:0}
.acc-trois .acc-h{margin-top:0}
@media (max-width:1100px){.acc-haut{grid-template-columns:minmax(0,1fr)}}
@media (max-width:900px){
  .acc-trois{grid-template-columns:minmax(0,1fr);gap:10px}
  .acc-trois .blk>.card{height:auto;max-height:none}
  .col-cote .acc-sem{display:flex;overflow-x:auto}
  .col-cote .sem-j{flex:0 0 140px}
}
.acc-trois .blk>.card{flex:none!important;height:440px!important;min-height:0;overflow-y:auto}
@media (max-width:900px){.acc-trois .blk>.card{height:auto!important;max-height:none}}
/* frise plus compacte sur ordinateur */
@media (min-width:901px){
  .tl{gap:10px}
  .tl-carte{padding:11px 14px}
  .tl-actions{margin-top:8px}
  .tl-carte .mj-acces,.tl-carte .mj-matos{margin-top:7px}
}
/* rangée du milieu : la journée et la semaine à gauche ; « Ce qui t'attend » en bandeau vertical à droite, de la même hauteur */
.acc-haut{grid-template-columns:minmax(0,2.1fr) minmax(0,1fr);align-items:stretch}
.col-jour .blk-semaine{margin-top:4px}
.col-jour .acc-sem{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:0}
.col-cote{display:flex;flex-direction:column}
.col-cote .blk-attente{flex:1;display:flex;flex-direction:column}
.col-cote .acc-tuiles{flex:1;display:grid;grid-template-columns:1fr!important;grid-auto-rows:minmax(46px,1fr);gap:0;margin-bottom:0;
  background:#fff;border:1px solid #E3EAE6;border-radius:14px;overflow:hidden;box-shadow:0 2px 8px rgba(14,59,44,.04)}
.col-cote .tuile{border:0;border-bottom:1px solid var(--line2);border-radius:0;box-shadow:none;padding:8px 14px;gap:12px}
.col-cote .tuile:last-child{border-bottom:0}
.col-cote .tuile b{font-size:19px;min-width:34px}
.col-cote .tuile span{font-size:13px}
.col-cote .tuile::after{content:"›";margin-left:auto;color:var(--muted);font-size:18px}
html[data-theme="dark"] .col-cote .acc-tuiles{background:var(--s1);border-color:var(--line)}
html[data-theme="dark"] .col-cote .tuile{background:transparent!important;box-shadow:none}
@media (max-width:1100px){.acc-haut{grid-template-columns:minmax(0,1fr)}.col-cote .acc-tuiles{grid-auto-rows:auto}}
@media (max-width:900px){.col-jour .acc-sem{display:flex;overflow-x:auto}.col-jour .sem-j{flex:0 0 140px}}
/* code en 6 cases */
.cases6{display:flex;gap:8px;justify-content:center;margin:6px 0 4px}
.case6{width:44px;height:54px;box-sizing:border-box;text-align:center;font-size:24px;font-weight:700;border:1.5px solid #CBD8D1;border-radius:12px;
       background:#fff;color:#1B2A24;padding:0;caret-color:#177A55;font-variant-numeric:tabular-nums}
.case6:focus{outline:none;border-color:#17607A;box-shadow:0 0 0 3px rgba(23,122,85,.18)}
.case6.masque{-webkit-text-security:disc;text-security:disc}
.cases6.envoi .case6{border-color:#2FB67C;background:#F1FAF4}
.cases6.secoue{animation:secoue .45s}
@keyframes secoue{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-8px)}40%,80%{transform:translateX(8px)}}
@media (max-width:380px){.case6{width:40px;height:50px;font-size:22px}.cases6{gap:6px}}
html[data-theme="dark"] .case6{background:#1C2824;color:#E2EBE7;border-color:#2B3934}
html[data-theme="dark"] .cases6.envoi .case6{background:#132A20;border-color:#2FB67C}
input.somme.trop{border-color:#C9372C!important;background:#FFF1F0}
html[data-theme="dark"] input.somme.trop{background:#3A1A18!important}
.debours-plafond{margin-top:8px}
.debours-plafond{background:#FFF1F0!important;border:1px solid #F5B5AE!important;color:#8E0000!important;padding:9px 12px;border-radius:10px;font-weight:600}
html[data-theme="dark"] .debours-plafond{background:#3A1A18!important;border-color:#7A3A34!important;color:#FFB4AB!important}
#btn-debours:disabled{opacity:.45;cursor:not-allowed}
/* budget de la commande : heures prévues en € + débours */
.budget-cmd{border:1px solid var(--line);border-radius:12px;padding:10px 14px;margin:8px 0 12px;background:#FAFCFB}
.budget-cmd.depasse{border-color:#F5B5AE;background:#FFF6F5}
.budget-t{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;margin-bottom:6px}
.budget-barre{display:flex;height:12px;border-radius:6px;overflow:hidden;background:#E7EEEA}
.budget-barre span{display:block;height:100%}
.bb-h{background:#177A55}.bb-d{background:#E8893A}.bb-r{background:#E7EEEA;border:1px solid #CBD8D1}
.budget-l{display:flex;gap:16px;flex-wrap:wrap;margin-top:6px;font-size:13px}
.budget-l i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}
.budget-l small{color:var(--muted)}
.budget-live{margin-top:8px;font-size:13px;padding:7px 10px;border-radius:8px;background:#F1FAF4;border:1px solid #CFE7DA}
.budget-live.trop{background:#FFF1F0;border-color:#F5B5AE;color:#8E0000}
html[data-theme="dark"] .budget-cmd{background:var(--s1);border-color:var(--line)}
html[data-theme="dark"] .budget-cmd.depasse{background:#2A1715;border-color:#7A3A34}
html[data-theme="dark"] .budget-barre{background:#26332E}
html[data-theme="dark"] .budget-live{background:#132A20;border-color:#23513C}
html[data-theme="dark"] .budget-live.trop{background:#3A1A18;border-color:#7A3A34;color:#FFB4AB}
.matos-c{list-style:none;padding-left:2px!important}
.matos-c li{padding:3px 0}
.matos-c label{display:flex;gap:8px;align-items:center;cursor:pointer}
.matos-c input{width:18px;height:18px;accent-color:#177A55}
.matos-c li.pris{text-decoration:line-through;color:var(--muted)}
#pl-affaire-txt.auto-detecte{border-color:#2FB67C;background:#F1FAF4}
html[data-theme="dark"] #pl-affaire-txt.auto-detecte{background:#132A20!important;border-color:#2FB67C!important}
#pl-affaire-txt.manque{border:2px solid #E8893A!important;background:#FFF4E8!important;animation:secoue .45s}
html[data-theme="dark"] #pl-affaire-txt.manque{background:#3A2A17!important}
/* ===== Chantiers en cours ===== */
.ch-liste{display:flex;flex-direction:column;gap:8px}
details.ch{padding:0}
details.ch>summary{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;cursor:pointer}
details.ch>summary::-webkit-details-marker{display:none}
details.ch>summary::before{content:"›";font-size:20px;color:var(--muted);transition:transform .15s;margin-right:2px}
details.ch[open]>summary::before{transform:rotate(90deg)}
.ch-t{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.ch-t b{font-size:15px}.ch-t small{color:var(--muted);font-size:12.5px}
.ch-b{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.ch-dossier{text-decoration:none;background:#E9F2FF;color:#0B3A66;border:1px solid #CFE2FF}
.ch-corps{border-top:1px solid var(--line2);padding:12px 16px 16px}
.ch-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.ch-lien{margin-bottom:12px}.ch-lien input{flex:1;min-width:240px}
.ch-grille{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.ch-grille h3{font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:0 0 6px}
.ch-l{font-size:13.5px;padding:3px 0}
.ch-carte{font-size:13.5px;margin-bottom:10px}
.ch-liste-it ul{margin:2px 0 6px;padding-left:18px;font-size:13px}
@media (max-width:900px){.ch-grille{grid-template-columns:1fr}details.ch>summary{flex-direction:column;align-items:flex-start}.ch-b{justify-content:flex-start}}
html[data-theme="dark"] .ch-dossier{background:#132236;color:#B7D4F5;border-color:#27456B}
/* ===== Alertes ===== */
.al-form{display:flex;flex-direction:column;gap:10px;max-width:900px}
.al-l1{display:flex;gap:12px;flex-wrap:wrap}.al-l1>label{flex:1;min-width:160px}
.al-pers{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}
.al-liste{padding:4px 0;max-width:900px}
.al-jour{font-weight:800;font-size:13px;padding:10px 14px 4px;color:var(--vert-fonce,#0F5A3E)}.al-jour.auj{color:#C25100}
.al-it{display:flex;gap:10px;align-items:flex-start;padding:8px 14px;border-bottom:1px solid var(--line2)}
.al-e{font-size:20px;line-height:1.2}.al-t{flex:1;display:flex;flex-direction:column;gap:2px;font-size:14px}.al-t small{color:var(--muted);font-size:12px}
.al-a{display:flex;gap:8px;align-items:center}.al-a form{display:inline}
.al-it.passee{opacity:.65}
/* alertes du jour dans Ma journée */
.acc-alertes{display:flex;flex-direction:column;gap:6px;margin:-6px 0 16px}
.acc-al{display:flex;align-items:center;gap:10px;background:#FFF7EC;border:1px solid #F3D3AE;border-left:5px solid #E8893A;border-radius:10px;padding:8px 12px;font-size:14px}
.acc-al.moi{background:#FFF1DE;border-left-color:#C25100;font-weight:600}
.acc-al .al-e{font-size:18px}.acc-al small{color:#8A6A45;font-weight:400}
.acc-al a{margin-left:auto;font-size:12.5px}
html[data-theme="dark"] .acc-al{background:#2E2415;border-color:#5A4424;color:#F7D9A6}
html[data-theme="dark"] .acc-al small{color:#CBB08A}
.sem-al{font-size:11.5px;font-weight:700;color:#C25100}
.pl-al{display:inline-block;margin-left:4px;font-size:11px;background:#FFF1DE;color:#8A4A00;border-radius:999px;padding:0 6px;cursor:help}
html[data-theme="dark"] .pl-al{background:#3A2A17;color:#F2C28E}
.todo-modif{margin-left:auto;border:0;background:transparent;color:var(--muted);cursor:pointer;font-size:15px;padding:0 4px;opacity:.6}
.todo-l:hover .todo-modif{opacity:1}
.todo-edit{flex:1;display:flex;flex-direction:column;gap:6px}
.todo-edit .te-titre{width:100%;box-sizing:border-box}
@media (hover:none){.todo-modif{opacity:1}}
.al-form>label,.al-l1>label{display:flex;flex-direction:column;gap:4px}
.al-form>label>input,.al-form>label>select,.al-l1>label>input,.al-l1>label>select{width:100%;box-sizing:border-box}
.al-form [hidden]{display:none!important}
.al-pers .pill{display:inline-flex;flex-direction:row;align-items:center;gap:5px}
.ech-envoi{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end;background:#F7FAF8;border:1px solid var(--line2);border-radius:10px;padding:10px 12px}
.ech-envoi label{display:flex;flex-direction:column;gap:3px}
html[data-theme="dark"] .ech-envoi{background:var(--s1)}
/* ===== Règlements fournisseurs ===== */
.rf-resume{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.rf-tuile{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 14px;display:flex;flex-direction:column;gap:2px}
.rf-tuile span{font-size:12.5px;color:var(--muted)}.rf-tuile b{font-size:20px}.rf-tuile small{font-size:12px;color:var(--muted)}
.rf-tuile.rouge{border-color:#F5B5AE;background:#FFF6F5}.rf-tuile.rouge b{color:#C9372C}
.rf-t td{vertical-align:middle}.rf-ch{max-width:240px;font-size:12.5px}
.rf-a{display:flex;gap:8px;align-items:center;justify-content:flex-end}.rf-a form{display:inline}
.rf-est{color:#C25100;font-weight:800;cursor:help}
.rf-etat-retard{background:#FFE2DE!important;color:#8E0000!important}.rf-etat-paye{background:#DDF3E6!important;color:#146C4A!important}
.rf-etat-programme{background:#E3EEFF!important;color:#0B3A66!important}.rf-etat-partiel{background:#FFF1DE!important;color:#8A4A00!important}
.rf-etat-litige{background:#F3E3FF!important;color:#5B2A86!important}
tr.rf-retard td{background:#FFF8F7}
.rf-edit td{background:#F7FAF8}
.rf-form{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}.rf-form label{display:flex;flex-direction:column;gap:3px;font-size:12.5px}
.rf-form label.large{flex:1 1 260px}.rf-form label.joindre{flex-direction:row;align-items:center;gap:6px}
@media (max-width:900px){.rf-resume{grid-template-columns:1fr 1fr}}
html[data-theme="dark"] .rf-tuile{background:var(--s1);border-color:var(--line)}
html[data-theme="dark"] .rf-tuile.rouge{background:#2A1715;border-color:#7A3A34}
html[data-theme="dark"] tr.rf-retard td{background:#241512!important}
html[data-theme="dark"] .rf-edit td{background:var(--s2)!important}
.annuler-cmd{margin:6px 0 12px}.annuler-cmd summary{cursor:pointer;display:inline-block;font-size:13px}
.annuler-cmd form{margin-top:8px;max-width:640px;display:flex;flex-direction:column;gap:8px}
.btn.danger{background:#C9372C;border-color:#C9372C}
.perso-form{display:flex;flex-direction:column;gap:8px;min-width:min(520px,90vw)}
.perso-form h3{font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:10px 0 2px}
.perso-l{display:flex;flex-direction:column;gap:6px}.perso-l label{display:flex;gap:8px;align-items:center;font-size:14px;cursor:pointer}
.perso-l input{width:17px;height:17px;accent-color:#177A55}
/* mise à jour disponible */
.maj-dispo{position:fixed;left:50%;bottom:calc(16px + env(safe-area-inset-bottom, 0px));transform:translateX(-50%);z-index:200;display:flex;gap:12px;align-items:center;
           background:#0E3B2C;color:#fff;border-radius:14px;padding:10px 14px;box-shadow:0 10px 30px rgba(0,0,0,.3);max-width:calc(100vw - 24px);font-size:14px}
.maj-dispo[hidden]{display:none}
.maj-dispo .btn{background:#fff;color:#0E2F3B;border-color:#fff;white-space:nowrap}
.maj-t{flex:1}
#maj-etat{opacity:.8;font-size:12.5px}
@media (max-width:600px){.maj-dispo{flex-direction:column;align-items:stretch;text-align:center}}
/* ===== sélecteur de période (Le… / Jusqu'au…) ===== */
.per-cache{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;pointer-events:none!important}
.per-champ{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:38px;box-sizing:border-box;text-align:left;cursor:pointer;
  background:#fff;border:1px solid var(--line);border-radius:8px;padding:7px 10px;font-size:14px;color:inherit}
.per-champ:hover{border-color:#9FD3B8}
.per-d b{color:#146C4A}.per-f b{color:#B85A12}
.per-vide{color:var(--muted)}.per-x{color:var(--muted);font-size:12px;padding:0 4px}
.per-pop{position:fixed;z-index:500;background:#fff;border:1px solid #DCE5E0;border-radius:14px;box-shadow:0 14px 40px rgba(0,0,0,.18);padding:12px;min-width:280px}
.per-pop[hidden]{display:none}
.per-tete{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13.5px;margin-bottom:8px}
.per-nav{border:1px solid var(--line);background:#fff;border-radius:8px;width:30px;height:30px;font-size:18px;cursor:pointer;color:inherit}
.per-mois-l{display:flex;gap:18px}
.per-titre{text-align:center;font-weight:800;font-size:13.5px;text-transform:capitalize;margin-bottom:6px}
.per-grille{display:grid;grid-template-columns:repeat(7,34px);gap:2px}
.per-js{text-align:center;font-size:11px;color:var(--muted);font-weight:700;padding-bottom:2px}
.per-j{height:34px;border:0;background:transparent;border-radius:8px;cursor:pointer;font-size:13.5px;color:inherit}
.per-j:hover{background:#EEF6F1}
.per-j.per-off{color:#A5B0AB}
.per-j.per-auj{font-weight:800;box-shadow:inset 0 0 0 1px #9FD3B8}
.per-j.per-sugg{box-shadow:inset 0 0 0 2px #177A55;font-weight:700}
.per-j.per-sugg-fin{box-shadow:inset 0 0 0 2px #E8893A;font-weight:700}
.per-j.per-debut{background:#177A55!important;color:#fff;font-weight:800}
.per-j.per-fin{background:#E8893A!important;color:#fff;font-weight:800}
.per-j.per-fin-apercu{background:#F8C9A0!important;color:#6B3A0E;font-weight:800}
.per-j.per-dans{background:#FDE6D2;color:#8A4A00;border-radius:0}
.per-j.per-dans-off{background:repeating-linear-gradient(135deg,#FBF1E8 0 4px,#fff 4px 8px);color:#B8A99B;border-radius:0}
.per-pied{display:flex;align-items:center;gap:10px;margin-top:10px;font-size:12.5px}
.per-compte{flex:1;font-weight:700;color:#8A4A00}
html[data-theme="dark"] .per-champ,html[data-theme="dark"] .per-pop,html[data-theme="dark"] .per-nav{background:var(--s1);border-color:var(--line)}
html[data-theme="dark"] .per-j:hover{background:var(--s3)}
html[data-theme="dark"] .per-j.per-dans{background:#4A3218;color:#F7D9A6}
html[data-theme="dark"] .per-j.per-dans-off{background:repeating-linear-gradient(135deg,#2A2118 0 4px,#16201D 4px 8px);color:#6F6255}
html[data-theme="dark"] .per-j.per-fin-apercu{background:#7A4A22!important;color:#FDE6D2}
@media (max-width:600px){.per-grille{grid-template-columns:repeat(7,38px)}.per-j{height:38px}}
.ebp-cols{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:10px 0}.ebp-cols label{display:flex;flex-direction:column;gap:3px;font-size:12.5px}
.ebp-reg textarea{width:100%;font-size:12.5px}
.ebp-t td{vertical-align:top}.ebp-introuvable{opacity:.6}.ebp-a_remplir td:first-child{box-shadow:inset 3px 0 0 #2FB67C}
@media (max-width:900px){.ebp-cols{grid-template-columns:1fr 1fr}}
.acces-a{margin-bottom:12px}.acces-t{margin-bottom:8px}
.acces-v{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 14px}
.acces-v label{display:flex;gap:7px;align-items:center;font-size:13.5px}.acces-v label.fixe{color:var(--muted)}
@media (max-width:800px){.acces-v{grid-template-columns:1fr 1fr}}
.ebp-corr{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:10px 0}.ebp-corr h3{font-size:13px;margin:0 0 6px}
.ebp-corr select{font-size:12.5px;padding:3px 6px}
@media (max-width:1000px){.ebp-corr{grid-template-columns:1fr}}
.l-type{max-width:170px;font-size:12.5px;padding:3px 6px;margin-right:6px}
.devis-types{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:6px 0 10px}
.cg-form{display:flex;flex-direction:column;gap:10px;max-width:880px}
.cg-l{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end}.cg-l>label{flex:1;min-width:170px;display:flex;flex-direction:column;gap:4px}
.cg-form>label{display:flex;flex-direction:column;gap:4px}
.cg-compte{font-weight:800;color:#8A4A00;padding-bottom:9px;min-width:130px}
.cg-liste{display:flex;flex-direction:column;gap:8px;max-width:1000px}
.cg-d{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;flex-wrap:wrap}
.cg-a{display:flex;gap:8px;align-items:center}.cg-a form{display:inline}
.cg-refus summary{list-style:none;cursor:pointer}.cg-refus summary::-webkit-details-marker{display:none}
.cg-refus[open] summary{display:none}.cg-refus input{min-width:260px}
.cg-solde{display:flex;flex-direction:column;align-items:flex-end;background:#EAF6EF;border:1px solid #CFE7DA;border-radius:12px;padding:8px 14px}
.cg-solde span{font-size:12px;color:var(--muted)}.cg-solde b{font-size:22px;color:#146C4A}
.cg-solde.neg{background:#FFF1F0;border-color:#F5B5AE}.cg-solde.neg b{color:#C9372C}
.neg{color:#C9372C}
.cg-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media (max-width:900px){.cg-2{grid-template-columns:1fr}}
.cg-hist{margin-top:14px}.cg-hist table{margin-top:8px}
html[data-theme="dark"] .cg-solde{background:#132A20;border-color:#23513C}
.cg-cartes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:10px;max-width:880px}
.cg-carte{border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:3px;border:1px solid var(--line)}
.cg-carte b{font-size:26px}.cg-lib{font-size:13px;font-weight:700;color:var(--muted)}
.cg-carte.dispo{background:#EAF6EF;border-color:#CFE7DA}.cg-carte.dispo b{color:#146C4A}
.cg-carte.encours{background:#F4F7FB;border-color:#DCE4EF}.cg-carte.encours b{color:#2B4C7E}
.cg-carte.neg{background:#FFF1F0;border-color:#F5B5AE}.cg-carte.neg b{color:#C9372C}
.cg-aide{max-width:880px;margin-bottom:12px;font-size:14px}.cg-aide summary{cursor:pointer;color:#177A55;font-weight:700}
.cg-annonce{background:#EAF6EF;border:1px solid #CFE7DA;border-radius:10px;padding:9px 12px;font-size:14px}
.cg-annonce.anticipe{background:#FFF7EC;border-color:#F3D3AE}.cg-annonce.depasse{background:#FFF1F0;border-color:#F5B5AE}
.cg-rep{display:flex;gap:6px;flex-wrap:wrap;margin:4px 0}
tr.cg-cour td{background:#F6FBF8}
@media (max-width:700px){.cg-cartes{grid-template-columns:1fr}}
html[data-theme="dark"] .cg-carte.dispo{background:#132A20;border-color:#23513C}
html[data-theme="dark"] .cg-carte.encours{background:#16202E;border-color:#2B3A52}
html[data-theme="dark"] .cg-annonce{background:#132A20;border-color:#23513C}
html[data-theme="dark"] .cg-annonce.anticipe{background:#2E2415;border-color:#5A4424}
html[data-theme="dark"] tr.cg-cour td{background:#15221D}
.hor td{vertical-align:middle}.hor input[type=time]{padding:3px 4px}.hor-ap{font-size:11.5px;min-width:260px}
.rl-form{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}.rl-gens{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.rl-gens .pill{display:inline-flex;gap:5px;align-items:center}
.cg-sans{max-width:880px;margin-bottom:12px;background:#F4F7FB;border-color:#DCE4EF}
.seg{display:inline-flex;border:1px solid var(--line);border-radius:9px;overflow:hidden}
.seg label{cursor:pointer}.seg input{display:none}.seg span{display:inline-block;padding:4px 9px;font-size:12.5px;font-weight:600;color:var(--muted)}
.seg input:checked+span{background:#17607A;color:#fff}.seg label+label span{border-left:1px solid var(--line)}
.rl-tete{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin-bottom:6px}.rl-tete select{margin-left:6px}
.rl-totaux{display:flex;gap:14px;flex-wrap:wrap;font-size:14px}.rl-totaux b{color:#146C4A}
.rl-cartes{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:12px;margin:10px 0 18px}
.rl-carte{padding:12px 14px;display:flex;flex-direction:column;gap:8px;transition:box-shadow .2s}
.rl-carte.enreg{box-shadow:0 0 0 2px #7FD1A8}.rl-carte.erreur{box-shadow:0 0 0 2px #E5877E}
.rl-nom{display:flex;gap:8px;align-items:center}.rl-reinit{margin-left:auto;font-size:12px}
.rl-jours{display:flex;flex-wrap:wrap;gap:6px;font-size:12px;color:var(--muted)}.rl-jours span{background:var(--bg2,#F3F5F4);border-radius:8px;padding:2px 7px}
.rl-reg{display:flex;flex-direction:column;gap:5px}
.rl-ligne{display:grid;grid-template-columns:1fr 30px 64px 30px 16px;gap:5px;align-items:center;border-radius:8px;padding:2px 4px}
.rl-ligne.aj{background:#FFF7EC}.rl-lib{font-size:13px}.rl-lib small{color:var(--muted)}
.rl-ligne button{width:30px;height:30px;border-radius:8px;border:1px solid var(--line);background:var(--card,#fff);font-size:17px;font-weight:700;cursor:pointer;color:#146C4A}
.rl-ligne button:active{transform:scale(.94)}.rl-val{text-align:center;padding:4px;font-weight:700}.rl-u{font-size:12px;color:var(--muted)}
.rl-note{font-size:12.5px;padding:5px 8px}
.rl-est{border-top:1px dashed var(--line);padding-top:7px;display:grid;gap:3px;font-size:13px}
.rl-est>div{display:flex;justify-content:space-between}.rl-est .plus b{color:#146C4A}.rl-est .moins b{color:#C9372C}
.rl-est .brut,.rl-est .tot{font-weight:800;font-size:14.5px}.rl-est .tot{border-top:1px solid var(--line);padding-top:4px}
.rl-est .barre{height:7px;background:var(--bg2,#EEF2F0);border-radius:6px;overflow:hidden;display:block}
.rl-est .barre i{display:block;height:100%;background:#9DB8AA;border-radius:6px;transition:width .35s ease}
.rl-est .barre i.haut{background:#2FA36B}.rl-est .barre i.bas{background:#E0786D}
html[data-theme="dark"] .rl-ligne.aj{background:#2E2415}
.hor-groupes th{font-size:11px;letter-spacing:.06em;border-bottom:0}.hor th.g-paie,.hor td.g-paie{background:rgba(23,122,85,.05)}
.hor-l.non-sal td.g-paie{opacity:.35}.hor .hor-ap{font-size:11px;max-width:260px}
.hor select.hor-paie{padding:3px 4px;font-size:12.5px}
.hor table.factu td,.hor table.factu th{padding:5px 5px}.hor input,.hor select{padding:4px 5px;font-size:13px}
.hor .hor-ap{white-space:nowrap}
.hor input[type=time]::-webkit-calendar-picker-indicator{display:none}
.rl-zones{display:flex;flex-direction:column;gap:4px}.rl-zg{display:grid;grid-template-columns:repeat(5,1fr);gap:4px}
.rl-ligne.rl-z{grid-template-columns:1fr;justify-items:center;gap:2px;padding:4px 2px;border:1px solid var(--line)}
.rl-ligne.rl-z .rl-zl{font-weight:800;font-size:12px;color:#146C4A}
.rl-ligne.rl-z button{width:100%;height:24px;font-size:15px}.rl-ligne.rl-z .rl-val{width:100%;padding:2px}
.hor-paie-seg span{padding:4px 7px;font-size:12px}
.hor-paie-seg span{padding:4px 5px;font-size:11px;letter-spacing:-.01em}
.hor td.g-paie{padding-left:3px;padding-right:3px}
.hor input[type=time]{padding:4px 3px}
.rl-bareme{margin:6px 0 12px}.rl-bareme summary{cursor:pointer}.rl-bform{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.rl-aide{display:block;font-size:11px;color:var(--muted);line-height:1.25}
.rl-est .net b{color:#146C4A;font-size:15px}.rl-est .net{font-weight:800}
.hor-ajout{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:10px;padding:10px 12px}
.hor-ajout select{max-width:360px}
.rl-cartes{grid-template-columns:repeat(auto-fill,minmax(390px,1fr))}
.rl-est .e-prime{text-align:right}
.cx-form{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.cx-resume{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:10px}
.cx-resume .card{padding:10px 14px;display:flex;flex-direction:column}.cx-resume span{font-size:12px;color:var(--muted)}.cx-resume b{font-size:20px}
.cx-filtres{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}.cx-filtres .pill{cursor:pointer;border:1px solid var(--line);background:var(--card,#fff);border-radius:20px;padding:4px 10px;font-size:12.5px}
.cx-filtres .pill.on{background:#177A55;color:#fff;border-color:#177A55}
.chip.cx-err{background:#FFE8E5;color:#B42318}.chip.cx-alerte{background:#FFF1DC;color:#8A4A00}.chip.cx-info{background:#EEF2F7;color:#40536E}
.cx-form{flex-direction:row;justify-content:flex-start;align-items:center}
.tva-bascule{border:1px solid var(--line);background:var(--card,#fff);cursor:pointer;margin-left:4px;font-size:10.5px}
.tva-bascule.auto{background:#FFF1DC;color:#8A4A00;border-color:#F3D3AE}
.ch-dossier-creer{border:1px dashed #9DB8AA;background:transparent;cursor:pointer;color:#146C4A}
.kb-plan{color:#146C4A}.kb-alerte{color:#8A4A00}.kb-dos{cursor:pointer}
.org-plan-g{display:grid;grid-template-columns:1fr 1fr;gap:10px;font-size:13.5px}.org-plan-g>div{display:flex;flex-direction:column;gap:3px}
td.tot .tot-general{display:block;font-size:15.5px;font-weight:800;color:var(--texte,#1A211E);white-space:nowrap;padding-bottom:4px}
td.tot .tot-detail{border-top:1px solid var(--line);padding-top:4px;display:flex;flex-direction:column;gap:1px;font-size:11.5px;white-space:nowrap}
td.tot .tot-detail small{font-size:9.5px;opacity:.75;margin-right:2px;text-transform:uppercase;letter-spacing:.02em}
td.tot{min-width:122px;vertical-align:top}
td.tot .tot-general{font-size:14.5px}
td.tot .tot-detail>div{display:flex;flex-direction:column;line-height:1.15;margin-bottom:3px}
td.tot .tot-detail small{display:block}
tfoot tr.tot-ligne td{border-top:2px solid var(--line)}
tfoot tr.tot-facture td.tot .tot-general{color:#1B5E9E}
tfoot tr.tot-mois td{background:rgba(23,122,85,.04)}
td.tot .t-hl{color:#6B7280}
td.tot .tot-ht{display:block;font-size:15.5px;font-weight:800;white-space:nowrap}
td.tot .tot-general{font-size:12.5px;font-weight:700;opacity:.85}
td.tot small{font-size:10px;font-weight:700;opacity:.7}
thead tr.tot-ligne td{border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-weight:normal}
thead tr.tot-mois td{border-bottom:3px solid var(--line)}
table.prev thead tr.tot-ligne td.col-aff{background:#F7FAF8}
table.prev th.col-mois,table.prev td.tot{min-width:142px;width:142px}
td.tot .tot-ht{font-size:14px}
td.tot .tot-general{font-size:12px}
td.tot .tot-detail{white-space:normal}
td.tot .tot-detail small{white-space:normal;line-height:1.1}
/* ---- Prévisionnel : totaux en tête de chaque mois ---- */
table.prev th.col-mois{min-width:138px;width:138px}
table.prev thead tr.pt-ligne td{background:#F7FAF8;border-bottom:1px solid var(--line);padding:10px 8px;vertical-align:top}
table.prev thead tr.pt-mois td{border-bottom:2px solid #CFE0D6;background:#F1F7F3}
table.prev thead tr.pt-ligne td.col-aff{background:#F7FAF8}
table.prev thead tr.pt-mois td.col-aff{background:#F1F7F3}
.pt-lib b{display:block;font-size:14px;color:var(--ink)}
.pt-lib span{display:block;font-size:11.5px;color:var(--muted);line-height:1.3;margin-top:2px;font-weight:400}
td.pt{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
td.pt.courant{background:#EAF6EF !important}
.pt-ht{font-size:14.5px;font-weight:800;color:var(--ink);letter-spacing:-.01em}
.pt-ht span{font-size:10px;font-weight:700;color:var(--muted);margin-left:3px}
.pt-ca .pt-ht{color:#0F4C6E}
.pt-ttc{font-size:11.5px;color:var(--muted);margin-top:1px}
.pt-barre{display:flex;height:5px;border-radius:4px;overflow:hidden;background:#E6ECE8;margin:7px 0 4px}
.pt-barre i{display:block;height:100%;flex:none}.pt-barre i.pt-rg{background:#00B050}.pt-barre i.pt-fa{background:#00B0F0}
.pt-leg{font-size:11px;white-space:nowrap}.pt-leg .pt-rg{color:#0B6B34}.pt-leg .pt-fa{color:#035E82;font-weight:600}
.pt-pv{display:inline-block;margin-top:6px;font-size:11px;font-weight:600;color:#5A1D6B;background:#F3EAF8;border:1px solid #D9B4E6;border-radius:10px;padding:1px 8px}
.pt-vide{color:#B8C2BD}
html[data-theme="dark"] table.prev thead tr.pt-ligne td,html[data-theme="dark"] table.prev thead tr.pt-ligne td.col-aff{background:#16211C}
html[data-theme="dark"] table.prev thead tr.pt-mois td,html[data-theme="dark"] table.prev thead tr.pt-mois td.col-aff{background:#132019}
html[data-theme="dark"] td.pt.courant{background:#173024 !important}
html[data-theme="dark"] .pt-ca .pt-ht{color:#7CC4EA}
html[data-theme="dark"] .pt-barre{background:#2A3630}
html[data-theme="dark"] .pt-pv{background:#2C1F33;border-color:#5B3A6B;color:#E0C3EC}
html[data-theme="dark"] .pt-leg .pt-rg{color:#5FD08E}html[data-theme="dark"] .pt-leg .pt-fa{color:#6CC9F2}
.puce.avoir{background:#FFF6D6;border-color:#F0C94A;color:#7A5A00;cursor:default}
i.av{background:#FFF6D6;border:1px solid #F0C94A}
.pt-av{display:inline-block;margin-top:5px;font-size:11px;font-weight:600;color:#7A5A00;background:#FFF6D6;border:1px solid #F0C94A;border-radius:10px;padding:1px 8px}
html[data-theme="dark"] .puce.avoir,html[data-theme="dark"] .pt-av{background:#3A3113;border-color:#8A6D1C;color:#F3D77A}
/* Situation de travaux : étape de facturation d'une échéance prévue */
.puce.prevu.sit{background:#FFEBD6;border-color:#F0A35E;color:#8A4300}
.puce.prevu.sit::before{content:"📄 ";font-size:10px}
.puce.prevu.sit-ok{background:#FFE0C2;border-color:#E07B22;color:#7A3500;font-weight:700}
.puce.prevu.sit-ok::before{content:"✔ ";font-size:10px}
i.sit{background:#FFEBD6;border:1px solid #F0A35E} i.sit-ok{background:#FFE0C2;border:1px solid #E07B22}
.sit-etat{font-size:12.5px;padding:6px 8px;border-radius:6px;background:#FFEBD6;color:#8A4300;margin-bottom:4px}
.sit-etat.ok{background:#FFE0C2;color:#7A3500;font-weight:700}
.menu-scinder button.lien-menu{width:100%;text-align:left;background:transparent;cursor:pointer;font:inherit}
.menu-scinder .lien-menu.discret{color:var(--muted);font-size:12px}
.pt-sit{display:inline-block;margin-top:4px;font-size:11px;font-weight:600;color:#8A4300;background:#FFEBD6;border:1px solid #F0A35E;border-radius:10px;padding:1px 8px}
html[data-theme="dark"] .puce.prevu.sit,html[data-theme="dark"] .sit-etat,html[data-theme="dark"] .pt-sit{background:#3A2614;border-color:#8A5A2A;color:#F5C08A}
html[data-theme="dark"] .puce.prevu.sit-ok,html[data-theme="dark"] .sit-etat.ok{background:#472A10;border-color:#B8661E;color:#FFD2A3}
/* Prévisionnel : une seule case de total par mois */
table.prev thead tr.pt-unique td{background:#F4F8F6;border-bottom:2px solid #CFE0D6;padding:10px 8px 9px}
table.prev thead tr.pt-unique td.col-aff{background:#F4F8F6}
.pt-unique .pt-ht{color:var(--ink)}
.pt-barre{height:7px;border-radius:5px;margin:7px 0 6px}
.pt-barre i.pt-sit{background:#F0A35E}.pt-barre i.pt-pv{background:#C06CD6}
.pt-ca{font-size:11.5px;color:#0F4C6E;margin-bottom:2px}.pt-ca b{font-size:12.5px}
.pt-parts{display:flex;flex-direction:column;gap:0;font-size:11px;line-height:1.35}
.pt-parts span::before{content:"";display:inline-block;width:7px;height:7px;border-radius:2px;margin-right:4px;vertical-align:0}
.pt-parts .pt-rg{color:#0B6B34}.pt-parts .pt-rg::before{background:#00B050}
.pt-parts .pt-fa{color:#035E82}.pt-parts .pt-fa::before{background:#00B0F0}
.pt-parts .pt-sit{color:#8A4300}.pt-parts .pt-sit::before{background:#F0A35E}
.pt-parts .pt-pv{color:#5A1D6B}.pt-parts .pt-pv::before{background:#C06CD6}
.pt-cles{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:8px;font-size:11px;color:var(--muted)}
.pt-cles i{display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:4px;vertical-align:-1px}
.pt-cles i.pt-rg{background:#00B050}.pt-cles i.pt-fa{background:#00B0F0}.pt-cles i.pt-sit{background:#F0A35E}.pt-cles i.pt-pv{background:#C06CD6}
html[data-theme="dark"] table.prev thead tr.pt-unique td,html[data-theme="dark"] table.prev thead tr.pt-unique td.col-aff{background:#15201B}
html[data-theme="dark"] .pt-ca{color:#7CC4EA}
html[data-theme="dark"] .pt-parts .pt-rg{color:#5FD08E}html[data-theme="dark"] .pt-parts .pt-fa{color:#6CC9F2}
html[data-theme="dark"] .pt-parts .pt-sit{color:#F5C08A}html[data-theme="dark"] .pt-parts .pt-pv{color:#E0B3F0}
/* case unique du total du mois (noms propres, sans conflit) */
.tm-barre{display:flex;height:7px;border-radius:5px;overflow:hidden;background:#E6ECE8;margin:7px 0 6px}
.tm-barre i{display:block;height:100%;flex:none}
.tm-barre i.tm-rg{background:#00B050}.tm-barre i.tm-fa{background:#00B0F0}.tm-barre i.tm-sit{background:#F0A35E}.tm-barre i.tm-pv{background:#C06CD6}
.tm-ca{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2;margin-bottom:3px}
.tm-ca span{font-size:10.5px;color:var(--muted)}.tm-ca b{font-size:13px;color:#0F4C6E}
.tm-parts{display:flex;flex-direction:column;font-size:11px;line-height:1.4;white-space:nowrap}
.tm-parts span::before{content:"";display:inline-block;width:7px;height:7px;border-radius:2px;margin-right:4px}
.tm-parts .tm-rg{color:#0B6B34}.tm-parts .tm-rg::before{background:#00B050}
.tm-parts .tm-fa{color:#035E82}.tm-parts .tm-fa::before{background:#00B0F0}
.tm-parts .tm-sit{color:#8A4300}.tm-parts .tm-sit::before{background:#F0A35E}
.tm-parts .tm-pv{color:#5A1D6B}.tm-parts .tm-pv::before{background:#C06CD6}
.tm-cles{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:8px;font-size:11px;color:var(--muted)}
.tm-cles span{white-space:nowrap}
.tm-cles i{display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:4px;vertical-align:-1px}
.tm-cles i.tm-rg{background:#00B050}.tm-cles i.tm-fa{background:#00B0F0}.tm-cles i.tm-sit{background:#F0A35E}.tm-cles i.tm-pv{background:#C06CD6}
html[data-theme="dark"] .tm-barre{background:#2A3630}
html[data-theme="dark"] .tm-ca b{color:#7CC4EA}
html[data-theme="dark"] .tm-parts .tm-rg{color:#5FD08E}html[data-theme="dark"] .tm-parts .tm-fa{color:#6CC9F2}
html[data-theme="dark"] .tm-parts .tm-sit{color:#F5C08A}html[data-theme="dark"] .tm-parts .tm-pv{color:#E0B3F0}
/* Prévisionnel : défilement dans son cadre, bandeau des mois figé, mini-barres récapitulatives */
.prev-wrap{max-height:calc(100vh - 190px);overflow:auto}
table.prev thead tr:first-child th{position:sticky;top:0;z-index:3;background:var(--card,#fff);box-shadow:0 1px 0 var(--line)}
table.prev thead tr:first-child th.col-aff{left:0;z-index:5}
table.prev thead tr:first-child th.avant{background:#FFF5F1}
table.prev thead tr:first-child th.courant{background:#EAF6EF}
.th-barre{height:5px;margin:6px 4px 0;opacity:0;transition:opacity .15s}
.prev-wrap.compact .th-barre{opacity:1}
html[data-theme="dark"] table.prev thead tr:first-child th{background:#161E1A}
html[data-theme="dark"] table.prev thead tr:first-child th.courant{background:#173024}
html[data-theme="dark"] table.prev thead tr:first-child th.avant{background:#2A1E1A}
.th-barre:empty{background:transparent}
.renvoyee{margin:8px 0 12px;border:1px solid #CFE0D6}.renvoyee summary{cursor:pointer}
.bandeau-annulee{border:1px solid #F0C94A;background:#FFFBEA;margin-bottom:10px}
html[data-theme="dark"] .bandeau-annulee{background:#2E2812;border-color:#8A6D1C}
.cx-mois tr.cx-ko td{background:#FFF5F3}.cx-mois td.r,.cx-mois th.r{text-align:right}
html[data-theme="dark"] .cx-mois tr.cx-ko td{background:#2A1C19}
/* Menu déroulant (« Admin » pour la direction, « Chantiers » pour l'administratif) */
.menu-deroule{position:relative;display:inline-flex}
.menu-deroule-titre{background:transparent;border:0;color:inherit;font:inherit;font-weight:600;cursor:pointer;padding:8px 10px;border-radius:8px;display:inline-flex;align-items:center;gap:4px;color:rgba(255,255,255,.88)}
.menu-deroule-titre .fleche{font-size:10px;opacity:.8;transition:transform .15s}
.menu-deroule.on>.menu-deroule-titre{background:rgba(255,255,255,.14);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.25)}
.menu-deroule-titre:hover{background:rgba(255,255,255,.08)}
.menu-liste{display:none;position:absolute;top:calc(100% + 4px);left:0;min-width:190px;background:#0E2F3B;border:1px solid rgba(255,255,255,.14);border-radius:10px;padding:6px;box-shadow:0 10px 28px rgba(0,0,0,.25);z-index:50;flex-direction:column}
.menu-deroule:hover .menu-liste,.menu-deroule.ouvert .menu-liste,.menu-deroule:focus-within .menu-liste{display:flex}
.menu-deroule:hover .fleche,.menu-deroule.ouvert .fleche{transform:rotate(180deg)}
.menu-liste a{display:flex;align-items:center;gap:6px;padding:8px 10px;border-radius:7px;white-space:nowrap}
.menu-liste::before{content:"";position:absolute;top:-8px;left:0;right:0;height:8px}
@media (max-width: 900px){
  .menu-deroule{display:flex;flex-direction:column;width:100%}
  .menu-deroule-titre{width:100%;justify-content:flex-start}
  .menu-liste{position:static;display:flex;box-shadow:none;border:0;background:transparent;padding:0 0 0 12px;min-width:0}
  .menu-deroule .fleche{display:none}
}
/* menu déroulant : la liste flotte au-dessus de la page (le menu du haut coupe ce qui dépasse) */
.menu-liste{position:fixed;top:auto;left:auto}
nav.menu .menu-deroule-titre{color:#CFE1E7;font-weight:500;padding:8px 11px;border-radius:6px;line-height:20px;gap:7px}
nav.menu .menu-deroule-titre:hover{color:#fff;background:rgba(255,255,255,.06)}
nav.menu .menu-deroule.on>.menu-deroule-titre{background:var(--vert-nav);color:#fff;box-shadow:inset 0 -2px 0 var(--vert-clair)}
nav.menu .menu-deroule-titre span{opacity:1;padding:0;cursor:pointer}
nav.menu .menu-deroule-titre .badge{padding:0 7px;line-height:18px;background:#E8893A;color:#1A211E}
nav.menu .menu-liste a{color:#CFE1E7}
nav.menu .menu-liste a:hover{color:#fff;background:rgba(255,255,255,.08)}
nav.menu .menu-liste a.on{background:var(--vert-nav);color:#fff}
nav.menu .menu-liste .badge{opacity:1}
@media (max-width: 900px){ .menu-liste{position:static} }
.cle-ajout{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.cle-ajout>div{flex:1;min-width:200px}
.btn-cle{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin-top:6px;background:var(--card,#fff);color:var(--vert-texte);border:1.5px solid var(--vert);border-radius:10px;padding:11px;font-weight:700;cursor:pointer;font-size:15px}
.btn-cle:hover{background:var(--vert-pale)}
.login .ou{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px;margin:4px 0}.login .ou::before,.login .ou::after{content:"";flex:1;height:1px;background:var(--line)}
.cle-propose{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:space-between}
.cles-liste{padding:0}.cle-ligne{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid var(--line2)}
.cle-ligne:last-child{border-bottom:0}.cle-ligne .btn2.danger{color:#B42318;border-color:#F3C1BA}
.btn-cle{text-align:center;line-height:1.3}
/* ---- Thermostat des chantiers ---- */
.blk-thermo{margin:18px 0}
.th-resume{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 10px}
.th-pastille{font-size:12.5px;padding:4px 11px;border-radius:99px;border:1px solid var(--line);background:var(--card,#fff)}
.th-pastille.vide{opacity:.45}
.th-pastille.th-surchauffe{background:#FFE8E5;border-color:#F3B6AE;color:#9B1C12}.th-pastille.th-chauffe{background:#FFEFD9;border-color:#F3C78E;color:#8A4300}
.th-pastille.th-va_chauffer{background:#FFF8DC;border-color:#EBD48A;color:#6B5200}.th-pastille.th-ok{background:#E6F6EC;border-color:#A9DDBC;color:#0B6B34}
.th-liste{padding:4px 0}
.th-ligne{display:flex;align-items:center;gap:14px;padding:9px 14px;border-bottom:1px solid var(--line2);color:inherit;text-decoration:none}
.th-ligne:hover{background:var(--line2)}.th-ligne:last-child{border-bottom:0}
.th-nom{flex:1;min-width:0;display:flex;flex-direction:column}.th-nom b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13.5px}
.th-nom small{color:var(--muted);font-size:11.5px}
.th-calme{color:#0B6B34;font-weight:600;justify-content:center}
.th-calmes summary{cursor:pointer;padding:9px 14px;color:var(--muted);font-size:12.5px}
.thermo{display:flex;align-items:center;gap:6px;flex:none;width:230px}
.th-bulbe{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;flex:none;box-shadow:inset 0 0 0 2px rgba(255,255,255,.6)}
.th-tube{position:relative;flex:1;height:12px;border-radius:0 8px 8px 0;background:#EEF2EF;overflow:visible;box-shadow:inset 0 1px 2px rgba(0,0,0,.08)}
.th-tube i{position:absolute;left:0;top:0;bottom:0;border-radius:0 8px 8px 0}
.th-prevu{background:repeating-linear-gradient(-45deg,rgba(0,0,0,.10) 0 4px,transparent 4px 8px)}
.th-mercure{transition:width .6s cubic-bezier(.2,.8,.2,1)}
.th-consigne{position:absolute;top:-4px!important;bottom:-4px!important;width:2px;background:#1A211E;border-radius:0!important;opacity:.55}
.th-pct{width:46px;text-align:right;font-size:13px;font-variant-numeric:tabular-nums}
.th-ok .th-bulbe,.th-ok .th-mercure{background:linear-gradient(90deg,#7ED9A2,#00B050)}
.th-va_chauffer .th-bulbe,.th-va_chauffer .th-mercure{background:linear-gradient(90deg,#9ADBB3,#E8C33A)}
.th-chauffe .th-bulbe,.th-chauffe .th-mercure{background:linear-gradient(90deg,#F6C35B,#F07A1F)}
.th-surchauffe .th-bulbe,.th-surchauffe .th-mercure{background:linear-gradient(90deg,#F59A4A,#E02E1F)}
.th-surchauffe .th-bulbe{animation:th-pulse 1.6s ease-in-out infinite}
@keyframes th-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.12)}}
.th-surchauffe .th-pct{color:#B42318}.th-chauffe .th-pct{color:#B45309}
.thermo.grand{width:100%;max-width:520px}.thermo.grand .th-tube{height:18px}.thermo.grand .th-bulbe{width:38px;height:38px;font-size:18px}.thermo.grand .th-pct{font-size:18px;width:60px}
.th-mini{display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:700;padding:1px 6px;border-radius:99px}
.th-mini.th-surchauffe{background:#FFE8E5;color:#9B1C12}.th-mini.th-chauffe{background:#FFEFD9;color:#8A4300}.th-mini.th-va_chauffer{background:#FFF8DC;color:#6B5200}.th-mini.th-ok{background:#E6F6EC;color:#0B6B34}
html[data-theme="dark"] .th-tube{background:#26302B}html[data-theme="dark"] .th-consigne{background:#E5EDE8}
html[data-theme="dark"] .th-pastille{background:#18211C}
@media (max-width:700px){.th-ligne{flex-direction:column;align-items:stretch;gap:6px}.thermo{width:100%}}
.th-fiche{margin:10px 0;display:flex;flex-direction:column;gap:10px}
.th-fiche-tete{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.th-fiche-tete b{font-size:16px}
.th-fiche-detail{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13px;color:var(--muted)}.th-fiche-detail b{color:var(--ink)}
.th-fiche.th-surchauffe{border-left:4px solid #E02E1F}.th-fiche.th-chauffe{border-left:4px solid #F07A1F}.th-fiche.th-va_chauffer{border-left:4px solid #E8C33A}.th-fiche.th-ok{border-left:4px solid #00B050}
.thermo.grand .th-pct{width:auto;min-width:64px;white-space:nowrap}
.sit-adr{display:flex;flex-direction:column;gap:6px;margin:4px 0 10px}
.sit-choix{display:flex;flex-direction:column;align-items:flex-start;text-align:left;border:1px solid var(--line);background:var(--card,#fff);border-radius:8px;padding:7px 10px;cursor:pointer}
.sit-choix small{color:var(--muted);font-size:11.5px}.sit-choix.on{border-color:var(--vert);background:var(--vert-pale)}
.sit-choix.on b::before{content:"✓ ";color:var(--vert-fonce)}
.sit-verif{display:flex;gap:8px;align-items:center;margin-top:12px;padding:10px;border-radius:8px;background:#FFF8DC;border:1px solid #EBD48A}
html[data-theme="dark"] .sit-verif{background:#2E2812;border-color:#8A6D1C}
.sit-form label{display:flex;flex-direction:column;gap:4px;margin-bottom:10px;font-weight:600;font-size:13px}
.sit-form label input:not([type=checkbox]),.sit-form label textarea,.sit-form label select{width:100%;box-sizing:border-box;font-weight:400}
.sit-form label.ligne,.sit-form label.sit-verif{flex-direction:row;align-items:center;font-weight:500}
.sit-form textarea{min-height:190px}
/* Santé de l'outil */
.sante-resume{margin:4px 0 14px;padding:12px 16px;border-radius:10px;font-size:15px}
.sante-resume.ok{background:#E6F6EC;color:#0B6B34;border:1px solid #A9DDBC}.sante-resume.ko{background:#FFF1DC;color:#8A4A00;border:1px solid #F3C78E}
.sante-liste{padding:2px 0;margin-bottom:14px}
.sante-ligne{display:flex;align-items:center;gap:12px;padding:10px 14px;border-bottom:1px solid var(--line2)}.sante-ligne:last-child{border-bottom:0}
.sante-pastille{font-size:16px;width:22px;text-align:center}
.sante-txt{flex:1;display:flex;flex-direction:column;min-width:0}.sante-txt small{color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.sante-ligne.s-alerte{background:#FFFAF2}
html[data-theme="dark"] .sante-resume.ok{background:#14301F;border-color:#2B6B45;color:#8FE0AE}html[data-theme="dark"] .sante-resume.ko{background:#33240F;border-color:#7A5420;color:#F5C08A}
html[data-theme="dark"] .sante-ligne.s-alerte{background:#2A2114}
.pe-on{color:var(--vert-fonce);font-weight:700}
.bandeau.jumele-total{display:flex;gap:10px;align-items:flex-start;background:#EEF6FB;border:1px solid #B9D9EE;color:#0F4C6E;margin:8px 0 12px}
html[data-theme="dark"] .bandeau.jumele-total{background:#14262F;border-color:#2C5A73;color:#9DD3F0}
.chip.a-encaisser{border:1px solid #F3C78E;background:#FFF1DC;color:#8A4A00;cursor:pointer;margin-left:4px}
.mo-mat.un-seul{grid-template-columns:1fr}
.montrer-bloc{margin:4px 0 8px}.retour-synthese{margin:6px 0 10px}
/* ---- Synthèse d'une affaire clôturée ---- */
.synthese{max-width:1000px}
.syn-hero{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:14px;align-items:center;padding:20px 22px;border-radius:14px;margin:6px 0 14px;color:#fff}
.syn-hero.syn-top{background:linear-gradient(120deg,#0E7A4E,#1FAE6E)}.syn-hero.syn-bon{background:linear-gradient(120deg,#177A55,#3FB984)}
.syn-hero.syn-faible{background:linear-gradient(120deg,#A35A06,#E39B2E)}.syn-hero.syn-perte{background:linear-gradient(120deg,#8E1B12,#D9452F)}
.syn-verdict{display:flex;flex-direction:column;gap:2px}.syn-verdict .syn-emoji{font-size:34px;line-height:1}.syn-verdict b{font-size:20px}.syn-verdict small{opacity:.85}
.syn-marge,.syn-ca{display:flex;flex-direction:column}.syn-hero .foot{color:rgba(255,255,255,.8)}
.syn-marge b{font-size:30px;font-weight:800;line-height:1.1}.syn-pc{display:inline-block;margin-top:4px;background:rgba(255,255,255,.2);border-radius:99px;padding:1px 10px;font-weight:700;width:max-content}
.syn-ca b{font-size:22px}
.syn-barre{display:flex;height:16px;border-radius:8px;overflow:hidden;background:#EEF2EF;margin:8px 0 10px}.syn-barre i{display:block;height:100%}
.syn-leg{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13px}.syn-leg i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}
.syn-leg small{color:var(--muted)}
.sb-mo{background:#3B82C4}.sb-st{background:#9B6BC7}.sb-mat{background:#E8923A}.sb-mg{background:#1FA466}
.syn-cartes{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:12px 0}
.syn-carte{padding:14px 16px;display:flex;flex-direction:column;gap:4px}.syn-carte .lbl{font-size:11.5px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:700}
.syn-carte b{font-size:20px}.syn-carte b small{font-size:12px;color:var(--muted);font-weight:500}
.syn-ok{color:#0B6B34;font-weight:600;font-size:13px}.syn-ko{color:#B42318;font-weight:600;font-size:13px}
.syn-equipe div{display:flex;justify-content:space-between;font-size:13px;padding:2px 0;border-bottom:1px dashed var(--line2)}.syn-equipe div b{font-size:13px}
.syn-com p{margin:6px 0;white-space:pre-wrap}.syn-com small{color:var(--muted)}.syn-com .lbl{font-size:11.5px;text-transform:uppercase;color:var(--muted);font-weight:700}
.syn-actions{display:flex;gap:16px;align-items:center;margin:16px 0}
@media (max-width:760px){.syn-hero{grid-template-columns:1fr}}
html[data-theme="dark"] .syn-barre{background:#26302B}
.chip.bulle-cloture{background:#E6F6EC;border:1px solid #A9DDBC;color:#0B6B34;text-decoration:none;cursor:pointer}
.chip.bulle-cloture:hover{background:#D4F0DF}
html[data-theme="dark"] .chip.bulle-cloture{background:#14301F;border-color:#2B6B45;color:#8FE0AE}
.ecart-heures{display:flex;gap:12px;align-items:center;flex-wrap:wrap;justify-content:space-between;margin:8px 0}
.refus-heures{margin:8px 0;font-weight:600}
.zero-h{display:inline-block;width:15px;height:15px;line-height:15px;text-align:center;border-radius:50%;background:#FFF1DC;color:#8A4A00;font-size:10px;font-weight:700;cursor:help}
.cx-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:8px 0 10px}.cx-actions .foot{flex:1;min-width:260px}
.cx-imp{color:#8A4A00;font-weight:600}
.cx-alerte{color:#B42318;font-weight:600}
.cx-det summary{cursor:pointer;list-style:none}.cx-det summary::-webkit-details-marker{display:none}.cx-det summary::after{content:" ▾";font-size:10px;color:var(--muted)}
.cx-det[open]{background:var(--card,#fff);position:relative}.cx-det div{display:flex;justify-content:space-between;gap:10px;font-size:11.5px;text-align:left;padding:2px 0;border-top:1px dashed var(--line2);white-space:normal;min-width:260px}
.ebp-lecture{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:12px}
.ebp-ligne{padding:5px 0;border-bottom:1px dashed var(--line2);font-size:13px}
.ebp-parcours{flex-basis:100%;font-size:13px}.ebp-parcours summary{cursor:pointer;color:var(--muted)}.ebp-parcours table{margin-top:6px;max-width:560px}
.ebp-completer{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:10px 0}
.ebp-piece{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.ebp-piece label{display:flex;gap:6px;align-items:flex-start;flex-wrap:wrap}
.ebp-choix{max-width:340px;font-size:12px;padding:2px 4px}
.ebp-choix-bloc{display:inline-flex;gap:6px;flex-wrap:wrap;align-items:center}.ebp-choix{min-width:300px}
.ebp-nouvelle{display:inline-flex;gap:6px}.ebp-nouvelle input{font-size:12px;padding:2px 6px}
.prev-statuts{display:flex;flex-wrap:wrap;gap:6px;align-items:center;flex-basis:100%;margin-top:4px}
.prev-statuts label.chip{cursor:pointer;opacity:.55}.prev-statuts label.chip.coche{opacity:1;box-shadow:0 0 0 2px currentColor inset}
.prev-statuts label.chip input{display:none}.prev-tous{margin-left:auto;font-size:13px;display:flex;gap:6px;align-items:center;cursor:pointer}
.filtres .prev-tous{flex-direction:row;align-items:center;gap:6px;font-weight:600;color:var(--text)}
.filtres .prev-statuts label.chip{flex-direction:row}
.st-avoir   {--c:#F0C94A; --f:#FFF6D6; --t:#7A5A00}  /* comme la puce « avoir » du prévisionnel */
html[data-theme="dark"] .st-avoir {--c:#8A6D1C; --f:#3A3113; --t:#F3D77A}
/* ---- Bascule chantier jumelé ⇄ affaire seule ---- */
.bascule{border-radius:14px;padding:10px 12px 12px;margin:6px 0 14px;border:1px solid var(--line2)}
.bascule.mode-chantier{background:linear-gradient(120deg,#E6F4F1,#F2FAF8);border-color:#9ED3C7}
.bascule.mode-affaire{background:var(--card,#fff)}
.bc-mode{display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:13px;margin-bottom:8px}
.bc-badge{font-size:11px;font-weight:800;letter-spacing:.06em;padding:3px 9px;border-radius:99px}
.mode-chantier .bc-badge{background:#0F766E;color:#fff}.mode-affaire .bc-badge{background:#334155;color:#fff}
.bc-separer{margin-left:auto}
.bc-onglets{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}
.bc-onglet{display:flex;flex-direction:column;gap:2px;min-width:150px;max-width:220px;padding:8px 12px;border-radius:10px;border:1px solid var(--line2);
  background:var(--card,#fff);text-decoration:none;color:inherit;transition:transform .12s,box-shadow .12s;flex-shrink:0;cursor:pointer;font:inherit;text-align:left}
.bc-onglet:hover{transform:translateY(-1px);box-shadow:0 3px 10px rgba(0,0,0,.08)}
.bc-onglet .bc-num{font-weight:800;font-size:14px}.bc-onglet .bc-nom{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bc-onglet .bc-mt{font-size:12px;display:flex;gap:6px;align-items:center}
.bc-onglet.bc-chantier{border-color:#9ED3C7}.bc-onglet.bc-chantier .bc-num{color:#0F766E}
.bc-onglet.actif{background:#0F766E;border-color:#0F766E;color:#fff;box-shadow:0 4px 14px rgba(15,118,110,.25)}
.bc-onglet.actif .bc-nom,.bc-onglet.actif .bc-num{color:#fff}
.mode-affaire .bc-onglet.actif:not(.bc-chantier){background:#334155;border-color:#334155;box-shadow:0 4px 14px rgba(51,65,85,.25)}
.bc-ajout-f{display:flex}.bc-ajout{min-width:90px;align-items:center;justify-content:center;border-style:dashed;background:transparent}
.bc-plus{font-size:20px;line-height:1;color:#0F766E}
html[data-theme="dark"] .bascule.mode-chantier{background:#12302B;border-color:#2B6B5F}
html[data-theme="dark"] .bc-onglet{background:#1D2622}
.acces-planning{align-self:center;white-space:nowrap}
/* ---- Droits de l'équipe ---- */
.droit{padding:12px 14px;margin-bottom:10px;display:flex;flex-direction:column;gap:8px}.droit.inactif{opacity:.6}
.droit-t{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.droit-plannings,.droit-vues{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.droit-lib{font-size:12px;font-weight:700;color:var(--muted);min-width:150px}
.droit-niv{border:1px solid var(--line2);background:var(--card,#fff);border-radius:99px;padding:5px 12px;font:inherit;font-size:13px;cursor:pointer}
.droit-niv:hover{border-color:#0F766E}.droit-niv.on{background:#0F766E;border-color:#0F766E;color:#fff;font-weight:700}
.droit-vue{border:1px solid var(--line2);border-radius:99px;padding:3px 10px;font-size:12px;cursor:pointer}
.droit-vue input{margin-right:4px}.droit-vue.on{background:#E6F4F1;border-color:#9ED3C7}
html[data-theme="dark"] .droit-vue.on{background:#12302B;border-color:#2B6B5F}
/* ---- Renforts provisoires ---- */
.renforts{margin:6px 0 18px}.rf-tete{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:10px}.rf-tete h2{margin:0}.rf-tete .foot{flex:1;min-width:260px}
.rf-grille{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.rf-carte{background:var(--card,#fff);border:1px solid var(--line2);border-left:5px solid #3B82C4;border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:10px}
.rf-carte.rf-bientot{border-left-color:#E39B2E}.rf-carte.rf-a_venir{border-left-color:#9B6BC7;background:linear-gradient(120deg,#FAF6FF,var(--card,#fff))}
.rf-haut{display:flex;gap:10px;align-items:center}.rf-qui{display:flex;flex-direction:column;flex:1;min-width:0}.rf-qui .foot{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rf-avatar{width:38px;height:38px;border-radius:50%;background:#0F766E;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:800;flex-shrink:0}
.rf-avatar.petit{width:24px;height:24px;font-size:10px}
.rf-t-cdd .rf-avatar{background:#3B82C4}.rf-t-entrepreneur .rf-avatar{background:#B4632A}.rf-t-stagiaire .rf-avatar{background:#7C4DBA}
.rf-type{font-size:12px;font-weight:700;padding:3px 9px;border-radius:99px;background:#EEF3F1;white-space:nowrap}
.rf-dates{display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}.rf-dates b{color:var(--text,#1A211E)}
.rf-bientot .rf-dates b{color:#B45309}
.rf-barre{height:8px;border-radius:99px;background:#E7EEEA;overflow:hidden;margin-top:4px}.rf-barre i{display:block;height:100%;background:linear-gradient(90deg,#3B82C4,#0F766E);border-radius:99px}
.rf-bientot .rf-barre i{background:linear-gradient(90deg,#E8923A,#D9452F)}
.rf-infos{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px;font-size:12.5px}
.rf-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;border-top:1px dashed var(--line2);padding-top:8px}
.rf-ratt{display:flex;gap:4px;align-items:center}.rf-ratt select{font-size:12px;padding:3px 6px;max-width:170px}
.rf-vide{padding:16px;border:1px dashed var(--line2);border-radius:12px;color:var(--muted)}
.rf-finis{margin-top:10px}.rf-finis summary{cursor:pointer;color:var(--muted)}.rf-fini{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:6px 0;border-bottom:1px dashed var(--line2);font-size:13px}
.rf-dlg{border:0;border-radius:14px;padding:18px 20px;max-width:620px;width:94vw}.rf-dlg::backdrop{background:rgba(10,30,22,.35)}
.rf-types{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:8px 0 12px}
.rf-type-choix input{display:none}.rf-type-choix span{display:flex;flex-direction:column;gap:2px;padding:10px;border:1px solid var(--line2);border-radius:10px;cursor:pointer;height:100%}
.rf-type-choix small{color:var(--muted);font-size:11px}.rf-type-choix input:checked+span{border-color:#0F766E;background:#E6F4F1;box-shadow:0 0 0 2px #0F766E inset}
.rf-champs{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px}.rf-champs label{display:flex;flex-direction:column;font-size:12px;font-weight:600;gap:3px}
.rf-champs .large{grid-column:1/-1}.rf-champs input,.rf-champs select{font-size:14px;padding:6px 8px}.rf-champs p{grid-column:1/-1;margin:0}
.rf-inviter{display:flex;gap:6px;align-items:center;font-size:13px;margin:12px 0}.rf-boutons{display:flex;gap:8px;justify-content:flex-end}
html[data-theme="dark"] .rf-type{background:#26302B}html[data-theme="dark"] .rf-type-choix input:checked+span{background:#12302B}
@media (max-width:600px){.rf-types{grid-template-columns:1fr}.rf-champs{grid-template-columns:1fr}}
.cloture-mention{display:block;font-size:11px;font-weight:700;color:#0B6B34;margin-top:7px;padding-left:4px;white-space:nowrap;cursor:help;width:max-content}
html[data-theme="dark"] .cloture-mention{color:#8FE0AE}
.dv-indices{min-width:360px;display:flex;flex-direction:column;gap:6px}
.dv-ind{display:grid;grid-template-columns:auto auto 1fr auto auto;gap:10px;align-items:center;padding:6px 4px;border-top:1px dashed var(--line2);font-size:13px}
.dv-ind .num{text-align:right}.dv-ind.dernier{background:rgba(15,118,110,.06);border-radius:6px}.dv-num{font-weight:700;white-space:nowrap}.dv-num small{font-weight:600;color:#0F766E}
.pop.dv-indices{width:max-content;min-width:0;max-width:94vw}
.dv-ind{grid-template-columns:8.8em 4.6em 6.4em 2.6em auto}
.dv-num small{display:block;font-size:10px;line-height:1.1}
.dv-ind form{margin:0}.dv-toutes{border-top:1px solid var(--line2);padding-top:6px;text-align:right}
.dv-indices .dv-ind{grid-template-columns:8.8em 4.6em 6.4em auto auto}
.dv-ind .chip{justify-self:start;width:max-content}
.retour-parcours{font-weight:700;text-decoration:none}.retour-parcours:hover{text-decoration:underline}
/* écran de connexion : le code se valide seul au 6e chiffre, le bouton reste caché (Entrée fonctionne toujours) */
.login .btn.auto-masque{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}
/* téléphone : le menu ouvert défile de lui-même, la page dessous ne bouge plus */
@media (max-width: 900px){
  body.menu-ouvert{overflow:hidden;touch-action:none}
  body.menu-ouvert header.top nav.menu{max-height:calc(100dvh - 64px - env(safe-area-inset-top));overflow-y:auto;overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;touch-action:pan-y;padding-bottom:calc(16px + env(safe-area-inset-bottom))}
}
/* ---- Téléphone : rien ne doit élargir la page (sinon tout est réduit de moitié) ---- */
@media (max-width: 700px){
  main{max-width:100vw;overflow-x:clip}
  main .card,main section,main form,main details,main .bloc{min-width:0;max-width:100%}
  main table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  main table thead,main table tbody,main table tfoot{width:max-content;min-width:100%}
  main input:not([type=checkbox]):not([type=radio]),main select,main textarea{max-width:100%;min-width:0}
  main label{min-width:0;max-width:100%}
  main .grid2,main .mo-mat,main .syn-cartes,main .kpis-suivi{grid-template-columns:1fr !important}
  main .kpis{grid-template-columns:1fr 1fr !important}
  main .actions,main .meta,main .entete,main .entete>div,main .en-ligne{flex-wrap:wrap;min-width:0}
  main .entete{gap:10px}
  main .entete h1{font-size:20px;line-height:1.25;word-break:break-word}
  main .btn,main .btn2{white-space:normal}
}
@media (max-width: 700px){ main .chip{white-space:normal;max-width:100%;height:auto;line-height:1.3} }
/* Chantiers : colonnes qui occupent toute la largeur, bouton dossier visible, alertes d'une carte */
.tableau-trello .kb-col{flex:1 1 300px;min-width:280px;max-width:520px}
@media (max-width:900px){.tableau-trello .kb-col{flex:0 0 88vw;max-width:none}}
.kb-carte{position:relative}
.kb-dossier{position:absolute;top:6px;right:6px;width:28px;height:28px;border-radius:8px;background:#FFF7E0;border:1px solid #F0D58A;
  display:flex;align-items:center;justify-content:center;font-size:15px;cursor:pointer;z-index:2}
.kb-dossier:hover{background:#FFEFC2}.kb-carte:has(.kb-dossier) .kb-titre{padding-right:32px}
.kb-alerte{cursor:pointer}
.carte-alertes{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;background:#FFF7E8;border-color:#F3D19C}
.carte-alertes .ca-al{display:block;font-size:13px;margin-top:3px}
html[data-theme="dark"] .kb-dossier{background:#3A3113;border-color:#8A6D1C}
/* ---- Doublons de cartes ---- */
.db-paire{padding:12px 14px;margin-bottom:12px}.db-pourquoi{font-size:12px;font-weight:700;color:#8A4A00;margin-bottom:8px}
.db-cotes{display:grid;grid-template-columns:1fr 1fr;gap:12px}.db-carte{border:1px solid var(--line2);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:6px}
.db-titre{font-weight:800}.db-infos{display:flex;gap:12px;flex-wrap:wrap;font-size:12.5px}.db-desc{font-size:12px;color:var(--muted);white-space:pre-wrap}
.db-pas{text-align:right;margin-top:6px}
@media (max-width:700px){.db-cotes{grid-template-columns:1fr}}
.carte-gestion{display:flex;gap:10px;align-items:center;flex-wrap:wrap;border-top:1px dashed var(--line2);margin-top:10px;padding-top:10px}
.carte-gestion select{max-width:320px}
.db-desc{white-space:normal;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
main:has(.db-paire) .entete{flex-direction:column;align-items:flex-start}
.db-groupe{display:flex;gap:12px;align-items:center;flex-wrap:wrap;position:sticky;top:8px;z-index:5}
.db-pourquoi label{display:inline-flex;gap:8px;align-items:center;cursor:pointer}
.nc-jumeler{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px 0;padding:10px 12px;border:1px dashed var(--line2);border-radius:10px}
#nc-jum-liste{display:flex;gap:6px;flex-wrap:wrap}.nc-jum button{font-weight:700;padding:0 2px}
.cd-ligne{display:flex;gap:12px;align-items:center;padding:10px 14px;margin-bottom:8px;flex-wrap:wrap}.cd-nom{flex:1;min-width:220px;display:flex;flex-direction:column;gap:2px}
.dc-barre{display:flex;gap:8px;align-items:center;margin-bottom:10px;flex-wrap:wrap}.dc-table td.c,.dc-table th.c{text-align:center;width:60px}
.dc-table input[type=radio]{width:18px;height:18px;cursor:pointer}
/* ---- Photos de chantier ---- */
.ph-boutons{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:10px}.ph-btn{cursor:pointer}
.ph-grille{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}
.ph{margin:0;position:relative;border-radius:8px;overflow:hidden;background:#EEF2F0}
.ph img{width:100%;aspect-ratio:1;object-fit:cover;display:block}
.ph figcaption{font-size:11px;padding:3px 6px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ph form{position:absolute;top:4px;right:4px;margin:0}.ph-x{width:24px;height:24px;border-radius:50%;border:0;background:rgba(0,0,0,.55);color:#fff;font-weight:700;cursor:pointer;line-height:1}
.ph-depot{display:none;border:2px dashed #9ED3C7;border-radius:10px;padding:12px;text-align:center;color:#0F766E;font-size:13px;margin-bottom:10px}
@media (hover:hover) and (pointer:fine){.ph-depot{display:block}}
.org-photos.ph-survol{outline:3px dashed #0F766E;outline-offset:-6px;background:#E6F4F1}.org-photos.ph-survol .ph-depot{background:#fff;font-weight:700}
html[data-theme="dark"] .org-photos.ph-survol{background:#12302B}
/* ---- Fiche d'une carte : compacte, pensée pour le chantier ---- */
.carte-alertes-l{display:flex;gap:6px 14px;flex-wrap:wrap;align-items:center;background:#FFF7E8;border:1px solid #F3D19C;border-radius:10px;padding:8px 12px;margin:0 0 12px;font-size:13px}
.carte-trello-l{display:flex;gap:10px;align-items:center;margin:0 0 12px}
.oc-ligne{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:end;margin-bottom:10px}
.oc-ligne label{display:flex;flex-direction:column;gap:3px}.oc-fait{flex-direction:row !important;align-items:center;gap:6px !important;padding-bottom:8px;white-space:nowrap}
.oc-resp{position:relative}.oc-resp summary{list-style:none;display:flex;align-items:center;gap:4px;border:1px solid var(--line2);border-radius:10px;padding:6px 10px;cursor:pointer;min-height:40px;background:var(--card,#fff)}
.oc-resp summary::-webkit-details-marker{display:none}.oc-noms{flex:1;font-size:13px;margin-left:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.oc-fl{color:var(--muted)}
.oc-av{width:26px;height:26px;border-radius:50%;background:var(--c);color:#fff;font-size:11px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.oc-liste{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 4px);background:var(--card,#fff);border:1px solid var(--line2);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.12);
  max-height:min(60vh,360px);overflow-y:auto;padding:4px;overscroll-behavior:contain}
.oc-pers{display:flex;align-items:center;gap:10px;padding:8px 8px;border-radius:8px;cursor:pointer;font-size:14px}.oc-pers:hover{background:#EEF3F1}
.oc-pers input{width:18px;height:18px}
.oc-desc{display:flex;flex-direction:column;gap:3px;margin:10px 0}.oc-desc textarea{min-height:90px;resize:vertical}
.oc-infos{border:1px solid var(--line2);border-radius:10px;padding:8px 10px;margin-bottom:10px}.oc-infos summary{cursor:pointer;font-weight:700;font-size:13.5px}
.oc-infos[open] summary{margin-bottom:8px}
html[data-theme="dark"] .oc-pers:hover{background:#26302B}
@media (max-width: 900px){
  .org-carte .org-grid{display:flex;flex-direction:column}
  .org-carte .org-listes{order:-1}                     /* sur le chantier : photos et listes d'abord */
  .oc-ligne{grid-template-columns:1fr 1fr}.oc-etape{grid-column:1/-1}
  .oc-actions{position:sticky;bottom:0;background:var(--card,#fff);padding:10px 0 calc(10px + env(safe-area-inset-bottom));margin:0 -4px;z-index:5;border-top:1px solid var(--line2)}
  .oc-pers{padding:11px 8px}                          /* cases faciles à toucher */
}
.oc-ligne{grid-template-columns:1fr auto}.oc-ligne .oc-etape{grid-column:1/-1}
/* Colonne de droite de la carte : des colonnes « sans trou », chaque bloc juste sous le précédent */
.org-carte .org-grid{align-items:start}
.org-carte .org-listes{display:block;column-width:300px;column-gap:16px}
.org-carte .org-listes>*{break-inside:avoid;page-break-inside:avoid;margin:0 0 16px;display:block;width:100%}
@media (max-width: 900px){.org-carte .org-listes{column-width:auto;columns:1}}
.syn-hero.syn-ancienne{background:linear-gradient(120deg,#EEF1F0,#F7F9F8);border-color:#C9D3CF}
.mi-bloc{margin-top:16px}.mi-table td.neg,.mi-table th.neg{color:#B42318}
.mi-tableur{background:#E8F5EC;color:#14532D}.mi-estimation{background:#FFF4E0;color:#8A4A00}.mi-indication{background:#E6F0FB;color:#1E4E8C}
.mi-table .chip{cursor:help}.mi-legende{line-height:2}
.mi-compta{background:#F3EAFB;color:#5B2A86}.mi-ref{margin-top:6px}
.sv-depot{border:2px dashed var(--line2);padding:12px 14px;transition:background .15s}.sv-depot.survol{background:#E6F4F1;border-color:#0F766E}
.sv-depot-l{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.sv-ic{font-size:24px}
.dp-types{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0 10px}
.dp-types a{padding:6px 12px;border-radius:999px;border:1px solid var(--line2);font-size:13px;font-weight:600;text-decoration:none;color:inherit;background:var(--card,#fff)}
.dp-types a.on{background:#0F5B76;border-color:#0F5B76;color:#fff}.dp-n{font-size:11px;opacity:.75;margin-left:3px}
.dp-types a.dp-ign{border-style:dashed;color:var(--muted)}.dp-types a.dp-ign.on{background:#6B7280;border-color:#6B7280;color:#fff}
.dp-pages{display:flex;gap:12px;align-items:center;justify-content:center;margin-top:10px}.dp-retyper{gap:6px;align-items:center}
/* état de la copie Trello : une pastille discrète, orange seulement en cas de retard */
.tr-etat{position:relative}.tr-etat summary{list-style:none;cursor:pointer;font-size:12px;color:var(--muted);padding:4px 8px;border-radius:999px;border:1px solid transparent}
.tr-etat summary::-webkit-details-marker{display:none}.tr-etat summary:hover{border-color:var(--line2)}
.tr-etat.retard summary{color:#8A4A00;background:#FFF1DC;border-color:#F3C98B;font-weight:700}
.tr-menu{position:absolute;right:0;top:calc(100% + 4px);z-index:30;background:var(--card,#fff);border:1px solid var(--line2);border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.12);padding:10px;display:flex;flex-direction:column;gap:8px;min-width:240px}
/* ---- Banque ---- */
.bq-import{display:flex;gap:12px;align-items:center;flex-wrap:wrap;border:2px dashed var(--line2)}.bq-import.survol{background:#E6F4F1;border-color:#0F766E}.bq-ic{font-size:26px}
.bq-releves{margin:10px 0}.bq-filtres{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px 0}
.bq-g{display:flex;gap:4px;flex-wrap:wrap}.bq-g a{padding:5px 11px;border-radius:999px;border:1px solid var(--line2);font-size:12.5px;font-weight:600;text-decoration:none;color:inherit;background:var(--card,#fff)}
.bq-g a.on{background:#0F5B76;border-color:#0F5B76;color:#fff}.bq-g small{opacity:.7}
.bq-table .bq-lib{max-width:520px}.bq-moins{color:#B42318}.bq-plus{color:#177A55;font-weight:700}
.bq-act form{gap:6px;flex-wrap:wrap}.bq-act select{max-width:260px}
.chip.bq-e-rapprochee{background:#E3F4EA;color:#14532D}.chip.bq-e-a_confirmer{background:#FFF1DC;color:#8A4A00}.chip.bq-e-facture_manquante{background:#FDE8E8;color:#9B1C1C}
.chip.bq-e-sans_facture{background:#EEF1F0;color:#4B5563}.chip.bq-e-ignoree{background:#F3F4F6;color:#9CA3AF}
form.card.bq-import{display:flex !important;flex-direction:row;align-items:center;padding:12px 16px;min-height:0;text-align:left}
form.card.bq-import > div{flex:1;min-width:240px}.bq-att{flex-basis:100%}
.bq-registre{gap:10px;align-items:center;margin:8px 0;flex-wrap:wrap}
.bq-vues{display:flex;gap:2px;margin:14px 0 4px;border-bottom:2px solid var(--line2)}
.bq-vues a{padding:8px 14px;font-weight:700;font-size:13.5px;text-decoration:none;color:var(--muted);border-bottom:3px solid transparent;margin-bottom:-2px}
.bq-vues a.on{color:#0F5B76;border-color:#0F5B76}
.bq-reg tr.bq-j-ok td{background:#F0FAF3}.bq-reg tr.bq-j-manquant td{background:#FFF3F3}.bq-reg tr.bq-j-preuve td{background:#FFFBEA}
.bq-reg tr.bq-j-montant td{background:#FDF0E8}.bq-reg tr.bq-j-incorrect td{background:#F4F0FA}.bq-reg tr.bq-j-rembourse td{background:#EEF5FC}
.chip.bq-j-ok{background:#C6EFCE}.chip.bq-j-manquant{background:#FFC7CE}.chip.bq-j-preuve{background:#FFEB9C}.chip.bq-j-montant{background:#F8CBAD}
.chip.bq-j-incorrect{background:#D9D2E9}.chip.bq-j-rembourse{background:#BDD7EE}.chip.bq-j-inutile{background:#EDEDED}
.bq-edit{position:relative}.bq-edit-f{position:absolute;right:0;z-index:20;background:var(--card,#fff);border:1px solid var(--line2);border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.12);padding:10px;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:380px}
.bq-edit-f label{display:flex;flex-direction:column;font-size:12px;gap:2px}.bq-edit-f .large{grid-column:1/-1}
/* ---- Banque : file de travail ---- */
.bq-tete{display:flex;gap:14px;align-items:flex-start;flex-wrap:wrap;margin-bottom:8px}.bq-tete h1{margin:4px 8px 0 0}
.bq-cartes{display:flex;gap:10px;flex-wrap:wrap;flex:1}
.bq-carte{display:flex;flex-direction:column;gap:1px;padding:10px 14px;border:1px solid var(--line2);border-radius:12px;background:var(--card,#fff);text-decoration:none;color:inherit;min-width:200px}
.bq-carte.on{border-color:#0F766E;box-shadow:0 0 0 2px #0F766E33}.bq-carte b{font-size:20px}.bq-c-nom{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase}
.bq-c-taf{margin-top:4px;font-size:12px;font-weight:700;color:#9B1C1C}.bq-c-ok{margin-top:4px;font-size:12px;color:#177A55;font-weight:700}
.bq-outils{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.bq-plus{position:relative}.bq-plus summary{list-style:none}
.bq-plus-m{position:absolute;right:0;top:calc(100% + 4px);z-index:30;background:var(--card,#fff);border:1px solid var(--line2);border-radius:10px;padding:10px;display:flex;flex-direction:column;gap:8px;min-width:250px;box-shadow:0 8px 24px rgba(0,0,0,.12)}
.bq-barre{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0;position:sticky;top:0;z-index:15;background:var(--fond,#F3F6F5);padding:6px 0}
.bq-seg{display:flex;border:1px solid var(--line2);border-radius:10px;overflow:hidden;background:var(--card,#fff)}
.bq-seg a{padding:6px 12px;font-size:13px;font-weight:600;text-decoration:none;color:inherit}.bq-seg a.on{background:#0F5B76;color:#fff}.bq-seg a b{margin-left:4px}
.bq-q{min-width:240px;flex:1;max-width:380px}.bq-tot{margin-left:auto}
.bq-lot{position:sticky;top:48px;z-index:14;display:flex;gap:6px;align-items:center;flex-wrap:wrap;background:#0F766E;color:#fff;padding:8px 12px;border-radius:10px;margin-bottom:8px}
.bq-lot .btn2{background:#fff}.bq-lot .lien{color:#fff}
.bq-liste{padding:0;overflow:visible}
.bq-l{display:grid;grid-template-columns:28px 64px minmax(260px,1fr) 120px minmax(170px,1.1fr) 190px 98px 28px;gap:8px;align-items:center;padding:7px 10px;border-top:1px solid var(--line2);font-size:13px;transition:opacity .4s,background .3s}
.bq-l-tete{border-top:0;font-size:11px;font-weight:700;text-transform:uppercase;color:var(--muted);background:var(--card,#fff);border-radius:12px 12px 0 0}
.bq-l small{display:block}.bq-op{min-width:0}.bq-lib{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.bq-op small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bq-l:hover{background:#F7FAF9}.bq-l.bq-fini{opacity:0;background:#E3F4EA}
.bq-moins{color:#B42318}.bq-plus-t{color:#177A55;font-weight:700}
.bq-cand{display:block;width:100%;text-align:left;font-size:12px;padding:3px 7px;margin:2px 0;border:1px solid #F3C98B;background:#FFF7E8;border-radius:7px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bq-cand:hover{background:#FFE9C7}
.bq-js{display:flex;gap:4px;align-items:center}.bq-js select,.bq-l select{font-size:12px;padding:3px 4px;max-width:150px}
.bq-up{cursor:pointer;width:24px;height:24px;border-radius:6px;border:1px dashed #0F766E;color:#0F766E;display:inline-flex;align-items:center;justify-content:center;font-weight:700;flex-shrink:0}
.bq-ok{outline:2px solid #22A55A}.bq-ko{outline:2px solid #DC2626}
.bq-det{position:relative}.bq-det summary{list-style:none;cursor:pointer;text-align:center;color:var(--muted);font-weight:700}
.bq-det-f{position:absolute;right:0;z-index:25;top:24px;width:420px;background:var(--card,#fff);border:1px solid var(--line2);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.12);padding:10px;display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.bq-det-f label{display:flex;flex-direction:column;font-size:12px;gap:2px}.bq-det-f .large{grid-column:1/-1}.bq-det-a{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.bq-vide{padding:30px;text-align:center;color:var(--muted);font-size:15px}
.bq-e-a_confirmer{box-shadow:inset 3px 0 0 #E8893A}.bq-l.bq-e-facture_manquante{box-shadow:inset 3px 0 0 #DC2626}
@media (max-width:1100px){.bq-l{grid-template-columns:24px 54px 1fr 100px;}.bq-l>span:nth-child(5),.bq-l>span:nth-child(6),.bq-l>span:nth-child(7){grid-column:3/-1}.bq-l-tete span:nth-child(n+5){display:none}}
.bq-l{grid-template-columns:28px 64px minmax(260px,1fr) 120px minmax(170px,1.1fr) 222px 98px 28px}.bq-js select{max-width:180px}
/* rien ne déborde : chaque colonne coupe son contenu */
.bq-l>span,.bq-l>details{min-width:0}.bq-l>span{overflow:hidden}.bq-rap{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.bq-rap a,.bq-rap .foot{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.bq-liste{max-width:100%;overflow-x:clip}.bq-barre{max-width:100%}.bq-tot{white-space:nowrap}
.bq-det-f{right:0;left:auto;max-width:calc(100vw - 40px)}
.bq-rap{flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:6px}.bq-rap .bq-cand{flex-basis:100%}
.bq-choisir{font-size:12px;padding:3px 8px;border:1px dashed #0F766E;background:#fff;color:#0F766E;border-radius:7px;cursor:pointer;font-weight:700}
.bq-dlg{border:0;border-radius:14px;padding:0;width:min(720px,94vw);box-shadow:0 20px 60px rgba(0,0,0,.25)}.bq-dlg::backdrop{background:rgba(15,23,20,.45)}
.bq-dlg-f{display:flex;flex-direction:column;gap:10px;padding:16px;max-height:84vh}
.bq-dlg-t{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}.bq-dlg-t b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bq-dlg-l{overflow-y:auto;border:1px solid var(--line2);border-radius:10px;min-height:120px}
.bq-dlg-i{display:grid;grid-template-columns:22px 1fr 90px 120px;gap:8px;align-items:center;padding:8px 10px;border-top:1px solid var(--line2);cursor:pointer;font-size:13px}
.bq-dlg-i:first-child{border-top:0}.bq-dlg-i:hover{background:#F3F8F6}.bq-dlg-n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bq-dlg-i b{text-align:right}
.bq-dlg-b{display:flex;gap:10px;align-items:center;justify-content:space-between}.bq-ok-t{color:#177A55;font-weight:700}.bq-ko-t{color:#B45309;font-weight:700}
/* l'en-tête (et ses menus déroulants) passe au-dessus de tout le contenu des pages, bandeaux collants compris */
header.top{z-index:60}
/* Banque : le bandeau des filtres se colle juste sous l'en-tête, la barre de sélection juste sous lui */
.bq-barre{top:67px;z-index:12}
.bq-lot{top:119px;z-index:11}
@media (max-width:900px){.bq-barre{position:static}.bq-lot{top:8px}}
.bq-err{color:#B42318;font-weight:600}.chip.bq-j-a_ranger,.bq-reg tr.bq-j-a_ranger td{background:#E6F0FB}
.bq-pc{display:inline-block;min-width:42px;text-align:center;font-size:11px;font-weight:800;border-radius:999px;padding:1px 6px}
.bq-pc3{background:#C6EFCE;color:#14532D}.bq-pc2{background:#FFEB9C;color:#7A5A00}.bq-pc1{background:#F3F4F6;color:#6B7280}
.bq-dlg-i{grid-template-columns:22px 48px 1fr 90px 120px}
.bq-dlg-rg{display:flex;gap:8px;align-items:center;background:#EEF5FC;border:1px solid #BDD7EE;border-radius:10px;padding:8px 10px;font-size:13px;cursor:pointer}
.fr-retard{border-left:4px solid #DC2626;margin-bottom:14px}.fr-retard summary{cursor:pointer}.fr-retard td.neg{color:#B42318}
/* Ma journée : « n sujets en attente » mène au bloc « Ce qui t'attend » et l'éclaire un instant */
.acc-attente-lien{color:inherit;text-decoration:none;border-bottom:1px dashed currentColor;cursor:pointer}.acc-attente-lien:hover{opacity:.85}
#attente{scroll-margin-top:80px}
#attente.eclaire .acc-tuiles,#attente.eclaire .acc-vide{animation:eclaire 1.6s ease}
@keyframes eclaire{0%,40%{box-shadow:0 0 0 4px #F59E0B;border-radius:12px}100%{box-shadow:0 0 0 0 transparent}}
.pl-al-perso{display:inline-block;margin:0 0 3px;font-size:11px;cursor:help}
.bq-c-pb{margin-top:4px;font-size:11.5px;font-weight:700;color:#8A4A00;background:#FFF1DC;border-radius:6px;padding:2px 6px;max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bq-recur{color:#0F766E;font-weight:700}
/* ---- Trésorerie ---- */
.tr-barre{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:12px 0}
.tr-grille{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}
@media (max-width:1000px){.tr-grille{grid-template-columns:1fr}}
.tr .pos{color:#177A55}.tr .neg{color:#B42318}.tr-bas td{background:#FFF3F3}
.tr-nat{border-top:1px solid var(--line2);padding:8px 0}.tr-nat summary{display:flex;justify-content:space-between;gap:10px;cursor:pointer;list-style:none}
.tr-nat summary::-webkit-details-marker{display:none}.tr-retard{border-left:4px solid #DC2626}
/* Banque : le ＋ n'est jamais rogné ; la fenêtre du ⋯ s'affiche en entier (positionnée par rapport à l'écran) */
.bq-l>span.bq-js{overflow:visible;min-width:0}
.bq-js select{flex:1 1 auto;min-width:0;max-width:150px}
.bq-up{flex:0 0 24px}
.bq-liste{overflow:visible}
.bq-l>details.bq-det{overflow:visible}
.bq-det-f{position:fixed;right:auto;top:auto;z-index:70;max-height:calc(100vh - 24px);overflow-y:auto}
.bq-det-f{grid-template-columns:repeat(3,minmax(0,1fr))}.bq-det-f input,.bq-det-f select{width:100%;min-width:0;box-sizing:border-box}
.bq-det-f .bq-det-a .foot{overflow-wrap:anywhere}
.tr-fx-tete{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.tr-fx-l{display:grid;grid-template-columns:minmax(160px,2fr) minmax(150px,1.3fr) 110px 56px minmax(200px,1.4fr) auto;gap:6px;align-items:center}
.tr-fx-l input,.tr-fx-l select{width:100%;min-width:0;box-sizing:border-box}.tr-fx td{padding:4px 8px}
.tr-fx-off{opacity:.5}.tr-fx-nouv{background:#F7FAF9;border-radius:8px;padding:4px}
@media (max-width:900px){.tr-fx-l{grid-template-columns:1fr 1fr}}
.res-charges-deplacees{display:flex;flex-direction:column;gap:4px;border-left:4px solid #0F766E}
.res-titre{margin:26px 0 10px;padding-top:14px;border-top:2px solid var(--line2)}
.tr-mini{display:block;text-decoration:none;color:inherit;margin-bottom:14px}.tr-mini:hover{box-shadow:0 0 0 2px #0F766E33}
.tr-mo{background:#F3F8F6;border-radius:10px;padding:10px 12px;margin:8px 0;display:flex;flex-direction:column;gap:6px}
.tr-mo-l{display:flex;gap:18px;flex-wrap:wrap}.tr-mo-l>span{display:flex;gap:4px;align-items:baseline}
.obj-annee{display:flex;gap:14px;align-items:center;flex-wrap:wrap;border-left:4px solid #E8893A}.obj-annee input{width:130px}
input.cellule[readonly]{background:transparent;border-color:transparent;cursor:default;color:inherit}
/* logo d'une autre société sur pastille blanche (lisible quelles que soient ses couleurs) ; menu des sociétés du groupe */
.brand img.logo-pastille{background:#fff;border-radius:10px;padding:3px;box-sizing:border-box}
.brand-zone{position:relative}.brand-fleche{font-size:11px;opacity:.8}
.menu-societes{position:absolute;top:56px;left:0;z-index:80;min-width:250px;background:#fff;color:#1A272B;border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.22);padding:8px}
.menu-societes .ms-titre{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#6B7A73;padding:4px 8px 8px}
.menu-societes a{display:flex;align-items:center;gap:10px;padding:8px;border-radius:8px;color:inherit;text-decoration:none;font-weight:600}
.menu-societes a:hover{background:#F1F5F3}.menu-societes a.on{background:var(--vert-pale)}
.menu-societes a img{width:34px;height:34px;object-fit:contain;background:#fff;border-radius:8px;border:1px solid #E5EAE7}
.menu-societes a i{margin-left:auto;font-style:normal;color:var(--vert-fonce)}
.menu-societes .ms-journee{font-weight:500;font-size:13px;color:#6B7A73;border-top:1px solid #E5EAE7;border-radius:0;margin-top:4px}
.imp-m{display:inline-block;margin:1px 4px 1px 0;padding:0 6px;border-radius:6px;white-space:nowrap}.imp-regle{background:#DFF5E7;color:#0B6B34}.imp-facture{background:#DDF0FB;color:#075985}.imp-prevu{background:#F1F3F2;color:#555}
.rc-g summary{display:flex;justify-content:space-between;gap:12px;cursor:pointer;flex-wrap:wrap}.rc-deja{color:#8A4A00;font-weight:700}
.rc-f{display:flex;flex-direction:column;gap:8px;margin-top:10px}.rc-f label{display:flex;gap:8px;align-items:center}.rc-f label input{flex:1}
.rc-corps{border:1px solid var(--line2);border-radius:8px;padding:10px 12px;background:#fff;font-size:13.5px;max-height:420px;overflow:auto}
.bq-rec{font-size:11px;color:#8A4A00;font-weight:700}
.rc-note{background:#FFF7E8;border-radius:8px;padding:8px 10px;margin:8px 0}
.bq-l.bq-a-valider{background:#FFF8E6;box-shadow:inset 3px 0 0 #E8893A}.bq-valider{margin-left:6px;padding:3px 10px}
.bq-valider{white-space:nowrap;font-size:12px;padding:3px 8px;flex:0 0 auto}
.bq-lus{display:flex;flex-direction:column;gap:3px;font-size:12.5px;background:#F7FAF9;border-radius:8px;padding:8px 10px}
.bq-lus a{color:inherit}.bq-lus-ok{color:#0B6B34;margin-top:3px}.bq-lus-ko{color:#B42318;margin-top:3px}
.bq-lies{display:flex;flex-direction:column;gap:2px;font-size:12px;margin-bottom:3px}.bq-lies a{color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bq-lies .lien{align-self:flex-start;font-size:12px}
.bq-avoir{background:#FDE8E8;color:#B42318}
.rf-sel{width:28px;text-align:center}.rf-t tr.rf-choisie td{background:#EAF4FF}
.rf-somme{position:sticky;bottom:12px;z-index:30;display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px auto 0;width:max-content;max-width:100%;
  background:#fff;border:1px solid var(--line2);border-radius:12px;padding:10px 16px;box-shadow:0 8px 24px rgba(0,0,0,.14);font-size:14px}
.st-docs td,.st-docs th{font-size:12.5px}.st-docs th{white-space:normal;max-width:120px}.st-docs small{display:block;font-size:10.5px;color:var(--muted)}
.st-doc-ok a{color:#0B6B34}.st-doc-bientot a{color:#8A4A00}.st-doc-expire a,.st-doc-expire span{color:#B42318;font-weight:700}.st-doc-absent span{color:#B42318}
.st-docs tr.st-docs-ko td:first-child{box-shadow:inset 3px 0 0 #E5484D}.st-docs-manq{color:#B42318}
.st-docs-f{display:flex;flex-direction:column;gap:6px;min-width:240px;position:absolute;right:20px;z-index:20;box-shadow:0 8px 24px rgba(0,0,0,.15)}
.st-docs-dep{position:relative}
.st-docs th{word-break:normal;overflow-wrap:anywhere;font-size:11px}.st-docs-dep summary{white-space:nowrap}
.st-docs-dem{font-size:10.5px;color:#8A4A00}
/* ---------- téléphone (≤ 820 px) : filtres repliés, chiffres sur une ligne, listes en fiches ---------- */
@media (max-width:820px){
  .mob-filtres{display:inline-flex;align-items:center;gap:6px;margin:8px 0;min-height:40px}
  .mob-filtres.on{background:var(--vert-pale)}.mob-n{background:var(--vert);color:#fff;border-radius:10px;padding:0 7px;font-size:12px}
  form.filtres.mob-replie{display:none!important}form.filtres.mob-replie.mob-ouvert{display:grid!important}
  .kpis,.kpis-suivi{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:8px!important;scroll-snap-type:x mandatory;padding-bottom:4px;-webkit-overflow-scrolling:touch}
  .kpis>.card,.kpis-suivi>.card{flex:0 0 46%;min-width:150px;scroll-snap-align:start;padding:10px 12px!important}
  .kpis .v{font-size:20px!important}.kpis .lbl{font-size:10.5px!important}.kpis .s{font-size:11px!important}
  .table-wrap.wrap-fiches{overflow:visible!important;background:transparent!important;box-shadow:none!important;border:0!important;padding:0!important}
  table.fiches,table.fiches tbody,table.fiches tr,table.fiches td{display:block;width:100%}
  table.fiches thead{display:none}
  table.fiches tr{background:#fff;border:1px solid var(--line2);border-radius:12px;padding:8px 12px;margin:0 0 10px;box-shadow:0 1px 3px rgba(0,0,0,.05)}
  table.fiches td{position:relative;border:0!important;padding:5px 0 5px 36%!important;text-align:left!important;white-space:normal!important;
    min-height:24px;overflow-wrap:anywhere}
  table.fiches td>*{max-width:100%}
  table.fiches td::before{content:attr(data-label);position:absolute;left:0;top:6px;width:33%;font-size:11.5px;font-weight:600;color:var(--muted);
    text-transform:none;white-space:normal;line-height:1.25}
  table.fiches td[data-label=""]{padding-left:0!important}table.fiches td[data-label=""]::before{display:none}
  table.fiches td:first-child{font-weight:700;font-size:15px}table.fiches td:empty{display:none}
  table.fiches tfoot tr{background:var(--vert-pale)}
  .table-wrap table:not(.fiches) tr>*:first-child{position:sticky;left:0;z-index:2;background:#fff}
  main .lien,main .btn.petit,main .btn2.petit,main summary.lien{min-height:36px;display:inline-flex;align-items:center}
  main select,main input:not([type=checkbox]):not([type=radio]):not([type=hidden]){min-height:40px;font-size:16px}
  .repliable-mobile.mob-plie>*:not(h2){display:none!important}
  .mob-titre-plie{cursor:pointer}.mob-titre-plie::after{content:" ▾";color:var(--muted)}.repliable-mobile:not(.mob-plie) .mob-titre-plie::after{content:" ▴"}
  .g-zone{height:200px!important}
}
/* bons de livraison */
.bl-st-brouillon{background:#EEF1F0;color:#555}.bl-st-a_signer{background:#FFF1DB;color:#8A4A00}.bl-st-signe{background:#DFF5E7;color:#0B6B34}.bl-st-annule{background:#F6E1E1;color:#8B1A1A}
.bl-grille{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.bl-grille .large{grid-column:1/-1}.bl-form label{display:flex;flex-direction:column;gap:3px}
.bl-lignes input{width:100%}.bl-lignes .bl-q{max-width:90px}.bl-lignes .bl-u{max-width:70px}.bl-signe{border-left:4px solid #00B050}.bl-sig{max-height:110px;display:block;margin-top:8px;border:1px solid var(--line2);border-radius:8px;background:#fff}
.bl-sign{max-width:620px}.bl-items{list-style:none;padding:0;margin:10px 0}.bl-items li{display:flex;gap:10px;padding:7px 0;border-bottom:1px solid var(--line2)}
.bl-qte{flex:0 0 70px;font-weight:700}.bl-sign-f{display:flex;flex-direction:column;gap:10px}.bl-sign-f label{display:flex;flex-direction:column;gap:3px}
.bl-recu{flex-direction:row!important;align-items:center;gap:8px!important;font-weight:600}.bl-recu input{width:22px;height:22px}
.bl-zone{position:relative;border:2px dashed var(--line2);border-radius:12px;background:#fff;height:220px;touch-action:none}
.bl-zone canvas{width:100%;height:100%;display:block;border-radius:12px;touch-action:none}.bl-zone-aide{position:absolute;inset:auto 0 12px 0;text-align:center;color:var(--muted);pointer-events:none}
.bl-choix{display:block;color:inherit;text-decoration:none}.bl-fini{text-align:center}
@media (max-width:820px){.bl-grille{grid-template-columns:1fr}}
.bl-ico{width:34px;text-align:center}.bl-ico a{font-size:19px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px}
.bl-ico a:hover{background:var(--vert-pale)}.bl-ico-t{width:34px}
.bl-st-ebp{background:#EAF0FB;color:#2A4A7F}
/* tri des tableaux */
th.triable{cursor:pointer;user-select:none;white-space:nowrap}th.triable:hover{color:var(--vert-fonce)}
th.triable::after{content:" ↕";opacity:.3;font-size:.9em}th.triable[data-sens=asc]::after{content:" ▲";opacity:.9}th.triable[data-sens=desc]::after{content:" ▼";opacity:.9}
/* couleurs d'EBP : ouvrage vert, fourniture rouge, main d'œuvre violet */
.bi-t-O{background:#DFF5E7;color:#0B6B34}.bi-t-F{background:#FDE3E3;color:#B42318}.bi-t-MO{background:#EDE4F7;color:#5B2A86}.bi-detail{border-left:4px solid #1E9E57}
/* éditeur de devis : couleurs d'EBP (ouvrage vert, fourniture rouge, main d'œuvre violet) */
.rd{max-width:1500px}.rd-entete{display:flex;flex-direction:row!important;flex-wrap:wrap;gap:10px 14px;align-items:flex-end!important}.rd-entete label{display:flex;flex-direction:column;gap:2px;font-size:12px}
.rd-entete .rd-large{flex:1 1 260px}.rd-entete textarea{min-height:38px}
.rd-corps{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:14px;align-items:start}
.rd-grille{padding:0;overflow:visible}.rd-grille table{width:100%}.rd-grille td{vertical-align:top;padding:3px 4px}
.rd-l td:first-child{width:24px}.rd-l input,.rd-l textarea,.rd-l select{width:100%;border:1px solid transparent;background:transparent;font:inherit;padding:3px 4px;border-radius:5px}
.rd-l input:focus,.rd-l textarea:focus,.rd-l input:hover,.rd-l textarea:hover{border-color:var(--line2);background:#fff}
.rd-l textarea{font-size:11.5px;resize:vertical;color:#333}
.rd-code{width:110px!important;font-size:12px}.rd-n{text-align:right;width:82px!important}.rd-u{width:52px!important}.rd-tva{width:52px!important;text-align:right}
.rd-titre-o{font-weight:700;text-decoration:underline;text-transform:uppercase}
.rd-l>td:nth-child(2){box-shadow:inset 3px 0 0 transparent}
.rd-t-O>td:nth-child(2){box-shadow:inset 3px 0 0 #1E9E57}.rd-t-F>td:nth-child(2){box-shadow:inset 3px 0 0 #D92D20}.rd-t-MO>td:nth-child(2){box-shadow:inset 3px 0 0 #7B3FBF}
.rd-t-O .rd-code{color:#0B6B34;font-weight:700}.rd-t-F .rd-code{color:#B42318}.rd-t-MO .rd-code{color:#5B2A86}
.rd-enf td{background:#FAFAFA}.rd-enf .rd-code{padding-left:14px}.rd-enf input{font-size:12px;color:#555}
.rd-mv button{display:block;border:0;background:none;color:var(--muted);cursor:pointer;font-size:9px;line-height:10px;padding:1px}
.rd-mt{padding-top:7px!important}.rd-opt{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:3px}.rd-opt select{width:auto}
.rd-cible-l td{background:#EEF8F2}.rd-ajout{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:10px;border-top:1px solid var(--line2)}
.rd-cible{flex-basis:100%;font-size:12.5px;background:#EEF8F2;border-radius:8px;padding:5px 10px}
.rd-cherche{position:relative;flex:1 1 380px}.rd-cherche input{width:100%}
.rd-res{position:absolute;left:0;right:0;bottom:calc(100% + 4px);background:#fff;border:1px solid var(--line2);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.15);max-height:340px;overflow:auto;z-index:30;padding:4px}
.rd-res button{display:block;width:100%;text-align:left;border:0;background:none;padding:6px 8px;border-radius:6px;cursor:pointer;font:inherit;font-size:12.5px}
.rd-res button:hover{background:var(--vert-pale)}.rd-res .rd-t-O b{color:#0B6B34}.rd-res .rd-t-F b{color:#B42318}.rd-res .rd-t-MO b{color:#5B2A86}
.rd-panneau{position:sticky;top:80px}.rd-t{display:flex;justify-content:space-between;gap:8px;padding:3px 0;font-size:13.5px}
@media (max-width:980px){.rd-corps{grid-template-columns:1fr}.rd-panneau{position:static}}
/* plusieurs chargés d'affaire */
.co-resp{font-size:11.5px}.rp summary{cursor:pointer;list-style:none}.rp summary::-webkit-details-marker{display:none}
.rp-pers{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0}.rp-p{border:1px solid var(--line2);border-radius:10px;padding:8px 12px;min-width:220px;font-size:13px}
.rp-p.rp-ko{border-color:#E5484D;box-shadow:inset 3px 0 0 #E5484D}.rp-vide td{color:var(--muted)}.rp-t select{min-width:150px}
.rc-grille{display:flex;gap:10px 18px;flex-wrap:wrap}.rc-grille label{display:flex;flex-direction:column;gap:2px;font-size:12.5px}.rc-grille input{width:120px;text-align:right}
.rd-t-S>td{background:#F1F4F2}.rd-t-S .rd-titre{font-weight:700;text-transform:uppercase}.rd-t-ST>td{background:#F7F7F7;font-weight:700}
.rd-actions{display:flex;gap:6px;flex-wrap:wrap}
.fa-st-brouillon{background:#EEF1F0;color:#555}.fa-st-emise{background:#DFF5E7;color:#0B6B34}
.fa-compta-err{background:#FDE8E8;color:#A11B1B;text-decoration:none}
.fa-choix{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}@media (max-width:820px){.fa-choix{grid-template-columns:1fr}}

/* planning : le texte de l'agenda en titre, l'affaire rattachée en dessous */
.cr-pl .aff,.ag-ev .ag-aff,.pl-tel-cr .s.aff,.aff-sous{display:block;font-size:10.5px;font-weight:500;color:#2F6CA8;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ag-ev.jrn .ag-aff{display:inline;margin-left:4px}
.pl-tel-cr .s.aff{font-size:12px}.aff-sous{font-size:12px;margin-top:1px}

/* Ajout express d'une tâche To Do : bouton ＋ (téléphone) et feuille qui monte du bas */
.tache-fab{display:none;position:fixed;right:16px;bottom:calc(18px + env(safe-area-inset-bottom, 0px));z-index:90;width:56px;height:56px;border-radius:50%;border:0;
  background:#177A55;color:#fff;font-size:30px;line-height:1;box-shadow:0 6px 18px rgba(14,59,44,.35);cursor:pointer;-webkit-tap-highlight-color:transparent}
.tache-fab:active{transform:scale(.94)}
@media (max-width:900px), (hover:none){.tache-fab{display:block}.tache-fab[hidden]{display:none}}
body.saisie-active .tache-fab, body.tache-ouverte .tache-fab{display:none}
.tache-voile{position:fixed;inset:0;z-index:300;background:rgba(10,30,22,.35)}
.tache-feuille{position:fixed;left:0;right:0;bottom:0;z-index:301;background:var(--card,#fff);border-radius:18px 18px 0 0;box-shadow:0 -10px 30px rgba(0,0,0,.18);
  padding:8px 14px calc(14px + env(safe-area-inset-bottom, 0px));display:flex;flex-direction:column;gap:10px;max-width:640px;margin:0 auto;animation:tf-monte .16s ease-out}
@keyframes tf-monte{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
.tf-poignee{width:40px;height:4px;border-radius:2px;background:#CBD5D0;margin:0 auto 2px}
#tf-titre{font-size:17px;padding:12px;border-radius:10px;width:100%;box-sizing:border-box}
.tf-puces{display:flex;gap:6px;flex-wrap:wrap}
.tf-p{border:1px solid #CBD9D2;background:transparent;color:inherit;border-radius:18px;padding:7px 10px;font-size:13.5px;cursor:pointer;position:relative;display:inline-flex;align-items:center}
.tf-p.on{background:#177A55;border-color:#177A55;color:#fff}
.tf-imp{color:#E6A700}.tf-imp.on{background:#E6A700;border-color:#E6A700;color:#fff}
.tf-date input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}
.tf-bas{display:flex;gap:8px;align-items:center}
.tf-bas select{flex:1;min-width:0;font-size:14px;padding:9px 8px}
.tf-ok{padding:10px 18px;font-size:15px}
.tache-toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(86px + env(safe-area-inset-bottom, 0px));z-index:302;background:#12352A;color:#fff;
  padding:10px 16px;border-radius:10px;font-size:14px;display:flex;gap:12px;align-items:center;max-width:calc(100vw - 32px);box-shadow:0 6px 18px rgba(0,0,0,.25)}
.tache-toast.err{background:#B3261E}
.tache-toast button{background:#fff;color:#B3261E;border:0;border-radius:6px;padding:5px 10px;font-weight:700;cursor:pointer}
.tf-ligne{display:flex;gap:8px;align-items:center}
.tf-ligne #tf-titre{flex:1;min-width:0}
.tf-micro{flex:none;width:48px;height:48px;border-radius:50%;border:1px solid #CBD9D2;background:transparent;font-size:22px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.tf-micro.ecoute{background:#B3261E;border-color:#B3261E;animation:tf-pouls 1s ease-in-out infinite}
@keyframes tf-pouls{50%{box-shadow:0 0 0 8px rgba(179,38,30,.18)}}
.tf-dictee{font-size:13px;color:var(--muted);margin-top:-4px}
.st-dv-redaction {--c:#9AA39E; --f:#F3F4F3; --t:#4A524E}
