/* ================================
   GLOBAL PRINT RESET
================================ */

@media print {

  @page {
    size: A4;
    margin: 15mm 12mm 15mm 12mm;
  }


  html, body {
    width: 210mm;
    height: auto;
    background: #fff !important;
    font-size: 11pt;
    color: #000 !important;
  }

  /* ================================
     MASQUER TOUT PAR DÉFAUT
  ================================ */
  body * {
    visibility: hidden !important;
  }

  /* ================================
     ZONE PDF UNIQUEMENT
  ================================ */
  #pdf-content,
  #pdf-content * {
    visibility: visible !important;
  }

  #pdf-content {
    display: block !important;
   position: absolute !important;
    top: 0 !important;
    
    width: auto !important;
  }

   .pdf-invisible {
    display: none !important;
    visibility: hidden !important;
  }
.pdf-only {
   display:block!important; 
  }

input,
  textarea,
  select {
    display: none !important;
  }

  .pdf-field {
    display: inline-block !important;
    white-space: pre-wrap;
    font-size: 11pt;
    color: #000;
  }

 /* Désactiver flex pour les colonnes  pour le swot*/
  .col-md-6.d-flex {
    display: block !important;
  }

  /* Désactiver hauteur forcée en print */
  .card.h-100 {
    height: auto !important;
  }
 
  .card-body {
    height: auto !important;
  }



  .echart {
    width: 180mm;   /* quasi pleine largeur A4 */
    height: auto;
  }
  /* ================================
     MASQUER UI
  ================================ */
  .btn,
  .no-print,
  nav,
  header,
  footer,
  .navbar,
  .sidebar,
  .toast,
  .modal {
    display: none !important;
  }

  /* ================================
     TYPOGRAPHIE
  ================================ */
  h1 { font-size: 18pt !important; }
  h2 { font-size: 15pt !important; }
  h3 { font-size: 13pt !important; }
  h4 { font-size: 12pt !important; }
  h5 { font-size: 11pt !important; }

  p, li, div, span {
    font-size: 10.5pt !important;
    line-height: 1.35 !important;
  }

  /* ================================
     BOOTSTRAP GRID FIX
  ================================ */
  .container,
  .container-fluid {
   max-width: 100% !important;
    width: 100% !important;
    
    padding: 0 !important;
    margin: 0 !important;
  }

  .row {
    display: flex !important;
    flex-wrap: wrap !important;
  }

  /*
  .col,
  [class^="col-"] {
    float: none !important;
  }
*/

a[href]:after {    /*evite les impressions d url en pied de page */
    content: "" !important;
  }


  /* ================================
     CARDS & PANELS
  ================================ */
  .card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    margin-bottom: 6mm !important;
  }

  .card-body {
    padding: 6mm !important;
  }

  /* ================================
     BADGES / COULEURS
  ================================ */
  .badge {
    border: 1px solid #666 !important;
    background: #eee !important;
    color: #000 !important;
  }

  /*.text-success,*/
  .text-primary,
  .text-danger,
  .text-warning {
    color: #1e40af !important;
  }

  /* ================================
     LISTES & LIENS
  ================================ */
  a {
    color: #000 !important;
    text-decoration: none !important;
  }

  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
  }

  ul, ol {
    padding-left: 5mm !important;
  }

  /* ================================
     SAUTS DE PAGE MANUELS
  ================================ */
  .page-break {
    page-break-before: always !important;
    break-before: always !important;
  }

  .avoid-break {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

   .pdf-footer {
    display: none;
  }

  /* Footer PDF visible uniquement en print */
  .pdf-footer.print-footer {
    display: block !important;
    position: fixed;
    bottom: 8mm;
    left: 12mm;
    right: 12mm;
    text-align: center;
    font-size: 8pt;
    color: #666;
    border-top: 1px solid #ccc;
    padding-top: 2mm;
  }

}
