/* Parchemins à imprimer (A4) */
:root {
  --encre: #3b2914;
  --encre-douce: #6b5232;
  --bordure: #8a5a1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #d9d2c5;
  color: var(--encre);
  font-family: 'Nunito', system-ui, sans-serif;
}

.barre-impression {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: #1d1446;
  color: #f4eeff;
  text-align: center;
}
.barre-impression p { margin: 0; }
.barre-impression button {
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: #f3c25a;
  color: #2a1a05;
  font: 800 1rem 'Nunito', sans-serif;
  cursor: pointer;
}

.feuille {
  position: relative;
  width: 210mm;
  min-height: 297mm;
  max-width: 100%;
  margin: 20px auto;
  padding: 20mm 18mm;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.parchemin {
  text-align: center;
  border: 3mm double var(--bordure);
  outline: 1px solid var(--bordure);
  outline-offset: -7mm;
}

.numero {
  font: 700 0.95rem 'Cinzel', serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--encre-douce);
  margin: 0 0 4mm;
}

h1 {
  font: 700 2.1rem 'Cinzel Decorative', serif;
  color: #5a3410;
  margin: 0 0 4mm;
}

.sous-titre { font-size: 1.2rem; font-weight: 800; margin: 0 0 8mm; }
.note { font-size: 1.15rem; font-style: italic; margin-top: 10mm; }

.cle-runes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6mm; margin: 6mm auto; max-width: 150mm; }
.cle-case { display: flex; flex-direction: column; align-items: center; padding: 3mm; border: 1px solid #c9a46a; border-radius: 3mm; color: #2c1a55; }
.cle-case span { font: 800 1.5rem 'Nunito', sans-serif; color: var(--encre); }

.sceau-coin { position: absolute; right: 16mm; bottom: 16mm; width: 26mm; }
.sceau { width: 100%; height: auto; display: block; }

.miroir {
  transform: scaleX(-1);
  margin: 18mm 6mm 0;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.5;
}
.miroir p { margin: 0 0 8mm; }

.carte-ciel { width: 150mm; max-width: 100%; height: auto; margin: 4mm auto 0; display: block; }
.carte-ciel .traits line { stroke: var(--encre); stroke-width: 2.2; stroke-linecap: round; }
.nom-constellation { font: 700 16px 'Cinzel', serif; fill: var(--encre); }

.sceau-silence { display: flex; align-items: center; justify-content: center; gap: 8mm; margin-top: 6mm; }
.sceau-silence .sceau { width: 30mm; }
.petit-titre { font: 700 1rem 'Cinzel', serif; margin: 0; }
.mot-sceau { font: 700 2.4rem 'Cinzel Decorative', serif; color: #8a1a24; margin: 0; letter-spacing: 0.08em; }

.dechire { position: relative; display: flex; flex-direction: column; justify-content: space-around; }
.dechire > * { margin-top: 0; margin-bottom: 0; }
.plume-signature { display: block; width: 30mm; margin: 0 auto; transform: rotate(-20deg); }
.decoupe { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.decoupe path { fill: none; stroke: #9a8a70; stroke-width: 0.6; stroke-dasharray: 3 2; }
.pie-parchemin { display: block; width: 45mm; margin: 2mm auto; }
.message-pie { font: 700 2.3rem 'Cinzel', serif; letter-spacing: 0.18em; line-height: 1.5; color: #2c1a55; }
.message-pie p { margin: 0 0 12mm; }
.blason-tresor { display: block; width: 70mm; margin: 6mm auto 2mm; }
.noms { font: 700 1.8rem 'Cinzel', serif; line-height: 1.6; margin: 8mm 0; }
.noms small { font: 600 1rem 'Nunito', sans-serif; color: var(--encre-douce); }
.signature { font: 700 1.2rem 'Cinzel', serif; margin-top: 14mm; }
.signature small { font: 500 0.9rem 'Nunito', sans-serif; }

.fiche { font-size: 10.5pt; line-height: 1.45; }
.fiche h1 { font-size: 1.6rem; text-align: center; }
.fiche h2 { font: 700 1.05rem 'Cinzel', serif; color: #5a3410; margin: 6mm 0 2mm; border-bottom: 1px solid #c9a46a; padding-bottom: 1mm; }
.fiche ul, .fiche ol { margin: 0; padding-left: 6mm; }
.fiche li { margin: 1.4mm 0; }
.cases { list-style: none; padding-left: 0 !important; }
.cases li::before { content: '☐ '; font-size: 1.1em; }

@page { size: A4; margin: 0; }

@media print {
  body { background: #fff; }
  .barre-impression { display: none; }
  .feuille { margin: 0; box-shadow: none; width: 210mm; height: 297mm; min-height: 0; overflow: hidden; page-break-after: always; break-after: page; }
  .feuille:last-child { page-break-after: auto; break-after: auto; }
  .feuille.fiche { height: auto; min-height: 0; overflow: visible; padding: 12mm 15mm; }
}

@media screen and (max-width: 800px) {
  .feuille { padding: 10mm 8mm; min-height: 0; }
  .parchemin { outline-offset: -4mm; }
  h1 { font-size: 1.5rem; }
  .miroir { font-size: 1.2rem; }
}
