/* =============================================================
   ASCO — Fiche d'inscription imprimable (A4, recto)
   Reproduit le formulaire papier officiel du club.
   ============================================================= */

/* La fiche n'existe qu'à l'impression.
   ⚠️ Sa typographie de base est déclarée ICI, et non dans le bloc
   `@media print` : elle doit s'appliquer aussi à la capture qui produit le
   PDF téléchargé. Placée dans le bloc d'impression, elle était ignorée lors
   de la capture, qui héritait alors de l'interligne de la page (1,65) — la
   fiche téléchargée sortait un cinquième plus haute que l'imprimée. */
#fiche {
  display: none;
  direction: ltr;
  text-align: left;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 8.6pt;
  line-height: 1.45;
  color: #000;
  width: 100%;
}

@page {
  size: A4 portrait;
  margin: 9mm 10mm;
}

@media print {
  /* --- On masque tout le site, on n'imprime que la fiche --- */
  body > *:not(#fiche) { display: none !important; }

  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* La typographie est définie plus haut, hors de ce bloc, pour être
     partagée avec la capture du PDF. Ici on ne fait que l'afficher. */
  #fiche { display: block; }

  a[href]::after { content: none !important; }

  .f-eviter-coupe { break-inside: avoid; page-break-inside: avoid; }
}

/* -------------------------------------------------------------
   Styles de la fiche (hors media query pour rester lisibles
   dans l'aperçu avant impression de tous les navigateurs)
   ------------------------------------------------------------- */

#fiche * { box-sizing: border-box; }

/* --- En-tête --- */
.f-entete {
  display: flex;
  align-items: stretch;
  gap: 8px;
  border: 1.6pt solid #c8102e;
  border-radius: 4pt;
  padding: 5pt 7pt;
  margin-bottom: 5pt;
}

.f-entete__logo { width: 52pt; flex: none; display: flex; align-items: center; }
.f-entete__logo img { width: 100%; height: auto; }

.f-entete__centre { flex: 1; text-align: center; min-width: 0; }

.f-club {
  font-size: 9.5pt;
  font-weight: 700;
  letter-spacing: 0.4pt;
  text-transform: uppercase;
  line-height: 1.2;
}
.f-club-ar { font-size: 9pt; font-weight: 700; direction: rtl; }

.f-titre {
  display: inline-block;
  background: #c8102e;
  color: #fff !important;
  font-size: 11pt;
  font-weight: 800;
  letter-spacing: 0.8pt;
  padding: 1.5pt 12pt;
  border-radius: 3pt;
  margin-top: 2pt;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.f-saison {
  font-size: 8.6pt;
  font-weight: 700;
  letter-spacing: 1pt;
  margin-top: 1.5pt;
}

.f-photo {
  width: 66pt;
  height: 88pt;
  flex: none;
  border: 0.9pt dashed #666;
  border-radius: 2pt;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 6.6pt;
  color: #666;
  overflow: hidden;
  align-self: center;
}
.f-photo img { width: 100%; height: 100%; object-fit: cover; }

/* --- Bandeau référence --- */
.f-ref {
  display: flex;
  gap: 6pt;
  margin-bottom: 5pt;
}
.f-ref__case {
  flex: 1;
  border: 0.8pt solid #bbb;
  border-radius: 3pt;
  padding: 2.5pt 7pt;
  display: flex;
  align-items: baseline;
  gap: 5pt;
}
.f-ref__lib {
  font-size: 6.6pt;
  text-transform: uppercase;
  letter-spacing: 0.4pt;
  color: #666;
  font-weight: 700;
}
.f-ref__val {
  font-weight: 800;
  font-size: 9.4pt;
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 0.3pt;
}

/* --- Sections --- */
.f-sec { margin-bottom: 5pt; }

.f-sec__titre {
  background: #4a4a4a;
  color: #fff !important;
  font-size: 7.8pt;
  font-weight: 800;
  letter-spacing: 0.7pt;
  text-transform: uppercase;
  padding: 2pt 8pt;
  border-radius: 2.5pt 2.5pt 0 0;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.f-sec__titre--rouge { background: #c8102e; }

.f-sec__corps {
  border: 0.8pt solid #999;
  border-top: none;
  border-radius: 0 0 2.5pt 2.5pt;
  padding: 5pt 8pt 6pt;
}

/* --- Lignes de champs --- */
.f-ligne {
  display: flex;
  gap: 12pt;
  margin-bottom: 3.4pt;
}
.f-ligne:last-child { margin-bottom: 0; }

.f-champ {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 3pt;
  min-width: 0;
}
.f-champ--2 { flex: 2; }
.f-champ--3 { flex: 3; }

.f-lib { white-space: nowrap; font-size: 8.2pt; }

.f-val {
  flex: 1;
  border-bottom: 0.7pt dotted #333;
  min-height: 11pt;
  font-weight: 700;
  padding: 0 2pt 0.5pt;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.f-val--libre { font-weight: 400; white-space: normal; }
/* Pour les valeurs potentiellement longues (e-mail, contact d'urgence) */
.f-val--compact { font-size: 7.4pt; letter-spacing: -0.05pt; }

/* Cases à cocher */
.f-coche {
  display: inline-flex;
  align-items: center;
  gap: 2.5pt;
  white-space: nowrap;
  font-size: 8.2pt;
}
.f-box {
  width: 8pt;
  height: 8pt;
  border: 0.8pt solid #333;
  border-radius: 1pt;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 7.5pt;
  font-weight: 900;
  line-height: 1;
  flex: none;
}
.f-box--cochee::after {
  content: "\2715";
  color: #c8102e;
}

/* --- Deux colonnes (autorisation / certificat) --- */
.f-duo { display: flex; gap: 5pt; align-items: stretch; }
.f-duo > * { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.f-encadre {
  border: 0.8pt solid #999;
  border-radius: 2.5pt;
  padding: 0;
  overflow: hidden;
  height: 100%;
}
.f-encadre__titre {
  background: #eee;
  border-bottom: 0.8pt solid #999;
  font-size: 7.6pt;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4pt;
  padding: 1.8pt 7pt;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.f-encadre__corps {
  padding: 4.5pt 7pt 5pt;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.f-texte { font-size: 7.9pt; line-height: 1.42; text-align: justify; margin: 0 0 4pt; }
.f-texte strong { text-decoration: underline; }

.f-signature {
  margin-top: auto;
  padding-top: 3pt;
}
.f-cadre-signature {
  border: 0.7pt solid #aaa;
  border-radius: 2pt;
  height: 34pt;
  margin-top: 2.5pt;
}
.f-cadre-signature--haut { height: 42pt; }
.f-legende {
  text-align: center;
  font-size: 6.8pt;
  color: #555;
  font-style: italic;
  margin-top: 1.5pt;
}

/* La légalisation de la signature est une démarche à part, à l'APC :
   elle se signale sous le cadre de signature, en rouge du club, pour
   que le parent ne l'apprenne pas au guichet du dépôt. */
.f-legalise {
  color: #c8102e;
  font-weight: 700;
  font-style: normal;
  white-space: nowrap;
}

/* --- Pièces + réservé au club --- */
.f-bas { display: flex; gap: 5pt; align-items: stretch; }
.f-bas__gauche { flex: 1.15; display: flex; }
.f-bas__droite { flex: 1; display: flex; }
.f-bas__cachet { flex: 0 0 78pt; display: flex; }

.f-pieces { list-style: none; margin: 0; padding: 0; columns: 1; }
.f-pieces li {
  display: flex;
  align-items: flex-start;
  gap: 3.5pt;
  font-size: 7.6pt;
  line-height: 1.35;
  margin-bottom: 1.6pt;
}
.f-pieces .f-box { margin-top: 0.8pt; }

.f-cachet {
  border: 0.9pt dashed #999;
  border-radius: 2.5pt;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  font-size: 6.8pt;
  color: #666;
  padding-top: 4pt;
  width: 100%;
  min-height: 96pt;
}

/* --- Pied de fiche --- */
.f-pied {
  margin-top: 5pt;
  border-top: 1.2pt solid #c8102e;
  padding-top: 3pt;
  display: flex;
  justify-content: space-between;
  gap: 10pt;
  font-size: 6.9pt;
  color: #444;
}
.f-devise { font-style: italic; font-weight: 700; color: #c8102e; }

.f-mention {
  font-size: 6.6pt;
  color: #666;
  text-align: center;
  margin-top: 2.5pt;
  font-style: italic;
}

/* Date limite de dépôt : dernière ligne de la fiche, en rouge du
   club, pour que le parent la retrouve sur le papier qu'il emporte. */
.f-limite {
  font-size: 7.4pt;
  color: #c8102e;
  text-align: center;
  margin-top: 2pt;
  font-weight: 700;
}
