/* Outil de gestion TOTAL IMPROVEMENT AND ADVISORS — thème sombre premium (chantier 6)
   Vert foncé TIA en fond, orange comme unique accent ; vert / rose / jaune réservés aux statuts. */
:root {
  color-scheme: dark;
  /* surfaces */
  --fond: #0B1511; --nav: #08100C; --carte: #111D17; --surface: #16251D; --surface-2: #1B2D23; --survol: #1F3328;
  --trait: #22352B; --trait-doux: #1A2B22; --champ: #0D1813; --champ-trait: #2B4135;
  /* textes */
  --encre: #E9F0EB; --gris: #8EA396; --discret: #63786B;
  /* accent et statuts */
  --orange: #EE7633; --orange-fonce: #D9601F; --orange-texte: #F49A62; --orange-pale: rgba(238,118,51,.13);
  --vert: #43C083; --vert-fonce: #1E7A4E; --vert-pale: rgba(67,192,131,.12);
  --rose: #E4587B; --rose-texte: #F2849E; --rose-pale: rgba(228,88,123,.13);
  --jaune: #F2CF3B; --jaune-texte: #EBCB55; --jaune-pale: rgba(242,207,59,.11);
  --bleu: #78ACDC; --bleu-pale: rgba(120,172,220,.12);
  --rouge-texte: #F28A5E; --orange-clair: #F5A06E;
  --ombre: 0 1px 0 rgba(255,255,255,.025) inset, 0 10px 30px rgba(0,0,0,.28);
  --rayon: 20px;
}
/* palette claire : impression et pages imprimables */
.theme-clair {
  color-scheme: light;
  --fond: #FFFFFF; --nav: #0F2A1E; --carte: #FFFFFF; --surface: #F6F5F0; --surface-2: #F1EEE6; --survol: #FAF9F5;
  --trait: #E3E0D6; --trait-doux: #EFECE4; --champ: #FFFFFF; --champ-trait: #DAD6CA;
  --encre: #10231A; --gris: #5B6B61; --discret: #9AA39D;
  --orange: #E8692A; --orange-fonce: #C9561C; --orange-texte: #B9501A; --orange-pale: #FDF1E8;
  --vert: #17804A; --vert-fonce: #0F5E36; --vert-pale: #E8F5EC;
  --rose: #D63A5E; --rose-texte: #B42347; --rose-pale: #FCEEF1;
  --jaune: #F2CF3B; --jaune-texte: #8A6A00; --jaune-pale: #FBF6DE;
  --bleu: #2A6A9C; --bleu-pale: #E6F0F8; --rouge-texte: #C2410C; --orange-clair: #F39A5E;
  --ombre: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--encre); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  background: radial-gradient(1100px 520px at 88% -8%, rgba(46,150,98,.10), transparent 62%), radial-gradient(800px 420px at 30% 110%, rgba(238,118,51,.045), transparent 60%), var(--fond); background-attachment: fixed; }
body.theme-clair { background: var(--fond); }
::selection { background: rgba(238,118,51,.35); color: #fff; }
a { color: var(--vert); text-decoration: none; transition: color .15s; }
a:hover { color: #6FD9A3; }
h1, h2, h3 { margin: 0; letter-spacing: -0.3px; color: var(--encre); }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.6px; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
small, .gris { color: var(--gris); }
hr { border: 0; border-top: 1px solid var(--trait); }
* { scrollbar-width: thin; scrollbar-color: #2B4135 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #24382D; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* champs : valeurs par défaut sombres pour tous les champs, y compris ceux stylés en ligne */
input, select, textarea, button { font-family: inherit; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]), select, textarea { background-color: var(--champ); color: var(--encre); border-color: var(--champ-trait); }
input::placeholder, textarea::placeholder { color: var(--discret); }
select option { background: var(--carte); color: var(--encre); }
input[type=checkbox], input[type=radio] { accent-color: var(--orange); }
input[type=file] { color: var(--gris); }
input[type=file]::file-selector-button { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--encre); background: var(--surface-2); border: 1px solid var(--champ-trait); border-radius: 8px; padding: 6px 12px; margin-right: 10px; cursor: pointer; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid rgba(238,118,51,.55); outline-offset: 1px; border-color: var(--orange); }
:focus-visible { outline-color: var(--orange); }

/* ---------------------------------------------------------------- mise en page */
.app { min-height: 100vh; display: flex; }
.nav { width: 264px; flex-shrink: 0; background: linear-gradient(180deg, #0A1510 0%, var(--nav) 100%); border-right: 1px solid #16241C; color: #E9EFEA; padding: 26px 16px 20px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.marque { display: flex; align-items: center; gap: 12px; color: #fff; padding: 0 6px; }
.marque b { display: block; font-size: 13.5px; letter-spacing: .6px; color: #fff; font-weight: 800; line-height: 1.25; }
.marque small { display: block; font-size: 10.5px; color: var(--discret); letter-spacing: 2px; margin-top: 3px; font-weight: 600; }
.marque:hover { color: #fff; }
.marque b em { display: block; font-style: normal; font-size: 10.5px; letter-spacing: 2.4px; font-weight: 700; margin-top: 2px; color: var(--orange-texte); }
.nav-liens { display: flex; flex-direction: column; gap: 2px; }
.nav-liens a, .menu-contenu a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: #A8BAAE; font-weight: 500; font-size: 14px; min-height: 40px; transition: background .15s, color .15s; }
.nav-liens a i, .menu-contenu a i { width: 7px; height: 7px; border-radius: 4px; border: 1.5px solid #4C6556; flex-shrink: 0; transition: all .15s; }
.nav-liens a.sous, .menu-contenu a.sous { padding-left: 32px; font-size: 13px; min-height: 34px; color: #8FA396; }
.nav-liens a:hover, .menu-contenu a:hover { background: rgba(255,255,255,.035); color: #fff; }
.nav-liens a.actif, .menu-contenu a.actif { background: linear-gradient(90deg, rgba(238,118,51,.14), rgba(238,118,51,.03)); color: #fff; font-weight: 600; }
.nav-liens a.actif::before, .menu-contenu a.actif::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange); }
.nav-liens a.actif i, .menu-contenu a.actif i { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 3px rgba(238,118,51,.18); }
.pastille { margin-left: auto; font-style: normal; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; min-width: 22px; height: 20px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; }
.titre-nav { font-size: 10.5px; letter-spacing: 2px; color: var(--discret); font-weight: 700; padding: 20px 12px 6px; }
.bientot { font-size: 12px; color: var(--discret); padding: 10px 12px; line-height: 1.5; }
.nav-bas { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.theme-bouton { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: transparent; color: #A8BAAE; font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.theme-bouton:hover { background: rgba(255,255,255,.05); color: #fff; }
.theme-bouton [data-theme-icone] { width: 18px; color: var(--orange-clair); text-align: center; font-size: 16px; }
.moi { display: flex; align-items: center; gap: 11px; color: #fff; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); }
.moi:hover { background: rgba(255,255,255,.05); color: #fff; }
.moi b { display: block; font-size: 13.5px; font-weight: 600; } .moi small { color: var(--gris); font-size: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg, var(--orange), #C24E16); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; flex-shrink: 0; }
.sortir { color: var(--gris); font-size: 13px; padding: 2px 10px; }
.sortir:hover { color: var(--orange-texte); }
.devise { font-size: 11.5px; color: var(--discret); font-style: italic; padding: 12px 10px 0; border-top: 1px solid rgba(255,255,255,.06); line-height: 1.5; }
.menu-mobile { display: none; }
.contenu { flex: 1; min-width: 0; padding: 36px 44px 72px; display: flex; flex-direction: column; gap: 26px; max-width: 1440px; }

/* ---------------------------------------------------------------- éléments */
.entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 4px; }
.entete .sur { font-size: 12px; color: var(--orange-texte); font-weight: 600; display: block; margin-bottom: 6px; letter-spacing: .4px; }
.entete .sur a { color: var(--orange-texte); } .entete .sur a:hover { color: var(--orange-clair); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; background: var(--surface-2); border-color: var(--champ-trait); color: var(--encre); white-space: nowrap; transition: filter .15s, background .15s, border-color .15s, transform .1s; }
.btn:hover { color: #fff; background: var(--survol); border-color: #36503F; }
.btn:active { transform: translateY(1px); }
.btn.orange { background: linear-gradient(180deg, #F2843F, var(--orange-fonce)); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(238,118,51,.22); }
.btn.vert { background: linear-gradient(180deg, #2A9A63, var(--vert-fonce)); border-color: transparent; color: #fff; }
.btn.rose { background: linear-gradient(180deg, #E4587B, #C23A5E); border-color: transparent; color: #fff; }
.btn.orange:hover, .btn.vert:hover, .btn.rose:hover { filter: brightness(1.08); color: #fff; }
.btn.clair { background: transparent; color: var(--encre); border: 1px solid var(--champ-trait); }
.btn.clair:hover { color: #fff; background: rgba(255,255,255,.04); border-color: #3A5546; }
.btn.petit { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 24px 26px; display: flex; flex-direction: column; gap: 16px; min-width: 0; box-shadow: var(--ombre); }
.carte.sombre { background: radial-gradient(420px 220px at 100% 0%, rgba(238,118,51,.16), transparent 65%), linear-gradient(150deg, #1D6544 0%, #134630 52%, #0E3424 100%); border-color: rgba(120,220,170,.16); color: #fff; box-shadow: 0 14px 36px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08); }
.carte.sombre small, .carte.sombre .gris { color: #B4D3C1; }
.titre-carte { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.titre-carte a { font-size: 13px; font-weight: 600; color: var(--orange-texte); }
.titre-carte a:hover { color: var(--orange-clair); }
.grille { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ligne { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.ligne > .large { flex: 2 1 520px; } .ligne > .etroit { flex: 1 1 300px; }
.kpi { display: flex; flex-direction: column; gap: 8px; }
.kpi .val { font-size: 28px; font-weight: 700; letter-spacing: -.6px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .lib { font-size: 12.5px; color: var(--gris); font-weight: 500; letter-spacing: .2px; }
.carte.sombre .kpi .lib, .carte.sombre .lib { color: #B4D3C1; }
.vert-t { color: var(--vert); } .rouge-t { color: var(--rouge-texte); } .orange-t { color: var(--orange-texte); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; letter-spacing: .1px; }
.tag.validee, .tag.ok, .tag.valide { color: var(--vert); background: var(--vert-pale); }
.tag.a_valider, .tag.en_attente, .tag.brouillon { color: var(--orange-texte); background: var(--orange-pale); }
.tag.rejetee, .tag.annulee, .tag.annule, .tag.manque_visiteur, .tag.manque_personne { color: var(--rose-texte); background: var(--rose-pale); }
.tag.renvoyee { color: var(--jaune-texte); background: var(--jaune-pale); }
.tag.neutre { color: var(--gris); background: var(--surface-2); }
.pastille-div { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.flashs { display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 13px 16px 13px 18px; border-radius: 12px; font-weight: 500; font-size: 14px; border: 1px solid transparent; border-left-width: 3px; }
.flash.ok { background: var(--vert-pale); color: #9BE3BE; border-color: rgba(67,192,131,.25); border-left-color: var(--vert); }
.flash.erreur { background: var(--rose-pale); color: var(--rose-texte); border-color: rgba(228,88,123,.25); border-left-color: var(--rose); }
.flash.info { background: var(--jaune-pale); color: var(--jaune-texte); border-color: rgba(242,207,59,.22); border-left-color: var(--jaune); }
.vide { padding: 26px; text-align: center; color: var(--gris); background: var(--surface); border: 1px dashed var(--trait); border-radius: 14px; }

/* tableaux */
.tableau-boite { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; color: var(--discret); font-weight: 600; font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; padding: 10px 10px 12px; border-bottom: 1px solid var(--trait); white-space: nowrap; }
table.t td { padding: 13px 10px; border-bottom: 1px solid var(--trait-doux); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background .12s; }
table.t tbody tr:hover td { background: rgba(255,255,255,.018); }
table.t .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.t tr.clic { cursor: pointer; } table.t tr.clic:hover td { background: var(--surface); }
table.t tr.barre td { color: var(--discret); text-decoration: line-through; }
.montant { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.montant.recette { color: var(--vert); } .montant.depense { color: var(--rouge-texte); }

/* formulaires */
form.f { display: flex; flex-direction: column; gap: 16px; }
.champs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
label.c { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 600; color: #B5C6BB; letter-spacing: .2px; }
.c input, .c select, .c textarea, .filtres select, .filtres input { height: 44px; border: 1px solid var(--champ-trait); border-radius: 11px; padding: 0 13px; font: inherit; font-size: 14px; font-weight: 500; color: var(--encre); background: var(--champ); width: 100%; transition: border-color .15s, box-shadow .15s; }
.c input:hover, .c select:hover, .c textarea:hover { border-color: #3A5546; }
.c textarea { height: auto; padding: 11px 13px; line-height: 1.55; resize: vertical; }
.c input:focus, .c select:focus, .c textarea:focus, .filtres select:focus, .filtres input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(238,118,51,.16); }
.c .aide { font-weight: 400; color: var(--gris); font-size: 12px; letter-spacing: 0; }
.c input.gros { height: 56px; font-size: 22px; font-weight: 700; }
.bascule { display: grid; grid-template-columns: 1fr 1fr; background: var(--champ); border: 1px solid var(--champ-trait); border-radius: 12px; padding: 4px; }
.bascule input { position: absolute; opacity: 0; pointer-events: none; }
.bascule label { text-align: center; padding: 10px; border-radius: 9px; font-weight: 600; color: var(--gris); cursor: pointer; }
.bascule input:checked + label.rec { background: var(--vert-pale); color: var(--vert); box-shadow: inset 0 0 0 1px rgba(67,192,131,.3); }
.bascule input:checked + label.dep { background: var(--orange-pale); color: var(--rouge-texte); box-shadow: inset 0 0 0 1px rgba(238,118,51,.3); }
.bascule input:focus-visible + label { outline: 2px solid var(--orange); }
.depot { border: 1.5px dashed var(--champ-trait); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--gris); background: var(--surface); }
.depot input { font: inherit; font-size: 13px; }
.alerte-seuil { background: var(--orange-pale); color: var(--orange-texte); border: 1px solid rgba(238,118,51,.25); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; font-weight: 500; display: none; }
.alerte-seuil.visible { display: block; }
.filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filtres select, .filtres input { width: auto; height: 40px; font-size: 13.5px; }
.filtres input[type=search] { min-width: 240px; }
.pied-tableau { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--trait); font-size: 13.5px; }

/* tableau de bord */
.barres { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; height: 210px; align-items: end; border-bottom: 1px solid var(--trait); padding-bottom: 2px;
  background-image: repeating-linear-gradient(to top, transparent 0, transparent 51px, var(--trait-doux) 51px, var(--trait-doux) 52px); }
.barres > div { display: flex; gap: 5px; align-items: end; justify-content: center; height: 100%; }
.barres span { width: 36%; max-width: 24px; border-radius: 7px 7px 2px 2px; min-height: 2px; }
.barres .r { background: linear-gradient(180deg, #5FD69B, #1E7A4E); } .barres .d { background: linear-gradient(180deg, #F5A06E, #C9561C); }
.axe { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; font-size: 12px; color: var(--gris); text-align: center; }
.legende { display: flex; gap: 16px; font-size: 12.5px; color: var(--gris); }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.jauge { height: 7px; border-radius: 4px; background: var(--surface-2); display: flex; overflow: hidden; }
.jauge span { background: linear-gradient(90deg, var(--orange-fonce), var(--orange-clair)); border-radius: 4px; }
.a-traiter { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 14px; background: var(--orange-pale); border: 1px solid rgba(238,118,51,.16); color: var(--encre); transition: border-color .15s, background .15s; }
.a-traiter:hover { color: var(--encre); border-color: rgba(238,118,51,.4); }
.a-traiter .n { min-width: 30px; height: 30px; border-radius: 9px; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.a-traiter.vert { background: var(--surface); border-color: var(--trait); } .a-traiter.vert .n { background: var(--vert-pale); color: var(--vert); }
.a-traiter.vert:hover { border-color: rgba(67,192,131,.35); }
.div-ligne { display: flex; justify-content: space-between; font-size: 13px; color: var(--gris); }
.div-ligne b { color: var(--encre); font-weight: 600; }
.div-ligne > .tag { align-self: center; }

/* connexion */
.page-connexion { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(900px 500px at 80% 0%, rgba(46,150,98,.16), transparent 60%), radial-gradient(700px 420px at 10% 100%, rgba(238,118,51,.10), transparent 60%), var(--fond); }
.boite-connexion { width: 100%; max-width: 420px; background: rgba(17,29,23,.85); backdrop-filter: blur(10px); border: 1px solid var(--trait); border-radius: 24px; padding: 36px 32px; display: flex; flex-direction: column; gap: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.boite-connexion .marque b { color: #fff; }
.boite-connexion .marque small { color: var(--gris); }

.detail-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px 26px; }
.detail-grille div small { display: block; font-size: 11.5px; font-weight: 600; margin-bottom: 3px; color: var(--discret); letter-spacing: .3px; }
.detail-grille div b { font-weight: 600; }
.piece { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--trait-doux); font-size: 13.5px; }
.piece img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.histo { font-size: 13px; color: var(--gris); display: flex; flex-direction: column; gap: 6px; }
.roles-grille { display: flex; flex-direction: column; gap: 10px; }
.role-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--trait); border-radius: 14px; background: var(--surface); }
.role-ligne label { display: flex; align-items: center; gap: 10px; font-weight: 600; flex: 1 1 220px; }
.role-ligne input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--orange); }
.role-ligne select { height: 40px; border: 1px solid var(--champ-trait); border-radius: 10px; padding: 0 10px; font: inherit; }
.mdp-provisoire { font-family: ui-monospace, monospace; font-size: 22px; font-weight: 700; letter-spacing: 1px; background: var(--jaune-pale) !important; color: var(--jaune-texte); border: 1px solid rgba(242,207,59,.25); padding: 14px 18px; border-radius: 12px; user-select: all; }

/* ---------------------------------------------------------------- téléphone */
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .nav { width: 100%; height: auto; position: sticky; top: 0; z-index: 10; padding: 12px 16px; gap: 0; overflow: visible; border-right: 0; border-bottom: 1px solid #16241C; background: rgba(8,16,12,.92); backdrop-filter: blur(10px); }
  .nav-haut { display: flex; justify-content: space-between; align-items: center; }
  .nav-liens, .nav-bas { display: none; }
  .menu-mobile { display: block; }
  .menu-mobile summary { list-style: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
  .menu-mobile summary::-webkit-details-marker { display: none; }
  .menu-mobile summary span { width: 18px; height: 2px; background: #fff; border-radius: 1px; }
  .menu-contenu { position: absolute; left: 0; right: 0; top: 68px; background: var(--nav); border-bottom: 1px solid var(--trait); padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 68px); overflow-y: auto; box-shadow: 0 18px 30px rgba(0,0,0,.45); }
  .menu-contenu a.actif::before { left: 0; }
  .contenu { padding: 20px 16px 52px; gap: 18px; }
  h1 { font-size: 24px; }
  .kpi .val { font-size: 23px; }
  .carte { padding: 18px; border-radius: 16px; }
  .entete .actions { width: 100%; }
  .entete .actions .btn { flex: 1; }
}

/* ---------------------------------------------------------------- projets et RH */
.etapes { gap: 2px; padding: 14px; position: sticky; top: 16px; }
.etapes a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; color: var(--encre); font-weight: 500; font-size: 13.5px; }
.etapes a:hover { background: var(--surface); color: var(--encre); }
.etapes a span { width: 26px; height: 26px; min-width: 26px; border-radius: 13px; border: 1.5px solid var(--champ-trait); display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; color: var(--gris); }
.etapes a span.fait { background: var(--vert-pale); border-color: var(--vert); color: var(--vert); }
.etapes a.actif { background: var(--orange-pale); font-weight: 600; }
.etapes a.actif span { background: var(--orange); border-color: var(--orange); color: #fff; }
.sur-titre { font-size: 11.5px; font-weight: 700; letter-spacing: 1.8px; color: var(--orange-texte); }
.grille-saisie input, .grille-saisie select { height: 38px; border: 1px solid var(--champ-trait); border-radius: 9px; padding: 0 8px; font: inherit; font-size: 13.5px; width: 100%; min-width: 90px; background: var(--champ); color: var(--encre); }
.grille-saisie input:focus, .grille-saisie select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(238,118,51,.14); }
.grille-saisie input[readonly] { background: var(--surface); }
.grille-saisie td { padding: 6px; }
.calcule { display: block; height: 38px; line-height: 38px; padding: 0 8px; border-radius: 9px; background: var(--surface-2); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.calc td, tr.parent td { background: rgba(255,255,255,.015); }
.c input[readonly], .c textarea[readonly] { background: var(--surface); color: var(--gris); }
.colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.colonne { background: var(--carte); border: 1px solid var(--trait); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.colonne h3 { font-size: 13px; display: flex; justify-content: space-between; color: var(--gris); letter-spacing: .3px; }
.puce-projet { display: block; font-size: 13px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--trait-doux); color: var(--encre); line-height: 1.4; transition: border-color .15s; }
.puce-projet:hover { border-color: rgba(238,118,51,.45); color: var(--encre); }
.radios { display: flex; flex-wrap: wrap; gap: 4px; }
.radios input { position: absolute; opacity: 0; pointer-events: none; }
.radios label { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--champ-trait); font-size: 12.5px; font-weight: 500; cursor: pointer; background: var(--champ); color: var(--gris); }
.radios input:checked + label.present { background: var(--vert-pale); border-color: var(--vert); color: var(--vert); }
.radios input:checked + label.absent { background: var(--rose-pale); border-color: var(--rose); color: var(--rose-texte); }
.radios input:checked + label.retard { background: var(--jaune-pale); border-color: var(--jaune); color: var(--jaune-texte); }
.radios input:checked + label.conge, .radios input:checked + label.mission { background: var(--bleu-pale); border-color: var(--bleu); color: var(--bleu); }
.radios input:focus-visible + label { outline: 2px solid var(--orange); }

/* recalcul en direct */
@keyframes maj { from { background-color: rgba(238,118,51,.35); } to { background-color: transparent; } }
.maj { animation: maj 1.2s ease-out; }
.calcul-direct { margin: -4px 0 0; font-size: 13px; font-weight: 600; color: var(--vert); }
.calcul-direct:empty { display: none; }
.calcul-direct.rouge-t { color: var(--rouge-texte); }

/* zones dynamiques */
[hidden] { display: none !important; }
.choix-cartes { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.choix-cartes legend { font-size: 13px; font-weight: 600; color: var(--gris); margin-bottom: 8px; padding: 0; }
.choix-carte { display: flex; gap: 12px; align-items: flex-start; padding: 15px 16px; border: 1px solid var(--trait); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.choix-carte:hover { border-color: #3A5546; }
.choix-carte:has(input:checked) { border-color: var(--orange); background: var(--orange-pale); }
.choix-carte input { margin-top: 3px; accent-color: var(--orange); }
.choix-carte span { display: flex; flex-direction: column; gap: 3px; }
.choix-carte small { color: var(--gris); font-size: 12.5px; line-height: 1.45; }
.choix-cartes[disabled] .choix-carte { cursor: default; }
.sous-zone { display: contents; }
.num-etape { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 10px; border-radius: 50%; background: var(--orange-pale); color: var(--orange-texte); font-size: 12px; font-weight: 700; vertical-align: 2px; }
.alerte-doublon { border-left: 3px solid var(--rouge-texte); background: var(--orange-pale); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; color: var(--rouge-texte); font-weight: 500; }
.alerte-doublon p { margin: 2px 0; }
.pieces { display: flex; flex-direction: column; gap: 8px; }
.piece-ligne { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px; border: 1px dashed var(--champ-trait); border-radius: 12px; background: var(--surface); }
.piece-ligne:has([name=piece_libelle]:not([hidden])) { grid-template-columns: minmax(180px, 240px) minmax(140px, 200px) minmax(0, 1fr) auto; }
.piece-ligne select, .piece-ligne input:not([type=file]) { height: 40px; border: 1px solid var(--champ-trait); border-radius: 10px; padding: 0 10px; font: inherit; background: var(--champ); color: var(--encre); min-width: 0; }
.piece-ligne input[type=file] { font-size: 13px; min-width: 0; }
@media (max-width: 640px) { .piece-ligne, .piece-ligne:has([name=piece_libelle]:not([hidden])) { grid-template-columns: 1fr auto; } .piece-ligne input[type=file], .piece-ligne [name=piece_libelle] { grid-column: 1 / -1; } }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; }
.checklist li { display: flex; gap: 8px; align-items: center; }
.checklist .ok { color: var(--vert); font-weight: 700; width: 16px; } .checklist .manque { color: var(--discret); width: 16px; }
.etroit .piece-ligne, .etroit .piece-ligne:has([name=piece_libelle]:not([hidden])) { grid-template-columns: minmax(0, 1fr) auto; }
.etroit .piece-ligne input[type=file], .etroit .piece-ligne [name=piece_libelle] { grid-column: 1 / -1; }
.tag-odg { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--bleu-pale); color: var(--bleu); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.odg-live { display: block; padding-top: 8px; border-top: 1px dashed var(--trait); color: var(--gris); font-size: 12px; line-height: 1.5; }

/* secrétariat */
.rdv-ligne { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--trait-doux); font-size: 13.5px; }
.rdv-ligne:last-child { border-bottom: 0; }
.rdv-ligne > b { font-variant-numeric: tabular-nums; color: var(--orange-texte); font-weight: 600; }
.rdv-ligne small { color: var(--gris); }
.rdv-ligne.annule span b, .rdv-ligne.reporte span b, .rdv-ligne.manque_visiteur span b, .rdv-ligne.manque_personne span b { text-decoration: line-through; color: var(--gris); }
.semaine { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.jour { background: var(--carte); border: 1px solid var(--trait); border-radius: 16px; padding: 11px; min-height: 190px; display: flex; flex-direction: column; gap: 6px; }
.jour.auj { border-color: rgba(238,118,51,.6); box-shadow: 0 0 0 1px rgba(238,118,51,.35), 0 10px 26px rgba(238,118,51,.08); }
.jour h3 { margin: 0 0 4px; font-size: 13px; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.jour h3 small { color: var(--gris); font-weight: 500; }
.jour .ajout { margin-top: auto; font-size: 12px; color: var(--discret); text-align: center; padding: 6px; border: 1px dashed var(--trait); border-radius: 9px; }
.jour .ajout:hover { color: var(--orange-texte); border-color: rgba(238,118,51,.4); }
.evt { display: block; padding: 7px 9px; border-radius: 9px; background: var(--orange-pale); border-left: 3px solid var(--orange); font-size: 12px; line-height: 1.35; color: var(--encre); }
.evt:hover { color: #fff; }
.evt.reunion { background: var(--vert-pale); border-color: var(--vert); }
.evt.appel { background: var(--bleu-pale); border-color: var(--bleu); }
.evt.deplacement { background: var(--jaune-pale); border-color: var(--jaune); }
.evt.annule, .evt.reporte { opacity: .5; text-decoration: line-through; }
.evt.manque_visiteur, .evt.manque_personne { background: var(--rose-pale); border-left-color: var(--rose-texte); border-left-style: dashed; }
.evt .etat-manque { color: var(--rose-texte); font-weight: 600; }
.evt .etat-reprog { color: var(--vert); font-weight: 600; }
.evt.conflit { box-shadow: 0 0 0 1px var(--rouge-texte) inset; }
.evt b { display: block; font-weight: 600; }
.evt small { color: var(--gris); }
.chrono { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--encre); white-space: nowrap; }
.sens { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; }
.sens.arrivee { background: var(--vert-pale); color: var(--vert); }
.sens.depart { background: var(--bleu-pale); color: var(--bleu); }
.pli { display: inline-flex; gap: 6px; align-items: center; color: var(--rose-texte); font-weight: 600; font-size: 12px; }
.urgent-t { color: var(--rouge-texte); font-weight: 700; font-size: 11px; letter-spacing: .05em; }
.fil { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1px solid var(--trait); display: flex; flex-direction: column; gap: 14px; }
.fil li { position: relative; font-size: 13px; line-height: 1.5; }
.fil li::before { content: ""; position: absolute; left: -23px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px var(--carte); }
.fil li small { color: var(--gris); display: block; }
.onglets-sec { display: inline-flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: var(--carte); border: 1px solid var(--trait); border-radius: 14px; align-self: flex-start; }
.onglets-sec a { padding: 7px 14px; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--gris); }
.onglets-sec a:hover { color: var(--encre); background: var(--surface); }
.onglets-sec a.actif { background: var(--surface-2); color: #fff; box-shadow: inset 0 0 0 1px var(--champ-trait); font-weight: 600; }
@media (max-width: 980px) { .semaine { grid-template-columns: 1fr; } .jour { min-height: 0; } }
.ligne > .large, .ligne > .etroit { min-width: 0; }
a.carte { transition: border-color .15s, transform .15s; }
a.carte:hover { border-color: #33503F; }
a.carte.kpi { color: inherit; } a.carte.sombre.kpi { color: #fff; }
a.carte.sombre:hover { border-color: rgba(120,220,170,.35); }

/* Ma caisse */
.mvt { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; text-transform: uppercase; margin-right: 4px; }
.mvt.appro { background: var(--bleu-pale); color: var(--bleu); } .mvt.versement { background: var(--jaune-pale); color: var(--jaune-texte); }
.mvt.loyer, .mvt.recette { background: var(--vert-pale); color: var(--vert); } .mvt.depense { background: var(--orange-pale); color: var(--orange-texte); }
.billetage { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.billetage label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.billetage input { width: 76px; height: 34px; border: 1px solid var(--champ-trait); border-radius: 8px; padding: 0 8px; font: inherit; text-align: right; }
details.carte > summary { cursor: pointer; list-style: none; }
details.carte > summary::-webkit-details-marker { display: none; }
details.carte > summary::after { content: "▾"; float: right; color: var(--gris); }
.div-ligne.barre, tr.barre { opacity: .5; text-decoration: line-through; }
details.supprimer > summary { list-style: none; display: inline-flex; cursor: pointer; color: var(--rose-texte); }
details.supprimer > summary::-webkit-details-marker { display: none; }
details.supprimer[open] > summary { margin-bottom: 10px; }

/* Exports */
.exports { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 18px; align-items: start; }
.exp { display: flex; flex-direction: column; gap: 9px; padding: 14px 0; border-top: 1px solid var(--trait-doux); }
.exports h2 + .exp { border-top: 0; padding-top: 4px; }
.exp > div:first-child b { display: block; font-size: 14px; font-weight: 600; }
.exp > div:first-child small { color: var(--gris); font-size: 12.5px; }
.exp .champs { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.exp .champs label.c { font-size: 12px; min-width: 0; }
.exp .champs select { max-width: 260px; }

/* Validations : file de décision */
.dems { display: flex; flex-direction: column; gap: 10px; }
.dem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 15px 18px; border: 1px solid var(--trait); border-radius: 16px; background: var(--carte); transition: border-color .15s; }
.dem:hover { border-color: #33503F; }
.dem.urgente { border-color: rgba(238,118,51,.5); box-shadow: inset 3px 0 0 var(--orange); }
.dem.retard:not(.urgente) { box-shadow: inset 3px 0 0 var(--rose); }
.dem > input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--orange); }
.dem-corps { display: flex; flex-direction: column; gap: 3px; color: inherit; min-width: 0; }
.dem-corps b { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.dem-haut { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dem-montant { font-weight: 700; font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dem-actions { display: flex; gap: 6px; }
.lot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 11px 13px; margin-bottom: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--trait-doux); }
.lot .tout { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; }
.lot .tout input { width: 18px; height: 18px; accent-color: var(--orange); }
.lot input[name=commentaire] { flex: 1; min-width: 180px; height: 36px; border: 1px solid var(--champ-trait); border-radius: 9px; padding: 0 10px; font: inherit; font-size: 13px; }
.citation { background: var(--surface); border-left: 3px solid var(--orange); padding: 13px 15px; border-radius: 12px; font-size: 14px; line-height: 1.55; white-space: pre-line; margin-top: 12px; }
.vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.vignette { display: flex; flex-direction: column; gap: 6px; color: inherit; }
.vignette img, .vignette .ext { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--trait); background: var(--surface); }
.vignette .ext { display: grid; place-items: center; font-weight: 700; color: var(--orange-texte); letter-spacing: .05em; }
.vignette small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.raccourcis { display: flex; flex-wrap: wrap; gap: 6px; }
.raccourcis button { border: 1px solid var(--champ-trait); background: var(--surface); color: var(--gris); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12px; cursor: pointer; }
.raccourcis button:hover { border-color: var(--orange); color: var(--encre); }
label.coche { display: flex; gap: 8px; align-items: center; font-size: 13px; }
label.coche input { width: 18px; height: 18px; accent-color: var(--orange); }
@media (max-width: 700px) {
  .dem { grid-template-columns: auto minmax(0, 1fr); }
  .dem-montant, .dem-actions { grid-column: 2; }
}
.jour-agenda { display: block; margin: 12px 0 2px; font-weight: 600; color: var(--discret); text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; }
.decisions-dg { border: 1px solid rgba(238,118,51,.4); }

/* tableau de bord : période et division */
.filtre-tdb { padding: 14px 18px; }
.filtre-tdb .filtre-resume { margin-left: auto; font-size: 13.5px; }
@media (max-width: 700px) { .filtre-tdb .filtres > * { flex: 1 1 140px; } .filtre-tdb .filtre-resume { margin-left: 0; flex-basis: 100%; } }

/* ---------------------------------------------------------------- alertes sonores */
.alertes-bouton { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); border-radius: 12px; padding: 9px 12px; color: #E9EFEA; font: inherit; cursor: pointer; }
.alertes-bouton:hover { background: rgba(255,255,255,.05); }
.alertes-bouton b { display: block; font-size: 12.5px; font-weight: 600; }
.alertes-bouton small { display: block; font-size: 11.5px; color: var(--gris); }
.alertes-bouton .voyant { width: 8px; height: 8px; border-radius: 50%; background: #4C6556; flex-shrink: 0; }
.alertes-bouton.on .voyant { background: #4ADE80; box-shadow: 0 0 0 3px rgba(74,222,128,.18); }
.alertes-bouton.clair { background: var(--surface); border-color: var(--trait); color: var(--encre); width: auto; min-width: 240px; }
.alertes-bouton.clair small { color: var(--gris); }
.alertes-bouton.clair.on .voyant { background: var(--vert); box-shadow: 0 0 0 3px var(--vert-pale); }
.alertes-reglage { display: flex; flex-direction: row; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.alertes-reglage > div { flex: 1 1 320px; }
.alertes-reglage p { margin-top: 4px; font-size: 13.5px; }
.alertes-pile { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.alerte-carte { position: relative; display: flex; flex-direction: column; gap: 3px; background: #15241C; color: var(--encre); border: 1px solid #2B4135; border-left: 3px solid var(--vert); border-radius: 14px; padding: 13px 34px 13px 15px; box-shadow: 0 18px 40px rgba(0,0,0,.5); animation: alerte-entree .25s ease-out; }
.alerte-carte:hover { color: var(--encre); border-color: #2B4135; border-left-color: var(--vert); }
.alerte-carte.rappel { border-left-color: var(--orange); }
.alerte-carte.urgent { border-left-color: var(--rose); }
.alerte-carte b { font-size: 14px; font-weight: 600; }
.alerte-carte span { font-size: 13px; color: var(--gris); white-space: pre-line; }
.alerte-carte .fermer { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 18px; line-height: 1; color: var(--gris); cursor: pointer; padding: 4px; }
.alerte-carte .fermer:hover { color: #fff; }
.alerte-carte.invitation { border-left-color: var(--orange); padding-right: 15px; }
.alerte-carte.invitation p { display: flex; gap: 8px; margin-top: 8px; }
.alerte-carte.invitation .btn:not(.clair) { background: linear-gradient(180deg, #F2843F, var(--orange-fonce)); border-color: transparent; color: #fff; }
@keyframes alerte-entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.alerte-carte.insistant { animation: alerte-entree .25s ease-out, alerte-pouls 1.6s ease-in-out infinite; }
.alerte-carte .vu { align-self: flex-start; margin-top: 8px; height: 34px; padding: 0 14px; font-size: 13px; }
.alerte-carte.urgent .vu { background: var(--rose); border-color: transparent; color: #fff; }
.alerte-carte.rappel .vu { background: var(--orange); border-color: transparent; color: #fff; }
@keyframes alerte-pouls { 0%, 100% { box-shadow: 0 18px 40px rgba(0,0,0,.5); } 50% { box-shadow: 0 18px 40px rgba(0,0,0,.5), 0 0 0 6px rgba(238,118,51,.22); } }
@media (prefers-reduced-motion: reduce) { .alerte-carte.insistant { animation: none; } * { transition: none !important; } }

/* ---------------------------------------------------------------- chantier 4 : voyages, visites, journal, Telegram */
.evt.voyage { background: var(--bleu-pale); border-left: 6px solid var(--bleu); }
.evt.voyage b { color: #A9CBEA; }
.mini { display: flex; flex-direction: column; gap: 6px; min-width: 210px; }
.mini select, .mini input { height: 36px; border: 1px solid var(--champ-trait); border-radius: 9px; padding: 0 10px; font: inherit; font-size: 13px; color: var(--encre); background: var(--champ); width: 100%; }
.mini select:focus, .mini input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(238,118,51,.14); }
.mini .btn { height: 34px; align-self: flex-start; }
.alerte-dispo { font-size: 12px; font-weight: 600; color: var(--rouge-texte); }
.puces { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.puces label { position: relative; cursor: pointer; }
.puces input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.puces span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--champ-trait); background: var(--champ); font-size: 13px; font-weight: 500; color: var(--gris); transition: all .15s; }
.puces span:hover { border-color: #3A5546; color: var(--encre); }
.puces span em { font-style: normal; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--encre); border-radius: 9px; padding: 1px 7px; }
.puces input:checked + span { background: var(--orange-pale); border-color: rgba(238,118,51,.6); color: var(--orange-texte); }
.puces input:focus-visible + span { outline: 2px solid var(--orange); }
.filtres label.c { font-size: 12px; gap: 4px; }
.etapes-tg { margin: 0; padding-left: 18px; font-size: 13px; color: var(--gris); display: flex; flex-direction: column; gap: 4px; }
.etapes-tg b { color: var(--encre); }

/* ---------------------------------------------------------------- impression : retour au clair */
@media print {
  :root, body {
    color-scheme: light;
    --fond: #FFFFFF; --carte: #FFFFFF; --surface: #F6F5F0; --surface-2: #F1EEE6; --survol: #FAF9F5;
    --trait: #E3E0D6; --trait-doux: #EFECE4; --champ: #FFFFFF; --champ-trait: #DAD6CA;
    --encre: #10231A; --gris: #5B6B61; --discret: #9AA39D;
    --orange: #E8692A; --orange-texte: #B9501A; --orange-pale: #FDF1E8;
    --vert: #17804A; --vert-pale: #E8F5EC; --rose: #D63A5E; --rose-texte: #B42347; --rose-pale: #FCEEF1;
    --jaune-texte: #8A6A00; --jaune-pale: #FBF6DE; --bleu: #2A6A9C; --bleu-pale: #E6F0F8; --rouge-texte: #C2410C;
    --ombre: none;
  }
  .nav, .flashs, .actions, .no-print, .alertes-pile { display: none !important; }
  .contenu { padding: 0; max-width: none; }
  body { background: #fff !important; }
  .carte, .carte.sombre { border: 0; padding: 0; box-shadow: none; background: #fff; color: var(--encre); }
  .carte.sombre small, .carte.sombre .lib { color: var(--gris); }
  .registre-imp { font-size: 10.5px; }
  .registre-imp table { min-width: 0 !important; }
  @page { size: A4 landscape; margin: 12mm; }
}
/* visites : correction de l'état */
details.corriger { margin-top: 6px; }
details.corriger > summary { list-style: none; display: inline-flex; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--orange-texte); }
details.corriger > summary::-webkit-details-marker { display: none; }
details.corriger > summary:hover { color: var(--orange-clair); }
details.corriger[open] > summary { margin-bottom: 8px; }
details.corriger .mini { min-width: 180px; }
/* caisse : choix du mois à arrêter */
.arreter-mois { display: inline-flex; gap: 6px; align-items: center; }
.arreter-mois select { height: 42px; border: 1px solid var(--champ-trait); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 13.5px; background: var(--champ); color: var(--encre); }
/* menu téléphone : bloc Mon compte */
.menu-contenu a.moi-mobile { gap: 12px; padding: 10px 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); margin-bottom: 4px; }
.menu-contenu a.moi-mobile b { display: block; font-size: 14px; font-weight: 600; color: #fff; }
.menu-contenu a.moi-mobile small { display: block; font-size: 12px; color: var(--gris); }
.menu-contenu a.moi-mobile.actif::before { display: none; }
.menu-contenu a em.tag { font-style: normal; }
/* paiements en plusieurs fois */
.bloc-reglement { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--trait-doux); }
.jauge-rg { height: 8px; border-radius: 4px; background: var(--surface-2); display: flex; overflow: hidden; }
.jauge-rg .v { background: linear-gradient(90deg, var(--vert-fonce), var(--vert)); }
.jauge-rg .a { background: repeating-linear-gradient(135deg, var(--orange) 0 6px, rgba(238,118,51,.45) 6px 12px); }
.chiffres-rg { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px 20px; }
.chiffres-rg small { display: block; font-size: 11.5px; font-weight: 600; color: var(--discret); letter-spacing: .3px; margin-bottom: 2px; }
.chiffres-rg b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.info-reglement { background: var(--orange-pale); border: 1px solid rgba(238,118,51,.25); border-radius: 12px; padding: 11px 14px; font-size: 13.5px; }
.tag-rg { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--orange-pale); color: var(--orange-texte); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.tag-rg.solde { background: var(--vert-pale); color: var(--vert); }
/* ---- Module Portail first-tia.com (chantier G) */
.frise { display: grid; grid-template-columns: repeat(10, minmax(84px, 1fr)); gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.frise a { display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 9px; border-radius: 12px; background: var(--surface); border: 1px solid var(--trait-doux); color: var(--gris); font-size: 11.5px; line-height: 1.25; min-width: 84px; }
.frise a:hover { color: var(--encre); border-color: var(--champ-trait); }
.frise a b { font-size: 20px; font-weight: 700; color: var(--encre); font-variant-numeric: tabular-nums; }
.frise a i { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--discret); letter-spacing: .3px; }
.frise a.actif { background: var(--orange-pale); border-color: rgba(238,118,51,.55); color: var(--orange-texte); }
.frise a.plein b { color: var(--orange-texte); }
.etape-dossier { display: flex; gap: 4px; flex-wrap: wrap; }
.etape-dossier span { flex: 1 1 0; min-width: 22px; height: 6px; border-radius: 3px; background: var(--surface-2); }
.etape-dossier span.fait { background: var(--vert); } .etape-dossier span.ici { background: var(--orange); }
.tag.etape { color: var(--bleu); background: var(--bleu-pale); }
.kpi-lien { color: var(--encre); transition: border-color .15s, transform .15s; }
.kpi-lien:hover { color: var(--encre); border-color: var(--champ-trait); transform: translateY(-1px); }
.kpi-lien .val.zero { color: var(--discret); }
.kpi-lien small { color: var(--gris); font-size: 12px; }
.fil-msg { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding: 4px 2px; }
.bulle { max-width: 86%; padding: 10px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--trait-doux); font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.bulle.tia { align-self: flex-end; background: var(--orange-pale); border-color: rgba(238,118,51,.35); }
.bulle small { display: block; color: var(--gris); font-size: 11.5px; margin-bottom: 3px; white-space: normal; }
.bulle a { font-weight: 600; }
.lignes-devis { display: flex; flex-direction: column; gap: 8px; }
.ligne-devis { display: grid; grid-template-columns: minmax(0, 1fr) 90px 150px 130px 36px; gap: 8px; align-items: center; }
.ligne-devis input { height: 42px; border: 1px solid var(--champ-trait); border-radius: 10px; padding: 0 11px; font: inherit; font-size: 13.5px; background: var(--champ); color: var(--encre); min-width: 0; width: 100%; }
.ligne-devis input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(238,118,51,.14); }
.ligne-devis output { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ligne-devis.tete { font-size: 11.5px; font-weight: 600; color: var(--discret); }
.total-devis { display: flex; justify-content: flex-end; gap: 16px; font-size: 16px; padding-top: 6px; border-top: 1px solid var(--trait); }
.texte-long { white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; color: var(--encre); }
.contenu-cle { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--discret); }
.alerte-bande { padding: 12px 16px; border-radius: 12px; background: var(--jaune-pale); color: var(--jaune-texte); border: 1px solid rgba(242,207,59,.35); font-size: 13.5px; }
.alerte-bande.erreur { background: var(--rose-pale); color: var(--rose-texte); border-color: rgba(228,88,123,.35); }
.vignette-pub { width: 64px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
@media (max-width: 760px) {
  .ligne-devis { grid-template-columns: minmax(0, 1fr) 70px; }
  .ligne-devis input[name=prix_unitaire] { grid-column: 1; } .ligne-devis output { grid-column: 2; }
  .ligne-devis.tete { display: none; }
  .bulle { max-width: 100%; }
}
.pile { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.note-bas { font-size: 12px; margin: 0; color: var(--gris); }
