/* ==========================================================================
   Mobilis — feuille d'impression (listes d'inscrits, états statistiques)
   ========================================================================== */

@page {
    size: A4;
    margin: 14mm 12mm;
}

@media print {

    /* Le navigateur imprime en clair quel que soit le thème de l'écran. */
    :root {
        color-scheme: light;
        --plan: #fff;
        --surface: #fff;
        --surface-creuse: #fff;
        --encre: #000;
        --encre-2: #333;
        --encre-3: #555;
        --bordure: #999;
        --bordure-forte: #666;
        --grille: #bbb;
        --ligne-base: #666;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 10.5pt;
    }

    /* Chrome de l'application : rien de tout cela ne doit apparaître sur le papier. */
    .barre,
    .nav,
    .voile,
    .bascule-nav,
    .sans-impression,
    .impression__outils,
    .filtres,
    .entete-page__actions,
    .modale-fond,
    .erreur-globale,
    #blazor-error-ui,
    .btn {
        display: none !important;
    }

    .appli { display: block; }
    .contenu, .impression { padding: 0; max-width: none; }

    .feuille,
    .carte {
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        margin: 0 0 8mm;
        background: #fff;
    }

    a { color: #000; text-decoration: none; }

    /* Les tableaux ne doivent pas être coupés n'importe où. */
    .table-defilante { overflow: visible; }
    .table { font-size: 9.5pt; page-break-inside: auto; }
    .table thead { display: table-header-group; }
    .table tr { page-break-inside: avoid; page-break-after: auto; }
    .table thead th {
        position: static;
        border-bottom: 1.5pt solid #000;
        color: #000;
    }
    .table tbody tr { border-bottom: .5pt solid #bbb; }
    .table tbody tr:hover { background: none; }

    /* La mise en fiche du mobile n'a pas lieu d'être sur une feuille A4. */
    .table, .table tbody, .table tr { display: table; width: 100%; }
    .table thead { display: table-header-group; }
    .table tr { display: table-row; margin: 0; padding: 0; border-radius: 0; }
    .table td { display: table-cell; padding: 1.5mm 2mm; }
    .table td::before { content: none !important; }

    .pastille { border: .5pt solid #666; color: #000 !important; }
    .pastille::before { background: #000; }

    /* Les aplats de couleur doivent survivre au mode « économie d'encre ». */
    .chart, .jauge__barre, .jauge__remplie, .barre-h__piste, .barre-h__valeur-barre {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .titre-page { font-size: 15pt; }
    .titre-section { font-size: 11.5pt; page-break-after: avoid; }
    .saut-page { page-break-before: always; }
    .eviter-coupure { page-break-inside: avoid; }

    .compteurs, .tuiles { page-break-inside: avoid; }
    .tuile, .compteur { border: .5pt solid #999; box-shadow: none; background: #fff; }

    /* Mention de bas de page, masquée à l'écran par app.css. */
    .pied-impression {
        display: block;
        margin-top: 8mm;
        padding-top: 2mm;
        border-top: .5pt solid #999;
        font-size: 8pt;
        color: #555;
    }
}
