/* Application SIRA : écrans repris des maquettes validées par Jérémy (docs/maquettes/application/commun.css).
   Politique de sécurité de Caddy (default-src 'self') : aucun style en ligne ; le JavaScript change des classes,
   jamais des styles. Polices Source Sans 3 servies par /polices/ (celles des rapports, licence OFL). */
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap;
             src: url(/polices/SourceSans3-Regular.ttf) format("truetype"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap;
             src: url(/polices/SourceSans3-Semibold.ttf) format("truetype"); }
@font-face { font-family: "Source Sans 3"; font-weight: 700; font-display: swap;
             src: url(/polices/SourceSans3-Bold.ttf) format("truetype"); }
@font-face { font-family: "Source Sans 3"; font-weight: 900; font-display: swap;
             src: url(/polices/SourceSans3-Black.ttf) format("truetype"); }

:root { --rouge: #c40000; --noir: #141414; --texte: #1d1d1d; --gris: #8a8a8a; --fond: #efedea; --bord: #e3c2c2;
        /* couleurs des onglets (docs/maquettes/application-onglets/propositions.css) */
        --bleu: #1f5fbf; --bleu-c: #e7effb; --orange: #d26a00; --orange-c: #fdefe0; --vert: #18804a; --vert-c: #e3f4ea;
        --violet: #5a48b5; --violet-c: #ece9fa;
        color-scheme: light; }
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { font-family: "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texte);
       background: #d9d5cf; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overflow: hidden; }
button, textarea, input { font: inherit; color: inherit; }
button, label { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }

/* tout l'écran du téléphone ; sur un écran large, une colonne centrée de 480 px au plus */
.appli { position: relative; height: 100%; height: 100dvh; max-width: 480px; margin: 0 auto; display: flex;
         flex-direction: column; background: var(--fond); box-shadow: 0 0 40px rgba(0, 0, 0, .10); }

/* en-tête SIRA : sous la barre d'état de l'iPhone quand l'application est ouverte depuis l'écran d'accueil */
.entete { position: relative; z-index: 2; flex: none; display: flex; align-items: center; gap: 11px;
          padding: calc(8px + env(safe-area-inset-top)) 14px 11px 16px; background: var(--noir); color: #fff;
          border-bottom: 3px solid var(--rouge); }
.entete > img { flex: none; width: 36px; height: 37px; }
.entete .titre { flex: 1; min-width: 0; line-height: 1.05; }
.entete .titre b { display: block; font-size: 21px; font-weight: 900; letter-spacing: 2px; }
.entete .titre span { display: block; font-size: 11.5px; font-weight: 600; color: #b9b9b9; letter-spacing: .4px;
                      text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.accueil { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #2a2a2a;
           display: grid; place-items: center; font-size: 19px; }
.plus { flex: none; width: 30px; height: 40px; border: 0; border-radius: 10px; background: none; color: #8f8f8f;
        font-size: 21px; font-weight: 700; line-height: 1; }
.accueil:active, .plus:active, .plus[aria-expanded="true"] { background: #3a3a3a; }
.menu { position: absolute; top: calc(100% + 6px); right: 12px; z-index: 5; padding: 6px; background: #fff;
        border-radius: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, .22); }
.menu button { display: block; width: 100%; padding: 11px 14px; border: 0; border-radius: 10px; background: none;
               color: var(--texte); font-size: 15.5px; font-weight: 700; text-align: left; white-space: nowrap; }
.menu button:active { background: #f2efeb; }

/* proposition d'activer les notifications sur un appareil ajouté */
.bandeau { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: #fff;
           border-bottom: 1px solid #dedad4; font-size: 14px; line-height: 1.35; }
.bandeau span { flex: 1; }
.bandeau button { flex: none; padding: 8px 12px; border: 0; border-radius: 10px; background: var(--rouge); color: #fff;
                  font-size: 14px; font-weight: 700; }

/* conversation : les messages en bas, le logo en filigrane au-dessus tant qu'il reste de la place */
.fil { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 10px 8px;
       overflow-y: auto; overscroll-behavior: contain; }
/* sans la barre du bas (mise en route, page du lien) : rien sous la barre d'accueil de l'iPhone */
.appli:not(:has(> .saisie:not([hidden]))) .fil { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
.filigrane { flex: 1 0 auto; display: flex; justify-content: center; padding: 4px 0 10px; pointer-events: none;
             user-select: none; -webkit-user-select: none; }
.filigrane img { width: 118px; height: 118px; opacity: .10; }
.jour { align-self: center; margin-bottom: 2px; padding: 3px 11px; border-radius: 10px; background: rgba(0, 0, 0, .08);
        color: #555; font-size: 12.5px; font-weight: 600; }

.message, .carte { flex: none; display: flex; flex-direction: column; gap: 6px; }
.bulle { align-self: flex-start; max-width: 92%; padding: 10px 13px 6px; border-radius: 18px 18px 18px 6px;
         background: #fff; box-shadow: 0 1px 1.5px rgba(0, 0, 0, .12); font-size: 15.5px; line-height: 1.33;
         overflow-wrap: anywhere; }
.bulle .heure { display: block; margin-top: 2px; text-align: right; font-size: 11px; color: var(--gris); }
.moi .bulle { align-self: flex-end; max-width: 75%; border-radius: 18px 18px 6px 18px; background: var(--rouge);
              color: #fff; }
.moi .bulle .heure { color: #f3c4c4; }
.moi.en-cours .bulle { opacity: .7; }
.moi .piece { display: block; font-weight: 700; }
.para { white-space: pre-line; }
.para.ecart1 { margin-top: .7em; }
.para.ecart2 { margin-top: 1.1em; }
.para.ecart3 { margin-top: 1.5em; }
.para .rubrique { display: block; font-weight: 700; }

/* titre d'étape : le bloc encadré par ━━━━ dans le texte du bot */
.etape { margin: 2px 0 10px; padding: 2px 0 2px 9px; border-left: 4px solid var(--rouge); }
.etape b { display: block; font-size: 16.5px; font-weight: 900; letter-spacing: .3px; line-height: 1.3; }
.etape span { display: block; color: #555; font-size: 14px; white-space: pre-line; }

/* boutons sous la bulle, dans les mêmes lignes que sur Telegram */
.boutons { display: flex; flex-direction: column; gap: 6px; }
.rang { display: grid; grid-template-columns: 1fr; gap: 6px; }
.rang.n2 { grid-template-columns: 1fr 1fr; }
.rang.n3 { grid-template-columns: repeat(3, 1fr); }
.rang.n4 { grid-template-columns: repeat(4, 1fr); }
.rang.nplus { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
.bouton { display: flex; align-items: center; justify-content: center; padding: 10px 8px;
          border: 1.5px solid var(--bord); border-radius: 12px; background: #fff; color: var(--rouge);
          box-shadow: 0 1px 1px rgba(0, 0, 0, .06); font-size: 14.5px; font-weight: 700; line-height: 1.15;
          text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.bouton:active { background: #fbe9e9; }
.bouton.plein { border-color: var(--rouge); background: var(--rouge); color: #fff; }
.bouton.plein:active { background: #a80000; }

/* fichiers du bot : les photos dans le fil, les autres en carte ; sans l'appui long d'iOS, qui proposerait d'ouvrir le
   fichier dans la fenêtre de l'application (« 📤 Partager » de la visionneuse le remplace) */
.fichier { align-self: flex-start; display: flex; align-items: center; gap: 11px; width: 82%; padding: 10px 13px;
           border-radius: 18px 18px 18px 6px; background: #fff; box-shadow: 0 1px 1.5px rgba(0, 0, 0, .12);
           color: inherit; text-decoration: none; -webkit-touch-callout: none; }
.fichier .icone { flex: none; width: 46px; height: 54px; border-radius: 6px; background: var(--rouge); color: #fff;
                  font-size: 12px; font-weight: 900; line-height: 54px; letter-spacing: .5px; text-align: center; }
.fichier .nom { font-size: 14.5px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.fichier .poids { margin-top: 2px; font-size: 12.5px; color: var(--gris); }
.fichier.supprime { cursor: default; }
.fichier.supprime .icone { background: #b9b4ac; }
.fichier.supprime .nom { color: #6b6b6b; }
.image { align-self: flex-start; display: block; max-width: 75%; overflow: hidden; border-radius: 16px 16px 16px 6px;
         background: #fff; box-shadow: 0 1px 1.5px rgba(0, 0, 0, .12); -webkit-touch-callout: none; }
.image img { display: block; max-width: 100%; max-height: 60vh; height: auto; }

/* envoi raté, petite bulle d'information */
.echec { align-self: flex-end; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #8a1010; }
.echec button { padding: 6px 12px; border: 1.5px solid var(--bord); border-radius: 10px; background: #fff;
                color: var(--rouge); font-size: 13.5px; font-weight: 700; }
.avis { flex: none; align-self: center; max-width: 92%; padding: 6px 12px; border: 1px solid var(--bord);
        border-radius: 12px; background: #fff7f7; color: #8a1010; font-size: 13.5px; line-height: 1.3;
        text-align: center; }

/* mise en route : les gestes pour installer SIRA sur l'iPhone */
.gestes { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 6px; list-style: none;
          counter-reset: geste; }
.gestes li { display: flex; align-items: flex-start; gap: 10px; counter-increment: geste; }
.gestes li::before { content: counter(geste); flex: none; display: grid; place-items: center; width: 24px;
                     height: 24px; margin-top: -1px; border-radius: 50%; background: var(--rouge); color: #fff;
                     font-size: 13.5px; font-weight: 900; }
.symbole { display: inline-grid; place-items: center; width: 23px; height: 23px; vertical-align: -5px;
           border-radius: 6px; background: #e9f1fd; color: #0a66d8; }
.symbole svg { width: 15px; height: 17px; }
.mini-icone { width: 23px; height: 23px; vertical-align: -6px; border-radius: 5px; }
.note { margin-top: 8px; color: #555; font-size: 14px; }

/* barre du bas : 📷, 📎, le champ, ➤ */
.saisie { flex: none; display: flex; align-items: flex-end; gap: 8px;
          padding: 8px 10px max(8px, env(safe-area-inset-bottom)); border-top: 1px solid #dedad4; background: #fff; }
.rond { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0;
        border-radius: 50%; background: #f2efeb; font-size: 19px; }
.rond:active { background: #e6e2dc; }
.rond input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.rond.envoyer { background: var(--rouge); color: #fff; font-size: 17px; }
.rond.envoyer:active { background: #a80000; }
.saisie textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 132px; padding: 9px 15px; border: 0;
                   border-radius: 20px; background: #f2efeb; font-size: 16px; line-height: 22px; resize: none;
                   outline: none; overflow-y: auto; }
.saisie textarea::placeholder { color: #9a948b; }
.saisie textarea:focus { box-shadow: inset 0 0 0 1.5px var(--bord); }

/* « 📲 Ajouter un appareil » : QR code et lien */
.voile { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center;
         padding: 16px; background: rgba(20, 20, 20, .55); }
.panneau { width: 100%; max-width: 360px; max-height: 100%; overflow-y: auto; padding: 16px 16px 14px;
           border-radius: 20px; background: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.panneau p { margin: 2px 0 12px; font-size: 15px; line-height: 1.35; }
.qr { display: flex; justify-content: center; margin-bottom: 10px; }
.qr svg { display: block; width: 220px; height: 220px; }
.lien-appareil { padding: 8px 10px; border-radius: 10px; background: #f2efeb; color: #555; font-size: 12.5px;
                 line-height: 1.3; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.panneau .boutons { margin-top: 12px; }

/* visionneuse : un PDF ou une photo du bot, tout l'écran, par-dessus le fil ; « ✕ Fermer » en haut, sous l'encoche */
.visionneuse { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; background: #262626; }
.visionneuse-entete { flex: none; display: flex; align-items: center; gap: 10px;
                      padding: calc(12px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 12px
                               max(14px, env(safe-area-inset-left));
                      background: var(--noir); color: #fff; border-bottom: 3px solid var(--rouge);
                      -webkit-user-select: none; user-select: none; }
.visionneuse-titre { flex: 1; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
                     overflow: hidden; font-size: 14.5px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
/* « 📤 Partager » (ou « ⬇️ Télécharger » sur un ordinateur) : à côté, plus discret que « ✕ Fermer » */
.visionneuse-partager { flex: none; display: flex; align-items: center; min-height: 50px; padding: 0 12px;
                        border: 1.5px solid #5c5c5c; border-radius: 14px; background: #262626; color: #fff;
                        font-size: 15px; font-weight: 700; white-space: nowrap; text-decoration: none;
                        touch-action: manipulation; }
.visionneuse-partager:active { background: #3a3a3a; }
.visionneuse-fermer { flex: none; min-width: 116px; min-height: 50px; padding: 0 16px; border: 0; border-radius: 14px;
                      background: var(--rouge); color: #fff; font-size: 18px; font-weight: 800; white-space: nowrap;
                      touch-action: manipulation; }
.visionneuse-fermer:active { background: #a80000; }
.visionneuse-corps { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
/* pages à la largeur de l'écran (900 px au plus sur un ordinateur), puis 150, 200, 300 % : une classe par zoom ;
   en paysage, rien sous l'encoche à gauche ni à droite */
.visionneuse-contenu { display: flex; flex-direction: column; gap: 10px; width: min(100%, 900px); margin: 0 auto;
                       padding: 10px max(8px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom))
                                max(8px, env(safe-area-inset-left)); }
.visionneuse-contenu.z150 { width: min(150%, 1350px); }
.visionneuse-contenu.z200 { width: min(200%, 1800px); }
.visionneuse-contenu.z300 { width: min(300%, 2700px); }
.visionneuse .page { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
/* la hauteur suit les proportions du canvas (ses attributs width et height) : aucun style posé par le JavaScript */
.visionneuse .page canvas, .visionneuse .photo { display: block; width: 100%; height: auto; }
.visionneuse-message { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
                       justify-content: center; gap: 16px; padding: 24px; color: #f2f2f2; font-size: 17px;
                       font-weight: 600; line-height: 1.35; text-align: center; }
.visionneuse-message .bouton { padding: 12px 20px; }
.visionneuse-outils { flex: none; display: flex; align-items: center; justify-content: center; gap: 22px;
                      padding: 8px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom))
                               max(12px, env(safe-area-inset-left));
                      background: var(--noir); color: #fff; -webkit-user-select: none; user-select: none; }
.visionneuse-outils button { width: 58px; height: 46px; border: 0; border-radius: 12px; background: #333; color: #fff;
                             font-size: 28px; font-weight: 700; line-height: 1; touch-action: manipulation; }
.visionneuse-outils button:active { background: #4a4a4a; }
.visionneuse-outils button:disabled { opacity: .35; }
.visionneuse-outils span { min-width: 96px; font-size: 15.5px; font-weight: 600; text-align: center;
                           font-variant-numeric: tabular-nums; }

/* --- onglets (conception des onglets, point 5 ; maquettes docs/maquettes/application-onglets/) ------------------- */
/* la conversation seulement dans Messages ; les autres pages se montrent par l'attribut hidden (app.js, montrer) */
body[data-onglet]:not([data-onglet="messages"]) :is(.fil, .saisie) { display: none; }
.vue { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.vue > .corps { display: flex; flex-direction: column; gap: 9px; padding: 0 12px 16px; }
.blocs { display: flex; flex-direction: column; gap: 9px; }
.chargement { padding: 28px 4px; color: var(--gris); font-size: 15px; font-weight: 600; text-align: center; }

/* une liste qui n'a pas pu être lue : « Impossible de charger la liste. Réessayez. » et « Réessayer » */
.erreur-liste { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 12px;
                padding: 16px 14px; border: 1px solid var(--bord); border-radius: 15px; background: #fff7f7;
                color: #8a1010; font-size: 15px; font-weight: 600; line-height: 1.3; text-align: center; }
.erreur-liste .bouton { padding: 9px 26px; }

/* barre d'onglets, tout en bas ; la pastille rouge compte ce qui attend la personne */
.onglets { position: relative; z-index: 2; flex: none; display: flex;
           padding: 6px 4px max(6px, env(safe-area-inset-bottom)); border-top: 1px solid #dedad4; background: #fff; }
.onglets button { position: relative; flex: 1; min-width: 0; padding: 0 0 2px; border: 0; background: none;
                  color: #8a847b; font-size: 11px; font-weight: 700; line-height: 1.2; text-align: center;
                  white-space: nowrap; touch-action: manipulation; }
.onglets i { display: block; font-size: 22px; font-style: normal; line-height: 30px; filter: grayscale(1);
             opacity: .65; }
.onglets .actif { color: var(--rouge); }
.onglets .actif i { filter: none; opacity: 1; }
.onglets .actif::before { content: ""; position: absolute; top: -7px; left: 22%; right: 22%; height: 3px;
                          border-radius: 0 0 3px 3px; background: var(--rouge); }
.badge { position: absolute; display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px;
         border-radius: 11px; background: var(--rouge); color: #fff; font-size: 12px; font-weight: 900;
         line-height: 1; }
.onglets .badge { top: -2px; right: calc(50% - 30px); min-width: 19px; height: 19px; border: 2px solid #fff;
                  font-size: 11px; }
/* dans Messages, tout ce qui est montré est vu : sa pastille n'a plus de sens */
body[data-onglet="messages"] .onglets [data-onglet="messages"] :is(.badge, .lecteur) { display: none; }
/* la barre au-dessus de la saisie : la barre d'accueil de l'iPhone est sous la barre d'onglets */
.appli:has(> .onglets:not([hidden])) > .saisie { padding-bottom: 8px; }
/* en écrivant sur un téléphone, la saisie reprend le bas de l'écran, comme avant les onglets */
@media (pointer: coarse) {
  .appli:has(.saisie textarea:focus) > .onglets { display: none; }
  .appli:has(.saisie textarea:focus) > .saisie { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  /* une recherche (Plans, Rapports) : la liste garde la place au-dessus du clavier */
  .appli:has(.chercher input:focus) > .onglets { display: none; }
  /* le mot du compte rendu : la carte garde la place au-dessus du clavier */
  .appli:has(.carte-cr textarea:focus) > .onglets { display: none; }
}

/* Accueil (maquette M1-accueil.png) : le bandeau, « À faire », les tuiles, les dernières nouvelles */
.bonjour { padding: 2px 18px 16px; background: var(--noir); color: #fff; }
.bonjour .salut { font-size: 25px; font-weight: 900; line-height: 1.25; overflow-wrap: anywhere; }
.bonjour .date { color: #b9b9b9; font-size: 13.5px; font-weight: 600; }
/* Tableau de bord (conception 2026-11-26, version B, images B1 et B2) : dans le bandeau noir, deux tuiles (le jour, le
   mois) puis la comparaison avec le mois précédent au même jour ; pour Jérémy et Mélissa, « 📊 Par technicien » en
   carte blanche avant « À faire ». La largeur d'une barre est une classe, « part-0 » à « part-20 » (5 % chacune). */
.tdb { margin-top: 12px; }
.tdb-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tdb-tuile { min-width: 0; padding: 10px 12px 11px; border-radius: 14px; background: #262626; }
.tdb-tuile .quand { color: #a9a9a9; font-size: 11.5px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase;
                    overflow-wrap: anywhere; }
.tdb-tuile .montant { margin-top: 2px; color: #fff; font-size: 28px; font-weight: 900; line-height: 1.05;
                      font-variant-numeric: tabular-nums; white-space: nowrap; }
.tdb-tuile .sous { margin-top: 2px; color: #a9a9a9; font-size: 12.5px; font-weight: 600; }
.tdb-compare { margin-top: 8px; padding: 11px 12px 12px; border-radius: 14px; background: #262626; color: #fff;
               font-size: 14px; font-weight: 700; }
.tdb-compare .titre { color: #a9a9a9; font-size: 11.5px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; }
.tdb-compare .rien { margin-top: 6px; color: #d9d9d9; font-size: 13.5px; }
.tdb-l2 { display: grid; grid-template-columns: 94px 1fr auto 50px; align-items: center; gap: 8px; margin-top: 8px;
          color: #d9d9d9; font-size: 13px; }
.tdb-l2 .nom { overflow-wrap: anywhere; }
.tdb-l2 .m { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tdb-l2 .pc { font-size: 14px; font-weight: 900; text-align: right; font-variant-numeric: tabular-nums;
              white-space: nowrap; }
.tdb-compare .hausse { color: #5fd38d; }
.tdb-compare .baisse { color: #ffa36b; }
.tdb-compare .pareil { color: #d9d9d9; }
.tdb-barre { display: block; height: 10px; border-radius: 5px; background: #3d3d3d; overflow: hidden; }
.tdb-barre i { display: block; width: 0; height: 100%; border-radius: 5px; background: #8f8f8f; }
.tdb-barre.maintenant i { background: #fff; }
.tdb-barre.clair { background: #eee8e1; }
.tdb-barre.clair i { background: var(--rouge); }
.tdb-barre .part-0 { width: 0%; } .tdb-barre .part-1 { width: 5%; } .tdb-barre .part-2 { width: 10%; }
.tdb-barre .part-3 { width: 15%; } .tdb-barre .part-4 { width: 20%; } .tdb-barre .part-5 { width: 25%; }
.tdb-barre .part-6 { width: 30%; } .tdb-barre .part-7 { width: 35%; } .tdb-barre .part-8 { width: 40%; }
.tdb-barre .part-9 { width: 45%; } .tdb-barre .part-10 { width: 50%; } .tdb-barre .part-11 { width: 55%; }
.tdb-barre .part-12 { width: 60%; } .tdb-barre .part-13 { width: 65%; } .tdb-barre .part-14 { width: 70%; }
.tdb-barre .part-15 { width: 75%; } .tdb-barre .part-16 { width: 80%; } .tdb-barre .part-17 { width: 85%; }
.tdb-barre .part-18 { width: 90%; } .tdb-barre .part-19 { width: 95%; } .tdb-barre .part-20 { width: 100%; }
.tdb-lecture { color: #b9b9b9; font-size: 14px; font-weight: 700; }
.tdb-detail { padding: 12px 13px 13px; border-radius: 15px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .10); }
.tdb-detail h3 { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 6px; font-size: 15px;
                 font-weight: 900; }
.tdb-detail h3 span { font-variant-numeric: tabular-nums; }
.tdb-detail .sous-entete { margin: -4px 0 4px; color: var(--gris); font-size: 12.5px; font-weight: 700; }
.tdb-detail .sep { height: 1px; margin: 11px 0 10px; background: #eee8e1; }
/* la colonne des montants a la même largeur sur chaque ligne : les barres finissent toutes au même endroit */
.tdb-ligne { display: grid; grid-template-columns: 22px 66px 1fr 98px; align-items: center; gap: 7px; min-height: 34px;
             font-size: 14.5px; }
.tdb-ligne .med { font-size: 16px; text-align: center; }
.tdb-ligne .nom { font-weight: 700; overflow-wrap: anywhere; }
.tdb-ligne .m { font-weight: 900; line-height: 1.1; text-align: right; font-variant-numeric: tabular-nums;
                white-space: nowrap; }
.tdb-ligne .m small { display: block; color: var(--gris); font-size: 11.5px; font-weight: 700; }
.tdb-ligne .m small.hausse { color: var(--vert); }
.tdb-ligne .m small.baisse { color: var(--orange); }
.tdb-ligne .m small.pareil { color: var(--gris); }
.tdb-ligne.zero { color: #b3aba1; }
.tdb-ligne.zero .nom { font-weight: 600; }
.titre-bloc { display: flex; align-items: center; gap: 6px; margin: 10px 2px -2px; font-size: 15px;
              font-weight: 900; }
.titre-bloc .nb { padding: 1px 7px; border-radius: 10px; background: var(--rouge); color: #fff; font-size: 12px; }
.titre-bloc .tout { margin-left: auto; padding: 4px 0 4px 10px; border: 0; background: none; color: var(--rouge);
                    font-size: 13.5px; font-weight: 700; }

.afaire { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: -2px; }
.afaire .carte { --teinte: var(--rouge); display: flex; flex-direction: column; gap: 8px; padding: 10px 11px;
                 border-top: 4px solid var(--teinte); border-radius: 15px; background: #fff;
                 box-shadow: 0 2px 6px rgba(0, 0, 0, .10); overflow-wrap: anywhere; }
.afaire .carte:only-child { grid-column: 1 / -1; }
.afaire .carte.bleu { --teinte: var(--bleu); }
.afaire .carte.orange { --teinte: var(--orange); }
.afaire .carte.vert { --teinte: var(--vert); }
.afaire .haut { flex: 1; }
.afaire .quoi { color: var(--teinte); font-size: 12px; font-weight: 900; letter-spacing: .5px;
                text-transform: uppercase; }
.afaire .qui { margin-top: 3px; font-size: 15px; font-weight: 700; line-height: 1.15; }
.afaire .num { margin-top: 1px; color: var(--gris); font-size: 12.5px; }
.afaire .action { width: 100%; padding: 6px 8px; border: 0; border-radius: 9px; background: var(--teinte); color: #fff;
                  font-size: 13.5px; font-weight: 700; text-align: center; }
.afaire .action:active { filter: brightness(.85); }
.afaire .carte.rien { padding: 14px 12px; font-size: 15px; font-weight: 700; text-align: center; }

/* Compte rendu de la journée (conception de l'Accueil épuré, point 5.2) : la carte du technicien, blanche comme les
   autres cartes de la page ; la case en 16 px (l'iPhone n'agrandit pas la page quand elle prend la main) */
.carte-cr { display: flex; flex-direction: column; gap: 10px; padding: 12px 13px 13px; border-radius: 16px;
            background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .10); }
.carte-cr .chiffres { font-size: 15px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.carte-cr .chiffres span { white-space: nowrap; }  /* « 💳 2 encaissements » jamais coupé en deux */
.carte-cr textarea { display: block; width: 100%; padding: 10px 13px; border: 0; border-radius: 13px;
                     background: #f2efeb; font-size: 16px; line-height: 22px; resize: none; outline: none; }
.carte-cr textarea::placeholder { color: #9a948b; }
.carte-cr textarea:focus { box-shadow: inset 0 0 0 1.5px var(--bord); }
.envoyer-cr { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px;
              padding: 8px 14px; border: 0; border-radius: 13px; background: var(--rouge); color: #fff;
              font-size: 16px; font-weight: 900; line-height: 1.15; text-align: center;
              box-shadow: 0 3px 8px rgba(196, 0, 0, .22); }
.envoyer-cr:active { background: #a80000; }
.envoyer-cr:disabled { background: #c96a6a; box-shadow: none; }
.etat-cr { font-size: 14.5px; font-weight: 700; line-height: 1.3; text-align: center; }
.etat-cr.envoye { color: var(--vert); }
.etat-cr.attention { color: #a00000; }
/* les comptes rendus reçus (administrateurs) : une ligne par compte rendu ; un appui montre le message entier */
.cr-recu { border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); overflow: hidden; }
.cr-ligne { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0;
            background: none; font-size: 14.5px; line-height: 1.25; text-align: left; }
.cr-ligne:active { background: #f7f5f2; }
.cr-ligne .libelle { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cr-ligne b { font-weight: 700; }
.cr-ligne .quand { color: var(--gris); font-weight: 600; }
/* la flèche : deux bords d'un petit carré tourné, vers la droite ; ouvert, vers le bas */
.cr-ligne .fleche { flex: none; width: 9px; height: 9px; margin: 0 4px 0 2px; border-right: 2px solid #a29b91;
                    border-bottom: 2px solid #a29b91; transform: rotate(-45deg); transition: transform .15s; }
.cr-ligne[aria-expanded="true"] .fleche { transform: translateY(-2px) rotate(45deg); }
.cr-texte { padding: 10px 13px 12px; border-top: 1px solid #efedea; font-size: 14.5px; line-height: 1.4;
            white-space: pre-line; overflow-wrap: anywhere; }
/* « 📲 Application SIRA » des administrateurs : une petite tuile, tout en bas de l'Accueil, un peu à l'écart des
   nouvelles */
.tuile-admin { display: flex; align-items: center; gap: 11px; width: 100%; margin-top: 6px; padding: 9px 13px;
               border: 0; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
               font-size: 14.5px; font-weight: 700; text-align: left; }
.tuile-admin:active { background: #f7f5f2; }
.tuile-admin i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
                 background: #f2efeb; font-size: 17px; font-style: normal; }

.nouvelles { display: flex; flex-direction: column; gap: 9px; }
.lien { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.lien .infos { flex: 1; min-width: 0; }
.lien .client { font-size: 14.5px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.lien .ref { color: var(--gris); font-size: 12.5px; }
.lien .montant { flex: none; font-size: 15px; font-weight: 900; text-align: right; }
.vide { padding: 2px 4px; color: var(--gris); font-size: 13.5px; }

/* texte pour les lecteurs d'écran seulement (pastilles de la barre, étapes du suivi) */
.lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* --- Plans, Rapports, Paiements (maquettes C-plans.png, M2-rapports.png, M3-paiements.png) ----------------------- */
.page-titre { padding: 10px 2px 0; font-size: 26px; font-weight: 900; line-height: 1.2; }
.nouveau { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 52px;
           padding: 8px 14px; border: 0; border-radius: 15px; background: var(--rouge); color: #fff; font-size: 17px;
           font-weight: 900; line-height: 1.15; box-shadow: 0 3px 8px rgba(196, 0, 0, .28); }
.nouveau:active { background: #a80000; }
.chercher { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 13px; border-radius: 13px;
            background: #fff; color: #9a948b; font-size: 15px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); cursor: text; }
.chercher:focus-within { box-shadow: 0 0 0 2px var(--bord); }
/* 16 px : l'iPhone n'agrandit pas la page quand le champ prend la main */
.chercher input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--texte);
                  font-size: 16px; outline: none; -webkit-appearance: none; appearance: none; }
.chercher input::placeholder { color: #9a948b; }
.section, .mois { margin: 4px 2px -3px; color: #6d675f; font-size: 12px; font-weight: 900; letter-spacing: 1.2px;
                  text-transform: uppercase; scroll-margin-top: 12px; }
.voir-plus { align-self: center; padding: 9px 24px; border: 1.5px solid #dcd6ce; border-radius: 20px; background: #fff;
             color: var(--texte); font-size: 14px; font-weight: 700; }
.voir-plus:active { background: #f2efeb; }

/* une commande en cours : établissement, n° BAT, résumé, suivi en 5 étapes, boutons du BAT */
.commande { padding: 12px 13px; border-radius: 16px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .10); }
.commande .haut { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.commande .client { min-width: 0; font-size: 16px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.commande .ref { flex: none; color: var(--gris); font-size: 12.5px; }
.commande .detail { margin-top: 2px; color: #555; font-size: 13.5px; }
.commande .salarie { margin-top: 2px; color: var(--gris); font-size: 12.5px; font-weight: 600; }
.suivi { display: flex; align-items: flex-start; margin: 12px 0 4px; list-style: none; }
.suivi li { position: relative; flex: 1; min-width: 0; color: #a29b91; font-size: 10.5px; font-weight: 700;
            line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.suivi li::before { content: ""; position: absolute; top: 9px; left: -50%; right: 50%; height: 3px;
                    background: #e2ddd6; }
.suivi li:first-child::before { display: none; }
.suivi b { position: relative; z-index: 1; display: block; width: 21px; height: 21px; margin: 0 auto 4px;
           border-radius: 50%; background: #e2ddd6; color: #fff; font-size: 12px; line-height: 21px; }
.suivi .fait { color: var(--vert); }
.suivi .fait b, .suivi .fait::before { background: var(--vert); }
.suivi .ici { color: var(--rouge); }
.suivi .ici b { background: var(--rouge); box-shadow: 0 0 0 4px rgba(196, 0, 0, .18); }
.suivi .ici::before { background: var(--vert); }
.suivi .a-venir { color: #a29b91; }
.alerte { margin-top: 10px; padding: 9px 11px; border: 1px solid var(--bord); border-radius: 11px; background: #fff7f7;
          color: #a00000; font-size: 14px; font-weight: 700; line-height: 1.3; }
.retrait { margin-top: 6px; color: var(--vert); font-size: 13.5px; font-weight: 700; text-align: center; }
.boutons-c { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.boutons-c button { flex: 1 1 0; min-width: 84px; padding: 8px; border: 0; border-radius: 10px; background: #f2efeb;
                    color: var(--texte); font-size: 14px; font-weight: 700; line-height: 1.2; }
.boutons-c button:active { filter: brightness(.92); }
.boutons-c .plein { background: var(--rouge); color: #fff; }
/* une commande terminée : une petite carte */
.petite { display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 14px; background: #fff;
          box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.petite .ok { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
              background: var(--vert-c); color: var(--vert); font-size: 15px; font-weight: 900; }
.petite .infos { flex: 1; min-width: 0; }
.petite .client { font-size: 14.5px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.petite .ref { color: var(--gris); font-size: 12.5px; }
.petite .boutons-c { margin-top: 6px; }
.petite .boutons-c button { flex: 0 1 auto; min-width: 0; padding: 6px 11px; font-size: 13px; }

/* Plans, livraison (conception 2026-11-26, parties 3.1 et 3.2) : six cases en grille 3 × 2, un grand nombre puis
   l'étape (rouge : « BAT reçu », au technicien d'agir ; vert : prêts et livrés ; gris à 0) ; la case choisie en noir,
   comme le filtre choisi des Rapports. Puis la bande « 🚚 À livrer » et, sur la carte, la grande case « Livré ». */
.cases-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
/* une partie vide (cachée, ou filtrée) ne laisse pas d'écart dans la liste */
#plans-blocs > .blocs:empty { display: none; }
.cases-plans button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
                      min-width: 0; min-height: 72px; padding: 8px 8px 7px; border: 1.5px solid transparent;
                      border-radius: 15px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .10);
                      text-align: center; touch-action: manipulation; }
.cases-plans .nombre { color: var(--texte); font-size: 27px; font-weight: 900; line-height: 1.05;
                       font-variant-numeric: tabular-nums; }
.cases-plans .libelle { color: #555; font-size: 13.5px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.cases-plans small { color: var(--gris); font-size: 11.5px; font-weight: 600; line-height: 1.1; }
.cases-plans [data-case="bat_recu"] .nombre { color: var(--rouge); }
.cases-plans [data-case="prets"] .nombre, .cases-plans [data-case="livres"] .nombre { color: var(--vert); }
.cases-plans .zero .nombre { color: #c4bdb3; }
.cases-plans [aria-pressed="false"]:active { background: #f7f5f2; }
.cases-plans [aria-pressed="true"] { border-color: var(--noir); background: var(--noir); box-shadow: none; }
.cases-plans [aria-pressed="true"] :is(.nombre, .libelle, small) { color: #fff; }
.bande-a-livrer { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px;
                  padding: 8px 14px; border: 1.5px solid #b9dfc8; border-radius: 14px; background: var(--vert-c);
                  color: var(--vert); font-size: 16px; font-weight: 900; line-height: 1.15;
                  touch-action: manipulation; }
.bande-a-livrer:active { filter: brightness(.95); }
.bande-a-livrer[aria-pressed="true"] { border-color: var(--vert); background: var(--vert); color: #fff; }
.recuperee { margin-top: 8px; color: var(--vert); font-size: 14px; font-weight: 700; text-align: center; }
.livrer { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 52px;
          margin-top: 10px; padding: 8px 14px; border: 2px solid var(--vert); border-radius: 13px; background: #fff;
          color: var(--vert); font-size: 17px; font-weight: 900; line-height: 1.15; touch-action: manipulation; }
.livrer .case-vide { font-size: 23px; font-weight: 400; line-height: 1; }
.livrer:active { background: var(--vert-c); }
.livrer:disabled { opacity: .55; }
.pas-enregistre { margin-top: 6px; color: #a00000; font-size: 14px; font-weight: 700; line-height: 1.3;
                  text-align: center; }
.petite .pas-enregistre { text-align: left; }

/* Rapports : filtres, carte avec sa vignette (la couverture stylisée), son état, « 👁 Voir » et « 📧 Envoyer » */
.filtres { display: flex; flex-wrap: wrap; gap: 6px; }
.filtres button { padding: 5px 12px; border: 1.5px solid #dcd6ce; border-radius: 20px; background: #fff; color: #555;
                  font-size: 13.5px; font-weight: 700; }
.filtres button.actif { border-color: var(--noir); background: var(--noir); color: #fff; }
.rapport { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 15px; background: #fff;
           box-shadow: 0 1px 3px rgba(0, 0, 0, .10); }
.rapport.a-valider { box-shadow: inset 0 0 0 2px var(--bord), 0 1px 3px rgba(0, 0, 0, .10); }
.vignette { position: relative; flex: none; align-self: flex-start; width: 52px; height: 70px; overflow: hidden;
            border: 1px solid #ddd; border-radius: 5px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.vignette::before { content: ""; position: absolute; inset: 0 0 auto; height: 30px;
                    border-bottom: 2px solid var(--rouge); background: var(--noir); }
.vignette::after { content: ""; position: absolute; left: 16px; top: 7px; width: 19px; height: 20px;
                   background: url(/statique/icones/bouclier.png) center / contain no-repeat; }
.vignette i { position: absolute; left: 7px; right: 7px; height: 3px; border-radius: 2px; background: #ddd; }
.vignette i:nth-child(1) { top: 38px; }
.vignette i:nth-child(2) { top: 45px; right: 16px; }
.vignette i:nth-child(3) { top: 52px; }
.vignette i:nth-child(4) { top: 59px; right: 22px; }
.rapport .infos { flex: 1; min-width: 0; }
.rapport .client { font-size: 15.5px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.rapport .ref { margin-top: 1px; color: var(--gris); font-size: 12.5px; }
.etat-r { display: inline-block; margin-top: 5px; padding: 2px 8px; border-radius: 8px; font-size: 12px;
          font-weight: 700; }
.etat-r.valide { background: var(--vert-c); color: var(--vert); }
.etat-r.envoye { background: var(--bleu-c); color: var(--bleu); }
.etat-r.revoir { background: var(--orange-c); color: var(--orange); }
.etat-r.attente { background: #fff4d6; color: #8a5a00; }
.etat-r.fini { background: #efedea; color: #6d675f; }
.rapport .actions { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.rapport .actions button { padding: 6px 11px; border: 0; border-radius: 9px; background: #f2efeb; color: var(--texte);
                           font-size: 13px; font-weight: 700; text-align: center; white-space: nowrap; }
.rapport .actions button:active { filter: brightness(.92); }
.rapport .actions .voir { background: var(--rouge); color: #fff; }

/* Paiements : les tuiles « Encaisser », les cases « À déposer », les liens de paiement par carte, l'Équipe */
.encaisser { display: flex; gap: 7px; }
.encaisser .tuile { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center;
                    justify-content: center; gap: 5px; min-height: 54px; padding: 9px 8px 8px; border: 0;
                    border-radius: 15px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .10);
                    text-align: center; }
.encaisser .tuile:active { background: #f7f5f2; }
.encaisser .tuile i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
                      background: var(--vert-c); font-size: 20px; font-style: normal; }
.encaisser .tuile b { color: var(--vert); font-size: 13px; font-weight: 700; line-height: 1.1; }
/* « À déposer » (conception 2026-11-26, partie 3.3) : trois cases de la forme des tuiles « Encaisser », en violet
   (déposer, remettre) ; à 0, « Aucun », grisées. Dessous, le total pas encore déposé, les chèques à déposer plus tard
   et « Les vôtres » (un administrateur : ses propres chèques et espèces, avec leur bouton). */
.encaisser.deposer .tuile { justify-content: flex-start; gap: 3px; padding: 10px 8px 9px; }
.encaisser.deposer .tuile i { margin-bottom: 2px; background: var(--violet-c); }
.encaisser.deposer .tuile b { color: var(--violet); font-size: 13.5px; }
.encaisser.deposer .nombre { color: #555; font-size: 13px; font-weight: 600; line-height: 1.15; }
.encaisser.deposer .montant { font-size: 16.5px; font-weight: 900; line-height: 1.2; white-space: nowrap; }
.encaisser.deposer small { color: var(--violet); font-size: 12px; font-weight: 700; line-height: 1.15; }
.encaisser.deposer small span { white-space: nowrap; }
.encaisser.deposer .tuile.zero { background: #f6f4f1; box-shadow: none; }
.encaisser.deposer .tuile.zero i { background: #ebe7e1; filter: grayscale(1); opacity: .55; }
.encaisser.deposer .tuile.zero :is(b, .nombre, small) { color: #a29b91; }
.total-depot { padding: 0 4px; font-size: 15px; font-weight: 700; line-height: 1.3; }
.total-depot b { font-weight: 900; white-space: nowrap; }
.total-depot .dont { color: #6d675f; font-weight: 600; }
.plus-tard { margin-top: -5px; padding: 0 4px; color: #6d675f; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.les-votres { display: flex; flex-direction: column; border-radius: 14px; background: #fff;
              box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.les-votres .votre { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; font-size: 15px;
                     font-weight: 700; line-height: 1.2; }
.les-votres .votre + .votre { border-top: 1px solid #efedea; }
.les-votres .votre span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.les-votres .action { flex: none; padding: 8px 12px; border: 0; border-radius: 10px; background: var(--violet);
                      color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; }
.les-votres .action:active { filter: brightness(.88); }
.lien .droite { flex: none; text-align: right; }
.lien .etat-r { margin-top: 2px; }
.membre { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 14px; background: #fff;
          box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.membre .nom { font-size: 15px; font-weight: 700; }
.membre > .ref { color: #555; font-size: 13px; }
.membre .lien { padding: 7px 0 0; border-top: 1px solid #efedea; border-radius: 0; box-shadow: none; }

/* --- Panneau « Application SIRA » du « ⋯ » (administrateurs, 2026-11-26) : un salarié par ligne, son état, ses boutons */
.equipe { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 10px; }
.equipe-ligne { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 14px; background: #f2efeb; }
.equipe-nom { font-size: 15px; font-weight: 700; }
.equipe-etat { margin-bottom: 4px; color: #555; font-size: 13px; }
.equipe-ligne .bouton { padding: 9px 6px; font-size: 14px; }

/* --- « ➕ Nouveau salarié » sans Telegram et « 🚫 Retirer l'accès » (fiche 2026-11-26, parties 2 et 5) : le bouton en
   haut du panneau, son formulaire (deux champs, [Créer] [Annuler]), les refus du serveur, et « Retirer l'accès »,
   discret, sous les boutons de chaque ligne (une action qui ne se défait pas) */
.panneau .nouveau { min-height: 46px; margin: 2px 0 10px; font-size: 16px; }
.formulaire-salarie { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 10px; padding: 10px 12px 12px;
                      border-radius: 14px; background: #f2efeb; }
.formulaire-salarie label { margin-top: 4px; color: #555; font-size: 13.5px; font-weight: 700; }
.formulaire-salarie .aide { margin-left: 4px; color: var(--gris); font-weight: 600; }
/* 16 px : l'iPhone n'agrandit pas la page quand le champ prend la main */
.formulaire-salarie input { width: 100%; height: 44px; padding: 0 12px; border: 1.5px solid #dcd6ce;
                            border-radius: 11px; background: #fff; color: var(--texte); font-size: 16px; outline: none;
                            -webkit-appearance: none; appearance: none; }
.formulaire-salarie input:focus { border-color: var(--rouge); }
.formulaire-salarie input::placeholder { color: #9a948b; }
.formulaire-salarie .boutons { margin-top: 8px; }
.formulaire-salarie .bouton:disabled, .equipe-ligne button:disabled { opacity: .55; }
.panneau .panneau-erreur { margin: 6px 0 0; padding: 8px 10px; border: 1px solid var(--bord); border-radius: 10px;
                           background: #fff7f7; color: #8a1010; font-size: 14px; font-weight: 600; line-height: 1.3; }
.panneau > .panneau-erreur { margin: 0 0 8px; }
.equipe-retirer { align-self: flex-start; min-height: 34px; margin-top: 2px; padding: 4px 2px; border: 0;
                  background: none; color: #8a1010; font-size: 13.5px; font-weight: 700; }
.equipe-retirer:active { opacity: .6; }

/* --- « ✏️ Modifier un rapport » (fiche 2026-11-26-application-modifier-un-rapport, partie 3.1 ; edition.js) -------
   Sous « ＋ Faire un rapport », un bouton secondaire pleine largeur. Puis, par-dessus les onglets (une colonne de
   480 px au plus, comme l'application) : le choix du rapport et l'éditeur, avec le tableau du PDF, la fiche d'une ligne
   en bas de l'écran et les questions. Les largeurs des colonnes sont des classes (c-numero…), jamais un style. */
.modifier-un-rapport { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%;
                       min-height: 48px; margin-top: -2px; padding: 8px 14px; border: 2px solid var(--rouge);
                       border-radius: 15px; background: #fff; color: var(--rouge); font-size: 16px; font-weight: 900;
                       line-height: 1.15; touch-action: manipulation; }
.modifier-un-rapport:active { background: #fbe9e9; }

.edition { position: fixed; inset: 0; z-index: 15; display: flex; flex-direction: column; max-width: 480px;
           margin: 0 auto; background: var(--fond); box-shadow: 0 0 40px rgba(0, 0, 0, .10); }
.edition-entete { flex: none; display: flex; align-items: center; gap: 10px;
                  padding: calc(12px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 12px
                           max(16px, env(safe-area-inset-left));
                  background: var(--noir); color: #fff; border-bottom: 3px solid var(--rouge); }
.edition-titre { flex: 1; min-width: 0; line-height: 1.2; }
.edition-titre b { display: block; font-size: 18px; font-weight: 900; overflow-wrap: anywhere; }
.edition-titre span { display: block; margin-top: 1px; color: #b9b9b9; font-size: 13.5px; font-weight: 600;
                      overflow-wrap: anywhere; }
.edition-titre span:empty { display: none; }
.edition-fermer { flex: none; min-height: 46px; padding: 0 14px; border: 0; border-radius: 13px; background: var(--rouge);
                  color: #fff; font-size: 16px; font-weight: 800; white-space: nowrap; touch-action: manipulation; }
.edition-fermer:active { background: #a80000; }
.edition-corps { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 9px; padding: 12px 12px 18px;
                 overflow-y: auto; overscroll-behavior: contain; }

/* le choix du rapport : une carte par rapport, la flèche du compte rendu */
.choix-rapport { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px 11px 13px; border: 0;
                 border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); text-align: left;
                 touch-action: manipulation; }
.choix-rapport:active { background: #f7f5f2; }
.choix-rapport .infos { flex: 1; min-width: 0; }
.choix-rapport b { display: block; font-size: 15.5px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.choix-rapport .ref { display: block; margin-top: 2px; color: #6d675f; font-size: 12.5px; }
.choix-rapport .fleche { flex: none; width: 9px; height: 9px; margin-right: 3px; border-right: 2px solid #a29b91;
                         border-bottom: 2px solid #a29b91; transform: rotate(-45deg); }

/* « Extincteurs · 32 » / « BAES · 4 », comme les filtres des Rapports */
.edition-tableaux { flex: none; display: flex; gap: 6px; padding: 10px 12px 0; }
.edition-tableaux button { min-height: 44px; padding: 7px 14px; border: 1.5px solid #dcd6ce; border-radius: 22px;
                           background: #fff; color: #555; font-size: 14.5px; font-weight: 700;
                           touch-action: manipulation; }
.edition-tableaux button.actif { border-color: var(--noir); background: var(--noir); color: #fff; }

/* le tableau du matériel, comme dans le PDF : titres de niveau, une ligne touchée ouvre sa fiche */
.edition-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; overflow: hidden;
                 border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .10); font-size: 13.5px;
                 line-height: 1.25; }
/* les couleurs sur la rangée entière, jamais case par case : pas de fil clair entre deux cases (vu au navigateur) */
.edition-table thead tr { background: #262626; }
.edition-table th { padding: 8px 4px; color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .3px;
                    text-align: left; text-transform: uppercase; }
.edition-table th:first-child, .edition-table td:first-child { padding-left: 9px; }
.edition-table th:last-child, .edition-table td:last-child { padding-right: 9px; }
.edition-table td { padding: 10px 4px; border-top: 1px solid #efedea; vertical-align: top; overflow-wrap: anywhere; }
/* des largeurs en pixels entiers (l'emplacement prend le reste) : en pourcentage, un bord de colonne tombait entre
   deux pixels et laissait un fil clair dans l'en-tête foncé (vu au navigateur) */
.edition-table .c-numero { width: 40px; }
.edition-table .c-capacite { width: 46px; }
.edition-table .c-type { width: 74px; }
.edition-table .c-annee { width: 46px; }
.edition-table .c-etat { width: 44px; text-align: center; }
.edition-table.baes .c-type { width: 112px; }
.edition-table .groupe td { padding: 7px 9px 6px; background: #f2efeb; color: #6d675f; font-size: 11.5px;
                            font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.edition-table tr.ligne { height: 46px; cursor: pointer; }  /* une rangée : 44 px au moins sous le doigt */
/* une ligne changée (ou ajoutée) : fond ambré, et un « • » orange après son numéro */
.edition-table tr.changee { background: #fff6e5; }
.edition-table tr.ligne:active { background: #f7f5f2; }
.edition-table .repere { margin-left: 3px; color: var(--orange); font-weight: 900; }
.edition-table .vide-tableau td { padding: 14px 9px; color: #6d675f; font-size: 14px; text-align: center; }
.ligne-numero { padding: 0; border: 0; background: none; color: var(--texte); font-size: 14px; font-weight: 900;
                text-align: left; overflow-wrap: anywhere; }
.a-remplir { color: #b04a00; font-weight: 700; }
.edition-table .etat-hs { color: #a00000; font-weight: 900; }
.edition-table .etat-n { color: var(--vert); font-weight: 900; }
.edition-ajouter { align-self: flex-start; min-height: 44px; padding: 9px 16px; border: 1.5px dashed #c9c2b8;
                   border-radius: 13px; background: #fff; color: var(--texte); font-size: 15px; font-weight: 700;
                   touch-action: manipulation; }
.edition-ajouter:active { background: #f7f5f2; }
.edition-ajouter:disabled { opacity: .5; }
/* à 1 000 lignes, « + Ajouter » est grisé : la raison, juste dessous */
.edition-limite { color: #6d675f; font-size: 14px; font-weight: 600; line-height: 1.3; }
.edition-message { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 12px;
                   padding: 18px 16px; border: 1px solid var(--bord); border-radius: 15px; background: #fff7f7;
                   color: #8a1010; font-size: 15.5px; font-weight: 600; line-height: 1.35; text-align: center; }
.edition-message .bouton { min-height: 46px; padding: 10px 22px; }

/* après « ✅ Refaire le PDF », sans changer d'onglet : « ⏳ Mise à jour du rapport… », puis « ✅ Rapport … à jour »,
   la liste « ✏️ J'ai changé : … », ce qui allait sous le PDF, « 📧 Déjà envoyé au client… », puis [👁 Voir le rapport]
   et [✏️ Modifier] [✅ Valider] */
.edition-fin { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; padding: 20px 16px 16px;
               border-radius: 16px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .10); }
.edition-fin h2 { font-size: 19px; font-weight: 900; line-height: 1.3; outline: none; overflow-wrap: anywhere; }
.edition-fin-intro { color: #6d675f; font-size: 12.5px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; }
.edition-fin ul { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-left: 20px; font-size: 15.5px;
                  line-height: 1.35; overflow-wrap: anywhere; }
.edition-fin-note { padding: 10px 12px; border-radius: 12px; background: #fff6e5; color: #7a4100; font-size: 14.5px;
                    font-weight: 600; line-height: 1.35; white-space: pre-line; }
.edition-fin-avertissements { display: flex; flex-direction: column; gap: 8px; }
.edition-fin-envoye { padding: 10px 12px; border-radius: 12px; background: var(--bleu-c); color: var(--bleu);
                      font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.edition-fin-boutons { display: flex; flex-direction: column; gap: 8px; }
.edition-fin-boutons .bouton { min-height: 50px; font-size: 16.5px; }
/* « ✏️ Modifier » et « ✅ Valider » côte à côte ; déjà validé, « ✏️ Modifier » prend toute la largeur */
.edition-fin-actions { display: flex; gap: 8px; }
.edition-fin-actions .bouton { flex: 1; min-width: 0; }
.edition-fin-etat { font-size: 14.5px; font-weight: 700; line-height: 1.3; text-align: center; }
.edition-fin-etat.attention { color: #a00000; }

/* en bas, toujours visible : « ✅ Refaire le PDF », grisé tant que rien n'a changé */
.edition-pied { flex: none; display: flex; flex-direction: column; gap: 8px;
                padding: 10px 12px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid #dedad4;
                background: #fff; }
.edition-refaire { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px;
                   padding: 8px 14px; border: 0; border-radius: 15px; background: var(--rouge); color: #fff;
                   font-size: 17px; font-weight: 900; line-height: 1.15; box-shadow: 0 3px 8px rgba(196, 0, 0, .28);
                   touch-action: manipulation; }
.edition-refaire:active { background: #a80000; }
.edition-refaire:disabled { background: #e2ddd6; color: #8a847b; box-shadow: none; }
.edition-etat { font-size: 14.5px; font-weight: 700; line-height: 1.3; text-align: center; }
.edition-etat.attention { color: #a00000; }

/* la fiche d'une ligne, en bas de l'écran ; ✕ ou le voile au-dessus du tableau la ferment en gardant ce qui est
   tapé, comme « Enregistrer » */
.fiche-voile { position: absolute; inset: 0; z-index: 1; background: rgba(20, 20, 20, .45); }
.fiche { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column;
         max-height: 90%; border-radius: 20px 20px 0 0; background: #fff; box-shadow: 0 -8px 28px rgba(0, 0, 0, .25); }
.fiche-entete { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 14px 6px 18px; }
.fiche-entete b { flex: 1; min-width: 0; font-size: 19px; font-weight: 900; line-height: 1.2; outline: none;
                  overflow-wrap: anywhere; }
.fiche-fermer { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0;
                border-radius: 50%; background: #f2efeb; font-size: 17px; font-weight: 700;
                touch-action: manipulation; }
.fiche-corps { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 13px; padding: 6px 18px 12px;
               overflow-y: auto; overscroll-behavior: contain; }
.fiche-champ { display: flex; flex-direction: column; gap: 6px; }
.fiche-champ > span { color: #6d675f; font-size: 12px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; }
/* 16 px : l'iPhone n'agrandit pas la page quand la case prend la main */
.fiche-champ input { width: 100%; min-height: 46px; padding: 10px 13px; border: 0; border-radius: 12px;
                     background: #f2efeb; font-size: 16px; outline: none; -webkit-appearance: none; appearance: none; }
.fiche-champ input::placeholder { color: #6d675f; font-style: italic; }
.fiche-champ input:focus { box-shadow: inset 0 0 0 1.5px var(--bord); }
.fiche-choix { display: flex; flex-wrap: wrap; gap: 6px; }
.fiche-choix button { min-height: 44px; padding: 7px 13px; border: 1.5px solid #dcd6ce; border-radius: 12px;
                      background: #fff; color: var(--texte); font-size: 15px; font-weight: 700; line-height: 1.15;
                      touch-action: manipulation; }
.fiche-choix button:active { background: #f7f5f2; }
.fiche-choix button[aria-pressed="true"] { border-color: var(--noir); background: var(--noir); color: #fff; }
.fiche-choix .autre { color: #6d675f; }
.fiche-erreur { padding: 9px 12px; border-radius: 11px; background: #fff7f7; color: #a00000; font-size: 14.5px;
                font-weight: 700; line-height: 1.3; }
.fiche-pied { flex: none; display: flex; flex-direction: column; gap: 6px;
              padding: 10px 18px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid #efedea; }
.fiche-nav { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 8px; }
.fiche-voisine { min-height: 50px; padding: 6px 10px; border: 1.5px solid #dcd6ce; border-radius: 13px; background: #fff;
                 color: var(--texte); font-size: 16px; font-weight: 800; white-space: nowrap;
                 touch-action: manipulation; }
.fiche-voisine:active { background: #f7f5f2; }
.fiche-voisine:disabled { opacity: .35; }
.fiche-enregistrer { min-height: 50px; padding: 6px 12px; border: 0; border-radius: 13px; background: var(--rouge);
                     color: #fff; font-size: 16.5px; font-weight: 900; touch-action: manipulation; }
.fiche-enregistrer:active { background: #a80000; }
.fiche-retirer { align-self: center; min-height: 44px; padding: 8px 14px; border: 0; background: none; color: #a00000;
                 font-size: 15px; font-weight: 700; touch-action: manipulation; }

/* les questions : reprendre le brouillon, abandonner les changements, retirer une ligne */
.edition-question { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center;
                    justify-content: center; padding: 16px; background: rgba(20, 20, 20, .55); }
.edition-question-boite { width: 100%; max-width: 340px; padding: 18px 16px 14px; border-radius: 18px;
                          background: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.edition-question-boite p { margin-bottom: 14px; font-size: 17px; font-weight: 700; line-height: 1.35; }
.edition-question .bouton { min-height: 48px; padding: 10px 12px; }
