/* Fiches horaires Arverne (A4 paysage) — DA « Basalte », voir docs/arverne/CONTRAT.md */
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/Archivo-latin.woff2") format("woff2");
  font-weight: 500 900;
  font-stretch: 100% 125%;
  font-display: block;
}
@font-face { font-family: "Citroen Type"; src: url("/assets/fonts/CitroenType-Regular.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Citroen Type"; src: url("/assets/fonts/CitroenType-Bold.woff2") format("woff2"); font-weight: 700; font-display: block; }
@font-face { font-family: "Citroen Type"; src: url("/assets/fonts/CitroenType-Black.woff2") format("woff2"); font-weight: 900; font-display: block; }

.fa-feuille {
  --basalte: #1e2229;
  --lave: #c8461c;
  --pierre: #8a8f98;
  --calcaire: #e9e6e1;
  --calcaire-2: #f4f2ef;
  --tcm: #204bfe;
  width: 297mm;
  height: 210mm;
  background: #fff;
  color: var(--basalte);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: "Citroen Type", ui-sans-serif, system-ui, sans-serif;
  font-size: 8pt;
  line-height: 1.25;
  position: relative;
}
.fa-feuille * { box-sizing: border-box; }
.fa-feuille h2, .fa-feuille h3, .fa-feuille p, .fa-feuille ul { margin: 0; padding: 0; list-style: none; }
.fa-cadre { max-width: 100%; overflow: hidden; }
.fa-zoom { transform-origin: top left; box-shadow: 0 18px 40px -20px rgb(7 11 26 / 0.45); }

/* bandeau */
.fa-bande {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8mm;
  height: 27mm;
  padding: 0 10mm;
  background: var(--basalte);
  color: var(--calcaire);
  position: relative;
  overflow: hidden;
  border-bottom: 1.6mm solid var(--lave);
}
.fa-bande::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 52mm;
  width: 30mm;
  background: linear-gradient(135deg, transparent 0 46%, var(--lave) 46% 54%, transparent 54% 100%);
  opacity: 0.55;
  pointer-events: none;
}
.fa-bande > * { position: relative; z-index: 1; }
.fa-marque { display: flex; align-items: center; gap: 3mm; }
.fa-marque-nom, .fa-titre h2 { font-family: "Archivo", "Citroen Type", sans-serif; font-stretch: 118%; font-weight: 800; text-transform: uppercase; }
.fa-marque-nom { font-size: 15pt; letter-spacing: 0.02em; }
.fa-sur { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 7pt; letter-spacing: 0.14em; text-transform: uppercase; color: #ef6f45; }
.fa-titre h2.fa-long { font-size: 13.5pt; }
.fa-titre h2 { font-size: 17pt; line-height: 1.02; letter-spacing: 0.005em; margin-top: 1mm; }
.fa-fleche { color: #ef6f45; }
.fa-sous { margin-top: 1.2mm; font-size: 8pt; color: rgb(233 230 225 / 0.7); }
.fa-validite { text-align: right; font-size: 7pt; color: rgb(233 230 225 / 0.7); }
.fa-validite p { margin-top: 1.5mm; }
.fa-chip { display: inline-block; padding: 1.2mm 3mm; background: var(--lave); color: #fff; font-family: "Archivo", sans-serif; font-weight: 800; font-size: 7pt; letter-spacing: 0.1em; text-transform: uppercase; border-radius: 2.2mm 0 2.2mm 0; }

/* tableau */
.fa-corps { padding: 5mm 10mm 0; flex: 1 1 auto; min-height: 0; }
.fa-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.fa-table col { width: var(--col); }
.fa-table col.fa-c-gare { width: 52mm; }
.fa-table col.fa-c-voie { width: 9mm; }
.fa-table th, .fa-table td { padding: 0 0.6mm; text-align: center; vertical-align: middle; }
.fa-table thead th[scope="row"], .fa-table thead td:first-child { text-align: left; }
.fa-table thead th[scope="row"] { font-size: 6.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--pierre); padding-left: 1.5mm; }
.fa-num th { height: 7mm; font-family: "Archivo", sans-serif; font-weight: 800; font-size: 10pt; color: var(--basalte); border-bottom: 0.3mm solid var(--basalte); }
.fa-num th[scope="row"] { font-family: "Citroen Type", sans-serif; font-size: 6.5pt; }
.fa-gamme td, .fa-gamme th { height: 6.5mm; }
.fa-pastille { display: inline-block; padding: 0.5mm 1mm; font-family: "Archivo", sans-serif; font-weight: 800; font-size: 5.4pt; letter-spacing: 0.03em; text-transform: uppercase; border-radius: 1.4mm 0 1.4mm 0; white-space: nowrap; }
.fa-jours td, .fa-jours th { height: 5.5mm; font-size: 5.6pt; color: var(--pierre); line-height: 1.1; border-bottom: 0.3mm solid var(--basalte); }
.fa-jours td { padding: 0 0.3mm; }
.fa-note, sup.fa-note { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 6pt; color: var(--lave); vertical-align: super; line-height: 0; margin-left: 0.3mm; }
.fa-table tbody tr { height: var(--rh, 9.4mm); }
.fa-table tbody tr:nth-child(even) { background: var(--calcaire-2); }
.fa-table tbody tr + tr th, .fa-table tbody tr + tr td { border-top: 0.15mm solid #dcd7cf; }
.fa-table tbody tr:last-child th, .fa-table tbody tr:last-child td { border-bottom: 0.3mm solid var(--basalte); }
.fa-table .fa-gare { text-align: left; padding-left: 3mm !important; font-weight: 700; font-size: 8.4pt; white-space: nowrap; overflow: hidden; }
.fa-terminus .fa-nom, .fa-siege .fa-nom { font-family: "Archivo", sans-serif; font-weight: 800; font-stretch: 112%; text-transform: uppercase; font-size: 8pt; letter-spacing: 0.01em; }
.fa-siege { box-shadow: inset 1.1mm 0 0 var(--lave); }
.fa-code { margin-left: 1.6mm; font-size: 5.8pt; font-weight: 700; letter-spacing: 0.08em; color: var(--pierre); }
.fa-ax { margin-left: 1.6mm; padding: 0.2mm 1.1mm; background: var(--basalte, #1E2229); color: #fff; font-size: 5.4pt; font-weight: 800; letter-spacing: 0.04em; border-radius: 1mm 0 1mm 0; vertical-align: 0.2mm; white-space: nowrap; }
.fa-tcm { margin-left: 1.6mm; padding: 0.2mm 1.1mm; background: var(--tcm); color: #fff; font-size: 5.4pt; font-weight: 900; letter-spacing: 0.06em; border-radius: 1mm 0 1mm 0; vertical-align: 0.2mm; }
.fa-voie { font-size: 7.4pt; font-weight: 700; color: var(--pierre); }
.fa-h { font-size: 8.4pt; line-height: 1.12; }
.fa-h b { display: block; font-weight: 700; }
.fa-h .fa-arr { display: block; font-size: 6.4pt; color: var(--pierre); }
.fa-jour { font-size: 5.2pt; color: var(--lave); font-weight: 800; vertical-align: super; line-height: 0; margin-left: 0.2mm; }
.fa-vide { color: #c3c0ba; font-size: 9pt; }

/* pied : légende, correspondances, QR */
.fa-pied { display: grid; grid-template-columns: 1.15fr 0.75fr 1fr 28mm; gap: 8mm; padding: 4.5mm 10mm 3mm; }
.fa-pied h3 { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 6.6pt; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lave); padding-bottom: 1.4mm; margin-bottom: 1.6mm; border-bottom: 0.3mm solid var(--basalte); }
.fa-legende li { display: flex; align-items: baseline; gap: 2.2mm; font-size: 6.6pt; color: #4a4f58; margin-top: 1mm; }
.fa-legende li > :first-child { flex: none; }
.fa-ex { display: inline-block; min-width: 10mm; text-align: center; font-size: 6.6pt; line-height: 1.1; color: var(--basalte); }
.fa-ex .fa-arr { display: block; font-size: 5.6pt; color: var(--pierre); }
.fa-ex b { display: block; }
.fa-voie-ex { display: inline-block; min-width: 10mm; text-align: center; font-weight: 700; color: var(--pierre); }
.fa-corr-g + .fa-corr-g { margin-top: 2mm; }
.fa-corr-g p { font-size: 7pt; color: #4a4f58; }
.fa-corr-g p b { color: var(--tcm); }
.fa-corr-l { display: flex; flex-wrap: wrap; gap: 0.9mm; margin-top: 1mm; }
.fa-logo { width: 5.6mm; height: 5.6mm; object-fit: contain; }
.fa-logo-txt { display: inline-grid; place-items: center; color: #fff; font-weight: 900; font-size: 5pt; }
.fa-corr-min, .fa-corr-vide { margin-top: 2mm; font-size: 6.4pt; color: #4a4f58; }
.fa-qr-bloc { text-align: center; }
.fa-qr { width: 21mm; height: 21mm; margin: 0 auto; }
.fa-qr-bloc p { margin-top: 1.2mm; font-size: 6.2pt; line-height: 1.2; font-weight: 700; }
.fa-qr-bloc p span { font-weight: 400; color: var(--pierre); }
.fa-bas { display: flex; justify-content: space-between; gap: 6mm; margin-top: auto; padding: 2.2mm 10mm; border-top: 0.6mm solid var(--lave); background: var(--basalte); color: rgb(233 230 225 / 0.75); font-size: 6.2pt; }
.fa-bas b { color: var(--calcaire); }
.fa-page { font-variant-numeric: tabular-nums; }

/* mode PDF (outils/fiches_pdf.js) et impression : feuilles seules, à l'échelle 1 */
@page { size: A4 landscape; margin: 0; }
.fa-impr .fa-ecran, .fa-impr #entete-arverne, .fa-impr #pied-arverne { display: none !important; }
.fa-impr body, .fa-impr main#contenu { margin: 0; padding: 0; background: #fff; }
.fa-impr .fa-pile { display: block; padding: 0; background: #fff; }
.fa-impr .fa-feuille { break-after: page; box-shadow: none; }
.fa-impr .fa-feuille:last-child { break-after: auto; }
@media print {
  html, body { background: #fff !important; }
  #entete-arverne, #pied-arverne, .fa-ecran { display: none !important; }
  main#contenu { padding: 0 !important; margin: 0 !important; }
  .fa-pile { display: block !important; padding: 0 !important; background: #fff !important; }
  .fa-cadre { height: auto !important; width: auto !important; overflow: visible; }
  .fa-zoom { transform: none !important; width: auto !important; box-shadow: none; }
  .fa-feuille { break-after: page; }
  .fa-feuille:last-child { break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.fa-dense .fa-code { display: none; }
.fa-dense .fa-pastille { font-size: 4.7pt; padding: 0.5mm 0.6mm; letter-spacing: 0; }
.fa-dense .fa-h { font-size: 8pt; }
.fa-legende li > .fa-ex { min-width: 13mm; }

.fa-rames li { display: block; margin-top: 1.2mm; }
.fa-rames .fa-rame { display: block; width: 100%; height: auto;  }
.fa-rames span { display: block; margin-top: 0.4mm; font-size: 6pt; color: #4a4f58; }
.fa-rames b { color: var(--basalte); }
