/* Rapport : document long defilant. */

body { font-size: 17px; line-height: 1.6; }
.doc { max-width: 60rem; margin: 0 auto; padding: 4.5rem 1.5rem 5rem; }

.outils { position: fixed; top: .9rem; right: 1.2rem; display: flex; gap: .4rem; z-index: 3; }
.outils button { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .3em .7em; cursor: pointer; }
.outils button:hover { color: var(--ink); border-color: var(--ink-2); }

.doc-entete { padding-bottom: 2.2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.doc-entete .logo { height: 56px; margin-bottom: 2rem; }
.doc-entete h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.04; max-width: 20ch; }
.doc-entete .lead { font-size: 1.15rem; max-width: 56ch; }

.sommaire { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.4rem; margin-bottom: 3rem; }
.sommaire h2 { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--pink); margin: 0 0 .6rem; }
.sommaire ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: .3rem; }
.sommaire li { counter-increment: s; display: grid; grid-template-columns: 2.2rem 1fr; align-items: baseline; }
.sommaire li::before { content: counter(s, decimal-leading-zero); font-family: var(--mono); font-size: .75rem; color: var(--ink-3); }
.sommaire a { text-decoration: none; }
.sommaire a:hover { color: var(--pink); }

.rapport-section { padding-top: 2.2rem; margin-top: 2.2rem; border-top: 1px solid var(--line-soft); scroll-margin-top: 1rem; }
.rapport-section:first-of-type { border-top: 0; margin-top: 0; }
.rapport-section h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.rapport-section .corps { display: grid; gap: 1.4rem; margin-top: 1.4rem; }
.rapport-section .cols { gap: 1.8rem; }
.rapport-section .src { font-size: .7rem; margin-top: 1.4rem; }
.doc-pied { margin-top: 3.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.doc-pied .pied { font-size: .75rem; }

@media (max-width: 900px) { .doc { padding: 4rem 16px 3rem; } }

@page { size: A4 portrait; margin: 14mm; }
@media print {
  body { background: #fff; font-size: 11pt; }
  .doc { max-width: none; padding: 0; }
  .outils, .brand { display: none !important; }
  .rapport-section { break-inside: auto; }
  .rapport-section h2, .graphique .g-titre, .carte .c-titre { break-after: avoid; }
  .graphique, .carte, .kpi, .panel, .citation, .tableau tr { break-inside: avoid; }
  .doc-entete h1 { font-size: 34pt; }
  .sommaire { break-inside: avoid; }
  .g-svg:not(.g-donut) { min-width: 0 !important; }
}

.g-svg:not(.g-donut) { max-height: 21rem; }
