/* ==========================================================================
   STYLES D'IMPRESSION - OPTIMISÉ POUR L'IMPRESSION PAPIER
   ========================================================================== */

@media print {
    
    /* ==========================================================================
       01. RESET ET OPTIMISATIONS GÉNÉRALES
       ========================================================================== */
    
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
        filter: none !important;
        -ms-filter: none !important;
    }
    
    /* Optimisation des polices */
    body {
        font-size: 12pt;
        line-height: 1.4;
        font-family: "Times New Roman", Times, serif;
        color: #000;
        background: #fff;
        margin: 0;
        padding: 0;
    }
    
    /* Titres optimisés pour l'impression */
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
        margin-top: 0;
        font-weight: bold;
    }
    
    h1 { font-size: 18pt; margin-bottom: 12pt; }
    h2 { font-size: 16pt; margin-bottom: 10pt; }
    h3 { font-size: 14pt; margin-bottom: 8pt; }
    h4 { font-size: 12pt; margin-bottom: 6pt; }
    h5, h6 { font-size: 11pt; margin-bottom: 4pt; }
    
    /* Paragraphes */
    p {
        margin: 0 0 8pt 0;
        orphans: 3;
        widows: 3;
    }
    
    /* Listes */
    ul, ol {
        margin: 8pt 0;
        padding-left: 20pt;
    }
    
    li {
        margin-bottom: 4pt;
    }
    
    /* ==========================================================================
       02. SUPPRESSION D'ÉLÉMENTS INTERACTIFS
       ========================================================================== */
    
    /* Navigation et éléments interactifs */
    .navbar, .nav, .navigation,
    .btn-back, .close-modal, .close-lightbox,
    .modal, .lightbox, .overlay,
    .scroll-to-top, .floating-btn,
    button[type="button"], .btn-secondary,
    .search-section, .filter-section,
    .pagination, .load-more,
    .social-share, .share-buttons,
    .comment-form, .contact-form {
        display: none !important;
    }
    
    /* CTA et boutons d'action */
    .cta-section, .cta-buttons, .cta-card,
    .btn-primary, .btn-outline, .btn-light,
    .btn-astro-primary, .btn-astro-outline,
    .btn-matrix, .btn-vintage,
    .hero-buttons, .astro-cta-buttons {
        display: none !important;
    }
    
    /* Onglets et accordéons */
    .tab-navigation, .tab-buttons,
    .accordion-toggle,
    .collapse-btn, .expand-btn {
        display: none !important;
    }
    
    /* Éléments de gameplay/animation */
    .animation, .animated,
    .loading-spinner, .progress-bar,
    video, audio, iframe {
        display: none !important;
    }
    
    /* ==========================================================================
       03. OPTIMISATION DES LAYOUTS
       ========================================================================== */
    
    /* Container principal */
    .container, .container-wide, .container-full {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
    }
    
    /* Grilles simplifiées */
    .grid, .products-grid, .feature-grid,
    .specs-grid, .gallery-grid, .articles-grid {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }
    
    /* Flexbox simplifiés */
    .flex, .d-flex {
        display: block !important;
        flex-direction: column !important;
    }
    
    /* Suppression des colonnes flottantes */
    .col, [class*="col-"] {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
    }
    
    /* ==========================================================================
       04. HERO SECTIONS ET HEADERS
       ========================================================================== */
    
    /* Tous les hero sections */
    .hero, .energy-hero, .astro-hero, .product-hero,
    .methodology-hero, .vintage-hero, .matrix-hero,
    .esphome-hero, .domotique-hero, .rpi-hero,
    .ha-hero, .megohm-hero, .blog-hero,
    .products-hero, .contact-hero, .about-hero {
        background: none !important;
        color: #000 !important;
        padding: 12pt 0 !important;
        min-height: auto !important;
        height: auto !important;
        text-align: left !important;
        page-break-inside: avoid;
    }
    
    /* Suppression des pseudo-éléments décoratifs */
    .hero::before, .hero::after,
    .energy-hero::before, .energy-hero::after,
    .astro-hero::before, .astro-hero::after,
    .matrix-hero::before, .matrix-hero::after,
    .vintage-hero::before, .vintage-hero::after {
        display: none !important;
    }
    
    /* Titres de hero */
    .hero h1, .energy-hero h1, .astro-hero h1,
    .product-hero h1, .blog-hero h1 {
        color: #ffffff !important;
        text-shadow: none !important;
        font-size: 20pt !important;
        margin-bottom: 8pt !important;
    }
    
    /* Sous-titres et descriptions */
    .hero p, .energy-hero p, .astro-hero p,
    .hero-description, .astro-description {
        color: #ffffff !important;
        font-size: 12pt !important;
        margin-bottom: 12pt !important;
        max-width: none !important;
    }
    
    /* ==========================================================================
       05. CARTES ET CONTENUS
       ========================================================================== */
    
    /* Cartes génériques */
    .card, .product-card, .feature-card,
    .reliability-card, .app-card, .gallery-item,
    .discount-card, .spec-card, .application-card,
    .expertise-card, .contact-card {
        border: 1pt solid #000 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-bottom: 12pt !important;
        padding: 8pt !important;
        background: #fff !important;
        page-break-inside: avoid;
    }
    
    /* Contenu des cartes */
    .card-content, .product-content, .app-content {
        padding: 4pt !important;
    }
    
    .card h3, .card h4,
    .product-card h3, .feature-card h3 {
        color: #000 !important;
        font-size: 14pt !important;
        margin-bottom: 6pt !important;
    }
    
    /* ==========================================================================
       06. IMAGES ET MÉDIAS
       ========================================================================== */
    
    /* Images optimisées */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
        border: 1pt solid #ccc;
        margin: 6pt 0;
    }
    
    /* Suppression des images décoratives */
    .background-image, .hero-bg,
    .decoration, .ornament {
        display: none !important;
    }
    
    /* Images avec légendes */
    .image-caption, .gallery-caption {
        color: #000 !important;
        font-size: 10pt !important;
        font-style: italic;
        margin-top: 4pt !important;
    }
    
    /* ==========================================================================
       07. TABLEAUX
       ========================================================================== */
    
    /* Tableaux optimisés */
    table {
        border-collapse: collapse !important;
        border: 1pt solid #000 !important;
        width: 100% !important;
        margin: 12pt 0 !important;
        font-size: 10pt !important;
        page-break-inside: avoid;
    }
    
    th, td {
        border: 1pt solid #000 !important;
        padding: 4pt !important;
        text-align: left !important;
        background: #fff !important;
        color: #000 !important;
    }
    
    th {
        font-weight: bold !important;
        background: #f0f0f0 !important;
    }
    
    /* Tableaux spécialisés */
    .comparison-table, .specs-table,
    .rpi-comparison-table, .power-table {
        font-size: 9pt !important;
    }
    
    /* ==========================================================================
       08. SPÉCIFICATIONS ET TECHNIQUES
       ========================================================================== */
    
    /* Sections techniques */
    .tech-specs, .specs-section,
    .technical-highlight, .tech-note {
        border: 1pt solid #000 !important;
        padding: 8pt !important;
        margin: 12pt 0 !important;
        background: #fff !important;
        page-break-inside: avoid;
    }
    
    /* Listes de spécifications */
    .spec-list, .feature-list, .quality-list {
        margin: 8pt 0 !important;
        padding-left: 16pt !important;
    }
    
    .spec-list li, .feature-list li, .quality-list li {
        margin-bottom: 2pt !important;
        color: #000 !important;
    }
    
    /* Suppression des icônes */
    .spec-list li::before,
    .feature-list li::before,
    .quality-list li::before {
        content: "• " !important;
        color: #000 !important;
    }
    
   
    
    /* ==========================================================================
       10. LIENS ET RÉFÉRENCES
       ========================================================================== */
    
    /* Liens visibles */
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    /* Affichage des URLs pour les liens importants */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }
    
    /* Suppression des URLs pour les liens internes */
    a[href^="#"]:after,
    a[href^="/"]:after {
        content: "";
    }
    
    /* Liens de navigation supprimés */
    .nav a:after,
    .navbar a:after,
    .breadcrumb a:after {
        content: "";
    }
    
    /* ==========================================================================
       11. BADGES ET STATUTS
       ========================================================================== */
    
    /* Badges simplifiés */
    .badge, .status-badge, .innovation-badge,
    .french-badge, .featured-badge,
    .price-badge, .demo-badge {
        border: 1pt solid #000 !important;
        padding: 2pt 4pt !important;
        margin: 2pt !important;
        background: #fff !important;
        color: #000 !important;
        font-size: 9pt !important;
        border-radius: 0 !important;
    }
    
    /* ==========================================================================
       12. ALERTES ET WARNINGS
       ========================================================================== */
    
    /* Boîtes d'alerte */
    .warning-box, .safety-warning,
    .success-box, .danger-box,
    .installation-info, .alert {
        border: 2pt solid #000 !important;
        padding: 8pt !important;
        margin: 12pt 0 !important;
        background: #fff !important;
        color: #000 !important;
        page-break-inside: avoid;
    }
    
    .warning-box::before { content: "⚠ ATTENTION: "; }
    .danger-box::before { content: "⛔ DANGER: "; }
    .success-box::before { content: "✓ SUCCÈS: "; }
    
    /* Icônes d'alerte simplifiées */
    .warning-icon, .success-icon, .danger-icon {
        display: none !important;
    }
    
    /* ==========================================================================
       13. SECTIONS SPÉCIALISÉES
       ========================================================================== */
    
    /* Process et étapes */
    .process-step, .solution-step, .flow-step {
        border: 1pt solid #000 !important;
        padding: 8pt !important;
        margin: 8pt 0 !important;
        background: #fff !important;
        page-break-inside: avoid;
    }
    
    .process-number, .step-number {
        background: #000 !important;
        color: #fff !important;
        padding: 2pt 4pt !important;
        margin-right: 4pt !important;
        border-radius: 0 !important;
        font-weight: bold !important;
    }
    
    /* Timeline */
    .timeline-item {
        border-left: 2pt solid #000 !important;
        padding-left: 12pt !important;
        margin: 8pt 0 !important;
    }
    
    .timeline-year, .timeline-date {
        font-weight: bold !important;
        color: #000 !important;
    }
    
    /* ==========================================================================
       14. BLOG ET ARTICLES
       ========================================================================== */
    
    /* Articles de blog */
    .article-content, .blog-content {
        color: #000 !important;
        line-height: 1.4 !important;
    }
    
    .article-meta, .blog-meta {
        border-bottom: 1pt solid #000 !important;
        padding-bottom: 6pt !important;
        margin-bottom: 12pt !important;
        font-size: 10pt !important;
    }
    
    /* Table des matières */
    .table-of-contents, .toc {
        border: 1pt solid #000 !important;
        padding: 8pt !important;
        margin: 12pt 0 !important;
        background: #f8f8f8 !important;
    }
    
    /* ==========================================================================
       15. FOOTER ET INFORMATIONS
       ========================================================================== */
    
    /* Footer simplifié */
    .footer {
        border-top: 2pt solid #000 !important;
        padding-top: 12pt !important;
        margin-top: 24pt !important;
        color: #000 !important;
        background: #fff !important;
        font-size: 10pt !important;
    }
    
    /* Informations de contact */
    .contact-info, .company-details {
        border: 1pt solid #000 !important;
        padding: 8pt !important;
        margin: 12pt 0 !important;
    }
    
    /* ==========================================================================
       16. SAUTS DE PAGE ET OPTIMISATIONS
       ========================================================================== */
    
    /* Contrôle des sauts de page */
    .page-break-before { page-break-before: always !important; }
    .page-break-after { page-break-after: always !important; }
    .page-break-avoid { page-break-inside: avoid !important; }
    
    /* Sections importantes */
    .section, .tech-section,
    .methodology-step, .product-section {
        page-break-inside: avoid;
        margin: 16pt 0 !important;
    }
    
    /* Éviter les coupures malheureuses */
    blockquote, pre, code,
    .code-example, .yaml-example {
        page-break-inside: avoid !important;
        border: 1pt solid #000 !important;
        padding: 6pt !important;
        margin: 8pt 0 !important;
        background: #f8f8f8 !important;
        font-family: "Courier New", Courier, monospace !important;
        font-size: 9pt !important;
    }
    
    /* ==========================================================================
       17. OPTIMISATIONS FINALES
       ========================================================================== */
    
    /* Suppression des marges excessives */
    * {
        margin-top: 0 !important;
    }
    
    /* Espacement cohérent */
    .section-header {
        margin-bottom: 12pt !important;
    }
    
    
    /* Optimisation de l'encre */
    .background-color, .bg-primary, .bg-secondary,
    .bg-accent, .bg-light {
        background: #fff !important;
    }
    
    /* Suppression des effets visuels */
    * {
        border-radius: 0 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
    
    /* Contenu essentiel uniquement */
    .decoration, .ornament, .visual-effect,
    .particle, .background-animation {
        display: none !important;
    }
}

/* ==========================================================================
   STYLES POUR ÉCRANS (éviter les conflits)
   ========================================================================== */

@media screen {
    .print-only {
        display: none !important;
    }
}

@media print {
    .screen-only {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    .hero, .energy-hero {
        background: none !important;
        color: #000 !important;
    }
    
    .hero::before, .hero::after {
        display: none !important;
    }
    
    .btn-back {
        display: none !important;
    }
    
  
    .cta-section {
        background: none !important;
        color: #000 !important;
    }
    

}