/* « 💬 UN PROBLÈME ? » ET « 💬 PROBLÈMES SIGNALÉS » (chantier signaler, 16/10/2026 ; ecrans/probleme.js ; 11-construction/FUSION-SIGNALER.md).
   Les couleurs : celles de base.css (aucune neuve), clair ET sombre par les jetons ; cibles de 44 px au moins (48 dans NOVA).
   · le bouton : dans l'en-tête, à côté de sa photo (la bulle seule au téléphone ; la bulle et son mot quand l'écran a de la place) ; au
     grand écran (le rail), en bas du rail au-dessus de sa photo (et de la synchro) ; sur la carte de travail, rond, sous le SOS ; sur
     l'écran « à l'ordinateur », une pastille avec son mot, sous l'adresse ;
   · la feuille : l'image de l'écran (assez grande pour la reconnaître), la ligne, « Envoyer » ;
   · « Problèmes signalés » (le Gérant) : une carte par problème, l'image, « ✓ Réglé ». */

/* ---------- le bouton ---------- */
.pb-bouton { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px;
  background: transparent; color: var(--encre); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.app--nova .entete .pb-bouton { width: 48px; height: 48px; }
.pb-bouton:active { background: var(--surface-2); }
.pb-bouton:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pb-bulle { font-size: 22px; line-height: 1; }
.pb-mot { display: none; }
.pb-bouton[aria-busy="true"] { pointer-events: none; }
.pb-bouton[aria-busy="true"] .pb-bulle { animation: pb-attente 0.9s ease-in-out infinite alternate; }
@keyframes pb-attente { from { opacity: 1; } to { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pb-bouton[aria-busy="true"] .pb-bulle { animation: none; opacity: .4; } }
/* l'écran du téléphone sur une tablette ou un ordinateur (700 px et plus, sans le rail) : le mot à côté de la bulle — dans NOVA aussi
   (`.app--nova` : la même force que ses 48 px, plus haut ; sinon le mot sortait du bouton, sous la photo — Faten à l'ordinateur) */
@container app (min-width: 700px) {
  .entete .pb-bouton, .app--nova .entete .pb-bouton { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 0 12px; }
  .entete .pb-mot { display: inline; font-family: var(--f-titre); font-weight: 700; font-size: 16px; white-space: nowrap; }
}
/* au téléphone (moins de 400 px), la synchro ET le 💬 dans l'en-tête de NOVA : la date se retire — le titre garde sa place (« Avancement »
   entier à 360, comme avant le 💬) */
@container app (max-width: 399px) { .app--nova .nv-entete-droite:has(> .entete-synchro):has(> .pb-bouton) > .nv-date { display: none; } }

/* le grand écran : en bas du rail, au-dessus de Moi (la photo, 48 px à 14 px du bas) — et de la synchro quand elle est là (68 px) ;
   le rail garde leur place (rien dessous) */
#app.app--grand:not(.sans-barre) > .entete .pb-bouton {
  position: absolute; z-index: 3; left: calc(env(safe-area-inset-left) + 8px); bottom: calc(68px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: calc(var(--ge-rail) - 16px); height: 54px; padding: 0 2px; border-radius: 14px;
}
#app.app--grand:not(.sans-barre) > .entete .pb-mot { display: block; font-family: var(--f-texte, inherit); font-size: 12.5px; font-weight: 600; line-height: 1.05;
  text-align: center; white-space: normal; color: var(--gris); }
@media (hover: hover) { #app.app--grand:not(.sans-barre) > .entete .pb-bouton:hover { background: var(--surface-2); } }
#app.app--grand:not(.sans-barre):has(> .entete .entete-synchro) > .entete .pb-bouton { bottom: calc(122px + env(safe-area-inset-bottom)); }
#app.app--grand:not(.sans-barre):has(> .entete .pb-bouton) > .barre { padding-bottom: calc(128px + env(safe-area-inset-bottom)); }
#app.app--grand:not(.sans-barre):has(> .entete .pb-bouton):has(> .entete .entete-synchro) > .barre { padding-bottom: calc(182px + env(safe-area-inset-bottom)); }

/* la carte de travail : rond, sous le SOS (la même taille, la même ombre que les boutons de la carte) */
.c5-haut-g > .pb-bouton--carte { width: 48px; height: 48px; border-radius: 999px; border: 2px solid #FFFFFF; background: var(--surface); box-shadow: var(--ombre); }
.c5-haut-g > .pb-bouton--carte .pb-bulle { font-size: 21px; }

/* l'écran « Ton travail se fait à l'ordinateur » : une pastille avec son mot, sous l'adresse */
.pb-bouton--ordinateur { display: inline-flex; align-items: center; gap: 8px; width: auto; height: 48px; margin-top: 22px; padding: 0 18px;
  border: 1.5px solid var(--ligne); border-radius: 999px; background: var(--surface); }
.pb-bouton--ordinateur .pb-mot { display: inline; font-family: var(--f-titre); font-weight: 700; font-size: 17px; }

/* ---------- la feuille ---------- */
.pb-feuille { display: flex; flex-direction: column; gap: 14px; }
.pb-apercu { margin: 0; display: flex; justify-content: center; }
.pb-apercu img { display: block; max-width: 100%; max-height: min(42vh, 360px); width: auto; height: auto; border-radius: 12px; border: 1px solid var(--ligne);
  box-shadow: var(--ombre); background: var(--fond); }
.pb-sans-image { margin: 0; color: var(--gris); font-size: 15px; }
.pb-au-nom-de { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 15px; font-weight: 600; }
.pb-champ input { font-size: 17px; }

/* ---------- « Problèmes signalés » (le Gérant) ---------- */
.pb-liste-ecran { display: flex; flex-direction: column; gap: 12px; }
.pb-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pb-carte { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--ligne); box-shadow: var(--ombre); }
.pb-carte--regle { box-shadow: none; opacity: .85; }
.pb-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pb-tete b { font-size: 17px; min-width: 0; }
.pb-vu { font-weight: 600; font-size: 14px; color: var(--gris); }
.pb-quand { flex: none; font-size: 14px; color: var(--gris); white-space: nowrap; }
.pb-ecran { margin: 0; font-family: var(--f-titre); font-weight: 700; font-size: 15px; letter-spacing: .02em; color: var(--gris); }
.pb-texte { margin: 0; font-size: 17px; line-height: 1.35; }
.pb-texte--rien { color: var(--gris); font-size: 15px; }
.pb-image { display: block; padding: 0; margin: 4px 0 0; border: 1px solid var(--ligne); border-radius: 12px; background: var(--fond); cursor: zoom-in; overflow: hidden; align-self: flex-start; max-width: 100%; }
.pb-image img { display: block; max-width: 100%; max-height: 300px; width: auto; height: auto; }
.pb-details, .pb-telegram { margin: 0; font-size: 14px; color: var(--gris); }
.pb-erreurs { font-size: 14px; }
.pb-erreurs summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.pb-erreurs ul { margin: 4px 0 0; padding-left: 18px; color: var(--gris); overflow-wrap: anywhere; }
.pb-pied { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.pb-regle { font-weight: 700; color: var(--vert); }

/* l'image en grand (le Gérant) */
.pb-grand { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: calc(56px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
  background: rgba(10, 14, 18, .92); cursor: zoom-out; }
.pb-grand img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); background: #FFFFFF; }
.pb-grand-fermer { position: absolute; top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); width: 48px; height: 48px;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #FFFFFF; font-size: 22px; cursor: pointer; }
