/* ==========================================================================
   Gabarit de pied imprimable (gabarit-pied.html), en complément d'info.css.
   Préfixe gab- ; la feuille elle-même est un SVG à l'échelle réelle généré par
   tools/build_gabarit.py (1 unité = 0,1 mm, feuille de 190 × 257 mm).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Écran : téléchargement, consignes
   -------------------------------------------------------------------------- */
.gab-telecharger { display: flex; flex-direction: column; gap: var(--pc-space-5); }
.gab-carte {
  display: grid;
  gap: var(--pc-space-5);
  padding: clamp(1.25rem, 0.8rem + 3vw, 2.5rem);
  background: var(--pc-creme);
  border: 1px solid var(--pc-trait);
  box-shadow: var(--pc-ombre-1);
}
.gab-carte__texte p { margin-top: var(--pc-space-2); color: var(--pc-encre-douce); max-width: 52ch; }
.gab-carte__actions { display: flex; flex-wrap: wrap; gap: var(--pc-space-3); }
.gab-carte__actions .pc-btn { white-space: normal; text-align: left; }
.gab-poids { font-weight: 450; opacity: 0.9; }
@media (min-width: 56em) {
  .gab-carte { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .gab-carte__actions { flex-direction: column; align-items: stretch; }
}
.gab-attention p + p, .gab-indicatif p + p { margin-top: 0.375rem; }
.gab-attention { max-width: 52rem; }

.gab-etapes {
  display: grid;
  gap: var(--pc-space-5) var(--pc-space-6);
  margin-top: var(--pc-space-6);
  counter-reset: gab-etape;
}
@media (min-width: 48em) { .gab-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 72em) { .gab-etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gab-etape {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: var(--pc-space-4);
  align-items: start;
  counter-increment: gab-etape;
}
.gab-picto {
  width: 3.5rem;
  height: 3.5rem;
  padding: 0.5rem;
  border: 1px solid var(--pc-cuir);
  border-radius: var(--pc-radius-m);
  background: var(--pc-creme);
  fill: none;
  stroke: var(--pc-terracotta-fonce);
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gab-etape__titre { font-size: var(--pc-fs-lg); padding-top: 0.25rem; }
.gab-etape__titre::before { content: counter(gab-etape) ". "; color: var(--pc-terracotta-fonce); }
.gab-etape p { margin-top: 0.375rem; color: var(--pc-encre-douce); max-width: 46ch; }
.gab-indicatif { margin-top: var(--pc-space-6); max-width: 52rem; }

/* --------------------------------------------------------------------------
   2. Aperçu de la feuille
   -------------------------------------------------------------------------- */
.gab-feuille {
  max-width: 38rem;
  margin: 0 auto;
  padding: clamp(0.5rem, 2vw, 1rem);
  background: #fff;
  border-radius: var(--pc-radius-s);
  box-shadow: var(--pc-ombre-2);
}
.gab-svg { display: block; width: 100%; height: auto; }

/* --------------------------------------------------------------------------
   3. Impression : seule la feuille, à l'échelle réelle, centrée
   Feuille de 190 × 257 mm à 11 mm du haut : tient sur Lettre US (215,9 × 279,4 mm)
   comme sur A4 (210 × 297 mm), dans les marges physiques des imprimantes.
   -------------------------------------------------------------------------- */
@media print {
  @page { margin: 0; }
  html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  /* base.css donne au body min-height: 100vh : à l'impression, cela ajouterait une page blanche. */
  body { min-height: 0 !important; }
  body > :not(main), main > :not(.gab-impression) { display: none !important; }
  main { margin: 0 !important; padding: 0 !important; }
  .gab-impression, .gab-impression > .pc-container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    background: none !important;
  }
  .gab-impression .info-entete-section { display: none !important; }
  .gab-feuille {
    width: 190mm;
    max-width: none;
    margin: 11mm auto 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
  }
  .gab-svg { width: 190mm !important; height: 257mm !important; }
}
