/* HABILLAGE VISUEL DE CE RAPPORT — repris du style adopté sur le rapport DRV / UTOPIA (style "B+D" : bandeau anthracite / rouge + police Segoe UI + coins arrondis), appliqué ici à… */

/* POLICE : Segoe UI partout (au lieu du mélange Arial Narrow/Segoe UI d'origine, --font est utilisée par common.css pour tous les champs de saisie, boutons, zone remarques, etc.). */
:root {
  --font: "Segoe UI", Inter, -apple-system, Arial, sans-serif;
}
body {
  font-family: var(--font);
}

/* TITRE D'EN-TÊTE : titre sur 2 lignes ("Annexe paramétrage cascade" / "PAC Air/Eau", et de même "Paramétrage cascade" / "PAC" sur les pages suivantes), même police agrandie et même… */
.page-header-title h1 {
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.2px;
}
/* Le titre sur 2 lignes en 24px prend plus de hauteur que l'original (19px). */
.page {
  padding-top: 5mm;
}
.page-header {
  margin-bottom: 2px;
  padding-bottom: 2px;
}

/* EN-TÊTES DE TABLEAU (<th>) : teinte anthracite au lieu du gris neutre --gray-header, pour un ensemble plus cohérent. */
table thead tr th,
table tr:first-child th,
th {
  background: #5a5f6c !important;
  color: #fff !important;
}

/* SOUS-TITRES DE BLOC : rouge Hitachi plein + texte blanc, au lieu du gris d'origine --gray-header. */
.sub-section-title {
  background: var(--red) !important;
  color: #fff !important;
}

/* CHAMPS DE SAISIE : gris plus foncé pour bien se détacher des cellules de tableau, coins arrondis et halo rouge au focus. */
input[type="text"],
input[type="date"],
input[type="time"],
select {
  background: #d7d9df !important;
  border-radius: 7px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input[type="text"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus {
  background: #fffde7 !important;
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}
/* Les champs texte insérés dans des cellules de tableau restent transparents (ils suivent le fond de la cellule, zébrée ou non). */
td input[type="text"],
td input[type="date"],
td input[type="time"],
th input[type="text"],
th input[type="date"],
th input[type="time"] {
  background: transparent !important;
}
/* "Check-list hydraulique" : les champs texte ("Volume d'eau chauffage", "Volume ballon", "Modèle"/"Pression max"/"Type"/"Volume" du vase d'expansion, "Marque"/"Type" de "Traitement… */
.hydro-table .hydro-field-box {
  background: #d7d9df !important;
}

/* ===== BOUTONS D'ACTION : coins arrondis, cohérents avec le reste. ===== */
.btn {
  border-radius: 8px;
}

/* ZONES DE REMARQUES / SIGNATURE / PHOTO / AVERTISSEMENT : coins arrondis pour rester cohérent. */
.remarks-area,
.signature-pad-wrap,
.switch-cell,
.warning-box {
  border-radius: 8px;
}
/* Fond de la zone "Remarques" aligné sur le gris de zébrage plutôt que --gray-cell (un peu plus foncé). */
.remarks-area {
  background: #eef0f4 !important;
}
/* Titres "Signature intervenant"/"Signature client"/etc. */
.signature-label {
  background: #5a5f6c !important;
}

/* HOMOGÉNÉISATION DES TAILLES/GRAISSES DE POLICE DU CORPS DU RAPPORT (hors en-tête/pied de page, titres, sous-titres et en-têtes de tableau) : plusieurs libellés communs à tous les… */
.coord-label,
.intervenant-row .label,
.bus-row .label,
.cl-label {
  font-weight: 400 !important;
}
td.label-col {
  font-size: 11px !important;
  font-weight: 400 !important;
}

/* ===== PAGE & BLOCS : coins arrondis + ombre douce (style B) ===== */
.page {
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(20, 20, 30, 0.14);
  overflow: hidden;
}
.block,
.completion-block {
  border-radius: 12px;
  border-color: #e2e2e6;
  box-shadow: 0 2px 10px rgba(20, 20, 30, 0.06);
  overflow: hidden;
}

/* ===== LOGO D'EN-TÊTE : "BOSCH" en rouge (même rouge que le reste du rapport) ===== */
.hitachi-logo .logo-text {
  color: var(--red);
}

/* ===== BANDEAU DE SECTION : anthracite + liseré rouge, texte MAJUSCULE conservé (style D) ===== */
.section-title {
  background: #20232b !important;
  position: relative;
  padding-left: 18px !important;
  padding-right: 18px !important;
  text-transform: uppercase;
  /* Voir csnet2-style.css : arrondi propre du bandeau, nécessaire quand il
     est utilisé seul (pages "SUITE REMARQUES" générées à l'impression),
     sans effet indésirable ailleurs (bandeau à hauteur fixe). */
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.section-title::before,
.section-title::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--red);
}
.section-title::before {
  left: 0;
}
.section-title::after {
  right: 0;
}

/* ===== Corrections reprises du rapport PAC ===== */

/* "Limites de fonctionnement" / "Vanne de mélange" (Chauffage / Refroidissement) : ligne en 3 colonnes
   (libellé | champ 1 | champ 2). Grand écran et impression : rendu identique à l'ancienne ligne.
   Petit écran : le titre de chaque colonne passe au-dessus de son champ ; champs alignés verticalement. */
.coord-row.limites-fct-row {
  display: grid;
  grid-template-columns: 170px 1fr 1fr;
  align-items: center;
  column-gap: 8px;
}
.limites-fct-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}
.limites-fct-titre {
  white-space: nowrap;
}
.limites-fct-saisie {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.limites-fct-saisie input {
  width: 60px;
  flex: 0 0 60px;
}
.limites-fct-unite {
  min-width: 22px;
}
@media screen and (max-width: 860px) {
  .coord-row.limites-fct-row {
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 4px;
  }
  .limites-fct-label {
    width: auto !important;
    white-space: normal;
    line-height: 1.2;
  }
  .limites-fct-cell {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    text-align: center;
  }
  .limites-fct-titre {
    white-space: normal;
    line-height: 1.2;
  }
}

/* "Sources chauffage" et "Entrée/sortie & sondes" (.src-table) sur petit écran : chaque ligne garde ses
   2 colonnes, le libellé passe au-dessus du champ (+ unité) ; champs alignés à gauche dans leur
   colonne et calés en bas de ligne pour rester alignés verticalement d'une ligne à l'autre. */
@media screen and (max-width: 860px) {
  .src-table td.hydro-label-col {
    width: 88px;
    padding: 3px 4px;
    font-size: 8.5px;
  }
  .src-table .src-field-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 6px;
    align-items: end;
  }
  .src-table .src-field {
    display: grid;
    grid-template-columns: min-content 1fr;
    align-items: center;
    column-gap: 4px;
    row-gap: 2px;
    min-width: 0;
  }
  .src-table .src-field > span:first-child {
    grid-column: 1 / -1;
    width: auto !important;
    white-space: normal;
    text-align: left;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .src-table .src-unit {
    justify-self: start;
  }
  .src-table .src-field select {
    grid-column: 1 / -1;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
  }
}

/* Tension T/N (Check-list électrique cascade) : voir majTN dans common.js.
   5 V ≤ T/N < 10 V → champ sur fond rouge 50 % + gras ; T/N ≥ 10 V → fond rouge + gras blanc. */
.tn-field.tn-warn input.tn-input {
  background: rgba(200, 16, 46, 0.5) !important;
  font-weight: 700 !important;
}
.tn-field.tn-alert input.tn-input {
  background: #c8102e !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  font-weight: 700 !important;
}
.tn-field.tn-warn input.tn-input,
.tn-field.tn-alert input.tn-input {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
