/* BLOG.CSS - Styles spécifiques blog avec padding intelligent et responsive complet */

/* Container principal avec padding intelligent */
.blog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 35px 20px 60px;
    line-height: 1.7;
    background: #ffffff;
}

/* Article principal */
.blog-post {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

/* Header article */
.blog-header {
    margin-bottom: 40px;
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.article-category {
    background: #2E86AB;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.article-date,
.reading-time {
    color: #888;
}

/* Titre principal */
.blog-header h1 {
    font-size: 2.2rem;
    color: #1a1a1a;
    margin: 20px 0;
    font-weight: 700;
    line-height: 1.3;
}

/* Images */
.hero-image,
.content-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-image {
    margin-top: 20px;
    margin-bottom: 30px;
}

/* Contenu article */
.blog-content {
    font-size: 16px;
    color: #333;
}

.intro-text {
    font-size: 18px;
    color: #2E86AB;
    font-weight: 500;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fbff 0%, #e8f4fd 100%);
    border-radius: 8px;
    border-left: 4px solid #2E86AB;
}

/* Titres */
h2 {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin: 40px 0 20px;
    font-weight: 600;
    border-bottom: 2px solid #2E86AB;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.4rem;
    color: #333;
    margin: 30px 0 15px;
    font-weight: 600;
}

h4 {
    font-size: 1.2rem;
    color: #2E86AB;
    margin: 25px 0 10px;
    font-weight: 600;
}

/* Paragraphes et listes */
p {
    margin-bottom: 20px;
    text-align: justify;
}

ul, ol {
    margin: 20px 0;
    padding-left: 25px;
}

li {
    margin-bottom: 8px;
    color: #333;
}

/* Tableaux responsive OBLIGATOIRE */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.responsive-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: white;
}

.responsive-table th {
    background: #2E86AB;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #1a5f7a;
}

.responsive-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.responsive-table tr:nth-child(even) {
    background: #f9f9f9;
}

.responsive-table tr:hover {
    background: #f0f8ff;
}

/* Responsive tableaux mobile */
@media (max-width: 768px) {
    .responsive-table {
        min-width: auto;
        display: block;
        white-space: nowrap;
    }
    
    .responsive-table thead,
    .responsive-table tbody,
    .responsive-table th,
    .responsive-table td,
    .responsive-table tr {
        display: block;
    }
    
    .responsive-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .responsive-table tr {
        border: 1px solid #ddd;
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 8px;
        background: white;
    }
    
    .responsive-table td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        text-align: left;
        white-space: normal;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .responsive-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 15px;
        width: 45%;
        text-align: left;
        font-weight: bold;
        color: #2E86AB;
    }
}

/* Boîtes d'information */
.info-box {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.info-box h4 {
    color: #e65100;
    margin: 0 0 15px;
}

/* Calculateur interactif */
.calculator {
    display: grid;
    gap: 15px;
}

.calculator label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

.calculator select,
.calculator input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: white;
}

.calculator select:focus,
.calculator input:focus {
    outline: none;
    border-color: #2E86AB;
}

.calculator button {
    background: #F24236;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.calculator button:hover {
    background: #d32f2f;
}

.result {
    background: #e8f5e8;
    border: 2px solid #4caf50;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    font-weight: 600;
    color: #2e7d32;
    display: none;
}

/* Grille de conseils */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.tip-card {
    background: white;
    border: 2px solid #e3f2fd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tip-card h4 {
    color: #2E86AB;
    margin: 0 0 10px;
    font-size: 16px;
}

.tip-card p {
    font-size: 14px;
    margin: 0;
    text-align: left;
}

/* Boîte conclusion */
.conclusion-box {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-left: 4px solid #9c27b0;
    padding: 25px;
    margin: 40px 0;
    border-radius: 8px;
}

.conclusion-box h3 {
    color: #6a1b9a;
    margin: 0 0 15px;
}

.conclusion-box p {
    margin: 0;
    font-weight: 500;
    color: #4a148c;
}

/* Section FAQ */
.faq-section {
    margin-top: 40px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
}

.faq-section h2 {
    border-bottom: 2px solid #F24236;
    color: #333;
}

.faq-item {
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.faq-item h4 {
    color: #2E86AB;
    margin: 0 0 10px;
    font-size: 16px;
}

.faq-item p {
    margin: 0;
    font-size: 15px;
    text-align: left;
}

/* Auteur */
.author-section {
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    border-radius: 8px;
    padding: 25px;
    margin: 40px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #2E86AB;
}

.author-info h4 {
    margin: 0 0 5px;
    color: #333;
    font-size: 18px;
}

.author-info .author-title {
    color: #2E86AB;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

.author-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
    text-align: left;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .blog-container {
        padding: 25px 15px 40px;
    }
    
    .blog-header h1 {
        font-size: 1.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .intro-text {
        font-size: 16px;
        padding: 15px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .conclusion-box,
    .info-box,
    .faq-section {
        padding: 20px 15px;
    }
    
    .author-section {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }
    
    .calculator select,
    .calculator input,
    .calculator button {
        font-size: 16px;
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .blog-container {
        padding: 20px 10px 30px;
    }
    
    .blog-header h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }
    
    .intro-text {
        font-size: 15px;
    }
    
    .blog-content {
        font-size: 15px;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
}

/* Impression */
@media print {
    .blog-container {
        max-width: none;
        padding: 0;
    }
    
    .hero-image,
    .content-image {
        max-height: 300px;
        object-fit: contain;
    }
    
    .calculator,
    .tips-grid {
        display: none;
    }
}