/*
Theme Name:   Divi Child - Mondher Code/Nocode Automation
Theme URI:    https://votre-domaine.ch
Description:  Child theme pour Mondher Code/Nocode Automation
Author:       Mondher
Author URI:   https://mondher.ch
Template:     Divi
Version:      1.0.0
Text Domain:  divi-child
*/

/* ============================================
   Styles personnalisés ci-dessous
   ============================================ */

:root {
  --primary: #605CAB;
  --primary-light: #9794D4;
  --primary-dark: #332F80;
  --accent: #FF2C55;
  --secondary: #D4AF37;
  --bg-light: #EEEDFF;
  --bg-dark: #141154;
  --text-primary: #2E2E2E;
  --text-secondary: #666666;
}

/* Colorier premier mot du titre Hero */
.et_pb_fullscreen_header_title::first-line {
    color: #FF2C55;
}

/* ============================================
   Content Blog Posts Styles 
   ============================================ */

/* Article Content Headings */
.et_pb_post_content h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: #2E2E2E;
    margin-top: 40px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.et_pb_post_content h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 24px;
    color: #2E2E2E;
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.et_pb_post_content h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20px;
    color: #605CAB;
    margin-top: 25px;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Paragraphes */
.et_pb_post_content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

/* Listes */
.et_pb_post_content ul,
.et_pb_post_content ol {
    margin-bottom: 25px;
    padding-left: 30px;
}

.et_pb_post_content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

/* Code blocks */
.et_pb_post_content code {
    background: #F5F5F5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 16px;
    color: #605CAB;
}

.et_pb_post_content pre {
    background: #2E2E2E;
    color: #EEEDFF;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 25px;
}

/* ========================================
   AMÉLIORATION VISUELLE ARTICLES
   ======================================== */

/* Container article avec padding latéral */
.et_pb_post_content {
    padding: 0 20px;
}

/* H2 avec background et barre */
.article-content h2 {
    background: linear-gradient(to right, #F5F5FF, transparent);
    border-left: 5px solid #605CAB;
    padding: 20px 25px;
    margin: 50px -20px 30px -20px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 10px rgba(96, 92, 171, 0.05);
}

/* H3 avec icône */
.article-content h3::before {
    content: "▸ ";
    color: #605CAB;
    font-weight: bold;
    margin-right: 8px;
}

/* Listes avec couleur */
.article-content ul li::marker,
.article-content ol li::marker {
    color: #605CAB;
    font-weight: bold;
}

.article-content ul li,
.article-content ol li {
    padding-left: 10px;
    margin-bottom: 12px;
}

/* Box projet améliorée */
.article-content > div[style*="background:#F5F5FF"],
.article-content > div[style*="background:#605CAB"] {
    box-shadow: 0 6px 25px rgba(96, 92, 171, 0.12) !important;
    margin: 40px -10px !important;
    padding: 30px !important;
}

/* Paragraphes avec espacement */
.article-content p {
    margin-bottom: 25px;
    line-height: 1.8;
}

/* Premier paragraphe (lead) */
.article-content > p:first-of-type {
    font-size: 20px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 30px;
}

/* Citations en gras avec couleur */
.article-content strong {
    color: #605CAB;
    font-weight: 700;
}

/* Séparateur visuel entre sections */
.article-content h2 + p::before {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, #605CAB, #9794D4);
    margin: 0 0 25px 0;
    border-radius: 2px;
}

/* Background page article */
body.single-post {
    background: #F9F9F9;
}

/* Container contenu blanc */
.et_pb_post_content {
    background: #FFFFFF;
    padding: 60px 40px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .et_pb_post_content {
        padding: 40px 25px;
        border-radius: 0;
    }
}

/* ========================================
   Header Amazon-style compact
   ======================================== */
#main-header {
    padding: 8px 40px !important;
    min-height: 50px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Logo compact */
#main-header .et_pb_image {
    max-height: 40px !important;
    width: auto !important;
    margin: 0 !important;
}

#main-header .et_pb_image img {
    max-height: 40px !important;
    width: auto !important;
}

/* Menu aligné verticalement */
#et-top-navigation {
    padding: 0 !important;
}

#top-menu {
    margin: 0 !important;
}

#top-menu li {
    padding: 15px 12px !important;
}

#top-menu a {
    font-size: 16px !important;
    padding: 0 !important;
}

/* Row header sans padding vertical */
.et_pb_section_0_tb_header .et_pb_row {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.et_pb_section_0_tb_header .et_pb_column {
    padding: 0 !important;
}

/* ========================================
   Bouton CTA Easy Facture dans le menu
   ======================================== */

.et_pb_menu_0_tb_header.et_pb_menu ul li.et_pb_menu_page_id-518 a,
.et_pb_menu_0_tb_header.et_pb_menu ul li.et_pb_menu_page_id-518 a:link,
.et_pb_menu_0_tb_header.et_pb_menu ul li.et_pb_menu_page_id-518 a:visited,
.et_pb_menu_0_tb_header.et_pb_menu ul li.et_pb_menu_page_id-518 a:active {
    color: #FFFFFF !important;
    background: #FF2C55 !important;
    padding: 10px 20px !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(255, 44, 85, 0.3) !important;
    display: inline-block !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
}

.et_pb_menu_0_tb_header.et_pb_menu ul li.et_pb_menu_page_id-518 a:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 44, 85, 0.4) !important;
    background: #d9254a !important;
    color: #FFFFFF !important;
}

/* Centrer verticalement le <li> parent */
.et_pb_menu_0_tb_header.et_pb_menu ul li.et_pb_menu_page_id-518 {
    margin-left: 15px !important;
    display: flex !important;
    align-items: center !important;
}


/* ========================================
   Corriger hauteur de tous les liens du menu
   ======================================== */

.et_pb_menu_0_tb_header.et_pb_menu ul li {
    display: flex !important;
    align-items: center !important;
}

.et_pb_menu_0_tb_header.et_pb_menu ul li a {
    padding: 8px 15px !important;
    line-height: 1.4 !important;
    display: inline-block !important;
}

/* ========================================
   POSTS Style
   ======================================== */

   /* Table des matières collapsible */
        .toc-container {
            background: #f8f9fa;
            border: 2px solid #3498db;
            border-radius: 8px;
            padding: 20px;
            margin: 30px 0;
        }
        
        .toc-toggle {
            background: #3498db;
            color: white;
            border: none;
            padding: 12px 20px;
            font-size: 1.1rem;
            font-weight: bold;
            cursor: pointer;
            width: 100%;
            text-align: left;
            border-radius: 5px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .toc-toggle:hover {
            background: #2980b9;
        }
        
        .toc-toggle::after {
            content: '▼';
            transition: transform 0.3s;
        }
        
        .toc-toggle.active::after {
            transform: rotate(180deg);
        }
        
        .toc-content {
            display: none;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid #ddd;
        }
        
        .toc-content.show {
            display: block;
        }
        
        .toc-content ol {
            list-style: none;
            counter-reset: toc-counter;
            padding-left: 0;
        }
        
        .toc-content ol li {
            counter-increment: toc-counter;
            margin: 10px 0;
            padding-left: 30px;
            position: relative;
        }
        
        .toc-content ol li::before {
            content: counter(toc-counter) ".";
            position: absolute;
            left: 0;
            color: #3498db;
            font-weight: bold;
        }
        
        .toc-content a {
            color: #2c3e50;
            text-decoration: none;
            transition: color 0.2s;
        }
        
        .toc-content a:hover {
            color: #3498db;
        }

        .article {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            line-height: 1.8;
            color: #333;
            max-width: 900px;
            margin: 0 auto;
            padding: 20px;
        }
        
        .article h1 {
            font-size: 2.5rem;
            color: #2c3e50;
            margin-bottom: 1rem;
            border-bottom: 3px solid #3498db;
            padding-bottom: 0.5rem;
        }
        
        .article h2 {
            font-size: 2rem;
            color: #2c3e50;
            margin-top: 3rem;
            margin-bottom: 1rem;
            padding-left: 15px;
            border-left: 5px solid #3498db;
        }
        
        .article h3 {
            font-size: 1.5rem;
            color: #34495e;
            margin-top: 2rem;
        }
        
        .hero {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 50px 30px;
            border-radius: 15px;
            margin: 30px 0;
            text-align: center;
        }
        
        .hero h1 {
            color: white;
            border: none;
            font-size: 2.8rem;
            margin-bottom: 20px;
        }
        
        .hero .subtitle {
            font-size: 1.3rem;
            opacity: 0.95;
            margin-bottom: 30px;
        }
        
        .stats-box {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            border-radius: 12px;
            margin: 30px 0;
            text-align: center;
        }
        
        .stats-box h3 {
            color: white;
            margin-top: 0;
            font-size: 1.8rem;
        }
        
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }
        
        .stat-item {
            background: rgba(255, 255, 255, 0.15);
            padding: 20px;
            border-radius: 8px;
        }
        
        .stat-number {
            font-size: 2.5rem;
            font-weight: bold;
        }
        
        .stat-label {
            font-size: 1rem;
            opacity: 0.9;
        }
        
        .alert-box {
            padding: 20px 25px;
            margin: 25px 0;
            border-radius: 8px;
            border-left: 5px solid;
        }
        
        .alert-success {
            background: #d4edda;
            border-color: #28a745;
            color: #155724;
        }
        
        .alert-info {
            background: #d1ecf1;
            border-color: #17a2b8;
            color: #0c5460;
        }
        
        .alert-danger {
            background: #f8d7da;
            border-color: #dc3545;
            color: #721c24;
        }
        
        .comparison-table {
            width: 100%;
            border-collapse: collapse;
            margin: 30px 0;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            border-radius: 8px;
            overflow: hidden;
        }
        
        .comparison-table thead {
            background: #3498db;
            color: white;
        }
        
        .comparison-table th, .comparison-table td {
            padding: 15px;
            text-align: left;
        }
        
        .comparison-table tr:nth-child(even) {
            background: #f9f9f9;
        }
        
        .comparison-table .highlight {
            background: #d4edda;
            font-weight: bold;
            color: #155724;
        }
        
        .quote-block {
            background: #f8f9fa;
            border-left: 5px solid #3498db;
            padding: 25px 30px;
            margin: 30px 0;
            font-style: italic;
            font-size: 1.2rem;
            color: #555;
        }
        
        .cta-box {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 40px;
            border-radius: 15px;
            margin: 40px 0;
            text-align: center;
        }
        
        .cta-box h3 {
            color: white;
            margin-top: 0;
            font-size: 2rem;
        }
        
        .cta-button {
            display: inline-block;
            background: #FF2C55;
            color: white;
            padding: 15px 35px;
            border-radius: 8px;
            text-decoration: none;
            font-size: 1.2rem;
            font-weight: bold;
            margin: 10px;
            transition: all 0.3s;
        }
        
        .cta-button:hover {
            background: #e02447;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }
        
        .cta-button-secondary {
            background: transparent;
            border: 2px solid white;
        }
        
        .cta-button-secondary:hover {
            background: white;
            color: #667eea;
        }
        
        ul, ol {
            margin: 15px 0;
            padding-left: 30px;
        }
        
        li {
            margin: 10px 0;
        }
        
        code {
            background: #f0f0f0;
            padding: 3px 8px;
            border-radius: 4px;
            font-family: monospace;
            color: #e74c3c;
        }

/* ============================================
   RESPONSIVE - MOBILE FULL WIDTH
   ============================================ */

@media (max-width: 768px) {
    
    /* Divi - Sections et rangées pleine largeur */
    .et_pb_section {
        padding: 0 !important;
    }
    
    .et_pb_row {
        padding: 10px !important;
        max-width: 100% !important;
    }
    
    /* Article principal */
    .article {
        max-width: 100% !important;
        padding: 10px !important;
        margin: 0 !important;
    }
    
    /* Hero section */
    .hero {
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 30px 15px !important;
    }
    
    .hero h1 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }
    
    .hero .subtitle {
        font-size: 1rem !important;
    }
    
    /* Titres */
    .article h1 {
        font-size: 1.8rem !important;
    }
    
    .article h2 {
        font-size: 1.4rem !important;
        padding-left: 10px !important;
    }
    
    .article h3 {
        font-size: 1.2rem !important;
    }
    
    /* TOC Container */
    .toc-container {
        width: 100% !important;
        margin: 20px 0 !important;
        padding: 15px !important;
        border-radius: 0 !important;
    }
    
    .toc-toggle {
        padding: 10px 15px !important;
        font-size: 1rem !important;
    }
    
    /* Stats Box */
    .stats-box {
        width: 100% !important;
        margin: 20px 0 !important;
        padding: 20px 15px !important;
        border-radius: 0 !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    /* Tableaux */
    .comparison-table {
        font-size: 0.85rem !important;
        overflow-x: auto !important;
        display: block !important;
        width: 100% !important;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px 8px !important;
        font-size: 0.85rem !important;
    }
    
    /* Alert boxes */
    .alert-box {
        width: 100% !important;
        margin: 20px 0 !important;
        padding: 15px !important;
        border-radius: 0 !important;
    }
    
    /* CTA Box */
    .cta-box {
        width: 100% !important;
        margin: 30px 0 !important;
        padding: 25px 15px !important;
        border-radius: 0 !important;
    }
    
    .cta-box h3 {
        font-size: 1.5rem !important;
    }
    
    /* Boutons CTA */
    .cta-button {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 10px 0 !important;
        padding: 15px 20px !important;
        font-size: 1rem !important;
        text-align: center !important;
    }
    
    .cta-button-secondary {
        display: block !important;
        width: 100% !important;
    }
    
    /* Quote block */
    .quote-block {
        width: 100% !important;
        margin: 20px 0 !important;
        padding: 20px 15px !important;
        font-size: 1rem !important;
    }
    
    /* Listes */
    ul, ol {
        padding-left: 20px !important;
    }
    
    li {
        margin: 8px 0 !important;
        font-size: 0.95rem !important;
    }
}

/* ============================================
   TRÈS PETITS ÉCRANS (< 480px)
   ============================================ */

@media (max-width: 480px) {
    
    .hero h1 {
        font-size: 1.5rem !important;
    }
    
    .article h2 {
        font-size: 1.3rem !important;
    }
    
    .stat-number {
        font-size: 1.8rem !important;
    }
    
    .cta-button {
        font-size: 0.95rem !important;
        padding: 12px 15px !important;
    }
    
    .hero .subtitle {
        font-size: 0.95rem !important;
    }
}