/* ==========================================================================
   Check-list du jour J (/jour-j) — une feuille à imprimer (A4, deux pages).
   À l'écran : la même feuille, dans le cadre du site. À l'impression : la feuille seule, noir sur blanc.
   ========================================================================== */
.feuille {
  background: var(--blanc); border: 1px solid var(--bordure); border-radius: var(--rayon-grand); box-shadow: var(--ombre);
  padding: 24px; max-width: 900px; margin: 0 auto 20px; color: var(--noir);
}
.feuille-tete { display: flex; align-items: center; gap: 18px; padding-bottom: 14px; border-bottom: 3px solid var(--noir); margin-bottom: 14px; }
.feuille-tete img { height: 62px; width: auto; flex: none; }
.feuille-titre { margin: 0 0 4px; font-family: var(--police-titre); font-weight: 800; text-transform: uppercase; font-size: 1.7rem; line-height: 1.05; }
.feuille-evenement { margin: 0; font-size: 1.05rem; }
.trait { display: inline-block; min-width: 14em; border-bottom: 1.5px solid var(--noir); height: 1em; vertical-align: baseline; }
.trait.court { min-width: 7em; }
.trait.long { display: block; min-width: 0; width: 100%; height: 1.6em; }

.bloc { margin: 0 0 14px; break-inside: avoid; }
.bloc h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 1.25rem; }
.numero {
  flex: none; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--jaune); color: var(--noir);
  display: inline-grid; place-items: center; font-family: var(--police-titre); font-weight: 800; border: 2px solid var(--noir);
}
.cases, .puces { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cases li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; line-height: 1.35; }
.carre { display: block; width: 1.15em; height: 1.15em; margin-top: .12em; border: 2px solid var(--noir); border-radius: 4px; background: var(--blanc); }
.cases.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.puces li { position: relative; padding-left: 1.1em; line-height: 1.35; }
.puces li::before { content: ''; position: absolute; left: .1em; top: .55em; width: .45em; height: .45em; border-radius: 50%; background: var(--noir); }
.feuille code { font-size: .95em; padding: 0 3px; border-radius: 4px; background: var(--surface-2); }

.roles, .pannes { width: 100%; border-collapse: collapse; margin-top: 8px; }
.roles th, .roles td, .pannes th, .pannes td { border: 1.5px solid var(--noir); padding: 6px 9px; text-align: left; vertical-align: top; line-height: 1.3; }
.roles th { width: 22%; font-weight: 700; background: var(--surface-2); }
.roles td { width: 28%; height: 2.2em; }
.pannes th { width: 30%; font-weight: 700; background: #fff6c2; }
.bloc-alerte .numero { background: var(--noir); color: var(--jaune); }
.notes-libres { margin: 10px 0 0; }

@media (max-width: 640px) {
  .feuille { padding: 16px; }
  .feuille-tete { flex-direction: column; align-items: flex-start; gap: 8px; }
  .trait { min-width: 8em; }
  .cases.deux-colonnes { grid-template-columns: 1fr; }
  .roles th, .roles td { display: block; width: auto; }
  .roles td { height: 2em; }
  .pannes th, .pannes td { display: block; width: auto; }
  .pannes th { border-bottom: 0; }
}

/* ---------- Impression : la feuille seule ---------- */
@page { size: A4; margin: 12mm 13mm; }
@media print {
  html, body { height: auto !important; background: #ffffff !important; }
  /* Le cadre du site (grille de la hauteur de l'écran, contenu qui défile) ne s'imprime pas : page normale. */
  body { display: block !important; overflow: visible !important; }
  body > main { overflow: visible !important; padding: 0 !important; position: static !important; }
  .haut, .nav-bas, .lien-evitement, .toasts, .sans-impression { display: none !important; }
  .feuille { border: 0; box-shadow: none; border-radius: 0; padding: 0; margin: 0; max-width: none; font-size: 11.3pt; }
  .feuille-tete img { height: 15mm; }
  .feuille-titre { font-size: 17pt; }
  .bloc { margin-bottom: 4.2mm; }
  .bloc h2 { font-size: 12.5pt; margin-bottom: 2mm; }
  .cases, .puces { gap: 1.4mm; }
  .numero, .carre, .roles th, .pannes th, .feuille code { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .entree { animation: none !important; }
  a { text-decoration: none; }
}
