/* Ingenio — feuille de style de l'application. Téléphone d'abord.
   Couleurs et polices reprises du site ingenioconstruction.com. */
:root {
  --encre: #15171a;
  --encre-2: #3a3d42;
  --doux: #6b6f76;
  --papier: #f6f3ee;
  --papier-2: #efeae2;
  --pierre: #d9d2c5;
  --blanc: #ffffff;
  --bronze: #a8814f;
  --bronze-2: #8c6a3d;
  --bronze-clair: #d8b98a;
  --ok-fond: #e6efe6;
  --ok-texte: #23512f;
  --erreur-fond: #f8e4df;
  --erreur-texte: #8c2318;
  --titres: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;  /* titres en Inter gras, choix de PL (7 octobre 2026) */
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rayon: 6px;
  --ombre: 0 6px 20px rgba(21, 23, 26, .06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--papier); color: var(--encre); font: 16px/1.55 var(--sans); }
a { color: var(--bronze-2); }
a:hover { color: var(--encre); }
h1 { font-family: var(--titres); font-weight: 600; font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.02em; line-height: 1.15; margin: .25rem 0 1rem; }
/* un long mot sans espace dans un titre (« Frais de développement:Ingénierie:… ») se coupe plutôt que de pousser la page de côté */
h1 { overflow-wrap: break-word; }
/* le titre qui reçoit le geste caché de la banque d'heures (app.js, choix de PL du 18 novembre 2026) : cinq touchers rapides ne
   zooment pas, ne sélectionnent pas le texte et ne font pas de reflet gris au toucher ; il ne change pas d'allure */
h1.titre-geste { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
h2 { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze-2); margin: 2rem 0 .75rem; }

/* La flèche des plis (décision 3 de PL du 25 novembre 2026 : « la flèche › qui tourne », partout). Depuis que les titres des plis
   (<summary>) sont en display: flex pour faire 44 px, le triangle du navigateur ne paraît plus : environ 120 plis n'avaient plus aucun
   signe qui dise qu'ils se déroulent (« Ajouter une ligne », « Modifier l'en-tête », « Nouvel avenant », « Histoire du BC », les
   titres dorés…). Chacun a maintenant la flèche de Paramètres → Bascules et du Coût Total : « › », bronze, graisse 700, 1,1 rem, qui
   tourne d'un quart de tour vers le bas quand le pli s'ouvre.
   - Le triangle du navigateur est effacé sur tous les titres (list-style, ::-webkit-details-marker, chacun dans sa règle) : jamais
     deux flèches, même sur iPhone, où Safari le garde sur un titre en flex.
   - La flèche ne s'ajoute pas (la liste du :not) : (a) aux plis habillés en bouton ou en pilule (un titre .bouton, des coins ronds) :
     leur rangée garde des boutons de la même grosseur (PL, 6 novembre 2026) ; (b) aux plis qui ont déjà leur signe : « › » (le Coût
     Total, les Bascules, les lots d'un code, la paie QuickBooks…), « ▸/▾ », le « +/− » d'« Autres gestes », le ▾ du statut de la
     S+3, les cases des jours, et le « + » écrit au début de « + Ajouter un lot » et « + Nouveau lot… » : jamais deux signes. Un
     nouveau pli en pilule, ou avec son propre signe, s'ajoute à cette liste : tests/test_fleche_plis.py le vérifie.
   - :where() met la règle à la force la plus basse : la règle propre à un pli l'emporte toujours. La flèche a 1 rem de large et
     .4 rem d'air (la colonne des Bascules), ne rapetisse pas (flex: none) et ne grandit pas le titre (line-height: 1) : les 44 px
     restent, et un long titre passe à la ligne à côté d'elle, sans déborder à 375 px.
   - Elle tourne par la variable --pli-fleche, posée sur le titre d'un pli ouvert, et seulement le sien (un pli fermé dans un pli
     ouvert garde sa flèche couchée) : la liste n'est écrite qu'une fois.
   La page d'acceptation du sous-traitant (accepter.css, sans app.css) ne change pas. */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
:where(details[open] > summary) { --pli-fleche: rotate(90deg); }
:where(details:not(.bulle, .autre-chantier, .corriger-conso, details.remplacer-version, details.retirer-note.en-bouton,
    details.signaler-erreur, details.demande-changement, details.refus-demande, details.depot-bureau, details.geste-document,
    details.refuser-facture, details.grille-panneau, details.deposer-pdf, details.pli-soumission, details.ajout-soumission,
    details.mettre-a-part, .soumissions-liste details.geste-teinte, details.geste-denonciation, main.factures details.retirer-bon,
    main.bons details.confirmer-simule, main.bons details.gros-pli,
    details.pli-bas, .accordeon details, .lots-code details.lot, details.section-bascules, .bascule details.ce-que-ca-fait,
    main.employes details.modifier-acces, .avis-bons details.autres-avis, details.message-matin, main.devis details.pli-devis,
    main.entretien .pourquoi-a-verifier details, main.factures details.autres-bons, .qbo-heures details.replie,
    .qbo-heures details.a-la-main, .qbo-corr details.comparer, main.soumissions .pli-addenda, .codes-ecarts details.autre-montant,
    details.avertissements-excel, main.unites-quantite details, details.retour-projets, details.retour-sans-unite,
    details.retour-sans-chiffres, .texte-reponse-s3, .ajout-contact-s3, main.bons details.autres-gestes, .statut-rapide, .case-jours,
    details.ajouter-lot, details.nouveau-lot, main.bons details.clause-bc) > summary:not(.bouton))::before {
  content: "›"; display: inline-block; flex: none; width: 1rem; margin-right: .4rem; text-align: center; color: var(--bronze-2);
  font-weight: 700; font-size: 1.1rem; line-height: 1; transform: var(--pli-fleche, none); transition: transform .15s; }

/* En-tête */
.bandeau-env { background: var(--bronze); color: var(--blanc); text-align: center; font-size: .8rem; letter-spacing: .04em; padding: .3rem .75rem; }
/* Le menu tient sur une ligne à l'ordinateur (petits défauts du 19 novembre 2026 : le menu de l'Immobilier passait sur 2 ou 3 lignes à
   1 280 px) : il garde sa largeur (flex 1 1 auto) ; quand la rangée manque de place, le nom et « Se déconnecter » passent dessous, à
   droite (margin-left: auto), au lieu de couper le menu. Les espaces entre les morceaux sont un peu resserrés. Au téléphone (le menu
   replié plus bas), rien ne change. */
.entete { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding: .85rem 1.25rem; background: var(--encre); color: var(--blanc); }
.marque { display: block; line-height: 0; }
.marque img { height: 30px; width: auto; }
.entete nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; flex: 1 1 auto; }
.entete nav a { color: #e9e5dd; text-decoration: none; font-size: .93rem; font-weight: 500; padding: .35rem 0; border-bottom: 2px solid transparent; }
.entete nav a:hover { color: var(--blanc); border-bottom-color: var(--bronze-clair); }
.entete nav a[aria-current=page] { color: var(--blanc); border-bottom-color: var(--bronze); }
.menu { display: contents; }
.bouton-menu { display: none; }
.qui { display: flex; align-items: center; gap: .75rem; font-size: .85rem; color: #b9b5ad; margin: 0 0 0 auto; }
.qui strong { color: var(--blanc); font-weight: 500; }
.qui .moi { color: inherit; text-decoration: none; }
.qui .moi:hover strong { text-decoration: underline; }
.qui .engrenage { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #e9e5dd; }
.qui .engrenage:hover, .qui .engrenage[aria-current=page] { background: #2c2f34; color: var(--blanc); }
.qui button.discret { border-color: #5a5d62; color: #e9e5dd; }
.qui button.discret:hover { border-color: var(--bronze-clair); color: var(--blanc); background: transparent; }
/* À l'ordinateur, le niveau passe sous le nom, en petit (petits défauts du 19 novembre 2026) : l'en-tête d'un compte de l'Immobilier
   tient sur une rangée à 1 280 px. Au téléphone, le nom et le niveau restent sur une ligne, séparés par « · ». */
@media (min-width: 44.01rem) {
  .qui .moi { display: inline-flex; flex-direction: column; line-height: 1.25; }
  .qui .niveau { font-size: .78rem; }
  .qui .niveau .point { display: none; }
}

main { max-width: 72rem; margin: 0 auto; padding: 1.75rem 1.25rem 4rem; }

/* Blocs */
.carte { background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); padding: 1.25rem; margin: 0 0 1.5rem; box-shadow: var(--ombre); }
.carte h2 { margin-top: 0; }
.etroite { max-width: 26rem; margin: 3rem auto; padding: 2rem; }
.note { color: var(--doux); font-size: .9rem; margin: .25rem 0 1rem; max-width: 65ch; }
/* La ligne de retour d'une page d'un projet (_retour_projet.html ; point 13 du lot 3, PL, 25 et 26 novembre 2026) : la même partout,
   en haut. Le numéro et le nom du projet (sa fiche), « › » la page d'avant, « · » un lien de plus au bout. Chaque lien fait 44 px de
   haut, à l'ordinateur comme au téléphone ; un nom long passe à la ligne en entier (jamais « … »), et la page d'avant descend
   dessous quand la ligne est pleine : rien ne déborde de côté. Pas collée en haut pendant qu'on défile. */
.fil-projet { display: flex; flex-wrap: wrap; align-items: center; column-gap: .1rem; margin: 0 0 .25rem; font-size: .9rem; color: var(--doux); }
.fil-projet a, .fil-projet .sans-lien { display: inline-flex; align-items: center; min-height: 44px; min-width: 0; overflow-wrap: anywhere; }
.fil-projet .projet { font-weight: 600; }
.fil-projet .sans-lien { color: var(--encre-2); }
.fil-projet .chevron { margin-right: .3rem; }
.fil-projet .avant, .fil-projet .fil-bout { display: inline-flex; align-items: center; min-width: 0; }
.fil-projet .sep { flex: none; margin: 0 .4rem 0 .3rem; }
.fil-projet .point { flex: none; margin: 0 .45rem; }
.vide { color: var(--doux); padding: 1.5rem 0; }
.avis { padding: .7rem 1rem; border-radius: var(--rayon); margin: 0 0 1.25rem; border-left: 3px solid; overflow-wrap: anywhere; }
.avis.ok { background: var(--ok-fond); color: var(--ok-texte); border-color: var(--ok-texte); }
.avis.erreur { background: var(--erreur-fond); color: var(--erreur-texte); border-color: var(--erreur-texte); }

/* Formulaires */
.ligne { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin: 0; }
.ligne.serree { align-items: center; gap: .5rem; flex-wrap: nowrap; }
label { display: grid; gap: .25rem; font-size: .8rem; font-weight: 500; color: var(--encre-2); }
input:not([type=checkbox]), select { font: inherit; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); color: var(--encre); min-width: 0; }
input:not([type=checkbox]):hover, select:hover { border-color: var(--doux); }
/* lecture seule (ex. le courriel et le cellulaire d'un compte que seul un superutilisateur change) : ça se voit */
form.lot { margin-bottom: 1rem; }  /* « Créer les comptes » : un peu d'air avant la liste des employés sans compte */
input.lecture-seule, input.lecture-seule:hover { background: var(--papier); color: var(--encre-2); border-style: dashed; border-color: var(--pierre); cursor: default; }
input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: var(--encre); }
button, .bouton { font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; padding: .6rem 1.3rem; border: 1.5px solid var(--encre); border-radius: 999px; background: var(--encre); color: var(--blanc); text-decoration: none; display: inline-block; transition: background .2s, border-color .2s, color .2s; }
button:hover, .bouton:hover { background: var(--bronze-2); border-color: var(--bronze-2); color: var(--blanc); }
/* Un lien habillé en bouton (<a class="bouton">) garde son texte au centre, en hauteur et en largeur, comme un vrai <button>,
   même étiré : 44 px de haut au téléphone, pleine largeur dans une .ligne (PL, 10 octobre 2026 : « Recevoir un code par texto »
   et « ‹ Semaine d'avant » avaient le texte collé en haut). */
.bouton { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
/* UNE seule grosseur de bouton (PL, 6 novembre 2026 : « il faut qu'ils soient à la même grosseur, sinon mon œil accroche ») : le bouton
   discret (contour, fond blanc) a la boîte du bouton plein, même hauteur, même rembourrage, même texte (.92rem, graisse 600) ; seules
   les couleurs changent. Pareil pour .bouton.discret plus bas et pour les replis (<summary>) habillés en bouton. 44 px de haut à
   toutes les largeurs. Les seuls plus petits : les boutons d'icône et ceux glissés dans une phrase ou une valeur de fiche, seuls. */
button.discret { background: transparent; color: var(--encre); border-color: var(--pierre); }
button.discret:hover { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
/* Une rangée de boutons (PL, 6 novembre 2026 : « j'aime pas ça quand ils sont sur deux lignes ») tient sur une ligne, ou s'empile en
   entier, chaque bouton sur toute la largeur : jamais deux en haut et un seul en bas. app.js (rangées) pose .rangee-empilee sur une
   rangée faite seulement de boutons qui ne tient plus sur une ligne, et l'enlève dès qu'elle y tient ; sans app.js, elle passe à la
   ligne comme avant. Au téléphone, la plupart des rangées s'empilent déjà d'elles-mêmes (.ligne, plus bas). Un état posé par le
   script, qui l'emporte sur l'alignement propre à chaque rangée (.ligne.serree centrait les boutons à leur largeur à elle) et sur la
   part de chaque bouton (une part de 100 % au téléphone, comme le classement d'un fournisseur, devenait en colonne la hauteur de la
   rangée : avec le retour à la ligne, une colonne par bouton, côte à côte, et la page débordait de 201 px ; relecture du 6 novembre
   2026). Une seule colonne, chaque bouton à sa hauteur. */
.rangee-empilee { flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch !important; }
.rangee-empilee > * { flex: 0 0 auto !important; align-self: stretch !important; width: auto !important; max-width: none; margin-left: 0; margin-right: 0; }
.rangee-empilee > form > button, .rangee-empilee > details > summary { width: 100%; }
.rangee-empilee > details > summary { display: flex; justify-content: center; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }

/* Tableaux */
.defile { overflow-x: auto; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); margin: 0 0 1.5rem; box-shadow: var(--ombre); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .65rem 1rem; border-bottom: 1px solid var(--papier-2); vertical-align: middle; white-space: nowrap; }
td.large { white-space: normal; min-width: 12rem; }
thead th { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); font-weight: 600; background: var(--papier); border-bottom-color: var(--pierre); }
tbody tr:hover > * { background: #fbfaf7; }
tbody tr:last-child > * { border-bottom: 0; }
tr.inactif td, tr.inactif th[scope=row] { color: var(--doux); }  /* la tête de la rangée aussi (le motif commun des tableaux) */

/* ---------- Tableaux qui tiennent dans la largeur : LE motif commun (PL, 27 octobre 2026) ----------
   « J'aime pas ça quand il y a des genres de tableaux qu'il faut slider gauche-droite. » Un tableau ne se glisse plus de côté, ni au
   téléphone (375 px) ni à l'ordinateur (1 280 et 1 440 px). C'est mesuré, écran par écran : tools/galerie_ecrans.py --mesurer.
   Heures et Rapports du jour, gelés jusque-là, y passent aussi (PL, 28 octobre 2026 : la Semaine de l'équipe, son bouton
   « Approuver N jours » qui se cachait à droite) : plus aucun .defile.

   Comment un gabarit l'emploie (employes.html est l'exemple) :

     <div class="cadre-tableau">
     <table class="tient">
       <thead><tr><th scope="col">Nom</th><th scope="col">Numéro</th><th scope="col">Coordonnées</th><th scope="col">Montant</th></tr></thead>
       <tbody><tr>
         <th scope="row"><a href="/employes/1">Alex Exemple</a> <span class="pastille">Actif</span></th>
         <td class="court">EX001</td>
         <td><div class="empile"><a href="tel:+14185550101">418 555-0101</a><span class="coupe">alex.ex001@exemple.test</span></div></td>
         <td class="nombre">1 234,56 $</td>
       </tr></tbody>
     </table>
     </div>

   - div.cadre-tableau : le cadre blanc du tableau, à la place de div.defile. Il ne défile plus que par accident (une valeur hors
     norme, un mot de 60 lettres) ; la mesure le signale, et ça se corrige dans le gabarit. Une règle qui visait .defile dans un
     contexte (.bloc .defile, .accordeon details > .defile) vise aussi .cadre-tableau quand le gabarit passe au motif.
   - table.tient : à l'ordinateur, les cases passent à la ligne (plus de valeur sur une seule ligne qui étire le tableau) et les
     colonnes se partagent la largeur. Au téléphone, une fiche par rangée (table.fiches, posée par app.js) : la tête de la rangée
     (th scope="row") en titre, puis chaque valeur, son étiquette à gauche.
   - Les en-têtes restent des en-têtes : th scope="col" en haut, th scope="row" pour la tête de chaque rangée (lecteurs d'écran,
     titre de la fiche).
   - data-titre="…" sur une case : l'étiquette de sa valeur dans la fiche du téléphone. app.js la pose d'après l'en-tête de la
     colonne ; le gabarit la donne lui-même seulement quand l'en-tête est vide ou ne suffit pas.
   - Regrouper des colonnes, à l'ordinateur comme au téléphone : quand le tableau ne tient pas, deux valeurs qui vont ensemble
     (cellulaire et courriel, date et auteur, quantité et unité) vont dans UNE case, l'une sous l'autre (div.empile), sous un
     en-tête qui les nomme toutes. Un état court (actif, fermé, à approuver) va en pastille à côté du nom de la rangée plutôt que
     dans sa propre colonne (.pastille ; .pastille.eteinte pour un état éteint : inactif, désactivé).
   - .court : une valeur qui ne se coupe pas (un numéro, une date, une heure). .nombre : un montant ou une quantité, à droite, sur
     une ligne. .coupe : une valeur sans espace qui peut être longue (un courriel, une adresse, un nom de fichier) se coupe
     n'importe où plutôt que d'élargir sa colonne ; une case td.coupe garde au moins 9 rem à l'ordinateur, pour qu'un mot ordinaire
     n'y soit pas coupé au milieu (relecture du 27 octobre 2026 : « Soumi|ssion », « QuickBook|s » quand la colonne rétrécissait).
   - Un en-tête ne se coupe pas au milieu d'un mot : il passe à la ligne entre deux mots.
   - Entre le téléphone et l'ordinateur (une tablette, une fenêtre à moitié d'écran) : un tableau qui ne tient pas dans sa largeur
     passe lui aussi en fiches plutôt que de se glisser de côté ; un tableau qui tient reste un tableau. app.js pose table.en-fiches
     sur un table.tient montré en fiches : toujours au téléphone, et entre les deux quand le tableau déborde de son cadre ou qu'un
     de ses en-têtes ne tient pas dans sa colonne (il l'enlève dès que le tableau tient : fenêtre élargie, repli ouvert). Les fiches de table.en-fiches, plus bas, ne valent
     qu'au-dessus de 44 rem : au téléphone, ce sont toujours celles de table.fiches. Un écran qui arrange ses fiches du téléphone
     (table.X.fiches dans @media (max-width: 44rem)) donne la même règle pour table.X.en-fiches dans @media (min-width: 44.01rem).
   - Rien en moins : chaque valeur et chaque geste d'une rangée restent, dans le même ordre ; seule la mise en page change. */
.cadre-tableau { overflow-x: auto; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); margin: 0 0 1.5rem; box-shadow: var(--ombre); }
table.tient th, table.tient td { white-space: normal; overflow-wrap: break-word; padding: .6rem .75rem; }
table.tient thead th { vertical-align: bottom; overflow-wrap: normal; }
table.tient td.large { min-width: 0; }
table.tient .court { white-space: nowrap; }
table.tient .nombre { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
table.tient .coupe { overflow-wrap: anywhere; }
table.tient:not(.en-fiches) td.coupe { min-width: 9rem; }
table.tient .empile { display: grid; gap: .2rem; justify-items: start; }
table.tient .empile > .note { margin: 0; }
table.tient .empile > .avis { margin: 0; padding: .35rem .6rem; }  /* un avis dans une case (le bureau que le chantier chevauche, 30 octobre 2026) */
.pastille.eteinte { color: var(--doux); background: var(--papier-2); }
@media (max-width: 44rem) {
  /* la fiche : une valeur courte peut passer à la ligne, un montant se lit à gauche comme le reste, chaque lien se touche du doigt */
  table.tient.fiches .court, table.tient.fiches .nombre { white-space: normal; }
  table.tient.fiches .nombre { text-align: left; }
  table.tient.fiches th[scope=row] a, table.tient.fiches td a { display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: .3em; min-height: 44px; }
}
@media (min-width: 44.01rem) {
  /* table.en-fiches : les fiches du téléphone (plus bas, « Tableaux en fiches »), pour un tableau qui ne tient pas entre le téléphone
     et l'ordinateur. Par enfants directs (>) : un tableau dans une case (les sous-codes du Coût Total) se décide pour lui-même. */
  table.tient.en-fiches > thead { display: none; }
  table.tient.en-fiches, table.tient.en-fiches > tbody, table.tient.en-fiches > tfoot, table.tient.en-fiches > * > tr,
  table.tient.en-fiches > * > tr > th[scope=row] { display: block; }
  table.tient.en-fiches > * > tr { padding: .8rem 1rem; border-bottom: 1px solid var(--pierre); }
  table.tient.en-fiches > tbody > tr:last-child { border-bottom: 0; }
  table.tient.en-fiches > tfoot > tr { border-bottom: 0; border-top: 1px solid var(--pierre); background: var(--papier); }
  table.tient.en-fiches > * > tr > td, table.tient.en-fiches > * > tr > th[scope=row] { border: 0; padding: .25rem 0; white-space: normal; text-align: left; background: transparent; }
  table.tient.en-fiches > * > tr > td { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .1rem .75rem; align-items: center; overflow-wrap: anywhere; min-width: 0; }
  table.tient.en-fiches > * > tr > td::before { content: attr(data-titre); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); overflow-wrap: normal; }
  table.tient.en-fiches > * > tr > td:empty { display: none; }
  table.tient.en-fiches > * > tr > td > .pastille { justify-self: start; margin: 0; }  /* une pastille garde sa taille dans la fiche */
  table.tient.en-fiches > * > tr > th[scope=row] { font-size: 1.05rem; font-weight: 600; padding-bottom: .4rem; }
  table.tient.en-fiches > tbody > tr:hover > * { background: transparent; }
  table.tient.en-fiches .court, table.tient.en-fiches .nombre { white-space: normal; }
  table.tient.en-fiches .nombre { text-align: left; }
  table.tient.en-fiches > * > tr > th[scope=row] a, table.tient.en-fiches > * > tr > td a { display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: .3em; min-height: 44px; }
}

/* ---------- Niveaux d'accès : la matrice tient dans la largeur (PL, 27 octobre 2026) ----------
   À l'ordinateur, chaque case au centre de sa colonne ; les colonnes des niveaux serrées (le nom d'un niveau en minuscules, sur deux
   lignes au besoin, moins de marge, le bouton « Enregistrer » moins large) pour laisser la place aux droits : à 1 280 px, la matrice
   rétrécie au plus prend 79 % de la largeur (93 % sans ces règles), et un 8e niveau tiendrait encore.
   En fiches (table.en-fiches : au téléphone, et entre le téléphone et l'ordinateur quand la matrice ne tient pas) : un bloc par
   niveau, dans l'ordre des colonnes : son nom, chaque droit et sa case (toute la ligne se touche du doigt, 44 px), puis son bouton
   « Enregistrer » juste dessous, qui redit le niveau ; le superutilisateur (toujours tout, rien à changer) en dernier. Une fiche par
   droit faisait 24 000 px de haut au téléphone, et le bouton d'un niveau venait 23 000 px sous sa première case (relecture du
   27 octobre 2026). La grille remet ensemble les cases d'une même colonne : order = --rang, posé par le gabarit ; le nom du droit
   vient de data-droit. */
main.acces table.matrice-acces label.case-droit { display: flex; align-items: center; margin: 0; cursor: pointer; }
main.acces table.matrice-acces tfoot > tr > * { background: var(--papier); border-bottom: 0; }
@media (min-width: 44.01rem) {
  main.acces table.matrice-acces:not(.en-fiches) thead th, main.acces table.matrice-acces:not(.en-fiches) td { padding-left: .4rem; padding-right: .4rem; }
  main.acces table.matrice-acces:not(.en-fiches) thead th:not(:first-child) { text-transform: none; letter-spacing: 0; font-size: .8rem; line-height: 1.3; }
  main.acces table.matrice-acces:not(.en-fiches) thead th:not(:first-child), main.acces table.matrice-acces:not(.en-fiches) td { text-align: center; }
  main.acces table.matrice-acces:not(.en-fiches) tbody th[scope=row] { font-weight: 400; }
  main.acces table.matrice-acces:not(.en-fiches) label.case-droit { justify-content: center; min-height: 2rem; }
  main.acces table.matrice-acces:not(.en-fiches) tfoot button { padding-left: .6rem; padding-right: .6rem; }
}
main.acces table.matrice-acces.en-fiches { display: grid; grid-template-columns: minmax(0, 1fr); }
main.acces table.matrice-acces.en-fiches > thead, main.acces table.matrice-acces.en-fiches > tbody,
main.acces table.matrice-acces.en-fiches > tfoot, main.acces table.matrice-acces.en-fiches > * > tr { display: contents; }
/* « Droit », le nom du droit en tête de rangée (redit dans chacune de ses cases), « Enregistrer » en tête du pied */
main.acces table.matrice-acces.en-fiches > * > tr > :first-child { display: none; }
main.acces table.matrice-acces.en-fiches > * > tr > * { order: var(--rang); display: block; padding: 0 1rem; border: 0; background: var(--blanc); text-align: left; white-space: normal; }
main.acces table.matrice-acces.en-fiches > thead th { padding: .85rem 1rem .5rem; background: var(--papier); color: var(--encre); font-size: .8rem; }
main.acces table.matrice-acces.en-fiches > tbody td { border-bottom: 1px solid var(--papier-2); }
main.acces table.matrice-acces.en-fiches > tbody > tr:last-child > td { border-bottom: 0; }
main.acces table.matrice-acces.en-fiches > * > tr > td::before { display: none; }  /* le nom du niveau : le titre du bloc le dit */
main.acces table.matrice-acces.en-fiches label.case-droit { justify-content: space-between; gap: .75rem; min-height: 44px; padding: .3rem 0; }
main.acces table.matrice-acces.en-fiches label.case-droit::before { content: attr(data-droit); overflow-wrap: anywhere; }
main.acces table.matrice-acces.en-fiches label.case-droit input { flex: none; }
main.acces table.matrice-acces.en-fiches > tfoot td { padding: .6rem 1rem 1rem; background: var(--blanc); border-bottom: 1px solid var(--pierre); }  /* la fin du bloc */
main.acces table.matrice-acces.en-fiches > tfoot td:empty { display: none; }  /* le superutilisateur : rien à enregistrer */
main.acces table.matrice-acces.en-fiches > tfoot button { width: 100%; min-height: 44px; }
main.acces table.matrice-acces.en-fiches > tfoot button::after { content: " · " attr(data-niveau); }

.heures td, .heures thead th:not(:first-child), .heures tfoot td { text-align: right; }
/* le nom du gars : sur une ligne quand il y a la place ; il passe à la ligne plutôt que d'élargir le tableau (le motif commun) */
.heures th[scope=row] { font-weight: 500; }
.heures th[scope=row] .note { font-weight: 400; margin-left: .35rem; }
.heures .projet { display: block; font-size: .75rem; color: var(--doux); white-space: normal; max-width: 9rem; margin-left: auto; line-height: 1.25; }
.heures tfoot > tr > * { background: var(--papier); border-bottom: 0; font-weight: 600; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* Mes heures : la bande des jours de la semaine */
.jours { display: grid; grid-template-columns: auto repeat(7, 1fr) auto; gap: .25rem; margin: 0 0 .75rem; }
.jours a { display: grid; justify-items: center; align-content: center; gap: .1rem; min-height: 64px; padding: .4rem .1rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); text-decoration: none; color: var(--encre); font-size: .8rem; line-height: 1.2; }
.jours a .nom { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
.jours a .num { font-family: var(--titres); font-size: 1.2rem; font-weight: 600; }
.jours a .h { font-size: .72rem; color: var(--bronze-2); font-weight: 600; min-height: 1em; white-space: nowrap; }
.jours a[aria-current=date] { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
.jours a[aria-current=date] .nom, .jours a[aria-current=date] .h { color: var(--bronze-clair); }
.jours a.futur { opacity: .45; }
.jours a.fleche { font-size: 1.4rem; padding: 0 .5rem; color: var(--doux); }
.journee { display: grid; gap: .75rem; }
.punch { display: grid; gap: .75rem; margin-bottom: 1rem; }
.punch button.gros { min-height: 52px; font-size: 1.05rem; justify-self: start; width: 100%; max-width: 20rem; }
.etat-punch { margin: 0; font-size: 1.05rem; }
.a-la-main summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
/* La journée d'un gars, côté contremaître : son punch toujours en haut, « Ajuster le punch », le compteur de la répartition (PL, 16 octobre 2026) */
.punch-gars { background: var(--papier); border: 1px solid var(--pierre); border-left: 4px solid var(--bronze); border-radius: var(--rayon); padding: .65rem .85rem; margin: 0 0 1rem; }
.punch-gars p { margin: .15rem 0; overflow-wrap: anywhere; }
.punch-gars .punch-titre { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--bronze-2); }
.punch-gars .punch-ligne { font-size: 1.05rem; }
.ajuster-punch { margin: 0 0 1.25rem; }
.ajuster-punch > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.ajuster-punch[open] > summary { margin-bottom: .5rem; }
.reparti { margin: 0; font-size: .95rem; }
.reparti:empty { display: none; }
.reparti .trop, .reparti .reste { color: var(--erreur-texte); font-weight: 600; }
.reparti .juste { color: var(--ok-texte); font-weight: 600; }
/* Plusieurs chantiers le même jour : un bloc par bout, le total du jour, « Je commence sur un autre chantier » (PL, 10 octobre 2026) */
.bout + .bout { border-top: 1px solid var(--papier-2); padding-top: .75rem; margin-top: .75rem; }
.total-jour { margin: .75rem 0; padding-top: .75rem; border-top: 1px solid var(--papier-2); font-size: 1.05rem; }
.autre-chantier { margin: .75rem 0 1rem; }
.autre-chantier > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; width: 100%; max-width: 20rem; box-sizing: border-box; padding: .6rem 1.3rem; border-radius: 999px; border: 1.5px solid var(--encre);
  background: var(--blanc); color: var(--encre); font-weight: 600; font-size: 1.05rem; }
.autre-chantier > summary::-webkit-details-marker { display: none; }
.autre-chantier[open] > summary { background: var(--encre); color: var(--blanc); margin-bottom: .75rem; }
.ligne-heures.trois { grid-template-columns: 1fr 1fr 5rem; }
.lignes-heures { display: grid; gap: .5rem; }
.ligne-heures { display: grid; grid-template-columns: minmax(0, 1fr) 6rem; gap: .5rem; }
.ligne-heures input { text-align: right; }
.journee button { justify-self: start; }
.journee .ligne { align-items: center; }
.journee .ligne button { min-height: 44px; padding-top: 0; padding-bottom: 0; font-size: .92rem; }  /* les deux boutons, même hauteur */
.semaine-nav { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: 0 0 .5rem; }
.equipe td { vertical-align: top; }
.equipe .case { display: block; text-decoration: none; color: inherit; padding: .2rem .35rem; border-radius: 4px; border: 1px solid transparent; }
.equipe .case.attente { background: #fdf6e7; border-color: #ead9b8; }
.equipe .case.ok { background: var(--ok-fond); }
.equipe .case.vide { color: var(--pierre); text-align: center; font-size: 1.2rem; }
.equipe .case:hover { border-color: var(--bronze); }
/* Semaine de l'équipe (PL, 28 octobre 2026 : « J'aimerais qu'on ne soit pas obligé de slider gauche-droite ») : le total de la
   semaine et « Approuver N jours » (ou « ✓ tout approuvé ») sous le nom du gars, plutôt que deux colonnes au bout du tableau ; au téléphone, en haut
   de sa fiche. Le dimanche et le samedi où personne n'a travaillé se serrent (td.jour-vide), leur « + » gardé. Une tablette se
   touche du doigt, en tableau comme en fiches : le bouton et chaque « + » font 44 px (relecture du 28 octobre 2026). */
.equipe th[scope=row] { vertical-align: top; }
.equipe .semaine-gars { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; margin-top: .35rem; font-weight: 400; }
.equipe .semaine-gars form { margin: 0; }
.equipe .semaine-gars button { white-space: nowrap; min-height: 44px; }
.equipe .total-gars { white-space: nowrap; font-variant-numeric: tabular-nums; }
.equipe .tout-approuve { color: var(--ok-texte); font-weight: 600; white-space: nowrap; }
/* en tableau : la colonne du nom ne prend que sa place (le bouton « Approuver 7 jours » y tient), les jours se partagent le reste,
   un peu moins de marge dans leurs cases ; un long nom de chantier tient ainsi sur moins de lignes (relecture du 28 octobre 2026 :
   un nom de 55 lettres faisait 4 lignes à l'ordinateur) */
table.equipe:not(.en-fiches) > tbody > tr > th[scope=row] { width: 11rem; }
table.equipe:not(.en-fiches) > tbody > tr > td { padding-left: .4rem; padding-right: .4rem; }
table.equipe:not(.en-fiches) .case.vide { min-height: 44px; display: grid; align-content: center; }
table.equipe:not(.en-fiches) .jour-vide { width: 2.75rem; padding-left: 0; padding-right: 0; text-align: center; }
table.equipe:not(.en-fiches) .jour-vide .case.vide { padding-left: 0; padding-right: 0; min-width: 2.75rem; }
@media (min-width: 44.01rem) {
  /* une case de jour garde au moins 7 rem : sur une tablette debout, où sept jours n'ont plus la place, la semaine passe en fiches
     (table.en-fiches, app.js) plutôt que d'empiler le nom du chantier un mot par ligne (relecture du 28 octobre 2026) */
  table.equipe:not(.en-fiches) td:not(.jour-vide) .case { min-width: 7rem; }
  /* en fiches entre le téléphone et l'ordinateur (table.en-fiches, app.js) : les fiches des heures du téléphone (plus bas, « Heures :
     le jour à gauche ») ; la Semaine de l'équipe garde ses cases de 44 px et son bouton à côté du total */
  table.heures.en-fiches > * > tr > td { grid-template-columns: 5.75rem minmax(0, 1fr); align-items: baseline; }
  table.heures.en-fiches > * > tr > td > * { grid-column: 2; }
  table.heures.en-fiches .projet { margin: 0; max-width: none; }
  table.heures.en-fiches th[scope=row] .note { display: block; margin: 0; }
  table.equipe.en-fiches > * > tr > td { align-items: center; }
  table.equipe.en-fiches .case { min-height: 44px; display: grid; align-content: center; }
  table.equipe.en-fiches .case.vide { text-align: left; }
  table.equipe.en-fiches .semaine-gars form { flex: 0 1 18rem; }
  table.equipe.en-fiches .semaine-gars button { width: 100%; }
}

/* Rapport journalier */
.rapport label textarea { font: inherit; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); width: 100%; resize: vertical; min-height: 44px; }
.rapport .carte { display: grid; gap: .75rem; }
.rapport .carte h2 { margin-bottom: 0; }
.rapport button { justify-self: start; }
/* Texte du rapport pas encore enregistré : gardé dans le téléphone et remis au retour (app.js, piège du 10 octobre 2026) */
.brouillon-etat { display: grid; gap: .5rem; padding: .6rem .8rem; border-left: 3px solid var(--bronze); border-radius: var(--rayon); background: #fdf6e7; }
.brouillon-etat p { margin: 0; font-size: .9rem; color: #7a5a1c; overflow-wrap: anywhere; }
.rapport .brouillon-remis { border-color: var(--bronze); background: #fffaf0; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.photos figure { margin: 0; display: grid; gap: .3rem; }
.photos img { width: 100%; height: 9rem; object-fit: cover; border-radius: 4px; border: 1px solid var(--pierre); background: var(--papier-2); }
.photos figcaption { font-size: .8rem; color: var(--encre-2); line-height: 1.3; }
.photos form { margin: 0; }
input[type=file] { padding: .4rem; }

.statut-projet { margin: 0 0 1.25rem; }
.statut-projet .note { margin: 0; flex-basis: 100%; }

.fiche dd form.en-ligne { display: inline; margin-left: .35rem; }
.fiche dd form.en-ligne button, .note form.en-ligne button { padding: .1rem .6rem; min-height: 0; font-size: .8rem; }
.note form.en-ligne { display: inline; }
/* rapport du jour, « Pris à la shop » : « Corriger » et « Retirer » sous chaque ligne ; « Corriger » s'ouvre sur toute la largeur */
.gestes-conso { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .4rem .5rem; margin: .35rem 0 .2rem; }
.fiche dd .gestes-conso form.en-ligne { margin-left: 0; }
.corriger-conso > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; padding: .1rem .6rem; border: 1.5px solid var(--pierre); border-radius: 999px; font-size: .8rem; font-weight: 600; }  /* la graisse de son voisin « Retirer » (PL, 6 novembre 2026) */
.corriger-conso > summary::-webkit-details-marker { display: none; }
.corriger-conso > summary:hover { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
.corriger-conso[open] { flex: 1 1 100%; min-width: 0; padding: .6rem .75rem .75rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: #fdfaf3; }
.corriger-conso[open] > summary { background: var(--papier-2); border-color: var(--pierre); color: var(--encre); }
.corriger-conso form { margin-top: .6rem; }
@media (max-width: 44rem) {
  .corriger-conso > summary, .fiche dd .gestes-conso form.en-ligne button { min-height: 44px; padding: 0 1rem; font-size: .9rem; }
}

.tuiles.chiffres .tuile strong { font-size: 1.35rem; }
table.couts tr.titre th, table.couts tr.titre td { background: var(--papier); font-weight: 600; }
table.couts tr.depasse td.revise { color: var(--erreur-texte); font-weight: 600; }  /* par sa classe : la colonne Statut la décale */
table.couts td:nth-child(n+3) { text-align: right; white-space: nowrap; }
main.large { max-width: 104rem; }  /* le Coût Total : ses dix colonnes tiennent sans défiler à l'ordinateur */
table.couts th, table.couts td { padding-left: .55rem; padding-right: .55rem; }
table.couts thead th { white-space: normal; vertical-align: bottom; }
/* L'en-tête du Coût Total, en ménage (PL, 24 octobre 2026) : une ligne grise collée au titre (d'où vient chaque chiffre), une seule
   rangée de boutons pareils, puis les tuiles ; « Par code », « Touche un code pour sa page » et « Que veut dire chaque colonne ? »
   sur une même ligne au-dessus du tableau (ouvert, le lexique prend toute la largeur dessous). */
main.cout-total .sources-cout, .etat-estimation { max-width: none; margin: -.5rem 0 .9rem; }
.actions-cout { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; }
/* Le bas du Coût Total (PL, 27 octobre 2026) : « Bons de commande » et « Factures » chacun dans un pli fermé au départ. Le titre
   garde l'allure des autres titres de la page, une flèche devant dit qu'il s'ouvre ; toute la ligne se touche (44 px). */
details.pli-bas { margin: 2rem 0 0; }
details.pli-bas > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; min-height: 44px; }
details.pli-bas > summary::-webkit-details-marker { display: none; }
details.pli-bas > summary::before { content: "›"; color: var(--bronze-2); font-weight: 700; font-size: 1.1rem; line-height: 1; transition: transform .15s; }
details.pli-bas[open] > summary::before { transform: rotate(90deg); }
details.pli-bas > summary h2 { margin: 0; }
details.pli-bas[open] > summary { margin-bottom: .75rem; }
details.pli-bas + details.pli-bas { margin-top: .75rem; }
details.pli-bas[open] + details.pli-bas { margin-top: 2rem; }
/* « Immeubles désactivés » (demande de PL du 17 novembre 2026), sous la liste de la page Immeubles et de Correspondances QuickBooks,
   partie Immeubles : un pli fermé, une petite fiche par immeuble, « Réactiver » (44 px). Rien de plus large que l'écran. */
details.immeubles-desactives article.immeuble-desactive { margin: 0 0 .6rem; padding: .75rem 1rem; min-width: 0; overflow-wrap: anywhere; }
details.immeubles-desactives article.immeuble-desactive h3 { margin: 0 0 .3rem; font-size: 1rem; }
details.immeubles-desactives article.immeuble-desactive .pastille { margin-left: .35rem; }
details.immeubles-desactives p.sous { display: block; margin: 0; color: var(--doux); font-size: .9rem; }
details.immeubles-desactives form { margin: .6rem 0 0; }
details.immeubles-desactives button { min-height: 44px; }
details.immeubles-desactives > summary h2 .sous { display: inline; color: var(--doux); font-weight: 400; }
/* L'en-tête de l'estimation, pareil (PL, 25 octobre 2026) : la ligne grise d'état, la même rangée (.actions-cout) où « Geler la
   projection » est un formulaire et « Dégeler la projection », « Changer de projet » des panneaux qui s'ouvrent ; ouvert, un panneau
   s'ouvre sous son bouton, qui reste à sa place, foncé. « Comment ça marche ? » juste dessous, replié. */
.etat-estimation .entier { white-space: nowrap; }
.actions-estimation { align-items: flex-start; }
.actions-estimation > form { margin: 0; display: flex; }
.panneau-entete > summary { list-style: none; cursor: pointer; }
.panneau-entete > summary::-webkit-details-marker { display: none; }
/* ouvert, un panneau s'étire à droite de son bouton, qui ne bouge pas (relecture du 25 octobre 2026 : en passant seul à la ligne, il
   sautait sous la souris) ; s'il reste moins de 24rem sur la ligne, il passe à la ligne suivante */
.panneau-entete[open] { flex: 1 1 24rem; }
.panneau-entete[open] > summary, .panneau-entete[open] > summary:hover { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
.panneau-entete > .panneau, details.aide-entete > .panneau { margin: .5rem 0 0; padding: .85rem 1rem; display: grid; gap: .6rem; background: var(--blanc);
  border: 1px solid var(--pierre); border-radius: var(--rayon); box-shadow: var(--ombre); max-width: 48rem; }
.panneau-entete .panneau > *, details.aide-entete .panneau > * { margin: 0; }
.panneau-entete .statut-projet { flex-wrap: wrap; }  /* l'explication du rattachement sous le menu et le bouton, plus à côté */
.panneau-entete .ligne > label.large { flex: 1 1 16rem; }
details.aide-entete { margin: -1rem 0 1.25rem; }
details.aide-entete > summary { width: fit-content; }
details.aide-entete .panneau p { max-width: 65ch; }
.titre-par-code { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; margin: 2rem 0 .5rem; }
.titre-par-code > h2, .titre-par-code > .note { margin: 0; }
.titre-par-code > details.lexique { margin: 0 0 0 auto; }
.titre-par-code > details.lexique[open] { flex-basis: 100%; margin: 0 0 1rem; }
@media (max-width: 44rem) {
  .actions-cout { display: grid; grid-template-columns: 1fr 1fr; }
  .actions-cout .bouton.discret { padding-left: .5rem; padding-right: .5rem; }
  .actions-cout .bouton:last-child:nth-child(odd) { grid-column: 1 / -1; }  /* un nombre impair : le dernier prend la rangée */
  /* l'estimation : le bouton d'un formulaire ou d'un panneau remplit sa case comme un lien ; deux cases égales, quoi qu'il y ait dedans */
  .actions-estimation { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .actions-estimation > form > button, .actions-estimation > details > summary { display: flex; width: 100%; padding-left: .5rem; padding-right: .5rem; }
  .actions-estimation > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* ouvert, un panneau garde sa case : son bouton ne bouge pas sous le doigt et ne laisse pas de trou dans la rangée (relecture du
     25 octobre 2026). C'est le panneau, sous le bouton, qui prend toute la rangée : vers la droite depuis la case de gauche, vers la
     gauche depuis celle de droite (deux cases et l'écart de .5rem) ; le dernier, seul sur sa rangée, a déjà toute la largeur. */
  .actions-estimation > details[open] > .panneau { width: calc(200% + .5rem); }
  .actions-estimation > details[open]:nth-child(even) > .panneau { margin-left: calc(-100% - .5rem); }
  .actions-estimation > details[open]:last-child:nth-child(odd) > .panneau { width: auto; }
  .titre-par-code > details.lexique { margin-left: 0; flex-basis: 100%; }
}
table.couts td.large { min-width: 12rem; }
table.couts td a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--pierre); }
table.couts td a:hover { color: var(--bronze-2); border-bottom-color: var(--bronze-2); }
table.couts td.bon { color: var(--ok-texte); font-weight: 600; }
table.couts td.mauvais { color: var(--erreur-texte); font-weight: 600; }
/* La ligne « Total … » au bout de chaque section (PL, 24 octobre 2026) : en gras, sur un fond un peu plus foncé que le titre, un trait
   au-dessus ; ses montants à droite comme ceux des codes (son nom prend les deux premières colonnes) */
table.couts tr.total-section > *, table.couts tbody tr.total-section:hover > * { background: var(--papier-2); font-weight: 700; border-top: 1px solid var(--pierre); border-bottom-color: var(--pierre); }
table.couts tr.total-section td { text-align: right; white-space: nowrap; }

.periode { margin: .15rem 0; }
.periode span { font-size: .85rem; }
table.tient form.periode { flex-wrap: wrap; }  /* Taux horaires : une période passe à la ligne plutôt que d'élargir le tableau */
/* « Corriger » et « Retirer » d'une période vont ensemble (taux_horaires.html, gestes-periode) : à côté du taux s'ils y tiennent, sinon
   tous les deux sur la ligne du dessous, jamais « Retirer » seul (PL, 6 novembre 2026 : « j'aime pas ça quand ils sont sur deux
   lignes »). Un rembourrage de côté plus court, comme dans la grille des soumissions, pour qu'ils tiennent à côté du taux à
   l'ordinateur ; la hauteur, le texte et le rembourrage du haut et du bas restent ceux de tous les boutons. Au téléphone, sous le
   taux, côte à côte en parts égales ; empilés en entier s'ils ne tiennent pas (app.js, rangées). */
table.tient form.periode .gestes-periode { display: flex; flex-wrap: wrap; gap: .5rem; flex: 0 0 auto; }
table.tient form.periode .gestes-periode > button { padding-left: .8rem; padding-right: .8rem; white-space: nowrap; }
@media (max-width: 44rem) {
  table.tient form.periode .gestes-periode { flex: 1 1 100%; }
  table.tient form.periode .gestes-periode > button { flex: 1 1 0; }
}
.avis.en-ligne { display: inline-block; padding: .1rem .5rem; margin: 0; font-size: .8rem; }
label.coche { display: flex; align-items: center; gap: .6rem; min-height: 44px; cursor: pointer; margin: .25rem 0 .75rem; }
label.coche input[type=checkbox] { width: 1.4rem; height: 1.4rem; flex: none; }
.etat-rapport { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: .15rem .6rem; }
.etat-rapport.ouvert { background: #fdf6e7; color: #7a5a1c; border: 1px solid #ead9b8; }
.etat-rapport.soumis { background: var(--ok-fond); color: var(--ok-texte); border: 1px solid #c4d8c6; }
.bloquants { margin: .5rem 0 1rem; padding-left: 1.2rem; }
.bloquants li { margin: .2rem 0; }
.a-repartir { color: var(--erreur-texte); font-weight: 600; }
.bouton.discret { background: transparent; color: var(--encre); border-color: var(--pierre); }  /* la grosseur du bouton plein (PL, 6 novembre 2026) */
.bouton.discret:hover { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
.semaine-nav { align-items: center; justify-content: space-between; margin: 0 0 1rem; }
.semaine-tel { display: none; }
.paie .projet { display: block; font-size: .75rem; color: var(--doux); white-space: normal; line-height: 1.3; margin-top: .15rem; }
.paie td { vertical-align: top; }
.paie td > div { min-width: 0; }
.paie td.jour .projet { display: none; }  /* à l'ordinateur, le chantier est dans l'infobulle : le tableau tient dans l'écran */
.paie td.jour { white-space: nowrap; }
.paie tr.fait { background: var(--ok-fond); }
.paie .saisie-algo { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; margin: 0; }
.paie .saisie-algo input.court { width: 5.5rem; }
.paie thead th { padding-left: .5rem; padding-right: .5rem; }
table.paie td { padding-left: .5rem; padding-right: .5rem; }  /* table. : plus serré que le motif commun, qui donne .75rem */
.paie form.en-ligne { margin-top: .35rem; }
/* le motif commun (PL, 28 octobre 2026) : une case de jour passe à la ligne entre ses heures approuvées et celles en attente,
   jamais au milieu de « 8 h » ; en fiches entre le téléphone et l'ordinateur (table.en-fiches), le chantier sous les heures */
table.paie.tient td.jour strong, table.paie.tient td.jour .a-repartir { white-space: nowrap; }
/* un bouton (« Entré dans Algo », « Enlever la marque ») reste sur une ligne : trop étroit pour lui, le tableau passe en fiches
   (relecture du 28 octobre 2026 : à 768 px, la pilule « Entré dans Algo » se pliait sur trois lignes) ; le nom en haut de sa rangée */
table.paie.tient button { white-space: nowrap; }
table.paie.tient th[scope=row] { vertical-align: top; }
@media (min-width: 44.01rem) {
  table.paie.en-fiches td.jour .projet { display: block; }
  table.paie.en-fiches td.jour { white-space: normal; }
}

table.banque input.court { width: 5.5rem; }
table.banque td.note-banque input { width: 100%; min-width: 8rem; }  /* la note prend la place qui reste, sans élargir le tableau */

.code-texto { font-size: 1.6rem; letter-spacing: .3em; text-align: center; }

/* Estimation : accordéon des sections, petite fenêtre d'un code, soumissions */
.accordeon details { background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); margin: 0 0 .5rem; box-shadow: var(--ombre); }
.accordeon summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.1rem; cursor: pointer; min-height: 48px; list-style: none; }
.accordeon summary::-webkit-details-marker { display: none; }
.accordeon summary::before { content: "›"; display: inline-block; margin-right: .6rem; transition: transform .15s; color: var(--bronze-2); font-weight: 700; }
.accordeon details[open] > summary::before { transform: rotate(90deg); }  /* son pli à lui : un pli fermé dans une section ouverte garde sa flèche couchée (25 novembre 2026) */
.accordeon .titre-section { flex: 1; font-weight: 600; }
.accordeon .chiffres-section { display: flex; gap: 1.25rem; white-space: nowrap; }
.accordeon .chiffres-section .revise { color: var(--bronze-2); min-width: 6rem; text-align: right; }
.accordeon details > .defile, .accordeon details > .cadre-tableau { margin: 0; border: 0; border-top: 1px solid var(--papier-2); border-radius: 0; box-shadow: none; }
.accordeon details > .note { padding: .5rem 1.1rem; }
.accordeon .lien-bloc { background: none; border: 0; padding: 0; color: var(--bronze-2); font: inherit; cursor: pointer; text-align: left; min-height: 0; text-decoration: none; }
.accordeon .lien-bloc:hover { color: var(--encre); text-decoration: underline; background: none; }
@media (max-width: 44rem) { .accordeon .lien-bloc, table.codes-section a { display: inline-flex; align-items: center; min-height: 44px; } }
.total-estimation { display: flex; gap: 1.5rem; padding: .75rem 1.1rem; font-size: 1.05rem; }
.fenetre { border: 0; border-radius: var(--rayon); padding: 0; width: min(64rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); box-shadow: 0 20px 60px rgba(21, 23, 26, .35); }
.fenetre::backdrop { background: rgba(21, 23, 26, .45); }
.fenetre-barre { display: flex; justify-content: flex-end; padding: .5rem .75rem 0; }
.fenetre-contenu { padding: 0 1.5rem 1.5rem; overflow: auto; max-height: calc(100vh - 6rem); }
.fenetre-contenu h2 { margin-top: 0; font-family: var(--titres); font-size: 1.25rem; text-transform: none; letter-spacing: 0; color: var(--encre); }
.fenetre-contenu h3 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze-2); margin: 1.5rem 0 .5rem; }
.fenetre-fil { margin: .5rem 0 0; }
table.soumissions tr.retenue > * { background: #fdfaf3; }
.pastille { display: inline-block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ok-texte); background: var(--ok-fond); border-radius: 999px; padding: .1rem .5rem; margin-left: .35rem; }

/* Centre des factures (lecture seule) */
.avis.lecture { background: var(--papier-2); color: var(--encre-2); border-color: var(--bronze); }
.pastille.alerte { color: var(--erreur-texte); background: var(--erreur-fond); }
.pastille.neutre { color: var(--bronze-2); background: var(--papier-2); }
/* la main-d'œuvre louée (PL, 14 novembre 2026) : le nom du fournisseur, à sa taille même dans une fiche en grille (S+3 au téléphone) */
.pastille.louee { justify-self: start; width: fit-content; max-width: 100%; }
.onglets .compte { margin-left: .4rem; font-size: .78rem; color: var(--doux); background: var(--papier-2); border-radius: 999px; padding: 0 .45rem; }
/* « À corriger dans QuickBooks » sur la fiche d'une facture (vague 0) : le même pli que « Signaler une erreur » de Mon compte */
main.factures details.a-corriger-qbo { margin: 0 0 1.25rem; }
main.factures details.a-corriger-qbo textarea { font: inherit; font-size: 1rem; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); width: 100%; max-width: 100%; resize: vertical; min-height: 44px; }
main.factures details.a-corriger-qbo form { max-width: 34rem; }
.factures h3 { font-size: .95rem; margin: 1.25rem 0 .5rem; }
.factures .numero { color: var(--doux); font-weight: 400; font-size: .88em; white-space: nowrap; }
.factures .mauvais { color: var(--erreur-texte); font-weight: 600; }
.factures td.argent { text-align: right; }
table.factures th[scope=row] { white-space: normal; min-width: 11rem; }
table.factures td.large { min-width: 9rem; }
table.factures td.drapeaux { white-space: normal; min-width: 8rem; }
.drapeaux > span { display: flex; flex-wrap: wrap; gap: .3rem; }
.drapeaux .pastille { margin: 0; }
.bill-entete { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: start; }
.bill-solde { text-align: right; }
.bill-solde span { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); }
.bill-solde strong { font-family: var(--titres); font-size: 1.8rem; letter-spacing: -.02em; white-space: nowrap; }
.bill-cases { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; border-top: 1px solid var(--papier-2); margin-top: .75rem; padding-top: .5rem; }
.bill-cases .coche { margin: 0; cursor: default; }
.bill-lignes tr.negative td.argent { color: var(--erreur-texte); }
.fiche.bill-totaux { margin: 0 0 1.5rem auto; width: max-content; }
.fiche.bill-totaux dd { text-align: right; }
.suivi-bc { border: 1px dashed var(--pierre); border-radius: var(--rayon); padding: .75rem 1rem; margin: 1rem 0; background: var(--papier); }
.suivi-bc.depasse { border-style: solid; border-color: var(--erreur-texte); }
.suivi-bc h3 { margin-top: 0; }
.suivi-bc .avis { margin: .5rem 0; }
@media (max-width: 44rem) {
  /* Au téléphone, chaque lien se touche du doigt (44 px) */
  main.factures th a, main.factures td a, main.factures dd a, main.factures .note a, main.factures h3 a, main.factures figure a:not(.vignette) { display: inline-block; min-height: 44px; padding: .6rem 0; }
  main.factures table.fiches td.argent { text-align: left; }
  .bill-entete { grid-template-columns: 1fr; }
  .bill-solde { text-align: left; }
  .fiche.bill-totaux { width: auto; margin-left: 0; }
}

/* Profil */
.fiche { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0 0 .75rem; }
.fiche dt { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); padding-top: .2rem; }
.fiche dd { margin: 0; overflow-wrap: anywhere; }

/* Estimation */
.bloc h2 { margin-top: 0; }
.bloc h3 { font-size: .95rem; margin: 1.25rem 0 .5rem; }
.bloc .defile, .bloc .cadre-tableau { margin-bottom: .75rem; box-shadow: none; }
.grille input { width: 100%; min-width: 9rem; padding: .35rem .5rem; }
.grille input.court { min-width: 5.5rem; width: 6.5rem; text-align: right; }
.grille td.total { text-align: right; white-space: nowrap; }
.grille tfoot > tr > * { background: var(--papier); border-bottom: 0; }
.grille tr.nouvelle td { background: #fbfaf7; }
.bas-de-bloc { justify-content: space-between; align-items: flex-end; }
input.court { width: 8rem; text-align: right; }

.par-taux { border: 1px dashed var(--pierre); border-radius: var(--rayon); padding: .75rem 1rem; margin: .5rem 0 1rem; }
.par-taux.retenu { border-style: solid; border-color: var(--bronze); background: #fdfaf3; }
.par-taux h3 { margin-top: 0; }
.pastilles { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.pastilles li { border: 1px solid var(--pierre); border-radius: 999px; padding: .3rem .9rem; font-size: .9rem; background: var(--blanc); }

/* Bulle « Signaler » */
.bulle { position: fixed; right: 1rem; bottom: 1rem; z-index: 20; }
.bulle > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.3rem; border-radius: 999px; background: var(--encre); color: var(--blanc); font-weight: 600; box-shadow: 0 8px 24px rgba(21, 23, 26, .25); }
.bulle > summary::-webkit-details-marker { display: none; }
.bulle[open] > summary { background: var(--bronze-2); }
.bulle-formulaire { position: absolute; right: 0; bottom: 60px; width: min(24rem, calc(100vw - 2rem)); background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); padding: 1rem; box-shadow: 0 12px 32px rgba(21, 23, 26, .2); display: grid; gap: .75rem; }
.bulle-formulaire textarea { font: inherit; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); width: 100%; resize: vertical; }
.bulle-formulaire .note { margin: 0; }
main { padding-bottom: 6rem; }

/* Plans */
.tuile.plan img { width: 100%; height: auto; border: 1px solid var(--papier-2); border-radius: 3px; margin-bottom: .4rem; background: var(--blanc); }
/* les plans d'un projet côte à côte (PL, 27 octobre 2026) : la discipline en étiquette au-dessus de l'aperçu */
.tuile.plan .discipline-plan { justify-self: start; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--bronze-2); background: var(--papier); border: 1px solid var(--papier-2); border-radius: 999px; padding: .1rem .55rem; }
.jeux-plans { margin: 1.25rem 0 1rem; }
/* un titre long sans espace (le nom du fichier, souvent) se coupe au lieu d'élargir la carte et la page */
.tuile.plan { min-width: 0; }
.tuile.plan strong { overflow-wrap: anywhere; }
@media (max-width: 44rem) { .tuiles.jeux-plans { grid-template-columns: minmax(0, 1fr); } }
.anciennes-plans a { overflow-wrap: anywhere; }
.visionneuse { background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); padding: .75rem; margin: 0 0 1.5rem; }
.visionneuse-barre { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.visionneuse-barre a[aria-disabled=true] { opacity: .4; pointer-events: none; }
.visionneuse-page { overflow: auto; max-height: 75vh; border: 1px solid var(--papier-2); background: #e9e6df; touch-action: pan-x pan-y pinch-zoom; }
.visionneuse-page img { display: block; width: 100%; height: auto; }  /* ajustée à l'écran ; au doigt ou en « taille réelle » pour le détail */
.visionneuse-page.reelle img { width: 3200px; max-width: none; }
.apercus { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 0 .75rem; }
.apercus a { flex: 0 0 auto; text-decoration: none; color: var(--doux); font-size: .8rem; text-align: center; }
.apercus img { display: block; width: 160px; height: auto; border: 2px solid var(--pierre); border-radius: 3px; background: var(--blanc); }
.apercus a.courante img { border-color: var(--bronze); }

/* Éditeur de plans */
.feuille { position: relative; transform-origin: 0 0; }
/* Superposition : les lignes de cette page en rouge, celles de l'autre en bleu, les deux visibles (multiply) */
.feuille .couche { position: absolute; inset: 0; pointer-events: none; }
.feuille .couche.dessus { mix-blend-mode: multiply; transform-origin: 0 0; }
.feuille .couche img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.feuille .couche .teinte { position: absolute; inset: 0; mix-blend-mode: lighten; }
.feuille .couche .teinte.rouge { background: #c0392b; }
.feuille .couche .teinte.bleu { background: #2471a3; }
.feuille.superpose > img { visibility: hidden; }  /* la page de base s'affiche par sa couche teintée */
.superposer { display: grid; gap: .5rem; }
.superposer input[type=range] { width: 100%; }
.visionneuse-page.zoomable.alignement { cursor: move; }
.visionneuse-page.zoomable { overflow: hidden; height: 75vh; cursor: grab; touch-action: none; }
.visionneuse-page.zoomable:active { cursor: grabbing; }
.visionneuse-page.zoomable img { user-select: none; -webkit-user-drag: none; }
.outils .separateur { width: 1px; background: var(--pierre); margin: 0 .35rem; }
.feuille svg .poignee { cursor: move; }
.feuille svg .fleche { stroke-width: 3; }
.feuille svg .tete-fleche { stroke-width: 1; vector-effect: non-scaling-stroke; }
.feuille svg .note-boite { fill: #fff8dc; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.feuille svg .note-texte { font-family: var(--sans); fill: var(--encre); pointer-events: none; }
.action-plan textarea { font: inherit; width: 100%; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); }
.feuille svg.calques { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.feuille svg.calques.dessin { cursor: crosshair; }
.feuille svg polyline { fill: none; }
.feuille svg polyline, .feuille svg polygon { stroke-width: 3; vector-effect: non-scaling-stroke; }
.feuille svg .annotation { cursor: pointer; }
.feuille svg .etiquette text { font: 600 14px var(--sans); font-size: calc(13px / var(--z, 1)); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.feuille svg .numero { font-family: var(--sans); font-weight: 700; fill: #fff; pointer-events: none; }
.feuille svg .en-cours polyline { stroke-dasharray: 6 4; }
.outils-plan { display: grid; gap: .5rem; margin: 0 0 .75rem; }
.outils { display: flex; flex-wrap: wrap; gap: .35rem; }
.outils button[aria-pressed=true] { background: var(--encre); color: var(--blanc); border-color: var(--encre); }
.outils-plan .note { margin: 0; }
/* Les palettes d'outils du bandeau (Outils, Dessin, Superposer, Vue ; Tout montrer / Tout cacher) : des cases toutes pareilles, deux
   par ligne, à la grosseur commune (PL, 6 novembre 2026 : « tous sur la même ligne ou toute la même grosseur »). Sept outils
   n'entrent pas sur une ligne de 17 rem, et les empiler un par ligne allongerait trop le bandeau : une exception à faire trancher. */
.bandeau .outils { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bandeau .outils button { padding-left: .4rem; padding-right: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pastille-couleur { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: .4em; vertical-align: -.05em; }
#elements-page h3 { font-size: .95rem; margin: .75rem 0 .25rem; display: flex; align-items: center; gap: .4rem; }
#elements-page ul { margin: 0 0 .5rem 1.5rem; padding: 0; }
#elements-page li { margin: .2rem 0; }
/* Le take-off de Claude dans l'éditeur (lot 5, PL, 28 octobre 2026) : « À vérifier » en fiches par unité, le panneau d'un élément
   (sous le plan au téléphone, dans le bandeau ailleurs), la bande « Annuler » de quelques secondes. Au téléphone : boutons et replis
   de 44 px, un toucher choisit une proposition sur le plan (les autres éléments restent à regarder, comme avant) ; la bande va en
   haut de l'écran (en bas, elle tombait pile sur Accepter / Effacer / Suivante de l'élément suivant, « Annuler » sur « Suivante »).
   Au doigt, même sur un écran large (téléphone couché, tablette) : les gestes et les replis font 44 px. L'anneau d'un compteur
   choisi ne prend pas les touchers : « Corriger » glisse le rond. */
.takeoff-page { display: grid; gap: .6rem; margin: 0 0 1.25rem; min-width: 0; }
.takeoff-page > h2, .takeoff-page > h3, .takeoff-page > p { margin: 0; }
.takeoff-page > h3 { font-size: .95rem; }
.takeoff-page > button { justify-self: start; }
ul.cartes-takeoff { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.carte-takeoff { display: grid; gap: .3rem; margin: 0; padding: .6rem .75rem; background: var(--blanc); border: 1px solid var(--pierre); border-left: 3px solid var(--doux); border-radius: var(--rayon); min-width: 0; overflow-wrap: anywhere; }
.carte-takeoff.a-faire { border-left-color: var(--bronze); }
.carte-takeoff.absente { border-left-style: dashed; color: var(--encre-2); }
.carte-takeoff > p { margin: 0; }
.carte-takeoff .titre-carte { font-weight: 600; color: var(--encre); }
.regle-takeoff { margin: 0; padding-left: .5rem; border-left: 2px solid var(--bronze-clair); font-size: .85rem; color: var(--encre-2); overflow-wrap: anywhere; }
.gestes-takeoff { display: flex; flex-wrap: wrap; gap: .35rem; }
.action-plan .gestes-takeoff button { justify-self: auto; }
.action-plan .valeur-takeoff { margin: 0; }
details.pli-takeoff { min-width: 0; overflow-wrap: anywhere; }
details.pli-takeoff > summary { cursor: pointer; color: var(--bronze-2); font-weight: 600; font-size: .88rem; }
details.pli-takeoff > p, details.pli-takeoff > ul { margin: .35rem 0 0; }
ul.regles-page, ul.liste-takeoff { padding-left: 1.1rem; }
ul.liste-takeoff li { margin: .2rem 0; }
.feuille svg .annotation.choisi polyline:not(.zone-clic), .feuille svg .annotation.choisi polygon { stroke-width: 6; }
.feuille svg .annotation.choisi circle:not(.bordure-proposee):not(.anneau-choisi) { stroke: var(--encre); }
.feuille svg .anneau-choisi { pointer-events: none; }
.bande-annuler { position: fixed; z-index: 30; left: 50%; bottom: 1rem; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; max-width: calc(100vw - 2rem); box-sizing: border-box; margin: 0; padding: .45rem .5rem .45rem 1rem; background: var(--encre); color: var(--blanc); border-radius: 999px; box-shadow: 0 8px 24px rgba(21, 23, 26, .25); font-size: .92rem; }
.bande-annuler button { background: var(--blanc); color: var(--encre); border-color: var(--blanc); min-height: 36px; }
@media (min-width: 44.01rem) { .scene .panneau-takeoff { display: none; } }  /* à l'ordinateur, le panneau est dans le bandeau des outils */
@media (max-width: 44rem) {
  .scene .panneau-takeoff { margin: .5rem 1rem .75rem; }
  .takeoff-page > button, .gestes-takeoff > button { flex: 1 1 auto; justify-self: stretch; }
  details.pli-takeoff > summary { min-height: 44px; display: flex; align-items: center; }
  .takeoff-page .note a { display: inline-flex; align-items: center; min-height: 44px; }
  /* en haut de l'écran, sur toute la largeur moins la marge : jamais sur les gestes du panneau ni sur la bulle « Signaler » */
  .bande-annuler { left: 1rem; right: 1rem; top: calc(env(safe-area-inset-top, 0px) + .5rem); bottom: auto; transform: none; max-width: none; border-radius: var(--rayon); flex-wrap: nowrap; }
  .bande-annuler [data-bande-texte] { min-width: 0; }  /* le texte passe à la ligne à côté d'« Annuler » : la bande reste basse */
  .bande-annuler button { min-height: 44px; margin-left: auto; }
  .feuille svg.calques .annotation.takeoff { pointer-events: visiblePainted; }
}
@media (pointer: coarse) {
  .gestes-takeoff > button, .takeoff-page > button, .bande-annuler button { min-height: 44px; }
  details.pli-takeoff > summary { min-height: 44px; display: flex; align-items: center; }
}
.pastilles form.en-ligne { display: inline; margin-left: .35rem; }
/* le « × » d'une pastille, un bouton d'icône seul : il garde son texte d'avant (exception à la grosseur commune, 6 novembre 2026) */
.pastilles form.en-ligne button { font-size: .85rem; font-weight: 500; }
.pastilles form.en-ligne button { padding: 0 .5rem; min-height: 0; line-height: 1.4; }
/* au téléphone, le « × » qui retire un calque garde sa petite taille dans la pastille, mais se touche sur 44 px de côté */
@media (max-width: 44rem) {
  .pastilles form.en-ligne button { position: relative; }
  .pastilles form.en-ligne button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
  /* rapport du jour : « Retirer » d'un consommable ou d'un mouvement d'équipement, même taille à l'œil, 44 px au toucher */
  #consommables form.en-ligne button, #equipements form.en-ligne button { position: relative; }
  #consommables form.en-ligne button::after, #equipements form.en-ligne button::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; min-width: 44px; transform: translateY(-50%); }
}
/* Couleur par élément, marqueurs types, outils de dessin (Anthony, 9 octobre 2026) */
.pour-lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite-symboles { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.symbole { flex: 0 0 auto; vertical-align: middle; overflow: visible; }
.palette { display: grid; gap: .25rem; margin-top: .5rem; }
.titre-palette { font-size: .8rem; font-weight: 500; color: var(--encre-2); }
.pastilles-palette { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.pastilles-palette button { width: 1.75rem; height: 1.75rem; min-height: 0; padding: 0; border: 2px solid var(--blanc); border-radius: 50%; box-shadow: 0 0 0 1px var(--pierre); }
.pastilles-palette button:hover { border-color: var(--blanc); box-shadow: 0 0 0 2px var(--doux); }
.pastilles-palette button[aria-pressed=true] { box-shadow: 0 0 0 2px var(--encre); }
.pastilles-palette button.calque { width: auto; border-radius: 999px; padding: 0 .6rem 0 .45rem; background: var(--blanc); color: var(--encre); font-size: .78rem; font-weight: 500; display: inline-flex; align-items: center; }
.pastilles-palette button.calque:hover { color: var(--encre); }
.pastilles-palette button.calque .pastille-couleur { margin-right: .3em; }
.choix-types { display: flex; flex-wrap: wrap; gap: .3rem; }
.choix-types button { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem .25rem .35rem; font-size: .8rem; }
.choix-types button[aria-pressed=true] { background: var(--encre); color: var(--blanc); border-color: var(--encre); }
.feuille svg .trait { fill: none; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.feuille svg .zone-clic { fill: none; stroke: transparent; stroke-width: 14; vector-effect: non-scaling-stroke; pointer-events: stroke; }
.feuille svg .annotation .trait { pointer-events: none; }  /* la zone large, dessous, attrape le clic et le glisser */
.feuille svg .apercu-dessin .trait { stroke-dasharray: 6 4; pointer-events: none; }
.feuille svg.calques.crayon { cursor: crosshair; }
/* Éditeur de plans, demandes 8 à 14 (PL et Jason, 2 novembre 2026) : l'élément tracé à la main dont le panneau est ouvert ressort sur
   le plan (une note, un dessin aussi ; un marqueur ou un compteur a l'anneau du take-off) ; « Tout montrer » / « Tout cacher » et le
   nom d'un calque qui coche sa case ; les gestes de l'élément choisi (Renommer, Copier, Supprimer, Fermer). Au téléphone, un toucher
   choisit aussi un élément tracé à la main (son panneau va sous le plan) et, le temps d'une copie de note, le plan prend les touchers.
   Au doigt : boutons, cases et pastilles de 44 px ; à 375 px, les boutons passent à la ligne au lieu de déborder. */
.feuille svg .annotation.choisi .note-boite { stroke-width: 3.5; }
.feuille svg .annotation.choisi .trait { stroke-width: 6; }
.calques-tous { margin: 0 0 .25rem; }
#elements-page h3 label { display: inline-flex; align-items: center; gap: .4rem; font-size: inherit; font-weight: inherit; color: inherit; cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
#elements-page h3 label input { flex: none; margin: 0; }
.gestes-element { display: flex; flex-wrap: wrap; gap: .35rem; }
.action-plan .gestes-element button { justify-self: auto; }
@media (max-width: 44rem) {
  .feuille svg.calques .annotation { pointer-events: visiblePainted; }
  .feuille svg.calques.pose { pointer-events: auto; }
  .gestes-element > button, .calques-tous > button { flex: 1 1 auto; }
  #elements-page h3 label { min-height: 44px; }
  .action-plan .pastilles-palette button:not(.calque) { width: 44px; height: 44px; }
  .action-plan .pastilles-palette button.calque { height: 44px; }
  .action-plan textarea { font-size: 1rem; min-height: 44px; }  /* 16 px : l'iPhone ne zoome pas en touchant le champ */
}
@media (pointer: coarse) {
  .gestes-element > button, .calques-tous > button { min-height: 44px; }
  #elements-page h3 label { min-height: 44px; }
  .action-plan .pastilles-palette button:not(.calque) { width: 44px; height: 44px; }
  .action-plan .pastilles-palette button.calque { height: 44px; }
}
/* Un élément caché du plan (une note : Jason, 3 novembre 2026 ; tous les outils : PL, 4 novembre 2026) : dans la liste des éléments,
   plus pâle, avec sa marque « Caché » (ou « Cachée ») et « Montrer sur le plan », aussi dans le repli du take-off de Claude. Un long
   texte de note passe à la ligne au lieu de pousser la page de côté ; au doigt, les boutons font 44 px (la règle commune des boutons
   au téléphone, et celle-ci sur un écran large). */
#elements-page li { overflow-wrap: anywhere; }
#elements-page li.cachee { color: var(--doux); }
#elements-page li .marque-cachee { margin-left: 0; }
/* les gestes d'un élément (« Cacher du plan » ou « Montrer sur le plan », puis « Retirer » ; plans.js, ligneElement) : ensemble, sous
   son texte, côte à côte, ou empilés en entier quand ils ne tiennent pas (app.js, rangées), jamais « Retirer » seul sous l'autre ni
   collé à lui (PL, 6 novembre 2026 : « j'aime pas ça quand ils sont sur deux lignes »). Un rembourrage de côté plus court, comme dans
   la grille des soumissions : « Cacher du plan » et « Retirer » tiennent côte à côte dans les 19 rem du bandeau ; la hauteur, le
   texte et le rembourrage du haut et du bas restent ceux de tous les boutons. */
#elements-page li .gestes-liste { display: flex; flex-wrap: wrap; gap: .35rem .4rem; margin: .3rem 0 .15rem; }
#elements-page li .gestes-liste > button { padding-left: .8rem; padding-right: .8rem; white-space: nowrap; }
/* le mot d'un geste fait dans la liste, au téléphone debout : sous l'élément (plans.js, direDansListe) ; pour un compteur ou un
   marqueur type remontré, qui n'a plus sa ligne, à la place de celle-ci (plans.js, lotDuNom), sans puce */
#elements-page li .mot-liste { margin: .35rem 0 0; padding: .4rem .65rem; font-size: .88rem; }
#elements-page li.mot-seul { list-style: none; display: flow-root; }
/* la ligne du nom d'un compteur ou d'un marqueur type prend le focus quand un des siens y revient (plans.js, ligneDuNom) */
#elements-page li[data-ligne]:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
@media (pointer: coarse) {
  #elements-page li > button { min-height: 44px; }
  #elements-page li .gestes-liste > button { min-height: 44px; }
}
/* L'écran des types de marqueurs : des choix d'au moins 44 px, au téléphone comme à l'ordinateur */
form.type-marqueur { display: grid; gap: .75rem; max-width: 34rem; }
form.type-marqueur > button, form.type-marqueur > .ligne { justify-self: start; }
.choix-symboles, .choix-couleurs { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.choix-symboles legend, .choix-couleurs legend { font-size: .8rem; font-weight: 500; color: var(--encre-2); padding: 0; margin: 0 0 .3rem; }
.choix-symboles label, .choix-couleurs label { position: relative; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.choix-symboles input, .choix-couleurs input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.choix-symboles .visuel { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); }
.choix-couleurs .visuel { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--blanc); box-shadow: 0 0 0 1px var(--pierre); }
.choix-symboles input:checked + .visuel { border-color: var(--encre); box-shadow: 0 0 0 2px var(--encre); }
.choix-couleurs input:checked + .visuel { box-shadow: 0 0 0 3px var(--encre); }
.choix-symboles input:focus-visible + .visuel, .choix-couleurs input:focus-visible + .visuel { outline: 2px solid var(--bronze); outline-offset: 2px; }
ul.types-marqueur { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
ul.types-marqueur > li { margin: 0; }
.titre-type { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: 0 0 .75rem; }
.titre-type strong { font-size: 1.1rem; }
.titre-type .note { margin: 0; flex-basis: 100%; }
.liste-archives li svg.symbole { margin-right: .1rem; }
.compte-types { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.compte-types li { display: flex; align-items: center; gap: .6rem; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); padding: .55rem .8rem; min-height: 44px; }
.compte-types .note { display: block; margin: 0; font-size: .82rem; }
/* Les Règles du take-off (PL, 28 octobre 2026) : une fiche par règle, le texte en entier (il passe à la ligne, jamais de côté), son
   formulaire dans un repli ; la zone de texte suit la règle commune des champs (44 px, 16 px au téléphone : l'iPhone ne zoome pas) */
main.takeoff-regles .chapeau { font-size: 1.05rem; max-width: 65ch; margin: 0 0 .5rem; }
ol.regles-takeoff { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); }
ol.regles-takeoff > li { margin: 0; min-width: 0; }
main.takeoff-regles .texte-regle { margin: 0 0 .4rem; font-size: 1rem; overflow-wrap: anywhere; }
main.takeoff-regles .unite-regle { margin: 0 0 .5rem; color: var(--doux); font-size: .88rem; }
main.takeoff-regles details.modifier-fiche { margin: 0 0 .5rem; }
main.takeoff-regles form.regle-takeoff { display: grid; gap: .75rem; max-width: 34rem; }
main.takeoff-regles form.regle-takeoff > button, main.takeoff-regles details.modifier-fiche form > button { justify-self: start; }
main.takeoff-regles textarea { font: inherit; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); width: 100%; max-width: 100%; box-sizing: border-box; resize: vertical; min-height: 44px; }
main.takeoff-regles .regles-retirees .texte-regle { flex: 1 1 16rem; min-width: 0; margin: 0; }
@media (max-width: 44rem) {
  main.takeoff-regles textarea { font-size: 1rem; }
  main.takeoff-regles form.regle-takeoff > button, main.takeoff-regles details.modifier-fiche form > button { justify-self: stretch; }
}
/* L'envoi du take-off de Claude vers l'estimation (lot 6) : le motif commun des tableaux ; la case « Envoyer » dans une étiquette de
   44 px, qui ne prend pas de marge dans sa case ; au téléphone, elle va dans la colonne des valeurs de la fiche */
main.takeoff-envoi .chapeau { font-size: 1.05rem; max-width: 70ch; margin: 0 0 .75rem; }
main.takeoff-envoi form.choix-estimation { margin: 0 0 1rem; }
main.takeoff-envoi form.choix-estimation select { max-width: 100%; }
@media (min-width: 44.01rem) { main.takeoff-envoi form.choix-estimation select { max-width: 30rem; } }
table.envoi-takeoff label.coche { margin: 0; }
table.envoi-takeoff label.coche > span { min-width: 0; overflow-wrap: anywhere; }
table.envoi-takeoff label.coche > .empile > span:first-child { font-size: .95rem; color: var(--encre); }  /* ce qui part, pas plus petit que sa note */
@media (max-width: 44rem) {
  table.envoi-takeoff.fiches td > label.coche, table.envoi-takeoff.fiches td > span { grid-column: 2; }
  main.takeoff-envoi form > button { width: 100%; }
}
@media (min-width: 44.01rem) { table.envoi-takeoff.en-fiches td > label.coche, table.envoi-takeoff.en-fiches td > span { grid-column: 2; } }

/* ---------- Éléments d'un plan : « Mettre » et ses listes passent à la ligne au besoin (PL, 27 octobre 2026) ----------
   Avec deux estimations sur le projet, les deux listes et le bouton ne tenaient pas sur une ligne à côté des totaux : 126 px de trop
   à 1 280 px (essayé avec un nom d'estimation de 55 lettres). Une liste est aussi large que son plus long choix : avec une estimation
   au nom de 85 lettres (la démo de la mesure), la table rétrécie au plus prenait encore 93 % de la largeur. À l'ordinateur, chaque
   liste a donc une largeur maximale (22 rem : « Pieds linéaires de murs extérieurs (pi lin) » y tient) ; le choix ouvert montre
   toujours le nom au complet. Au téléphone, la liste prend la largeur de la fiche. */
main.plan-elements table.totaux-calques form.ligne.serree { flex-wrap: wrap; }
main.plan-elements table.totaux-calques form.ligne.serree select { max-width: 100%; }
@media (min-width: 44.01rem) { main.plan-elements table.totaux-calques form.ligne.serree select { max-width: 22rem; } }
/* la pastille du calque reste à côté de son nom : le nom passe à la ligne entre ses mots, jamais la pastille seule au-dessus */
main.plan-elements .avec-pastille { display: inline-flex; align-items: baseline; }

/* Atelier des plans : le plan prend l'écran, les options dans deux bandeaux (ordinateur) */
main.atelier-plan { max-width: none; padding: 0; }
.atelier { display: grid; grid-template-columns: 17rem minmax(0, 1fr) 19rem; min-height: 60vh; }
.bandeau { overflow: auto; padding: 1rem 1.1rem 2rem; background: var(--blanc); font-size: .92rem; }
.bandeau.gauche { border-right: 1px solid var(--pierre); }
.bandeau.droite { border-left: 1px solid var(--pierre); }
.bandeau h2 { margin: 1.25rem 0 .5rem; }
.bandeau h2:first-child { margin-top: 0; }
.bandeau .titre-plan { font-size: 1.25rem; margin: 0 0 .25rem; }
.bandeau .fil { margin: 0 0 .5rem; }
.bandeau .visionneuse-barre { margin: .5rem 0 1rem; }
.bandeau .visionneuse-barre span { font-size: .85rem; }
.bandeau .outils-plan { margin: 0; }
.action-plan { background: #fdfaf3; border: 1px solid var(--bronze-clair); border-radius: var(--rayon); padding: .75rem .85rem; margin: .5rem 0; display: grid; gap: .5rem; }
.action-plan .etape { margin: 0; font-weight: 600; color: var(--encre); }
.action-plan label { font-size: .8rem; }
.action-plan input { width: 100%; }
.action-plan button { justify-self: start; }
.action-plan .ligne.serree { flex-wrap: wrap; }  /* Enregistrer, Retirer, Fermer : sur deux lignes plutôt que de déborder du bandeau */
.feuille svg .elastique { stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.bandeau .outils-plan label { margin-top: .5rem; }
.bandeau .outils-plan select, .bandeau .outils-plan input { width: 100%; }
.bandeau .apercus { flex-direction: column; overflow: visible; }
.bandeau .apercus img { width: 100%; }
.bandeau .pastilles li { font-size: .85rem; }
.bandeau .ligne > label { flex: 1 1 100%; }
/* « Remplacer par une nouvelle version » (PL, 15 octobre 2026) : un bouton de 44 px qui ouvre le petit formulaire ; sur une ancienne
   version, le lien vers la version courante à la même place. Pleine largeur du bandeau, à l'ordinateur comme au téléphone. */
details.remplacer-version, .version-courante { margin: .25rem 0 1rem; }
details.remplacer-version > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: .6rem 1.3rem; border: 1.5px solid var(--encre); border-radius: 999px; background: var(--blanc); color: var(--encre); font-weight: 600; font-size: .92rem; }
details.remplacer-version > summary::-webkit-details-marker { display: none; }
details.remplacer-version > summary:hover { background: var(--encre); color: var(--blanc); }
details.remplacer-version[open] { padding: .6rem .75rem .75rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: #fdfaf3; }
details.remplacer-version[open] > summary { background: var(--papier-2); border-color: var(--pierre); color: var(--encre); }
details.remplacer-version form { display: grid; gap: .6rem; margin: .6rem 0 0; }
details.remplacer-version label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; min-width: 0; overflow-wrap: anywhere; }
details.remplacer-version input { width: 100%; max-width: 100%; min-height: 44px; }
details.remplacer-version input[type=file] { font-size: .9rem; }
details.remplacer-version form > button { width: 100%; min-height: 44px; }
details.remplacer-version .avis { margin: .6rem 0 0; }
details.remplacer-version .note { margin: .6rem 0 0; font-size: .85rem; overflow-wrap: anywhere; }
.version-courante .bouton { display: flex; width: 100%; min-height: 44px; }
.version-courante .avis { margin: 0 0 .6rem; }
.scene { position: relative; background: #e9e6df; min-width: 0; }
.scene #message-plan { position: absolute; top: .75rem; left: 50%; transform: translateX(-50%); z-index: 5; margin: 0; box-shadow: var(--ombre); }
/* au téléphone, le message prend la largeur de son texte, jusqu'à celle du plan moins les marges : placé à 50 % du bord, il était
   limité à la moitié de l'écran (6 lignes sur le plan ; relecture du 3 novembre 2026) */
@media (max-width: 44rem) {
  .scene #message-plan { width: max-content; max-width: calc(100% - 2rem); }
}
.scene .visionneuse-page { border: 0; height: 100%; max-height: none; }
@media (min-width: 44rem) {
  main.atelier-plan { padding-bottom: 0; }
  .atelier { height: calc(100vh - 4.6rem); }
  .bandeau-env ~ main .atelier { height: calc(100vh - 6.4rem); }
  .bandeau { height: 100%; }
  .scene .visionneuse-page.zoomable { height: 100%; }
}

/* Onglets d'une section */
.onglets { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; border-bottom: 1px solid var(--pierre); margin: 0 0 1.25rem; }
.onglets a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .25rem; text-decoration: none; color: var(--doux); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.onglets a[aria-current=page] { color: var(--encre); border-bottom-color: var(--bronze); }
.tuiles.grandes .tuile { padding: 1.6rem 1.25rem; min-height: 7.5rem; align-content: center; }  /* centré en hauteur, aligné à gauche */
.tuiles.grandes .tuile strong { font-size: 1.45rem; }

/* Accueil */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; }
/* Paramètres en quatre groupes (PL, 20 octobre 2026) : un titre par groupe, de l'air entre les groupes */
.groupe-parametres { margin-top: 1.75rem; }
.groupe-parametres > h2 { margin: 0 0 .75rem; }
.tuile { display: grid; gap: .3rem; background: var(--blanc); border: 1px solid var(--pierre); border-top: 3px solid var(--encre); border-radius: var(--rayon); padding: 1.1rem 1.2rem 1.25rem; text-decoration: none; color: var(--encre); box-shadow: var(--ombre); transition: border-color .2s, transform .15s; }
@media (hover: hover) { .tuile:hover { border-top-color: var(--bronze); transform: translateY(-2px); color: var(--encre); } }  /* au téléphone, l'effet restait collé après un toucher */
.tuile strong { font-family: var(--titres); font-weight: 600; font-size: 1.2rem; letter-spacing: -.01em; }
.tuile span { color: var(--doux); font-size: .88rem; }
.a-venir { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.a-venir li { border: 1px dashed var(--pierre); border-radius: 999px; padding: .3rem .9rem; font-size: .88rem; color: var(--doux); }

/* ---------- Téléphone ----------
   L'application sert surtout au téléphone. Chaque écran doit tenir dans 375 px de large,
   sans défilement de côté, avec des boutons d'au moins 44 px de haut. */
@media (max-width: 44rem) {
  main { padding: 1.25rem 1rem 6rem; }  /* la bulle « Signaler » ne cache pas la fin de la page */

  /* En-tête : logo, bouton Menu, puis le panneau */
  .entete { padding: .65rem 1rem; gap: .5rem 1rem; justify-content: space-between; }
  .js .bouton-menu { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; background: transparent; border-color: #5a5d62; color: var(--blanc); }
  .js .bouton-menu[aria-expanded=true] { background: var(--blanc); border-color: var(--blanc); color: var(--encre); }
  .menu { display: block; flex-basis: 100%; }
  .js .menu { display: none; }
  .js .menu.ouvert { display: block; }
  .entete nav { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .entete nav a { display: flex; align-items: center; min-height: 48px; padding: 0 .25rem; font-size: 1.05rem; border-bottom: 1px solid #2c2f34; }
  .entete nav a[aria-current=page] { color: var(--bronze-clair); border-bottom-color: #2c2f34; }
  /* Le nom, l'engrenage et « Se déconnecter » passent à la ligne quand ils n'entrent pas (rien ne déborde à 375 px) */
  .qui { justify-content: space-between; padding: .9rem .25rem .35rem; flex-wrap: wrap; gap: .5rem .9rem; }
  .qui button { white-space: nowrap; margin-left: auto; }
  .qui .moi { min-height: 44px; display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: .3em; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
  .qui .engrenage { width: 44px; height: 44px; }
  .fiche { grid-template-columns: 1fr; gap: 0 0; }
  .fiche dt { padding-top: .6rem; }
  .fiche dt:first-child { padding-top: 0; }

  /* Formulaires : un champ par ligne, pleine largeur, faciles à toucher */
  input:not([type=checkbox]), select, button, .bouton { min-height: 44px; }
  input:not([type=checkbox]), select { width: 100%; font-size: 1rem; }
  input[type=checkbox] { width: 1.5rem; height: 1.5rem; }
  .ligne { align-items: stretch; }
  .ligne > label, .ligne > button, .ligne > .bouton, .ligne > form { flex: 1 1 100%; }
  .ligne > form > button { width: 100%; }
  .ligne.serree { flex-wrap: wrap; }
  .ligne.serree > * { flex: 0 1 auto; }
  .ligne.serree select { width: auto; flex: 1 1 9rem; }
  .carte { padding: 1rem; }
  .etroite { margin: 1.5rem auto; padding: 1.25rem; }
  .tuiles { grid-template-columns: 1fr; gap: .75rem; }

  /* Tableaux en fiches : une fiche par rangée, le titre de la colonne à gauche de la valeur */
  table.fiches thead { display: none; }
  table.fiches, table.fiches tbody, table.fiches tfoot, table.fiches tr, table.fiches th[scope=row] { display: block; }
  table.fiches tr { padding: .8rem 1rem; border-bottom: 1px solid var(--pierre); }
  table.fiches tbody tr:last-child { border-bottom: 0; }
  table.fiches tfoot tr { border-bottom: 0; border-top: 1px solid var(--pierre); background: var(--papier); }
  table.fiches td, table.fiches th[scope=row] { border: 0; padding: .25rem 0; white-space: normal; text-align: left; background: transparent; }
  table.fiches td { display: grid; grid-template-columns: 6.75rem minmax(0, 1fr); gap: .1rem .75rem; align-items: center; overflow-wrap: anywhere; }
  table.fiches td::before { content: attr(data-titre); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); }
  table.fiches td:empty { display: none; }
  table.fiches td.large { min-width: 0; }
  table.fiches th[scope=row] { font-size: 1.05rem; font-weight: 600; padding-bottom: .4rem; }
  table.fiches tbody tr:hover > * { background: transparent; }

  .grille.fiches input, .grille.fiches input.court { width: 100%; min-width: 0; text-align: left; }
  .grille.fiches td.total { text-align: left; }
  .grille.fiches tr.nouvelle { background: #fbfaf7; }
  .bas-de-bloc > label { flex: 1 1 100%; }

  .visionneuse-page { max-height: 70vh; }
  .visionneuse-page.reelle img { width: 2400px; }
  .visionneuse-barre span { font-size: .85rem; }
  .outils-plan { display: none; }  /* au téléphone on regarde ; on trace à l'ordinateur */
  .atelier { display: flex; flex-direction: column; }
  .scene { order: -1; }  /* au téléphone : le plan d'abord, les listes après */
  .bandeau { border: 0; border-top: 1px solid var(--pierre); }
  .bandeau .apercus { flex-direction: row; overflow-x: auto; }
  .bandeau .apercus img { width: 160px; }
  .scene .visionneuse-page { max-height: 70vh; }
  /* le zoom à deux doigts dans le cadre (plans.js, PL, 16 octobre 2026) : un cadre fixe, qui laisse de la page à faire défiler dessous */
  .scene .visionneuse-page.zoomable { height: 55vh; max-height: none; }
  .feuille svg.calques { pointer-events: none; }

  /* Heures : le jour à gauche, les heures et le projet à droite */
  .heures.fiches td { grid-template-columns: 4.5rem minmax(0, 1fr); align-items: baseline; }
  .heures.fiches td > strong { grid-column: 2; }
  .heures.fiches .projet { grid-column: 2; margin: 0; max-width: none; }
  .heures.fiches th[scope=row] .note { display: block; margin: 0; }
  .equipe.fiches td { grid-template-columns: 5.75rem minmax(0, 1fr); }
  .equipe.fiches .case { min-height: 44px; display: grid; align-content: center; }
  .equipe.fiches .case.vide { text-align: left; }
  .equipe.fiches td > a, .equipe.fiches td > span { grid-column: 2; }
  /* en haut de la fiche, sous le nom : le total, puis « Approuver N jours » sur le reste de la ligne, facile à toucher */
  .equipe.fiches .semaine-gars { font-size: .95rem; }
  .equipe.fiches .semaine-gars form { flex: 1 1 10rem; }
  .equipe.fiches .semaine-gars button { width: 100%; }
  /* un lien dans une phrase (« Heures pour la paie », « Banque d'heures »…) se touche du doigt, comme ceux du fil de retour
     (.fil-retour, plus bas) : relecture du 28 octobre 2026, ils faisaient 39 px */
  .renvoi a { display: inline-flex; align-items: center; min-height: 44px; }
  .jours { grid-template-columns: repeat(7, 1fr); }
  .jours a.fleche { display: none; }
  .semaine-tel { display: flex; }
  /* « ‹ Précédente » et « Suivante › » (la semaine de l'équipe ; la facturation pareil, plus bas) : la date dessus, les deux boutons
     côte à côte en parts égales, leur texte sur une ligne (PL, 6 novembre 2026 : il passait sur deux lignes à 375 px) */
  nav.semaine-nav:not(.ligne) { flex-wrap: wrap; }
  nav.semaine-nav:not(.ligne) > strong { flex: 1 1 100%; order: -1; }
  nav.semaine-nav:not(.ligne) > .bouton { flex: 1 1 0; white-space: nowrap; }
  .ligne-heures.trois { grid-template-columns: 1fr 1fr; }
  .ligne-heures.trois .diner { grid-column: 1 / -1; }
  .paie td.jour .projet { display: block; }
  .paie td.jour { white-space: normal; }
  .journee button { justify-self: stretch; }
  .accordeon summary { flex-wrap: wrap; }
  .accordeon .chiffres-section { gap: .75rem; }
  .fenetre { width: calc(100vw - 1rem); }
  .fenetre-contenu { padding: 0 1rem 1rem; }
  .rapport button { justify-self: stretch; }
  .photos { grid-template-columns: 1fr 1fr; }

}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Archives (consommables, équipements) */
details.archives { margin: 1rem 0 2rem; }
details.archives summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--doux); }
.liste-archives { list-style: none; padding: 0; margin: .5rem 0; }
.liste-archives li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--papier-2); }

/* ---------- Employés (Paramètres) : la liste et la fiche ---------- */
main.employes .actions { margin: 0 0 1.25rem; }
main.employes .recherche { margin: 0 0 1rem; }
main.employes .champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .75rem 1rem; align-items: end; margin: 0 0 .75rem; }
main.employes .champs input, main.employes .champs select { width: 100%; }
main.employes .champs > button { grid-column: 1 / -1; justify-self: start; }
main.employes .compte-reste p { margin: 0 0 .6rem; }
main.employes .carte > .bouton { margin-top: .25rem; }
main.employes .periodes { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .35rem; }
main.employes .periodes .note { margin: 0; }
main.employes .etat-fiche .coche { margin-top: 0; }
.liste-employes td form { margin: 0; }
/* « Créer son compte » sur une ligne (relecture du 19 novembre 2026 : à 768 px, la colonne Accès le serrait à 153 px et le texte
   passait sur deux lignes, 67 px de haut ; la règle du 6 novembre : un texte de bouton sur une seule ligne) */
.liste-employes td form button { white-space: nowrap; }
/* Une personne, une page (décision de PL du 19 novembre 2026) : l'accès à l'application sur la fiche, court (« Employé · actif ·
   dernière connexion hier »), le reste dans le pli « Modifier l'accès » ; chaque geste à part, son titre au-dessus. Au bas de la liste, les comptes sans
   fiche, une ligne chacun. */
main.employes .resume-acces { margin: 0 0 .5rem; overflow-wrap: anywhere; }
main.employes details.modifier-acces > summary { list-style: none; gap: .5rem; color: var(--bronze-2); }  /* 44 px : .a-la-main */
main.employes details.modifier-acces > summary::-webkit-details-marker { display: none; }
main.employes details.modifier-acces > summary::before { content: "›"; font-weight: 700; font-size: 1.1rem; line-height: 1; transition: transform .15s; }
main.employes details.modifier-acces[open] > summary::before { transform: rotate(90deg); }
main.employes details.modifier-acces[open] > summary { margin-bottom: .25rem; }
main.employes .geste-acces { border-top: 1px solid var(--papier-2); padding: .75rem 0 0; margin: .75rem 0 0; min-width: 0; }
main.employes .geste-acces h3 { font-size: .95rem; margin: 0 0 .5rem; }
main.employes .geste-acces .note { margin: .5rem 0 0; }
main.employes .geste-acces form + .note, main.employes .geste-acces .note + form { margin-top: .5rem; }
main.employes .geste-acces .fiche { margin-bottom: 0; }
/* Le pli « Modifier l'accès », retouché (note de PL du 21 novembre 2026 : « présentation à ajuster un peu au niveau du menu déroulant
   Modifier l'accès, juste une question d'apparence ») : les formulaires de la section (le niveau, couper ou rendre l'accès, la
   connexion, détacher, et « Créer son compte ») sont une seule colonne, à l'ordinateur comme au téléphone. Chaque champ et chaque
   bouton y a la même largeur (24rem au plus, toute la largeur au téléphone), 44 px de haut et le même bord gauche ; le texte d'un
   champ a la grosseur de celui d'un bouton à l'ordinateur (au téléphone, 1rem, comme partout : sinon l'iPhone agrandit la page au
   toucher). Avant : le menu du niveau faisait 35 px de haut à côté d'un bouton de 44 px, le courriel 38 px, et chaque bouton avait
   sa largeur. Passe avant .ligne (« Créer son compte ») et .champs (la connexion), qui en faisaient des rangées. */
main.employes section.acces form { display: grid; grid-template-columns: minmax(0, 24rem); gap: .5rem; align-items: stretch; margin: .5rem 0 0; }
main.employes section.acces form > label { min-width: 0; }
main.employes section.acces form > button { width: 100%; justify-self: stretch; }
main.employes section.acces form input:not([type=checkbox]), main.employes section.acces form select { width: 100%; min-height: 44px; font-size: .92rem; }
main.employes .lot-comptes p { margin: .5rem 0 0; overflow-wrap: anywhere; }
/* les noms à créer : une liste sans virgules (relecture du 19 novembre 2026 : au téléphone, chaque nom est une boîte de 44 px, et la
   virgule qui la suivait commençait la ligne d'après) */
main.employes .lot-comptes ul.a-creer { list-style: none; padding: 0; margin: .25rem 0 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
main.employes .lot-comptes ul.a-creer li { overflow-wrap: anywhere; min-width: 0; }
main.employes .lot-comptes form { margin: .75rem 0 0; }
main.employes ul.comptes-sans-fiche { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; gap: .25rem; }
main.employes ul.comptes-sans-fiche li { overflow-wrap: anywhere; padding: .35rem 0; border-bottom: 1px solid var(--pierre); }
main.employes ul.comptes-sans-fiche li > a { font-weight: 600; }
main.employes ul.comptes-sans-fiche li > .note { display: block; margin: 0; }
main.employes ul.comptes-sans-fiche li.inactif, main.employes ul.comptes-sans-fiche li.inactif a { color: var(--doux); }
main.employes details.sans-fiche h3 { font-size: .95rem; margin: 1.25rem 0 .5rem; }
main.employes details.sans-fiche > summary h2 .sous { color: var(--doux); font-weight: 400; }
@media (max-width: 44rem) {
  /* au téléphone, chaque lien se touche du doigt (44 px) */
  .fil-retour a, main.employes .recherche + .note a, main.employes .vide a, main.employes table.fiches th a, main.employes table.fiches td a { display: inline-flex; align-items: center; min-height: 44px; }
  main.employes .champs > button { justify-self: stretch; }
  main.employes .actions .bouton, main.employes .carte > .bouton, main.employes .compte-reste .bouton { display: flex; align-items: center; justify-content: center; }
  table.tient.liste-employes td > .empile { justify-items: stretch; }  /* « Créer son compte » sur toute la largeur de la fiche */
  .liste-employes td form button { width: 100%; }
  main.employes ul.comptes-sans-fiche a, main.employes .lot-comptes p a, main.employes .lot-comptes .a-creer a, main.employes .geste-acces .note a { display: inline-flex; align-items: center; min-height: 44px; }
  main.employes .geste-acces form > button, main.employes.compte-sans-fiche .carte > form > button { width: 100%; }  /* comme les autres boutons de la fiche */
  main.employes section.acces form input:not([type=checkbox]), main.employes section.acces form select { font-size: 1rem; }  /* 21 novembre 2026 */
}

/* Paramètres → Modules */
label.coche.module { align-items: flex-start; padding: .5rem 0; border-bottom: 1px solid var(--papier-2); }
label.coche.module input { margin-top: .2rem; }

/* Rapport : PDF et suppression ; liste : export */
.actions-rapport { margin: 0 0 1rem; align-items: center; }
.actions-rapport form.en-ligne { display: inline; }
details.exporter { margin: 0 0 1.25rem; }
details.exporter summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--bronze-2); font-weight: 600; }

/* Rapport : membres de l'équipe, une fiche par gars, une ligne par code d'activité */
ul.equipe { list-style: none; margin: 0 0 .75rem; padding: 0; }
ul.equipe > li { padding: .7rem 0; border-bottom: 1px solid var(--papier-2); }
ul.equipe > li:first-child { padding-top: .2rem; }
.equipe-tete { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.equipe-nom { font-weight: 600; }
.equipe-nom a { display: inline-flex; align-items: center; min-height: 44px; line-height: 1.3; margin: -12px 0; }
.equipe-h { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.equipe-etat { margin: .15rem 0 0; font-size: .85rem; color: var(--doux); }
.ok-texte { color: var(--ok-texte, #2f6b3a); font-weight: 600; }
ul.repartition { list-style: none; margin: .45rem 0 0; padding: 0 0 0 .75rem; border-left: 3px solid var(--pierre, #d9d2c5); }
ul.repartition li { display: grid; grid-template-columns: 3.4rem 1fr auto; gap: .5rem; padding: .2rem 0; align-items: baseline; }
.rep-code { font-weight: 700; font-variant-numeric: tabular-nums; }
.rep-op { overflow-wrap: anywhere; }
.rep-h { white-space: nowrap; font-variant-numeric: tabular-nums; }
li.equipe-total { display: flex; justify-content: space-between; font-weight: 700; border-bottom: 0; }
button.supprimer { background: transparent; color: var(--erreur-texte); border-color: var(--erreur-texte); }
button.supprimer:hover { background: var(--erreur-texte); color: var(--blanc); }
.actions-rapport .bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }

/* ---------- Page du projet (PL, 6 novembre 2026 : « J'aimerais ça que l'apparence soit plus belle un peu ») ----------
   L'en-tête : le nom, puis le numéro et le statut en pastille ; « Modifier la fiche » (le titre du panneau replié) à droite du nom à
   l'ordinateur, dessous au téléphone. La fiche dans une carte : des étiquettes et des valeurs en texte simple, en grille (trois
   colonnes à l'ordinateur, deux sur une tablette, une au téléphone), puis une rangée de boutons pareils (Itinéraire, Dossier
   SharePoint). Le panneau ouvert : le formulaire en sections (Le projet, Le chantier, L'équipe, Les liens), ses champs en grille à
   l'ordinateur, un par ligne au téléphone ; les réglages à part dessous. Chaque bouton fait 44 px de haut, à l'ordinateur aussi. */
main.page-projet .tete-projet { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem 1.5rem; margin: 0 0 1.25rem; }
main.page-projet .titre-projet { flex: 1 1 20rem; min-width: 0; }
main.page-projet .titre-projet h1 { margin: 0 0 .45rem; overflow-wrap: anywhere; }
main.page-projet .etat-projet { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; margin: 0; }
main.page-projet .etat-projet .pastille, main.page-projet .etat-projet .note { margin: 0; }
.numero-projet { font-weight: 600; color: var(--encre-2); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
main.page-projet .bouton.discret, main.page-projet button.discret { min-height: 44px; }
details.panneau-fiche { flex: 0 0 auto; min-width: 0; max-width: 100%; }
details.panneau-fiche[open] { flex-basis: 100%; }
details.panneau-fiche > summary { list-style: none; display: flex; width: max-content; max-width: 100%; margin: .2rem 0 0 auto; }
details.panneau-fiche > summary::-webkit-details-marker { display: none; }
details.panneau-fiche[open] > summary { background: var(--encre); border-color: var(--encre); color: var(--blanc); margin-bottom: 1rem; }
/* le formulaire : une section par sujet, son titre comme les titres de section de l'application (le « float » met la légende dans
   la section plutôt que sur son bord) */
form.formulaire-fiche { display: grid; gap: 1.25rem; margin: 0 0 1.25rem; }
form.formulaire-fiche fieldset.section-fiche { border: 0; padding: 0; margin: 0; min-width: 0; }
form.formulaire-fiche fieldset.section-fiche + fieldset.section-fiche { border-top: 1px solid var(--papier-2); padding-top: 1.1rem; }
form.formulaire-fiche .section-fiche > legend { float: left; width: 100%; padding: 0; margin: 0 0 .8rem; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze-2); }
form.formulaire-fiche .champs-fiche { clear: left; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem 1.5rem; align-items: start; }
form.formulaire-fiche .champs-fiche > .large { grid-column: 1 / -1; }
form.formulaire-fiche .champ { display: grid; gap: .35rem; min-width: 0; }
form.formulaire-fiche label { min-width: 0; }
form.formulaire-fiche .champs-fiche .note, form.formulaire-fiche .valeur-fiche { margin: 0; }
form.formulaire-fiche select, form.formulaire-fiche input:not([type=checkbox]) { width: 100%; max-width: 100%; }
form.formulaire-fiche label.coche { margin: 0; font-size: .95rem; font-weight: 400; color: var(--encre); }
form.formulaire-fiche fieldset.choix-attitres { margin: 0; }
form.formulaire-fiche .gestes-formulaire { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; padding-top: 1.1rem; border-top: 1px solid var(--papier-2); }
form.formulaire-fiche .gestes-formulaire > button { min-height: 44px; }
main.page-projet .autres-reglages { margin: 0 0 1.5rem; }
main.page-projet .autres-reglages h2 { margin: 0 0 .5rem; }
main.page-projet .autres-reglages details.modifier-fiche { margin: 0; border-top: 1px solid var(--pierre); }
main.page-projet .trouver-dossier { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; margin: 0 0 .75rem; }
main.page-projet .trouver-dossier .note { margin: 0; }
/* la fiche */
main.page-projet .carte-projet { padding: 1.35rem 1.5rem; }
dl.fiche-projet { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1.15rem 2rem; margin: 0; }
dl.fiche-projet > div { min-width: 0; }
dl.fiche-projet dt { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); margin: 0 0 .2rem; }
dl.fiche-projet dd { margin: 0; overflow-wrap: anywhere; }
main.page-projet .gestes-projet { display: flex; flex-wrap: wrap; gap: .6rem .75rem; margin: 1.25rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--papier-2); }
@media (max-width: 44rem) {
  main.page-projet .titre-projet { flex-basis: 100%; }  /* « Modifier la fiche » passe sous le nom */
  details.panneau-fiche > summary { margin-left: 0; }
  main.page-projet .carte-projet { padding: 1rem; }
  main.page-projet .gestes-projet .bouton, form.formulaire-fiche .gestes-formulaire > * { flex: 1 1 auto; white-space: nowrap; }
  main.page-projet .trouver-dossier button { width: 100%; }
}
/* Un projet pas encore dans l'application (case « Ouvert dans l'application » décochée, PL, 13 octobre 2026) : en gris au bureau,
   dans les listes (la mention sous le nom) et sur sa fiche */
tr.ferme { background: var(--papier); }
tr.ferme td, tr.ferme td a { color: var(--doux); }
.mention-fermee { display: block; font-size: .8rem; font-style: italic; color: var(--doux); }
h1.ferme { color: var(--doux); margin-bottom: .4rem; }
.etiquette-fermee { display: inline-block; margin: 0 0 1rem; padding: .2rem .8rem; border: 1px dashed var(--pierre); border-radius: 999px; font-size: .85rem; color: var(--doux); }
@media (max-width: 44rem) { table.fiches td > .mention-fermee { grid-column: 2; } }
details.modifier-fiche { margin: 0 0 1.25rem; }
details.modifier-fiche summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--bronze-2); font-weight: 600; }
details.modifier-fiche form { display: grid; gap: .75rem; max-width: 34rem; }
/* Nouveau projet, Charte comptable (étape 1, 10 octobre 2026) : un champ par ligne, comme la fiche ; une longue liste
   d'éléments Monday ne pousse pas la page de côté au téléphone */
form.formulaire-projet { display: grid; gap: .75rem; max-width: 34rem; }
form.formulaire-projet > label, details.modifier-fiche form > label { min-width: 0; }
form.formulaire-projet select, form.formulaire-projet input:not([type=checkbox]),
details.modifier-fiche form select, details.modifier-fiche form input:not([type=checkbox]) { width: 100%; max-width: 100%; }
form.formulaire-projet .note { margin: 0; }
/* « Heures envoyées à QuickBooks : facturables / non facturables » (PL, 24 octobre 2026) : deux choix d'un doigt (44 px), le texte
   passe à la ligne à côté du rond */
fieldset.choix-heures-qbo { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.choix-heures-qbo legend { font-size: .8rem; font-weight: 500; color: var(--encre-2); padding: 0; margin: 0 0 .1rem; }
fieldset.choix-heures-qbo label.coche { margin: 0; font-size: .95rem; font-weight: 400; color: var(--encre); align-items: flex-start; padding: .55rem 0; }
fieldset.choix-heures-qbo label.coche > span { min-width: 0; overflow-wrap: anywhere; }
/* plus précis que « details.modifier-fiche form input:not([type=checkbox]) { width: 100% } » : sinon le rond prend toute la largeur */
details.modifier-fiche fieldset.choix-heures-qbo input[type=radio], label.coche input[type=radio] { width: 1.4rem; height: 1.4rem; max-width: 1.4rem; flex: none; margin: 0; }
details.modifier-fiche.heures-qbo > .note { margin: .5rem 0 0; }
/* l'avertissement de la Facturation client (Coût Total) : « sa fiche » se touche du doigt au téléphone */
@media (max-width: 44rem) { main.cout-total #heures-facturables a { display: inline-flex; align-items: center; min-height: 44px; } }

/* ---------- S+3 : les trois prochaines semaines (tâches tenues dans l'application) ---------- */
.nav-s3 { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .5rem; }
.nav-s3 .bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.periode-s3 { margin: 0 0 .25rem; }
.copie-s3 { display: block; font-size: .85rem; margin-top: .25rem; }
/* les filtres (décision 1 de PL, 13 novembre 2026) : à l'ordinateur (64rem et plus), une colonne toujours ouverte à gauche, d'environ
   265 px, qui reste en vue et défile seule ; plus étroit (téléphone, tablette), le bouton « Filtres » ouvre le même panneau au-dessus
   de la vue (app.js) ; sans JavaScript, le panneau est toujours là, avec « Appliquer ». La ligne de résumé reste. */
.barre-filtres-s3 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0 0 .75rem; }
.resume-s3 { flex: 1 1 12rem; min-width: 0; margin: 0; color: var(--encre-2); font-size: .92rem; overflow-wrap: anywhere; }
.bouton-filtres-s3, .filtres-s3 .fermer-filtres-s3 { display: none; }
.bouton-filtres-s3[aria-expanded=true] { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
.filtres-s3 { min-width: 0; margin: 0 0 1rem; }
.titre-filtres-s3 { margin: 0 0 .5rem; }
.un-chantier-s3 { display: grid; gap: .5rem; margin: 0 0 .75rem; }
.un-chantier-s3 label { display: grid; gap: .25rem; margin: 0; }
.un-chantier-s3 select { width: 100%; max-width: 100%; min-height: 44px; }
.un-chantier-s3 button { justify-self: start; min-height: 44px; }
.filtres-s3 > .note { margin: 0 0 .75rem; }
.js .appliquer-s3 { display: none; }  /* une case changée s'applique toute seule (app.js) */
.filtres-s3.envoi { opacity: .6; cursor: progress; }
.vue-s3 { min-width: 0; }
@media (min-width: 64rem) {
  main.s3 { max-width: 92rem; }
  .mise-s3 { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
  .filtres-s3 { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; overscroll-behavior: contain; margin: 0;
    padding: .75rem .8rem; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); scrollbar-width: thin; }
  .filtres-s3 .panneau-s3 { padding: 0; border: 0; margin: 0; }
  .filtres-s3 .tous-aucun button { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 63.99rem) {
  .js .bouton-filtres-s3 { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 7.5rem; }
  .js .filtres-s3:not(.ouvert) { display: none; }
  .js .filtres-s3.ouvert .fermer-filtres-s3 { display: block; margin: 0; }
  .fermer-filtres-s3 button { width: 100%; min-height: 44px; }
}
/* le panneau à cocher (demande 4, 13 novembre 2026) : Chantiers, Fournisseurs, chacun avec « Tous » et « Aucun » */
.panneau-s3 { display: grid; gap: .75rem; margin: 0 0 1rem; padding: .75rem .9rem; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); }
.panneau-s3 .groupe-filtre { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 0 1rem; }
.panneau-s3 .groupe-filtre legend { font-weight: 600; padding: 0; margin: 0 0 .25rem; }
.panneau-s3 .groupe-filtre > .note, .panneau-s3 .tous-aucun { grid-column: 1 / -1; }
.panneau-s3 .groupe-filtre > .note { margin: 0 0 .25rem; }
.panneau-s3 label.coche { margin: 0; }
.panneau-s3 label.coche > span { min-width: 0; overflow-wrap: anywhere; }
.tous-aucun { display: flex; gap: .5rem; margin: 0 0 .25rem; }
.tous-aucun button { min-height: 44px; flex: 0 0 auto; min-width: 6rem; }
.panneau-s3 .actions-s3 { margin: 0; }
.legende-s3 { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .4rem; padding: 0; margin: 0 0 1rem; font-size: .9rem; color: var(--doux); }
.jour-s3 h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 1rem; margin: 1.1rem 0 .5rem; }
.jour-s3.fin-de-semaine h3 { color: var(--bronze-2); }
.jour-s3.passe { opacity: .65; }
.jour-s3 > .note { margin: 0 0 .5rem; }
.chantier-s3 h2 { font-family: var(--titres); font-size: 1.15rem; letter-spacing: -.01em; text-transform: none; color: var(--encre); margin: 1.75rem 0 .5rem; }
.chantier-s3 h2 a { color: inherit; }
.taches-s3 { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: .6rem; }
.tache-s3 { display: grid; gap: .2rem; min-width: 0; background: var(--blanc); border: 1px solid var(--pierre); border-left: 4px solid var(--pierre); border-radius: var(--rayon); padding: .7rem .9rem; box-shadow: var(--ombre); overflow-wrap: anywhere; }
.tache-s3 p { margin: 0; }
.tache-s3.s-confirme { border-left-color: var(--ok-texte); }
.tache-s3.s-nous { border-left-color: var(--encre); }
.tache-s3.s-pas-confirme { border-left-color: var(--erreur-texte); }
.tache-s3.s-attente { border-left-color: #c9a35a; }
.tache-s3.s-termine { background: var(--papier); color: var(--doux); box-shadow: none; }
.tache-s3.projete { border-style: dashed; border-left-style: solid; background: #fdfaf3; }
.tete-s3 { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.tete-s3 strong { line-height: 1.3; min-width: 0; }
.qui-s3 { font-size: .95rem; }
.qui-s3 .a-choisir { color: var(--doux); font-style: italic; }
.ou-s3, .quand-s3 { font-size: .85rem; color: var(--doux); }
.texte-s3 { font-size: .85rem; color: var(--encre-2); white-space: pre-line; }
.statut-s3 { display: inline-block; flex: none; font-size: .78rem; font-weight: 600; line-height: 1.3; white-space: nowrap; border: 1px solid transparent; border-radius: 999px; padding: .15rem .6rem; }
.statut-s3.confirme { background: var(--ok-fond); color: var(--ok-texte); border-color: #c4d8c6; }
.statut-s3.nous { background: var(--encre); color: var(--blanc); }
.statut-s3.pas-confirme { background: var(--erreur-fond); color: var(--erreur-texte); border-color: #ecc5bc; }
.statut-s3.attente { background: #fdf6e7; color: #7a5a1c; border-color: #ead9b8; }
.statut-s3.a-determiner { background: var(--blanc); color: var(--encre-2); border-color: var(--doux); border-style: dashed; }
.statut-s3.termine { background: var(--papier-2); color: var(--doux); }
.statut-s3.neutre { background: var(--papier-2); color: var(--encre-2); }
.statut-s3.projete { background: transparent; color: var(--bronze-2); border-color: var(--bronze-clair); border-style: dashed; }
@media (max-width: 44rem) {
  /* au téléphone, chaque lien se touche du doigt (44 px) */
  .nav-s3 .bouton { flex: 1 1 auto; padding-left: .75rem; padding-right: .75rem; }
  main.s3 .tache-s3 a, main.s3 h2 a, main.s3 .vide a, main.s3 .note a { display: inline-flex; align-items: center; min-height: 44px; }
  main.s3 .ou-s3 { line-height: 1.3; }
}
@media (max-width: 44rem) { dl.fiche-projet dd a { display: inline-flex; align-items: center; min-height: 44px; } }
/* « Les voir aussi » / « Cacher les terminés » (accueil du bureau, Projets) : 44 px de haut au téléphone, pas 17 */
@media (max-width: 44rem) { .note.termines a { display: inline-flex; align-items: center; min-height: 44px; } }

/* Photos : prendre ou choisir dans le téléphone */
fieldset.choix-photos { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
fieldset.choix-photos legend { font-size: .85rem; color: var(--encre-2); margin-bottom: .35rem; padding: 0; }
label.bouton-photo { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px solid var(--encre); border-radius: 999px; background: var(--blanc); font-weight: 600; cursor: pointer; }
label.bouton-photo:focus-within { outline: 2px solid var(--bronze); outline-offset: 2px; }
label.bouton-photo input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
fieldset.choix-photos [data-compte] { flex-basis: 100%; margin: 0; }

/* ---------- Fournisseurs : la fiche tenue dans l'application, le formulaire, les catégories ---------- */
.actions-fournisseur { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1.25rem; }
.actions-fournisseur .bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.etat-fournisseur { display: flex; flex-wrap: wrap; gap: .35rem; margin: -.5rem 0 1rem; }
.etat-fournisseur:empty { display: none; }
.etat-fournisseur .pastille { margin: 0; }
/* les fournisseurs supprimés, sous la liste (superutilisateur ; relecture du 11 novembre 2026) : « Annuler la suppression » */
details.fournisseurs-supprimes { margin: 1.5rem 0 0; padding: .25rem 1rem .75rem; overflow-wrap: anywhere; }
details.fournisseurs-supprimes > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.fournisseurs-supprimes ul.supprimes { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .75rem; }
.fournisseurs-supprimes ul.supprimes > li { border-top: 1px solid var(--pierre); padding-top: .6rem; }
.fournisseurs-supprimes ul.supprimes p { margin: 0 0 .4rem; }
.fournisseurs-supprimes .sous { display: block; font-size: .85rem; color: var(--doux); }
/* le fournisseur pareil dans QuickBooks, juste après la création : un long courriel se coupe au lieu de déborder au téléphone */
.pareil-qbo { overflow-wrap: anywhere; }
.pareil-qbo .deja-relie { font-weight: 500; }
.texte-note { white-space: pre-line; margin: 0; overflow-wrap: anywhere; }
/* Le classement des fournisseurs (PL, 24 octobre 2026) : la pastille du rang, en gris (pas classé, correct), vert (recommandé), orange
   (à éviter), rouge (ne plus faire affaire) ; les quatre boutons ; les notes datées et signées */
.pastille.rang-gris { color: var(--m-gris); background: var(--m-gris-fond); }
.pastille.rang-vert { color: var(--ok-texte); background: var(--ok-fond); }
.pastille.rang-orange { color: #8a4a0b; background: #fde8cf; }
.pastille.rang-rouge { color: var(--erreur-texte); background: var(--erreur-fond); }
/* Le genre (PL, 28 octobre 2026) : Fournisseur, Sous-traitant ou Les deux, en marine ; « À préciser » en pointillé */
.pastille.genre { color: var(--m-marine); background: var(--m-marine-fond); }
.pastille.genre.a-preciser { color: var(--doux); background: var(--blanc); box-shadow: inset 0 0 0 1px var(--pierre); }
form.confirmer-genre { margin: .25rem 0 .5rem; }
/* « Partage notre Internet » (point 9 du lot 3, 25 novembre 2026) : la case, une ligne d'aide, « Enregistrer » ; de l'air dessous */
form.case-internet { margin: .25rem 0 1rem; }
form.case-internet label.coche { margin: 0; }
form.case-internet label.coche input { margin: 0; }
form.case-internet .note { margin: 0 0 .5rem; }
/* l'écran « Sous-traitants » : la note du T5018, puis les filtres et le fichier Excel */
.note-t5018 { margin: 0 0 1rem; }
.sous-traitants .codes { overflow-wrap: anywhere; }
/* les « À préciser » nommés sous les tuiles : au téléphone, chaque nom se touche du doigt (44 px), comme les liens des notes */
@media (max-width: 44rem) { main.factures .a-preciser-st a { display: inline-block; min-height: 44px; padding: .6rem 0; } }
.classement .rang-actuel { margin: 0 0 .5rem; }
.classement .rang-actuel .pastille { margin: 0; font-size: .8rem; padding: .2rem .65rem; }
.classement .rang-change { margin: 0 0 .75rem; overflow-wrap: anywhere; }
.classement .avis { margin: 0 0 .75rem; }
.changer-rang { display: grid; gap: .6rem; margin: .5rem 0 0; }
.changer-rang input { width: 100%; max-width: 100%; min-height: 44px; }
/* les quatre côte à côte, de parts égales, si elles tiennent sur une ligne ; sinon empilés (app.js, rangées), un par ligne au téléphone ;
   jamais en 2 + 2 ni un texte sur deux lignes (PL, 6 novembre 2026) */
.choix-rang { display: flex; flex-wrap: wrap; gap: .5rem; }
.choix-rang button { flex: 1 1 0; white-space: nowrap; min-height: 44px; background: var(--blanc); color: var(--encre); border-color: var(--pierre); }
@media (max-width: 44rem) { .choix-rang button { flex-basis: 100%; } }
.choix-rang button:hover { background: var(--papier-2); color: var(--encre); border-color: var(--doux); }
.choix-rang button[aria-pressed=true].rang-gris { background: var(--m-gris-fond); color: var(--m-gris); border-color: var(--m-gris); }
.choix-rang button[aria-pressed=true].rang-vert { background: var(--ok-fond); color: var(--ok-texte); border-color: var(--ok-texte); }
.choix-rang button[aria-pressed=true].rang-orange { background: #fde8cf; color: #8a4a0b; border-color: #8a4a0b; }
.choix-rang button[aria-pressed=true].rang-rouge { background: var(--erreur-fond); color: var(--erreur-texte); border-color: var(--erreur-texte); }
.notes-fournisseur h3 { font-size: .95rem; margin: 0 0 .35rem; }
.notes-fournisseur .note-avant { padding: 0 0 .85rem; margin: 0 0 .85rem; border-bottom: 1px solid var(--papier-2); }
.notes-fournisseur .note-avant .note { margin: .35rem 0 0; }
.notes-datees { list-style: none; padding: 0; margin: 0 0 .75rem; display: grid; gap: .75rem; }
.notes-datees > li { border-left: 3px solid var(--pierre); padding: .1rem 0 .1rem .75rem; min-width: 0; }
.notes-datees .signature { margin: .3rem 0 0; color: var(--doux); font-size: .85rem; overflow-wrap: anywhere; }
details.retirer-note { margin: .25rem 0 0; }
details.retirer-note > summary { cursor: pointer; color: var(--doux); font-size: .85rem; min-height: 44px; min-width: 44px; padding: 0 .75rem 0 0; display: inline-flex; align-items: center; }
details.retirer-note form { display: grid; gap: .4rem; justify-items: start; }
details.retirer-note .note { margin: 0; }
details.retirer-note button { min-height: 44px; }
/* « Retirer… » en vrai bouton (décisions de PL du 16 novembre 2026 : « c'est pas le plus beau bouton ») : sur la page des codes de
   main-d'œuvre et sur la fiche d'un compte de la Charte, le repli a la boîte des autres boutons (44 px, le même rembourrage, .92rem,
   graisse 600, coins ronds), en contour rouge comme button.supprimer qu'il ouvre ; ouvert, il pâlit et le formulaire paraît dessous,
   avec le bouton qui retire pour vrai, de la même grosseur. Au téléphone, l'un et l'autre prennent toute la largeur. */
details.retirer-note.en-bouton > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center;
  text-align: center; min-height: 44px; min-width: 0; padding: .6rem 1.3rem; border: 1.5px solid var(--erreur-texte); border-radius: 999px;
  background: transparent; color: var(--erreur-texte); font-size: .92rem; font-weight: 600; line-height: 1.2; transition: background .2s, color .2s; }
details.retirer-note.en-bouton > summary::-webkit-details-marker { display: none; }
details.retirer-note.en-bouton > summary:hover { background: var(--erreur-texte); color: var(--blanc); }
details.retirer-note.en-bouton[open] > summary { background: var(--papier-2); border-color: var(--pierre); color: var(--encre); }
details.retirer-note.en-bouton > form { margin: .6rem 0 0; padding: .75rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); }
details.retirer-note.en-bouton > form > button { min-height: 44px; }
details.retirer-note.en-bouton.seul { margin: 0 0 1.5rem; }  /* sous un formulaire : à sa place, sans carte autour */
@media (max-width: 44rem) {
  details.retirer-note.en-bouton > summary, details.retirer-note.en-bouton > form > button { display: flex; align-items: center; justify-content: center; width: 100%; }
  details.retirer-note.en-bouton > form { justify-items: stretch; }
}
/* La Charte en arbre (décisions de PL du 16 novembre 2026) : chaque parent, puis ses enfants en retrait (.arbre-charte, le cadre du
   tableau des comptes actifs). À l'ordinateur, le nom d'un enfant se décale d'un cran par niveau, un trait à sa gauche ; en fiches (le
   téléphone), la fiche entière se décale et porte le trait. Un parent : son nom en gras, sa rangée sur fond papier. */
.arbre-charte tr.niveau-2 { --retrait: 1.25rem; }
.arbre-charte tr.niveau-3 { --retrait: 2.5rem; }
.arbre-charte tr.niveau-4 { --retrait: 3.75rem; }
.arbre-charte tr.niveau-5 { --retrait: 5rem; }
.arbre-charte .nom-compte { font-weight: 600; }
.arbre-charte table.charte:not(.en-fiches) tr:not(.niveau-1) > td:nth-child(2) { position: relative; padding-left: calc(1.35rem + var(--retrait)); }
.arbre-charte table.charte:not(.en-fiches) tr:not(.niveau-1) > td:nth-child(2)::before { content: ""; position: absolute;
  left: calc(.75rem + var(--retrait)); top: .55rem; bottom: .55rem; border-left: 2px solid var(--pierre); }
.arbre-charte table.charte:not(.en-fiches) tr.parent > * { background: #fbfaf7; }
.arbre-charte table.tient.charte.en-fiches > tbody > tr:not(.niveau-1) { margin-left: calc(var(--retrait) * .6); border-left: 3px solid var(--pierre); }
.arbre-charte table.tient.charte.en-fiches > tbody > tr.parent { background: var(--papier); }
table.charte td .sous { display: block; font-size: .85rem; font-weight: 400; color: var(--doux); }
/* la dernière lecture de QuickBooks, dans la Charte : une ligne par sorte de changement, les comptes dessous */
.lecture-charte > .carte { display: grid; gap: .6rem; margin: .5rem 0 0; }
.lecture-charte > .carte > p { margin: 0; }
.liste-lecture { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; }
.liste-lecture .sous { display: block; font-size: .85rem; color: var(--doux); overflow-wrap: anywhere; }
.lecture-charte .actions-fournisseur { margin: 0; }
.ajouter-note { display: grid; gap: .6rem; margin: .5rem 0 .5rem; }
.ajouter-note textarea { font: inherit; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); width: 100%; max-width: 100%; resize: vertical; min-height: 44px; }
.ajouter-note select { width: 100%; max-width: 100%; min-height: 44px; }
.ajouter-note > button { justify-self: start; min-height: 44px; }
.effets-classement { margin: -.75rem 0 1.5rem; }
/* dans les demandes de soumission et les BC : « À éviter », avec la raison du rang */
.avis-rang { display: block; flex-basis: 100%; color: #8a4a0b; font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.avis-rang .pastille { margin: 0 .35rem 0 0; }
.avis-rang.ne-plus { color: var(--erreur-texte); }
.soumissions-liste p.avis-rang { margin: .25rem 0 0; }
/* les avis d'une soumission (décisions de PL du 19 novembre 2026, soumissions/avis.py) : un prix loin des autres, une validité qui
   finit ; sous le total d'une colonne de la grille, et dans la carte du centre des soumissions. Un avis : jamais un blocage. */
.avis-soumission { display: block; color: #8a4a0b; font-size: .82rem; font-weight: 600; overflow-wrap: anywhere; margin: .25rem 0 0; }
.avis-soumission.passee, .avis-soumission-fiche .avis-validite-passee { color: var(--erreur-texte); }
table.en-fiches > * > tr > td > .avis-soumission { grid-column: 2; }  /* la grille en fiches (téléphone) : sous le prix, pas sous l'étiquette */
/* la marque « prix d'avant l'addenda » sous le total d'une colonne (question 13) : l'allure d'un avis, sa classe à elle (relecture du
   21 novembre 2026 : lignes.js refait les avis à chaque enregistrement de la grille ; la marque, c'est la réponse qui la pose) */
.marque-avant-addenda { display: block; color: #8a4a0b; font-size: .82rem; font-weight: 600; overflow-wrap: anywhere; margin: .25rem 0 0; }
table.en-fiches > * > tr > td > .marque-avant-addenda { grid-column: 2; }
.avis-soumission-fiche p { margin: 0 0 .35rem; }
.avis-soumission-fiche p.note { margin: 0; }
main.fournisseurs .champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .75rem 1rem; align-items: end; margin: 0 0 .75rem; }
main.fournisseurs .champs input, main.fournisseurs .champs select { width: 100%; }
main.fournisseurs .carte h3 { font-size: .95rem; margin: 1rem 0 .5rem; }
main.fournisseurs textarea { font: inherit; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); width: 100%; resize: vertical; min-height: 44px; }
main.fournisseurs .avis.lecture { margin: .25rem 0 .75rem; }
.categories-fournisseurs { list-style: none; padding: 0; margin: 0; }
.categories-fournisseurs > li { margin: 0 0 .75rem; padding: .85rem 1rem; }
.categories-fournisseurs > li.inactif { background: var(--papier-2); box-shadow: none; }
.categories-fournisseurs .coche { margin: 0; }
.categories-fournisseurs .note { margin: .35rem 0 0; }
@media (max-width: 44rem) {
  /* au téléphone, chaque lien et chaque bouton se touche du doigt (44 px) */
  .actions-fournisseur .bouton, .actions-fournisseur button { flex: 1 1 auto; }
  main.factures table.fiches td > .pastille { justify-self: start; margin: 0; }  /* la pastille garde sa taille dans la fiche */
  main.factures table.fiches td > .note { margin: 0; }
  main.fournisseurs .note a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- S+3, version 2 : import, fiche d'une tâche, statut rapide, calendrier, nos gars ---------- */
.avis.attention { background: #fdf6e7; color: #7a5a1c; border-color: #c9a35a; }
.actions-s3 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .5rem; }
.actions-s3 form { margin: 0; }
.actions-s3 .bouton, .actions-s3 button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.note-en-ligne { color: var(--doux); font-size: .85em; font-weight: 400; }
.nom-s3 { color: var(--encre); text-decoration: none; min-width: 0; }
.nom-s3:hover { color: var(--bronze-2); text-decoration: underline; }
.tete-s3 { flex-wrap: wrap; }
.statut-rapide { flex: none; }
.statut-rapide > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.statut-rapide > summary::-webkit-details-marker { display: none; }
.statut-rapide > summary .statut-s3::after { content: " ▾"; font-size: .7em; }
.statut-rapide[open] { flex: 1 1 100%; }
.statut-rapide form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; margin: .4rem 0 .2rem; padding: .5rem; background: var(--papier); border-radius: var(--rayon); }
.statut-rapide form label { flex: 1 1 10rem; }
.import-s3 { margin: 0 0 .75rem; }
.import-s3 > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--bronze-2); font-weight: 600; }
.import-s3 > .note { margin: 0 0 .5rem; }
.import-s3 form { margin: 0 0 .5rem; }
.sans-date-s3 { margin: 0 0 1rem; }
.sans-date-s3 > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--bronze-2); font-weight: 600; }
.sans-date-s3 > .taches-s3 { margin-top: .25rem; }
.chantier-s3 > .note { margin: 0 0 .5rem; }

/* La fiche d'une tâche */
.decaler-s3 { display: grid; gap: .5rem; }
.decaler-s3 .note, .quand-tache { margin: 0; }
.tache-s3-formulaire .champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .75rem 1rem; align-items: end; margin: 0 0 .75rem; }
.tache-s3-formulaire .champs input, .tache-s3-formulaire .champs select { width: 100%; }
.tache-s3-formulaire textarea { font: inherit; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); width: 100%; resize: vertical; min-height: 44px; }
.tache-s3-formulaire.carte { display: grid; gap: .75rem; max-width: 34rem; }
.tache-s3-formulaire.carte button { justify-self: start; }
.employes-s3 > summary, .apres-s3 > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--bronze-2); font-weight: 600; }
.cases-s3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 0 1rem; }
.cases-s3 label.coche { margin: 0; font-weight: 400; font-size: .92rem; }
.cases-s3 label.coche > span { min-width: 0; overflow-wrap: anywhere; }

/* Le calendrier : à l'ordinateur, des pastilles par jour ; au téléphone, le nombre de tâches, qui mène à la liste du jour */
.cal-s3 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin: 0 0 1.5rem; }
.cal-tete { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); text-align: center; padding: .25rem 0; }
.cal-tete.fds { color: var(--bronze-2); }
.cal-case { min-width: 0; min-height: 7.5rem; display: flex; flex-direction: column; gap: .2rem; padding: .3rem; background: var(--blanc); border: 1px solid var(--pierre); border-radius: 4px; }
.cal-case.hors { background: transparent; border-color: transparent; }
.cal-case.fds { background: var(--papier-2); }
.cal-case.passe { opacity: .7; }
.cal-case.aujourdhui { border-color: var(--bronze); box-shadow: inset 0 0 0 1px var(--bronze); }
.cal-jour { display: flex; justify-content: space-between; align-items: center; gap: .25rem; color: var(--encre); text-decoration: none; font-weight: 600; font-size: .85rem; }
a.cal-jour:hover { color: var(--bronze-2); }
.cal-nb { display: none; }
.cal-pastilles { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; min-width: 0; }
.cal-pastilles li { min-width: 0; }
.pastille-s3 { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .72rem; line-height: 1.35; padding: .1rem .35rem; border-left: 3px solid var(--pierre); border-radius: 3px; background: var(--papier-2); color: var(--encre-2); text-decoration: none; }
.pastille-s3:hover { color: var(--encre); text-decoration: underline; }
.pastille-s3.confirme { background: var(--ok-fond); color: var(--ok-texte); border-left-color: var(--ok-texte); }
.pastille-s3.nous { background: var(--encre); color: var(--blanc); border-left-color: var(--bronze-clair); }
.pastille-s3.nous:hover { color: var(--blanc); }
.pastille-s3.pas-confirme { background: var(--erreur-fond); color: var(--erreur-texte); border-left-color: var(--erreur-texte); }
.pastille-s3.attente { background: #fdf6e7; color: #7a5a1c; border-left-color: #c9a35a; }
.pastille-s3.a-determiner { background: var(--blanc); color: var(--encre-2); border: 1px dashed var(--doux); border-left: 3px solid var(--doux); }
.pastille-s3.termine { color: var(--doux); text-decoration: line-through; }
.cal-autres { font-size: .72rem; color: var(--bronze-2); }
/* glisser dans le calendrier (décision 4 de PL, 13 novembre 2026) : à l'ordinateur seulement ; app.js pose .glisser-actif. La poignée ⇥
   (le dernier jour d'une tâche) change sa fin ; la case survolée se marque ; la note ne se montre qu'à la souris. */
.note-glisser-s3, .etirer-s3 { display: none; }
@media (hover: hover) and (pointer: fine) { .note-glisser-s3 { display: block; } }
#message-cal { overflow-wrap: anywhere; }
.glisser-actif [data-tache] { cursor: grab; }
.glisser-actif .cal-pastilles > li, .glisser-actif .ligne-semaine-s3 { position: relative; }
.glisser-actif .cal-pastilles > li:has(.etirer-s3) > .pastille-s3 { padding-right: 1.1rem; }
.glisser-actif .ligne-semaine-s3:has(.etirer-s3) { padding-right: 1.4rem; }
.glisser-actif .etirer-s3 { display: flex; align-items: center; justify-content: center; position: absolute; top: 0; right: 0; bottom: 0; width: 1rem;
  cursor: ew-resize; font-size: .72rem; color: var(--encre); background: rgba(255, 255, 255, .55); border-radius: 0 3px 3px 0; text-decoration: none; }
.glisser-actif .ligne-semaine-s3 .etirer-s3 { width: 1.25rem; }
.glisser-actif .etirer-s3:hover { background: var(--bronze-clair); color: var(--blanc); }
.glisser-actif .en-glisse { opacity: .45; }
.glisser-actif .cible-glisse { outline: 2px dashed var(--bronze); outline-offset: -2px; background: #fcf8f2; }
.glisser-actif.occupe, .glisser-actif.occupe [data-tache] { cursor: progress; }

/* Nos gars : le chantier prévu dans Mes heures, les prévus dans le rapport du jour */
.prevu-s3 { margin: 0 0 .75rem; padding: .5rem .75rem; border-left: 3px solid var(--bronze); background: var(--papier); border-radius: var(--rayon); font-size: .92rem; }
.prevus-s3 { margin: 0 0 1rem; padding: .6rem .8rem; border-left: 3px solid var(--bronze); background: var(--papier); border-radius: var(--rayon); }
.prevus-s3 p { margin: 0; }
.prevus-s3 form { margin: .5rem 0 0; }

/* Fiche d'une tâche : le sous-traitant proposé (le contrat du code), la demande de confirmation (à blanc) */
.propose-s3 { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; margin: -.25rem 0 .75rem; overflow-wrap: anywhere; }
.propose-s3[hidden] { display: none; }
.confirmation-s3 { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin: 0 0 .75rem; }
.confirmation-s3 .bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
/* la demande de confirmation (13 novembre 2026) : les adresses à cocher, ce qui est déjà parti */
.destinataires-s3 { border: 0; padding: 0; margin: 0 0 .75rem; min-width: 0; display: grid; gap: .1rem; }
.destinataires-s3 legend { font-size: .9rem; color: var(--encre-2); padding: 0; margin: 0 0 .35rem; }
.destinataires-s3 label.coche { min-height: 44px; align-items: center; margin: 0; }
.destinataires-s3 label.coche > span { min-width: 0; overflow-wrap: anywhere; }
.confirmation-s3-formulaire label input[name=ajout] { width: 100%; }
.envois-s3 { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; overflow-wrap: anywhere; }
.confirmation-s3 .note-en-ligne { overflow-wrap: anywhere; }
.corps-courriel { white-space: pre-line; overflow-wrap: anywhere; margin: .5rem 0 0; padding: .75rem 1rem; background: var(--papier); border-left: 3px solid var(--pierre); border-radius: var(--rayon); font-size: .95rem; }

@media (max-width: 44rem) {
  /* au téléphone, chaque lien, bouton et case se touche du doigt (44 px) */
  .actions-s3 > .bouton, .actions-s3 > form, .actions-s3 > button { flex: 1 1 100%; }
  .actions-s3 > form > button { width: 100%; }
  .decaler-s3 .actions-s3 > form { flex: 1 1 0; min-width: 0; }
  .decaler-s3 .actions-s3 button { padding-left: .4rem; padding-right: .4rem; white-space: nowrap; }
  main.s3 .statut-rapide > summary { min-height: 44px; }
  main.s3 .statut-rapide form button { flex: 1 1 100%; }
  main.s3 dd a, main.s3 .note a, main.s3 .tache-s3 a.nom-s3 { display: inline-flex; align-items: center; min-height: 44px; }
  .tache-s3-formulaire.carte button { justify-self: stretch; }
  .cal-s3 { gap: 2px; }
  .cal-case { min-height: 0; padding: 0; }
  .cal-pastilles { display: none; }
  .cal-jour { min-height: 48px; flex-direction: column; justify-content: center; gap: .1rem; font-size: .9rem; }
  .cal-case.pleine { border-color: var(--doux); }
  .cal-nb { display: inline-block; min-width: 1.35rem; padding: 0 .3rem; border-radius: 999px; background: var(--encre); color: var(--blanc); font-size: .72rem; line-height: 1.35; text-align: center; }
  .prevus-s3 form button { width: 100%; }
  .import-s3 form button { width: 100%; }
  .propose-s3 button, .confirmation-s3 .bouton { flex: 1 1 100%; }
}

/* ---------- Coût Total : admin et profit, prix total ---------- */
.tuile.prix-total { border-top-color: var(--bronze); }
.admin-profit table.prix-total { width: auto; min-width: min(100%, 36rem); margin: 0 0 1rem; }
.admin-profit table.prix-total td { text-align: right; }
.admin-profit table.prix-total td.prix { font-weight: 600; }
.admin-profit table.prix-total thead th:not(:first-child) { text-align: right; }
.admin-profit details.exporter { margin: 0; }
.admin-profit form.ligne input { width: 11rem; }
.admin-profit > :last-child, .admin-profit details > :last-child { margin-bottom: 0; }
@media (max-width: 44rem) {
  .admin-profit table.prix-total { width: 100%; min-width: 0; }
  .admin-profit table.prix-total.fiches tr { padding: .6rem 0; }
  .admin-profit table.prix-total.fiches td { text-align: left; grid-template-columns: 8.5rem minmax(0, 1fr); }
  .admin-profit form.ligne input { width: 100%; }
}

/* ---------- Coût Total : les factures arrivées après la facturation au client (PL, 21 octobre 2026) ---------- */
.retard-facturation { margin-top: .75rem; }
.retard-facturation p { margin: 0 0 .35rem; }
.retard-facturation ul { margin: 0; padding-left: 1.1rem; }
.retard-facturation li { margin: .15rem 0; overflow-wrap: anywhere; }
.retard-facturation .codes a + a { margin-left: .6rem; }
.drapeau-facturation { display: block; margin-top: .15rem; font-size: .85rem; color: #7a5a1c; white-space: normal; max-width: 22rem; }
@media (max-width: 44rem) {
  .retard-facturation ul { padding-left: 0; list-style: none; }
  .retard-facturation li { padding: .3rem 0; border-top: 1px solid #ecdcb8; }
  .retard-facturation li > a:first-child { font-weight: 600; }
  .retard-facturation a { display: inline-flex; align-items: center; min-height: 44px; }
  .retard-facturation li > span { display: block; }
}

/* Documents du chantier : le sous-dossier SharePoint du projet, en lecture */
.fil-documents { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .4rem; margin: 0 0 .75rem; font-size: .95rem; }
.fil-documents a, .fil-documents [aria-current] { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.fil-documents [aria-current] { font-weight: 600; }
.fil-documents .sep { color: var(--doux); }
.liste-documents { list-style: none; padding: 0; margin: 0 0 1rem; max-width: 52rem; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); box-shadow: var(--ombre); }
.liste-documents li + li { border-top: 1px solid var(--papier-2); }
.liste-documents a { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); align-items: center; gap: .1rem .75rem; min-height: 56px; padding: .55rem 1rem; color: var(--encre); text-decoration: none; }
.liste-documents a:hover { background: #fbfaf7; }
.liste-documents svg { grid-row: 1 / span 2; color: var(--bronze-2); }
.liste-documents .nom-doc { font-weight: 500; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.liste-documents .info-doc { grid-column: 2; font-size: .82rem; color: var(--doux); }
.liste-documents .vide-doc { padding: 1rem; color: var(--doux); }
@media (max-width: 44rem) {
  main.documents .note a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- S+3, vue Gantt : Frappe Gantt 1.2.2 (licence MIT, static/vendor), aux couleurs de l'application ----------
   La feuille de la librairie est chargée avant celle-ci, seulement sur la page du Gantt. */
.outils-gantt { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .75rem; }
.echelles-gantt { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.outils-gantt button { min-height: 44px; }
.outils-gantt button[aria-pressed=true] { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
#message-gantt { overflow-wrap: anywhere; }
.cadre-gantt { max-width: 100%; margin: 0 0 1rem; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.cadre-gantt.occupe { cursor: progress; }
.cadre-gantt .gantt-container {
  --g-arrow-color: var(--encre-2); --g-bar-color: var(--papier-2); --g-bar-border: var(--doux); --g-handle-color: var(--bronze-2);
  --g-tick-color: var(--papier-2); --g-tick-color-thick: var(--pierre); --g-border-color: var(--papier-2); --g-row-border-color: var(--pierre);
  --g-text-muted: var(--doux); --g-text-dark: var(--encre); --g-text-light: var(--blanc); --g-progress-color: rgba(21, 23, 26, .14);
  --g-header-background: var(--blanc); --g-row-color: var(--blanc); --g-actions-background: var(--papier-2);
  --g-today-highlight: var(--bronze); --g-weekend-highlight-color: var(--papier); --g-weekend-label-color: var(--papier-2);
  font-family: var(--sans); border-radius: 0;
}
.cadre-gantt .gantt-container .popup-wrapper, .cadre-gantt .gantt-container .side-header { display: none; }  /* ni bulle ni boutons de la librairie : les nôtres, en français */
.cadre-gantt .gantt-container .upper-text { font-weight: 600; }
.cadre-gantt .gantt-container .extras .adjust { color: var(--encre); background: var(--blanc); border: 1px solid var(--pierre); min-width: 44px; min-height: 44px; }
.cadre-gantt .gantt .bar-label { font-family: var(--sans); font-size: 12px; font-weight: 500; }
.cadre-gantt .gantt .bar-wrapper .bar { outline: none; stroke-width: 1; }
.cadre-gantt .gantt .bar-wrapper:hover .bar { stroke-width: 2; }
/* les mêmes couleurs que les pastilles de statut */
.cadre-gantt .gantt .g-confirme .bar { fill: var(--ok-fond); stroke: var(--ok-texte); }
.cadre-gantt .gantt .g-confirme .bar-label { fill: var(--ok-texte); }
.cadre-gantt .gantt .g-nous .bar { fill: var(--encre); stroke: var(--encre); }
.cadre-gantt .gantt .g-nous .bar-label { fill: var(--blanc); }
.cadre-gantt .gantt .g-nous .bar-progress { fill: rgba(255, 255, 255, .22); }
.cadre-gantt .gantt .g-pas-confirme .bar { fill: var(--erreur-fond); stroke: var(--erreur-texte); }
.cadre-gantt .gantt .g-pas-confirme .bar-label { fill: var(--erreur-texte); }
.cadre-gantt .gantt .g-attente .bar { fill: #fdf6e7; stroke: #c9a35a; }
.cadre-gantt .gantt .g-attente .bar-label { fill: #7a5a1c; }
.cadre-gantt .gantt .g-a-determiner .bar { fill: var(--blanc); stroke: var(--doux); stroke-dasharray: 4 3; }
.cadre-gantt .gantt .g-a-determiner .bar-label { fill: var(--encre-2); }
.cadre-gantt .gantt .g-termine .bar { fill: var(--papier-2); stroke: var(--pierre); }
.cadre-gantt .gantt .g-termine .bar-label { fill: var(--doux); text-decoration: line-through; }
.cadre-gantt .gantt .g-neutre .bar { fill: var(--papier-2); stroke: var(--doux); }
/* une étiquette plus longue que sa barre s'écrit à côté, sur le fond : toujours en encre */
.cadre-gantt .gantt .bar-wrapper .bar-label.big { fill: var(--encre); }
/* la ligne de titre d'un code (« 34360 · Toiture ») : elle couvre ses tâches, ne se glisse pas et n'ouvre rien */
.cadre-gantt .gantt .g-titre { cursor: default; }
.cadre-gantt .gantt .g-titre .bar, .cadre-gantt .gantt .g-titre:hover .bar { fill: var(--pierre); stroke: var(--bronze-2); stroke-width: 1; }
.cadre-gantt .gantt .g-titre .bar-label { fill: var(--encre); font-weight: 700; }
.cadre-gantt .gantt .g-titre .bar-progress, .cadre-gantt .gantt .g-titre .handle { display: none; }
.gantt-telephone { display: none; }
@media (max-width: 44rem) {
  /* au téléphone : la note vers « Par jour » ; chaque bouton se touche du doigt ; le Gantt défile de côté dans son cadre */
  .gantt-telephone { display: block; }
  .outils-gantt > button, .echelles-gantt { flex: 1 1 100%; }
  .echelles-gantt button { flex: 1 1 0; min-width: 0; padding-left: .4rem; padding-right: .4rem; }
}

/* ---------- S+3, Gantt : la colonne de gauche, comme dans Monday (PL, 15 octobre 2026) ----------
   Le nom et les dates de chaque ligne à gauche (une ligne de titre par chantier, puis par code) ; les barres à droite, sans texte.
   La colonne reste là quand le temps défile de côté ; gantt.js donne à ses lignes la hauteur des rangées (classe « pret ») et la
   fait défiler de haut en bas avec le Gantt. Sans gantt.js, elle reste une simple liste des tâches et de leurs dates. */
.tableau-gantt { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); max-width: 100%; margin: 0 0 1rem; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.tableau-gantt > .cadre-gantt { margin: 0; border: 0; border-radius: 0; box-shadow: none; min-width: 0; }
.colonne-gantt { min-width: 0; border-right: 1px solid var(--pierre); overflow-x: hidden; overflow-y: auto; scrollbar-width: none; background: var(--blanc); }
.colonne-gantt::-webkit-scrollbar { display: none; }
.tableau-gantt.pret .colonne-gantt { height: var(--hauteur-gantt); }
.tete-colonne-gantt { position: sticky; top: 0; z-index: 2; margin: 0; display: flex; align-items: flex-end; min-height: 2.5rem; padding: 0 .75rem .55rem; background: var(--blanc); border-bottom: 1px solid var(--pierre); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); }
.tableau-gantt.pret .tete-colonne-gantt { height: var(--entete-gantt); }
.lignes-colonne-gantt { list-style: none; margin: 0; padding: 0; }
.tableau-gantt.pret .lignes-colonne-gantt { padding-bottom: var(--sous-le-gantt); }
.ligne-colonne-gantt { min-width: 0; border-bottom: 1px solid var(--papier-2); }
.tableau-gantt.pret .ligne-colonne-gantt { height: var(--rangee-gantt); overflow: hidden; }
.dans-colonne-gantt { display: flex; flex-direction: column; justify-content: center; gap: .1rem; height: 100%; min-height: 44px; padding: .2rem .75rem; color: var(--encre); text-decoration: none; line-height: 1.22; min-width: 0; }
a.dans-colonne-gantt:hover .nom-colonne-gantt { color: var(--bronze-2); text-decoration: underline; }
.nom-colonne-gantt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: .85rem; font-weight: 500; }
.nom-colonne-gantt .icone-statut { width: auto; margin-right: .3em; }
.dates-colonne-gantt { font-size: .75rem; color: var(--doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-colonne-gantt.n-projet { background: var(--papier-2); }
.ligne-colonne-gantt.n-projet .nom-colonne-gantt { font-weight: 700; }
.ligne-colonne-gantt.n-projet .dates-colonne-gantt { color: var(--encre-2); }
.ligne-colonne-gantt.n-code .nom-colonne-gantt { font-weight: 600; color: var(--bronze-2); }
.ligne-colonne-gantt.n-tache .dans-colonne-gantt { padding-left: 1.25rem; }
.ligne-colonne-gantt.s-termine .nom-colonne-gantt { color: var(--doux); text-decoration: line-through; }
/* les barres : plus de texte dessus (le nom est dans la colonne et l'info-bulle) ; le titre d'un chantier, plus foncé */
.cadre-gantt .gantt .bar-label { display: none; }
.cadre-gantt .gantt .g-titre.g-projet .bar, .cadre-gantt .gantt .g-titre.g-projet:hover .bar { fill: var(--encre-2); stroke: var(--encre); }
@media (max-width: 44rem) {
  /* au téléphone : la colonne reste lisible (le nom passe à la ligne), le temps défile dans sa boîte */
  .tableau-gantt { grid-template-columns: minmax(0, 42%) minmax(0, 1fr); }
  .dans-colonne-gantt { padding: .15rem .5rem; }
  .ligne-colonne-gantt.n-tache .dans-colonne-gantt { padding-left: .8rem; }
  .nom-colonne-gantt { font-size: .8rem; }
  .dates-colonne-gantt { font-size: .7rem; }
  .tete-colonne-gantt { padding: 0 .5rem .55rem; }
}

/* ---------- S+3, Répartition : nos gars, jour par jour (PL et Anthony, 15 octobre 2026) ----------
   À l'ordinateur, une grille (les gars en lignes, les jours en colonnes) qui défile de côté dans sa boîte, le nom des gars
   à gauche ; au téléphone, une fiche par jour. Une couleur par chantier (la légende). */
.reponse-rep { margin: 0 0 1rem; padding: .9rem 1.1rem; background: var(--blanc); border: 1px solid var(--pierre); border-left: 4px solid var(--bronze); border-radius: var(--rayon); box-shadow: var(--ombre); }
.reponse-rep h2 { margin: 0 0 .4rem; }
.libres-aujourdhui-rep { margin: 0 0 .4rem; font-size: 1.08rem; line-height: 1.4; overflow-wrap: anywhere; }
.chiffres-rep { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; color: var(--encre-2); font-size: .92rem; }
/* sans tâche de nos gars : comment remplir la répartition, et le bouton (main-d'œuvre Ingenio, décision de PL du 13 novembre 2026) */
.vide-rep p { margin: 0 0 .6rem; }
.vide-rep .titre-vide-rep { margin-bottom: .35rem; font-size: 1.05rem; color: var(--encre); }
.vide-rep .actions-s3, .vide-rep p:last-child { margin-bottom: 0; }
.legende-metiers li.estompe { opacity: .45; }
.grille-rep-boite { max-width: 100%; overflow-x: auto; margin: 0 0 1.5rem; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); box-shadow: var(--ombre); }
.grille-rep-boite:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
table.grille-rep { width: auto; border-collapse: separate; border-spacing: 0; font-size: .82rem; }
.grille-rep th, .grille-rep td { white-space: normal; vertical-align: top; padding: .45rem .5rem; min-width: 8.5rem; max-width: 11rem; border-bottom: 1px solid var(--papier-2); overflow-wrap: anywhere; }
.grille-rep thead th { font-size: .72rem; letter-spacing: .06em; text-transform: none; color: var(--encre-2); background: var(--papier); border-bottom: 1px solid var(--pierre); }
.grille-rep .gars-rep { position: sticky; left: 0; z-index: 1; min-width: 8rem; max-width: 10rem; background: var(--blanc); border-right: 1px solid var(--pierre); font-weight: 600; font-size: .85rem; }
.grille-rep thead .gars-rep, .grille-rep tfoot .gars-rep { background: var(--papier); }
.grille-rep .lundi { border-left: 2px solid var(--pierre); }
.grille-rep td.fds { background: var(--papier); }
.grille-rep td.passe > * { opacity: .7; }
.grille-rep thead th.auj { color: var(--bronze-2); box-shadow: inset 0 -3px 0 var(--bronze); }
.grille-rep td.auj { background: #fcf8f2; }
.auj-rep { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .04em; color: var(--bronze-2); }
.grille-rep td.libre { background: #f4f8f4; }
.grille-rep td.libre.passe { background: transparent; }
.grille-rep td.libre.fds { background: var(--papier); }  /* la fin de semaine, libre n'est pas une place à combler */
.grille-rep td.fds .libre-rep, .grille-rep td.passe .libre-rep { color: var(--doux); font-weight: 500; }
.libre-rep { color: var(--ok-texte); font-weight: 600; font-size: .8rem; }
.grille-rep tr.a-combler-rep > * { background: #fdf8ee; }
.grille-rep tfoot th, .grille-rep tfoot td { background: var(--papier); border-bottom: 0; font-size: .8rem; }
.puces-rep { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; min-width: 0; }
.puce-rep { --c: var(--m-neutre); --cf: var(--m-neutre-fond); min-width: 0; padding: .2rem .4rem; border-left: 4px solid var(--c); border-radius: 3px; background: var(--cf); color: var(--encre); line-height: 1.3; overflow-wrap: anywhere; }
.puce-rep a { color: var(--encre); text-decoration: none; }
.puce-rep a:hover { color: var(--bronze-2); text-decoration: underline; }
.puce-rep .tache-rep { display: block; }
.puce-rep.punch .heures-rep { display: block; font-weight: 700; color: var(--ok-texte); }
.puce-rep.punch .chantier-rep { display: block; }
.puce-rep.punch .tache-rep { font-size: .95em; }
/* dans la grille, un long nom de tâche tient sur trois lignes (le nom entier dans l'info-bulle) */
.grille-rep .tache-rep { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.puce-rep.ecart { background: transparent; border: 1px dashed var(--c); border-left: 4px solid var(--c); }
.puce-rep.ecart a, .puce-rep.ecart .chantier-rep { color: var(--doux); }
.puce-rep.combler { background: var(--blanc); border: 1px dashed var(--c); border-left: 4px solid var(--c); }
.puce-rep.estompe { opacity: .4; }
.note-rep { font-size: .75rem; font-weight: 600; color: var(--erreur-texte); }
.puce-rep.m-bronze { --c: var(--m-bronze); --cf: var(--m-bronze-fond); } .puce-rep.m-bleu { --c: var(--m-bleu); --cf: var(--m-bleu-fond); }
.puce-rep.m-jaune { --c: var(--m-jaune); --cf: var(--m-jaune-fond); } .puce-rep.m-turquoise { --c: var(--m-turquoise); --cf: var(--m-turquoise-fond); }
.puce-rep.m-gris { --c: var(--m-gris); --cf: var(--m-gris-fond); } .puce-rep.m-brun { --c: var(--m-brun); --cf: var(--m-brun-fond); }
.puce-rep.m-brique { --c: var(--m-brique); --cf: var(--m-brique-fond); } .puce-rep.m-bois { --c: var(--m-bois); --cf: var(--m-bois-fond); }
.puce-rep.m-lilas { --c: var(--m-lilas); --cf: var(--m-lilas-fond); } .puce-rep.m-ocre { --c: var(--m-ocre); --cf: var(--m-ocre-fond); }
.puce-rep.m-vert { --c: var(--m-vert); --cf: var(--m-vert-fond); } .puce-rep.m-marine { --c: var(--m-marine); --cf: var(--m-marine-fond); }
.puce-rep.m-rose { --c: var(--m-rose); --cf: var(--m-rose-fond); } .puce-rep.m-olive { --c: var(--m-olive); --cf: var(--m-olive-fond); }
.jours-rep { display: none; }
.jour-rep { min-width: 0; padding: .75rem .9rem; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); box-shadow: var(--ombre); overflow-wrap: anywhere; }
.jour-rep h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .25rem; font-size: 1rem; }
.jour-rep h4 { margin: .7rem 0 .3rem; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); }
.jour-rep > .note, .libres-rep { margin: 0; }
.jour-rep.fds h3 { color: var(--bronze-2); }
.jour-rep.passe { opacity: .7; }
.jour-rep.auj { border-color: var(--bronze); box-shadow: inset 0 0 0 1px var(--bronze); }
.au-travail-rep { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.au-travail-rep > li { display: grid; gap: .25rem; min-width: 0; }
@media (max-width: 44rem) {
  /* au téléphone : une fiche par jour ; chaque tâche se touche du doigt (44 px) */
  .grille-rep-boite { display: none; }
  .jours-rep { display: grid; gap: .75rem; }
  .jour-rep .puce-rep .tache-rep { display: flex; align-items: center; min-height: 44px; }
  .jour-rep .puce-rep.punch .tache-rep { min-height: 44px; }
}

/* ---------- Mon compte et dossier d'employé (étape 15) ---------- */
main.mon-compte textarea, main.employes textarea, main.dossiers textarea { font: inherit; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); width: 100%; resize: vertical; min-height: 44px; }
.champs-compte, .champs-type { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .75rem 1rem; align-items: end; margin: 0 0 .75rem; }
.champs-compte input, .champs-type input:not([type=checkbox]), .champs-type select { width: 100%; }
.champs-compte > button, .champs-type > button, .champs-type > .ligne { grid-column: 1 / -1; justify-self: start; }
.champs-type .coche { margin: 0; }
details.signaler-erreur, details.demande-changement, details.refus-demande, details.depot-bureau { margin: .5rem 0 0; }
details.signaler-erreur > summary, details.demande-changement > summary, details.refus-demande > summary, details.depot-bureau > summary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem 1.3rem; cursor: pointer; list-style: none; border: 1.5px solid var(--pierre); border-radius: 999px; background: var(--blanc); color: var(--encre); font-weight: 600; font-size: .92rem; text-align: center; }
details.signaler-erreur > summary::-webkit-details-marker, details.demande-changement > summary::-webkit-details-marker, details.refus-demande > summary::-webkit-details-marker, details.depot-bureau > summary::-webkit-details-marker { display: none; }
details.signaler-erreur > summary:hover, details.demande-changement > summary:hover, details.refus-demande > summary:hover, details.depot-bureau > summary:hover { border-color: var(--encre); }
details[open].signaler-erreur > summary, details[open].demande-changement > summary, details[open].refus-demande > summary, details[open].depot-bureau > summary { background: var(--papier-2); }
details.signaler-erreur form, details.demande-changement form, details.refus-demande form, details.depot-bureau form { display: grid; gap: .6rem; margin: .4rem 0 0; }
details.signaler-erreur .note { margin: 0; }
details.signaler-erreur button, details.demande-changement button, details.refus-demande button { justify-self: start; }
ul.documents, ul.types-documents, ul.cartes-employes { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
li.document { border: 1px solid var(--pierre); border-radius: var(--rayon); padding: .8rem 1rem; background: var(--blanc); min-width: 0; }
li.document.manque { border-style: dashed; background: #fbfaf7; }
.titre-document { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin: 0 0 .35rem; overflow-wrap: anywhere; }
.titre-document .pastille { margin: 0; }
li.document .note { margin: 0 0 .5rem; }
li.document .avis { margin: .5rem 0 0; }
.actions-document { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.actions-document form { margin: 0; }
/* les replis habillés en bouton dans la rangée des gestes d'un document (« Nouvelle version », « Changer ou retirer », « Demander un
   changement ») : côte à côte avec « Voir » ; ouverts, sur toute la largeur, sous les autres (PL, 6 novembre 2026 : « tous sur la
   même ligne ou toute la même grosseur » ; avant, l'un sous l'autre, chacun à sa largeur) */
div.actions-document > details { margin: 0; min-width: 0; }
div.actions-document > details[open] { flex: 1 1 100%; }
.pastille.attention { color: #7a5a1c; background: #fdf6e7; }
.pastille.chantier { color: var(--blanc); background: var(--encre-2); }
form.depot-document { display: grid; gap: .6rem; margin: .5rem 0 0; }
form.depot-document > button { justify-self: start; }
form.depot-document label input[type=date] { max-width: 14rem; }
fieldset.choix-document [data-choisi] { flex-basis: 100%; margin: 0; overflow-wrap: anywhere; }
.expiration-document { margin: .6rem 0 0; align-items: flex-end; }
.expiration-document label input { max-width: 14rem; }
.demandes-attente { margin: 0 0 1rem; }
.demandes-attente h3, .liste-demandes h3 { font-size: .95rem; margin: 0 0 .5rem; }
article.demande { border: 1px solid #ead9b8; background: #fdfaf3; border-radius: var(--rayon); padding: .8rem 1rem; margin: 0 0 .75rem; min-width: 0; }
article.demande .note { margin: 0 0 .4rem; }
article.demande .raison { margin: 0 0 .6rem; white-space: pre-line; overflow-wrap: anywhere; }
.liste-demandes article.demande { background: var(--blanc); box-shadow: var(--ombre); }
.demandes-avis { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.demandes-avis p { margin: 0; }
ul.types-documents > li { padding: .9rem 1rem; margin: 0; }
ul.cartes-employes > li { padding: .9rem 1rem; margin: 0; }
ul.documents.compacts { gap: .4rem; }
ul.documents.compacts li.document { padding: .5rem .75rem; }
ul.documents.compacts .titre-document { margin: 0; }
ul.documents.compacts .actions-document { margin-top: .35rem; }
main.dossiers .recherche { margin: .75rem 0 .25rem; }
main.dossiers .onglets { margin-top: .5rem; }
@media (max-width: 44rem) {
  /* au téléphone : chaque bouton et chaque lien se touche du doigt (44 px), rien ne déborde de côté */
  .champs-compte > button, .champs-type > button, .champs-type > .ligne { justify-self: stretch; }
  form.depot-document > button, details.signaler-erreur button, details.demande-changement button, details.refus-demande button { justify-self: stretch; }
  form.depot-document label input[type=date], .expiration-document label input { max-width: none; }
  main.mon-compte textarea, main.employes textarea, main.dossiers textarea { font-size: 1rem; }  /* 16 px : l'iPhone ne zoome pas en touchant le champ */
  details.signaler-erreur > summary, details.demande-changement > summary, details.refus-demande > summary, details.depot-bureau > summary { display: flex; }
  .actions-document > .bouton, .actions-document > form, .actions-document > details { flex: 1 1 100%; }
  .actions-document > form > button { width: 100%; }
  label.bouton-photo { flex: 1 1 100%; justify-content: center; }
  .demandes-avis .bouton { flex: 1 1 100%; }
  main.dossiers .titre-document a, main.mon-compte .note a, main.dossiers .fil-retour a { display: inline-flex; align-items: center; min-height: 44px; }
  .liste-archives .bouton { flex: 1 1 100%; }
}

/* Les documents des fournisseurs (point 7, 30 octobre 2026) : la section « Documents » de la fiche (une carte par type, les gestes
   repliés en boutons de 44 px) et Paramètres → Documents des fournisseurs (une carte par type, le choix de l'exigence en trois cases) */
.documents-fournisseur .avis { margin: 0 0 .75rem; }
/* lot 2 : le résumé de l'état en haut de la section ; les pastilles du haut de la fiche mènent à la section */
.documents-fournisseur .resume-documents { margin: 0 0 .75rem; }
.documents-fournisseur .resume-documents .pastille { margin: 0 .35rem 0 0; }
.etat-fournisseur a.pastille { text-decoration: none; }
.documents-fournisseur .genre-a-preciser { margin: 0 0 .75rem; }
.documents-fournisseur li.document .texte-note { margin: 0 0 .5rem; }
details.geste-document { margin: .5rem 0 0; }
details.geste-document > summary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem 1.3rem; cursor: pointer; list-style: none; border: 1.5px solid var(--pierre); border-radius: 999px; background: var(--blanc); color: var(--encre); font-weight: 600; font-size: .92rem; text-align: center; }
details.geste-document > summary::-webkit-details-marker { display: none; }
details.geste-document > summary:hover { border-color: var(--encre); }
details[open].geste-document > summary { background: var(--papier-2); }
details.ajouter-document { margin: .85rem 0 0; }
form.pile-document { display: grid; gap: .6rem; margin: .5rem 0 0; }
form.pile-document > button { justify-self: start; }
form.depot-document .remplace { margin: 0; }
form.depot-document .plusieurs-pages { margin: -.25rem 0 0; }
.documents-fournisseur label:not(.bouton-photo):not(.coche) { display: grid; gap: .25rem; min-width: 0; }
.documents-fournisseur input:not([type=checkbox]):not([type=file]):not([type=radio]), .documents-fournisseur select { width: 100%; max-width: 100%; }
.documents-fournisseur input[type=date] { max-width: 14rem; }
.documents-fournisseur textarea { font: inherit; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); width: 100%; max-width: 100%; resize: vertical; min-height: 44px; }
.documents-fournisseur .anciennes-versions { margin: 1rem 0 .5rem; }
.documents-fournisseur .titre-geste { font-size: .95rem; margin: .9rem 0 0; }
.documents-fournisseur .anciennes-versions li.document .note { margin: 0 0 .35rem; overflow-wrap: anywhere; }
fieldset.choix-exigence { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 1rem; }
fieldset.choix-exigence legend { font-size: .85rem; color: var(--encre-2); padding: 0; margin: 0 0 .1rem; }
fieldset.choix-exigence label.coche { margin: 0; }
fieldset.choix-exigence input[type=radio] { width: 1.3rem; height: 1.3rem; flex: none; accent-color: var(--encre); }
.reglage-document .change-par { grid-column: 1 / -1; margin: 0; }
/* la demande de documents (go de PL du 5 novembre 2026) : la trace sous le résumé, « Demandé le » sur une carte, le pli « Demander
   les documents » (l'aperçu du courriel, puis un bouton de 44 px) ; une adresse ou un objet long se coupe plutôt que d'élargir la page */
.documents-fournisseur .derniere-demande, .documents-fournisseur .genre-propose { margin: 0 0 .75rem; overflow-wrap: anywhere; }
.documents-fournisseur .demande-pas-partie, .documents-fournisseur .reponse-documents { overflow-wrap: anywhere; }
.documents-fournisseur .reponse-documents a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.documents-fournisseur li.document .demande-le { margin: 0 0 .35rem; }
details.demander-documents { margin: 0 0 .85rem; }
.demander-documents .pli-demande { margin: .5rem 0 0; min-width: 0; }
.demander-documents .pli-demande > p { margin: .35rem 0 0; overflow-wrap: anywhere; }
.demander-documents .corps-courriel { margin: .5rem 0 0; }
.demander-documents form button { min-height: 44px; }
/* lot 3 : « Documents reçus à déposer » (une fiche par réponse, pas de tableau) ; ses gestes empilés, boutons et champs de 44 px ;
   une adresse, un objet ou un nom de pièce long se coupe plutôt que d'élargir la page. Les gestes d'une fiche, l'un sous l'autre,
   tous de la même largeur et au même bord (PL, 6 novembre 2026 : « tous sur la même ligne ou toute la même grosseur » ; avant,
   chacun à sa largeur) : celle de la fiche au téléphone, au plus 26rem à l'ordinateur (pas un bouton de toute la largeur de l'écran) */
main.documents-retours .retours-documents { list-style: none; margin: 0; padding: 0; }
main.documents-retours .retour-document { min-width: 0; overflow-wrap: anywhere; }
main.documents-retours .titre-retour { margin: 0 0 .5rem; }
main.documents-retours .titre-retour a, main.documents-retours .lien-retour a { display: inline-flex; align-items: center; min-height: 44px; }
/* « Pour qui a accès à projet@. » sur sa propre ligne, sous le lien de 44 px (avant, à sa suite : au téléphone, la fin de la note
   tombait seule, ~25 px plus bas que le reste de la ligne ; relecture du 6 novembre 2026, 3e passe) */
main.documents-retours .lien-retour .note { display: block; margin: 0; }
main.documents-retours .extrait { margin: 0 0 .75rem; color: var(--encre-2); font-size: .92rem; }
main.documents-retours .avis { margin: 0 0 .75rem; }
main.documents-retours .gestes-retour { display: grid; gap: .5rem; margin: .75rem 0 0; max-width: 26rem; }
main.documents-retours .gestes-retour > details.geste-document { margin: 0; min-width: 0; }
main.documents-retours .gestes-retour > details.geste-document > summary { display: flex; }
main.documents-retours form.geste-retour { display: grid; gap: .5rem; margin: 0; min-width: 0; }
main.documents-retours form.geste-retour > .note { margin: .25rem 0 0; }
main.documents-retours form.geste-retour > button { justify-self: stretch; min-height: 44px; max-width: 100%; white-space: normal; }
main.documents-retours form.geste-retour label:not(.coche) { display: grid; gap: .25rem; min-width: 0; }
main.documents-retours form.geste-retour input:not([type=checkbox]) { width: 100%; max-width: 100%; min-height: 44px; }
main.documents-retours .gestes-retour label.coche { margin: 0; }
/* les documents reçus dans projet@ (décision 6 de PL du 25 novembre 2026) : les pièces copiées d'une réponse, une sous la précédente,
   chacune avec sa proposition et son formulaire « Déposer sur la fiche » (le type, la date, le numéro, la case du téléphone, le
   bouton) empilés, champs et bouton de 44 px, de la largeur de la fiche au téléphone, au plus 26rem à l'ordinateur ; un long nom de
   pièce se coupe plutôt que d'élargir la page */
main.documents-retours .pieces-recues { margin: .75rem 0 0; padding: .75rem 0 0; border-top: 1px solid var(--pierre); min-width: 0; }
main.documents-retours .titre-pieces { font-size: 1rem; margin: 0 0 .5rem; }
main.documents-retours .pieces-copiees { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
main.documents-retours .piece-copiee { min-width: 0; overflow-wrap: anywhere; padding: .6rem .75rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); }
main.documents-retours .piece-copiee > p { margin: 0 0 .4rem; }
main.documents-retours .piece-copiee .proposition { font-weight: 600; }
main.documents-retours form.depot-piece, main.documents-retours form.choix-fiche { max-width: 26rem; margin: .5rem 0 0; }
main.documents-retours form.depot-piece select, main.documents-retours form.choix-fiche select { width: 100%; max-width: 100%; min-height: 44px; }
main.documents-retours details.depot-autre { margin: .5rem 0 0; max-width: 26rem; }
main.documents-retours details.depot-autre > summary { display: flex; }
/* lot 3 : l'avertissement des documents exigés sur le BC et la facture (la liste, puis « Tu peux quand même… ») */
.avis.avis-documents ul { margin: .35rem 0; padding-left: 1.1rem; }
.avis.avis-documents p.note { margin: .35rem 0 0; color: inherit; }
.avis.avis-documents p.note a, .avis.rappel-documents a { font-weight: 600; }
@media (max-width: 44rem) {
  details.geste-document > summary { display: flex; }
  form.pile-document > button, form.depot-document > button { justify-self: stretch; }
  .documents-fournisseur input[type=date] { max-width: none; }
  .documents-fournisseur textarea { font-size: 1rem; }  /* 16 px : l'iPhone ne zoome pas en touchant le champ */
}

/* « Approuver » et « Refuser » d'une facture, de la construction (facture.html) comme d'entretien (immobilier_facture.html) : PL, 13
   novembre 2026 : « Tu laisses le bouton « Approuver » tel qu'il est, puis à côté ou en dessous, un bouton « Refuser » en rouge,
   identique, la même grosseur. Juste deux boutons. » Avant, « Refuser » était un lien rouge sous le bouton. Une rangée : côte à côte
   à l'ordinateur, chaque bouton d'au moins 9rem (« Approuver » et « Refuser » y tiennent : la même largeur, la même hauteur) ; l'un
   sous l'autre, sur toute la largeur, au téléphone. « Refuser » est un repli habillé en bouton rouge (fond rouge, texte blanc), la
   boîte du bouton plein : la raison du refus reste obligatoire. Ouvert, il ne bouge pas ; la raison et « Refuser la facture »
   s'ouvrent dessous, vers la droite (comme un panneau de l'en-tête de l'estimation), dans la place qui reste sur la ligne : une part
   de 0, jamais à la ligne suivante (mesure du 13 novembre 2026 : avec 24rem, à 768 px, « Refuser » d'une facture reçue sautait sous
   les deux autres). Une facture reçue a aussi « Envoyer à l'approbation », plus long : la même hauteur, sa largeur à lui. */
.gestes-approbation { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .75rem; margin: 1rem 0 0; }
.gestes-approbation > form, .gestes-approbation > details { margin: 0; min-width: 0; }
.gestes-approbation > form > button, details.refuser-facture > summary { min-width: 9rem; min-height: 44px; }
details.refuser-facture > summary { display: inline-flex; align-items: center; justify-content: center; padding: .6rem 1.3rem; cursor: pointer; list-style: none; border: 1.5px solid var(--erreur-texte); border-radius: 999px; background: var(--erreur-texte); color: var(--blanc); font-weight: 600; font-size: .92rem; text-align: center; }
details.refuser-facture > summary::-webkit-details-marker { display: none; }
details.refuser-facture > summary:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
.gestes-approbation > details[open] { flex: 1 1 0; }
details.refuser-facture > form { display: grid; gap: .75rem; margin: .75rem 0 0; }
details.refuser-facture label { display: grid; gap: .35rem; min-width: 0; }
details.refuser-facture textarea { font: inherit; width: 100%; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); resize: vertical; min-height: 44px; }
details.refuser-facture > form > button { justify-self: start; }
.gestes-approbation button.danger { background: var(--erreur-texte); border-color: var(--erreur-texte); color: var(--blanc); }
#approbation .geste-refuse { margin: .75rem 0 0; }  /* un geste visible mais pas permis maintenant : sa raison, sous la rangée */
@media (max-width: 44rem) {
  .gestes-approbation { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .gestes-approbation > form > button, details.refuser-facture > summary { width: 100%; }
  details.refuser-facture > summary { display: flex; }  /* centré comme le texte d'un bouton */
  .gestes-approbation > details[open] { flex: 0 0 auto; }
  details.refuser-facture > form > button { justify-self: stretch; }
  details.refuser-facture textarea { font-size: 1rem; }  /* 16 px : l'iPhone ne zoome pas en touchant le champ */
}

/* Contremaîtres attitrés, sur la fiche du projet (PL, 10 octobre 2026) */
ul.attitres { list-style: none; margin: 0 0 .75rem; padding: 0; }
ul.attitres > li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .35rem 0; border-bottom: 1px solid var(--papier-2); }
ul.attitres .attitre-nom { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
ul.attitres form { margin: 0; flex: none; }
/* Contremaîtres attitrés, dans « Modifier la fiche » : une case par contremaître (PL, 10 octobre 2026) */
fieldset.choix-attitres { border: 0; padding: 0; margin: .25rem 0 .5rem; min-width: 0; }
fieldset.choix-attitres legend { font-size: .8rem; font-weight: 500; color: var(--encre-2); padding: 0; margin: 0 0 .1rem; }
fieldset.choix-attitres label.coche { font-size: .95rem; font-weight: 400; color: var(--encre); margin: 0; }
fieldset.choix-attitres .note { margin: .35rem 0 0; }

/* Coût Total en trois niveaux : le Révisé à côté de la Projection, sa source, le centre des soumissions (PL, 12 octobre 2026) */
.source-revise { display: block; font-size: .72rem; line-height: 1.25; color: var(--doux); white-space: normal; margin-top: .1rem; }
.source-revise.projection { font-style: italic; }
.source-revise.soumission { color: var(--ok-texte); }
dl.revise-chiffres .source-revise { display: inline; font-size: inherit; }
dl.revise-chiffres dd strong { font-family: var(--titres); font-size: 1.15rem; }
.ecart-revise { font-weight: 600; margin-left: .35rem; white-space: nowrap; }
.ecart-revise.bon { color: var(--ok-texte); }
.ecart-revise.mauvais { color: var(--erreur-texte); }
table.couts td.revise { min-width: 7rem; }
table.couts td.revise .source-revise { text-align: right; max-width: 11rem; margin-left: auto; }
/* les en-têtes des montants au-dessus de leurs chiffres, alignés à droite comme eux (capture de PL, 15 octobre 2026 : « Révisé »
   était à gauche de sa colonne) ; au téléphone, l'en-tête disparaît (fiches) */
table.couts thead th:nth-child(n+3), table.enfants-mo thead th:nth-child(n+2) { text-align: right; }
.revise-code > h2 { margin-top: 0; }
.revise-code form.revenir { margin: 0 0 1rem; }
.revise-code h3, .bloc h4 { font-size: .95rem; margin: 1.25rem 0 .5rem; }
.soumissions-liste { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; max-width: 52rem; }
.soumissions-liste > li { border: 1px solid var(--pierre); border-radius: var(--rayon); padding: .75rem 1rem; background: var(--blanc); min-width: 0; }
.soumissions-liste > li.retenue { border-color: var(--bronze); background: #fdfaf3; }
.soumission-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; }
.soumission-tete .fournisseur { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.soumission-tete .pastille { margin-left: 0; }
.soumission-tete .prix { margin-left: auto; font-family: var(--titres); font-weight: 600; white-space: nowrap; }
.soumissions-liste .note, .soumission-note { margin: .25rem 0 0; overflow-wrap: anywhere; }
.soumissions-liste .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.soumissions-liste .actions form { margin: 0; }
.soumissions-liste form.prix-arrive { margin-top: .6rem; }
details.calcul-revise, details.main-revise, details.ajout-soumission { margin: .75rem 0; }
details.calcul-revise > :last-child, details.main-revise > :last-child, details.ajout-soumission > :last-child { margin-bottom: 0; }
label.large { flex: 1 1 14rem; }
@media (max-width: 44rem) {
  table.couts.fiches td { grid-template-columns: 8.75rem minmax(0, 1fr); }
  table.couts.fiches td.large { display: block; padding: 0 0 .25rem; color: var(--encre-2); }
  table.couts.fiches td.large::before { display: none; }  /* le nom du compte, sous le code, sans étiquette */
  table.couts.fiches td.nul { display: none; }
  table.couts.fiches tr.titre { background: var(--papier); }
  table.couts.fiches tr.titre th[scope=row] { padding-bottom: 0; }
  table.couts.fiches td:nth-child(n+3) { text-align: left; }
  table.couts.fiches th[scope=row] a, table.couts.fiches td a { display: inline-flex; align-items: center; min-height: 44px; }
  table.couts.fiches td.revise .source-revise { grid-column: 2; text-align: left; max-width: none; margin: -.5rem 0 0; }
  table.couts.fiches tfoot td:empty { display: none; }
  /* la fiche « Total … » qui ferme chaque section : un trait foncé au-dessus, le fond un peu plus foncé que celui du titre, ses
     montants à gauche comme ceux des codes ; rien à toucher (pas de lien) */
  table.couts.fiches tr.total-section { background: var(--papier-2); border-top: 2px solid var(--encre-2); border-bottom-color: var(--pierre); }
  table.couts.fiches tr.total-section > *, table.couts.fiches tbody tr.total-section:hover > * { background: transparent; border-top: 0; }
  table.couts.fiches tr.total-section td { text-align: left; }
  .soumissions-liste .actions > form { flex: 1 1 8rem; }
  .soumissions-liste .actions button { width: 100%; }
  dl.revise-chiffres dd .note { display: block; }
  .revise-code form.revenir button { width: 100%; }
  main.cout-total table.fiches th[scope=row] a, main.cout-total p.note a, main.cout-total .fil a,
  main.cout-total #estimation-vide a { display: inline-flex; align-items: center; min-height: 44px; }
  main.cout-total details.exporter > summary { min-height: 44px; }
}
/* Entre le téléphone et l'ordinateur (relecture du 27 octobre 2026 : à 1 024 px, le tableau des codes défilait de 36 px, la colonne
   Avancement coupée) : un peu moins de marge et un compte plus étroit, le tableau tient dès 1 024 px. Plus étroit encore (une tablette
   debout), il passe en fiches (table.en-fiches, app.js), les mêmes qu'au téléphone. */
@media (min-width: 44.01rem) and (max-width: 79.99rem) {
  table.couts:not(.en-fiches) > * > tr > th, table.couts:not(.en-fiches) > * > tr > td { padding-left: .45rem; padding-right: .45rem; }
  table.couts:not(.en-fiches) td.large { min-width: 9rem; }
}
@media (min-width: 44.01rem) {
  table.couts.en-fiches > * > tr > td { grid-template-columns: 8.75rem minmax(0, 1fr); }
  table.couts.en-fiches td.large { display: block; padding: 0 0 .25rem; color: var(--encre-2); }
  table.couts.en-fiches td.large::before { display: none; }  /* le nom du compte, sous le code, sans étiquette */
  table.couts.en-fiches td.nul { display: none; }
  table.couts.en-fiches tr.titre { background: var(--papier); }
  table.couts.en-fiches tr.titre th[scope=row] { padding-bottom: 0; }
  table.couts.en-fiches > * > tr > td:nth-child(n+3) { text-align: left; }
  table.couts.en-fiches > * > tr > th[scope=row] a, table.couts.en-fiches > * > tr > td a { display: inline-flex; align-items: center; min-height: 44px; }
  table.couts.en-fiches td.revise .source-revise { grid-column: 2; text-align: left; max-width: none; margin: -.5rem 0 0; }
  table.couts.en-fiches > tfoot td:empty { display: none; }
  table.couts.en-fiches tr.total-section { background: var(--papier-2); border-top: 2px solid var(--encre-2); border-bottom-color: var(--pierre); }
  table.couts.en-fiches tr.total-section > *, table.couts.en-fiches > tbody > tr.total-section:hover > * { background: transparent; border-top: 0; }
  table.couts.en-fiches tr.total-section td { text-align: left; }
}

/* ---------- La page d'un code (PL, 13 octobre 2026) : projection, révisé par lignes, centre des soumissions et sa grille ---------- */
.fil .sep { color: var(--doux); margin: 0 .2rem; }
.fil [aria-current] { color: var(--encre-2); }
.page-code .origine { max-width: none; }
.page-code .carte > h2:first-child { margin-top: 0; }
/* dans le Révisé et le centre, les notes prennent toute la largeur (pas la limite de 65 caractères) */
.revise-code .note, .centre-soumissions .note, .grille-boite .note, .creer-estimation .note { max-width: none; }
.page-code .bloc > .note { max-width: none; }
table.lignes-revisees tr.ecartee td, table.lignes-revisees tr.ecartee th { color: var(--doux); }
table.lignes-revisees .barree { text-decoration: line-through; }
table.lignes-revisees tr.ecartee td .note, table.lignes-revisees tr.ligne-prix td .note, table.lignes-revisees tr.ligne-ecart td .note { display: block; margin: .1rem 0 0; font-size: .78rem; }
table.lignes-revisees tr.ligne-prix td { background: #fdfaf3; }
table.lignes-revisees tr.ligne-prix td.total { font-weight: 600; }
table.lignes-revisees td > button.discret { white-space: nowrap; }
.actions-revise, .actions-grille { margin: .5rem 0 0; }
.revise-code form.revenir { margin: 0 0 1rem; }
.creer-estimation form.choix-creation { margin: 0 0 1rem; }
.creer-estimation form.choix-creation .note { flex-basis: 100%; margin: 0; }
/* « Je comprends » sur un projet en construction (PL, 24 octobre 2026) : sa propre ligne, avant le bouton, lisible comme une phrase */
.creer-estimation label.coche.confirmer { flex-basis: 100%; margin: 0; font-size: .9rem; font-weight: 400; color: var(--encre); }
.creer-estimation > .avis.attention { margin: 0 0 1rem; }
.creer-estimation input[type=file] { max-width: 100%; }
.creer-estimation > .avis.lecture { margin: 0 0 1rem; }
.creer-estimation .toutes-estimations { margin: .25rem 0 0; }
.creer-estimation .toutes-estimations a { font-weight: 500; }
.creer-estimation .toutes-estimations a { display: inline-flex; align-items: center; min-height: 44px; }
/* La confirmation avec le budget avant et après (PL, 24 octobre 2026) : les deux budgets côte à côte à l'ordinateur, l'un sous
   l'autre au téléphone ; les codes en fiches (code, nom, montant), le montant à droite, rien ne déborde à 375 px */
.phrase-budget { font-size: 1.1rem; font-weight: 600; max-width: 48rem; overflow-wrap: anywhere; }
.avant-apres { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
.budget-cote .note { max-width: none; }
.budget-cote dd { font-variant-numeric: tabular-nums; }
.budget-cote dd strong { font-size: 1.1rem; }
/* À l'ordinateur, côte à côte, et les rangées des deux budgets à la même hauteur (la relecture du 24 octobre 2026 : une note sur
   deux lignes décalait Projection, Révisé, Budget et Codes d'une carte à l'autre) : chaque carte prend six rangées de la grille
   commune (son titre, sa note, puis les quatre de sa fiche), en sous-grille. Un fureteur sans sous-grille : côte à côte, sans plus. */
@media (min-width: 44.01rem) {
  .avant-apres { grid-template-columns: 1fr 1fr; }
  @supports (grid-template-rows: subgrid) {
    .budget-cote { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; }
    .budget-cote > dl.fiche { grid-row: span 4; grid-template-rows: subgrid; }
  }
}
.codes-ecarts h2 { font-size: 1.05rem; margin: 1.25rem 0 .35rem; }
.codes-ecarts h2:first-child { margin-top: 0; }
.codes-avant-apres { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .4rem; }
.codes-avant-apres li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .75rem; padding: .55rem .8rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); }
.codes-avant-apres .code { font-weight: 600; }
.codes-avant-apres .nom { flex: 1 1 9rem; min-width: 0; overflow-wrap: anywhere; color: var(--encre-2); }
.codes-avant-apres .montant { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.codes-ecarts details.autre-montant, details.avertissements-excel { margin-top: 1rem; }
.codes-ecarts details.autre-montant > summary, details.avertissements-excel > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: .5rem; list-style: none; }
.codes-ecarts details.autre-montant > summary::-webkit-details-marker, details.avertissements-excel > summary::-webkit-details-marker { display: none; }
/* qu'on voie qu'elle s'ouvre : une flèche, tournée une fois ouverte */
.codes-ecarts details.autre-montant > summary::before, details.avertissements-excel > summary::before { content: "▸"; color: var(--bronze); flex: none; }
.codes-ecarts details.autre-montant[open] > summary::before, details.avertissements-excel[open] > summary::before { content: "▾"; }
details.avertissements-excel li { overflow-wrap: anywhere; }
.confirmer-remplacement label.coche.confirmer { font-weight: 500; font-size: 1rem; margin: 0 0 1rem; color: var(--encre); }
.confirmer-remplacement .avis.attention { margin: 0 0 .75rem; }
.monday-compare h3 { font-size: .95rem; margin: .75rem 0 .5rem; }
/* La grille : un panneau par-dessus la page à l'ordinateur, pleine page au téléphone ; se ferme par le même bouton, sans script */
details.grille-panneau { margin: 1rem 0 .5rem; }
details.grille-panneau > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .4rem 1.3rem; border-radius: 999px; border: 1.5px solid var(--encre); background: var(--encre); color: var(--blanc); font-weight: 600; font-size: .92rem; }
details.grille-panneau > summary::-webkit-details-marker { display: none; }
details.grille-panneau > summary:hover { background: var(--bronze-2); border-color: var(--bronze-2); }
details.grille-panneau > summary .fermer { display: none; }
details.grille-panneau[open] > summary { position: fixed; top: .75rem; right: 1rem; z-index: 41; background: var(--blanc); color: var(--encre); border-color: var(--encre); box-shadow: var(--ombre); }
details.grille-panneau[open] > summary .ouvrir { display: none; }
details.grille-panneau[open] > summary .fermer { display: inline; }
.grille-boite { position: fixed; inset: 0; z-index: 40; background: var(--blanc); overflow: auto; padding: 4rem 1rem 2rem; -webkit-overflow-scrolling: touch; }
.grille-boite h3 { font-family: var(--titres); font-size: 1.2rem; text-transform: none; letter-spacing: -.01em; color: var(--encre); margin: 0 0 .75rem; }
.grille-defile { margin: 0 0 .5rem; }
/* colonnes fixes : les champs prennent la largeur de leur case ; à l'ordinateur, les colonnes des fournisseurs se partagent la largeur
   de la boîte (rien à glisser de côté : mesuré jusqu'à 8 fournisseurs à 1 280 px, PL, 27 octobre 2026). Au téléphone, une fiche par
   item, qui tient dans l'écran ; la largeur minimale (12 rem + 10 rem par fournisseur, donnée par le gabarit dans --grille-largeur)
   ne vaut plus que sans script, quand il n'y a pas de fiches : la grille défile alors dans sa boîte, jamais la page. */
table.grille-soumissions { table-layout: fixed; }
table.grille-soumissions th, table.grille-soumissions td { vertical-align: top; overflow-wrap: anywhere; }
table.grille-soumissions th[scope=row] { white-space: normal; font-weight: 600; }
table.grille-soumissions thead th { white-space: normal; }
table.grille-soumissions thead th:first-child { width: 12rem; }
table.grille-soumissions thead th.retirer { width: 5rem; }
table.grille-soumissions thead th .pastille { margin-left: .25rem; }
table.grille-soumissions td input, table.grille-soumissions th input { display: block; width: 100%; min-width: 0; padding: .35rem .5rem; }  /* le montant, puis la note dessous (les cases ne passent pas à la ligne) */
table.grille-soumissions input.case-note { margin-top: .25rem; font-size: .82rem; }
table.grille-soumissions span.case-valeur { display: block; font-weight: 600; }
table.grille-soumissions span.case-note { display: block; font-size: .82rem; color: var(--doux); }
table.grille-soumissions td.case.inclus { background: var(--ok-fond); }
table.grille-soumissions td.case.exclu { background: var(--erreur-fond); }
table.grille-soumissions tr.nouvelle th, table.grille-soumissions tr.nouvelle td { background: #fbfaf7; }
table.grille-soumissions tfoot > tr > * { background: var(--papier); }
table.grille-soumissions tfoot td .note { display: block; margin: 0; font-size: .78rem; }
/* « Retenir », « Libérer » et « Faire le BC » dessous : chacun sur toute la largeur de sa colonne, empilés pareils (PL, 6 novembre 2026) */
table.grille-soumissions tr.retenir td button { white-space: nowrap; width: 100%; padding-left: .8rem; padding-right: .8rem; }
/* « Reprendre… » et « Enregistrer comme modèle » : des boutons du formulaire de la grille (ce qui est tapé s'enregistre d'abord) */
.reprise-grille { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
/* le pied du formulaire de la grille (_grille.html) : « + Ajouter un item » et les boutons de reprise côte à côte s'ils tiennent, plutôt
   que l'un sous l'autre, chacun à sa largeur (PL, 6 novembre 2026) ; la bande « Ligne retirée » garde sa ligne à elle */
.pied-grille { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem; margin: .5rem 0 .75rem; }
.pied-grille > .actions-lignes, .pied-grille > .reprise-grille { margin: 0; }
.pied-grille > .bande-retrait { flex: 1 1 100%; margin: 0; }
/* le bouton caché en tête du formulaire de la grille et du Révisé : « Entrée » dans un champ enregistre, sans rien retenir ni garder */
button.enregistrer-par-defaut { padding: 0; border: 0; min-height: 0; }
/* la case « Retirer » d'une ligne (projection, révisé, grille) : une étiquette de 44 px de haut autour de la case à cocher */
table label.coche.retirer { margin: 0; }
@media (min-width: 44rem) {
  details.grille-panneau[open]::before { content: ""; position: fixed; inset: 0; z-index: 39; background: rgba(21, 23, 26, .45); }
  .grille-boite { inset: 2.5rem 2rem; border-radius: var(--rayon); box-shadow: 0 20px 60px rgba(21, 23, 26, .35); padding: 1.5rem 2rem 2rem; }
  details.grille-panneau[open] > summary { top: 3.25rem; right: 3rem; }
  .grille-boite h3 { padding-right: 11rem; }
}
@media (max-width: 44rem) {
  .page-code .tuiles { grid-template-columns: 1fr 1fr; }
  .page-code .tuile { padding: .8rem .9rem; }
  .page-code .tuile strong { font-size: 1.1rem; }
  details.grille-panneau > summary { display: flex; width: 100%; }
  details.grille-panneau[open] > summary { width: auto; }
  .creer-estimation form.choix-creation > button { width: 100%; }
  .reprise-grille > button { flex: 1 1 100%; width: 100%; }
  .pied-grille > .actions-lignes, .pied-grille > .reprise-grille { flex: 1 1 100%; }
  .grille-boite .actions-grille button, .actions-revise button { width: 100%; }
  table.lignes-revisees.fiches td > button.discret { width: 100%; }
  table.lignes-revisees.fiches td > .note { grid-column: 2; }  /* « remplacée par … », « cette ligne la complète » : sous l'item, pas sous son étiquette */

  table.grille-soumissions:not(.fiches) { min-width: var(--grille-largeur, 0); }  /* sans script, pas de fiches : la grille défile dans sa boîte */
  table.fiches td > label.coche.retirer { grid-column: 2; }
  table.grille-soumissions.fiches th[scope=row] { min-width: 0; }

  table.grille-soumissions.fiches td.case { grid-template-columns: 6.75rem minmax(0, 1fr); }
  table.grille-soumissions.fiches td.case input { grid-column: 2; }
  table.grille-soumissions.fiches tr.nouvelle td:empty { display: none; }
  table.grille-soumissions.fiches tr.retenir td button { width: 100%; }
  main.cout-total .fil a, main.cout-total .origine a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- Lignes de l'estimation plus simples (PL, 13 octobre 2026 ; lignes.js) : projection, révisé, grille ----------
   À l'ordinateur, le tableau tient dans la largeur de la page (colonnes fixes, la note prend la place qui reste) ; ✕ au bout de
   chaque ligne (44 px) ; « + Ajouter une ligne » ; la bande « Ligne retirée — Annuler » ; « Enregistré ✓ » près du total. */
table.lignes-estimation { table-layout: fixed; }
table.lignes-estimation th, table.lignes-estimation td { padding: .5rem .6rem; }
/* les en-têtes, un peu moins espacés : « QUANTITÉ » tient dans sa colonne dès 1 024 px. Plus étroit, un en-tête qui ne tient plus
   met le tableau en fiches (table.en-fiches, app.js), plutôt que de chevaucher son voisin (relecture du 27 octobre 2026) */
table.lignes-estimation thead th { padding-left: .4rem; padding-right: .4rem; letter-spacing: .05em; }
table.lignes-estimation thead th:nth-child(1) { width: 23%; }
table.lignes-estimation thead th:nth-child(2) { width: 9%; }
table.lignes-estimation thead th:nth-child(3) { width: 8.5%; }
table.lignes-estimation thead th:nth-child(4) { width: 10%; }
table.lignes-estimation thead th:nth-child(5) { width: 11.5%; }
table.lignes-estimation thead th.retirer, table.grille-soumissions thead th.retirer { width: 4.25rem; }
table.lignes-estimation td.large { min-width: 0; overflow-wrap: anywhere; }
table.lignes-estimation td.note-ligne { white-space: normal; }
table.lignes-estimation input, table.lignes-estimation input.court { width: 100%; min-width: 0; }
table.lignes-estimation td.total { white-space: nowrap; }
table.lignes-estimation td.retirer, table.grille-soumissions td.retirer { padding-left: .2rem; padding-right: .2rem; text-align: center; vertical-align: middle; }
/* son en-tête aussi : « Retirer » tient sur une ligne (relecture du 27 octobre 2026 : « RETIRE / R ») */
table.lignes-estimation thead th.retirer, table.grille-soumissions thead th.retirer { padding-left: .2rem; padding-right: .2rem; text-align: center; }
table.lignes-estimation td .garder-ligne { display: block; margin-top: .35rem; white-space: nowrap; }
button.retirer-ligne { min-width: 44px; min-height: 44px; padding: 0 .4rem; border-color: transparent; background: transparent; color: var(--doux); font-size: 1.05rem; font-weight: 600; line-height: 1; border-radius: var(--rayon); display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
button.retirer-ligne:hover, button.retirer-ligne:focus-visible { background: var(--erreur-fond); color: var(--erreur-texte); border-color: transparent; }
button.retirer-ligne .texte-retirer { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bande-retrait { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0 0 .75rem; padding: .45rem .9rem; border-left: 3px solid var(--bronze); background: #fdf6e7; color: #7a5a1c; border-radius: var(--rayon); font-size: .92rem; }
.bande-retrait button { min-height: 36px; }
.actions-lignes { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: .5rem 0 0; }
.enregistrement { display: inline-block; font-size: .8rem; font-weight: 500; color: var(--doux); margin-left: .5rem; white-space: normal; }
.enregistrement:empty { display: none; }
.enregistrement.ok { color: var(--ok-texte); }
.enregistrement.erreur { color: var(--erreur-texte); font-weight: 600; }
.enregistrement.attention { color: #7a5a1c; font-weight: 600; }  /* enregistré, sauf une nouvelle ligne à compléter */
td.pied-note { white-space: normal; }
/* une nouvelle ligne qui porte un prix ou une note mais ni item ni quantité : pas créée, marquée jusqu'à ce qu'on la complète */
table.lignes-estimation tr.non-enregistree td, table.grille-soumissions tr.non-enregistree td, table.grille-soumissions tr.non-enregistree th { background: #fdf6e7; }
table.lignes-estimation tr.non-enregistree input[name^=item-], table.lignes-estimation tr.non-enregistree input[name^=quantite-], table.grille-soumissions tr.non-enregistree input[name^=item-] { border-color: var(--bronze); }
@media (max-width: 44rem) {
  /* au téléphone (fiches) : ✕ devient un bouton pleine largeur « ✕ Retirer », 44 px ; « + Ajouter » et « Enregistrer » aussi */
  table.lignes-estimation.fiches td.retirer, table.grille-soumissions.fiches td.retirer { grid-template-columns: 1fr; padding: .35rem 0; }
  table.lignes-estimation.fiches td.retirer::before, table.grille-soumissions.fiches td.retirer::before { display: none; }
  table.fiches td.retirer button.retirer-ligne { width: 100%; border: 1px solid var(--pierre); color: var(--encre-2); font-size: .92rem; font-weight: 500; }
  table.fiches td.retirer button.retirer-ligne .texte-retirer { position: static; width: auto; height: auto; clip: auto; white-space: normal; }
  table.lignes-estimation.fiches td .garder-ligne { width: 100%; }
  .actions-lignes > button { flex: 1 1 100%; width: 100%; }
  .bande-retrait > button { flex: 1 1 100%; min-height: 44px; }  /* « Annuler » se touche du doigt : 44 px, comme les autres boutons du téléphone */
  .enregistrement { display: block; margin: .25rem 0 0; }
  .enregistrement:empty { display: none; }
  /* le pied du tableau (« = projection », l'écart Excel, « Enregistré ✓ ») : sans étiquette « Note » (ce n'en est pas une), et caché
     tant qu'il n'a rien à dire (« muet », posé par le gabarit et par lignes.js) */
  table.lignes-estimation.fiches td.pied-note { grid-template-columns: 1fr; }
  table.lignes-estimation.fiches td.pied-note > .note { grid-column: auto; }  /* « = projection » dans la seule colonne (pas la 2e, comme « remplacée par … ») */
  table.lignes-estimation.fiches td.pied-note::before { display: none; }
  table.lignes-estimation.fiches td.pied-note.muet { display: none; }
}
@media (min-width: 44.01rem) {  /* en fiches entre le téléphone et l'ordinateur (table.en-fiches, app.js) : comme au téléphone */
  .grille.en-fiches input, .grille.en-fiches input.court { width: 100%; min-width: 0; text-align: left; }
  .grille.en-fiches td.total { text-align: left; }
  table.lignes-estimation.en-fiches td.retirer, table.grille-soumissions.en-fiches td.retirer { grid-template-columns: 1fr; padding: .35rem 0; }
  table.lignes-estimation.en-fiches td.retirer::before, table.grille-soumissions.en-fiches td.retirer::before { display: none; }
  table.en-fiches td.retirer button.retirer-ligne { width: 100%; border: 1px solid var(--pierre); color: var(--encre-2); font-size: .92rem; font-weight: 500; }
  table.en-fiches td.retirer button.retirer-ligne .texte-retirer { position: static; width: auto; height: auto; clip: auto; white-space: normal; }
  table.en-fiches td > label.coche.retirer { grid-column: 2; }
  table.lignes-estimation.en-fiches td .garder-ligne { justify-self: start; }
  table.lignes-revisees.en-fiches td > .note { grid-column: 2; }
  table.lignes-estimation.en-fiches td.pied-note { grid-template-columns: 1fr; }
  table.lignes-estimation.en-fiches td.pied-note > .note { grid-column: auto; }
  table.lignes-estimation.en-fiches td.pied-note::before { display: none; }
  table.lignes-estimation.en-fiches td.pied-note.muet { display: none; }
  table.lignes-detail.en-fiches tr.pied-source { border-top: 0; padding-top: 0; }
  table.lignes-detail.en-fiches tr.pied-source td.pied-note { text-align: left; }
  table.lignes-detail.en-fiches tr.pied-source td.pied-note .note { margin: 0; }
  table.lignes-detail.en-fiches td.heures { text-align: left; }
  table.lignes-detail.en-fiches td > .note.take-off, table.lignes-detail.en-fiches td > .note.reference { grid-column: 2; }
  table.lignes-detail.en-fiches td.large { display: block; font-weight: 600; }
  table.lignes-detail.en-fiches td.large::before { display: none; }
  table.lignes-detail.en-fiches tr.nouvelle td.large { font-weight: 400; }
}

/* ---------- S+3 : une couleur par fournisseur (PL, 13 novembre 2026 ; avant, par métier), une icône par statut (13 octobre) ----------
   La couleur d'une tâche est celle de son fournisseur (cedule/couleurs.py : donnée d'office, changeable sur sa fiche) ; la main-d'œuvre
   Ingenio (nos gars) en bronze ; neutre sinon. Les couleurs nommées servent aussi aux chantiers de Répartition et aux catégories.
   Le statut se lit par sa forme (✓ ● ◐ ○ ◆), pas seulement par sa couleur. */
:root {
  --m-neutre: #8a8f98; --m-neutre-fond: #efeae2;
  --m-bronze: #a8814f; --m-bronze-fond: #f3e8d6;
  --m-bleu: #2b6cb0; --m-bleu-fond: #e3edf8;
  --m-jaune: #d4a106; --m-jaune-fond: #fbf3d1;
  --m-turquoise: #1f9a97; --m-turquoise-fond: #dcf2f1;
  --m-gris: #5f6670; --m-gris-fond: #e6e8eb;
  --m-brun: #7a4b27; --m-brun-fond: #ece0d6;
  --m-brique: #b23a2a; --m-brique-fond: #f6e1dd;
  --m-bois: #b5752a; --m-bois-fond: #f6e9d8;
  --m-lilas: #7b5ea7; --m-lilas-fond: #ece5f5;
  --m-ocre: #c48a1e; --m-ocre-fond: #f7ecd2;
  --m-vert: #2f7d3b; --m-vert-fond: #e1efe2;
  --m-marine: #1f3a6b; --m-marine-fond: #e0e5ef;
  --m-rose: #c2457d; --m-rose-fond: #f8e2ec;
  --m-olive: #6b7a2a; --m-olive-fond: #e9ecd8;
  /* la palette des fournisseurs (PL, 13 novembre 2026 : une couleur par fournisseur) : six couleurs de plus, loin du neutre et du bronze */
  --m-orange: #dd6b20; --m-orange-fond: #fbe6d4;
  --m-ciel: #3b9ad9; --m-ciel-fond: #dceefa;
  --m-prune: #7a2e5c; --m-prune-fond: #f0dde9;
  --m-lime: #5e9a1c; --m-lime-fond: #e6f2d6;
  --m-indigo: #4c51bf; --m-indigo-fond: #e2e3f8;
  --m-corail: #e05a4f; --m-corail-fond: #fbe1de;
}
.pastille-couleur.c-neutre { background: var(--m-neutre); } .pastille-couleur.c-bronze { background: var(--m-bronze); }
.pastille-couleur.c-bleu { background: var(--m-bleu); } .pastille-couleur.c-jaune { background: var(--m-jaune); }
.pastille-couleur.c-turquoise { background: var(--m-turquoise); } .pastille-couleur.c-gris { background: var(--m-gris); }
.pastille-couleur.c-brun { background: var(--m-brun); } .pastille-couleur.c-brique { background: var(--m-brique); }
.pastille-couleur.c-bois { background: var(--m-bois); } .pastille-couleur.c-lilas { background: var(--m-lilas); }
.pastille-couleur.c-ocre { background: var(--m-ocre); } .pastille-couleur.c-vert { background: var(--m-vert); }
.pastille-couleur.c-marine { background: var(--m-marine); } .pastille-couleur.c-rose { background: var(--m-rose); }
.pastille-couleur.c-olive { background: var(--m-olive); }
.pastille-couleur.c-orange { background: var(--m-orange); } .pastille-couleur.c-ciel { background: var(--m-ciel); }
.pastille-couleur.c-prune { background: var(--m-prune); } .pastille-couleur.c-lime { background: var(--m-lime); }
.pastille-couleur.c-indigo { background: var(--m-indigo); } .pastille-couleur.c-corail { background: var(--m-corail); }
/* la carte d'une tâche : la bordure gauche et un fond pâle de son métier (le statut ne colore plus la carte) */
.tache-s3.s-confirme, .tache-s3.s-nous, .tache-s3.s-pas-confirme, .tache-s3.s-attente { border-left-color: var(--pierre); }
.tache-s3.m-neutre { border-left-color: var(--m-neutre); }
.tache-s3.m-bronze { border-left-color: var(--m-bronze); background: #fcf8f2; }
.tache-s3.m-bleu { border-left-color: var(--m-bleu); background: #f6f9fd; }
.tache-s3.m-jaune { border-left-color: var(--m-jaune); background: #fefbf0; }
.tache-s3.m-turquoise { border-left-color: var(--m-turquoise); background: #f3fafa; }
.tache-s3.m-gris { border-left-color: var(--m-gris); background: #f6f7f8; }
.tache-s3.m-brun { border-left-color: var(--m-brun); background: #faf6f3; }
.tache-s3.m-brique { border-left-color: var(--m-brique); background: #fdf5f4; }
.tache-s3.m-bois { border-left-color: var(--m-bois); background: #fdf8f1; }
.tache-s3.m-lilas { border-left-color: var(--m-lilas); background: #f9f6fc; }
.tache-s3.m-ocre { border-left-color: var(--m-ocre); background: #fdf9ef; }
.tache-s3.m-vert { border-left-color: var(--m-vert); background: #f4f9f4; }
.tache-s3.m-marine { border-left-color: var(--m-marine); background: #f3f5f9; }
.tache-s3.m-rose { border-left-color: var(--m-rose); background: #fdf5f8; }
.tache-s3.m-olive { border-left-color: var(--m-olive); background: #f8f9f2; }
.tache-s3.m-orange { border-left-color: var(--m-orange); background: #fef7f0; }
.tache-s3.m-ciel { border-left-color: var(--m-ciel); background: #f4fafe; }
.tache-s3.m-prune { border-left-color: var(--m-prune); background: #fbf5f9; }
.tache-s3.m-lime { border-left-color: var(--m-lime); background: #f7fbf1; }
.tache-s3.m-indigo { border-left-color: var(--m-indigo); background: #f6f6fd; }
.tache-s3.m-corail { border-left-color: var(--m-corail); background: #fef6f5; }
.tache-s3.s-termine { background: var(--papier); color: var(--doux); box-shadow: none; }
.tache-s3.s-termine .nom-s3 { color: var(--doux); }
/* l'icône du statut : une forme ; sa couleur en plus, pour qui la voit */
.icone-statut { display: inline-block; flex: none; width: 1.1em; margin-right: .3em; text-align: center; font-weight: 700; line-height: 1; }
.icone-statut.confirme { color: var(--ok-texte); }
.icone-statut.pas-confirme { color: var(--erreur-texte); }
.icone-statut.attente { color: #d08a1e; }
.icone-statut.a-determiner { color: var(--doux); }
.icone-statut.termine { color: #b9b5ad; }
.icone-statut.nous { color: var(--bronze); }
.icone-statut.neutre { color: var(--doux); }
.nom-s3 { display: inline-flex; align-items: baseline; }
.statut-s3 .icone-statut { width: auto; margin-right: 0; }
.statut-s3.termine .icone-statut { color: #b9b5ad; }
h1 .icone-statut { font-size: .8em; vertical-align: .05em; }
.legende-metiers .pastille-couleur { margin-right: .35em; }
.legende-metiers li { display: inline-flex; align-items: center; }
/* le calendrier : la pastille d'une tâche aux couleurs de son métier ; terminée, barrée */
.pastille-s3.confirme, .pastille-s3.nous, .pastille-s3.pas-confirme, .pastille-s3.attente, .pastille-s3.a-determiner { background: var(--papier-2); color: var(--encre-2); border: 0; border-left: 3px solid var(--pierre); }
.pastille-s3.nous:hover { color: var(--encre); }
.pastille-s3.m-neutre { border-left-color: var(--m-neutre); background: var(--m-neutre-fond); }
.pastille-s3.m-bronze { border-left-color: var(--m-bronze); background: var(--m-bronze-fond); }
.pastille-s3.m-bleu { border-left-color: var(--m-bleu); background: var(--m-bleu-fond); }
.pastille-s3.m-jaune { border-left-color: var(--m-jaune); background: var(--m-jaune-fond); }
.pastille-s3.m-turquoise { border-left-color: var(--m-turquoise); background: var(--m-turquoise-fond); }
.pastille-s3.m-gris { border-left-color: var(--m-gris); background: var(--m-gris-fond); }
.pastille-s3.m-brun { border-left-color: var(--m-brun); background: var(--m-brun-fond); }
.pastille-s3.m-brique { border-left-color: var(--m-brique); background: var(--m-brique-fond); }
.pastille-s3.m-bois { border-left-color: var(--m-bois); background: var(--m-bois-fond); }
.pastille-s3.m-lilas { border-left-color: var(--m-lilas); background: var(--m-lilas-fond); }
.pastille-s3.m-ocre { border-left-color: var(--m-ocre); background: var(--m-ocre-fond); }
.pastille-s3.m-vert { border-left-color: var(--m-vert); background: var(--m-vert-fond); }
.pastille-s3.m-marine { border-left-color: var(--m-marine); background: var(--m-marine-fond); }
.pastille-s3.m-rose { border-left-color: var(--m-rose); background: var(--m-rose-fond); }
.pastille-s3.m-olive { border-left-color: var(--m-olive); background: var(--m-olive-fond); }
.pastille-s3.m-orange { border-left-color: var(--m-orange); background: var(--m-orange-fond); }
.pastille-s3.m-ciel { border-left-color: var(--m-ciel); background: var(--m-ciel-fond); }
.pastille-s3.m-prune { border-left-color: var(--m-prune); background: var(--m-prune-fond); }
.pastille-s3.m-lime { border-left-color: var(--m-lime); background: var(--m-lime-fond); }
.pastille-s3.m-indigo { border-left-color: var(--m-indigo); background: var(--m-indigo-fond); }
.pastille-s3.m-corail { border-left-color: var(--m-corail); background: var(--m-corail-fond); }
.pastille-s3.termine { color: var(--doux); text-decoration: line-through; background: var(--papier-2); border-left-color: var(--pierre); }
/* le Gantt : la barre aux couleurs du métier (la classe g-m-… est posée par gantt.js après le dessin) ; terminée, grise */
.cadre-gantt .gantt .g-confirme .bar, .cadre-gantt .gantt .g-nous .bar, .cadre-gantt .gantt .g-pas-confirme .bar, .cadre-gantt .gantt .g-attente .bar,
.cadre-gantt .gantt .g-a-determiner .bar { fill: var(--papier-2); stroke: var(--doux); stroke-dasharray: none; }
.cadre-gantt .gantt .g-confirme .bar-label, .cadre-gantt .gantt .g-nous .bar-label, .cadre-gantt .gantt .g-pas-confirme .bar-label,
.cadre-gantt .gantt .g-attente .bar-label, .cadre-gantt .gantt .g-a-determiner .bar-label { fill: var(--encre); }
.cadre-gantt .gantt .g-nous .bar-progress { fill: rgba(21, 23, 26, .14); }
.cadre-gantt .gantt .g-m-neutre .bar { fill: var(--m-neutre-fond); stroke: var(--m-neutre); }
.cadre-gantt .gantt .g-m-bronze .bar { fill: var(--m-bronze-fond); stroke: var(--m-bronze); }
.cadre-gantt .gantt .g-m-bleu .bar { fill: var(--m-bleu-fond); stroke: var(--m-bleu); }
.cadre-gantt .gantt .g-m-jaune .bar { fill: var(--m-jaune-fond); stroke: var(--m-jaune); }
.cadre-gantt .gantt .g-m-turquoise .bar { fill: var(--m-turquoise-fond); stroke: var(--m-turquoise); }
.cadre-gantt .gantt .g-m-gris .bar { fill: var(--m-gris-fond); stroke: var(--m-gris); }
.cadre-gantt .gantt .g-m-brun .bar { fill: var(--m-brun-fond); stroke: var(--m-brun); }
.cadre-gantt .gantt .g-m-brique .bar { fill: var(--m-brique-fond); stroke: var(--m-brique); }
.cadre-gantt .gantt .g-m-bois .bar { fill: var(--m-bois-fond); stroke: var(--m-bois); }
.cadre-gantt .gantt .g-m-lilas .bar { fill: var(--m-lilas-fond); stroke: var(--m-lilas); }
.cadre-gantt .gantt .g-m-ocre .bar { fill: var(--m-ocre-fond); stroke: var(--m-ocre); }
.cadre-gantt .gantt .g-m-vert .bar { fill: var(--m-vert-fond); stroke: var(--m-vert); }
.cadre-gantt .gantt .g-m-marine .bar { fill: var(--m-marine-fond); stroke: var(--m-marine); }
.cadre-gantt .gantt .g-m-rose .bar { fill: var(--m-rose-fond); stroke: var(--m-rose); }
.cadre-gantt .gantt .g-m-olive .bar { fill: var(--m-olive-fond); stroke: var(--m-olive); }
.cadre-gantt .gantt .g-m-orange .bar { fill: var(--m-orange-fond); stroke: var(--m-orange); }
.cadre-gantt .gantt .g-m-ciel .bar { fill: var(--m-ciel-fond); stroke: var(--m-ciel); }
.cadre-gantt .gantt .g-m-prune .bar { fill: var(--m-prune-fond); stroke: var(--m-prune); }
.cadre-gantt .gantt .g-m-lime .bar { fill: var(--m-lime-fond); stroke: var(--m-lime); }
.cadre-gantt .gantt .g-m-indigo .bar { fill: var(--m-indigo-fond); stroke: var(--m-indigo); }
.cadre-gantt .gantt .g-m-corail .bar { fill: var(--m-corail-fond); stroke: var(--m-corail); }
.cadre-gantt .gantt .g-a-determiner .bar { stroke-dasharray: 4 3; }
.cadre-gantt .gantt .g-termine .bar, .cadre-gantt .gantt .g-termine[class*="g-m-"] .bar { fill: var(--papier-2); stroke: var(--pierre); }
.cadre-gantt .gantt .g-termine .bar-label { fill: var(--doux); text-decoration: line-through; }
/* le calendrier de la S+3 (demande 2, 13 novembre 2026) : la période (3 semaines, Semaine, Mois), les trois semaines plus hautes, la
   semaine en sept colonnes à l'ordinateur et en jours l'un sous l'autre au téléphone ; chaque ligne à la couleur de son fournisseur */
.m-neutre { --mc: var(--m-neutre); --mf: var(--m-neutre-fond); } .m-bronze { --mc: var(--m-bronze); --mf: var(--m-bronze-fond); }
.m-bleu { --mc: var(--m-bleu); --mf: var(--m-bleu-fond); } .m-brique { --mc: var(--m-brique); --mf: var(--m-brique-fond); }
.m-vert { --mc: var(--m-vert); --mf: var(--m-vert-fond); } .m-jaune { --mc: var(--m-jaune); --mf: var(--m-jaune-fond); }
.m-lilas { --mc: var(--m-lilas); --mf: var(--m-lilas-fond); } .m-turquoise { --mc: var(--m-turquoise); --mf: var(--m-turquoise-fond); }
.m-orange { --mc: var(--m-orange); --mf: var(--m-orange-fond); } .m-marine { --mc: var(--m-marine); --mf: var(--m-marine-fond); }
.m-rose { --mc: var(--m-rose); --mf: var(--m-rose-fond); } .m-lime { --mc: var(--m-lime); --mf: var(--m-lime-fond); }
.m-brun { --mc: var(--m-brun); --mf: var(--m-brun-fond); } .m-ciel { --mc: var(--m-ciel); --mf: var(--m-ciel-fond); }
.m-prune { --mc: var(--m-prune); --mf: var(--m-prune-fond); } .m-olive { --mc: var(--m-olive); --mf: var(--m-olive-fond); }
.m-indigo { --mc: var(--m-indigo); --mf: var(--m-indigo-fond); } .m-corail { --mc: var(--m-corail); --mf: var(--m-corail-fond); }
.m-gris { --mc: var(--m-gris); --mf: var(--m-gris-fond); } .m-bois { --mc: var(--m-bois); --mf: var(--m-bois-fond); }
.m-ocre { --mc: var(--m-ocre); --mf: var(--m-ocre-fond); }
.periodes-s3 { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .5rem; }
.periodes-s3 .bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 7.5rem; }
.periodes-s3 .bouton[aria-current] { background: var(--encre); color: var(--blanc); border-color: var(--encre); }
@media (min-width: 44.01rem) { .cal-s3.trois-semaines .cal-case { min-height: 11rem; } }
@media (max-width: 44rem) {
  /* au téléphone : les trois périodes sur une ligne, de la même largeur ; le mois n'est pas écrit dans les cases (trop étroites : la
     liste plus bas et le titre le disent) */
  .periodes-s3 { flex-wrap: nowrap; }
  .periodes-s3 .bouton { flex: 1 1 0; min-width: 0; padding-left: .4rem; padding-right: .4rem; white-space: nowrap; }
  .cal-mois { display: none; }
}
.liste-cal-s3 > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
.semaine-s3 { display: grid; gap: .6rem; margin: 0 0 1.5rem; }
.jour-semaine-s3 { min-width: 0; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); padding: .5rem .6rem; }
.jour-semaine-s3.fds { background: var(--papier-2); }
.jour-semaine-s3.aujourdhui { border-color: var(--bronze); box-shadow: inset 0 0 0 1px var(--bronze); }
.jour-semaine-s3.passe { opacity: .75; }
.jour-semaine-s3 h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .95rem; margin: 0 0 .4rem; }
.jour-semaine-s3 > .note { margin: 0; }
.lignes-semaine-s3 { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.ligne-semaine-s3 { display: grid; gap: .15rem; min-width: 0; padding: .35rem .5rem; border-left: 4px solid var(--mc, var(--pierre)); border-radius: 3px; background: var(--mf, var(--papier-2)); overflow-wrap: anywhere; font-size: .9rem; }
.ligne-semaine-s3 .statut-s3 { justify-self: start; }
.ligne-semaine-s3.s-termine { background: var(--papier-2); color: var(--doux); }
.nom-semaine-s3 { display: inline-flex; align-items: baseline; min-height: 44px; align-items: center; color: inherit; text-decoration: none; }
.nom-semaine-s3:hover strong { text-decoration: underline; }
.qui-semaine-s3, .chantier-semaine-s3 { font-size: .82rem; color: var(--encre-2); }
@media (min-width: 60rem) {
  .semaine-s3 { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .jour-semaine-s3 { padding: .4rem; }
  .nom-semaine-s3 { min-height: 0; }
}
/* la fiche d'un fournisseur : sa couleur dans la S+3, avec sa pastille (13 novembre 2026) */
.choix-couleur-s3 { display: flex; align-items: center; gap: .4rem; }
.choix-couleur-s3 .pastille-couleur { flex: none; width: 1em; height: 1em; margin: 0; }
.choix-couleur-s3 select { flex: 1 1 auto; min-width: 0; }
/* Paramètres → Catégories de fournisseurs : le choix de la couleur, avec sa pastille */

/* ---------- Les PDF des soumissions, lus dans SharePoint (PL, 13 octobre 2026) : « Fichiers », « PDF », l'épingle ---------- */
.fichiers-soumission { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-top: .5rem; }
.fichiers-soumission form.en-ligne { display: inline; margin: 0; }
.fichiers-soumission .bouton, .fichiers-soumission button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.fichiers-soumission .epingle-nom { overflow-wrap: anywhere; }
.bouton.pdf-soumission { background: var(--encre); color: var(--blanc); border-color: var(--encre); font-weight: 600; }
.bouton.pdf-soumission:hover { background: var(--bronze-2); border-color: var(--bronze-2); }
table.grille-soumissions thead th .fichiers-soumission.court { display: flex; gap: .3rem; margin-top: .3rem; font-weight: 400; text-transform: none; letter-spacing: 0; }
table.grille-soumissions thead th .fichiers-soumission.court .bouton { min-height: 28px; padding: .1rem .6rem; font-size: .78rem; }
/* la rangée « Fichiers » du pied de la grille répète « PDF » et « Fichiers » pour le téléphone (l'en-tête, qui les porte, y est
   caché) ; à l'ordinateur, elle ne s'affiche pas */
@media (min-width: 44.01rem) { table.grille-soumissions tr.fichiers { display: none; } }
.sans-sharepoint { max-width: none; }
.fichiers-soumission-liste li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .25rem .75rem; }
.fichiers-soumission-liste li > a { grid-column: 1; }
.fichiers-soumission-liste form.epingler { grid-column: 2; margin: 0 .75rem 0 0; }
.fichiers-soumission-liste li.epingle { background: #fdfaf3; box-shadow: inset 3px 0 0 var(--bronze); }
.fichiers-soumission-liste li.soumission .nom-doc { font-weight: 600; }
.choix-dossiers li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .25rem .75rem; }
.choix-dossiers form.choisir-dossier { grid-column: 2; margin: 0 .75rem 0 0; }
.choix-dossiers li.actuel { background: #fdfaf3; box-shadow: inset 3px 0 0 var(--bronze); }
/* « Déposer le PDF » (PL, 15 octobre 2026) : un bouton qui ouvre le choix du fichier ; ouvert, il prend toute la largeur */
details.deposer-pdf { flex: 0 0 auto; max-width: 100%; }
details.deposer-pdf[open] { flex: 1 1 100%; padding: .6rem .75rem .75rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); }
details.deposer-pdf > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem 1.3rem; border: 1.5px solid var(--pierre); border-radius: 999px; background: transparent; color: var(--encre); font-size: .92rem; font-weight: 600; }
details.deposer-pdf > summary::-webkit-details-marker { display: none; }
details.deposer-pdf > summary:hover { border-color: var(--encre); }
details.deposer-pdf[open] > summary { background: var(--papier-2); }
details.deposer-pdf form { display: grid; gap: .6rem; margin: .6rem 0 0; }
details.deposer-pdf label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
details.deposer-pdf input[type=file] { width: 100%; max-width: 100%; min-height: 44px; font-size: .9rem; }
details.deposer-pdf form > button { justify-self: start; min-height: 44px; }
details.deposer-pdf .note, details.deposer-pdf .avis { margin: .6rem 0 0; }
@media (max-width: 44rem) {
  details.deposer-pdf { flex: 1 1 100%; }
  details.deposer-pdf > summary { display: flex; width: 100%; min-height: 44px; }
  details.deposer-pdf form > button { justify-self: stretch; width: 100%; }
}
@media (max-width: 44rem) {
  /* au téléphone : chaque bouton se touche du doigt (44 px), pleine largeur sous le nom du fichier */
  .fichiers-soumission > .bouton, .fichiers-soumission > form, .fichiers-soumission > form > button { flex: 1 1 100%; width: 100%; min-height: 44px; }
  .fichiers-soumission > .note-en-ligne { flex: 1 1 100%; }
  /* la grille en fiches : « PDF » et « Fichiers » de chaque fournisseur, des boutons pleine largeur de 44 px */
  table.grille-soumissions.fiches tr.fichiers td .fichiers-soumission.court { display: flex; flex-direction: column; gap: .35rem; }
  table.grille-soumissions.fiches tr.fichiers td .fichiers-soumission.court .bouton { width: 100%; min-height: 44px; }
  .fichiers-soumission-liste li, .choix-dossiers li { grid-template-columns: 1fr; }
  .fichiers-soumission-liste form.epingler, .choix-dossiers form.choisir-dossier { grid-column: 1; margin: 0 1rem .75rem; }
  .fichiers-soumission-liste form.epingler button, .choix-dossiers form.choisir-dossier button { width: 100%; min-height: 44px; }
  main.fichiers-soumission-page .note a, main.fichiers-soumission-page .avis a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* La zone où glisser le PDF d'une soumission (demande 3 de Jason, 2 novembre 2026 ; _zone_pdf.html, static/app.js) : une grande
   étiquette pointillée. Avec le script, le champ fichier la couvre, invisible : un toucher (ou un clic) choisit le PDF, un PDF lâché
   s'y prend, et le nom choisi s'affiche dedans ; sans script, le champ ordinaire reste visible. Au téléphone : « Touche ici pour
   choisir le PDF ». Au moins 88 px de haut : un doigt la trouve sans viser. */
.zone-pdf { position: relative; display: grid; gap: .3rem; justify-items: center; align-content: center; text-align: center; min-height: 88px; padding: .8rem .75rem; border: 2px dashed var(--pierre); border-radius: var(--rayon); background: var(--papier); color: var(--encre); cursor: pointer; overflow-wrap: anywhere; box-sizing: border-box; }
.zone-pdf-titre { font-weight: 600; font-size: .9rem; }
.zone-pdf-aide { color: var(--encre-2); font-size: .85rem; font-weight: 400; }
.zone-pdf-choisi { font-size: .85rem; font-weight: 600; color: var(--ok-texte); }
.zone-pdf-choisi.erreur { color: var(--erreur-texte); }
.zone-pdf input[type=file] { max-width: 100%; }
.js .zone-pdf input[type=file] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.zone-pdf:focus-within { outline: 2px solid var(--bronze); outline-offset: 2px; }
.zone-pdf.survol-pdf, .zone-pdf.choisie { border-color: var(--bronze); background: #fdfaf3; }
[data-carte-pdf].survol-pdf { outline: 2px dashed var(--bronze); outline-offset: 2px; }
.zone-pdf .au-doigt { display: none; }
@media (hover: none) and (pointer: coarse) {
  .zone-pdf .a-la-souris { display: none; }
  .zone-pdf .au-doigt { display: inline; }
}
/* Les cases à glisser-déposer des documents (décision 5 de PL du 25 novembre 2026 ; _dossier.zone_document, static/app.js) : sur
   chaque case, une étiquette pointillée bien visible, sans pli, faite comme la zone du PDF d'une soumission. Avec le script, le champ
   fichier la couvre, invisible : un toucher choisit une photo ou un PDF, un document lâché s'y prend, et il part aussitôt (« Déposer »
   ne se montre que sans script). 64 px de haut sur une case vide, 48 px pour la nouvelle version d'une case remplie (au moins 44 px :
   un doigt la trouve). La zone du spécimen de chèque n'attend plus sa case du téléphone (facultative : réponse de PL du 25 novembre
   2026). Rien ne déborde : les noms longs se coupent. */
.zone-document-form { display: grid; gap: .5rem; margin: .6rem 0 0; min-width: 0; }
.zone-document { position: relative; display: grid; gap: .2rem; justify-items: center; align-content: center; text-align: center; min-height: 64px; min-width: 0; padding: .6rem .75rem; border: 2px dashed var(--pierre); border-radius: var(--rayon); background: var(--papier); color: var(--encre); cursor: pointer; overflow-wrap: anywhere; box-sizing: border-box; font-weight: 400; }
.zone-document.compacte { min-height: 48px; padding: .45rem .75rem; }
.zone-document-titre { font-weight: 600; font-size: .9rem; }
.zone-document-aide { color: var(--encre-2); font-size: .88rem; }
.zone-document-choisi { font-size: .85rem; font-weight: 600; color: var(--ok-texte); }
.zone-document-choisi.erreur { color: var(--erreur-texte); }
.zone-document input[type=file] { max-width: 100%; }
.js .zone-document input[type=file] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.js .zone-document-form > .sans-script { display: none; }
.zone-document-form > button.sans-script { justify-self: start; min-height: 44px; }
/* sans script, la mise en garde avant de remplacer un document en vigueur (relecture du 25 novembre 2026 ; avec le script, c'est la
   question de data-confirmer) */
.zone-document-form > .avis.remplace { margin: 0; }
.zone-document:focus-within { outline: 2px solid var(--bronze); outline-offset: 2px; }
.zone-document.survol-document { border-color: var(--bronze); background: #fdfaf3; }
[data-carte-document].survol-document { outline: 2px dashed var(--bronze); outline-offset: 2px; }
.zone-document.en-envoi { border-color: var(--bronze); background: #fdfaf3; pointer-events: none; }
.zone-document .au-doigt { display: none; }
@media (hover: none) and (pointer: coarse) {
  .zone-document .a-la-souris { display: none; }
  .zone-document .au-doigt { display: inline; }
}
.zone-document-form label.case-telephone { margin: 0; font-weight: 600; font-size: .92rem; align-items: flex-start; }
.zone-document-form label.case-telephone input { margin-top: .1rem; }
.zone-document-form .note-telephone { margin: -.25rem 0 0; font-size: .85rem; }
.zone-document-form label.date-avant-zone { display: grid; gap: .25rem; font-size: .9rem; min-width: 0; }
.zone-document-form label.date-avant-zone input { max-width: 14rem; min-height: 44px; box-sizing: border-box; font-size: 1rem; }
.documents-fournisseur .aide-cases { margin: 0 0 .6rem; }
.pastille.date-a-entrer { white-space: nowrap; }
@media (max-width: 44rem) {
  .zone-document-form > button.sans-script { justify-self: stretch; }
  .zone-document-form label.date-avant-zone input { max-width: none; width: 100%; }
}
/* « Modifier… » et « Nouvelle version reçue… » d'une soumission (demande 4 de Jason, 2 novembre 2026 ; _revise.html) : deux plis
   sous ses boutons, faits comme « Déposer le PDF » ; ouverts, ils prennent toute la largeur. 44 px au téléphone, pleine largeur. */
.plis-soumission { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem; margin-top: .6rem; }
details.pli-soumission { flex: 0 0 auto; max-width: 100%; min-width: 0; }
details.pli-soumission[open] { flex: 1 1 100%; padding: .6rem .75rem .75rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); }
details.pli-soumission > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem 1.3rem; border: 1.5px solid var(--pierre); border-radius: 999px; background: transparent; color: var(--encre); font-size: .92rem; font-weight: 600; box-sizing: border-box; }
details.pli-soumission > summary::-webkit-details-marker { display: none; }
details.pli-soumission > summary:hover { border-color: var(--encre); }
details.pli-soumission[open] > summary { background: var(--papier-2); }
details.pli-soumission form { display: grid; gap: .6rem; margin: .6rem 0 0; }
details.pli-soumission label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
details.pli-soumission input:not([type=checkbox]):not([type=file]), details.pli-soumission textarea { width: 100%; max-width: 100%; min-height: 44px; box-sizing: border-box; font-size: 1rem; }
details.pli-soumission input:not([type=checkbox]):not([type=file]), details.pli-soumission textarea { font-weight: 400; }
/* le menu des lots de « Changer de lot… » (PL, 18 novembre 2026) : comme les champs du pli, pleine largeur, 44 px, 16 px */
details.pli-soumission select { width: 100%; max-width: 100%; min-height: 44px; box-sizing: border-box; font-size: 1rem; font-weight: 400; }
/* « font: inherit » remettait la taille du libellé (.9rem) : 16 px, l'iPhone ne zoome pas en touchant la note (relecture adverse du
   2 novembre 2026, au soir ; comme plus haut, « 16 px : l'iPhone ne zoome pas ») */
details.pli-soumission textarea { font: inherit; font-size: 1rem; font-weight: 400; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); resize: vertical; }
details.pli-soumission form > button { justify-self: start; min-height: 44px; }
details.pli-soumission .note, details.pli-soumission .avis { margin: .6rem 0 0; }
details.pli-soumission form .avis { margin: 0; }
/* l'écart avec le BC d'une soumission retenue qui a changé (Q4 de PL, 2 novembre 2026), sur la soumission et sur la fiche du BC */
.avis-ecart-bc { margin: .5rem 0 0; font-size: .88rem; }
dl.fiche dd .avis-ecart-bc { margin: 0; }
/* « Ajouter une soumission reçue » : son PDF dans la zone, et la case d'une 2e soumission du même fournisseur (cachée par le script
   tant que le fournisseur tapé n'a pas déjà une soumission sur ce code) */
details.ajout-soumission .zone-pdf, details.ajout-soumission label.deuxieme, details.ajout-soumission form .avis { flex: 1 1 100%; }
details.ajout-soumission form .avis { margin: 0; }
details.ajout-soumission label.coche.deuxieme { margin: 0; font-size: .9rem; font-weight: 400; color: var(--encre); align-items: flex-start; }
details.ajout-soumission label.coche.deuxieme input { margin-top: .1rem; }
.js details.ajout-soumission label.deuxieme:not(.montre) { display: none; }
details.ajout-soumission > .avis { margin: .5rem 0; }
/* « + Ajouter une soumission reçue » (retour de PL du 18 novembre 2026 : le titre du pli ne se voyait pas comme un geste) : habillé en
   bouton secondaire, comme « Déposer le PDF » ; 44 px ; ouvert (et ouvert d'office quand le code n'a encore aucune soumission), le
   formulaire dessous comme avant. Au téléphone, pleine largeur (plus bas). */
details.ajout-soumission > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem 1.3rem; border: 1.5px solid var(--pierre); border-radius: 999px; background: transparent; color: var(--encre); font-size: .92rem; font-weight: 600; box-sizing: border-box; }
details.ajout-soumission > summary::-webkit-details-marker { display: none; }
details.ajout-soumission > summary:hover { border-color: var(--encre); }
details.ajout-soumission[open] > summary { background: var(--papier-2); margin-bottom: .5rem; }
/* « Demander des soumissions » : un espace sous le bouton, avant la première soumission (retour de PL du 18 novembre 2026 : il
   collait au cadre de la carte) */
.demander-soumissions { margin: 0 0 1rem; }
/* sous la liste : « + Ajouter une soumission reçue » et « Comparer dans la grille » (dans un lot, aussi « Demander dans ce lot ») en
   une rangée de boutons, avec l'espace des autres blocs ; un repli ouvert passe dessous, sur toute la largeur. Au téléphone, tous
   empilés, pleine largeur ; le compte de la grille (« 4 items, 2 fournisseurs ») n'y paraît pas : le bouton tient sur une ligne. */
.gestes-centre { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem; margin: .75rem 0 1rem; }
.gestes-centre > details, .gestes-centre > details.exporter, .gestes-centre > details.ajout-soumission, .gestes-centre > details.grille-panneau { margin: 0; flex: 0 0 auto; max-width: 100%; min-width: 0; }
.gestes-centre > details.ajout-soumission[open] { flex: 1 1 100%; order: 9; }
/* la grille fermée, dans la rangée : son panneau (fixe quand il s'ouvre) n'est pas mis en page dans la largeur du bouton (le contenu
   d'un repli fermé garde une mise en page, contenue dans le repli : le tableau y « débordait » sans se voir) */
.gestes-centre > details.grille-panneau:not([open]) > .grille-boite { display: none; }
@media (max-width: 44rem) {
  details.pli-soumission { flex: 1 1 100%; }
  details.pli-soumission > summary { display: flex; width: 100%; }
  details.pli-soumission form > button { justify-self: stretch; width: 100%; }
  details.ajout-soumission > summary { display: flex; width: 100%; }
  .gestes-centre > *, .gestes-centre > details, .gestes-centre > details.exporter, .gestes-centre > details.ajout-soumission,
  .gestes-centre > details.grille-panneau { flex: 1 1 100%; }
  .gestes-centre > a.bouton, .gestes-centre > details > summary { display: flex; justify-content: center; width: 100%; }
  .gestes-centre .compte-grille { display: none; }
  details.ajout-soumission form > button { width: 100%; min-height: 44px; }
  details.ajout-soumission form > label:not(.coche) { flex: 1 1 100%; }
  details.ajout-soumission form input:not([type=checkbox]):not([type=file]) { width: 100%; min-height: 44px; box-sizing: border-box; }
}

/* Paramètres : une tuile grise, pas un lien (QuickBooks pas branché sur ce site, PL, 13 octobre 2026) */
.tuile.inerte { border-top-color: var(--pierre); background: var(--papier-2); color: var(--doux); box-shadow: none; cursor: default; }
.tuile.inerte strong { color: var(--doux); }
/* à l'ordinateur, elle ne se soulève pas au survol comme un lien (la relecture du 24 octobre 2026, tuile « Estimation ») */
@media (hover: hover) { .tuile.inerte:hover { transform: none; } }

/* la note des lignes : un champ d'une ligne qui passe à la ligne et grandit (lignes.js) plutôt que de couper le texte */
table.lignes-estimation textarea { font: inherit; font-size: .92rem; width: 100%; min-width: 0; min-height: 0; height: auto; padding: .35rem .5rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); color: var(--encre); resize: none; overflow: hidden; line-height: 1.4; display: block; field-sizing: content; }
table.lignes-estimation textarea:hover { border-color: var(--doux); }
table.lignes-estimation thead th:nth-child(1) { width: 22%; }
table.lignes-estimation thead th:nth-child(3) { width: 10%; }
table.grille-soumissions thead th.retirer { width: 5rem; }
table.grille-soumissions tfoot th .enregistrement { display: block; margin: .2rem 0 0; }
@media (max-width: 44rem) {
  table.lignes-estimation.fiches textarea { font-size: 1rem; min-height: 44px; }
}
main.employes .champs > label.coche.chantier { grid-column: 1 / -1; margin: 0; }
main.employes label.coche.chantier > span { min-width: 0; overflow-wrap: anywhere; }
main.employes .champs > label.coche.chantier input { width: 1.4rem; flex: none; }  /* pas le « width: 100% » des champs de la fiche */
/* ---------- Par gars et par code (PL, 13 octobre 2026) : un employé par ligne, un code d'activité par colonne, pour comparer
   avec le rapport de paie. Toucher un nombre ouvre le détail par jour (un <details> dans la case). ---------- */
.codes-gars .filtre-chantier { margin: 0 0 1rem; }
.codes-gars .filtre-chantier select { min-width: 14rem; }
table.codes-gars thead th { white-space: normal; min-width: 6.5rem; line-height: 1.3; vertical-align: bottom; }
table.codes-gars thead th:first-child { min-width: 12rem; }
table.codes-gars thead th .code { display: block; font-size: .9rem; letter-spacing: 0; text-transform: none; color: var(--encre); }
table.codes-gars thead th .nom-code { font-weight: 500; letter-spacing: 0; text-transform: none; }
table.codes-gars th[scope=row] { vertical-align: top; }
table.codes-gars .etat-heures { display: block; white-space: normal; font-size: .75rem; font-weight: 400; color: var(--doux); margin-top: .15rem; }
table.codes-gars td { vertical-align: top; }
.case-jours > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: flex-end; gap: .25rem; min-height: 32px; padding: 0 .45rem; border-radius: 4px; border: 1px solid transparent; }
.case-jours > summary::-webkit-details-marker { display: none; }
.case-jours > summary:hover { border-color: var(--pierre); background: var(--papier); }
.case-jours[open] > summary { background: var(--encre); color: var(--blanc); }
.case-jours[open] > summary .a-repartir { color: var(--bronze-clair); }
.case-jours ul { list-style: none; margin: .35rem 0 0; padding: .35rem 0 0; border-top: 1px solid var(--papier-2); white-space: normal; font-size: .8rem; min-width: 10rem; }
.case-jours li { display: flex; justify-content: space-between; gap: .75rem; padding: .1rem 0; text-align: left; }
.case-jours li .quand { color: var(--doux); white-space: nowrap; }
.case-jours li > span:last-child { text-align: right; }
.case-jours li .projet { max-width: none; margin: 0; font-size: .75rem; }  /* le chantier, sous les heures du jour */
/* Le motif commun des tableaux (PL, 28 octobre 2026) : la grille ne défile plus de côté (le nom du gars n'a plus à rester collé à
   gauche). Le détail par jour d'une case ouverte suit la largeur de sa colonne (le jour, puis ses heures dessous au besoin) plutôt
   que de l'élargir ; une semaine avec trop de codes pour la largeur passe en fiches (table.en-fiches, app.js). */
table.codes-gars.tient .case-jours ul { min-width: 0; }
table.codes-gars.tient .case-jours li { flex-wrap: wrap; gap: 0 .5rem; }
@media (max-width: 44rem) {
  /* une fiche par employé, ses codes en dessous (les codes sans heures sont des cases vides, cachées) */
  .codes-gars .filtre-chantier > .bouton { flex: 1 1 100%; }
  table.codes-gars.fiches td { grid-template-columns: 8.5rem minmax(0, 1fr); align-items: start; }
  table.codes-gars.fiches td > details, table.codes-gars.fiches td > strong, table.codes-gars.fiches td > span { grid-column: 2; }
  table.codes-gars.fiches th[scope=row] .etat-heures { font-size: .85rem; margin-top: .25rem; }
  table.codes-gars.fiches tfoot td { grid-template-columns: 8.5rem minmax(0, 1fr); }
  .case-jours > summary { min-height: 44px; width: 100%; justify-content: flex-start; padding: 0 .6rem; border-color: var(--pierre); background: var(--blanc); }
  .case-jours ul { min-width: 0; }
}
@media (min-width: 44.01rem) {
  /* les mêmes fiches, entre le téléphone et l'ordinateur, quand la grille ne tient pas (table.en-fiches) ; une case ouverte reste
     foncée comme ailleurs */
  table.codes-gars.en-fiches > * > tr > td { grid-template-columns: 8.5rem minmax(0, 1fr); align-items: start; }
  table.codes-gars.en-fiches th[scope=row] .etat-heures { font-size: .85rem; margin-top: .25rem; }
  table.codes-gars.en-fiches .case-jours > summary { min-height: 44px; width: 100%; justify-content: flex-start; padding: 0 .6rem; border-color: var(--pierre); }
  table.codes-gars.en-fiches .case-jours:not([open]) > summary { background: var(--blanc); }
}
/* Chantier « Tous » (PL, 14 octobre 2026) : un sommaire (chaque chantier et son total, un lien vers son bloc), un bloc par
   chantier (son titre bien en vue, sa grille ou ses fiches dessous), puis « Tous les chantiers », tout additionné. */
.sommaire-chantiers { margin: 0 0 1.5rem; }
.sommaire-chantiers > .note { margin: 0 0 .5rem; }
.sommaire-chantiers ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); gap: .5rem; }
.sommaire-chantiers li { display: flex; }  /* les cases d'une même rangée, de la même hauteur */
.sommaire-chantiers a { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 44px; padding: .45rem .9rem;
  background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); color: var(--encre); text-decoration: none; }
.sommaire-chantiers a:hover { border-color: var(--encre); color: var(--encre); }
.sommaire-chantiers .nom { min-width: 0; overflow-wrap: anywhere; font-weight: 500; line-height: 1.3; }
.sommaire-chantiers .h { flex: none; font-weight: 600; white-space: nowrap; }
.sommaire-chantiers li.tous a { background: var(--papier); }
.sommaire-chantiers li.tous .nom { font-weight: 600; }
.bloc-chantier { margin: 0 0 1rem; scroll-margin-top: .75rem; }
.bloc-chantier > h2 { display: grid; gap: .1rem; margin: 2rem 0 .35rem; padding-top: 1rem; border-top: 2px solid var(--encre); color: var(--encre); letter-spacing: 0; text-transform: none; }
.bloc-chantier > h2 .numero { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze-2); overflow-wrap: anywhere; }
.bloc-chantier > h2 .nom-chantier { font-family: var(--titres); font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; overflow-wrap: anywhere; }
.bloc-chantier > .note { margin-bottom: .75rem; }
.bloc-chantier.tous-les-chantiers > h2 { border-top-color: var(--bronze); }

/* ---------- Take-off par étage, main-d'œuvre détaillée par code d'activité (PL, 13 octobre 2026) ----------
   Le take-off : à l'ordinateur, une seule grille (une colonne par étage, le total au bout) qui se lit en une fois ; au téléphone,
   une fiche par étage (les mêmes cases, sans défiler de côté). Les colonnes de la grille sont des « display: contents » : leurs
   cases se placent dans la grille commune, colonne par colonne. */
.takeoff-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .5rem 1.5rem; margin: 0 0 .75rem; }
.takeoff-tete .structure-projet { margin: 0; font-size: 1.05rem; }
.takeoff-tete form { margin: 0; }
.takeoff-titre { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze-2); margin: 1.25rem 0 .5rem; }
.takeoff .hors, .takeoff-grille .hors { display: inline-block; font-size: .72rem; font-weight: 500; color: #7a5a1c; background: #fdf6e7; border-radius: 999px; padding: 0 .45rem; }
.takeoff .note.source { display: block; margin: .1rem 0 0; font-size: .75rem; overflow-wrap: anywhere; }
.takeoff-grille { --etages: 5; --rangees: 2; display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--rangees), auto);
  grid-template-columns: minmax(10rem, 1.7fr) repeat(var(--etages), minmax(4.75rem, 1fr)) minmax(6.5rem, 1.2fr);
  background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.takeoff-grille .colonne { display: contents; }
.takeoff-grille .tete, .takeoff-grille .nom-rangee, .takeoff-grille .case { padding: .45rem .6rem; border-bottom: 1px solid var(--papier-2); min-width: 0; }
.takeoff-grille .tete { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); font-weight: 600; background: var(--papier); border-bottom-color: var(--pierre); align-self: stretch; }
.takeoff-grille .colonne.etage .tete, .takeoff-grille .colonne.total .tete { text-align: right; }
.takeoff-grille .colonne.etage .tete { text-transform: none; letter-spacing: .02em; font-size: .8rem; color: var(--encre-2); }
.takeoff-grille .colonne.total .case strong:empty + .unite { visibility: hidden; }
.takeoff-grille .nom-rangee { font-weight: 500; font-size: .92rem; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .4rem; }
.takeoff-grille .nom-rangee .unite { color: var(--doux); font-weight: 400; font-size: .82rem; }
/* l'aide courte sous le nom d'une unité (les murs, 15 octobre 2026) */
.takeoff .aide { display: block; flex-basis: 100%; font-size: .75rem; font-weight: 400; line-height: 1.3; color: var(--doux); }
.takeoff-grille .case { display: flex; align-items: center; gap: .35rem; font-size: .92rem; font-weight: 400; color: var(--encre); }
.takeoff-grille .colonne.etage .case .nom-unite, .takeoff-grille .colonne.etage .case .unite, .takeoff-grille .colonne.total .nom-unite { display: none; }
.takeoff-grille .case input { width: 100%; min-width: 0; padding: .35rem .45rem; text-align: right; }
.takeoff-grille .case .valeur { margin-left: auto; }
.takeoff-grille .colonne.total .case { flex-wrap: wrap; justify-content: flex-end; text-align: right; background: #fbfaf7; }
.takeoff-grille .colonne.total .case strong { font-weight: 600; }
.takeoff-grille .colonne.total .case .unite { color: var(--doux); font-size: .82rem; }
.takeoff-grille .colonne.total .note.source { flex-basis: 100%; text-align: right; }
.takeoff-grille .colonne.total .note.source:empty { display: none; }
/* une unité par étage sans étages : sa quantité de tout le projet se corrige dans la case Total */
.takeoff-grille .colonne.total .tout-le-projet { flex-basis: 100%; display: flex; align-items: center; justify-content: flex-end; gap: .4rem; margin: .25rem 0 0; font-size: .75rem; font-weight: 500; color: var(--doux); }
.takeoff-grille .colonne.total .tout-le-projet[hidden] { display: none; }
.takeoff-grille .colonne.total .tout-le-projet input { width: 6.5rem; flex: 0 0 auto; }
.takeoff-projet { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .5rem 1.25rem; }
.takeoff-projet .case { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem 3.25rem; align-items: center; gap: .25rem .6rem; font-size: .92rem; font-weight: 500; color: var(--encre); padding: .3rem 0; border-bottom: 1px solid var(--papier-2); }
.takeoff-projet .case input { width: 100%; text-align: right; }
.takeoff-projet .case .unite { color: var(--doux); font-size: .82rem; font-weight: 400; }
.takeoff-projet .case .note.source { grid-column: 1 / -1; }
.takeoff .actions-lignes { margin-top: 1rem; }
.takeoff-etages { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: 1rem 0 0; }
.takeoff-etages form { margin: 0; }
.section-takeoff .takeoff-dans-estimation { padding: .75rem 1.1rem 1rem; border-top: 1px solid var(--papier-2); }
.section-takeoff .takeoff-dans-estimation > .note:last-child { margin-bottom: 0; }
/* Venu des plans (le take-off de Claude, lot 6) : une fiche par quantité envoyée d'un plan, sous la grille ; celles qui comptent en
   bronze, les autres dans un repli */
.venu-des-plans { margin: 1.25rem 0 0; min-width: 0; }
.venu-des-plans > .note { margin: 0 0 .5rem; }
ul.cartes-plan { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.carte-plan { display: grid; gap: .3rem; margin: 0; padding: .6rem .75rem; background: var(--blanc); border: 1px solid var(--pierre); border-left: 3px solid var(--doux); border-radius: var(--rayon); min-width: 0; overflow-wrap: anywhere; }
.carte-plan.compte { border-left-color: var(--bronze); }
.carte-plan.suggeree { border-left-style: dashed; border-left-color: var(--bronze-2); }  /* suggérée : pas comptée, la case garde sa valeur */
.venu-des-plans h4.titre-plan { font-size: .92rem; margin: .75rem 0 .35rem; color: var(--encre); }
.carte-plan > p, .carte-plan > form { margin: 0; }
.carte-plan .titre-carte { color: var(--encre); }
details.pli-plan { margin: .75rem 0 0; }
details.pli-plan > summary { cursor: pointer; color: var(--bronze-2); font-weight: 600; font-size: .88rem; min-height: 44px; display: flex; align-items: center; }
details.pli-plan > ul.cartes-plan { margin-top: .35rem; }
/* « Prendre la valeur du plan » et « Écarter la suggestion » : l'un sous l'autre, chacun sur toute la largeur de la carte, pareils, à
   l'ordinateur comme au téléphone (PL, 6 novembre 2026 : avant, à l'ordinateur, chacun à sa largeur) */
.carte-plan form > button { width: 100%; }
/* « Prendre toutes les valeurs du plan pour cet étage » (PL, 4 novembre 2026) : un bouton par étage (Venu des plans ; l'écran d'envoi,
   juste sous le message d'un envoi), puis la page de confirmation, case par case avant → après ; la rangée d'une valeur du plan qui ne
   se prend plus, marquée ; le message du geste en tête de « Venu des plans ». Au téléphone, chaque bouton sur toute la largeur. */
.prendre-etages { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .6rem; }
.prendre-etages .bouton { max-width: 100%; }
.apres-envoi { margin: -.5rem 0 1.25rem; }
.apres-envoi > p { margin: 0 0 .5rem; }
.venu-des-plans > .avis { margin: .5rem 0 .75rem; }
main.takeoff-prendre-etage .chapeau { font-size: 1.05rem; max-width: 70ch; margin: 0 0 .75rem; }
main.takeoff-prendre-etage p.note.ensemble { max-width: 70ch; margin: 0 0 .75rem; }
main.takeoff-prendre-etage tr.en-cause, main.takeoff-prendre-etage tr.en-cause > * { background: var(--erreur-fond); }
main.takeoff-prendre-etage form.confirmer-prise { margin: 1rem 0 0; align-items: center; }
@media (max-width: 44rem) { .prendre-etages .bouton { flex: 1 1 100%; } }
@media (max-width: 44rem) {
  .takeoff-tete { align-items: stretch; }
  .takeoff-tete form { flex: 1 1 100%; }
  .takeoff-grille { display: block; background: none; border: 0; box-shadow: none; overflow: visible; }
  .takeoff-grille .colonne.noms { display: none; }
  .takeoff-grille .colonne.etage, .takeoff-grille .colonne.total { display: block; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); box-shadow: var(--ombre); margin: 0 0 .75rem; padding: .25rem .9rem .5rem; }
  .takeoff-grille .tete, .takeoff-grille .colonne.etage .tete, .takeoff-grille .colonne.total .tete { display: block; background: none; border: 0; padding: .5rem 0 .25rem; font-family: var(--titres); font-size: 1.1rem; letter-spacing: 0; text-transform: none; color: var(--encre); text-align: left; }
  .takeoff-grille .case, .takeoff-grille .colonne.total .case { display: grid; grid-template-columns: minmax(0, 1fr) 7rem 2.75rem; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--papier-2); background: none; text-align: left; }
  .takeoff-grille .case:last-child { border-bottom: 0; }
  .takeoff-grille .colonne.etage .case .nom-unite, .takeoff-grille .colonne.etage .case .unite, .takeoff-grille .colonne.total .nom-unite { display: block; }
  .takeoff-grille .case .nom-unite { font-weight: 500; font-size: .92rem; line-height: 1.25; }
  .takeoff-grille .case .unite { color: var(--doux); font-size: .82rem; }
  .takeoff-grille .case input { font-size: 1rem; }
  .takeoff-grille .colonne.total .case strong { text-align: right; }
  .takeoff-grille .colonne.total .note.source { grid-column: 1 / -1; text-align: left; }
  .takeoff-grille .colonne.total .tout-le-projet { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 7rem 2.75rem; gap: .5rem; justify-content: stretch; margin: 0; font-size: .85rem; }
  .takeoff-grille .colonne.total .tout-le-projet input { width: 100%; }
  .takeoff-projet { grid-template-columns: 1fr; }
  .takeoff-projet .case { grid-template-columns: minmax(0, 1fr) 7rem 2.75rem; }
  .takeoff-etages form { flex: 1 1 100%; }
  .section-takeoff .takeoff-dans-estimation { padding: .75rem .75rem 1rem; }
}

/* la main-d'œuvre détaillée : le taux d'estimation, « Détailler », « Proposer », les lignes code / unité / quantité / heures */
.detail-mo { border: 1px solid var(--pierre); border-radius: var(--rayon); padding: .75rem 1rem; margin: .5rem 0 1rem; background: #fdfaf3; }
.detail-mo h3 { margin: 0 0 .5rem; font-size: .95rem; }
.detail-mo .taux-estimation form { margin: 0 0 .25rem; }
.detail-mo .note { max-width: none; }
.detail-mo form.proposer { align-items: center; margin: .5rem 0 0; }
.detail-mo form.proposer .note { margin: 0; flex: 1 1 18rem; }
table.lignes-detail thead th:nth-child(1) { width: 30%; }
table.lignes-detail thead th:nth-child(2) { width: 11%; }
table.lignes-detail thead th:nth-child(3) { width: 14%; }
table.lignes-detail thead th:nth-child(4) { width: 15%; }
table.lignes-detail thead th:nth-child(5) { width: 11%; }
table.lignes-detail td { vertical-align: top; }
table.lignes-detail td.heures { white-space: nowrap; text-align: right; }
table.lignes-detail thead th:nth-child(5), table.lignes-detail thead th:nth-child(6) { text-align: right; }  /* Heures et Montant : au-dessus de leurs chiffres */
table.lignes-detail td .note.take-off, table.lignes-detail td .note.reference { display: block; margin: .2rem 0 0; font-size: .75rem; line-height: 1.3; white-space: normal; }
table.lignes-detail td .note.reference { color: var(--bronze-2); }
/* une ligne dont l'unité n'est plus celle de son code (un mur resté en pi², 15 octobre 2026) : la note se voit */
table.lignes-detail td .note.unite-changee { color: var(--erreur-texte); }
/* le journal : une entrée en mots, une liste par ligne (la migration des murs, 15 octobre 2026) */
.journal-liste { margin: 0; padding: 0; list-style: none; }
.journal-boutons { margin: .5rem 0 1rem; }  /* le filtre et la page suivante du Journal (PL, 13 novembre 2026) */
.journal-liste li + li { margin-top: .35rem; }
/* Journal (le motif commun des tableaux, PL, 27 octobre 2026) : à l'ordinateur, « Avant » et « Après » se partagent la place à
   parts égales. Une adresse longue sans espace s'y coupe (.coupe) ; sans largeur donnée, elle prenait presque toute la place, et
   l'autre colonne, trop étroite, coupait les mots ordinaires au milieu (« Soumissio n », mesuré à 1 280 px). */
@media (min-width: 44.01rem) { table.journal thead th:nth-child(5), table.journal thead th:nth-child(6) { width: 27%; } }
table.lignes-detail td .etage-ligne { margin: 0; font-size: .78rem; }
table.lignes-detail select { width: 100%; min-width: 0; }
/* le pied d'un tableau détaillé : la source et « Enregistré ✓ » sur une rangée à eux, toute la largeur, à droite (dans la seule
   colonne « Retirer », ils débordaient à l'ordinateur) ; rien à dire (« muet ») : la rangée disparaît */
table.lignes-detail tr.pied-source td.pied-note { text-align: right; border-top: 0; padding-top: 0; }
table.lignes-detail tr.pied-source td.pied-note .note { display: inline; margin: 0 0 0 .5rem; }
table.lignes-detail tr.pied-source td.pied-note.muet { display: none; }
@media (max-width: 44rem) {
  table.lignes-detail.fiches tr.pied-source { border-top: 0; padding-top: 0; }  /* la même fiche que la rangée du total */
  table.lignes-detail.fiches tr.pied-source td.pied-note { text-align: left; }
  table.lignes-detail.fiches tr.pied-source td.pied-note .note { margin: 0; }
  table.lignes-detail.fiches td.heures { text-align: left; }
  table.lignes-detail.fiches td > .note.take-off, table.lignes-detail.fiches td > .note.reference { grid-column: 2; }
  table.lignes-detail.fiches td.large { display: block; font-weight: 600; }
  table.lignes-detail.fiches td.large::before { display: none; }
  table.lignes-detail.fiches tr.nouvelle td.large { font-weight: 400; }
  .detail-mo form.proposer > button { width: 100%; }
}

/* le Coût Total : un code de main-d'œuvre s'ouvre sur ses codes d'activité (pour information, dans aucun total) */
table.couts tr.sous-codes > td { padding: 0 .55rem .5rem 1.5rem; background: #fbfaf7; text-align: left; white-space: normal; }
/* son titre (« 4_0 par code d'activité · 3 codes d'activité · … ») : la flèche du code le roule et le déroule (18 novembre 2026) */
.enfants-mo-bloc > p.enfants-titre { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .6rem; min-height: 2.25rem; margin: 0 0 .35rem; max-width: none; font-size: .9rem; font-weight: 600; color: var(--bronze-2); }
.enfants-mo-bloc > p.enfants-titre .note { margin: 0; font-weight: 400; max-width: none; }
table.enfants-mo { font-size: .88rem; background: var(--blanc); border: 1px solid var(--papier-2); }
table.enfants-mo th, table.enfants-mo td { padding: .4rem .6rem; white-space: nowrap; }
table.enfants-mo th[scope=row] { white-space: normal; font-weight: 600; min-width: 12rem; }
table.enfants-mo th[scope=row] .nom-enfant { font-weight: 400; }
table.enfants-mo td { text-align: right; }
table.enfants-mo tr.pas-estime th, table.enfants-mo tr.pas-estime td { background: #fdf6e7; }
.pastille.pas-estime { color: #7a5a1c; background: #fdf6e7; border: 1px solid #ecd9ae; }
table.enfants-mo .depasse { color: var(--erreur-texte); font-weight: 600; }
.enfants-boite { margin-bottom: 1.5rem; }
@media (max-width: 44rem) {
  table.couts.fiches tr.sous-codes { padding: 0 1rem .5rem; background: #fbfaf7; }
  table.couts.fiches tr.sous-codes > td { display: block; padding: 0; }
  table.couts.fiches tr.sous-codes > td::before { display: none; }
  table.enfants-mo.fiches { border: 0; background: none; }
  table.enfants-mo.fiches tr { padding: .6rem .75rem; margin: 0 0 .5rem; background: var(--blanc); border: 1px solid var(--papier-2); border-radius: var(--rayon); }
  table.enfants-mo.fiches td, table.couts.fiches table.enfants-mo.fiches td { grid-template-columns: 8.5rem minmax(0, 1fr); text-align: left; white-space: normal; }
  table.enfants-mo.fiches th[scope=row] { min-width: 0; }
}
@media (min-width: 44.01rem) {  /* le Coût Total en fiches entre le téléphone et l'ordinateur (table.en-fiches) : comme au téléphone */
  table.couts.en-fiches tr.sous-codes { padding: 0 1rem .5rem; background: #fbfaf7; }
  table.couts.en-fiches tr.sous-codes > td { display: block; padding: 0; }
  table.couts.en-fiches tr.sous-codes > td::before { display: none; }
  table.enfants-mo.en-fiches { border: 0; background: none; }
  table.enfants-mo.en-fiches > * > tr { padding: .6rem .75rem; margin: 0 0 .5rem; background: var(--blanc); border: 1px solid var(--papier-2); border-radius: var(--rayon); }
  table.enfants-mo.en-fiches > * > tr > td { grid-template-columns: 8.5rem minmax(0, 1fr); text-align: left; white-space: normal; }
  table.enfants-mo.en-fiches th[scope=row] { min-width: 0; }
}

/* Paramètres → Codes d'activité : l'unité, l'étage, le parent ; au téléphone, une fiche par code */
table.liste-codes td select, table.liste-codes td input:not([type=checkbox]) { width: 100%; min-width: 7rem; }
table.liste-codes td.large input { min-width: 12rem; }
/* à l'ordinateur, la liste des unités prend la largeur de sa plus longue unité : « Pieds linéaires de murs extérieurs » et « … intérieurs »
   se lisent en entier (relecture du 27 octobre 2026 : les deux s'arrêtaient à « Pieds linéaires de murs ») ; en fiches entre le
   téléphone et l'ordinateur (table.en-fiches), comme au téléphone */
@media (min-width: 44.01rem) {
  table.liste-codes:not(.en-fiches) td.choix-unite select[name=unite_id] { min-width: max-content; }
  table.liste-codes.en-fiches td select, table.liste-codes.en-fiches td input:not([type=checkbox]), table.liste-codes.en-fiches td.large input { min-width: 0; }
  table.liste-codes.en-fiches > * > tr > td:last-child { grid-template-columns: 1fr; }
  table.liste-codes.en-fiches > * > tr > td:last-child::before { display: none; }
  table.liste-codes.en-fiches td > button { justify-self: start; min-width: 12rem; }
}
table.liste-codes th[scope=row] form { display: none; }
table.liste-codes td .note { margin: 0; }
table.liste-codes label.coche { margin: 0; }
@media (max-width: 44rem) {
  table.liste-codes.fiches td select, table.liste-codes.fiches td input:not([type=checkbox]), table.liste-codes.fiches td.large input { min-width: 0; }
  table.liste-codes.fiches td > button { width: 100%; }
  table.liste-codes.fiches td:last-child::before { display: none; }
  table.liste-codes.fiches td:last-child { grid-template-columns: 1fr; }
  /* l'unité sur toute la largeur de la fiche : « Pieds linéaires de murs extérieurs » et « … intérieurs » se lisent en entier */
  table.liste-codes.fiches td.choix-unite { grid-template-columns: 1fr; }
  table.unites-quantite.fiches td select { min-width: 0; }
}
table.unites-quantite .aide { display: block; font-size: .8rem; font-weight: 400; color: var(--doux); }
.section-takeoff .titre-section { white-space: nowrap; flex: 0 0 auto; }
.section-takeoff .chiffres-section { flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: .1rem .75rem; white-space: normal; text-align: right; }
@media (max-width: 44rem) {
  .section-takeoff .takeoff-dans-estimation > .note a { display: inline-flex; align-items: center; min-height: 44px; }
}
table.liste-codes td label.coche { display: inline-flex; justify-content: flex-start; gap: .6rem; }
table.liste-codes .parent-code { white-space: normal; }

/* ---------- Nouvelles de l'entreprise (PL, 14 octobre 2026) ----------
   La carte en haut de l'accueil : la plus récente pas encore vue, « Lire » et « Vu ». La page Nouvelles : une fiche par nouvelle. */
.nouvelle-une { background: var(--blanc); border: 1px solid var(--pierre); border-left: 4px solid var(--bronze); border-radius: var(--rayon); padding: 1rem 1.15rem; margin: 0 0 1.5rem; box-shadow: var(--ombre); max-width: 48rem; }
.nouvelle-une .surtitre { margin: 0 0 .4rem; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--bronze-2); }
.nouvelle-une .surtitre span { color: var(--doux); letter-spacing: .06em; }
.nouvelle-une .surtitre .quand { white-space: nowrap; }  /* « Mise à jour le … » passe à la ligne d'un bloc, le point reste en haut */
.nouvelle-une-corps { display: grid; grid-template-columns: minmax(0, 1fr); gap: .85rem; align-items: start; }
.nouvelle-une-corps.avec-photo { grid-template-columns: 72px minmax(0, 1fr); }
.nouvelle-une-corps img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; border: 1px solid var(--pierre); background: var(--papier-2); }
.nouvelle-une h2 { margin: 0 0 .3rem; font-family: var(--titres); font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; text-transform: none; color: var(--encre); overflow-wrap: anywhere; }
.nouvelle-une .extrait { margin: 0; color: var(--encre-2); font-size: .95rem; overflow-wrap: anywhere; }
.nouvelle-une-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.nouvelle-une-actions form { margin: 0; }
.nouvelle-une-actions button { min-height: 44px; min-width: 6.5rem; }
.nouvelle-une .autres { margin: .25rem 0 -.5rem; font-size: .9rem; }
.nouvelle-une .autres a { display: inline-flex; align-items: center; min-height: 44px; }

/* « Nouveaux documents au chantier » (demande de Jason, 3 novembre 2026 ; _avis_documents.html) : sur l'accueil d'un contremaître
   attitré, sous « Bonjour », la carte des nouvelles en plus discret. Une ligne par projet, tout entière un lien d'au moins 44 px ;
   le nombre reste entier à droite du nom, ou passe dessous quand le nom est long (au téléphone : le nom garde la largeur, coupé
   entre les mots) ; le « › » reste à droite, hors du rang. Rien ne déborde à 375 px. */
.avis-documents { background: var(--blanc); border: 1px solid var(--pierre); border-left: 4px solid var(--bronze); border-radius: var(--rayon); padding: .8rem 1.15rem .4rem; margin: 0 0 1.5rem; box-shadow: var(--ombre); max-width: 48rem; }
.avis-documents h2 { margin: 0 0 .2rem; font-family: inherit; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--bronze-2); }
.avis-documents ul { list-style: none; padding: 0; margin: 0; }
.avis-documents li + li { border-top: 1px solid var(--papier-2); }
.avis-documents a { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .2rem .75rem; min-height: 44px; padding: .3rem 1.4rem .3rem 0; text-decoration: none; color: var(--encre); }
.avis-documents a::after { content: "›"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--bronze-2); font-size: 1.3rem; line-height: 1; }
.avis-documents .projet-avis { flex: 1 1 auto; min-width: 0; font-family: var(--titres); font-weight: 600; font-size: 1.05rem; overflow-wrap: break-word; }
.avis-documents .nombre-avis { flex: 0 0 auto; white-space: nowrap; font-size: .85rem; font-weight: 700; color: var(--encre); background: var(--bronze-clair); border-radius: 999px; padding: .15rem .6rem; }
@media (hover: hover) { .avis-documents a:hover .projet-avis { text-decoration: underline; } }
/* L'avis au créateur d'un BC (décisions de PL du 19 novembre 2026, bons/avis.py) : la même carte que les documents au chantier ; un
   refus, bordé de rouge ; « C'est noté » sous chaque avis, à toute la largeur au téléphone */
.avis-bons { background: var(--blanc); border: 1px solid var(--pierre); border-left: 4px solid var(--bronze); border-radius: var(--rayon); padding: .8rem 1.15rem .6rem; margin: 0 0 1.5rem; box-shadow: var(--ombre); max-width: 48rem; }
.avis-bons h2 { margin: 0 0 .2rem; font-family: inherit; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--bronze-2); }
.avis-bons ul { list-style: none; padding: 0; margin: 0; }
.avis-bons li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; padding: .35rem 0; }
.avis-bons li + li { border-top: 1px solid var(--papier-2); }
.avis-bons li.refuse { border-left: 3px solid var(--erreur-texte); padding-left: .6rem; }
.avis-bons a { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; justify-content: center; min-height: 44px; text-decoration: none; color: var(--encre); }
.avis-bons a strong { font-family: var(--titres); font-weight: 600; font-size: 1.02rem; overflow-wrap: anywhere; }
.avis-bons .detail { font-size: .85rem; color: var(--doux); overflow-wrap: anywhere; }
.avis-bons li.refuse .detail { color: var(--erreur-texte); }
.avis-bons form { flex: 0 0 auto; margin: 0; }
.avis-bons button { min-height: 44px; }
@media (hover: hover) { .avis-bons a:hover strong { text-decoration: underline; } }
@media (max-width: 44rem) { .avis-bons form, .avis-bons button { width: 100%; } .avis-bons form { flex-basis: 100%; } }
/* au-delà des 3 plus récents : un pli (relecture du 19 novembre 2026), pour que les tuiles restent sur le premier écran */
.avis-bons details.autres-avis { border-top: 1px solid var(--papier-2); }
.avis-bons details.autres-avis > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 600; color: var(--bronze-2); }
.avis-bons details.autres-avis > summary::-webkit-details-marker { display: none; }
.avis-bons details.autres-avis > summary::before { content: "›"; font-weight: 700; font-size: 1.1rem; line-height: 1; transition: transform .15s; }
.avis-bons details.autres-avis[open] > summary::before { transform: rotate(90deg); }
.avis-bons details.autres-avis > ul > li:first-child { border-top: 1px solid var(--papier-2); }
/* la pastille de la tuile « Documents chantier » : chiffre en encre, comme ailleurs (« .tuile span » la passait en gris doux sur le
   bronze clair, moins lisible). Sa classe à elle : la pastille « À faire » de l'accueil du bureau reste comme avant (la même
   lisibilité pour elle est à proposer à PL à part). */
.tuile-documents strong .compteur { color: var(--encre); font-size: .8rem; }

main.nouvelles h1 { overflow-wrap: anywhere; }
.actions-nouvelles { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1.25rem; }
.actions-nouvelles .bouton, .actions-nouvelles button { min-height: 44px; }
.liste-nouvelles { display: grid; gap: 1rem; max-width: 48rem; }
.fiche-nouvelle { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); padding: 1rem 1.15rem; box-shadow: var(--ombre); }
.fiche-nouvelle.avec-photo { grid-template-columns: 9rem minmax(0, 1fr); }
.fiche-nouvelle .vignette { display: block; line-height: 0; }
.fiche-nouvelle .vignette img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; border: 1px solid var(--pierre); background: var(--papier-2); }
.fiche-nouvelle h2 { margin: 0; font-family: var(--titres); font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; text-transform: none; color: var(--encre); overflow-wrap: anywhere; }
.fiche-nouvelle h2 a { color: inherit; text-decoration: none; }
.fiche-nouvelle h2 a:hover { color: var(--bronze-2); text-decoration: underline; }
.fiche-nouvelle h2 .pastille { vertical-align: middle; }
.fiche-nouvelle .meta, .nouvelle-lue .meta { margin: .2rem 0 .5rem; font-size: .85rem; color: var(--doux); }
.fiche-nouvelle .meta .quand, .nouvelle-lue .meta .quand { white-space: nowrap; }  /* « Mise à jour le … » d'un bloc */
.fiche-nouvelle .extrait { margin: 0; color: var(--encre-2); overflow-wrap: anywhere; }
.fiche-nouvelle.retiree { background: var(--papier); box-shadow: none; }
.actions-fiche { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
.actions-fiche form { margin: 0; }
.nouvelles-retirees { max-width: 48rem; }
.nouvelles-retirees .liste-nouvelles { margin-top: .5rem; }

.nouvelle-lue { max-width: 44rem; }
.photo-nouvelle { display: block; margin: 0 0 1.25rem; line-height: 0; }
.photo-nouvelle img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; border-radius: var(--rayon); background: var(--papier-2); border: 1px solid var(--pierre); }
.texte-nouvelle { white-space: pre-line; overflow-wrap: anywhere; font-size: 1.02rem; line-height: 1.6; margin: 0 0 1.25rem; }
.lien-nouvelle { display: grid; gap: .35rem; justify-items: start; margin: 0 0 1.25rem; }
.lien-nouvelle .note { margin: 0; overflow-wrap: anywhere; max-width: 100%; }
.lien-nouvelle .bouton { min-height: 44px; }

form.formulaire-nouvelle { display: grid; gap: .75rem; max-width: 40rem; }
form.formulaire-nouvelle > label { min-width: 0; }
form.formulaire-nouvelle input:not([type=checkbox]), form.formulaire-nouvelle textarea { width: 100%; max-width: 100%; font-size: 1rem; }
form.formulaire-nouvelle textarea { font: inherit; font-size: 1rem; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); color: var(--encre); resize: vertical; min-height: 10rem; }
form.formulaire-nouvelle textarea:hover { border-color: var(--doux); }
form.formulaire-nouvelle textarea:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
form.formulaire-nouvelle .note { margin: -.4rem 0 0; }
form.formulaire-nouvelle .actions-nouvelles { margin: .25rem 0 0; }
.photo-actuelle { display: flex; align-items: center; gap: .85rem; }
.photo-actuelle img { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; border: 1px solid var(--pierre); }
.photo-actuelle label.coche { margin: 0; font-size: .95rem; color: var(--encre); }
/* modifier : « Nouvelle information : remettre en haut pour tout le monde », cochée d'office (PL, 15 octobre 2026) */
form.formulaire-nouvelle .remettre-en-haut { border-top: 1px solid var(--papier-2); padding-top: .6rem; }
form.formulaire-nouvelle .remettre-en-haut label.coche { align-items: flex-start; margin: 0; padding: .55rem 0; font-size: .98rem; font-weight: 600; color: var(--encre); }
form.formulaire-nouvelle .remettre-en-haut label.coche input { margin: 0; }
form.formulaire-nouvelle .remettre-en-haut label.coche > span { min-width: 0; overflow-wrap: anywhere; padding-top: .05rem; }
form.formulaire-nouvelle .remettre-en-haut .note { margin: 0 0 0 2rem; }

/* Le nombre de nouvelles pas encore vues (PL, 15 octobre 2026), sur le lien « Nouvelles » du menu et sur le bouton « Menu » du
   téléphone. Bronze clair sur l'en-tête noir et chiffre en encre : environ 9,6 pour 1 des deux côtés. Menu ouvert (bouton blanc) :
   encre et blanc. Le texte pour les lecteurs d'écran est à côté (.pour-lecteur). */
.compteur { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; margin-left: .45rem; border-radius: 999px; background: var(--bronze-clair); color: var(--encre); font-size: .8rem; font-weight: 700; line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.bouton-menu[aria-expanded=true] .compteur { background: var(--encre); color: var(--blanc); }

@media (max-width: 44rem) {
  .nouvelle-une { padding: .9rem 1rem; }
  .nouvelle-une-actions form { flex: 1 1 0; }
  .nouvelle-une-actions button { width: 100%; }
  .fiche-nouvelle { padding: .9rem 1rem; gap: .75rem; }
  /* au téléphone : la photo et le titre côte à côte, le texte et les boutons sur toute la largeur en dessous */
  .fiche-nouvelle.avec-photo { grid-template-columns: 5rem minmax(0, 1fr); gap: 0 .85rem; }
  .fiche-nouvelle.avec-photo .corps { display: contents; }
  .fiche-nouvelle.avec-photo .vignette { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .fiche-nouvelle.avec-photo h2 { grid-column: 2; grid-row: 1; }
  .fiche-nouvelle.avec-photo .meta { grid-column: 2; grid-row: 2; align-self: start; }
  .fiche-nouvelle.avec-photo .extrait, .fiche-nouvelle.avec-photo .actions-fiche { grid-column: 1 / -1; }
  .fiche-nouvelle.avec-photo .extrait { margin-top: .6rem; }
  .actions-fiche .bouton, .actions-fiche button { min-height: 44px; }
  .actions-fiche > * { flex: 1 1 auto; }
  .actions-fiche form button { width: 100%; }
  .actions-nouvelles .bouton, .actions-nouvelles button { flex: 1 1 auto; }
  main.nouvelles .fil-retour a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Santé de l'application (PL, 15 octobre 2026) : une fiche par ligne, une couleur et son mot (jamais la couleur seule), une
   phrase, la date. Le bandeau en haut de l'accueil des superutilisateurs : tout le bandeau est un lien de 44 px et plus. */
.lignes-sante { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .75rem; max-width: 48rem; }
.ligne-sante { background: var(--blanc); border: 1px solid var(--pierre); border-left: 6px solid var(--pierre); border-radius: var(--rayon); padding: .85rem 1rem; box-shadow: var(--ombre); min-width: 0; }
.ligne-sante .tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .75rem; }
.ligne-sante h2 { margin: 0; font-family: var(--titres); font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; text-transform: none; color: var(--encre); }
.ligne-sante .etat { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: .15rem .65rem; white-space: nowrap; }
.ligne-sante .etat::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; }
.ligne-sante .phrase { margin: .45rem 0 0; overflow-wrap: anywhere; }
.ligne-sante .quand { margin: .3rem 0 0; color: var(--doux); font-size: .85rem; font-variant-numeric: tabular-nums; }
.ligne-sante .lien { margin: .2rem 0 0; }
/* un lien par élément à regarder (les BC en signature) : 44 px au doigt, le texte peut passer à la ligne */
.ligne-sante .liens-sante { list-style: none; padding: 0; margin: .3rem 0 0; display: grid; gap: .35rem; min-width: 0; }
.ligne-sante .liens-sante a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.ligne-sante.vert { border-left-color: var(--ok-texte); }
.ligne-sante.vert .etat { background: var(--ok-fond); color: var(--ok-texte); }
.ligne-sante.orange { border-left-color: #c9a35a; }
.ligne-sante.orange .etat { background: #fdf6e7; color: #7a5a1c; }
.ligne-sante.rouge { border-left-color: var(--erreur-texte); background: #fffaf8; }
.ligne-sante.rouge .etat { background: var(--erreur-fond); color: var(--erreur-texte); }
.ligne-sante.gris { border-left-color: var(--pierre); }
.ligne-sante.gris .etat { background: var(--papier-2); color: var(--encre-2); }
.erreurs-sante { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .6rem; max-width: 48rem; }
.erreurs-sante li { background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); padding: .7rem .9rem; min-width: 0; }
.erreurs-sante p { margin: 0; overflow-wrap: anywhere; }
.erreurs-sante .quand { color: var(--doux); font-size: .85rem; }
.erreurs-sante .adresse { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88rem; }
.erreurs-sante .note { margin: .2rem 0 0; font-size: .82rem; }
.pied-sante { margin-top: 2rem; }
/* La vitesse des pages (Santé, 30 octobre 2026) : des fiches, comme les erreurs ; rien ne déborde au téléphone */
main.sante h3 { margin: 1.25rem 0 .5rem; font-size: 1rem; }
.vitesse-sante { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; max-width: 48rem; }
.vitesse-sante li { background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); padding: .7rem .9rem; min-width: 0; }
.vitesse-sante p { margin: 0; overflow-wrap: anywhere; }
.vitesse-sante p + p { margin-top: .2rem; }
.vitesse-sante .quand, .vitesse-sante .note { color: var(--doux); font-size: .85rem; }
.vitesse-sante .adresse { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88rem; }
/* Les avis dans Teams (revue de l'appli, A01) : un avis par fiche, une ligne de Santé par ligne ; l'adresse de la surveillance de
   l'extérieur peut passer à la ligne au téléphone. Les dates d'expiration (A04) : un formulaire par clé, l'un sous l'autre. */
.avis-sante, .expirations-sante { max-width: 48rem; min-width: 0; overflow-wrap: anywhere; }
.avis-sante .texte-avis { white-space: pre-line; }
.avis-sante .refus-avis { color: var(--erreur-texte); font-weight: 600; }
.avis-sante .adresse-ping { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88rem; }
.expirations-sante form.ligne + form.ligne, .expirations-sante .note + form.ligne { margin-top: .9rem; }

.bandeau-sante { display: flex; align-items: center; gap: .7rem; min-height: 44px; margin: 0 0 1.25rem; padding: .65rem 1rem; border-radius: var(--rayon); border-left: 5px solid; text-decoration: none; font-weight: 600; max-width: 48rem; overflow-wrap: anywhere; }
.bandeau-sante .pastille-sante { flex: none; width: .75rem; height: .75rem; border-radius: 50%; background: currentColor; }
.bandeau-sante .texte { min-width: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.bandeau-sante.rouge { background: var(--erreur-fond); color: var(--erreur-texte); border-color: var(--erreur-texte); }
.bandeau-sante.orange { background: #fdf6e7; color: #7a5a1c; border-color: #c9a35a; }
.bandeau-sante.rouge:hover, .bandeau-sante.orange:hover { color: var(--encre); }

@media (max-width: 44rem) {
  .ligne-sante { padding: .8rem .85rem; }
  .ligne-sante .tete { flex-direction: column; align-items: flex-start; gap: .3rem; }  /* le titre, puis son état : pareil pour chaque fiche */
  main.sante .fil-retour a, .ligne-sante .lien a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- Vague 0 des trois modules (15 octobre 2026) : Paramètres → Bascules, la page « À faire », les pages « À venir » ----------
   Une fiche par interrupteur et par bloc, sur le patron des lignes de Santé ; au téléphone, tout empile et chaque bouton fait 44 px. */
.liste-bascules { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .75rem; max-width: 48rem; }
.bascule { background: var(--blanc); border: 1px solid var(--pierre); border-left: 6px solid var(--pierre); border-radius: var(--rayon); padding: .85rem 1rem; box-shadow: var(--ombre); min-width: 0; }
.bascule.allumee { border-left-color: var(--ok-texte); }
.bascule.sans-effet { background: var(--papier); }
.bascule .tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .75rem; }
.bascule h3 { margin: 0; font-family: var(--titres); font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; text-transform: none; color: var(--encre); }
.bascule .etat { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: .15rem .65rem; background: var(--papier-2); color: var(--encre-2); white-space: nowrap; }
.bascule.allumee .etat { background: var(--ok-fond); color: var(--ok-texte); }
.bascule .aide { margin: .45rem 0 0; color: var(--encre-2); overflow-wrap: anywhere; }
.bascule .regle { margin: .3rem 0 0; font-size: .85rem; font-weight: 600; color: var(--bronze-2); }
.bascule form.changer { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .75rem; margin: .75rem 0 0; }
.bascule form.changer label { flex: 1 1 14rem; }
.bascule form.changer button { min-height: 44px; }
.bascule .cle { margin: .5rem 0 0; font-size: .78rem; color: var(--doux); }
.bascule .cle code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
/* Les sections (demande de PL du 17 novembre 2026) : en haut, les comptes, le filtre (.onglets) et une rangée de liens vers chaque
   section ; chaque section est un repli avec son titre et son compte, ouvert à l'ordinateur, plié au téléphone par app.js. Dans
   une fiche, l'explication se replie sous « Ce que ça fait » ; le message d'un changement est dans la fiche (?dans=). */
.resume-bascules { max-width: 48rem; margin: 0 0 1.5rem; }
.resume-bascules .comptes { margin: 0 0 .25rem; }
.resume-bascules .onglets { margin-bottom: .75rem; }
.resume-bascules > .note { margin-top: -.5rem; }
.aller-a { display: flex; flex-wrap: wrap; gap: .4rem; }
.aller-a a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; max-width: 100%; padding: .3rem .85rem; border: 1px solid var(--pierre); border-radius: 999px; background: var(--blanc); color: var(--encre); text-decoration: none; font-size: .88rem; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.aller-a a:hover { border-color: var(--encre); color: var(--encre); }
.aller-a .compte { font-size: .78rem; color: var(--doux); background: var(--papier-2); border-radius: 999px; padding: 0 .45rem; }
details.section-bascules { max-width: 48rem; margin: 0 0 .75rem; }
/* le chevron dans sa colonne, le titre puis son compte à côté : un titre long passe à la ligne sans laisser le chevron seul */
details.section-bascules > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1rem minmax(0, 1fr); align-items: center; column-gap: .4rem; min-height: 44px; padding: .45rem .85rem; background: var(--blanc); border: 1px solid var(--pierre); border-radius: var(--rayon); }
details.section-bascules > summary::-webkit-details-marker { display: none; }
details.section-bascules > summary::before { content: "›"; grid-column: 1; grid-row: 1 / span 2; justify-self: center; color: var(--bronze-2); font-weight: 700; font-size: 1.1rem; line-height: 1; transition: transform .15s; }
details.section-bascules[open] > summary::before { transform: rotate(90deg); }
details.section-bascules > summary:hover { border-color: var(--doux); }
details.section-bascules > summary h2 { grid-column: 2; margin: 0; overflow-wrap: anywhere; }
details.section-bascules > summary .compte-section { grid-column: 2; font-size: .85rem; color: var(--doux); }
@media (min-width: 44.01rem) {  /* à l'ordinateur, le compte sur la ligne du titre */
  details.section-bascules > summary { grid-template-columns: 1rem auto minmax(0, 1fr); column-gap: .6rem; }
  details.section-bascules > summary::before { grid-row: 1; }
  details.section-bascules > summary .compte-section { grid-column: 3; grid-row: 1; }
}
details.section-bascules[open] > summary { margin-bottom: .5rem; }
details.section-bascules > .note { margin: 0 0 .75rem; }
details.section-bascules .liste-bascules { margin-bottom: 1.25rem; }
details.section-bascules.faites { margin-top: 1.5rem; }
details.section-bascules.faites > summary { background: var(--papier-2); }
.bascule details.ce-que-ca-fait { margin: .35rem 0 0; }
.bascule details.ce-que-ca-fait > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-size: .88rem; font-weight: 600; color: var(--bronze-2); }
.bascule details.ce-que-ca-fait > summary::-webkit-details-marker { display: none; }
.bascule details.ce-que-ca-fait > summary::before { content: "›"; font-weight: 700; font-size: 1.05rem; line-height: 1; transition: transform .15s; }
.bascule details.ce-que-ca-fait[open] > summary::before { transform: rotate(90deg); }
.bascule details.ce-que-ca-fait > .aide { margin-top: 0; }
.bascule .avis { margin: .6rem 0 0; }
/* Changer la source de l'Engagé ou du Facturé (point 1 de la revue des briques fragiles, 29 octobre 2026) : la confirmation avant
   et après. Une fiche par projet ; chaque montant sur sa ligne, le libellé à gauche et « avant → après (écart) » à droite, qui passe
   sous le libellé quand la place manque (au téléphone) ; un montant ne se coupe jamais ; rien ne déborde à 375 px. */
main.confirmer-source .mt { white-space: nowrap; }
main.confirmer-source label.coche.confirmer > span { min-width: 0; overflow-wrap: anywhere; }
main.confirmer-source .ligne .bouton { min-height: 44px; }
.ecarts-parite { margin: .5rem 0 1rem; padding-left: 1.2rem; }
.ecarts-parite li { overflow-wrap: anywhere; margin: 0 0 .35rem; }
.changements-source .nombre-projets { margin: 0 0 .35rem; font-size: 1.05rem; }
.total-source { margin: .5rem 0 1rem; }
.projets-avant-apres dl { margin: 0; }
.total-source > div, .projets-avant-apres dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .1rem .75rem; padding: .35rem 0; border-top: 1px solid var(--papier-2); }
.total-source dt, .projets-avant-apres dt { color: var(--encre-2); }
.total-source dd, .projets-avant-apres dd { margin: 0 0 0 auto; text-align: right; font-variant-numeric: tabular-nums; }
.projets-avant-apres { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.projets-avant-apres > li { padding: .4rem .85rem .55rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); min-width: 0; }
.projets-avant-apres h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.projets-avant-apres h3 a { display: inline-flex; align-items: center; min-height: 44px; }
.projets-avant-apres .ecart { color: var(--bronze-2); font-size: .9rem; }
.projets-avant-apres .bouge dt { color: var(--encre); font-weight: 600; }
.total-source .sens { display: block; color: var(--encre-2); font-size: .9rem; }
.projets-avant-apres .codes-source { margin: .45rem 0 .2rem; padding-top: .35rem; border-top: 1px solid var(--papier-2); font-weight: 600; }
.projets-avant-apres .codes-qui-bougent { margin: 0; padding-left: 1.2rem; }
.projets-avant-apres .codes-qui-bougent li { overflow-wrap: anywhere; margin: 0 0 .25rem; }

.blocs-a-faire { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .75rem; max-width: 48rem; }
.bloc-a-faire { background: var(--blanc); border: 1px solid var(--pierre); border-left: 6px solid var(--bronze); border-radius: var(--rayon); padding: .85rem 1rem; box-shadow: var(--ombre); min-width: 0; }
.bloc-a-faire.vide { border-left-color: var(--pierre); box-shadow: none; }
.bloc-a-faire .tete { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.bloc-a-faire h2 { margin: 0; font-family: var(--titres); font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; text-transform: none; color: var(--encre); }
.bloc-a-faire .nombre { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .45rem; border-radius: 999px; background: var(--encre); color: var(--blanc); font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bloc-a-faire.vide .nombre { background: var(--papier-2); color: var(--doux); }
.bloc-a-faire .rien { margin: .4rem 0 0; color: var(--doux); font-size: .9rem; }
.bloc-a-faire .etat-bloc { margin: .25rem 0 0; color: var(--doux); font-size: .85rem; overflow-wrap: anywhere; }  /* « projet@ lu à 14 h 05 » */
.bloc-a-faire .note { margin: .4rem 0 0; }  /* ce qui entre dans le bloc (les documents des fournisseurs : un BC actif) */
.bloc-a-faire .elements { list-style: none; padding: 0; margin: .5rem 0 0; }
.bloc-a-faire .elements li + li { border-top: 1px solid var(--papier-2); }
.bloc-a-faire .elements a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .75rem; min-height: 44px; align-items: center; padding: .5rem 0; text-decoration: none; color: var(--encre); }
.bloc-a-faire .elements a:hover strong { text-decoration: underline; color: var(--bronze-2); }
.bloc-a-faire .elements strong { overflow-wrap: anywhere; }
.bloc-a-faire .elements .detail { grid-column: 1; font-size: .85rem; color: var(--doux); overflow-wrap: anywhere; }
.bloc-a-faire .elements .quand { grid-column: 2; grid-row: 1 / span 2; font-size: .85rem; color: var(--doux); white-space: nowrap; }
.bloc-a-faire .lien { margin: .5rem 0 0; }
/* un avis (le plafond de Claude atteint, PL, 16 octobre 2026) : bordé de rouge comme une ligne rouge de Santé ; sa phrase, puis un bouton */
.bloc-a-faire.alerte { border-left-color: var(--erreur-texte); background: #fffaf8; }
.bloc-a-faire .avis-a-faire { margin: .5rem 0 0; }
.bloc-a-faire .avis-a-faire + .avis-a-faire { border-top: 1px solid var(--papier-2); padding-top: .5rem; }
.bloc-a-faire .avis-a-faire .phrase { margin: 0; overflow-wrap: anywhere; }
.bloc-a-faire .avis-a-faire .action { margin: .6rem 0 0; }
.bloc-a-faire .avis-a-faire .bouton { min-height: 44px; }
/* un BC approuvé, pas encore envoyé depuis plus de 2 jours ouvrables (décisions de PL du 19 novembre 2026) : bordé de rouge, « En retard » */
.bloc-a-faire .elements li.en-retard { border-left: 4px solid var(--erreur-texte); padding-left: .6rem; background: #fffaf8; }
.bloc-a-faire .elements li.en-retard .detail { color: var(--erreur-texte); }
.bloc-a-faire .elements li.en-retard .pastille.alerte { margin: 0 .2rem 0 0; vertical-align: .1em; }
.bloc-a-faire .elements form.ligne button { min-height: 44px; }  /* « C'est noté », « C'est correct » : faciles à toucher */
.tuile strong .compteur { vertical-align: middle; }
.a-venir-module { max-width: 48rem; }

@media (max-width: 44rem) {
  .bascule, .bloc-a-faire { padding: .8rem .85rem; }
  .bascule .tete { flex-direction: column; align-items: flex-start; gap: .3rem; }
  /* un état long (« L'application (plus ce qui n'est que dans Monday) ») passe à la ligne dans sa pastille au lieu d'être coupé */
  .bascule .etat { white-space: normal; max-width: 100%; overflow-wrap: anywhere; border-radius: .75rem; padding: .2rem .65rem; line-height: 1.35; }
  .bascule form.changer { align-items: stretch; }
  .bascule form.changer label, .bascule form.changer button { flex: 1 1 100%; }
  /* les sections pliées sont elles-mêmes la liste des sections : la rangée de liens du haut les redisait sur sept lignes */
  html.js .aller-a.pas-au-telephone { display: none; }
  .bloc-a-faire .lien a, main.bascules .fil-retour a, main.a-faire .fil-retour a, main.bons .fil-retour a, main.soumissions .fil-retour a { display: inline-flex; align-items: center; min-height: 44px; }
  .bloc-a-faire .avis-a-faire .bouton { display: flex; width: 100%; }  /* le bouton d'un avis : toute la largeur, facile à toucher */
  .bloc-a-faire .avis-a-faire form.action button { width: 100%; }  /* « C'est noté » (la lecture de QuickBooks) : pareil */
}

/* ---------- Prix datés (Consommables, Équipements) et « À facturer » (premier lot de la facturation au client, 16 octobre 2026) ---------- */
.prix-actuel { margin: 0 0 .5rem; overflow-wrap: anywhere; }
span.mt { white-space: nowrap; }  /* un montant ne se coupe pas en deux lignes : « 1 350,00 $ » */
details.plier { border-top: 1px solid var(--papier-2); margin: .5rem 0 0; }
details.plier > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--bronze-2); }
details.plier > form { margin: .25rem 0 .75rem; }
details.plier > form.archiver { margin: .5rem 0; }
main.articles-prix .carte.article > form.archiver { margin: .5rem 0 0; }  /* « Remettre dans la liste », sur la fiche d'un archivé */
main.articles-prix details.archives > .carte.article:first-of-type { margin-top: .5rem; }
details.plier > .note { margin: 0 0 .75rem; }
details.plier > table.fiches { margin: 0 0 .75rem; }
details.plier > ul.note { padding-left: 1.1rem; margin: 0 0 .5rem; }
details.plier > ul.note li { margin: 0 0 .3rem; }
main.facturation details.regles { margin: 0 0 1.25rem; }
main.articles-prix .carte.article h2 .note, main.facturation h2 .note { font-size: .85rem; font-weight: 400; margin: 0; }
main.facturation td.argent, main.facturation th.argent { text-align: right; }
main.facturation td .note { display: inline; margin: 0; font-size: .8rem; }
main.facturation .avis.pas-soumis { margin: 0 0 1rem; }
main.facturation .a-chiffrer, main.facturation .sejours-avant { list-style: none; padding: 0; margin: 0 0 1rem; }
main.facturation .a-chiffrer li, main.facturation .sejours-avant li { padding: .5rem 0; border-bottom: 1px solid var(--papier-2); overflow-wrap: anywhere; }
main.facturation .a-chiffrer li:last-child, main.facturation .sejours-avant li:last-child { border-bottom: 0; }
main.facturation h3 .pastille { vertical-align: middle; }
/* Équipements loués ailleurs (PL, 18 novembre 2026) : « loué chez » se voit ; la page d'un chantier en fiches, une par ligne */
.loue-chez { color: var(--bronze-2); font-weight: 600; }
main.articles-prix .carte h3 { font-size: .95rem; margin: 1rem 0 .4rem; }
main.equipements-chantier .liste-fiches { list-style: none; padding: 0; margin: 0 0 1rem; }
main.equipements-chantier .liste-fiches li { padding: .6rem 0; border-bottom: 1px solid var(--papier-2); overflow-wrap: anywhere; }
main.equipements-chantier .liste-fiches li:last-child { border-bottom: 0; }
main.equipements-chantier .liste-fiches li.alerte { border-left: 3px solid #c9a35a; padding-left: .6rem; background: #fdf6e7; }
main.equipements-chantier .liste-fiches li .bouton { margin-top: .4rem; }
main.equipements-chantier .avis.attention { margin: 0 0 .75rem; }
main.equipements-chantier h2 .pastille { vertical-align: middle; letter-spacing: .04em; }
@media (max-width: 44rem) {
  main.facturation table.fiches td.argent { text-align: left; }
  main.facturation .semaine-nav { flex-wrap: wrap; }
  main.facturation .semaine-nav strong { flex: 1 1 100%; order: -1; }
  main.facturation .semaine-nav .bouton { flex: 1 1 0; justify-content: center; }
  /* chaque lien se touche du doigt (44 px) */
  main.facturation h2 a, main.facturation .pas-soumis a, main.facturation .a-chiffrer a, main.facturation details.regles a,
  main.articles-prix > .note a, main.articles-prix .equipement .fiche dt a { display: inline-flex; align-items: center; min-height: 44px; }
  main.equipements-chantier .liste-fiches li a:not(.bouton), main.equipements-chantier .fil-retour a { display: inline-flex; align-items: center; min-height: 44px; }
  main.equipements-chantier .liste-fiches li .bouton { display: flex; width: 100%; min-height: 44px; }
  main.articles-prix .par-chantier form > button, main.equipements-chantier form.ligne > button, main.equipements-chantier section > form > button { width: 100%; }
  main.articles-prix details.plier > form > button, main.articles-prix details.plier > form.archiver button,
  main.articles-prix .carte.article > form.archiver button { width: 100%; }
}

/* Robot texto (21 octobre 2026) : la liste des conversations, le fil d'une conversation en bulles, l'essai sans téléphone */
.sms-etat { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
.sms-etat dt { color: var(--doux); }
.sms-etat dd { margin: 0; overflow-wrap: anywhere; }
.sms-essai { display: grid; gap: .75rem; max-width: 40rem; }
.sms-essai label { display: grid; gap: .25rem; }
.sms-essai input { min-height: 44px; }
.sms-essai button { min-height: 44px; justify-self: start; }
.sms-liste { display: grid; gap: .75rem; }
.sms-carte { display: block; text-decoration: none; color: inherit; padding: 1rem; margin: 0; }
.sms-carte .pastille { margin-left: .35rem; }
.sms-apercu { margin: .35rem 0 0; color: var(--encre-2); overflow-wrap: anywhere; }
.sms-fil { display: flex; flex-direction: column; gap: .5rem; max-width: 40rem; margin: 0 0 1.5rem; }
.sms-msg { padding: .6rem .9rem; border-radius: 1rem; max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.sms-entrant { background: var(--blanc); border: 1px solid var(--pierre); align-self: flex-start; border-bottom-left-radius: .25rem; }
.sms-sortant { background: var(--encre); color: var(--blanc); align-self: flex-end; border-bottom-right-radius: .25rem; }
.sms-meta { display: block; font-size: .75rem; color: var(--doux); margin: .35rem 0 0; }
.sms-sortant .sms-meta { color: rgba(255, 255, 255, .72); }
.sms-retour { margin: 0 0 .5rem; }
.sms-suite { margin-top: 1rem; }
@media (max-width: 44rem) { .sms-etat { grid-template-columns: 1fr; gap: 0 } .sms-etat dt { margin-top: .5rem; } .sms-msg { max-width: 92%; } }

/* Les volets (21 octobre 2026) : le sélecteur Construction | Immobilier dans l'en-tête, pour ceux qui voient les deux */
.volets { display: inline-flex; align-self: center; border: 1px solid #5a5d62; border-radius: 999px; padding: 2px; }
.volets a { display: inline-flex; align-items: center; color: #e9e5dd; text-decoration: none; font-size: .85rem; font-weight: 600; padding: .3rem .9rem; border-radius: 999px; }
.volets a:hover { color: var(--blanc); }
.volets a[aria-current] { background: var(--blanc); color: var(--encre); }
@media (max-width: 44rem) {
  .volets { display: flex; margin: .75rem 0 .5rem; }
  .volets a { flex: 1; justify-content: center; min-height: 44px; }
}

/* Les estimations archivées et « Aucun projet » (24 octobre 2026, estimation/archive.py) */
.sans-projet { color: var(--encre-2); }
.numero-ecrit { display: block; font-size: .8rem; color: var(--doux); }
.numero-ecrit .numero { display: inline-block; max-width: 100%; }  /* le numéro reste d'un morceau quand il entre sur une ligne */
.carte.archivee .avis { margin-bottom: .6rem; }
.carte.archivee .raison-archive { margin: 0 0 .5rem; overflow-wrap: anywhere; }
form.carte.archiver { display: grid; gap: .6rem; max-width: 40rem; }
form.carte.archiver p { margin: 0; }
form.carte.archiver label { display: grid; gap: .25rem; }
form.carte.archiver button { justify-self: start; }
/* le nom, en tête de rangée (th) : il passe à la ligne comme une cellule large, en poids normal (sinon « nowrap » des tableaux
   fait défiler la liste de côté dès 65 caractères à l'ordinateur et cache « Pi² » et « Créée le ») */
main.liste-estimations table.estimations th[scope=row] { white-space: normal; min-width: 12rem; font-weight: 400; }
@media (max-width: 44rem) {
  main.liste-estimations table.estimations.fiches th[scope=row] { min-width: 0; font-weight: 600; }  /* la fiche : son nom en tête, en gras */
  main.liste-estimations table.fiches th[scope=row] a, main.liste-estimations p.note a, .avis.archivee a { display: inline-flex; align-items: center; min-height: 44px; }
  form.carte.archiver button { justify-self: stretch; }
}

/* Les projets archivés (24 octobre 2026, socle/archive_projet.py) : le bandeau, « Archiver ce projet », la liste des archivés */
.avis.archive-projet a { font-weight: 600; }
details.archiver-projet { margin-top: 1.5rem; }
details.archiver-projet .carte { margin: .25rem 0 0; display: grid; gap: .6rem; }
details.archiver-projet .carte > p, details.archiver-projet .empechements p { margin: 0; }
details.archiver-projet .empechements ul { margin: .5rem 0 0; padding-left: 1.2rem; }
details.archiver-projet .empechements li + li { margin-top: .35rem; }
details.archiver-projet form.archiver button { justify-self: start; }
details.archiver-projet form.archiver label.coche { margin: 0; align-items: flex-start; }
details.archiver-projet form.archiver label.coche input { margin-top: .1rem; }
.carte.archivee form.ressortir { margin: .25rem 0 .5rem; }
/* le nom, en tête de rangée : il passe à la ligne comme une cellule large (sinon « nowrap » des tableaux fait défiler la liste de côté) */
main.liste-projets table.archives th[scope=row] { white-space: normal; min-width: 12rem; font-weight: 400; }
@media (max-width: 44rem) {
  main.liste-projets table.archives.fiches th[scope=row] { min-width: 0; font-weight: 600; }  /* la fiche : son nom en tête, en gras */
  main.liste-projets table.fiches th[scope=row] a, p.voir-archives a, .avis.archive-projet a { display: inline-flex; align-items: center; min-height: 44px; }
  details.archiver-projet form.archiver button { justify-self: stretch; }
}

/* ---------- Unités de quantité (25 octobre 2026) ----------
   L'écran /inducteurs, au téléphone d'abord (CLAUDE.md, « Téléphone d'abord ») : une fiche par quantité, pas de tableau ; chaque champ,
   choix et bouton d'au moins 44 px de haut ; l'unité et « Se compte » côte à côte quand ça tient. Les codes par section, fermées :
   le code sur sa ligne, son choix pleine largeur dessous au téléphone ; à l'ordinateur (768 px et plus), le code à gauche, le choix
   à droite. */
main.unites-quantite .avis.erreur p { margin: 0 0 .4rem; }
main.unites-quantite .avis.erreur ul { margin: 0; padding-left: 1.1rem; }
main.unites-quantite .avis.erreur li + li { margin-top: .4rem; }
main.unites-quantite .fiches-unites { display: grid; gap: 0; }
main.unites-quantite .fiche-unite { display: grid; gap: .6rem; padding: 1rem 0; border-top: 1px solid var(--papier-2); min-width: 0; }
main.unites-quantite .fiche-unite.a-confirmer { border-left: 3px solid var(--erreur-texte); padding-left: .75rem; }
main.unites-quantite .fiche-unite h3 { margin: 0; font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
main.unites-quantite .fiche-unite h3 .unite-texte { font-weight: 400; color: var(--doux); }
main.unites-quantite .fiche-unite label, main.unites-quantite .ajouter-unite label { min-width: 0; }
main.unites-quantite .fiche-unite input:not([type=checkbox]), main.unites-quantite .fiche-unite select,
main.unites-quantite .ajouter-unite input, main.unites-quantite .ajouter-unite select,
main.unites-quantite .code-mesure select { width: 100%; max-width: 100%; min-height: 44px; font-size: 1rem; }  /* 16 px : le téléphone ne zoome pas */
/* l'unité et « Se compte » sur une ligne quand les deux s'y lisent en entier ; sinon « Se compte » passe dessous. Le champ Unité
   est aussi large que l'unité tapée (--car : son nombre de caractères, posé par la page et suivi par le script) : « logement » tient
   à côté de « Se compte » à 375 px, « salle de bain » prend sa ligne (relecture du 25 octobre 2026 : l'unité était coupée à 86 px). */
main.unites-quantite .unite-et-compte { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
main.unites-quantite .unite-et-compte > label.unite { flex: 1 1 max(6.5rem, calc(var(--car, 8) * .6rem + 1.6rem)); }
main.unites-quantite .unite-et-compte > label:not(.unite) { flex: 999 1 12rem; }
main.unites-quantite .aide { margin: -.35rem 0 0; font-size: .8rem; color: var(--doux); }
main.unites-quantite .sert { margin: 0; font-size: .85rem; color: var(--encre-2); overflow-wrap: anywhere; }
main.unites-quantite label.confirme-unite { margin: 0; align-items: flex-start; font-size: .9rem; font-weight: 500; color: var(--erreur-texte); }
main.unites-quantite label.confirme-unite input { margin-top: .15rem; }
main.unites-quantite label.confirme-unite span { min-width: 0; overflow-wrap: anywhere; }
main.unites-quantite .gestes { display: flex; flex-wrap: wrap; gap: .5rem; }
main.unites-quantite .gestes button, main.unites-quantite p.enregistrer button { min-height: 44px; }
main.unites-quantite p.enregistrer { margin: 1rem 0 0; }
main.unites-quantite dl.lecture-unite { margin: 0; display: grid; gap: .2rem; font-size: .92rem; }
main.unites-quantite dl.lecture-unite div { display: flex; flex-wrap: wrap; gap: 0 .5rem; }
main.unites-quantite dl.lecture-unite dt { color: var(--doux); }
main.unites-quantite dl.lecture-unite dd { margin: 0; }
main.unites-quantite fieldset.ajouter-unite { display: grid; gap: .6rem; min-width: 0; margin: 1rem 0 0; padding: .85rem; border: 1px dashed var(--pierre); border-radius: var(--rayon); }
main.unites-quantite fieldset.ajouter-unite legend { padding: 0 .35rem; font-weight: 600; font-size: .92rem; }
main.unites-quantite details.retirees { margin: 1.25rem 0 0; border-top: 1px solid var(--papier-2); }
main.unites-quantite details.retirees .note { margin: 0 0 .5rem; }
main.unites-quantite details > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .75rem; min-height: 44px; padding: .35rem 0; }
main.unites-quantite details > summary::-webkit-details-marker { display: none; }
main.unites-quantite details > summary::before { content: "▸"; color: var(--doux); width: 1rem; flex: none; }
main.unites-quantite details[open] > summary::before { content: "▾"; }
main.unites-quantite details.retirees > summary { color: var(--doux); font-weight: 500; }
main.unites-quantite details.section-codes { border-top: 1px solid var(--papier-2); }
/* le résumé d'une section : le titre, et « 3 sur 9 rattachés » dessous, aligné sur le titre (à droite à l'ordinateur) */
main.unites-quantite details.section-codes > summary { display: grid; grid-template-columns: 1rem minmax(0, 1fr); column-gap: .5rem; row-gap: 0; align-content: center; }
main.unites-quantite details.section-codes > summary .titre-section { grid-column: 2; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
main.unites-quantite details.section-codes > summary .compte-section { grid-column: 2; font-size: .85rem; color: var(--doux); }
main.unites-quantite ul.liste-codes-mesure { list-style: none; margin: 0 0 .9rem; padding: 0; display: grid; gap: .75rem; }  /* le choix sur toute la largeur au téléphone */
main.unites-quantite li.code-mesure { display: grid; gap: .3rem; min-width: 0; }
main.unites-quantite .nom-code { display: block; font-size: .92rem; font-weight: 400; color: var(--encre); overflow-wrap: anywhere; }
main.unites-quantite .nom-code .numero { font-weight: 600; font-variant-numeric: tabular-nums; }
main.unites-quantite .mesure-code { font-size: .92rem; color: var(--encre-2); }
@media (min-width: 48rem) {
  main.unites-quantite .fiches-unites { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); column-gap: 1.5rem; }
  main.unites-quantite fieldset.ajouter-unite { max-width: 40rem; }
  main.unites-quantite ul.liste-codes-mesure { padding-left: 1rem; }  /* le retrait sous le titre de la section, à l'ordinateur seulement */
  main.unites-quantite li.code-mesure { grid-template-columns: minmax(0, 1fr) minmax(14rem, 22rem); align-items: center; column-gap: 1.25rem; }
  main.unites-quantite details.section-codes > summary { grid-template-columns: 1rem minmax(0, 1fr) auto; }
  main.unites-quantite details.section-codes > summary .compte-section { grid-column: 3; grid-row: 1; }
}

/* Le Retour de projets en fiches, une par code (PL, 25 octobre 2026 : le premier retour de coût réel ; téléphone d'abord, plus de
   tableau qui défile de côté) : le budget, le réel, l'écart ; le repli « Projets », projet par projet ; ce qui est mis à part ; le
   coût réel sans unité de quantité. Les touches font au moins 44 px, partout. */
ul.retour-codes, ul.retour-liste, ul.retraits, ul.retour-sans-unite-liste { list-style: none; margin: 0; padding: 0; }
.carte.retour-code { margin: 0 0 1rem; }
h2.retour-titre { font-size: 1.05rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--encre); margin: 0 0 .6rem; line-height: 1.3; overflow-wrap: anywhere; }
.retour-numero { font-variant-numeric: tabular-nums; color: var(--bronze-2); font-weight: 600; margin-right: .2rem; }
.retour-unite { color: var(--doux); font-weight: 500; }
.retour-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .5rem 1rem; margin: 0 0 .75rem; }
.retour-chiffres > div { min-width: 0; }
.retour-chiffres dt { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); }
.retour-chiffres dd { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.retour-code .montant { white-space: nowrap; }  /* « 11 604,06 $/salle de bain » ne se coupe pas au milieu d'un montant */
.retour-code .combien { color: var(--doux); font-size: .85rem; }
.retour-code .ecart.plus { color: var(--erreur-texte); font-weight: 600; }
.retour-code .ecart.moins { color: var(--ok-texte); font-weight: 600; }
details.retour-projets > summary, details.mettre-a-part > summary, details.retour-sans-unite > summary, details.retour-sans-chiffres > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; min-height: 44px; font-weight: 600; }
details.retour-projets > summary::-webkit-details-marker, details.mettre-a-part > summary::-webkit-details-marker,
details.retour-sans-unite > summary::-webkit-details-marker, details.retour-sans-chiffres > summary::-webkit-details-marker { display: none; }
details.retour-projets > summary::before, details.retour-sans-unite > summary::before, details.retour-sans-chiffres > summary::before {
  content: "▸"; margin-right: .5rem; color: var(--bronze-2); }
details.retour-projets[open] > summary::before, details.retour-sans-unite[open] > summary::before,
details.retour-sans-chiffres[open] > summary::before { content: "▾"; }
details.retour-projets { border-top: 1px solid var(--pierre); }
li.retour-projet { padding: .75rem 0; border-top: 1px solid var(--papier-2); min-width: 0; }
li.retour-projet:first-child { border-top: 0; }
li.retour-projet h3 { font-size: 1rem; margin: 0; overflow-wrap: anywhere; }
li.retour-projet > p.note { margin: .1rem 0 .5rem; }
.retour-fiche dd { overflow-wrap: anywhere; }
ul.retraits li { padding: .2rem 0 .4rem; overflow-wrap: anywhere; }
ul.retraits li .note { display: block; margin: .1rem 0 .3rem; }
form.remettre button { min-height: 44px; }
details.mettre-a-part { margin: .5rem 0 0; }
details.mettre-a-part > summary { justify-content: center; padding: 0 1.3rem; font-size: .92rem; border: 1.5px solid var(--encre); border-radius: 999px; background: var(--blanc); width: fit-content; max-width: 100%; }
details.mettre-a-part[open] > summary { background: var(--papier-2); border-color: var(--pierre); }
details.mettre-a-part form { display: grid; gap: .6rem; margin: .6rem 0 0; max-width: 32rem; }
details.mettre-a-part form p { margin: 0; }
details.mettre-a-part label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; min-width: 0; }
details.mettre-a-part input, details.mettre-a-part textarea { width: 100%; max-width: 100%; min-height: 44px; font: inherit; font-size: 1rem; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); }
details.mettre-a-part form > button { min-height: 44px; justify-self: start; }
details.retour-sans-unite h3 { font-size: 1rem; margin: 1rem 0 .3rem; overflow-wrap: anywhere; }
ul.retour-sans-unite-liste li { padding: .35rem 0; border-top: 1px solid var(--papier-2); overflow-wrap: anywhere; }
ul.retour-sans-unite-liste .montant { white-space: nowrap; margin-left: .3rem; font-weight: 600; }
details.retour-sans-unite h3 .montant { white-space: nowrap; }
ul.retour-sans-unite-liste .note { display: block; margin: .1rem 0 0; }
details.retour-sans-unite a.bouton { min-height: 44px; }
@media (max-width: 44rem) {
  .retour-chiffres { grid-template-columns: 1fr; gap: .35rem; }
  details.mettre-a-part > summary { width: 100%; }
  details.mettre-a-part form > button, form.remettre button { width: 100%; justify-self: stretch; }
}
@media (min-width: 64rem) {  /* à l'ordinateur : les projets d'un code côte à côte, plutôt qu'une longue colonne */
  ul.retour-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: 0 2rem; }
  li.retour-projet { border-top: 0; border-bottom: 1px solid var(--papier-2); }
}

/* ---------- Une passe de la routine (/routine/{id}) : les replis « Paramètres » et « Résultat » d'un appel d'outil se touchent du doigt
   au téléphone, 44 px (relecture du 27 octobre 2026 : 23 px) ---------- */
@media (max-width: 44rem) {
  table.appels-routine details > summary { min-height: 44px; padding: .6rem 0; cursor: pointer; }
}
/* « Relancer une passe maintenant » sur le réel (revue de l'appli, A06 ; routine.html) : le bouton à 44 px, sur toute la largeur au
   téléphone ; les demandes des deux derniers jours, une par ligne, le lien vers la passe à 44 px */
.relance-routine button { min-height: 44px; }
.relance-routine > p > a { display: inline-flex; align-items: center; min-height: 44px; }  /* « Recharger », « la suivre » */
.relance-routine > p > .pastille:first-child { margin-left: 0; }
.relance-routine h3 { margin: 1rem 0 .25rem; font-size: 1rem; }
.relance-demandes { list-style: none; margin: .25rem 0 0; padding: 0; }
.relance-demandes > li { padding: .4rem 0; border-bottom: 1px solid var(--papier-2); overflow-wrap: anywhere; }
.relance-demandes > li .pastille { margin: 0 .35rem 0 0; }
.relance-demandes > li a { display: inline-flex; align-items: center; min-height: 44px; }
.relance-demandes .note { display: block; }
@media (max-width: 44rem) {
  .relance-routine form.ligne > button { width: 100%; }
}
/* Le côte à côte de l'envoi par le code (cadre de sécurité, 9.8 ; routine.html) : rien ne déborde de côté au téléphone (un écart
   peut être long, avec des numéros sans espace) ; les liens à 44 px */
.cote-a-cote { overflow-wrap: anywhere; }
.cote-a-cote .cote-serie > .pastille:first-child { margin-left: 0; }
.cote-a-cote h3 { margin: 1rem 0 .25rem; font-size: 1rem; }
.ecarts-cote-a-cote { list-style: none; margin: .25rem 0 0; padding: 0; }
.ecarts-cote-a-cote > li { padding: .4rem 0; border-bottom: 1px solid var(--papier-2); }
.ecarts-cote-a-cote > li > a, .ecarts-cote-a-cote .note a { display: inline-flex; align-items: center; min-height: 44px; }
.ecarts-cote-a-cote > li > .note { display: block; }
.ecarts-cote-a-cote ul { margin: .25rem 0 0; padding-left: 1.1rem; }
/* Le dernier message du matin du code (page Routine ; décision de PL du 14 novembre 2026, 5A) : replié au départ, le titre se touche
   sur toute sa ligne (44 px) ; le texte garde ses paragraphes et ses puces, et se coupe partout au téléphone. */
details.message-matin { overflow-wrap: anywhere; }
details.message-matin > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 600; }
details.message-matin > summary::-webkit-details-marker { display: none; }
details.message-matin > summary::before { content: "›"; color: var(--bronze-2); font-weight: 700; font-size: 1.1rem; line-height: 1; transition: transform .15s; }
details.message-matin[open] > summary::before { transform: rotate(90deg); }
details.message-matin .texte-message { white-space: pre-line; margin: .25rem 0 .75rem; }

/* « Faire le BC » (go de PL du 30 octobre 2026 ; _faire_bc.html) : sous la soumission retenue, dans la grille et dans le centre des
   soumissions ; « Libérer… » d'une soumission qui a son BC, un pli qui avertit avant « Libérer quand même ». 44 px au téléphone. */
a.bouton.faire-bc { min-height: 44px; }
/* sur une ligne, comme « Libérer » au-dessus (PL, 6 novembre 2026) : si la colonne est trop étroite, la grille passe en fiches (app.js, tenir) */
table.grille-soumissions tr.retenir td a.faire-bc { display: flex; margin-top: .4rem; white-space: nowrap; padding-left: .8rem; padding-right: .8rem; }
.soumissions-liste .actions a.faire-bc { flex: 0 1 auto; }
/* plusieurs BC d'une soumission (des livraisons, petit défaut connu du 11 novembre 2026) : « Voir ses BC : », puis un bouton par numéro,
   empilés à la même largeur (la colonne prend la largeur du plus large) ; au téléphone, sur toute la largeur */
.voir-les-bc { display: grid; grid-template-columns: minmax(0, max-content); gap: .4rem; min-width: 0; }
.voir-les-bc > .note { margin: 0; }
.voir-les-bc > a.faire-bc { justify-content: center; white-space: nowrap; }
.soumissions-liste .actions .voir-les-bc { flex-basis: 100%; }
table.grille-soumissions tr.retenir td .voir-les-bc { margin-top: .4rem; }
table.grille-soumissions tr.retenir td .voir-les-bc > a.faire-bc { margin-top: 0; }
details.liberer-avec-bc > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--bronze-2); }
details.liberer-avec-bc .avis-liberer { margin: 0 0 .5rem; font-size: .86rem; white-space: normal; overflow-wrap: anywhere; }
details.liberer-avec-bc form { margin: 0; }
.soumissions-liste .actions details.liberer-avec-bc { flex-basis: 100%; }
/* « Retirer… » d'une soumission qui a son BC (la garde du tri, 2 novembre 2026 ; _revise.html) : le même pli que « Libérer… » */
details.retirer-avec-bc > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--bronze-2); }
details.retirer-avec-bc .avis-retirer { margin: 0 0 .5rem; font-size: .86rem; white-space: normal; overflow-wrap: anywhere; }
details.retirer-avec-bc form { margin: 0; }
.soumissions-liste .actions details.retirer-avec-bc { flex-basis: 100%; }
@media (max-width: 44rem) {
  .soumissions-liste .actions a.faire-bc, table.grille-soumissions.fiches tr.retenir td a.faire-bc { width: 100%; }
  /* dans la fiche de la grille : sous le bouton, dans la colonne des valeurs (pas sous le nom du fournisseur) */
  table.grille-soumissions.fiches tr.retenir td > a.faire-bc, table.grille-soumissions.fiches tr.retenir td > details,
  table.grille-soumissions.fiches tr.retenir td > .voir-les-bc { grid-column: 2; }
  .voir-les-bc { grid-template-columns: minmax(0, 1fr); }
  .soumissions-liste .actions details.liberer-avec-bc button, table.grille-soumissions.fiches tr.retenir td details button { width: 100%; }
  .soumissions-liste .actions details.retirer-avec-bc button { width: 100%; min-height: 44px; }
}
/* ---------- La carte d'une soumission refaite (choix de PL du 18 novembre 2026 ; _revise.html, _soumission_fichiers.html) ----------
   L'en-tête (le fournisseur, le prix) et sa note ; la ligne du PDF : son nom, le lien qui l'ouvre, et UN pli « Changer de PDF… »
   (« Ajouter le PDF… » sans PDF) ; puis UNE rangée de gestes : un seul bouton noir (« Retenir », ou « Libérer »), les autres teintés.
   À l'ordinateur, la rangée tient sur une ligne ; au téléphone, tous empilés, pleine largeur, 44 px.
   Le geste secondaire teinté : la variable --fond-geste (le beige des plis ouverts, --papier-2) et la classe .geste-teinte (sur un
   bouton, un lien .bouton ou un repli, son titre), bordure --pierre, texte --encre : plus de blanc sur blanc. Limitée pour l'instant à
   la carte d'une soumission (.soumissions-liste) ; la passe d'apparence l'étendra au reste de l'application. */
:root { --fond-geste: var(--papier-2); }
.soumissions-liste button.geste-teinte, .soumissions-liste a.bouton.geste-teinte, .soumissions-liste .gestes-soumission a.bouton { background: var(--fond-geste); color: var(--encre); border-color: var(--pierre); white-space: nowrap; }
.soumissions-liste button.geste-teinte:hover, .soumissions-liste a.bouton.geste-teinte:hover, .soumissions-liste .gestes-soumission a.bouton:hover { background: var(--fond-geste); color: var(--encre); border-color: var(--encre); }
.soumissions-liste details.geste-teinte > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem 1.3rem; border: 1.5px solid var(--pierre); border-radius: 999px; background: var(--fond-geste); color: var(--encre); font-size: .92rem; font-weight: 600; box-sizing: border-box; white-space: nowrap; }
.soumissions-liste details.geste-teinte > summary::-webkit-details-marker { display: none; }
.soumissions-liste details.geste-teinte > summary:hover, .soumissions-liste details.geste-teinte[open] > summary { border-color: var(--encre); }
/* la rangée des gestes : un repli fermé prend sa largeur (« Libérer… », « Retirer… » ne prennent plus toute la ligne) ; ouvert, il
   passe sous les autres, sur toute la largeur, dans un cadre */
.soumissions-liste .actions.gestes-soumission { align-items: flex-start; margin-top: .75rem; }
.soumissions-liste .actions.gestes-soumission > form, .soumissions-liste .actions.gestes-soumission > a.bouton { flex: 0 0 auto; }
.soumissions-liste .actions.gestes-soumission > details { flex: 0 0 auto; max-width: 100%; min-width: 0; }
.soumissions-liste .actions.gestes-soumission > details[open] { flex: 1 1 100%; padding: .6rem .75rem .75rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); }
.soumissions-liste .actions.gestes-soumission > details[open] > summary { margin-bottom: .5rem; }
.soumissions-liste .actions.gestes-soumission > .note.pas-de-bc { align-self: center; margin: 0; }
/* à l'ordinateur, la rangée tient sur une ligne : un peu moins de côté dans ses boutons (pas en hauteur : 44 px), et la carte un peu
   plus large qu'avant (52rem : « Libérer… », « Voir le BC C-9449-2026-04-001 », « Modifier… », « Nouvelle version reçue… »,
   « Retirer… » passaient sur deux lignes, puis tous empilés) */
.soumissions-liste { max-width: 56rem; }
.soumissions-liste .actions.gestes-soumission > form > button, .soumissions-liste .actions.gestes-soumission > a.bouton,
.soumissions-liste .actions.gestes-soumission > details > summary { padding-left: 1rem; padding-right: 1rem; }
.soumissions-liste form.prix-arrive { margin-top: .75rem; }
/* la ligne du PDF : son nom est le lien qui l'ouvre (nouvel onglet) ; le pli sur sa propre ligne, dessous (sans PDF : à côté de
   « Pas de PDF » quand il y a la place) */
.soumissions-liste .pdf-de-soumission { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .6rem; margin-top: .5rem; min-width: 0; }
.pdf-de-soumission .nom-pdf { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; min-width: 0; font-weight: 600; color: var(--encre); text-decoration: none; overflow-wrap: anywhere; }
.pdf-de-soumission .nom-pdf > span { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--bronze); }
.pdf-de-soumission .nom-pdf:hover > span { color: var(--bronze-2); }
.pdf-de-soumission .icone-pdf { flex: none; color: var(--bronze-2); }
.pdf-de-soumission .taille-pdf, .pdf-de-soumission .pas-de-pdf { font-size: .85rem; color: var(--doux); }
.soumissions-liste .pdf-de-soumission > details { flex: 1 1 100%; max-width: 100%; min-width: 0; }
.soumissions-liste .pdf-de-soumission.sans-pdf > details:not([open]) { flex: 0 0 auto; }
.soumissions-liste .pdf-de-soumission > details[open] { padding: .6rem .75rem .75rem; border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); }
details.changer-pdf .choix-pdf { margin: .75rem 0 0; }
details.changer-pdf .choix-pdf + .choix-pdf, details.changer-pdf .choix-pdf.depingler { border-top: 1px solid var(--papier-2); padding-top: .75rem; }
details.changer-pdf .titre-choix { margin: 0 0 .4rem; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
details.changer-pdf .choix-pdf > a.bouton { min-height: 44px; }
details.changer-pdf .choix-pdf form { margin: 0; }
@media (max-width: 44rem) {
  /* (la même force que les règles de l'ordinateur plus haut, qui donnent « flex: 0 0 auto » : sinon, un pli ouvert dans la rangée,
     app.js ne l'empile pas, et les boutons gardaient leur largeur) */
  .soumissions-liste .actions.gestes-soumission > *, .soumissions-liste .actions.gestes-soumission > form,
  .soumissions-liste .actions.gestes-soumission > a.bouton, .soumissions-liste .actions.gestes-soumission > details { flex: 1 1 100%; }
  .soumissions-liste .actions.gestes-soumission > form > button, .soumissions-liste .actions.gestes-soumission > a.bouton,
  .soumissions-liste .actions.gestes-soumission > details > summary { display: flex; justify-content: center; width: 100%; }
  .soumissions-liste .pdf-de-soumission > details, .soumissions-liste .pdf-de-soumission.sans-pdf > details:not([open]) { flex: 1 1 100%; }
  .soumissions-liste .pdf-de-soumission > details > summary { display: flex; width: 100%; }
  details.changer-pdf .choix-pdf > a.bouton, details.changer-pdf .choix-pdf form > button { display: flex; justify-content: center; width: 100%; }
  .soumissions-liste .pdf-de-soumission > a.fichiers-lecture { flex: 1 1 100%; }
}
/* « Couper les liens des autres fournisseurs de ce code » (les plans par lien, PL, 2 novembre 2026 ; _couper_liens.html) : sous la
   liste des soumissions, un pli qui dit ce qui sera coupé avant le bouton. 44 px au téléphone, le texte se coupe. */
.couper-liens { margin: .75rem 0 0; }
.couper-liens p { white-space: normal; overflow-wrap: anywhere; }
details.couper-liens-pli > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--bronze-2); }
details.couper-liens-pli form { margin: 0; }
details.couper-liens-pli button { min-height: 44px; }
@media (max-width: 44rem) {
  details.couper-liens-pli button { width: 100%; }
}

/* La semaine normale d'un compte (le temps de bureau dans Heures, 30 octobre 2026) : sur la page du compte et sur la fiche d'employé
   rattachée (_semaine_normale.html). Téléphone d'abord : une période par ligne, un champ par ligne, rien ne déborde à 375 px. */
.semaine-normale .periodes-semaine { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.semaine-normale .periodes-semaine li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; padding: 0 0 .5rem; border-bottom: 1px solid var(--papier-2); }
.semaine-normale .periodes-semaine p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
/* relecture du 2 novembre 2026 : tous les paragraphes des deux cartes se coupent (une note sans espace, un lien collé dans le résumé
   d'une année des vacances, faisait 538 px de large à 375 px) */
.semaine-normale p { overflow-wrap: anywhere; }
.semaine-normale .periodes-semaine form { margin: 0; }
.semaine-normale .champs-semaine-normale { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .75rem 1rem; align-items: end; margin: .5rem 0; }
.semaine-normale .champs-semaine-normale input, .semaine-normale .champs-semaine-normale select { width: 100%; max-width: 100%; box-sizing: border-box; }
.semaine-normale .champs-semaine-normale > button { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 44rem) {
  .semaine-normale .champs-semaine-normale > button { justify-self: stretch; }
  .semaine-normale .periodes-semaine form, .semaine-normale .periodes-semaine form > button { flex: 1 1 100%; width: 100%; }
}
/* Une rangée de boutons (.rangee-boutons) : tous de la même grosseur (.bouton-rangee), empilés au téléphone, sur une ligne à
   l'ordinateur, le texte sur une ligne. Venue avec le calendrier projeté (22 novembre 2026) ; gardée au retrait du calendrier
   (25 novembre 2026) pour l'avertissement d'un départ passé de la semaine normale. */
.rangee-boutons { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; margin: 0 0 1rem; }
.rangee-boutons > form { margin: 0; display: grid; min-width: 0; }
.bouton-rangee { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; white-space: nowrap;
  padding-left: .75rem; padding-right: .75rem; }
@media (min-width: 44.01rem) {
  .rangee-boutons { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); max-width: 36rem; }
}
/* Décision de PL du 25 novembre 2026 (« Retirer même passée ») : l'avertissement d'un départ passé, au-dessus de ses deux boutons
   (.rangee-boutons : la même grosseur, empilés au téléphone) ; « Retirer cette période » d'une période passée (un superutilisateur),
   replié sous sa ligne, sur toute la largeur. */
.semaine-normale .avertir-depart p { margin: 0 0 .4rem; }
.semaine-normale .avertir-depart p:last-child { margin: 0; }
.semaine-normale .choix-depart { margin: 0 0 1.25rem; }
.semaine-normale .periodes-semaine details.retirer-passee { flex: 1 1 100%; min-width: 0; }
.semaine-normale .periodes-semaine details.retirer-passee > .note { margin: .25rem 0 0; }

/* le connecteur de l'application : un long mot (une adresse, un message) passe à la ligne au lieu d'élargir la page */
.fiche-connecteur { overflow-wrap: anywhere; }

/* Saisies QuickBooks (décision 10 de PL, 7 novembre 2026) : une fiche par Bill à regarder ; un long numéro, un nom de client ou de
   compte passe à la ligne au lieu d'élargir la page (375 px). Les liens de la liste des correctes : 44 px de haut, comme un bouton. */
.saisie-qbo, .saisies-resume, .saisies-correctes { overflow-wrap: anywhere; }
.saisie-qbo h3 { margin: 0 0 .25rem; }
.saisies-compte { font-size: 1.35rem; font-weight: 600; line-height: 1.25; margin: 0 0 .5rem; }
.saisie-qbo .raisons { margin: .5rem 0 .75rem; }
.saisies-correctes { list-style: none; margin: .5rem 0 0; padding: 0; }
.saisies-correctes li { border-top: 1px solid var(--papier-2); padding: .15rem 0; }
.saisies-correctes a { display: inline-flex; align-items: center; min-height: 44px; }

/* « Remplacer » et « Garder » d'une quantité tapée à la main, avant « Mettre » depuis un plan (plan_mettre_confirmer.html ; PL, 13
   novembre 2026 : « Demander avant d'écraser ») : la même largeur et la même hauteur, côte à côte à l'ordinateur ; l'un sous l'autre,
   sur toute la largeur, au téléphone (.ligne). */
main.plan-mettre form.choix-remplacer { margin: 1.25rem 0 0; align-items: center; }
main.plan-mettre form.choix-remplacer > button { min-width: 9rem; min-height: 44px; }

/* Les codes du Coût Total d'un fournisseur (courriel du chargé de projet, point 4 ; décisions de PL du 13 novembre 2026) : sur sa
   fiche, ses codes avec « Retirer », puis une recherche dans la liste des codes (app.js, data-cherche-liste) ; chaque code trouvé est
   un bouton sur toute la largeur, 44 px de haut. La même recherche sert à ajouter un fournisseur d'un autre code à une demande. */
.defaut-cache { position: absolute; width: 1px; height: 1px; min-width: 0; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.codes-lies, .codes-offerts { list-style: none; margin: 0 0 .75rem; padding: 0; }
.codes-lies li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 44px; padding: .35rem 0; border-top: 1px solid var(--papier-2); }
.codes-lies li:first-child { border-top: 0; }
.codes-lies .code-nom { min-width: 0; overflow-wrap: anywhere; }
.codes-lies form { margin: 0; flex: none; }
.codes-lies button, .codes-offerts button { min-height: 44px; }
.codes-offerts li { margin: .35rem 0; }
.codes-offerts button { display: block; width: 100%; text-align: left; border-radius: var(--rayon); overflow-wrap: anywhere; white-space: normal; }
.ajouter-code label { margin-bottom: .5rem; }
.ajouter-code input[type=search], .autre-fournisseur input[type=search] { width: 100%; min-height: 44px; font-size: 1rem; }

/* ---------- Les lots dans un code (courriel du chargé de projet du 13 novembre 2026, point 3 ; réponses de PL du même soir ;
   maquettes : docs/archives/2026-11/lots-cout-total/maquettes.html) ----------
   La page d'un code divisé : un pli par lot (son nom, son montant, retenu ou au prévu), qui s'ouvre sur ses soumissions et sa grille ;
   les lignes hors lot ; la page « Diviser en lots » / « Les lignes des lots ». Au téléphone d'abord : rien ne déborde, 44 px. */
.lots-code ol.lots { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .6rem; }
.lots-code details.lot { border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); min-width: 0; }
.lots-code details.lot[open] { border-color: var(--bronze); background: #fdfaf3; }
.lots-code details.lot > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .75rem; align-items: center; min-height: 44px; padding: .65rem .9rem; }
.lots-code details.lot > summary::-webkit-details-marker { display: none; }
.lots-code .lot-nom { font-weight: 600; overflow-wrap: anywhere; display: flex; align-items: center; gap: .4rem; min-width: 0; }
.lots-code .lot-nom::before { content: "›"; color: var(--bronze-2); font-weight: 700; transition: transform .15s; display: inline-block; }
.lots-code details.lot[open] > summary .lot-nom::before { transform: rotate(90deg); }
.lots-code .lot-montant { font-weight: 600; white-space: nowrap; text-align: right; }
.lots-code .lot-sous { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; min-width: 0; }
.lots-code .lot-sous .pastille { margin-left: 0; }
.lots-code .lot-sous .note { margin: 0; font-size: .82rem; overflow-wrap: anywhere; }
.lots-code .lot-corps { padding: 0 .9rem .9rem; min-width: 0; }
.lots-code .hors-lot { display: flex; justify-content: space-between; gap: .75rem; padding: .25rem .1rem .75rem; font-size: .92rem; color: var(--encre-2); }
.lots-code .actions-lots { margin: 0 0 .75rem; }
.lots-code .sans-lot h3 { font-size: 1rem; margin: .5rem 0 .25rem; }
.lots-code .soumissions-mini { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.lots-code .soumissions-mini > li { border: 1px solid var(--pierre); border-radius: var(--rayon); padding: .6rem .75rem; background: var(--blanc); }
.lots-code .soumission-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.lots-code .soumission-tete .prix { margin-left: auto; font-weight: 600; white-space: nowrap; }
.pastille.etat-lot.soumission { color: var(--ok-texte); background: var(--ok-fond); }
.pastille.etat-lot.main { color: var(--bronze-2); background: #f3e7d3; }
.note.lot-de-ligne { display: block; font-size: .78rem; margin: .15rem 0 0; }
.ligne-part td { color: var(--encre-2); }
.puces-noms { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .9rem; }
.puces-noms button.puce-nom { min-height: 44px; padding: 0 .9rem; }  /* le texte des autres boutons (règle de PL du 6 novembre 2026) */
.puces-noms button.puce-nom[aria-pressed=true] { background: var(--encre); color: var(--blanc); border-color: var(--encre); }
.page-lots .carte label { margin: 0 0 .75rem; }
.page-lots .carte input:not([type=checkbox]), .page-lots .carte select { width: 100%; min-height: 44px; font-size: 1rem; }
.page-lots .ligne-projection { border-top: 1px solid var(--papier-2); padding: .65rem 0 .2rem; min-width: 0; }
.page-lots .ligne-projection:first-of-type { border-top: 0; padding-top: 0; }
.page-lots .ligne-projection.ecartee .item { text-decoration: line-through; color: var(--doux); }
.page-lots .ligne-projection .haut { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.page-lots .ligne-projection .item { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.page-lots .ligne-projection .montant { font-weight: 600; white-space: nowrap; }
.page-lots .ligne-projection .note { margin: 0 0 .4rem; font-size: .82rem; }
.page-lots details.separer > summary { cursor: pointer; display: flex; align-items: center; min-height: 44px; color: var(--bronze-2); font-weight: 600; font-size: .92rem; }
.page-lots details.separer .ligne > label { flex: 1 1 10rem; }
.page-lots .avant-apres { display: grid; gap: .1rem; margin: 0 0 .75rem; }
.page-lots .avant-apres div, .page-lots .lots-apres li { display: flex; justify-content: space-between; gap: .75rem; padding: .35rem 0; border-bottom: 1px solid var(--papier-2); }
.page-lots .avant-apres strong, .page-lots .lots-apres strong { white-space: nowrap; }
.page-lots .lots-apres { list-style: none; margin: 0 0 .75rem; padding: 0; font-size: .92rem; }
.page-lots .lots-apres li > span { min-width: 0; overflow-wrap: anywhere; }
.page-lots .lots-apres .note { display: block; margin: 0; font-size: .8rem; }
@media (max-width: 44rem) {
  .page-lots .ligne > button, .page-lots .ligne > .bouton, .lots-code .actions-lots > .bouton { width: 100%; }
  .lots-code .lot-corps { padding: 0 .6rem .75rem; }
}
/* Les lots sous leur code, au Coût Total : le même habit que le détail par code d'activité (PL, 20 novembre 2026 : « que les lots
   s'inspirent de ça ») ; la boîte, le titre et le tableau sont ceux de .enfants-mo-bloc et table.enfants-mo (plus haut). Ici, ce qui
   diffère : la colonne Statut se lit à gauche (une pastille et ses notes), le nom du lot est un lien (44 px), la source du Révisé
   sous son montant comme sur la ligne du code. */
table.lots-mo thead th.statut, table.lots-mo td.statut { text-align: left; white-space: normal; }
.lots-du-code a.lot-lien, table.couts .lots-du-code a.lot-lien:hover { display: inline-flex; align-items: center; min-height: 44px; color: var(--encre); font-weight: 600; text-decoration: none; border-bottom: 0; overflow-wrap: anywhere; }
table.lots-mo td.revise .source-revise { white-space: normal; }
table.lots-mo td > .note { margin: 0; }  /* le tiret d'un montant vide : pas les marges d'un paragraphe (une fiche serrée) */
table.lots-mo tr.hors-lot th[scope=row] { font-weight: 400; font-style: italic; }
.lots-bloc .a-donner { margin: .5rem 0 0; }
/* en fiches, le montant d'un lot n'est pas un lien de 44 px comme celui d'un code : sa source ne remonte pas sous lui */
@media (max-width: 44rem) { table.couts.fiches table.lots-mo td.revise .source-revise { margin-top: 0; } }
@media (min-width: 44.01rem) {
  table.couts.en-fiches table.lots-mo.en-fiches td.revise .source-revise { margin-top: 0; }
  /* le grand tableau en fiches (une tablette), le petit tableau des lots resté tableau : sa source à droite, sous son montant */
  table.couts.en-fiches table.lots-mo:not(.en-fiches) td.revise .source-revise { grid-column: auto; text-align: right; max-width: 11rem; margin: .1rem 0 0 auto; }
}
/* ---------- Le Coût Total : rouler et dérouler (choix de PL du 18 novembre 2026) ----------
   Une flèche (button.rouler) devant chaque catégorie et chaque code qui a des sous-lignes (ses lots, son détail par code d'activité),
   « Tout rouler » et « Tout dérouler » au-dessus du tableau. Sans JavaScript, rien ne se roule : ni flèches ni boutons, tout est
   déroulé. Avec (la classe « js », posée dans base.html avant le premier dessin : rien ne clignote), les sous-lignes d'un code sont
   roulées au départ (tr.detail-code sans .deroule) ; app.js déroule ce que la personne avait déroulé et roule les catégories qu'elle
   avait roulées (tbody.roulee : seule sa ligne « Total … » reste, avec ses chiffres). Rouler n'est qu'un affichage. */
.rouler, .rouler-tout { display: none; }
.js .rouler-tout { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .6rem; }
.js .rouler { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; flex: none; width: 1.75rem; height: 1.75rem; min-height: 0; padding: 0; margin: -.2rem .3rem -.2rem 0;
  border: 1px solid var(--pierre); border-radius: var(--rayon); background: var(--blanc); color: var(--bronze-2); font-size: 1.15rem; font-weight: 700; line-height: 1; }
.js .rouler::before { content: "›"; display: block; transition: transform .15s; }
.js .rouler[aria-expanded=true]::before { transform: rotate(90deg); }
.js .rouler:hover { background: var(--papier-2); border-color: var(--bronze-2); color: var(--encre); }
.js table.couts tr.detail-code:not(.deroule) { display: none; }
table.couts > tbody.roulee > tr:not(.total-section) { display: none; }
/* une catégorie déroulée se roule par la flèche de son titre ; celle de sa ligne « Total … » paraît quand elle est roulée (et toujours
   pour une catégorie sans titre : « hors section », « sans code ») */
table.couts > tbody:not(.roulee):not(.sans-titre) > tr.total-section .rouler { display: none; }
@media (min-width: 44.01rem) {
  /* chaque catégorie est son tbody : le trait sous sa ligne « Total … » reste là où il était quand le tableau n'avait qu'un tbody */
  table.couts:not(.en-fiches) > tbody:not(:last-of-type) > tr:last-child > * { border-bottom: 1px solid var(--pierre); }
  /* à l'ordinateur, les codes restent alignés (le Total du bas aussi) : la flèche se loge dans la marge de gauche de la case du code */
  .js table.couts:not(.en-fiches) > tbody > tr > th[scope=row], .js table.couts:not(.en-fiches) > tfoot > tr > th[scope=row] { padding-left: 2.45rem; }
  .js table.couts:not(.en-fiches) > tbody > tr > th[scope=row] > .rouler { margin-left: -2.05rem; }
  table.couts.en-fiches > tbody:not(:last-of-type) > tr:last-child { border-bottom: 1px solid var(--pierre); }
  .js table.couts.en-fiches .rouler { width: 44px; height: 44px; margin: 0 .5rem 0 0; border-radius: 999px; font-size: 1.35rem; }
}
@media (max-width: 44rem) {
  /* au téléphone (des fiches) : la flèche se touche du doigt, 44 px ; les deux boutons du haut, côte à côte, de la même grosseur */
  table.couts.fiches > tbody:not(:last-of-type) > tr:last-child { border-bottom: 1px solid var(--pierre); }
  .js table.couts.fiches .rouler { width: 44px; height: 44px; min-height: 44px; margin: 0 .5rem 0 0; border-radius: 999px; font-size: 1.35rem; }
  .js .rouler-tout > button { flex: 1 1 0; min-width: 0; padding-left: .5rem; padding-right: .5rem; }
}
/* « Les codes et les lots » d'une demande de soumission (maquette 3) : les lots d'un code, en retrait sous lui ; « + Nouveau lot… » à 44 px */
.sous-code { margin: .1rem 0 .4rem 2.15rem; padding: .2rem 0 .2rem .75rem; border-left: 3px solid var(--bronze-clair); min-width: 0; }
.sous-code .choix-liste > li { border-top: 0; }
.sous-code .question { font-size: .8rem; font-weight: 600; color: var(--encre-2); margin: .2rem 0 0; }
.sous-code details.nouveau-lot > summary { cursor: pointer; display: flex; align-items: center; min-height: 44px; color: var(--bronze-2); font-weight: 600; font-size: .92rem; }
.sous-code details.nouveau-lot label { margin: 0 0 .5rem; }
.sous-code details.nouveau-lot input { width: 100%; min-height: 44px; }
/* « Faire des lots à partir des BC » : un lot proposé enlevé reste à l'écran, pâli ; « Enlever ce lot » à 44 px */
.page-lots .lot-propose { border-top: 1px solid var(--papier-2); padding: .65rem 0 .2rem; }
.page-lots .lot-propose:first-of-type { border-top: 0; padding-top: 0; }
.page-lots .lot-propose.enleve > label:first-child, .page-lots .lot-propose.enleve > .note { opacity: .55; }
.page-lots label.coche.enlever-lot { display: flex; align-items: center; gap: .6rem; min-height: 44px; font-size: .9rem; font-weight: 400; color: var(--encre); }
.page-lots .changements-bc ul { margin: .35rem 0 0; padding-left: 1.1rem; }
/* « Diviser en lots » refaite (point 14 du lot 3, PL, 25-26 novembre 2026 ; lots_lignes.html, static/lots.js) : une page du bureau,
   l'ordinateur d'abord. À l'ordinateur : les noms sur toute la largeur, en colonnes ; la projection et ce que le code a déjà côte à
   côte ; le révisé avant / après dessous, ses deux boutons sur une ligne. Au téléphone (44rem et moins) : une colonne, chaque chose
   que le code a déjà en fiche (son nom et son prix, puis son lot sur toute la largeur), les boutons empilés (app.js). */
.erreur-texte { color: var(--erreur-texte); font-size: .88rem; font-weight: 600; margin: .35rem 0 0; overflow-wrap: anywhere; }
.page-lots .diviser-lots { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.5rem; align-items: start; }
.page-lots .diviser-lots > .carte { min-width: 0; }
.page-lots .noms-lots { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0 1rem; }
.page-lots h2.h2-montant { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.page-lots h2.h2-montant strong { font-size: 1.05rem; letter-spacing: 0; text-transform: none; color: var(--encre); white-space: nowrap; font-variant-numeric: tabular-nums; }
.page-lots .parts { display: grid; margin: 0 0 .25rem; }
.page-lots .part { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 56px; padding: .35rem 0; border-bottom: 1px solid var(--papier-2); min-width: 0; }
.page-lots .part:last-child { border-bottom: 0; }
.page-lots .part-nom { min-width: 0; overflow-wrap: anywhere; }
.page-lots .carte .part-nom label { display: block; margin: 0; font-size: 1rem; font-weight: 600; color: var(--encre); }
.page-lots .sous { display: block; font-size: .78rem; font-weight: 400; color: var(--doux); }
.page-lots .part-reste { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 1.1rem; }
.page-lots .part-champ { display: flex; align-items: center; gap: .35rem; flex: none; }
.page-lots .carte .part-champ input { width: 8.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.page-lots .part-champ .dollar { color: var(--encre-2); font-weight: 500; }
/* ce que le code a déjà : un tableau à l'ordinateur (quoi · prix · lot), des fiches au téléphone */
.page-lots .deja { display: grid; }
.page-lots .deja-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(9rem, 13rem); gap: .25rem 1rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--papier-2); min-width: 0; }
.page-lots .deja-ligne:last-child { border-bottom: 0; }
.page-lots .deja-quoi { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; }
.page-lots .deja-quoi .nom { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.page-lots .deja-quoi .note { flex-basis: 100%; margin: 0; font-size: .82rem; overflow-wrap: anywhere; }
.page-lots .deja-quoi .pastille { margin-left: 0; }
.page-lots .deja-ligne .prix { font-weight: 600; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.page-lots .carte label.deja-lot { margin: 0; }
.page-lots .deja-lot.suit { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; min-height: 44px; margin: 0; font-size: .92rem; }
.page-lots .deja-lot.suit .pastille { margin-left: 0; }
.page-lots .diviser-revise .avant-apres > div.change strong { color: var(--bronze-2); }
.page-lots .diviser-revise .ligne { margin-top: .5rem; }
/* « Le révisé change. » sous l'avant / après (relecture du 26 novembre 2026), sans laisser un grand vide sous lui */
.page-lots .diviser-revise > .avis { margin: .75rem 0 0; }
@media (min-width: 64rem) {
  .page-lots .diviser-lots { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .page-lots .diviser-lots > .diviser-noms, .page-lots .diviser-lots > .diviser-revise, .page-lots .diviser-lots > .pleine { grid-column: 1 / -1; }
  .page-lots .diviser-revise { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 2rem; align-items: end; }
  .page-lots .diviser-revise > h2, .page-lots .diviser-revise > .lots-apres, .page-lots .diviser-revise > p { grid-column: 1 / -1; }
  .page-lots .diviser-revise > .avant-apres { margin: 0; max-width: 40rem; column-gap: 2.5rem; }
  .page-lots .diviser-revise > .ligne { grid-row: 2; grid-column: 2; margin: 0; }
  .page-lots .diviser-revise > .lots-apres { max-width: 40rem; margin: .5rem 0 0; }
  /* un code de plusieurs lignes, sur toute la largeur : chaque ligne en rangée (l'item et son montant, puis son lot à droite) */
  .page-lots .diviser-lignes.pleine .ligne-projection { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 0 2rem; align-items: start; }
  .page-lots .diviser-lignes.pleine .ligne-projection > .haut, .page-lots .diviser-lignes.pleine .ligne-projection > .note { grid-column: 1; }
  .page-lots .diviser-lignes.pleine .ligne-projection > label { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .page-lots .diviser-lignes.pleine .ligne-projection > details { grid-column: 1 / -1; }
}
@media (max-width: 44rem) {
  .page-lots .deja-ligne { grid-template-columns: minmax(0, 1fr) auto; }
  .page-lots .deja-ligne > .deja-lot { grid-column: 1 / -1; }
  .page-lots .carte .part-champ input { width: 7.5rem; }
}
/* Un lot sans part de la projection, sur la page du code (point 14 du lot 3 ; _lots.html, lot_tete) : « aucune part » en rouge, et
   le lien court « Séparer un montant » (PL, 26 novembre 2026 : « Retenir d'un clic, sans question »), 44 px de haut. */
.lots-code .lot-sous .note.vide-part { color: var(--erreur-texte); }
.lots-code .lot-sous a.lien-part { display: inline-flex; align-items: center; min-height: 44px; font-size: .82rem; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- La colonne Statut du Coût Total (courriel du chargé de projet du 13 novembre 2026, point 5 ; décisions de PL des 13 et 14
   novembre 2026 ; maquettes 5 et 6 de docs/archives/2026-11/lots-cout-total/maquettes.html ; estimation/statuts.py) ----------
   Une couleur par statut, comme dans Monday, TOUJOURS avec le mot (jamais la couleur seule) ; le texte garde un contraste d'au moins
   4,5 pour 1 sur sa couleur. La pastille qu'on touche pour choisir un statut à la main : un lien de 44 px de haut, sans habit de bouton. */
.puce-statut { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; line-height: 1.2; padding: .3rem .7rem;
  border-radius: 999px; white-space: normal; text-align: left; max-width: 100%; overflow-wrap: anywhere; letter-spacing: 0; }
.puce-statut .fleche { font-size: .75em; opacity: .85; }
.puce-statut.s-envoyer { background: #d3cfc8; color: #15171a; }
.puce-statut.s-attente { background: #2f6fd6; color: #ffffff; }
.puce-statut.s-sans-reponse { background: #c8323f; color: #ffffff; }
.puce-statut.s-verifier { background: #f2a33a; color: #15171a; }
.puce-statut.s-retenir { background: #8a4fc7; color: #ffffff; }
.puce-statut.s-retenue { background: #b5d96a; color: #15171a; }
.puce-statut.s-bc-envoye { background: #13804a; color: #ffffff; }
.puce-statut.s-bc-accepte { background: #0b5e37; color: #ffffff; }
.puce-statut.s-non-requis { background: #6b6f76; color: #ffffff; }
.puce-statut.s-inclus { background: #8c6a3d; color: #ffffff; }
/* « Sans soumission » (PL, 20 novembre 2026 : un achat direct, le montant prévu reste au budget) : un bleu-sarcelle foncé, loin du bleu
   d'« En attente » et des verts des BC ; le blanc dessus : 5,97 pour 1 (luminance relative de #0e6e78 : 0,126 ; (1 + 0,05) ÷ (0,126 +
   0,05) = 5,97), au-dessus des 4,5 pour 1 demandés */
.puce-statut.s-sans-soumission { background: #0e6e78; color: #ffffff; }
a.statut-bouton { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; color: inherit; text-decoration: none; border: 0; }
a.statut-bouton:hover .puce-statut, a.statut-bouton:focus-visible .puce-statut { box-shadow: 0 0 0 2px var(--encre); }
table.couts td a.statut-bouton, table.couts td a.statut-bouton:hover { border-bottom: 0; color: inherit; }
.pile-statut { display: grid; gap: .1rem; justify-items: start; min-width: 0; }
.note.statut-note { display: block; margin: 0; font-size: .78rem; line-height: 1.3; overflow-wrap: anywhere; max-width: 16rem; }
.note.statut-note.calcule { font-style: italic; }
table.couts td.statut, table.couts thead th.statut { text-align: left; white-space: normal; }
table.couts td.statut { min-width: 9.5rem; }
table.couts tr.avis-statut > td { padding-top: .25rem; }
table.couts tr.avis-statut .avis { margin: 0; }
/* le filtre « Ce qui reste à faire », juste au-dessus du tableau ; actif : l'avis dit combien de codes sont cachés */
.filtre-reste { margin: 0 0 1rem; display: grid; gap: .4rem; }
.filtre-reste form { margin: 0; }
.filtre-reste > p { margin: 0; }
.filtre-reste .filtre-actif { padding: .5rem .75rem; }
/* la page du choix (maquette 6) */
.page-statut dl.statut-fiche dd { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.page-statut dl.statut-fiche dd .note { margin: 0; }
.page-statut fieldset { border: 0; margin: .9rem 0 .5rem; padding: 0; min-width: 0; }
.page-statut legend { padding: 0; font-size: .85rem; font-weight: 600; color: var(--encre-2); margin: 0 0 .25rem; }
.page-statut .choix-statut { list-style: none; margin: 0; padding: 0; }
.page-statut .choix-statut > li { border-top: 1px solid var(--papier-2); }
.page-statut .choix-statut > li:first-child { border-top: 0; }
.page-statut .choix-statut label.coche { margin: 0; padding: .2rem 0; }
.page-statut .choix-statut label.coche input[type=radio] { width: 1.4rem; height: 1.4rem; flex: none; }
.page-statut .choix-texte { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; min-width: 0; overflow-wrap: anywhere; }
/* « Sans soumission » a sa petite note sous la pastille (PL, 20 novembre 2026) : le bouton rond s'aligne sur la pastille, pas sur la note */
.page-statut .choix-statut label.coche.avec-note { align-items: flex-start; padding: .55rem 0; }
.page-statut .choix-statut label.coche.avec-note input[type=radio] { min-height: 0; margin-top: .1rem; }  /* toute la rangée se touche */
.page-statut .choix-texte > .note { flex-basis: 100%; margin: 0; font-size: .85rem; }
.page-statut .choix-statut .ouvert { padding: 0 0 .6rem 2rem; }
.page-statut .choix-statut .ouvert label, .page-statut form.choisir-statut > label { display: block; margin: 0 0 .75rem; }
.page-statut select, .page-statut textarea { width: 100%; min-height: 44px; font-size: 1rem; }
.page-statut textarea { font-family: inherit; }
.page-statut .legende-statuts + .note { margin-top: .9rem; }
.page-statut .avant-apres-statut > p { margin: 0 0 .6rem; }
.legende-statuts { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.legende-statuts > li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: .6rem; align-items: start; font-size: .88rem; color: var(--encre-2); }
.legende-statuts .puce-statut { justify-self: start; }
.groupe-legende { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); margin: .9rem 0 .4rem; }
/* la section Statut de la page d'un code */
.statut-code { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .75rem; margin: 0 0 1rem; }
.statut-code > .titre-statut { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); }
.statut-code .note { margin: 0; }
.lots-code .lot-sous .statut-note { max-width: none; }
@media (max-width: 44rem) {
  .filtre-reste form button { width: 100%; }
  table.couts.fiches td.statut { min-width: 0; }
  .page-statut form.choisir-statut .ligne > button, .page-statut form.choisir-statut .ligne > .bouton { width: 100%; }
  .legende-statuts > li { grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); }
}
@media (min-width: 44.01rem) {
  table.couts.en-fiches > * > tr > td.statut { min-width: 0; }
}

/* La boîte pour Claude (PL, 14 novembre 2026 ; Paramètres, superutilisateurs) : une fiche par message, au téléphone d'abord. Le texte
   garde ses retours à la ligne et coupe un long mot (une adresse) plutôt que de pousser la page de côté ; l'état, la réponse et
   « Enregistrer » l'un sous l'autre, chacun sur toute la largeur de la fiche au téléphone, 44 px au moins. */
main.boite-claude .message-claude { padding: 1rem; min-width: 0; }
main.boite-claude .entete-message { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin: 0 0 .5rem; }
main.boite-claude .entete-message .pastille { margin-left: 0; }
main.boite-claude .entete-message .note { margin: 0; }
main.boite-claude .texte-message { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 .75rem; }
main.boite-claude .formulaire-boite { display: grid; gap: .75rem; margin: .75rem 0 0; }
main.boite-claude .formulaire-boite select, main.boite-claude .formulaire-boite textarea { width: 100%; max-width: 100%; min-height: 44px; box-sizing: border-box; }
main.boite-claude .formulaire-boite textarea { font: inherit; font-size: 1rem; padding: .5rem .65rem; border: 1px solid var(--pierre); border-radius: var(--rayon); resize: vertical; }
main.boite-claude .formulaire-boite button { justify-self: start; min-height: 44px; }
main.boite-claude .fiche dd a { overflow-wrap: anywhere; }
@media (max-width: 44rem) {
  main.boite-claude .formulaire-boite button { justify-self: stretch; }
  main.boite-claude .fiche dd a { display: inline-flex; align-items: center; min-height: 44px; }
}
