/* Reproduction visuelle bulletins / certificats — Complexe scolaire Maison de David */
.bpdf-wrap {
  --bpdf-line: #1a1a1a;
  --bpdf-bg: #c8dba8;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: #111;
}
.bpdf-print-root {
  min-height: 120px;
  margin-top: 0.5rem;
}
.bpdf-print-section {
  margin-bottom: 1rem;
}
.bpdf-screen-section-hidden {
  display: none;
}
body.bpdf-print-active .bpdf-screen-section-hidden {
  display: block !important;
}

.bpdf-sheet {
  background: var(--bpdf-bg);
  border: 2px solid var(--bpdf-line);
  padding: 10px 12px;
  margin-bottom: 1.5rem;
  max-width: 1120px;
  overflow-x: auto;
  box-sizing: border-box;
}
.bpdf-sheet.sheet-gs { --bpdf-bg: #c8dba8; }
.bpdf-sheet.sheet-gs.bpdf-gs-eval-page {
  --bpdf-bg: #fff;
  background: #fff;
  padding: 0;
  overflow: hidden;
}
.bpdf-sheet.sheet-1ere { --bpdf-bg: #c8dba8; }
.bpdf-sheet.sheet-2eme { --bpdf-bg: #e8956a; }
.bpdf-sheet.sheet-3eme { --bpdf-bg: #f0c850; }
.bpdf-sheet.sheet-5eme { --bpdf-bg: #b8d4e8; }

.bpdf-inp {
  border: none;
  border-bottom: 1px dotted #1a1a1a;
  background: rgba(255, 255, 255, 0.45);
  font: inherit;
  font-weight: 600;
  color: #000;
  padding: 1px 4px;
  min-width: 3rem;
  max-width: 100%;
}
.bpdf-inp:focus {
  outline: 2px solid #1565c0;
  background: #fff;
}
.bpdf-inp.wide { min-width: 10rem; flex: 1; }
.bpdf-inp.cell {
  width: 2rem;
  min-width: 2rem;
  text-align: center;
  border: 1px solid #444;
  background: rgba(255, 255, 255, 0.75);
  font-weight: 700;
}
.bpdf-inp.year {
  font-size: 1.2rem;
  font-weight: 900;
  color: #000;
  min-width: 4.5rem;
  text-align: center;
  border-bottom: 2px dotted #000;
  background: #fff;
  padding: 2px 8px;
  letter-spacing: 0.04em;
}
.bpdf-gs-year-line .bpdf-inp.year {
  font-size: 1.35rem;
  min-width: 5rem;
}
.bpdf-year-block .bpdf-inp.year {
  font-size: 1.15rem;
}
.bpdf-inp.area {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid #444;
  resize: vertical;
  font-weight: 600;
}
.bpdf-inp.sig {
  min-height: 3.5rem;
  border: 1px dashed #555;
  background: rgba(255, 255, 255, 0.35);
}

.bpdf-fixed {
  user-select: none;
  color: #000;
}
.bpdf-bold { font-weight: 800; color: #000; }
.bpdf-title-doc {
  text-align: center;
  font-weight: 900;
  font-size: 1.65rem;
  letter-spacing: 0.04em;
  margin: 8px 0 10px;
  color: #000;
  text-transform: uppercase;
}
.bpdf-title-section {
  text-align: center;
  font-weight: 900;
  font-size: 0.95rem;
  margin: 10px 0 6px;
  text-transform: uppercase;
  color: #000;
}
.bpdf-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  margin: 5px 0;
  line-height: 1.45;
}
.bpdf-row .bpdf-lbl {
  font-weight: 700;
  color: #000;
  white-space: nowrap;
}
.bpdf-row-year-inline,
.bpdf-year-inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  white-space: nowrap;
  gap: 4px 8px;
}

/* —— Couverture + certificat (pli A4) —— */
.bpdf-fold-page {
  display: flex;
  flex-direction: row;
  gap: 0;
  border: 2px solid var(--bpdf-line);
  min-height: 480px;
  background: var(--bpdf-bg);
}
.bpdf-fold-page.layout-side {
  align-items: stretch;
}
.bpdf-fold-page.layout-cert-only {
  justify-content: center;
}
.bpdf-fold-page.layout-cert-only .bpdf-panel {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  border-right: none;
}
.bpdf-panel {
  flex: 1 1 50%;
  width: 50%;
  border-right: 1px solid var(--bpdf-line);
  padding: 8px 10px 10px 28px;
  position: relative;
  min-width: 0;
  background: transparent;
  box-sizing: border-box;
}
.bpdf-panel:last-child {
  border-right: none;
}
.bpdf-panel.cert {
  padding-left: 28px;
}
.bpdf-panel.cert .bpdf-title-doc {
  font-size: 1.25rem;
  margin-top: 2px;
}
.bpdf-ministry-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 22px;
  border-right: 1px solid var(--bpdf-line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}
.bpdf-ministry-rail span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 7px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  color: #000;
  max-height: 100%;
}
.bpdf-cert-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 28px;
  border-right: 2px solid var(--bpdf-line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bpdf-cert-rail span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #000;
  text-transform: uppercase;
}
.bpdf-school-block {
  text-align: center;
  margin: 4px 0 6px;
}
.bpdf-school-name {
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #000;
  line-height: 1.25;
}
.bpdf-level-line {
  font-size: 1.35rem;
  font-weight: 900;
  margin: 6px 0;
  color: #000;
}
.bpdf-logo {
  width: 128px;
  height: auto;
  margin: 6px auto;
  display: block;
  object-fit: contain;
}
.bpdf-gs-house-logo,
.bpdf-logo.bpdf-gs-house-logo {
  width: 150px;
  max-height: 140px;
}
.bpdf-tel {
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}
.bpdf-director-line {
  text-align: center;
  font-weight: 700;
  font-size: 10px;
  margin-bottom: 6px;
}
.bpdf-appreciation-box {
  border: 1px solid var(--bpdf-line);
  margin: 10px 4px 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.25);
}
.bpdf-pieces {
  font-size: 8px;
  font-weight: 600;
  margin: 10px 4px 6px;
  line-height: 1.35;
  max-width: 95%;
}
.bpdf-sign-block {
  margin-top: 12px;
  text-align: right;
  padding-right: 8%;
  font-weight: 700;
}
.bpdf-sign-block .bpdf-inp { text-align: right; }

.bpdf-gs-landscape {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 460px;
  border: none;
  box-sizing: border-box;
}
.bpdf-gs-poetry-panel {
  flex: 0 0 42%;
  max-width: 42%;
  padding: 14px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: rgba(200, 219, 168, 0.2);
  border-right: 2px solid var(--bpdf-line);
}
.bpdf-gs-poetry-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 380px;
}
.bpdf-gs-poetry-frame {
  border: 2px solid var(--bpdf-line);
  padding: 1.25rem 0.75rem;
  flex: 1 1 58%;
  min-width: 0;
  max-width: 240px;
  text-align: center;
  clip-path: polygon(8% 0, 92% 0, 100% 8%, 100% 92%, 92% 100%, 8% 100%, 0 92%, 0 8%);
  background: rgba(200, 219, 168, 0.35);
  line-height: 1.55;
  font-size: 11px;
}
.bpdf-gs-poetry-title {
  font-weight: 900;
  text-decoration: underline;
  margin: 0 0 0.75rem;
}
.bpdf-gs-cartable {
  flex: 0 0 38%;
  max-width: 130px;
  height: auto;
  object-fit: contain;
}
.bpdf-gs-main-panel {
  flex: 1 1 58%;
  min-width: 0;
  padding: 10px 14px 14px;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.bpdf-gs-main-inner {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
.bpdf-gs-ministry-cols {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 7.5px;
  font-weight: 700;
  text-align: left;
  margin-bottom: 8px;
  line-height: 1.35;
  width: 100%;
}
.bpdf-gs-ministry-cols span {
  flex: 1 1 48%;
  min-width: 0;
}
.bpdf-gs-ministry-cols span:last-child {
  text-align: right;
}
.bpdf-gs-head-block {
  width: 100%;
  margin-bottom: 6px;
}
.bpdf-gs-house-logo {
  margin: 2px auto 4px;
  display: block;
}
.bpdf-gs-main-panel .bpdf-title-doc {
  width: 100%;
  margin: 4px 0 2px;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.bpdf-gs-dir {
  font-size: 9px;
  font-weight: 700;
  margin: 2px 0 6px;
  line-height: 1.35;
}
.bpdf-gs-year-line {
  font-weight: 900;
  font-size: 12px;
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.bpdf-row .bpdf-inp.year,
.bpdf-director-line + .bpdf-row .bpdf-inp.year {
  font-size: 1.15rem;
}
.bpdf-gs-id-box {
  border: 2px solid var(--bpdf-line);
  text-align: left;
  padding: 10px 12px;
  margin-top: auto;
  font-size: 10px;
  width: 100%;
  box-sizing: border-box;
  background: rgba(200, 219, 168, 0.15);
}
.bpdf-gs-id-title {
  display: block;
  text-align: center;
  margin: 0 0 10px;
  font-size: 10px;
  letter-spacing: 0.03em;
}
.bpdf-gs-id-box .bpdf-gs-row-line {
  display: grid;
  grid-template-columns: minmax(7.5rem, max-content) 1fr auto;
  gap: 4px 10px;
  align-items: center;
  margin: 7px 0;
  line-height: 1.4;
}
.bpdf-gs-id-box .bpdf-gs-row-line:first-of-type {
  grid-template-columns: minmax(7.5rem, max-content) 1fr;
}
.bpdf-gs-id-box .bpdf-gs-row-birth {
  grid-template-columns: auto 1fr auto minmax(4rem, 1fr) auto auto;
}
.bpdf-gs-id-box .bpdf-gs-row-line .bpdf-inp.wide {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.bpdf-gs-id-box .bpdf-gs-row-line .bpdf-inp.cell {
  justify-self: start;
}
.bpdf-gs-age {
  font-weight: 700;
  justify-self: start;
}
@media (max-width: 900px) {
  .bpdf-gs-id-box .bpdf-gs-row-birth {
    grid-template-columns: minmax(7.5rem, max-content) 1fr;
  }
  .bpdf-gs-id-box .bpdf-gs-row-birth .bpdf-lbl:nth-of-type(2),
  .bpdf-gs-id-box .bpdf-gs-row-birth .bpdf-lbl:nth-of-type(3) {
    grid-column: 1;
  }
}
.bpdf-head-official {
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: #000;
}
.bpdf-head-official strong {
  font-size: 11px;
  font-weight: 900;
}

/* —— Grille notes —— */
.bpdf-grid-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 6px;
}
.bpdf-effectif {
  border-collapse: collapse;
  font-size: 8px;
  font-weight: 800;
}
.bpdf-effectif th,
.bpdf-effectif td {
  border: 1px solid var(--bpdf-line);
  padding: 2px 6px;
  text-align: center;
}
.bpdf-year-block {
  text-align: right;
  font-weight: 800;
  font-size: 11px;
}
.bpdf-year-block .bpdf-year-inline {
  justify-content: flex-end;
}
.bpdf-inp.cell.bpdf-cell-computed {
  background: rgba(255, 255, 255, 0.55);
  font-weight: 800;
  color: #111;
}
.bpdf-honor-row td {
  vertical-align: middle;
  border: 1px solid var(--bpdf-line);
}
.bpdf-honor-row-head {
  font-weight: 900;
  font-size: 8.5px;
  background: rgba(255, 255, 255, 0.35);
}
.bpdf-honor-row-body {
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.2);
}
.bpdf-honor-three {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.bpdf-honor-block {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 140px;
  min-width: 0;
  border: 2px solid var(--bpdf-line);
  background: rgba(255, 255, 255, 0.45);
  padding: 6px 10px;
}
.bpdf-honor-block-label {
  font-weight: 800;
  font-size: 8px;
  white-space: nowrap;
}
.bpdf-inp.bpdf-honor-box {
  width: 2.4rem;
  min-width: 2.4rem;
  height: 2.2rem;
  flex-shrink: 0;
  box-sizing: border-box;
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
  border: 2px solid #000 !important;
  background: #fff !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.bpdf-grid-main {
  border-collapse: collapse;
  width: 100%;
  font-size: 8.5px;
  margin-top: 4px;
}
.bpdf-grid-main th,
.bpdf-grid-main td {
  border: 1px solid var(--bpdf-line);
  padding: 2px 3px;
  vertical-align: middle;
}
.bpdf-grid-main th {
  background: rgba(255, 255, 255, 0.4);
  font-weight: 900;
  text-align: center;
  color: #000;
}
.bpdf-group-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 900;
  font-size: 9px;
  text-align: center;
  padding: 4px 2px;
  max-width: 1.2rem;
  color: #000;
}
.bpdf-layout {
  display: grid;
  grid-template-columns: 1fr 155px;
  gap: 6px;
}
.bpdf-side-grid {
  border-collapse: collapse;
  font-size: 7.5px;
  width: 100%;
}
.bpdf-side-grid th,
.bpdf-side-grid td {
  border: 1px solid var(--bpdf-line);
  padding: 2px;
  vertical-align: top;
}
.bpdf-side-grid th {
  font-weight: 900;
  text-align: center;
  background: rgba(255, 255, 255, 0.35);
}
.bpdf-decision-block {
  margin-top: 4px;
  border: 1px solid var(--bpdf-line);
  padding: 4px;
  background: rgba(255, 255, 255, 0.3);
}
.bpdf-decision-block .bpdf-lbl {
  font-size: 7.5px;
  font-weight: 900;
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.bpdf-visa-dir-box {
  margin-top: 4px;
  border: 2px solid var(--bpdf-line);
  min-height: 4.5rem;
  padding: 4px;
  background: rgba(255, 255, 255, 0.25);
}
.bpdf-visa-dir-box .bpdf-lbl {
  font-size: 7.5px;
  font-weight: 900;
  text-transform: uppercase;
}
.bpdf-footer-appreciation {
  margin-top: 8px;
  border-top: 2px solid var(--bpdf-line);
  padding-top: 6px;
}
.bpdf-footer-appreciation .bpdf-lbl {
  font-weight: 900;
  font-size: 10px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.bpdf-pdf-page {
  margin-bottom: 1.25rem;
  max-width: 1100px;
}
.bpdf-pdf-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #000;
  margin: 0 0 0.5rem;
}
.bpdf-pdf-object {
  width: 100%;
  min-height: 720px;
  border: 2px solid var(--bpdf-line);
  background: #fff;
}
.bpdf-pdf-scan {
  width: 100%;
  height: auto;
  border: 2px solid var(--bpdf-line);
  display: block;
}
.bpdf-pdf-actions {
  font-size: 0.88rem;
  margin: 0.5rem 0 0;
}
.bpdf-doc-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0.75rem;
}
.bpdf-doc-preview {
  margin: 0;
  max-width: 300px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #000;
}
.bpdf-doc-preview img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 4px;
  border: 2px solid var(--bpdf-line);
  border-radius: 4px;
  background: #fff;
}

@media print {
  .sidebar,
  .topbar,
  .toast,
  #syncStatus,
  .side-foot,
  .bpdf-no-print {
    display: none !important;
  }
  .app-shell {
    display: block !important;
  }
  .main {
    padding: 0 !important;
    overflow: visible !important;
  }
  .view.hidden {
    display: none !important;
  }
  .view:not(.hidden) {
    display: block !important;
    padding: 0;
    margin: 0;
  }
  .bpdf-screen-section-hidden {
    display: block !important;
  }
  .bpdf-print-root {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    margin: 0;
  }
  .bpdf-sheet {
    break-after: page;
    max-width: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .bpdf-inp {
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .bpdf-inp.wide,
  .bpdf-inp.area,
  .bpdf-inp.sig {
    border-bottom: 1px dotted #000;
    background: transparent !important;
  }
  .bpdf-inp.cell,
  .bpdf-inp.bpdf-honor-box {
    border: 1.5px solid #000 !important;
    background: #fff !important;
  }
  .bpdf-honor-block,
  .bpdf-honor-row-head,
  .bpdf-honor-row-body {
    border: 1px solid #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  img.bpdf-logo,
  img.bpdf-gs-cartable {
    max-width: 100%;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  @page {
    size: A4 landscape;
    margin: 6mm;
  }
}
