/* CSS Variables Definition */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #8BC34A;
    --accent-color: #FF9800;
    --dark-color: #2E7D32;
    --light-color: #F1F8E9;
    --text-color: #333333;
    --white: #FFFFFF;
}

/* Container class - essential for layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    overflow-x: hidden;
}

/* Font Family for Footer Content */
footer, .back-to-top {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Cards Alignment Fix - Aligner les boutons en bas des cartes */
.blog-card, .related-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.blog-content, .related-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

.blog-content p, .related-content p {
    flex: 1 !important;
}

.blog-content .btn, .related-content .btn {
    margin-top: auto !important;
    align-self: flex-start !important;
}

/* Footer Styles */
footer {
    background-color: #2E7D32 !important;
    color: #FFFFFF !important;
    padding: 3rem 0 1rem;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
    color: #FFFFFF !important;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
}

.footer-column h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: #FF9800 !important;
}

.footer-column p {
    color: #ccc !important;
    margin-bottom: 1rem;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-links a:hover {
    color: var(--accent-color) !important;
    padding-left: 5px;
}

.social-links {
    display: flex;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1) !important;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
    color: var(--white) !important;
    text-decoration: none;
}

.social-links a:hover {
    background-color: var(--accent-color) !important;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #aaa !important;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.copyright a {
    color: var(--accent-color) !important;
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--dark-color) !important;
    transform: translateY(-3px);
}

/* Contact info styling */
.contact-info {
    margin-top: 1rem;
}

.contact-line {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #ccc !important;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.contact-icon {
    font-size: 1.1rem;
    margin-right: 10px;
    width: 20px;
    flex-shrink: 0;
}

.contact-text {
    font-size: 0.95rem;
}

/* Related Articles Section */
.related-articles {
    background-color: var(--light-color);
    padding: 4rem 0;
    margin-top: 4rem;
}

.related-title {
    text-align: center;
    margin-bottom: 3rem;
}

.related-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.related-title p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.related-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 600px !important;
    min-height: 600px !important;
    max-height: 600px !important;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.related-img {
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-img img {
    transform: scale(1.05);
}

.related-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.related-content h3 {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.related-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex: 1;
    font-size: 1rem;
}

.related-content .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* Container pour les images des articles liés */

/* Responsive styles */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem 2rem 1rem;
        margin: 0 auto;
    }
    
    .related-title h2 {
        font-size: 1.8rem;
    }
    
    .related-articles {
        padding: 3rem 0 3rem 0;
        min-height: 500px;
    }
    
    .related-card img {
        height: 160px;
    }
    
    .related-img img {
        height: 160px;
    }
    
    .related-img {
        height: 160px;
    }
    
    .related-content {
        padding: 1.2rem;
    }
    
    .related-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem 2rem 0.5rem;
        margin: 0 auto;
    }
    
    .related-articles {
        padding: 2rem 0 2rem 0;
        min-height: 400px;
    }
    
    .related-card img {
        height: 140px;
    }
    
    .related-img img {
        height: 140px;
    }
    
    .related-img {
        height: 140px;
    }
    
    .related-content {
        padding: 1rem;
    }
    
    .related-content h3 {
        font-size: 1.1rem;
    }
    
    .related-content p {
        font-size: 0.9rem;
    }
}

/* Global image fixes */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Main content images */
.main-content img,
.step-content img,
.section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Product recommendation images */
.product-grid img,
.recommendation img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Article grid images */
.articles-grid img,
.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
}

/* Benefit box styling */
.benefit-box {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.benefit-box h3 {
    color: white !important;
    margin-bottom: 1rem;
    font-weight: 700;
}

.benefit-box p {
    color: white !important;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.benefit-box a {
    color: #fff !important;
    text-decoration: underline;
    font-weight: 600;
}

.benefit-box a:hover {
    color: #f1c40f !important;
    text-decoration: none;
}

/* CSS renforcé pour contrôler les dimensions des images d'articles liés */ 

/* Affiliate notice styling */
.affiliate-notice {
    background-color: #ffebee;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    color: #c62828;
    font-size: 0.9rem;
    line-height: 1.5;
}

.affiliate-notice strong {
    color: #d32f2f;
    font-weight: 600;
} 