/**
 * FormulScience - Feuille de style pour l'impression
 * 
 * Cette feuille optimise l'affichage pour l'impression papier :
 * - Suppression des éléments de navigation
 * - Optimisation des couleurs (noir sur blanc)
 * - Gestion des sauts de page
 * - Affichage des URLs des liens
 * - Mise en page professionnelle
 */

@media print {
    
    /* ===========================================
       RESET ET BASE
       =========================================== */
    
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    html, body {
        width: 100%;
        margin: 0;
        padding: 0;
        font-size: 11pt;
        line-height: 1.5;
        color: #000 !important;
        background: #fff !important;
    }
    
    /* ===========================================
       ÉLÉMENTS À MASQUER
       =========================================== */
    
    /* Navigation et éléments interactifs */
    .header,
    .nav-principale,
    .menu-toggle,
    .footer,
    .btn,
    .btn-primaire,
    .btn-secondaire,
    .btn-outline,
    .formulaire,
    .contact-formulaire,
    .captcha-container,
    .newsletter-form,
    .blog-newsletter,
    .commentaires-section,
    .commentaire-formulaire,
    .article-partage,
    .partage-boutons,
    .pagination,
    .blog-filtres,
    .filtre-btn,
    .captcha-refresh,
    .form-actions,
    .tooltip-icon,
    .tooltip-text {
        display: none !important;
    }
    
    /* Éléments de navigation secondaires */
    .article-navigation,
    .articles-similaires,
    .sidebar-bloc:not(.formation-associee),
    .formation-mini-carte .btn {
        display: none !important;
    }
    
    /* ===========================================
       EN-TÊTE D'IMPRESSION
       =========================================== */
    
    /* Création d'un en-tête pour l'impression */
    body::before {
        content: "ATELLANE - Formations techniques et scientifiques - Dr. Pascal Brochette";
        display: block;
        text-align: center;
        font-size: 10pt;
        color: #666;
        padding: 10pt 0;
        border-bottom: 1pt solid #ccc;
        margin-bottom: 20pt;
    }
    
    /* ===========================================
       PAGE HEADER (bannière de page)
       =========================================== */
    
    .page-header {
        background: none !important;
        color: #000 !important;
        padding: 0 !important;
        margin-bottom: 20pt;
        border-bottom: 2pt solid #1a5276;
        padding-bottom: 15pt !important;
    }
    
    .page-header h1 {
        color: #1a5276 !important;
        font-size: 22pt !important;
        margin-bottom: 5pt;
    }
    
    .page-header p {
        color: #333 !important;
        font-size: 11pt;
    }
    
    .page-header-content {
        padding: 0 !important;
    }
    
    /* ===========================================
       CONTENU PRINCIPAL
       =========================================== */
    
    main {
        padding: 0 !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* ===========================================
       TYPOGRAPHIE
       =========================================== */
    
    h1 {
        font-size: 20pt !important;
        color: #1a5276 !important;
        page-break-after: avoid;
        margin-top: 0;
    }
    
    h2 {
        font-size: 16pt !important;
        color: #1a5276 !important;
        page-break-after: avoid;
        margin-top: 20pt;
        border-bottom: 1pt solid #1a5276;
        padding-bottom: 5pt;
    }
    
    h3 {
        font-size: 13pt !important;
        color: #2980b9 !important;
        page-break-after: avoid;
        margin-top: 15pt;
    }
    
    h4 {
        font-size: 11pt !important;
        color: #333 !important;
        page-break-after: avoid;
    }
    
    p, li, td, th {
        orphans: 3;
        widows: 3;
    }
    
    /* ===========================================
       LIENS - Affichage des URLs
       =========================================== */
    
    a {
        color: #000 !important;
        text-decoration: underline;
    }
    
    /* Affiche l'URL après les liens externes */
    a[href^="http"]:after,
    a[href^="https"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
        word-break: break-all;
    }
    
    /* Exceptions : ne pas afficher l'URL pour certains liens */
    a[href^="mailto"]:after {
        content: " (" attr(href) ")";
    }
    
    a[href^="tel"]:after {
        content: none;
    }
    
    /* Liens internes : pas d'URL */
    a[href^="#"]:after,
    a[href^="/"]:after,
    a.email-protected:after {
        content: none;
    }
    
    /* ===========================================
       PAGES DE FORMATION
       =========================================== */
    
    /* Layout de la page formation */
    .formation-detail-layout {
        display: block !important;
    }
    
    .formation-detail-content {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Sidebar formation - Afficher les infos importantes */
    .formation-detail-sidebar {
        position: static !important;
        width: 100% !important;
        margin-top: 20pt;
        page-break-inside: avoid;
    }
    
    .formation-sidebar-card {
        border: 1pt solid #ccc !important;
        padding: 15pt !important;
        background: #f9f9f9 !important;
        box-shadow: none !important;
    }
    
    .formation-sidebar-card .btn,
    .formation-sidebar-card button {
        display: none !important;
    }
    
    /* Fil d'ariane */
    .fil-ariane {
        font-size: 9pt;
        color: #666 !important;
        margin-bottom: 15pt;
        padding-bottom: 10pt;
        border-bottom: 1pt dotted #ccc;
    }
    
    .fil-ariane a {
        color: #666 !important;
    }
    
    .fil-ariane a:after {
        content: none !important;
    }
    
    /* Programme de formation */
    .formation-programme {
        page-break-inside: avoid;
    }
    
    .programme-jour {
        page-break-inside: avoid;
        margin-bottom: 15pt;
        border: 1pt solid #ddd;
        padding: 10pt;
    }
    
    .programme-jour h3 {
        background: #1a5276 !important;
        color: #fff !important;
        padding: 8pt 10pt !important;
        margin: -10pt -10pt 10pt -10pt !important;
        font-size: 12pt !important;
    }
    
    /* Sections de formation */
    .formation-section {
        margin-bottom: 20pt;
        page-break-inside: avoid;
    }
    
    .formation-section h2 {
        font-size: 14pt !important;
    }
    
    /* Informations clés */
    .formation-info-grid {
        display: table !important;
        width: 100%;
        border-collapse: collapse;
    }
    
    .formation-info-item {
        display: table-row !important;
    }
    
    .formation-info-item > * {
        display: table-cell !important;
        padding: 5pt 10pt;
        border-bottom: 1pt solid #eee;
    }
    
    /* ===========================================
       CARTES ET GRILLES
       =========================================== */
    
    .carte-formation,
    .carte-article {
        page-break-inside: avoid;
        border: 1pt solid #ccc !important;
        box-shadow: none !important;
        margin-bottom: 15pt;
    }
    
    .carte-formation-header {
        background: #1a5276 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
    }
    
    .grille-formations {
        display: block !important;
    }
    
    .grille-formations > * {
        margin-bottom: 20pt;
        page-break-inside: avoid;
    }
    
    /* ===========================================
       TABLEAUX
       =========================================== */
    
    table {
        width: 100%;
        border-collapse: collapse;
        page-break-inside: avoid;
        margin: 15pt 0;
    }
    
    th, td {
        border: 1pt solid #ccc;
        padding: 8pt;
        text-align: left;
    }
    
    th {
        background: #f0f0f0 !important;
        font-weight: bold;
    }
    
    thead {
        display: table-header-group;
    }
    
    /* ===========================================
       LISTES
       =========================================== */
    
    ul, ol {
        margin-left: 20pt;
        padding-left: 0;
    }
    
    li {
        margin-bottom: 5pt;
    }
    
    /* ===========================================
       IMAGES
       =========================================== */
    
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    figure {
        page-break-inside: avoid;
        margin: 15pt 0;
    }
    
    figcaption {
        font-size: 9pt;
        color: #666;
        font-style: italic;
    }
    
    /* ===========================================
       BIBLIOGRAPHIE (articles de blog)
       =========================================== */
    
    .article-bibliographie {
        page-break-inside: avoid;
        border: 1pt solid #ccc;
        padding: 15pt;
        background: #f9f9f9 !important;
    }
    
    .references-liste li {
        font-size: 10pt;
        margin-bottom: 8pt;
    }
    
    .ref-doi {
        word-break: break-all;
    }
    
    /* ===========================================
       ENCARTS ET NOTES
       =========================================== */
    
    .article-encart,
    .note,
    .info-box {
        border: 1pt solid #27ae60 !important;
        background: #f0f9f4 !important;
        padding: 10pt;
        page-break-inside: avoid;
    }
    
    /* ===========================================
       GESTION DES SAUTS DE PAGE
       =========================================== */
    
    /* Éviter les sauts de page après les titres */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    /* Éviter les sauts de page à l'intérieur */
    .formation-sidebar-card,
    .carte-formation,
    .programme-jour,
    blockquote,
    pre,
    .article-encart {
        page-break-inside: avoid;
    }
    
    /* Forcer un saut de page avant certains éléments */
    .page-break-before {
        page-break-before: always;
    }
    
    /* ===========================================
       PIED DE PAGE D'IMPRESSION
       =========================================== */
    
    body::after {
        content: "© ATELLANE - Dr. Pascal Brochette - www.atellane.fr - Document imprimé";
        display: block;
        text-align: center;
        font-size: 9pt;
        color: #666;
        padding-top: 20pt;
        margin-top: 30pt;
        border-top: 1pt solid #ccc;
    }
    
    /* ===========================================
       PAGE DE CONTACT - Spécifique
       =========================================== */
    
    .contact-grid {
        display: block !important;
    }
    
    .contact-infos {
        width: 100% !important;
    }
    
    .contact-info-item {
        display: flex;
        margin-bottom: 10pt;
        padding-bottom: 10pt;
        border-bottom: 1pt dotted #ddd;
    }
    
    /* ===========================================
       BLOG - Liste des articles
       =========================================== */
    
    .blog-liste {
        display: block !important;
    }
    
    .carte-article {
        display: block !important;
        margin-bottom: 20pt;
    }
    
    .carte-article-image {
        display: none !important;
    }
    
    .carte-article-contenu {
        padding: 0 !important;
    }
    
    .carte-article-contenu h2 {
        font-size: 13pt !important;
    }
    
    /* ===========================================
       ARTICLE DE BLOG
       =========================================== */
    
    .article-header {
        background: none !important;
        color: #000 !important;
        padding: 0 !important;
        border-bottom: 2pt solid #1a5276;
        margin-bottom: 20pt;
        padding-bottom: 15pt !important;
    }
    
    .article-header h1 {
        color: #1a5276 !important;
        font-size: 20pt !important;
    }
    
    .article-categorie-tag {
        background: #1a5276 !important;
        color: #fff !important;
        padding: 3pt 8pt;
        font-size: 9pt;
    }
    
    .article-meta {
        color: #666 !important;
        font-size: 10pt;
    }
    
    .article-meta-item {
        color: #666 !important;
    }
    
    .article-layout {
        display: block !important;
    }
    
    .article-contenu {
        box-shadow: none !important;
        padding: 0 !important;
        margin-top: 0 !important;
    }
    
    .article-sidebar {
        display: none !important;
    }
    
    .article-introduction {
        border-left: 3pt solid #1a5276 !important;
        padding-left: 15pt;
        font-size: 11pt;
        font-style: italic;
    }
    
    .article-section {
        page-break-inside: avoid;
    }
    
    .article-equation {
        border: 1pt solid #ccc;
        padding: 10pt;
        text-align: center;
        background: #f9f9f9 !important;
    }
    
    .article-tags {
        display: none !important;
    }
    
    /* ===========================================
       UTILITAIRES D'IMPRESSION
       =========================================== */
    
    /* Classes utilitaires pour contrôler l'impression */
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    .page-break {
        page-break-before: always;
    }
    
    /* ===========================================
       AJUSTEMENTS SPÉCIFIQUES AU NAVIGATEUR
       =========================================== */
    
    @page {
        margin: 2cm;
        size: A4;
    }
    
    @page :first {
        margin-top: 1cm;
    }
    
}
