/**
 * file: /batidevis/assets/app.css
 * version: 0.1.0
 * description: Styles complémentaires à Tailwind : composants de formulaire, messages de saisie,
 *              feuille A4 des documents et impression.
 */

[x-cloak] { display: none !important; }

/* Champs de formulaire homogènes (16 px sur mobile pour éviter le zoom iOS) */
.champ {
  width: 100%; min-width: 0; border-radius: .375rem; border: 1px solid rgb(203 213 225);
  background: #fff; padding: .5rem .7rem; font-size: 16px; line-height: 1.4; color: inherit;
}
@media (min-width: 768px) { .champ { font-size: 14px; } }
.dark .champ { background: rgb(15 23 42); border-color: rgb(51 65 85); }
.champ:focus { outline: 2px solid #2563eb; outline-offset: 0; border-color: transparent; }
.champ.saisie-ok { border-color: #059669; }
.champ.saisie-ko { border-color: #e11d48; }
.etiquette { display: block; margin-bottom: .3rem; font-size: 12.5px; font-weight: 600; color: rgb(71 85 105); }
.dark .etiquette { color: rgb(148 163 184); }
.saisie-msg { display: block; min-height: 1.1em; margin-top: .25rem; font-size: 12px; color: rgb(100 116 139); }
.saisie-msg.ok { color: #047857; }
.saisie-msg.ko { color: #be123c; }
.dark .saisie-msg.ok { color: #34d399; }
.dark .saisie-msg.ko { color: #fb7185; }
[data-saisie="siret"], [data-saisie="iban"], [data-saisie="bic"], [data-saisie="tva"] { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 40px;
  padding: .45rem .9rem; border-radius: .375rem; font-size: 14px; font-weight: 600; white-space: nowrap;
  border: 1px solid rgb(203 213 225); background: #fff; color: rgb(15 23 42); cursor: pointer;
}
.bouton:hover { background: rgb(248 250 252); }
.dark .bouton { background: rgb(30 41 59); border-color: rgb(51 65 85); color: rgb(226 232 240); }
.dark .bouton:hover { background: rgb(51 65 85); }
.bouton-primaire { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.bouton-primaire:hover { background: #1e40af; }
.dark .bouton-primaire { background: #2563eb; border-color: #2563eb; color: #fff; }
.bouton-danger { color: #be123c; }
@media (max-width: 767px) { .bouton { min-height: 44px; } }
.bouton:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.chiffres { font-variant-numeric: tabular-nums; }

/* ───────────── Feuille A4 (aperçu écran et impression) ───────────── */
.feuille {
  width: 210mm; min-height: 297mm; margin: 0 auto; background: #fff; color: #111;
  padding: 12mm 12mm 10mm; box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 12px 32px rgba(15, 23, 42, .08);
  font-family: "Montserrat", "Public Sans", system-ui, sans-serif; font-weight: 300; font-size: 9.2pt; line-height: 1.35;
  display: flex; flex-direction: column;
}
.feuille-cadre { overflow-x: auto; padding-bottom: 1rem; }
.feuille b, .feuille strong, .feuille .fort { font-weight: 500; }
.feuille .entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 10mm; }
.feuille .logo { max-width: 62mm; max-height: 26mm; object-fit: contain; }
.feuille .nom-texte { font-size: 18pt; font-weight: 600; letter-spacing: .02em; }
.feuille .parties { display: flex; justify-content: space-between; gap: 10mm; margin-top: 9mm; text-transform: uppercase; font-size: 8.8pt; }
.feuille .parties > div { width: 48%; }
.feuille .parties .droite { padding-left: 25mm; }
.feuille h1 { text-align: center; font-weight: 400; font-size: 17pt; margin: 9mm 0 6mm; letter-spacing: .01em; }
.feuille table.lignes { width: 100%; border-collapse: collapse; margin-bottom: 3mm; font-size: 8.8pt; }
.feuille table.lignes .bande td { background: #e4e4e4; text-align: center; font-size: 7.4pt; font-weight: 400; text-transform: uppercase; padding: 1.2mm; }
.feuille table.lignes th { font-weight: 400; background: #fff; border: 1px solid #d6d6d6; padding: 1.3mm 1mm; }
.feuille table.lignes td { background: #f1f1f1; border-left: 1.5px solid #fff; vertical-align: top; padding: 1.4mm 1.2mm; }
.feuille table.lignes td.n { text-align: center; white-space: nowrap; }
.feuille table.lignes td.desig { white-space: pre-line; width: 40%; }
.feuille table.lignes .metre { display: block; margin-top: 1mm; font-size: 7.6pt; color: #555; }
.feuille .bas { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 5mm; margin-top: auto; padding-top: 6mm; font-size: 8.6pt; }
.feuille .bas .titre { text-transform: uppercase; font-weight: 400; margin-top: 1.5mm; }
.feuille .cadre { border: 1px solid #111; border-radius: 1.5mm; padding: 2.5mm 3.5mm; }
.feuille table.totaux { width: 100%; border-collapse: collapse; }
.feuille table.totaux td { padding: 1.6mm 1mm; border-bottom: 1px solid #d6d6d6; }
.feuille table.totaux td:last-child { text-align: right; white-space: nowrap; }
.feuille table.totaux .gris td { background: #f1f1f1; text-align: center; }
.feuille table.totaux .net td { font-weight: 500; }
.feuille .accord { width: 48%; min-height: 24mm; margin-top: 6mm; }
.feuille .bandeau { background: #f1f1f1; text-align: center; font-size: 7.4pt; text-transform: uppercase; padding: 2.5mm 4mm; margin-top: 5mm; }
.feuille .pied { text-align: center; font-size: 6.8pt; text-transform: uppercase; margin-top: 3mm; font-weight: 400; }
.feuille .mentions { font-size: 7.6pt; margin-top: 3mm; }

@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  .no-print, aside, header { display: none !important; }
  main > div { padding: 0 !important; max-width: none !important; }
  .feuille-cadre { overflow: visible; padding: 0; }
  .feuille { box-shadow: none; margin: 0; width: 210mm; min-height: 296mm; }
  .feuille table.lignes tr, .feuille .bas { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* end of file: /batidevis/assets/app.css */
