:root {
  /* Couleurs accordées au logo Pool Biomédical International */
  --fond: #f2f5f9;
  --carte: #ffffff;
  --texte: #14233a;
  --doux: #5a6b80;
  --bord: #d7dfea;
  --primaire: #0d4f9e;
  --primaire-clair: #e4eefa;
  --nuit: #0a2350;
  --cyan: #19b3e6;
  --ok: #1d8a4e;
  --ok-clair: #e2f4ea;
  --ano: #c62828;
  --ano-clair: #fdeaea;
  --hs: #c76a00;
  --hs-clair: #fff1dd;
  --nc: #8a98a2;
  --rayon: 12px;
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--texte);
  background: var(--fond);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);
}
[hidden] { display: none !important; }
h2 { font-size: 1.1rem; margin: 22px 0 8px; color: var(--primaire); }
small { color: var(--doux); font-weight: normal; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(120deg, var(--nuit) 0%, #0d3a7a 60%, #0f5aa8 100%); color: #fff;
  border-bottom: 3px solid var(--cyan);
}
.entete-titre { display: flex; align-items: center; gap: 10px; min-width: 0; }
.entete-titre img { flex: none; height: 32px; width: auto; object-fit: contain; }
.entete-titre > div { min-width: 0; }
/* Sur les très petits écrans, le nom passe sur deux lignes plutôt que d'être coupé */
.entete h1 { font-size: .95rem; line-height: 1.2; margin: 0; letter-spacing: .01em; }
.entete p { margin: 0; font-size: .8rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entete-droite { display: flex; align-items: center; gap: 8px; flex: none; }
.btn-guide {
  width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.12); color: #fff; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; padding: 0;
}
.btn-guide:active { background: rgba(255,255,255,.3); }

/* ---------- Guide ---------- */
.guide-tete { margin: 10px 0; }
.guide-intro { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 12px; margin-bottom: 12px; }
.guide-intro img { width: 56px; height: auto; flex: none; }
.guide-intro h2 { margin: 0 0 4px; }
.guide-intro p { margin: 0; font-size: .92rem; }
.guide-rubrique { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); margin-bottom: 8px; overflow: hidden; }
.guide-rubrique summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px; cursor: pointer; font-weight: 600; }
.guide-rubrique summary::-webkit-details-marker { display: none; }
.g-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--primaire-clair); color: var(--primaire); display: flex; align-items: center; justify-content: center; flex: none; }
.g-titre { flex: 1; }
.g-fleche { color: var(--doux); transition: transform .2s; }
.guide-rubrique[open] .g-fleche { transform: rotate(180deg); }
.guide-rubrique[open] summary { border-bottom: 1px solid var(--bord); color: var(--primaire); }
.guide-texte { padding: 4px 14px 12px; font-size: .93rem; }
.guide-texte ol, .guide-texte ul { padding-left: 20px; margin: 8px 0; }
.guide-texte li { margin-bottom: 6px; }
.guide-texte ul.statuts { list-style: none; padding-left: 0; }
.g-puce { display: inline-block; min-width: 92px; text-align: center; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; color: #fff; margin-right: 6px; }
.g-puce.ok { background: var(--ok); } .g-puce.ano { background: var(--ano); } .g-puce.hs { background: var(--hs); }
.astuce { background: var(--primaire-clair); border-left: 4px solid var(--cyan); border-radius: 6px; padding: 8px 10px; margin: 10px 0 0; font-size: .9rem; }
.etat-reseau { font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: rgba(255,255,255,.18); white-space: nowrap; }
.etat-reseau.horsligne { background: #ffb74d; color: #3d2600; }

main { max-width: 760px; margin: 0 auto; padding: 8px 16px 16px; }

/* ---------- Onglets du bas ---------- */
.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; background: #fff; border-top: 1px solid var(--bord);
  padding-bottom: env(safe-area-inset-bottom);
}
.onglets button {
  flex: 1; height: var(--nav-h); border: 0; background: none;
  font: inherit; font-size: .75rem; color: var(--doux);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer;
}
.onglets button { position: relative; }
.onglets button svg { width: 24px; height: 24px; opacity: .75; }
.onglets button.actif { color: var(--primaire); font-weight: 600; }
.onglets button.actif svg { opacity: 1; stroke-width: 2.3; }
.onglets button.actif::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--primaire); }

/* ---------- Icônes ---------- */
.ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.ico.grand { width: 40px; height: 40px; color: var(--ok); margin-bottom: 6px; }
.ligne-ico { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ligne-ico .ico { color: var(--ok); }
.btn.icone { width: 40px; padding: 0; }
/* Pas de cadre noir après un clic ; cadre discret seulement au clavier */
button:focus, .btn:focus { outline: none; }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--primaire); outline-offset: -3px; }

/* ---------- Boutons ---------- */
.btn {
  font: inherit; font-size: .95rem;
  min-height: 44px; padding: 8px 14px;
  border-radius: 10px; border: 1px solid var(--bord);
  background: #fff; color: var(--texte); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn.primaire { background: var(--primaire); border-color: var(--primaire); color: #fff; }
.btn.danger { color: var(--ano); border-color: #f0b8b8; }
.btn.large { width: 100%; font-size: 1.05rem; min-height: 52px; }
.btn.petit { min-height: 36px; padding: 4px 10px; font-size: .85rem; }
.rangee { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.espace { flex: 1; }

/* ---------- Barre de date et progression ---------- */
.barre-date {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 6px;
}
.barre-date input[type=date] {
  flex: 1; min-width: 0; font: inherit; font-size: 1rem; min-height: 44px;
  padding: 6px 10px; border: 1px solid var(--bord); border-radius: 10px; background: #fff;
}
.barre-date .btn { width: 44px; padding: 0; font-size: 1.2rem; }
.date-longue { margin: 0 0 8px; font-weight: 600; }
.bandeau-passe { background: var(--hs-clair); color: #6b3a00; border-radius: 10px; padding: 8px 12px; font-size: .9rem; margin-bottom: 8px; }

.bandeau-valide { background: var(--ok-clair); color: #0f5a32; border-radius: 10px; padding: 8px 12px; font-size: .9rem; margin-bottom: 8px; font-weight: 600; }
.bandeau-valide .ico { margin-right: 4px; }
button:disabled, input:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
.boutons-statut button.on:disabled { opacity: 1; }
.bilan {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 6px;
}
.bilan div { background: #fff; border: 1px solid var(--bord); border-radius: 10px; padding: 6px 4px; text-align: center; }
.bilan b { display: block; font-size: 1.25rem; }
.bilan span { font-size: .72rem; color: var(--doux); }
.bilan .b-ok b { color: var(--ok); }
.bilan .b-ano b { color: var(--ano); }
.bilan .b-hs b { color: var(--hs); }
.bilan .b-nc b { color: var(--nc); }
.barre-prog { height: 6px; background: var(--bord); border-radius: 6px; overflow: hidden; margin-bottom: 4px; }
.barre-prog i { display: block; height: 100%; background: var(--ok); transition: width .3s; }

/* ---------- Filtres ---------- */
.filtres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #e3e9ed; padding: 4px; border-radius: 12px; margin: 12px 0 4px; }
.filtres button { font: inherit; font-size: .88rem; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--doux); cursor: pointer; }
.filtres button span { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: rgba(0,0,0,.07); font-size: .78rem; font-weight: 600; }
.filtres button.on { background: #fff; color: var(--primaire); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.filtres button[data-filtre="probleme"].on span { background: var(--ano-clair); color: var(--ano); }

/* ---------- Catégories repliables ---------- */
.categorie { margin-top: 14px; }
.cat-tete {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 6px 2px; font: inherit; color: var(--primaire); cursor: pointer; text-align: left;
}
.cat-nom { font-weight: 700; font-size: 1.02rem; flex: 1; min-width: 0; }
.cat-prog { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--doux); font-weight: 600; }
.cat-barre { width: 56px; height: 5px; border-radius: 5px; background: var(--bord); overflow: hidden; }
.cat-barre i { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.categorie.complete .cat-compte { color: var(--ok); }
.cat-fleche { color: var(--doux); transition: transform .2s; }
.categorie.fermee .cat-fleche { transform: rotate(-90deg); }
.categorie.fermee .cat-corps { display: none; }
.cat-corps { padding-top: 4px; }

/* ---------- Cartes appareil ---------- */
.carte {
  background: var(--carte); border: 1px solid var(--bord); border-left: 5px solid var(--nc);
  border-radius: var(--rayon); margin-bottom: 8px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 40, 52, .04);
  transition: opacity .35s, transform .35s;
}
.carte.sortie { opacity: 0; transform: translateX(30px); }
.carte.st-ok { border-left-color: var(--ok); }
.carte.st-anomalie { border-left-color: var(--ano); }
.carte.st-hs { border-left-color: var(--hs); }
.carte-tete {
  width: 100%; display: flex; align-items: center; gap: 8px;
  background: none; border: 0; font: inherit; color: inherit; text-align: left;
  padding: 9px 12px 2px; cursor: pointer;
}
.carte-tete .nom { font-weight: 600; font-size: .98rem; }
.carte-tete .empl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .78rem; color: var(--doux); font-weight: normal; margin-top: 1px; }
.carte-tete .info { display: inline-flex; align-items: center; gap: 3px; }
.carte-tete .info .ico { width: 13px; height: 13px; vertical-align: 0; }
.carte-tete .txt { flex: 1; min-width: 0; }
.carte-tete .fleche { color: var(--doux); transition: transform .2s; }
.carte.ouverte .carte-tete .fleche { transform: rotate(180deg); }
.puce { font-size: .75rem; padding: 2px 8px; border-radius: 20px; white-space: nowrap; background: #eef1f3; color: var(--doux); }
.puce.st-ok { background: var(--ok-clair); color: var(--ok); }
.puce.st-anomalie { background: var(--ano-clair); color: var(--ano); }
.puce.st-hs { background: var(--hs-clair); color: var(--hs); }

.boutons-statut { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 6px 10px 10px; }
.boutons-statut button {
  font: inherit; font-size: .86rem; font-weight: 500; min-height: 42px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--bord); background: #fff; color: var(--texte);
  display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 4px; white-space: nowrap;
}
.boutons-statut .b-ok .ico { color: var(--ok); }
.boutons-statut .b-anomalie .ico { color: var(--ano); }
.boutons-statut .b-hs .ico { color: var(--hs); }
.boutons-statut button.on .ico { color: #fff; }
@media (max-width: 360px) { .boutons-statut button .ico { display: none; } }
.boutons-statut .b-ok.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.boutons-statut .b-anomalie.on { background: var(--ano); border-color: var(--ano); color: #fff; }
.boutons-statut .b-hs.on { background: var(--hs); border-color: var(--hs); color: #fff; }

.detail { border-top: 1px dashed var(--bord); padding: 10px 12px 12px; }
.detail h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--doux); margin: 8px 0 6px; }
.aide { background: var(--primaire-clair); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; font-size: .88rem; }
.aide summary { cursor: pointer; font-weight: 600; color: var(--primaire); }
.aide summary .ico { width: 16px; height: 16px; }
.aide p { margin: 8px 0 2px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--ok); }
.mesure { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mesure span { flex: 1; font-size: .92rem; }
.mesure input { width: 120px; }

input[type=text], input[type=email], input:not([type]), input[type=number], input[inputmode], textarea, select {
  font: inherit; font-size: 1rem; padding: 9px 10px; border: 1px solid var(--bord); border-radius: 10px;
  background: #fff; color: var(--texte); width: 100%;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primaire); outline-offset: 0; border-color: var(--primaire); }

.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--bord); cursor: pointer; }
.ajout-photo {
  width: 72px; height: 72px; border-radius: 8px; border: 1.5px dashed var(--bord);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: .72rem; color: var(--doux); cursor: pointer; background: #fafcfd;
}
.ajout-photo .ico { width: 22px; height: 22px; margin-bottom: 2px; }

.bloc { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 12px; margin-bottom: 12px; }
.bloc label, dialog label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
.bloc label input, .bloc label textarea, dialog label input, dialog label textarea { margin-top: 4px; font-weight: normal; }
label.case { display: flex; align-items: center; gap: 10px; }
label.case input { width: 22px; height: 22px; margin: 0; }

/* ---------- Signature ---------- */
.zone-signature {
  position: relative; border: 1.5px dashed var(--bord); border-radius: 10px; background: #fcfdfd;
  height: 170px; touch-action: none;
}
.zone-signature canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.zone-signature .indice { position: absolute; inset: auto 0 10px; text-align: center; color: #b8c3ca; font-size: .85rem; pointer-events: none; }
.signature-faite img { max-width: 100%; height: 120px; object-fit: contain; display: block; background: #fcfdfd; border: 1px solid var(--bord); border-radius: 10px; }

/* ---------- Listes (historique, appareils) ---------- */
.ligne {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 10px 12px; margin-bottom: 8px;
}
.ligne .txt { flex: 1; min-width: 0; }
.ligne .titre { font-weight: 600; }
.ligne .sous { font-size: .82rem; color: var(--doux); }
.ligne.inactif { opacity: .55; }
.puces { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.periodes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.dates-periode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dates-periode input { font: inherit; min-height: 44px; padding: 6px 8px; border: 1px solid var(--bord); border-radius: 10px; width: 100%; background: #fff; }
.feuille .r-separateur { margin: 18px 0 0; padding: 6px 10px; background: var(--primaire); color: #fff; font-weight: 700; border-radius: 4px; }
.feuille .r-jour h2 { margin-top: 14px; }
.feuille .r-jour h3 { font-size: 12px; margin: 8px 0 4px; color: #5d6d78; }
.feuille .r-jour-info { margin: 0 0 6px; color: #444; }
.vide { text-align: center; color: var(--doux); padding: 30px 10px; }

/* ---------- Fenêtres ---------- */
dialog {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto;
  border: 0; border-radius: 16px; padding: 16px; color: var(--texte);
}
dialog::backdrop { background: rgba(10, 30, 40, .5); }
dialog h2 { margin-top: 0; }
.dlg-boutons { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
#dlg-photo img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; background: #000; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: #1c2a33; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .9rem;
  transition: all .25s; max-width: calc(100vw - 32px); text-align: center; z-index: 50;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Rapport ---------- */
.barre-rapport { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.barre-rapport .btn { flex: 1 1 auto; }
.choix-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: -4px 0 12px; border: 1.5px solid var(--primaire); border-radius: 10px; overflow: hidden; }
.choix-mode button { font: inherit; font-size: .9rem; min-height: 44px; border: 0; background: #fff; color: var(--primaire); cursor: pointer; }
.choix-mode button.on { background: var(--primaire); color: #fff; font-weight: 600; }
.feuille .r-app { border: 1px solid #c9d2d8; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; break-inside: avoid; }
.feuille .r-app-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 1px solid #e3e8eb; padding-bottom: 4px; margin-bottom: 4px; }
.feuille .r-etat { white-space: nowrap; }
.feuille .r-sous { font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; color: #5d6d78; margin: 6px 0 2px; font-weight: 700; }
.feuille .r-checks { list-style: none; padding: 0; margin: 0; }
.feuille .r-checks li { padding: 1px 0; }
.feuille .r-valeurs { width: auto; min-width: 60%; }
.feuille .r-valeurs td { padding: 2px 6px; }
.feuille .r-rem { margin: 0; }
.feuille .r-app .r-photos { margin-top: 6px; }
.aide-pdf { font-size: .85rem; color: var(--doux); margin: -6px 0 14px; }

.feuille {
  background: #fff; color: #000; border: 1px solid var(--bord); border-radius: 6px;
  padding: 18px; font-size: 12.5px; line-height: 1.35;
}
.feuille h1 { font-size: 17px; margin: 0 0 2px; color: var(--primaire); }
.feuille h2 { font-size: 13.5px; margin: 16px 0 6px; color: var(--primaire); border-bottom: 1.5px solid var(--primaire); padding-bottom: 2px; }
.feuille .r-entete { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--primaire); padding-bottom: 8px; margin-bottom: 8px; }
.feuille .r-entete p { margin: 1px 0; }
.feuille .r-entete { align-items: flex-start; }
.feuille .r-logo { height: 58px; max-width: 200px; object-fit: contain; object-position: left center; flex: none; }
.feuille .r-titre { flex: 1; min-width: 200px; }
.feuille .r-droite { text-align: right; }
.feuille .r-numero { display: inline-block; border: 1.5px solid var(--primaire); color: var(--primaire); font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-bottom: 4px !important; font-size: 11.5px; }
.logo-zone { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.logo-apercu { max-height: 64px; max-width: 220px; object-fit: contain; border: 1px solid var(--bord); border-radius: 8px; padding: 4px; background: #fff; }
.logo-vide { width: 110px; height: 64px; border: 1.5px dashed var(--bord); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--doux); font-size: .75rem; }
.feuille .r-mission { display: inline-block; background: var(--primaire); color: #fff; font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 4px; margin-bottom: 6px !important; }
.feuille .r-bilan { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.feuille .r-bilan span { border: 1px solid #ccc; border-radius: 4px; padding: 3px 8px; }
.feuille table { width: 100%; border-collapse: collapse; }
.feuille th, .feuille td { border: 1px solid #c9d2d8; padding: 4px 5px; vertical-align: top; text-align: left; }
.feuille th { background: #eef4f6; font-size: 11.5px; }
.feuille tr.cat td { background: #f6f8f9; font-weight: 700; color: var(--primaire); }
.feuille .e-ok { color: var(--ok); font-weight: 700; }
.feuille .e-anomalie { color: var(--ano); font-weight: 700; }
.feuille .e-hs { color: var(--hs); font-weight: 700; }
.feuille .e-nc { color: #777; }
.feuille .manque { color: var(--ano); }
.feuille .r-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.feuille .r-photos figure { margin: 0; break-inside: avoid; }
.feuille .r-photos img { width: 100%; height: 150px; object-fit: cover; border: 1px solid #ccc; }
.feuille .r-photos figcaption { font-size: 10.5px; color: #444; }
.feuille .r-sign { display: flex; justify-content: flex-end; margin-top: 14px; break-inside: avoid; }
.feuille .r-sign div { min-width: 240px; border-top: 1px solid #999; padding-top: 4px; }
.feuille .r-sign img { height: 80px; display: block; }
.feuille .r-pied { margin-top: 14px; font-size: 10px; color: #777; text-align: center; }
.feuille .anomalies li { margin-bottom: 3px; }

@media (max-width: 520px) {
  .feuille { padding: 10px; font-size: 11.5px; }
  .feuille .r-photos { grid-template-columns: repeat(2, 1fr); }
  .feuille .r-droite { text-align: left; width: 100%; }
  .feuille .col-verif { display: none; }
}

/* ---------- Impression / PDF ---------- */
@page { size: A4; margin: 12mm 12mm 16mm; }
@media print {
  body { background: #fff; padding: 0; }
  .no-print, .entete, .onglets, .barre-rapport, .choix-mode, .aide-pdf, .toast, dialog { display: none !important; }
  main { max-width: none; padding: 0; }
  main > section:not(#vue-rapport) { display: none !important; }
  #vue-rapport { display: block !important; }
  .feuille { border: 0; padding: 0; font-size: 10.5pt; }
  .feuille .col-verif { display: table-cell !important; }
  .feuille .r-photos { grid-template-columns: repeat(3, 1fr) !important; }
  .feuille tr, .feuille li { break-inside: avoid; }
  .feuille h2 { break-after: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
