/* ==================================================================
   CHARTE GRAPHIQUE DES ACTES

   Pièces imprimables du portail : procès-verbaux, rapports, dossiers
   d'enquête, mandats et comptes rendus.

   Parti pris — un acte administratif français n'est pas une interface.
   Trois règles tenues d'un bout à l'autre :

     1. MONOCHROME. La seule couleur saturée est le tricolore de la
        République et le bleu du bloc-marque. Le reste est de l'encre.
        C'est ce qui distingue un acte d'un écran.

     2. FORMULAIRE PRÉ-IMPRIMÉ + VALEURS DACTYLOGRAPHIÉES. Les intitulés
        sont en linéale étroite capitalisée, les valeurs saisies en
        machine à écrire, reliées par des points de conduite. C'est la
        signature visuelle de ces documents.

     3. AUCUN ORNEMENT. Pas d'ombre, pas d'angle arrondi, pas de dégradé,
        pas de pastille colorée. Les seuls traits sont des filets, et
        chaque filet sépare deux informations.

   Ce fichier se charge après styles.css et neutralise volontairement
   l'habillage applicatif sur les seules feuilles d'actes.
===================================================================*/

/*
  Les polices sont chargées par index.html (preconnect + link) : plus
  rapide qu'un @import, et le repli Arial / Courier New reste lisible
  et authentique si le chargement échoue.
*/

:root {
  /* Couleurs officielles de la République (Système de design de l'État). */
  --doc-blue: #000091;
  --doc-red: #e1000f;

  /* Encres. Un acte photocopié n'a pas de noir pur. */
  --doc-ink: #161616;
  --doc-ink-2: #3a3a3a;
  --doc-ink-3: #6e6e6e;

  --doc-rule: #b4b4b4;
  --doc-rule-firm: #161616;
  --doc-wash: #f4f4f2;
  --doc-paper: #ffffff;

  /*
    Une seule famille, deux largeurs : l'étroite pour les intitulés,
    la normale pour le texte courant. La personnalité vient de la
    structure, pas d'une police d'affichage.
  */
  --doc-sans: "Archivo", "Liberation Sans", Arial, Helvetica, sans-serif;
  --doc-mono: "Courier Prime", "Courier New", Courier, monospace;

  --doc-fs: 13px;
  --doc-lh: 1.55;

  /* Géométrie A4 : 210 mm moins 2 × 16 mm de marge. */
  --doc-width: 820px;
  --doc-pad: 26px 30px 22px;
}

/* ------------------------------------------------------------------
   1. LA FEUILLE
-------------------------------------------------------------------*/

.official-sheet,
.audition-pv-sheet,
.perquisition-report-sheet,
.investigation-folder-sheet,
.cr-letter-sheet {
  position: relative;
  max-width: var(--doc-width);
  margin: 0 auto 28px;
  padding: var(--doc-pad);
  background: var(--doc-paper);
  border: 1px solid var(--doc-rule);
  border-radius: 0;
  box-shadow: none;
  color: var(--doc-ink);
  font-family: var(--doc-sans);
  font-size: var(--doc-fs);
  line-height: var(--doc-lh);
  font-variant-numeric: tabular-nums;
}

/* Le tricolore : un drapeau, pas un dégradé décoratif. */
.official-sheet::before,
.audition-pv-sheet::before,
.perquisition-report-sheet::before,
.investigation-folder-sheet::before,
.cr-letter-sheet::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background-image: linear-gradient(
    to right,
    var(--doc-blue) 0 33.34%,
    #ffffff 33.34% 66.67%,
    var(--doc-red) 66.67% 100%
  );
  border-bottom: 1px solid var(--doc-rule-firm);
}

/* Les feuilles à marge (P.V.) gardent leur colonne d'annotation. */
.official-sheet-gav-pv,
.official-sheet-plainte-pv,
.investigation-folder-layout {
  display: grid;
  grid-template-columns: 208px 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.official-sheet-gav-pv > .gav-pv-sidebar,
.official-sheet-plainte-pv > .plainte-pv-sidebar,
.investigation-folder-layout > .investigation-folder-sidebar {
  padding: 30px 20px 22px;
  border-right: 1px solid var(--doc-rule-firm);
  background: var(--doc-paper);
}

.official-sheet-gav-pv > .gav-pv-main,
.official-sheet-plainte-pv > .plainte-pv-main,
.investigation-folder-layout > .investigation-folder-content {
  padding: 30px 30px 22px;
  min-width: 0;
}

/* ------------------------------------------------------------------
   2. LE TIMBRE
   Bloc d'identification de l'administration, en haut à gauche de
   tout courrier officiel : ministère, direction, unité.
-------------------------------------------------------------------*/

.gav-pv-republic,
.plainte-pv-republic,
.cr-letter-ministry {
  display: block;
  margin: 0 0 20px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--doc-rule);
  text-align: left;
}

.gav-pv-republic strong,
.plainte-pv-republic strong,
.cr-letter-ministry strong {
  display: block;
  margin-bottom: 7px;
  color: var(--doc-blue);
  font-family: var(--doc-sans);
  font-size: 12px;
  font-stretch: 78%;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gav-pv-republic span,
.gav-pv-republic small,
.plainte-pv-republic span,
.plainte-pv-republic small,
.cr-letter-ministry span,
.cr-letter-ministry small {
  display: block;
  color: var(--doc-ink-2);
  font-size: 10.5px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.055em;
  line-height: 1.45;
  text-transform: uppercase;
}

.gav-pv-republic small,
.plainte-pv-republic small,
.cr-letter-ministry small {
  margin-top: 6px;
  color: var(--doc-ink-3);
  font-weight: 400;
  letter-spacing: 0.09em;
}

/* ------------------------------------------------------------------
   3. LE BLOC DE RÉFÉRENCE
   « N° … » : intitulé en linéale, numéro à la machine.
-------------------------------------------------------------------*/

.gav-pv-number,
.plainte-pv-number {
  margin: 0 0 20px;
  padding: 9px 0;
  border-top: 1px solid var(--doc-rule-firm);
  border-bottom: 1px solid var(--doc-rule-firm);
}

.gav-pv-number span,
.plainte-pv-number span {
  display: block;
  margin-bottom: 3px;
  color: var(--doc-ink-3);
  font-size: 9.5px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.gav-pv-number strong,
.plainte-pv-number strong {
  display: block;
  color: var(--doc-ink);
  font-family: var(--doc-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Rubriques de la marge : AFFAIRE, FAITS REPROCHÉS, OBJET, SUIVI. */
.gav-pv-side-section,
.plainte-pv-side-section,
.folder-side-note {
  margin: 0 0 17px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

.gav-pv-side-section h4,
.plainte-pv-side-section h4,
.folder-side-note strong {
  display: block;
  margin: 0 0 5px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--doc-rule);
  color: var(--doc-ink);
  font-size: 9.5px;
  font-stretch: 78%;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.gav-pv-side-section p,
.plainte-pv-side-section p,
.folder-side-note span,
.folder-side-note p {
  margin: 0 0 4px;
  color: var(--doc-ink-2);
  font-size: 11.5px;
  line-height: 1.45;
}

/* ------------------------------------------------------------------
   4. L'INTITULÉ DE L'ACTE
   Centré entre deux filets : le double filet est le marqueur
   classique du titre d'un acte.
-------------------------------------------------------------------*/

.gav-pv-main-header,
.plainte-pv-main-header,
.official-title-block,
.audition-pv-title,
.perquisition-report-title,
.investigation-folder-title {
  margin: 0 0 22px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  text-align: left;
}

.gav-pv-main-header h1,
.plainte-pv-main-header h1,
.audition-pv-title h1,
.perquisition-report-title h1,
.investigation-folder-title h1,
.official-title-block h1 {
  margin: 0;
  padding: 11px 0;
  border-top: 3px double var(--doc-rule-firm);
  border-bottom: 3px double var(--doc-rule-firm);
  color: var(--doc-ink);
  font-size: 21px;
  font-stretch: 88%;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

/* Le sur-titre : la chaîne hiérarchique, pas un slogan. */
.audition-pv-title > p:first-child,
.perquisition-report-title > p:first-child,
.investigation-folder-title > p:first-child,
.folder-kicker,
.official-title-block > p:first-child {
  margin: 0 0 8px;
  color: var(--doc-ink-3);
  font-size: 10px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-align: center;
  text-transform: uppercase;
}

/* L'objet de l'acte, sous le titre. */
.gav-pv-title,
.plainte-pv-title,
.audition-pv-title h2,
.perquisition-report-title h2,
.investigation-folder-title h2 {
  margin: 12px 0 20px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

.gav-pv-title h2,
.plainte-pv-title h2,
.audition-pv-title h2,
.perquisition-report-title h2,
.investigation-folder-title h2 {
  margin: 0;
  color: var(--doc-ink);
  font-size: 14px;
  font-stretch: 92%;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  text-transform: none;
}

.gav-pv-title p,
.plainte-pv-title p {
  margin: 6px 0 0;
  color: var(--doc-ink-2);
  font-size: 12px;
  text-align: center;
}

/* La formule d'ouverture : « Nous, …, officier de police judiciaire ». */
.gav-pv-date-line,
.plainte-pv-date-line,
.plainte-pv-number-line {
  margin: 14px 0 0;
  color: var(--doc-ink-2);
  font-size: 11.5px;
  font-stretch: 88%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/*
  La formule d'ouverture est une phrase de l'acte, pas un encadré :
  elle se lit comme le reste du texte, séparée par un simple filet.
*/
.gav-pv-agent-line,
.plainte-pv-agent-line {
  margin: 10px 0 0;
  padding: 12px 0 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--doc-rule);
  border-radius: 0;
  font-size: 12.5px;
  line-height: 1.62;
  text-align: justify;
}

.gav-pv-agent-line strong,
.plainte-pv-agent-line strong {
  font-family: var(--doc-mono);
  font-weight: 700;
  text-transform: uppercase;
}

/* En-tête pleine page : bloc-marque à gauche, titre au centre. */
.audition-pv-header,
.perquisition-report-header,
.investigation-folder-cover,
.official-sheet-header,
.cr-letter-header {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 20px;
  align-items: start;
  margin: 0 0 22px;
  padding: 0 0 18px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--doc-rule-firm);
  border-radius: 0;
}

.audition-pv-logo img,
.perquisition-report-logo img,
.investigation-folder-logo-panel img,
.official-header-picture img,
.cr-letter-logo img {
  width: 100%;
  max-width: 74px;
  height: auto;
  filter: grayscale(1) contrast(1.12);
}

/* ------------------------------------------------------------------
   5. LES MENTIONS DE FORME
   Les pastilles applicatives deviennent des mentions entre crochets :
   un acte ne porte pas de badge coloré.
-------------------------------------------------------------------*/

.audition-pv-badges,
.perquisition-report-badges,
.folder-badges,
.gav-pv-meta-strip,
.plainte-pv-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 12px 0 0;
  padding: 8px 0 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--doc-rule);
  border-radius: 0;
  justify-content: center;
}

.gav-pv-meta-strip,
.plainte-pv-meta-strip {
  justify-content: flex-start;
}

.audition-pv-badges span,
.perquisition-report-badges span,
.folder-badges span,
.gav-pv-meta-strip span,
.plainte-pv-meta-strip span {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--doc-ink-2);
  font-family: var(--doc-mono);
  font-size: 10.5px;
  letter-spacing: 0;
  text-transform: none;
}

.gav-pv-meta-strip span strong,
.plainte-pv-meta-strip span strong {
  color: var(--doc-ink-3);
  font-family: var(--doc-sans);
  font-size: 9.5px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.audition-pv-badges span::before,
.perquisition-report-badges span::before,
.folder-badges span::before {
  content: "[ ";
}

.audition-pv-badges span::after,
.perquisition-report-badges span::after,
.folder-badges span::after {
  content: " ]";
}

/* La pastille de statut, dans la marge, redevient une mention. */
.gav-pv-status .status-pill,
.plainte-pv-status .status-pill,
.gav-pv-side-section .pj-pill,
.plainte-pv-side-section .pj-pill {
  display: inline;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--doc-ink-2);
  font-family: var(--doc-mono);
  font-size: 11px;
  font-weight: 400;
}

/* ------------------------------------------------------------------
   6. LE TABLEAU DE SYNTHÈSE
   Grille réglée : chaque cellule est un couple intitulé / valeur.
-------------------------------------------------------------------*/

.audition-summary-grid,
.perquisition-summary-grid,
.investigation-summary-grid,
.official-meta-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0 0 22px;
  padding: 0;
  background: none;
  border: 1px solid var(--doc-rule-firm);
  border-radius: 0;
  overflow: hidden;
}

.audition-info,
.perquisition-info,
.dossier-info,
.official-meta-table > div {
  padding: 9px 12px;
  background: none;
  border: 0;
  border-right: 1px solid var(--doc-rule);
  border-bottom: 1px solid var(--doc-rule);
  border-radius: 0;
}

.audition-info span,
.perquisition-info span,
.dossier-info span,
.official-meta-table > div > span:first-child {
  display: block;
  margin-bottom: 3px;
  color: var(--doc-ink-3);
  font-size: 9px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.audition-info strong,
.perquisition-info strong,
.dossier-info strong,
.official-meta-table > div > strong {
  display: block;
  color: var(--doc-ink);
  font-family: var(--doc-mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

/* ------------------------------------------------------------------
   7. LES RUBRIQUES
   Numérotées : dans un acte, l'ordre des rubriques fait foi.
-------------------------------------------------------------------*/

.audition-pv-content,
.perquisition-report-content,
.investigation-folder-content,
.gav-pv-content,
.plainte-pv-content,
.official-body {
  counter-reset: rubrique;
}

.official-section,
.audition-pv-block,
.perquisition-report-block,
.dossier-investigation-block {
  margin: 0 0 20px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  break-inside: avoid;
}

.official-section-title,
.audition-pv-block > h3,
.perquisition-report-block > h3,
.dossier-investigation-block > h3 {
  counter-increment: rubrique;
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 11px;
  padding: 0 0 5px;
  background: none;
  border: 0;
  border-bottom: 1.5px solid var(--doc-rule-firm);
  border-radius: 0;
  color: var(--doc-ink);
  font-size: 11.5px;
  font-stretch: 82%;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.official-section-title::before,
.audition-pv-block > h3::before,
.perquisition-report-block > h3::before,
.dossier-investigation-block > h3::before {
  content: counter(rubrique) ".";
  flex: none;
  min-width: 18px;
  color: var(--doc-ink-3);
  font-family: var(--doc-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

/* ------------------------------------------------------------------
   8. LES CHAMPS — LA SIGNATURE DU DOCUMENT
   Intitulé en linéale étroite, points de conduite, valeur à la
   machine à écrire : un formulaire pré-imprimé, rempli.
-------------------------------------------------------------------*/

.official-field-line,
.audition-pv-field,
.perquisition-report-field,
.dossier-investigation-field {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr;
  align-items: baseline;
  gap: 0;
  margin: 0;
  padding: 5px 0;
  background: none;
  border: 0;
  border-bottom: 1px dotted var(--doc-rule);
  border-radius: 0;
  break-inside: avoid;
}

.official-field-line:last-child,
.audition-pv-field:last-child,
.perquisition-report-field:last-child,
.dossier-investigation-field:last-child {
  border-bottom: 0;
}

.official-field-label,
.audition-pv-field > span,
.perquisition-report-field > span,
.dossier-investigation-field > span {
  padding-right: 12px;
  color: var(--doc-ink-2);
  font-size: 10px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.official-field-value,
.audition-pv-field > p,
.perquisition-report-field > p,
.dossier-investigation-field > p {
  margin: 0;
  color: var(--doc-ink);
  font-family: var(--doc-mono);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-line;
}

/* Un champ long occupe la largeur : intitulé au-dessus. */
.audition-pv-field.wide,
.perquisition-report-field.wide,
.dossier-investigation-field.wide {
  grid-template-columns: 1fr;
}

.audition-pv-field.wide > span,
.perquisition-report-field.wide > span,
.dossier-investigation-field.wide > span {
  margin-bottom: 5px;
  padding-right: 0;
}

/* Valeur non renseignée : le trait d'un champ resté vide. */
.official-field-value:empty::after,
.audition-pv-field > p em,
.perquisition-report-field > p em,
.dossier-investigation-field > p em,
.dossier-info strong em,
.audition-info strong em {
  color: var(--doc-ink-3);
  font-family: var(--doc-mono);
  font-style: normal;
}

.official-field-value:empty::after {
  content: "—";
}

/* ------------------------------------------------------------------
   9. LE TEXTE COURANT
-------------------------------------------------------------------*/

.official-line,
.audition-pv-content p,
.perquisition-report-content p,
.cr-letter-body p {
  margin: 0 0 9px;
  color: var(--doc-ink);
  font-size: 12.5px;
  line-height: 1.62;
  text-align: justify;
  hyphens: auto;
  orphans: 3;
  widows: 3;
}

.official-bullet-line {
  position: relative;
  margin: 0 0 5px;
  padding-left: 16px;
  color: var(--doc-ink);
  font-size: 12.5px;
  line-height: 1.55;
}

/* Le tiret cadratin remplace la puce : convention typographique. */
.official-bullet-line::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--doc-ink-3);
}

/* Encadrés d'objet et de personne : filet plein, pas de carte. */
.audition-person-card,
.audition-object-card,
.perquisition-object-card,
.investigation-object-card {
  margin: 0 0 18px;
  padding: 11px 14px;
  background: var(--doc-wash);
  border: 0;
  border-left: 3px solid var(--doc-rule-firm);
  border-radius: 0;
  box-shadow: none;
}

.audition-person-card > span,
.audition-object-card > span,
.perquisition-object-card > span,
.investigation-object-card > span {
  display: block;
  margin-bottom: 4px;
  color: var(--doc-ink-3);
  font-size: 9px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.audition-person-card > p,
.audition-object-card > p,
.perquisition-object-card > p,
.investigation-object-card > p {
  margin: 0;
  color: var(--doc-ink);
  font-family: var(--doc-mono);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ------------------------------------------------------------------
   10. LA ZONE DE SIGNATURE
   Deux emplacements réglés, comme au bas d'un acte.
-------------------------------------------------------------------*/

.official-signature-zone,
.audition-signature-zone,
.perquisition-signature-zone,
.cr-letter-signature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin: 26px 0 0;
  padding: 18px 0 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--doc-rule-firm);
  border-radius: 0;
  break-inside: avoid;
}

.signature-box,
.audition-signature-box,
.perquisition-signature-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}

.signature-box > span,
.audition-signature-box > span,
.perquisition-signature-box > span {
  color: var(--doc-ink-2);
  font-size: 9.5px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* L'emplacement du cachet reste visible même sans image. */
.signature-box img,
.audition-signature-box img,
.perquisition-signature-box img,
.opj-stamp-img,
.authority-stamp-img {
  align-self: flex-start;
  width: auto;
  max-width: 190px;
  max-height: 84px;
  margin: 0;
  padding: 4px 0;
  border-bottom: 1px solid var(--doc-rule-firm);
  filter: grayscale(1) contrast(1.2);
  mix-blend-mode: multiply;
}

/* ------------------------------------------------------------------
   11. LE PIED D'ACTE
-------------------------------------------------------------------*/

.official-footer-note,
.audition-pv-footer,
.perquisition-report-footer,
.investigation-folder-footer,
.cr-letter-footer {
  margin: 22px 0 0;
  padding: 9px 0 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--doc-rule);
  border-radius: 0;
  color: var(--doc-ink-3);
  font-size: 9px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------
   12. LE COURRIER (compte rendu)
   Mise en page de lettre : timbre, lieu et date, objet, formule.
-------------------------------------------------------------------*/

.cr-letter-sheet {
  padding: 34px 40px 26px;
}

.cr-letter-recipient,
.cr-letter-sender {
  margin: 0 0 18px;
  font-size: 12.5px;
}

.cr-letter-recipient {
  text-align: right;
}

.cr-letter-recipient p {
  margin: 0;
  font-family: var(--doc-mono);
}

.cr-letter-object {
  margin: 0 0 20px;
  padding: 9px 0;
  border-top: 1px solid var(--doc-rule-firm);
  border-bottom: 1px solid var(--doc-rule-firm);
  font-size: 12.5px;
}

.cr-letter-object strong {
  color: var(--doc-ink-3);
  font-size: 9.5px;
  font-stretch: 78%;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------
   13. PIÈCES JOINTES AU DOSSIER
-------------------------------------------------------------------*/

.official-linked-documents-grid {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--doc-rule-firm);
}

.official-linked-document-card {
  padding: 9px 12px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--doc-rule);
  border-radius: 0;
  box-shadow: none;
}

.official-linked-document-card:last-child {
  border-bottom: 0;
}

/* ------------------------------------------------------------------
   14. IMPRESSION
   Ce que la feuille devient sur papier : plus aucun élément
   d'interface, marges A4, coupures maîtrisées.
-------------------------------------------------------------------*/

@page {
  size: A4 portrait;
  margin: 16mm 15mm 14mm;
}

@media print {
  html,
  body {
    background: #ffffff !important;
    color: var(--doc-ink) !important;
  }

  /* L'application disparaît, l'acte reste. */
  .portal-topbar,
  .portal-sidebar,
  .module-strip,
  .page-heading,
  .official-document-toolbar,
  .pj-actions,
  .pj-toolbar,
  .profile-menu,
  .profile-dropdown,
  .alert,
  .portal-fiction-credit,
  .side-user,
  .boot-page,
  .service-page,
  .auth-page {
    display: none !important;
  }

  .portal,
  .portal-main,
  .page-content,
  .pj-viewer {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  .official-sheet,
  .audition-pv-sheet,
  .perquisition-report-sheet,
  .investigation-folder-sheet,
  .cr-letter-sheet {
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: 10pt !important;
    line-height: 1.5 !important;
  }

  /* Le tricolore survit au noir et blanc grâce au filet. */
  .official-sheet::before,
  .audition-pv-sheet::before,
  .perquisition-report-sheet::before,
  .investigation-folder-sheet::before,
  .cr-letter-sheet::before {
    position: static;
    display: block;
    height: 4px;
    margin-bottom: 12px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /*
    Le filet tricolore est pose en « ::before ». A l'ecran il est en
    position absolue, donc hors flux. En impression il repasse en flux
    pour survivre au noir et blanc — et sur les feuilles a marge, qui
    sont des GRILLES, il devient alors un element de grille : il
    prenait la premiere cellule et decalait tout d'un cran. La colonne
    d'annotation passait a droite, et le corps du proces-verbal se
    retrouvait dans les 46 mm de la marge, deux mots par ligne. Un
    P.V. de garde a vue sortait ainsi sur six pages au lieu de deux.

    On lui fait donc occuper une ligne entiere, ce qui le remet ou il
    doit etre : en bandeau, au-dessus des deux colonnes.
  */
  .official-sheet-gav-pv::before,
  .official-sheet-plainte-pv::before {
    grid-column: 1 / -1;
  }

  .official-sheet-gav-pv,
  .official-sheet-plainte-pv,
  .investigation-folder-layout {
    grid-template-columns: 46mm 1fr !important;
    /*
      « overflow: hidden » sert a l'ecran (il rogne les angles de la
      feuille). Sur papier il rognerait la pagination elle-meme : au
      dela de la premiere page, le navigateur coupe au lieu de
      poursuivre.
    */
    overflow: visible !important;
  }

  /* La colonne d'annotation ne se coupe pas au milieu d'une rubrique. */
  .gav-pv-side-section,
  .plainte-pv-side-section,
  .gav-pv-republic,
  .plainte-pv-republic,
  .gav-pv-number,
  .plainte-pv-number,
  .gav-pv-meta-strip,
  .plainte-pv-meta-strip {
    break-inside: avoid;
  }

  /*
    Tableau des infractions : il porte des qualifications longues, et
    c'est la seule chose de l'acte qui ne sait pas se retrecir toute
    seule. Largeur imposee, et l'en-tete se repete sur chaque page.
  */
  .offences-plate-table {
    width: 100% !important;
    table-layout: fixed !important;
    font-size: 9pt !important;
  }

  /*
    Colonnes reparties a la main : « fixed » les egaliserait, et la
    qualification — la seule colonne reellement longue — se
    retrouverait aussi etroite que la date.
  */
  .offences-plate-table th:nth-child(1),
  .offences-plate-table td:nth-child(1) {
    width: 13%;
  }

  .offences-plate-table th:nth-child(2),
  .offences-plate-table td:nth-child(2) {
    width: 33%;
  }

  .offences-plate-table th:nth-child(3),
  .offences-plate-table td:nth-child(3) {
    width: 22%;
  }

  .offences-plate-table th:nth-child(4),
  .offences-plate-table td:nth-child(4) {
    width: 17%;
  }

  .offences-plate-table th:nth-child(5),
  .offences-plate-table td:nth-child(5) {
    width: 15%;
  }

  .offences-plate-table thead {
    display: table-header-group;
  }

  .offences-plate-table th,
  .offences-plate-table td {
    padding: 1.5mm 2mm !important;
    /*
      « overflow-wrap » et non « word-break » : on ne coupe un mot que
      s'il ne tient pas seul sur une ligne. Le second cassait « 17/09/2026 »
      en plein milieu alors que la colonne pouvait le contenir.
    */
    overflow-wrap: break-word;
    hyphens: none;
  }

  .offences-plate-table thead th {
    background: none !important;
    font-size: 7.5pt !important;
    /* L'interlettrage de l'ecran fait deborder « NATINF » de sa colonne. */
    letter-spacing: 0.03em !important;
    border-bottom: 1.5pt solid var(--doc-rule-firm) !important;
  }

  .offences-plate-table tr {
    break-inside: avoid;
  }

  .official-sheet-gav-pv > .gav-pv-sidebar,
  .official-sheet-plainte-pv > .plainte-pv-sidebar,
  .investigation-folder-layout > .investigation-folder-sidebar {
    padding: 0 8mm 0 0 !important;
  }

  .official-sheet-gav-pv > .gav-pv-main,
  .official-sheet-plainte-pv > .plainte-pv-main,
  .investigation-folder-layout > .investigation-folder-content {
    padding: 0 0 0 8mm !important;
  }

  /* Titres et rubriques ne se détachent pas de leur contenu. */
  .gav-pv-main-header h1,
  .plainte-pv-main-header h1,
  .audition-pv-title h1,
  .perquisition-report-title h1,
  .investigation-folder-title h1,
  .official-title-block h1 {
    font-size: 15pt !important;
    break-after: avoid;
  }

  .official-section-title,
  .audition-pv-block > h3,
  .perquisition-report-block > h3,
  .dossier-investigation-block > h3 {
    font-size: 9pt !important;
    break-after: avoid;
  }

  .official-field-line,
  .audition-pv-field,
  .perquisition-report-field,
  .dossier-investigation-field,
  .audition-person-card,
  .audition-object-card,
  .perquisition-object-card,
  .investigation-object-card,
  .official-signature-zone,
  .audition-signature-zone,
  .perquisition-signature-zone,
  .cr-letter-signature,
  .official-linked-document-card {
    break-inside: avoid;
  }

  .official-line,
  .audition-pv-content p,
  .perquisition-report-content p,
  .cr-letter-body p {
    font-size: 10pt !important;
    orphans: 3;
    widows: 3;
  }

  .official-field-value,
  .audition-pv-field > p,
  .perquisition-report-field > p,
  .dossier-investigation-field > p,
  .audition-info strong,
  .perquisition-info strong,
  .dossier-info strong {
    font-size: 9.5pt !important;
  }

  /* Les aplats de fond ne s'impriment pas : on garde le filet. */
  .audition-person-card,
  .audition-object-card,
  .perquisition-object-card,
  .investigation-object-card {
    background: none !important;
    border-left: 2.5pt solid var(--doc-rule-firm) !important;
    padding-left: 3mm !important;
  }

  .audition-summary-grid,
  .perquisition-summary-grid,
  .investigation-summary-grid,
  .official-meta-table {
    break-inside: avoid;
  }

  a[href]::after {
    content: none !important;
  }
}

/* ------------------------------------------------------------------
   15. ADAPTATION AUX PETITS ÉCRANS

   « screen and » n'est pas decoratif : une page A4 fait 794 px de
   large, donc MOINS que le seuil. Sans cette restriction, tout ce qui
   suit s'appliquait aussi au papier — la feuille a marge perdait son
   filet de separation et les deux signatures, cote a cote a l'ecran,
   se retrouvaient l'une sous l'autre sur une demi-page.
-------------------------------------------------------------------*/

@media screen and (max-width: 900px) {
  .official-sheet-gav-pv,
  .official-sheet-plainte-pv,
  .investigation-folder-layout {
    grid-template-columns: 1fr;
  }

  .official-sheet-gav-pv > .gav-pv-sidebar,
  .official-sheet-plainte-pv > .plainte-pv-sidebar,
  .investigation-folder-layout > .investigation-folder-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--doc-rule-firm);
  }

  .audition-summary-grid,
  .perquisition-summary-grid,
  .investigation-summary-grid,
  .official-meta-table {
    grid-template-columns: 1fr 1fr;
  }

  .official-field-line,
  .audition-pv-field,
  .perquisition-report-field,
  .dossier-investigation-field {
    grid-template-columns: 1fr;
  }

  .official-field-label,
  .audition-pv-field > span,
  .perquisition-report-field > span,
  .dossier-investigation-field > span {
    margin-bottom: 4px;
    padding-right: 0;
  }

  .official-signature-zone,
  .audition-signature-zone,
  .perquisition-signature-zone,
  .cr-letter-signature {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .audition-pv-header,
  .perquisition-report-header,
  .investigation-folder-cover,
  .official-sheet-header,
  .cr-letter-header {
    grid-template-columns: 56px 1fr;
    gap: 14px;
  }
}

/* ------------------------------------------------------------------
   16. NEUTRALISATION DE L'HABILLAGE APPLICATIF

   styles.css habille certains éléments pour l'écran (pastilles de
   couleur, filets de cartes). Sur une feuille d'acte, ces éléments
   doivent redevenir des mentions typographiques. Les sélecteurs sont
   ancrés sur la racine de la feuille pour l'emporter sans !important.
-------------------------------------------------------------------*/

.official-sheet .pj-pill,
.official-sheet .status-pill,
.audition-pv-sheet .pj-pill,
.audition-pv-sheet .status-pill,
.perquisition-report-sheet .pj-pill,
.perquisition-report-sheet .status-pill,
.investigation-folder-sheet .pj-pill,
.investigation-folder-sheet .status-pill,
.cr-letter-sheet .pj-pill,
.cr-letter-sheet .status-pill {
  display: inline;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--doc-ink-2);
  font-family: var(--doc-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

/* La certification devient une mention entre crochets. */
.official-sheet .pj-pill.certified-label::before,
.audition-pv-sheet .pj-pill.certified-label::before,
.perquisition-report-sheet .pj-pill.certified-label::before,
.investigation-folder-sheet .pj-pill.certified-label::before,
.cr-letter-sheet .pj-pill.certified-label::before {
  content: "[ ";
}

.official-sheet .pj-pill.certified-label::after,
.audition-pv-sheet .pj-pill.certified-label::after,
.perquisition-report-sheet .pj-pill.certified-label::after,
.investigation-folder-sheet .pj-pill.certified-label::after,
.cr-letter-sheet .pj-pill.certified-label::after {
  content: " ]";
}

/* Les emplacements de signature n'ont qu'un filet : celui de la zone. */
.official-sheet .official-signature-zone .signature-box,
.audition-pv-sheet .audition-signature-zone .audition-signature-box,
.perquisition-report-sheet .perquisition-signature-zone .perquisition-signature-box,
.cr-letter-sheet .cr-letter-signature > div {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* ------------------------------------------------------------------
   17. REPRISE EN MAIN DU CORPS DE L'ACTE

   styles.css contient plusieurs générations de retouches ciblant
   « .gav-pv-content .official-section-title » et compagnie, à deux
   classes de spécificité. On reprend la main avec la même profondeur,
   ancrée sur la racine de feuille : générique, et sans !important
   (sauf là où la feuille d'origine en emploie).
-------------------------------------------------------------------*/

/* Intitulé de rubrique : numéroté, capitales étroites, filet plein. */
.official-sheet .official-section-title,
.audition-pv-sheet .official-section-title,
.perquisition-report-sheet .official-section-title,
.investigation-folder-sheet .official-section-title,
.cr-letter-sheet .official-section-title {
  counter-increment: rubrique;
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 11px;
  padding: 0 0 5px;
  background: none;
  border: 0;
  border-bottom: 1.5px solid var(--doc-rule-firm);
  border-radius: 0;
  color: var(--doc-ink);
  font-family: var(--doc-sans);
  font-size: 11.5px;
  font-stretch: 82%;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.official-sheet .official-section-title::before,
.audition-pv-sheet .official-section-title::before,
.perquisition-report-sheet .official-section-title::before,
.investigation-folder-sheet .official-section-title::before,
.cr-letter-sheet .official-section-title::before {
  content: counter(rubrique) ".";
  flex: none;
  min-width: 18px;
  color: var(--doc-ink-3);
  font-family: var(--doc-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

/* Les anciens ornements « --- titre --- » disparaissent. */
.official-sheet .official-section-title::after,
.audition-pv-sheet .official-section-title::after,
.perquisition-report-sheet .official-section-title::after,
.investigation-folder-sheet .official-section-title::after,
.cr-letter-sheet .official-section-title::after {
  content: "";
}

/* Champ : intitulé / valeur dactylographiée. */
.official-sheet .official-field-line,
.audition-pv-sheet .official-field-line,
.perquisition-report-sheet .official-field-line,
.investigation-folder-sheet .official-field-line,
.cr-letter-sheet .official-field-line {
  grid-template-columns: minmax(120px, 200px) 1fr;
  padding: 5px 0;
  border-bottom: 1px dotted var(--doc-rule);
  font-family: var(--doc-sans);
  font-size: var(--doc-fs);
}

.official-sheet .official-field-label,
.audition-pv-sheet .official-field-label,
.perquisition-report-sheet .official-field-label,
.investigation-folder-sheet .official-field-label,
.cr-letter-sheet .official-field-label {
  color: var(--doc-ink-2);
  font-family: var(--doc-sans);
  font-size: 10px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.official-sheet .official-field-value,
.audition-pv-sheet .official-field-value,
.perquisition-report-sheet .official-field-value,
.investigation-folder-sheet .official-field-value,
.cr-letter-sheet .official-field-value {
  color: var(--doc-ink);
  font-family: var(--doc-mono);
  font-size: 12.5px;
  line-height: 1.5;
}

/* Texte courant et énumérations. */
.official-sheet .official-line,
.audition-pv-sheet .official-line,
.perquisition-report-sheet .official-line,
.investigation-folder-sheet .official-line,
.cr-letter-sheet .official-line {
  margin: 0 0 9px;
  color: var(--doc-ink);
  font-family: var(--doc-sans);
  font-size: 12.5px;
  line-height: 1.62;
  text-align: justify;
}

.official-sheet .official-bullet-line,
.audition-pv-sheet .official-bullet-line,
.perquisition-report-sheet .official-bullet-line,
.investigation-folder-sheet .official-bullet-line,
.cr-letter-sheet .official-bullet-line {
  margin: 0 0 5px;
  padding-left: 16px;
  color: var(--doc-ink);
  font-family: var(--doc-sans);
  font-size: 12.5px;
  line-height: 1.55;
  text-align: left;
}

/* La pastille de certification : la feuille d'origine emploie
   !important, on lui répond sur le même registre. */
.official-sheet .pj-pill.certified-label,
.audition-pv-sheet .pj-pill.certified-label,
.perquisition-report-sheet .pj-pill.certified-label,
.investigation-folder-sheet .pj-pill.certified-label,
.cr-letter-sheet .pj-pill.certified-label {
  background: none !important;
  border-color: transparent !important;
  color: var(--doc-ink-2) !important;
  font-weight: 400 !important;
}

/* ------------------------------------------------------------------
   18. GRILLES DE CHAMPS DES BLOCS

   styles.css répartit les champs sur plusieurs colonnes. Combiné à la
   grille intitulé / valeur de chaque champ, cela casse l'alignement
   des points de conduite. Un acte se lit en une colonne : un champ,
   une ligne.
-------------------------------------------------------------------*/

.audition-pv-sheet .audition-pv-fields,
.perquisition-report-sheet .perquisition-report-fields,
.investigation-folder-sheet .dossier-investigation-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.audition-pv-sheet .audition-pv-field,
.perquisition-report-sheet .perquisition-report-field,
.investigation-folder-sheet .dossier-investigation-field {
  display: grid;
  grid-template-columns: minmax(150px, 230px) 1fr;
  align-items: baseline;
  gap: 0;
  margin: 0;
  padding: 5px 0;
  background: none;
  border: 0;
  border-bottom: 1px dotted var(--doc-rule);
  border-radius: 0;
}

.audition-pv-sheet .audition-pv-field > span,
.perquisition-report-sheet .perquisition-report-field > span,
.investigation-folder-sheet .dossier-investigation-field > span {
  margin: 0;
  padding-right: 12px;
  color: var(--doc-ink-2);
  font-family: var(--doc-sans);
  font-size: 10px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.audition-pv-sheet .audition-pv-field > p,
.perquisition-report-sheet .perquisition-report-field > p,
.investigation-folder-sheet .dossier-investigation-field > p {
  margin: 0;
  color: var(--doc-ink);
  font-family: var(--doc-mono);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-line;
}

/* Un champ long : intitulé au-dessus, texte sur toute la largeur. */
.audition-pv-sheet .audition-pv-field.wide,
.perquisition-report-sheet .perquisition-report-field.wide,
.investigation-folder-sheet .dossier-investigation-field.wide {
  grid-template-columns: 1fr;
}

.audition-pv-sheet .audition-pv-field.wide > span,
.perquisition-report-sheet .perquisition-report-field.wide > span,
.investigation-folder-sheet .dossier-investigation-field.wide > span {
  margin-bottom: 5px;
  padding-right: 0;
}

/*
  Mention absente : un acte porte un tiret, pas une italique colorée.
  styles.css met ces mentions en <em> avec sa propre couleur.
-------------------------------------------------------------------*/
.official-sheet em,
.audition-pv-sheet em,
.perquisition-report-sheet em,
.investigation-folder-sheet em,
.cr-letter-sheet em {
  color: var(--doc-ink-3);
  font-family: var(--doc-mono);
  font-style: normal;
  font-weight: 400;
}

/*
  Rubrique sans contenu : la mention « Néant » se lit comme une valeur
  saisie, en encre pâle — pas comme une alerte.
*/
.official-sheet .audition-empty,
.official-sheet .perquisition-empty,
.official-sheet .dossier-empty,
.official-sheet .cr-empty,
.audition-pv-sheet .audition-empty,
.perquisition-report-sheet .perquisition-empty,
.investigation-folder-sheet .dossier-empty,
.cr-letter-sheet .cr-empty {
  color: var(--doc-ink-3);
  font-family: var(--doc-mono);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}

/* ------------------------------------------------------------------
   19. SOMMAIRE DU DOSSIER D'ENQUÊTE
   Un dossier s'ouvre sur sa table des rubriques, dans la marge.
-------------------------------------------------------------------*/

.investigation-folder-sheet .investigation-folder-sidebar > h3 {
  margin: 0 0 10px;
  padding: 0 0 5px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--doc-rule-firm);
  color: var(--doc-ink);
  font-family: var(--doc-sans);
  font-size: 9.5px;
  font-stretch: 78%;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.investigation-folder-sheet .investigation-folder-sidebar > ol {
  margin: 0 0 22px;
  padding: 0 0 0 2px;
  list-style: none;
  counter-reset: sommaire;
}

.investigation-folder-sheet .investigation-folder-sidebar > ol > li {
  counter-increment: sommaire;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 4px;
  margin: 0 0 5px;
  color: var(--doc-ink-2);
  font-size: 11px;
  line-height: 1.4;
}

.investigation-folder-sheet .investigation-folder-sidebar > ol > li::before {
  content: counter(sommaire) ".";
  color: var(--doc-ink-3);
  font-family: var(--doc-mono);
  font-size: 11px;
}

/* La mention de dernier intervenant est détachée du sommaire. */
.investigation-folder-sheet .folder-side-note {
  margin: 0;
  padding: 11px 0 0;
  border-top: 1px solid var(--doc-rule);
}

.investigation-folder-sheet .folder-side-note > span {
  display: block;
  margin: 4px 0 2px;
  color: var(--doc-ink);
  font-family: var(--doc-mono);
  font-size: 11.5px;
}

.investigation-folder-sheet .folder-side-note > small {
  display: block;
  color: var(--doc-ink-3);
  font-size: 10px;
}

/*
  Aucune valeur d'acte n'est soulignée : le soulignement est réservé,
  en typographie administrative, aux intitulés portés à la main.
*/
.official-sheet .official-field-value,
.official-sheet .audition-info strong,
.official-sheet .perquisition-info strong,
.official-sheet .dossier-info strong,
.audition-pv-sheet .audition-info strong,
.audition-pv-sheet .audition-pv-field > p,
.perquisition-report-sheet .perquisition-info strong,
.perquisition-report-sheet .perquisition-report-field > p,
.investigation-folder-sheet .dossier-info strong,
.investigation-folder-sheet .dossier-investigation-field > p {
  text-decoration: none;
}

/* ------------------------------------------------------------------
   20. EN-TÊTE DU COURRIER
   Une lettre administrative porte le timbre à gauche et l'emblème du
   service à droite — l'inverse d'un rapport.
-------------------------------------------------------------------*/

.cr-letter-sheet .cr-letter-header {
  grid-template-columns: 1fr 92px;
  align-items: start;
  gap: 24px;
}

.cr-letter-sheet .cr-letter-ministry {
  margin: 0;
  padding: 0;
  border-bottom: 0;
}

.cr-letter-sheet .cr-letter-ministry strong {
  font-size: 13px;
  letter-spacing: 0.11em;
}

.cr-letter-sheet .cr-letter-ministry small {
  font-style: normal;
  letter-spacing: 0.12em;
}

.cr-letter-sheet .cr-letter-logo {
  justify-self: end;
}

.cr-letter-sheet .cr-letter-logo img {
  max-width: 92px;
}

/* L'intitulé « Objet » n'est pas souligné : il est en capitales. */
.cr-letter-sheet .cr-letter-object strong {
  text-decoration: none;
}

/* Le corps de la lettre : alinéas, texte justifié. */
.cr-letter-sheet .cr-letter-body p {
  margin: 0 0 11px;
  text-indent: 8mm;
}

/* La formule de politesse et la signature se font face. */
.cr-letter-sheet .cr-letter-signature {
  align-items: start;
}

/* ------------------------------------------------------------------
   21. PLANCHE PHOTOGRAPHIQUE

   Les clichés font partie de la procédure : ils s'impriment avec
   l'acte, numérotés et légendés, comme une annexe.
-------------------------------------------------------------------*/

.media-plate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.media-plate-item {
  margin: 0;
  padding: 0;
  border: 1px solid var(--doc-rule-firm);
  break-inside: avoid;
}

.media-plate-item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78mm;
  object-fit: contain;
  background: var(--doc-wash);
  border-bottom: 1px solid var(--doc-rule);
}

.media-plate-item figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
}

.media-plate-item figcaption strong {
  color: var(--doc-ink-2);
  font-family: var(--doc-sans);
  font-size: 9px;
  font-stretch: 78%;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.media-plate-item figcaption span {
  color: var(--doc-ink);
  font-family: var(--doc-mono);
  font-size: 11.5px;
  line-height: 1.4;
}

.media-plate-item figcaption small {
  color: var(--doc-ink-3);
  font-size: 9.5px;
}

@media print {
  .media-plate-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6mm;
  }

  .media-plate-item img {
    max-height: 62mm;
  }

  .media-plate {
    break-before: auto;
  }
}

@media screen and (max-width: 760px) {
  .media-plate-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------
   17. LA COPIE IMPRIMABLE

   La fenetre ouverte par « Telecharger le PDF » ne contient que
   l'acte : ni barre du portail, ni panneau lateral, ni bandeau de
   rubriques. Elle n'a donc rien a masquer a l'impression — ce qui
   est tout l'interet : le navigateur pagine une feuille, et non une
   application dont on aurait cache les neuf dixiemes.

   Le bandeau du haut n'existe qu'a l'ecran, pour dire quoi faire et
   rouvrir la boite si elle a ete fermee par megarde.
-------------------------------------------------------------------*/

.acte-imprimable {
  margin: 0;
  padding: 0 0 40px;
  background: var(--doc-wash);
  color: var(--doc-ink);
}

.acte-imprimable .pj-viewer {
  padding: 24px 16px 0;
}

.acte-imprimable-barre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 20px;
  background: var(--doc-paper);
  border-bottom: 1px solid var(--doc-rule-firm);
  font-family: var(--doc-sans);
}

.acte-imprimable-barre strong {
  color: var(--doc-ink);
  font-size: 14px;
}

.acte-imprimable-barre span {
  color: var(--doc-ink-3);
  font-size: 12.5px;
  flex: 1 1 320px;
}

.acte-imprimable-barre button {
  border: 1px solid var(--doc-rule-firm);
  background: var(--doc-paper);
  color: var(--doc-ink);
  font-family: inherit;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
}

.acte-imprimable-barre button:hover {
  background: var(--doc-wash);
}

@media print {
  /* Sur papier, il ne reste que l'acte. */
  .acte-imprimable {
    padding: 0;
    background: #ffffff;
  }

  .acte-imprimable-barre {
    display: none !important;
  }

  .acte-imprimable .pj-viewer {
    padding: 0;
  }
}

/* ------------------------------------------------------------------
   Planche photographique : les cliches n'ont pas tous le meme format.
   Sans « align-self », la grille etire chaque cadre a la hauteur du
   plus grand de sa ligne, et les vignettes basses trainent un grand
   vide sous leur legende.
-------------------------------------------------------------------*/

.media-plate-item {
  align-self: start;
}

/* ------------------------------------------------------------------
   18. AUDITION : QUESTIONS / RÉPONSES

   Le procès-verbal se lit question par question : la question en
   linéale, la réponse à la machine, l'une sous l'autre, numérotées.
-------------------------------------------------------------------*/

.audition-qa-spontaneous {
  margin: 0 0 12px;
  padding: 0 0 8px;
  border-bottom: 1px dotted var(--doc-rule);
}

.audition-qa-spontaneous > span,
.audition-qa-question > span,
.audition-qa-answer > span {
  display: block;
  margin-bottom: 3px;
  color: var(--doc-ink-2);
  font-size: 10px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.audition-qa-spontaneous > p,
.audition-qa-answer > p {
  margin: 0;
  color: var(--doc-ink);
  font-family: var(--doc-mono);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-line;
}

.audition-qa-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.audition-qa-pair {
  display: grid;
  gap: 4px;
  padding: 7px 0 8px;
  border-bottom: 1px dotted var(--doc-rule);
  break-inside: avoid;
}

.audition-qa-pair:last-child {
  border-bottom: 0;
}

.audition-qa-question > p {
  margin: 0;
  color: var(--doc-ink);
  font-family: var(--doc-sans);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-line;
}

.audition-qa-answer {
  padding-left: 14px;
  border-left: 2px solid var(--doc-rule);
}

/* ------------------------------------------------------------------
   19. DOSSIER D'ENQUÊTE : TABLEAUX ET CHRONOLOGIE
-------------------------------------------------------------------*/

.dossier-table {
  width: 100%;
  margin: 0 0 8px;
  border-collapse: collapse;
  font-size: 12px;
}

.dossier-table th,
.dossier-table td {
  padding: 6px 8px;
  border: 1px solid var(--doc-rule);
  color: var(--doc-ink);
  text-align: left;
  vertical-align: top;
}

.dossier-table thead th {
  background: var(--doc-wash);
  color: var(--doc-ink-2);
  font-size: 10px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dossier-table td small {
  color: var(--doc-ink-3);
  font-size: 11px;
}

.dossier-table tr {
  break-inside: avoid;
}

.dossier-timeline-list {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.dossier-timeline-entry {
  display: grid;
  grid-template-columns: 118px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 7px 0 7px 12px;
  border-left: 2px solid var(--doc-rule-firm);
  border-bottom: 1px dotted var(--doc-rule);
  break-inside: avoid;
}

.dossier-timeline-entry.is-piece {
  border-left-color: var(--doc-rule);
}

.dossier-timeline-entry time {
  color: var(--doc-ink-2);
  font-family: var(--doc-mono);
  font-size: 11.5px;
}

.dossier-timeline-entry strong {
  display: block;
  color: var(--doc-ink);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dossier-timeline-entry p {
  margin: 2px 0;
  color: var(--doc-ink);
  font-family: var(--doc-mono);
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre-line;
}

.dossier-timeline-entry small {
  color: var(--doc-ink-3);
  font-size: 11px;
}

.dossier-timeline-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--doc-rule);
  background: var(--doc-wash);
}

.dossier-timeline-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dossier-timeline-form-grid .wide {
  grid-column: 1 / -1;
}

.dossier-timeline-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}

.dossier-timeline-form .pj-button {
  justify-self: start;
}

@media screen and (max-width: 700px) {
  .dossier-timeline-entry {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .dossier-timeline-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------
   20. SIGNATURES RECUEILLIES EN JEU
-------------------------------------------------------------------*/

.signatures-plate-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.signature-entry {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--doc-rule);
  border-left: 3px solid var(--doc-rule-firm);
  break-inside: avoid;
}

.signature-entry.refused {
  border-left-style: dashed;
}

.signature-role {
  color: var(--doc-ink-2);
  font-size: 10px;
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* Le nom en écriture manuscrite : c'est la signature elle-même. */
.signature-name {
  color: #1a237e;
  font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
}

.signature-refusal {
  color: var(--doc-ink);
  font-family: var(--doc-mono);
  font-size: 12.5px;
}

.signature-entry small {
  color: var(--doc-ink-3);
  font-size: 10.5px;
}

.signature-stale {
  color: #a3161b;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
}

/* Rubrique restée vide : « Néant », d'un gris de champ non renseigné. */
.official-line-empty {
  color: var(--doc-ink-3);
  font-family: var(--doc-mono);
}

/* Ce qui sert à la saisie ne figure ni sur la copie, ni sur le papier. */
.acte-imprimable .screen-only {
  display: none !important;
}

@media print {
  .screen-only {
    display: none !important;
  }

  /*
    styles.css interdit de couper le corps du dossier d'enquête. Ce
    corps fait plusieurs pages : ne pouvant le loger sur la première,
    le navigateur le rejetait à la suivante, et la couverture restait
    seule sur une page presque blanche. Seules les rubriques restent
    insécables.
  */
  .investigation-folder-layout {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  /*
    Le pied d'acte suit les signatures : seul en haut d'une page, il
    faisait imprimer une feuille de plus pour une ligne de mention.
  */
  .official-footer-note,
  .audition-pv-footer,
  .perquisition-report-footer,
  .investigation-folder-footer {
    break-before: avoid;
    page-break-before: avoid;
  }

  /*
    styles.css réserve 165 à 190 px à chaque emplacement de signature
    pour un cachet qui en mesure moins de 90 : sur papier, c'est ce
    vide qui faisait déborder la zone sur une page de plus.
  */
  .signature-box-authority,
  .gav-pv-signature-zone .signature-box,
  .plainte-pv-signature-zone .signature-box {
    min-height: 0 !important;
  }
}
