/* ============================================
   FICHIER PRINT SPÉCIFIQUE
   Article : Qu'est-ce que la Conscience ?
   Usage : Uniquement pour cette page
   ============================================ */

@media print {

  /* ============================================
     1. SUPPRESSION DES ÉLÉMENTS SUPERFLUS
     (à adapter selon les classes de votre thème)
     ============================================ */
  
  header, nav, .menu, .sidebar, .footer, 
  .comments-area, .widget, .social-share, 
  .related-posts, button, .search-form,
  .navigation, .breadcrumbs, .ads, .popup,
  .newsletter, .cookie-notice, .back-to-top {
    display: none !important;
  }


  /* ============================================
     2. FOND BLANC + TEXTE NOIR
     ============================================ */
  
  body, .site, .site-content, .entry-content,
  main, article, .post, .page, .container,
  .wrapper, .resume, .note-formatage {
    background: white !important;
    color: black !important;
  }


  /* ============================================
     3. ENCADRÉ DES RÉSUMÉS (.resume)
     ============================================ */
  
  .resume {
    background: none !important;
    border-left: 2px solid #222 !important;
    padding: 0.5rem 0 0.5rem 1rem !important;
    margin: 1.5rem 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  
  .resume h3 {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
  }
  
    /* ============================================
     4. LIENS EPURÉE (externe = complet, interne = rien)
     ============================================ */
  
  a {
    color: black !important;
    text-decoration: none !important;
  }
  
  /* Liens externes (http/https) : affiche l'URL complète */
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.8rem;
    font-style: italic;
  }
  
  /* Liens internes (vers vos propres pages) rien n'est ajouté */
  a[href^="/"]:after,
  a[href^="./"]:after,
  a[href^="../"]:after,
  a[href^="#"]:after,
  a[href^="javascript"]:after,
  a[href^="mailto"]:after {
    content: "" !important;
  }


  /* ============================================
     5. GESTION DES COUPURES DE PAGE
     ============================================ */
  
  /* Évite qu'un titre soit coupé en deux */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }
  
  /* Évite qu'un paragraphe soit coupé */
  p {
    page-break-inside: avoid;
  }
  
  /* Évite qu'un encadré soit coupé */
  .resume, .note-formatage {
    page-break-inside: avoid;
    page-break-before: avoid;
    page-break-after: avoid;
  }
  
  /* Évite les isolats (titre tout seul en bas de page) */
  h2, h3, h4 {
    page-break-after: avoid;
  }
  
  /* Évite qu'une image soit coupée */
  img {
    page-break-inside: avoid;
    max-width: 100% !important;
  }
  
  /* Gestion des longs tableaux (comme votre inclusion PHP) */
  table, .php-include, #table-conscience {
    page-break-inside: avoid;
    font-size: 9pt;
  }


  /* ============================================
     6. TYPOGRAPHIE ADAPTÉE AU PAPIER
     ============================================ */
  
  body, p, li, blockquote, .resume, .note-formatage {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 11pt !important;
    line-height: 1.4 !important;
  }
  
  h1, h2, h3, h4 {
    font-family: "Helvetica", "Arial", sans-serif !important;
  }
  
  h1 {
    font-size: 18pt !important;
  }
  
  h2 {
    font-size: 16pt !important;
    margin-top: 1.5rem !important;
  }
  
  h3 {
    font-size: 13pt !important;
  }


  /* ============================================
     7. MARGES PAPIER
     ============================================ */
  
  @page {
    margin: 2.5cm;
  }
  
  /* Évite les veuves et orphelines (lignes seules) */
  p, li, blockquote {
    widows: 3;
    orphans: 3;
  }


  /* ============================================
     8. SUPPRESSION DES EFFETS VISUELS
     ============================================ */
  
  * {
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
    border-radius: 0 !important;
  }
  
  /* Pour vos tooltips : suppression du soulignement pointillé */
  .tooltip-link {
    border-bottom: none !important;
  }


  /* ============================================
     9. GESTION SPÉCIFIQUE À VOTRE TABLEAU PHP
    ============================================ */
  
  /* Si votre inclusion PHP génère un tableau */
  table {
    border-collapse: collapse !important;
    width: 100% !important;
  }
  
  th, td {
    border: 1px solid #ccc !important;
    padding: 0.5rem !important;
  }
  
  /* Évite qu'un tableau dépasse de la page */
  .table-wrapper, .php-include {
    overflow-x: visible !important;
  }


  /* ============================================
     10. SI VOUS AVEZ DES NOTES DE BAS DE PAGE
     ============================================ */
  
  .footnote, .note {
    font-size: 9pt !important;
    border-top: 1px solid #ccc !important;
    margin-top: 1rem !important;
    padding-top: 0.5rem !important;
  }
}