/* Affiche de la vitrine au format A3 (espace organisateurs, 7 novembre). Couleurs des thèmes : theme.css.
   21 novembre (demande de l'opérateur) : pages A3 fixes, vignettes de taille égale et centrées sur chaque page.
   Affiche (à lire) : 16 vignettes par page, marges de 8 mm. Planche (à remplir) : 8 vignettes, marges de 12 mm, gros caractères.
   Les tailles sont en millimètres et en points : identiques à l'écran (aperçu réduit) et à l'impression. */
#affiche{background:#FFFFFF;color:#1F3A2A;border-radius:18px;padding:22px}
.affiche-outils{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:18px}
.affiche-outils .hint{flex-basis:100%;color:#4A5E50}

/* Une page A3. À l'écran : aperçu réduit de moitié, pages les unes sous les autres. */
.apage-cadre{width:calc(281mm * .5);height:calc(403mm * .5);margin:0 auto 18px;box-shadow:0 2px 10px rgba(0,0,0,.18);overflow:hidden;background:#FFFFFF}
.apage{width:281mm;height:403mm;box-sizing:border-box;display:flex;flex-direction:column;background:#FFFFFF;color:#1F3A2A;
  overflow:hidden;transform:scale(.5);transform-origin:top left}
.apage-tete{flex:none;display:flex;flex-direction:row;align-items:baseline;justify-content:center;gap:6mm;padding:0 0 3mm}
.apage-titre{font-family:'Lilita One','Arial Rounded MT Bold',sans-serif;font-weight:400;color:#29643A;text-transform:uppercase;font-size:24pt;line-height:1.1;text-align:center}
.apage-num{font-size:11pt;color:#4A5E50;font-weight:700}
.apage .agrid{flex:1;min-height:0;display:grid;justify-content:center;align-content:center}

/* Affiche : 4 × 4 vignettes de 67 × 94 mm (page de 281 × 403 mm, marges de 8 mm). */
.agrille{grid-template-columns:repeat(4,67mm);grid-template-rows:repeat(4,94mm);gap:3.5mm 3.6mm}
.avignette{--k:1;border:.6mm solid #DCE3DA;border-radius:3mm;overflow:hidden;display:flex;flex-direction:column;background:#FFFFFF;box-sizing:border-box;min-height:0}
.avignette .vhead{flex:none;padding:2mm 3.5mm;font-weight:800;font-size:calc(14pt * var(--k));line-height:1.15}
.avignette .abody{padding:1.8mm 3.5mm 2mm;display:flex;flex-direction:column;gap:1mm;flex:1;min-height:0}
.avignette p{margin:0}
.avignette .aby{font-weight:800;font-size:calc(10.5pt * var(--k))}
.avignette .adesc{font-size:calc(10pt * var(--k));line-height:1.25;color:#2F3D33}
.avignette .adates{font-size:calc(9.5pt * var(--k));font-weight:700;color:#29643A;margin-top:auto;padding-top:1.2mm;border-top:.4mm dashed #C9D3C6}
.avignette .aplaces{font-size:calc(10.5pt * var(--k));color:#29643A;font-weight:700}
.avignette .aplaces b{font-family:'Lilita One','Arial Rounded MT Bold',sans-serif;font-weight:400;font-size:calc(13pt * var(--k));margin-right:1mm}
.avignette .aplaces .amaj{white-space:nowrap;font-weight:400;font-size:calc(8pt * var(--k));color:#4A5E50}
.avignette .aref{font-family:'Lilita One','Arial Rounded MT Bold',sans-serif;font-size:calc(14pt * var(--k));color:#A32A30}

/* Planche A3 à remplir à la main (8 novembre) : 8 vignettes, 2 par ligne, qui remplissent la page ; fond blanc partout, lignes pointillées. */
.planche .apage-cadre{width:calc(273mm * .5);height:calc(395mm * .5)}
.planche .apage{width:273mm;height:395mm}
.planche-tete{flex-direction:column;align-items:center;gap:1mm;padding-bottom:3mm}
.planche-titre{font-family:'Lilita One','Arial Rounded MT Bold',sans-serif;font-weight:400;color:#29643A;text-align:center;font-size:34pt;line-height:1.1}
.planche-sous{text-align:center;font-weight:800;font-size:15pt}
.pgrid{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(4,1fr);gap:5mm;justify-content:stretch;align-content:stretch}
.pvignette{border:.8mm solid #29643A}
.pvhead{display:flex;align-items:flex-end;gap:3mm;padding:2mm 4mm 1.5mm;border-bottom:.8mm solid #29643A;background:#FFFFFF}
.pvhead .pchamp{flex:1;font-size:14pt;color:#29643A}
.pnum{border:.6mm solid #29643A;color:#29643A;border-radius:2.5mm;padding:0 2.5mm;font-weight:800;font-size:12pt;white-space:nowrap}
.pvignette .abody{padding:.5mm 4mm 2mm;gap:0;justify-content:space-between}
.pchamp{display:flex;align-items:flex-end;gap:2mm;font-size:12pt;margin:0;min-height:7mm}
.pchamp b{white-space:nowrap}
.pfill{flex:1;border-bottom:.5mm dotted #6B7D70;height:5.5mm}
.pligne2{display:flex;gap:5mm}
.pligne2 .pchamp{flex:3}
.pligne2 .pplaces{flex:1}
.pcoches{font-size:11.5pt;margin:1.5mm 0 0}
.pthemes{font-size:9pt;color:#4A5E50;margin:.8mm 0 0;line-height:1.2}
.paccord{font-size:10.5pt;margin:.8mm 0 0;font-weight:700;line-height:1.2}
.pcourt{display:inline-block;border-bottom:.5mm dotted #6B7D70;width:22mm;height:5mm;margin-left:1.5mm;vertical-align:bottom}
.pref{margin-top:1mm;padding-top:.8mm;border-top:.3mm dashed #C9D3C6;font-family:'Lilita One','Arial Rounded MT Bold',sans-serif;color:#A32A30;font-size:13pt}
.pref small{font-family:Arial,Helvetica,sans-serif;font-size:9pt;color:#6B7D70;margin-left:2mm}

/* Impression : seules les pages A3, en taille réelle, 1 page par feuille, couleurs gardées.
   Le format de papier (A3 portrait, marges de 12 mm) est imposé par affiche.js tant que l'affiche ou la planche est à l'écran. */
@media print{
  body.page-affiche{background:#FFFFFF}
  body.page-affiche header.top,body.page-affiche footer,body.page-affiche #cartbar,body.page-affiche #toast,
  body.page-affiche .affiche-outils,body.page-affiche .bandeau-test,body.page-affiche #organisateurs > .page-title,body.page-affiche .tabs{display:none !important}
  body.page-affiche .wrap,body.page-affiche main{max-width:none;padding:0;margin:0}
  body.page-affiche #affiche{border-radius:0;padding:0}
  body.page-affiche *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  body.page-affiche .apage-cadre{width:auto;height:auto;margin:0;box-shadow:none;overflow:visible;break-after:page;page-break-after:always}
  body.page-affiche .apage-cadre:last-child{break-after:auto;page-break-after:auto}
  body.page-affiche .apage{transform:none}
}
