/* Les plans : à l'écran comme à l'impression. */
.vues { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.vue-2d h3 { margin: 0 0 4px; font-size: 13px; color: var(--texte-2); }
svg.plan { width: 100%; height: auto; background: var(--surface); }
svg.plan .piece { fill: var(--surface-2); stroke: var(--texte); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
svg.plan .piece.proche { fill: var(--surface); }
svg.plan .piece-libre { fill: var(--surface-2); stroke: none; }
svg.plan .arete { stroke: var(--texte); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
svg.plan .section { fill: url(#hachures); stroke: var(--texte); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
svg.plan .cote line { stroke: var(--texte-2); stroke-width: 0.6; vector-effect: non-scaling-stroke; }
svg.plan .cote text, svg.plan .etiquette { fill: var(--texte); font-family: system-ui, sans-serif; }
svg.plan .chant { stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linecap: square; }
svg.plan .trou { fill: none; stroke: var(--texte); stroke-width: 0.9; vector-effect: non-scaling-stroke; }
svg.plan .dessous { stroke-dasharray: 4 3; }
svg.plan .creux { fill: rgb(120 110 90 / 0.18); stroke: var(--texte); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
svg.plan .creux.traversant { fill: var(--fond); stroke-width: 1.4; }
svg.plan .hachure { stroke: var(--texte-2); stroke-width: 0.5; }

.fiche { break-inside: avoid; page-break-inside: avoid; }
.fiche svg.plan { max-height: 62vh; }
@media print { .fiche svg.plan { max-height: 150mm; } }
.fiche .tete { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.fiche .tete h2 { margin: 0; font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--texte); }
.fiche .cotes3 { font-variant-numeric: tabular-nums; }
.fiche table { font-size: 12px; }

@media print {
  :root { --fond: #fff; --surface: #fff; --surface-2: #f2f2f2; --texte: #000; --texte-2: #444; --bord: #999; --accent: #1b4fa0; }
  header.barre, .ecran-seul { display: none !important; }
  body { background: #fff; }
  main.page { padding: 0; max-width: none; }
  .carte { border: none; padding: 0; }
  .feuille, .fiche { break-after: page; page-break-after: always; }
}
