/* Omni-Animalia — © 2026 Ferrus Dantioch
   Licence : Creative Commons BY-NC-ND 4.0 (texte complet dans le fichier LICENSE)
   https://creativecommons.org/licenses/by-nc-nd/4.0/ */

/* ============================================================
   IMPRESSION — la mise en page du « Carnet de santé ».
   Ce fichier ne sert QUE pour l'impression (ou l'enregistrement en
   PDF). Il cache toute l'application et ne montre que le carnet,
   en noir sur blanc, avec des tableaux lisibles.
   ============================================================ */

@page {
  size: A4;
  margin: 16mm 14mm;
}

/* On cache tout… */
body > *:not(#carnet) { display: none !important; }

/* …sauf le carnet */
html, body {
  background: #fff !important;
  color: #1a1a1a !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10.5pt;
  line-height: 1.4;
}
#carnet { display: block !important; }

.carnet-entete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12mm;
  padding-bottom: 4mm;
  margin-bottom: 4mm;
  border-bottom: 2px solid #5b3fa0;
}
.carnet-sur-titre {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9pt;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #5b3fa0;
}
.carnet-entete h1 { margin: 1mm 0; font-family: Arial, Helvetica, sans-serif; font-size: 22pt; color: #1a1a1a; }
.carnet-entete p { margin: 0; color: #444; }
.carnet-photo {
  width: 32mm;
  height: 32mm;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #999;
}

.carnet-section { margin-top: 6mm; }
.carnet-section h2 {
  margin: 0 0 2mm;
  padding-bottom: 1mm;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13pt;
  color: #5b3fa0;
  border-bottom: 1px solid #ccc;
  break-after: avoid;
  page-break-after: avoid;
}
.carnet-identite { columns: 2; column-gap: 8mm; }
.carnet-identite .ligne { margin: 0 0 1.5mm; break-inside: avoid; }
.ligne-libelle { color: #555; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5pt;
}
th, td {
  padding: 1.5mm 2mm;
  border: 1px solid #bbb;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
th { background: #efeaf8; font-family: Arial, Helvetica, sans-serif; font-weight: 700; }
thead { display: table-header-group; }      /* l'en-tête se répète à chaque page */
tr { break-inside: avoid; page-break-inside: avoid; }
.vide { color: #666; font-style: italic; margin: 0; }

.carnet-pied {
  margin-top: 8mm;
  padding-top: 2mm;
  border-top: 1px solid #ccc;
  font-size: 8.5pt;
  color: #555;
}


/* ---------- La fiche de garde sur papier ---------- */
.fiche-garde { font-size: 11pt; }
.fiche-garde .etiquette {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9pt;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #5b3fa0;
}
.garde-entete {
  display: flex;
  align-items: center;
  gap: 8mm;
  padding-bottom: 4mm;
  border-bottom: 2px solid #5b3fa0;
}
.garde-photo { width: 30mm; height: 30mm; object-fit: cover; border-radius: 50%; border: 1px solid #999; }
.garde-nom { margin: 1mm 0; font-family: Arial, Helvetica, sans-serif; font-size: 22pt; font-weight: 700; }
.garde-partie {
  margin-top: 5mm;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}
.garde-partie h2 {
  margin: 0 0 2mm;
  padding-bottom: 1mm;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13pt;
  color: #5b3fa0;
  border-bottom: 1px solid #ccc;
}
.garde-alerte { padding: 2mm 4mm; border: 2px solid #8a4a32; border-radius: 2mm; }
.garde-alerte h2 { color: #8a4a32; border-bottom-color: #8a4a32; }
.garde-medicament { margin-bottom: 2mm; }
.garde-partie ul { margin: 0; padding-left: 5mm; }
.texte-libre { white-space: pre-wrap; }
.garde-pied { margin-top: 8mm; padding-top: 2mm; border-top: 1px solid #ccc; font-size: 8.5pt; color: #555; }
