/* Fiche de transmission : 2 pages A4. Reprise de style/pdf.css (version 1.1 du 18/10/2026), la référence visuelle
   de la fiche. L'appli montre ces pages telles quelles, réduites à la largeur du téléphone, et l'export PDF passe par
   l'impression du navigateur (« Enregistrer au format PDF »), sans bibliothèque de plus.

   Règles : fond blanc, texte toujours noir. La couleur du club n'apparaît
   que sur le bandeau, les titres, les filets, les encadrés de titre, les
   tracés des graphiques et le bas de page, jamais sous le texte courant.
   N'utilise que les variables de tokens.css. */

@page { size: A4; margin: 0; }

/* ---------- Écran : les pages posées sur le fond, réduites à la largeur du téléphone ---------- */

.fiche-ecran {
  margin: 0;
  padding: 20px 16px 48px;
  background: var(--fond);
  font-family: var(--police-texte);
  -webkit-text-size-adjust: 100%;
}
.fiche-note {
  box-sizing: border-box;
  max-width: 794px;
  margin: 0 auto 16px;
  font-size: var(--t-petit);
  line-height: 1.45;
  color: var(--encre-2);
}
.fiche-note a { color: var(--club-principal); font-weight: 700; }
.fiche-pages { display: flex; flex-direction: column; align-items: center; gap: 24px; }

/* ---------- La page ---------- */

.fiche-page {
  position: relative;
  box-sizing: border-box;
  width: 210mm;
  height: 297mm;
  overflow: hidden;
  background: var(--pdf-fond);
  color: var(--pdf-texte);
  font: 400 8.8pt/1.38 var(--police-texte);
  box-shadow: 0 0 0 1px var(--ligne);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.fiche-corps { padding: 2mm 14mm 0; display: flex; flex-direction: column; gap: 4.6mm; }
.fiche-page b, .fiche-page strong { font-weight: 800; }
.fiche-petit { font-size: 7.4pt; line-height: 1.35; }
.fiche-chiffre { font: italic 800 17pt/0.9 var(--police-titre); font-variant-numeric: tabular-nums; }
.fiche-gros { font: italic 800 24pt/0.9 var(--police-titre); }

@media print {
  .fiche-ecran { padding: 0; background: none; }
  .fiche-note { display: none; }
  .fiche-pages { display: block; zoom: 1 !important; }
  .fiche-page { box-shadow: none; break-after: page; }
  .fiche-page:last-child { break-after: auto; }
}

/* ---------- Bandeau ---------- */

.fiche-bandeau { position: relative; padding-bottom: 2.2mm; color: var(--club-sur-principal); }
.fiche-bandeau__lisere {
  position: absolute;
  inset: 0;
  background: var(--club-accent);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6.5mm), 0 100%);
}
.fiche-bandeau__corps {
  position: relative;
  overflow: hidden;
  background: var(--club-principal);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9mm), 0 100%);
  padding: 6mm 14mm 12mm;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6mm;
}
.fiche-bandeau__motif {
  position: absolute;
  top: 0;
  right: 0;
  width: 70mm;
  height: 100%;
  fill: none;
  stroke: var(--sur-bandeau-trace);
  stroke-width: 2;
}
.fiche-bandeau__club { position: relative; display: flex; align-items: center; gap: 4mm; }
.fiche-logo { width: 13mm; height: 15mm; flex: none; }
img.fiche-logo { width: auto; height: 14mm; }  /* logo du club en image, sans arrière-plan */
.fiche-logo path { fill: var(--sur-bandeau-calque); stroke: var(--club-accent-lisible); stroke-width: 2; }
.fiche-logo text { fill: var(--club-sur-principal); font: italic 800 15px var(--police-titre); }
.fiche-bandeau__nom-club { display: block; font-size: 8.5pt; font-weight: 700; }
.fiche-bandeau__titre { display: block; margin: 0; font: italic 800 25pt/0.95 var(--police-titre); }
.fiche-bandeau__infos { position: relative; text-align: right; font-size: 8pt; line-height: 1.5; color: var(--sur-bandeau-doux); }
.fiche-bandeau__infos b { color: var(--club-sur-principal); }

/* Bandeau réduit de la page 2 */
.fiche-bandeau--suite .fiche-bandeau__corps { padding: 5mm 14mm 9mm; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5mm), 0 100%); }
.fiche-bandeau--suite .fiche-bandeau__lisere { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3.5mm), 0 100%); }
.fiche-bandeau--suite .fiche-bandeau__titre { font-size: 15pt; }

/* ---------- Titres de section ---------- */

.fiche-titre {
  margin: 0 0 2.2mm;
  display: flex;
  align-items: baseline;
  gap: 2.5mm;
  font: italic 700 13pt/1 var(--police-titre);
  color: var(--club-principal);
}
.fiche-titre::after { content: ""; flex: 1; height: 0.3mm; background: var(--club-principal); opacity: 0.25; }
.fiche-titre__detail { font: 600 7.4pt/1 var(--police-texte); color: var(--pdf-texte); }

/* ---------- Identité ---------- */

.fiche-nom { margin: 0; font: italic 800 28pt/1 var(--police-titre); color: var(--club-principal); }
.fiche-faits {
  margin: 2.5mm 0 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 0.3mm solid var(--pdf-trait);
  border-bottom: 0.3mm solid var(--pdf-trait);
}
.fiche-faits > div { padding: 1.8mm 2.5mm; }
.fiche-faits > div + div { border-left: 0.3mm solid var(--pdf-trait); }
.fiche-faits dt { font-size: 7.2pt; }
.fiche-faits dd { margin: 0.6mm 0 0; font-size: 10.5pt; font-weight: 800; line-height: 1.15; }
.fiche-faits dd.fiche-petit { margin-top: 0.3mm; font-size: 7.2pt; font-weight: 400; }
.fiche-base { margin: 2mm 0 0; font-size: 7.6pt; }

/* ---------- Encadré de titre (avis du coach) ---------- */

.fiche-encadre { border: 0.35mm solid var(--club-principal); border-radius: 2.5mm; overflow: hidden; }
.fiche-encadre__titre {
  display: inline-block;
  margin: 0;
  padding: 1.4mm 3.5mm 1.6mm;
  border-radius: 0 0 2.5mm 0;
  background: var(--club-principal);
  color: var(--club-sur-principal);
  font: italic 700 11pt/1 var(--police-titre);
}
.fiche-avis { padding: 2.5mm 4mm 0; display: grid; grid-template-columns: 52mm minmax(0, 1fr); gap: 5mm; align-items: start; }
.fiche-avis__equipe { display: flex; flex-direction: column; gap: 1.2mm; }
.fiche-avis__texte { margin: 0; font-size: 9.2pt; line-height: 1.42; }
.fiche-avis__texte footer { margin-top: 1.2mm; font-size: 7.4pt; }
.fiche-signal { margin: 2.5mm 4mm 3mm; padding-top: 2mm; border-top: 0.3mm solid var(--pdf-trait); display: flex; align-items: flex-start; gap: 2mm; font-size: 8.4pt; }
.fiche-signal svg { width: 4.2mm; height: 4.2mm; flex: none; fill: none; stroke: var(--club-principal); stroke-width: 2.2; stroke-linecap: round; }

/* ---------- Courbes des 4 critères ---------- */

.fiche-lecture { margin: -0.6mm 0 2.6mm; font-size: 7.4pt; }
.fiche-courbes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm 7mm; }
.fiche-courbe { margin: 0; }
/* En-tête d'une courbe : nom et chiffre de la saison sur la 1re ligne, portée et écart sur la 2e */
.fiche-courbe__entete { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.4mm 3mm; margin-bottom: 1mm; }
.fiche-courbe__nom { font: italic 700 12pt/1 var(--police-titre); color: var(--club-principal); }
.fiche-courbe__entete .fiche-chiffre { text-align: right; }
.fiche-courbe__ecart { text-align: right; font-weight: 700; }
.fiche-graphe { display: block; width: 100%; height: auto; overflow: visible; }
.fiche-graphe text { fill: var(--pdf-texte); font: 600 8.4px var(--police-texte); }
.fiche-graphe .fiche-graphe__saison { font-weight: 700; }
.fiche-graphe__grille { stroke: var(--pdf-trait); stroke-width: 0.6; }
.fiche-graphe__saut { stroke: var(--pdf-trait); stroke-width: 0.8; stroke-dasharray: 2 2; }
.fiche-graphe__trait { fill: none; stroke: var(--club-principal); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.fiche-graphe__point { fill: var(--club-principal); stroke: var(--pdf-fond); stroke-width: 0.9; }
.fiche-graphe__dernier { fill: var(--club-accent); stroke: var(--club-principal); stroke-width: 1.3; }

/* ---------- Jongles ---------- */

.fiche-jongles { display: flex; flex-direction: column; }
.fiche-jongle {
  display: grid;
  grid-template-columns: 25mm 17mm minmax(0, 1fr) 72mm;
  gap: 4mm;
  align-items: center;
  padding: 1.6mm 0;
}
.fiche-jongle + .fiche-jongle { border-top: 0.3mm solid var(--pdf-trait); }
.fiche-jongle__nom b { display: block; font-size: 9.4pt; }
.fiche-jongle__valeur { display: flex; align-items: baseline; gap: 1.2mm; }
.fiche-jongle__barre { position: relative; height: 2.6mm; border-radius: 1.3mm; background: var(--piste); }
.fiche-jongle__barre > span:first-child { display: block; height: 100%; width: var(--valeur); border-radius: 1.3mm; background: var(--club-principal); }
.fiche-jongle__palier { position: absolute; top: -0.5mm; left: var(--position); width: 0.6mm; height: 3.6mm; transform: translateX(-0.3mm); background: var(--pdf-fond); }
.fiche-jongle__palier[data-etat="prochain"] { width: 1.1mm; transform: translateX(-0.55mm); border-radius: 0.5mm; background: var(--club-accent); box-shadow: 0 0 0 0.25mm var(--club-principal); }
.fiche-jongle__palier[data-etat="a-venir"] { background: var(--controle); }
.fiche-note-bas { margin: 1.6mm 0 0; font-size: 7.4pt; }

/* ---------- Listes, tableaux, objectifs ---------- */

.fiche-liste { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1.5mm; }
.fiche-liste li { padding-left: 3.6mm; position: relative; }
.fiche-liste li::before { content: ""; position: absolute; left: 0; top: 1.6mm; width: 1.4mm; height: 1.4mm; border-radius: 50%; background: var(--club-principal); }

.fiche-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fiche-table th { padding: 1.2mm 2mm 1.4mm; border-bottom: 0.35mm solid var(--club-principal); text-align: left; font-size: 7.4pt; font-weight: 700; }
.fiche-table td { padding: 1.3mm 2mm; border-bottom: 0.25mm solid var(--pdf-trait); vertical-align: top; }
.fiche-table th:first-child, .fiche-table td:first-child { padding-left: 0; }
.fiche-table tbody th { padding: 1.3mm 2mm 1.3mm 0; border-bottom: 0.25mm solid var(--pdf-trait); font-size: inherit; font-weight: 700; }

/* Repère de type d'objectif : un petit carré de couleur, le mot reste en noir */
.fiche-type { display: inline-block; width: 2.3mm; height: 2.3mm; margin-right: 1.4mm; border-radius: 0.5mm; vertical-align: 0; background: var(--objectif-coach); }
.fiche-type--categorie { background: var(--objectif-categorie); }
.fiche-type--defi { background: var(--objectif-defi); }

.fiche-objectifs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5mm; margin-top: 3mm; }
.fiche-objectifs h3 { margin: 0 0 1.4mm; font-size: 8.4pt; font-weight: 800; }
.fiche-objectifs ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1.3mm; }
.fiche-objectifs li { display: flex; flex-direction: column; gap: 0.2mm; font-size: 8.2pt; line-height: 1.28; }
.fiche-objectifs li span { font-size: 7.2pt; }

/* Historique des tests de jongles : record en gras */
.fiche-table--tests th, .fiche-table--tests td { text-align: center; }
.fiche-table--tests th:first-child, .fiche-table--tests td:first-child { text-align: left; }
.fiche-table--tests thead tr:first-child th { border-bottom-width: 0.25mm; border-bottom-color: var(--pdf-trait); }
.fiche-table--tests .fiche-saut { border-left: 0.25mm solid var(--pdf-trait); }

.fiche-bilans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6mm; }
.fiche-bilan { margin: 0; }
.fiche-bilan p { margin: 0; font-size: 8.6pt; }
.fiche-bilan footer { margin-top: 1mm; font-size: 7.2pt; }

/* ---------- Bas de page ---------- */

.fiche-pied { position: absolute; left: 14mm; right: 14mm; bottom: 8mm; display: flex; flex-direction: column; gap: 1.6mm; font-size: 7pt; }
.fiche-filet { display: flex; height: 0.6mm; }
.fiche-filet span:first-child { flex: 1; background: var(--club-principal); }
.fiche-filet span:last-child { width: 14mm; background: var(--club-accent); }
.fiche-pied__texte { display: flex; justify-content: space-between; gap: 6mm; }
