/* ============================================================
   ProxyLayers — page Impression : réglages à gauche, aperçu des planches à droite
   ============================================================ */
.imp-page .page__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.imp-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 22px; align-items: start; }
/* Le bloc prend toute la hauteur de son contenu (pas de défilement interne) ; ancré par le BAS : quand on défile la page, le bas (bouton Imprimer) reste visible */
.imp-side { position: sticky; bottom: 16px; align-self: start; display: grid; gap: 12px; }
.imp-card { padding: 14px 16px; }
.imp-card .panel__title { margin-bottom: 4px; }
.imp-card .set-sub { margin: 0 0 10px; font-family: "Cormorant SC", Georgia, serif; font-size: 18px; font-weight: 700; letter-spacing: .03em; color: var(--on-surface); }
.imp-info { margin: 0; font-size: 13px; color: var(--primary-light); font-weight: 600; }
.imp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 14px; }
.imp-row .numinput { width: 64px; }
.imp-check { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; cursor: pointer; }
.imp-check[hidden] { display: none; }
.imp-check input { accent-color: var(--primary); }
.imp-go { width: 100%; justify-content: center; margin-bottom: 10px; }
.imp-dl { display: flex; gap: 8px; margin-bottom: 10px; }
.imp-dl .btn-ghost { flex: 1; justify-content: center; }
.imp-preview { min-width: 0; }
.imp-preview .sheets { margin-top: 0; }

@media (max-width: 980px) {
  .imp-layout { grid-template-columns: 1fr; }
  .imp-side { position: static; max-height: none; overflow: visible; }
}

/* impression papier : seules les planches restent */
@media print {
  .imp-page { padding: 0 !important; margin: 0 !important; max-width: none !important; width: auto !important; }
  .imp-page .page__head, .imp-side, .imp-empty { display: none !important; }
  .imp-layout { display: block !important; }
}

/* repères de coupe : traits noirs dans les marges, jamais sur les cartes */
.sheet__marks { --mw: 1px; position: absolute; inset: 0; pointer-events: none; }
.sheet__marks i { position: absolute; background: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.imp-page .sheets--marks .sheet__cell::after, .imp-page .sheets--marks .sheet::before, .imp-page .sheets--marks .sheet::after { content: none !important; display: none !important; }

/* impression : chaque planche a exactement la taille de son papier (le style générique la forçait à 210 × 297 mm) */
@media print {
  .imp-page .sheet--letter { width: 216mm !important; height: 279mm !important; }
  .imp-page .sheet--a3 { width: 297mm !important; height: 420mm !important; }
  .imp-page .sheet { overflow: hidden; break-inside: avoid; }
}

.sheet__marks i.x, .sheet__marks i.t { background: #8c8c8c; } /* croix grises + petits repères clairs du contour de la grille */

/* bandeau d'ouverture du booster : 75 mm, plis en pointillés, languette de colle hachurée ; face/dos = logo, icône d'extension, bande noire avec le nom en défonce */
.sheet__band { position: absolute; display: flex; box-sizing: border-box; border: 1px solid #000; background: var(--bg); color: #fff; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet__band b { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; box-sizing: border-box; min-width: 0; padding: 4mm 0 21mm; }
.sheet__band b.t { background: var(--bg1, #060918); }
.sheet__band b.g { background: repeating-linear-gradient(135deg, var(--bg) 0 4px, var(--surface-high) 4px 8px); }
.sheet__band .band-logo-w { position: relative; width: 72%; flex: none; }
.sheet__band .band-logo { position: relative; width: 100%; height: auto; display: block; }
/* petit contour noir en dégradé autour du logo */
.sheet__band .band-logo-w::before { content: ""; position: absolute; inset: -3mm -4mm; background: radial-gradient(ellipse closest-side, rgba(0, 0, 0, .55) 55%, rgba(0, 0, 0, .28) 78%, rgba(0, 0, 0, 0)); }
.sheet__band .band-ico { position: relative; flex: none; margin: auto 0; width: 46mm; height: 46mm; display: grid; place-items: center; }
/* halo : dégradé noir autour de la forme de l'icône */
.sheet__band .band-ico::before { content: ""; position: absolute; inset: -3mm; background: radial-gradient(closest-side, rgba(0, 0, 0, .7), rgba(0, 0, 0, .35) 60%, rgba(0, 0, 0, 0)); }
.sheet__band .band-ico svg { position: relative; height: 100%; width: auto; max-width: 100%; display: block; opacity: .5; }
.sheet__band .band-ico svg path { fill: #fff !important; }
.sheet__band u { position: absolute; left: 0; right: 0; bottom: 5mm; height: 11mm; display: grid; place-items: center; text-decoration: none; background: var(--bar, rgba(6, 9, 24, .75)); }
.sheet__band u em { font: 700 17px/1 "Cormorant SC", Georgia, serif; letter-spacing: .22em; text-transform: uppercase; font-style: normal; color: #fff; white-space: nowrap; overflow: hidden; max-width: 96%; }
.sheet__band b.g u { display: none; }
.sheet__band .band-art { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; }
/* fondu : la couleur du site vient sur l'illustration sur 5 mm de chaque côté (là où le bandeau se plie sur les tranches), + léger voile sous le logo */
.sheet__band .band-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg1, #060918), var(--bg0, rgba(6, 9, 24, 0)) 5mm, var(--bg0, rgba(6, 9, 24, 0)) calc(100% - 5mm), var(--bg1, #060918)), linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .15)); }

.imp-row[hidden] { display: none; }

/* A3 paysage (boosters) : 5 colonnes de cartes ; la première piste (inline) décale la grille pour laisser la place au bandeau */
.sheet--a3l { aspect-ratio: 420 / 297; max-width: 1100px; justify-content: start; align-content: center; grid-auto-rows: auto; }
.sheet--a3l .sheet__cell:nth-child(5n + 1) { grid-column: 2; }
@media print {
  .imp-page .sheet--a3l { width: 420mm !important; height: 297mm !important; }
}
