/* =====================================================
   PRINT STYLESHEET - Outils Pour La Classe
   Chargé uniquement via media="print"
   ===================================================== */

/* Masquer les éléments non-imprimables */
@media print {
    /* Navigation & Chrome */
    header,
    footer,
    .mobile-menu-toggle,
    .nav-search-wrapper,
    .skip-link,
    .theme-toggle,
    #cookie-banner,
    #scrollTopBtn,
    .fab-container,
    .feedback-widget,
    .contact-widget,
    .nps-widget,
    .toast-container,
    .modal,
    .accessibility-widget,
    .notification-center,
    .breadcrumb,
    .pwa-install-prompt,
    .offline-indicator,
    [data-no-print] {
        display: none !important;
    }

    /* Reset backgrounds et ombres */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.5;
    }

    main {
        padding-top: 0 !important;
    }

    /* Liens : afficher l'URL */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
        font-weight: normal;
    }

    /* Ne pas afficher l'URL pour les boutons et liens internes */
    .btn a::after,
    nav a::after,
    a.btn::after,
    a[href^="/"]::after,
    a[href^="#"]::after {
        content: none !important;
    }

    /* Cards et conteneurs */
    .card,
    .version-card,
    .stat-card,
    .hub-card,
    .alert-flash {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }

    /* Supprimer les gradients */
    .dashboard-page,
    .auth-page-body,
    .resources-hub {
        background: white !important;
    }

    /* Tableaux */
    table {
        border-collapse: collapse;
    }

    table th,
    table td {
        border: 1px solid #ccc;
        padding: 0.4rem 0.6rem;
    }

    table th {
        background: #f3f4f6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Forcer les couleurs de certains éléments */
    .alert-success {
        background: #f0fdf4 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .alert-error {
        background: #fef2f2 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Saut de page */
    h1, h2, h3 {
        break-after: avoid;
    }

    img {
        max-width: 100% !important;
        break-inside: avoid;
    }

    /* Graphiques et canvas */
    canvas {
        max-width: 100% !important;
    }

    /* Boutons d'action */
    .btn,
    button:not([type="submit"]) {
        display: none !important;
    }

    /* Pied de page d'impression */
    @page {
        margin: 1.5cm;
    }

    @page :first {
        margin-top: 2cm;
    }
}
