/* Certificat des opticiens : A4 paysage (297 × 210 mm) à l'impression, mis à l'échelle à l'écran. */
.cert {
  box-sizing: border-box; width: 297mm; height: 210mm; padding: 10mm; background: var(--surface); color: var(--encre);
  font-family: 'Figtree', system-ui, sans-serif; break-after: page; page-break-after: always;
}
.ct-frame {
  box-sizing: border-box; height: 100%; border: 2.2mm solid var(--violet-action); border-radius: 4mm; outline: .6mm solid var(--sable);
  outline-offset: -4.5mm; padding: 11mm 18mm 9mm; display: flex; flex-direction: column; align-items: center; text-align: center;
}
.ct-logos { display: flex; align-items: center; gap: 6mm; }
.ct-logos img:first-child { height: 15mm; }
.ct-logos img:last-child { height: 15mm; }
.ct-logos span { width: .4mm; height: 13mm; background: var(--filet); }
.ct-kicker { margin: 5mm 0 0; font-size: 11pt; letter-spacing: .25em; text-transform: uppercase; color: var(--gris); }
.ct-title { margin: 1.5mm 0 0; font-size: 30pt; font-weight: 700; color: var(--violet-action); }
.ct-to { margin: 5mm 0 0; font-size: 12pt; color: var(--gris); font-style: italic; }
.ct-name { margin: 1mm 0 0; font-size: 28pt; font-weight: 700; border-bottom: .5mm solid var(--sable); padding: 0 10mm 1.5mm; }
.ct-store { margin: 2mm 0 0; font-size: 13pt; color: var(--gris); }
.ct-text { margin: 6mm auto 0; max-width: 200mm; font-size: 14pt; line-height: 1.45; }
.ct-date { margin: 3mm 0 0; font-size: 12pt; color: var(--gris); }
.ct-foot { margin-top: auto; width: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 10mm; }
.ct-signs { display: flex; gap: 12mm; flex: 1; justify-content: center; align-items: flex-end; padding-left: 38mm; }
.ct-sign { display: flex; flex-direction: column; align-items: center; min-width: 55mm; border-top: 0; }
.ct-sign img { height: 18mm; max-width: 60mm; object-fit: contain; }
.ct-sign-space { display: block; height: 18mm; }
.ct-sign b { border-top: .3mm solid var(--encre); padding-top: 1.5mm; min-width: 55mm; font-size: 11.5pt; }
.ct-sign small { font-size: 9pt; color: var(--gris); max-width: 85mm; line-height: 1.3; }
.ct-qr { width: 38mm; display: flex; flex-direction: column; align-items: center; gap: 1.5mm; }
.ct-qr svg { width: 24mm; height: 24mm; }
.ct-qr small { font-size: 7.5pt; color: var(--gris); line-height: 1.3; word-break: break-all; }

/* À l'écran : le certificat tient dans la largeur disponible (zoom calculé par le script). */
.cert-screen { overflow: hidden; border-radius: 10px; box-shadow: 0 2px 14px rgb(0 0 0 / .12); }
.cert-screen .cert { transform-origin: 0 0; }

/* Page nommée : seuls les certificats passent en A4 paysage sans marge (la fiche d'accès reste en portrait). */
.cert { page: cert; }
@page cert { size: A4 landscape; margin: 0; }

/* Plaque des opticiens (13/11) : A4 portrait sur le visuel HOYA (1131 × 1600 px, 1 px = 0,1857 mm). */
.cert.plaque { position: relative; width: 210mm; height: 297mm; padding: 0; overflow: hidden; background: #0E4F9F; page: plaque; }
.cert.plaque, .cert.plaque * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@page plaque { size: A4 portrait; margin: 0; }
.pq-fond { position: absolute; inset: 0; width: 100%; height: 100%; }
.pq-year { position: absolute; left: 0; right: 0; top: 7.4mm; margin: 0; text-align: center; font: 800 23mm/1.15 'Figtree', 'Montserrat', sans-serif;
  letter-spacing: .02em; background: linear-gradient(180deg, #E9C66B 0%, #C99A3E 55%, #A8792C 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pq-bar { position: absolute; left: 31.1mm; top: 229.8mm; width: 147.5mm; height: 21mm; margin: 0; border-radius: 2.6mm; display: flex; align-items: center;
  justify-content: center; background: linear-gradient(170deg, #E0BE62 0%, #D2AC52 35%, #B88D3F 70%, #9C6E33 100%);
  box-shadow: inset 0 .4mm 0 rgb(255 255 255 / .25); }
.pq-bar span { font-family: 'Figtree', 'Montserrat', sans-serif; font-weight: 800; color: #2C2925; letter-spacing: .01em; white-space: nowrap; padding: 0 5mm; }
.pq-qr { position: absolute; left: 9.6mm; top: 267.6mm; width: 22mm; height: 22mm; background: #fff; padding: 1.2mm; box-sizing: border-box; }
.pq-qr svg { width: 100%; height: 100%; display: block; }

/* 17/11 : version retenue (Claude Design, validée par Faiez) — année et bandeau dans le jaune du logo MiYOSMART ;
   « OPTICIEN » / « OPTICIENNE » écrit par-dessus le mot du visuel (fond uni #0E4F9F, mot entre y 217 et 292 px). */
.cert.plaque .pq-year { background: none; color: #FCBA4D; }
.cert.plaque .pq-bar { background: #FCBA4D; box-shadow: none; }
.cert.plaque .pq-bar span { color: #2E2A22; }
.pq-mot { position: absolute; left: 0; right: 0; top: 37.6mm; height: 19mm; margin: 0; background: #0E4F9F; display: flex; align-items: center;
  justify-content: center; color: #fff; font: 400 19.6mm/1 'Figtree', 'Montserrat', sans-serif; letter-spacing: .015em; }
