/* HERO MASONRY LAYOUT */
.hero-masonry {
    background-color: #0a0a0a;
    padding: 3rem 0;
    overflow: hidden;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 300px;
    gap: 1.5rem;
    grid-auto-flow: dense;
}

.masonry-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #1a1a1a;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.15);
}

.masonry-item--large {
    grid-column: span 2;
    grid-row: span 2;
}

.masonry-item--tall {
    grid-row: span 2;
}

.masonry-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.masonry-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background-color: rgba(10,10,10,0.95);0%, rgba(10,10,10,0.7) 60%, transparent 100%);
    color: #fafafa;
}

.masonry-tag {
    display: inline-block;
    background-color: #dc2626;
    color: #fafafa;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.masonry-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    line-height: 1.3;
}

.masonry-title a {
    color: #fafafa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.masonry-title a:hover {
    color: #dc2626;
}

.masonry-item--large .masonry-title {
    font-size: 2rem;
}

.masonry-excerpt {
    margin: 0 0 1rem 0;
    color: #ccc;
    line-height: 1.5;
    font-size: 0.95rem;
}

.masonry-date,
.reading-time {
    display: inline-block;
    font-size: 0.85rem;
    color: #999;
}

.reading-time {
    margin-left: 1rem;
    position: relative;
}

.reading-time::before {
    content: '•';
    position: absolute;
    left: -0.7rem;
    color: #666;
}

/* CALCULATOR SECTION */
.calculator-section {
    background-color: #fafafa;
    padding: 5rem 0;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.calculator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-icon {
    color: #dc2626;
    margin-bottom: 1rem;
}

.section-title {
    color: #0a0a0a;
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.section-title.centered {
    text-align: center;
}

.section-intro {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.tco-calculator {
    background-color: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

.calculator-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-group input,
.input-group select {
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #dc2626;
}

.calculator-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    border-left: 4px solid #ddd;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.result-card:hover {
    transform: translateY(-3px);
}

.result-essence {
    border-left-color: #666;
}

.result-diesel {
    border-left-color: #333;
}

.result-elec {
    border-left-color: #059669;
}

.result-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.result-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 0.25rem;
}

.result-detail {
    font-size: 0.85rem;
    color: #999;
}

.calculator-note {
    background-color: #fef3f2;
    border-left: 4px solid #dc2626;
    padding: 1rem;
    border-radius: 0 4px 4px 0;
}

.calculator-note p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* CATEGORIES MEGA DROPDOWN STYLE */
.categories-section {
    background-color: #0a0a0a;
    padding: 5rem 0;
}

.categories-section .section-title {
    color: #fafafa;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.category-card {
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    border-color: #dc2626;
    transform: translateY(-8px);
    background-color: #222;
}

.category-visual {
    color: #dc2626;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.category-card:hover .category-visual {
    transform: scale(1.1);
}

.category-title {
    color: #fafafa;
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.category-desc {
    color: #999;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
}

.category-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.preview-item {
    background-color: #333;
    color: #ccc;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.category-card:hover .preview-item {
    background-color: #dc2626;
    color: #fafafa;
}

/* COMPARISON TABLE */
.comparison-section {
    background-color: #fafafa;
    padding: 5rem 0;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    font-size: 0.95rem;
}

.data-table th,
.data-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table thead th {
    background-color: #0a0a0a;
    color: #fafafa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.data-table tbody tr:hover {
    background-color: #f9f9f9;
}

.data-table tbody th {
    font-weight: 600;
    color: #0a0a0a;
    background-color: #fafafa;
}

.col-essence {
    color: #dc2626;
    font-weight: 600;
}

.col-diesel {
    color: #666;
    font-weight: 600;
}

.col-hybride {
    color: #2563eb;
    font-weight: 600;
}

.col-elec {
    color: #059669;
    font-weight: 600;
}

.table-source {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 1rem;
}

/* RECENT ARTICLES MASONRY */
.recent-articles {
    background-color: #fff;
    padding: 5rem 0;
}

.articles-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.article-card {
    background-color: #fafafa;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

/* Color transitions on hover */
.card-essence:hover {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.card-mecanique:hover {
    border-color: #2563eb;
    background-color: #eff6ff;
}

.card-roadtrip:hover {
    border-color: #059669;
    background-color: #f0fdf4;
}

.card-sport:hover {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.card-histoire:hover {
    border-color: #7c3aed;
    background-color: #f5f3ff;
}

.card-achat:hover {
    border-color: #ea580c;
    background-color: #fff7ed;
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    display: inline-block;
    background-color: #dc2626;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

.card-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    line-height: 1.3;
}

.card-title a {
    color: #0a0a0a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-title a:hover {
    color: #dc2626;
}

.card-excerpt {
    color: #666;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.view-archive {
    text-align: center;
    margin-top: 3rem;
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: transparent;
    color: #dc2626;
    border: 2px solid #dc2626;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #dc2626;
    color: #fff;
}

/* NEWSLETTER */
.newsletter-section {
    background-color: #0a0a0a;
    padding: 5rem 0;
}

.newsletter-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-icon {
    color: #dc2626;
    margin-bottom: 1.5rem;
}

.newsletter-title {
    color: #fafafa;
    font-size: 2rem;
    margin: 0 0 1rem 0;
}

.newsletter-text {
    color: #999;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    gap: 0.75rem;
}

.newsletter-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid #333;
    border-radius: 6px;
    background-color: #1a1a1a;
    color: #fafafa;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: #dc2626;
}

.newsletter-btn {
    padding: 1rem 2rem;
    background-color: #dc2626;
    color: #fafafa;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-family: inherit;
}

.newsletter-btn:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
}

.form-disclaimer {
    color: #666;
    font-size: 0.8rem;
    margin-top: 1rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* DISCLAIMER */
.disclaimer-section {
    background-color: #fafafa;
    padding: 3rem 0;
    border-top: 1px solid #eee;
}

.disclaimer-box {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background-color: #fef3f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.disclaimer-box svg {
    flex-shrink: 0;
    color: #dc2626;
    fill: #dc2626;
}

.disclaimer-box p {
    margin: 0;
    color: #7f1d1d;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .articles-masonry {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-masonry {
        padding: 2rem 0;
    }
    
    .hero-container,
    .section-container {
        padding: 0 1rem;
    }
    
    .masonry-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    
    .masonry-item,
    .masonry-item--large,
    .masonry-item--tall {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 320px;
    }

    .masonry-img {
        min-height: 200px;
        max-height: 250px;
        object-fit: cover;
    }
    
    .masonry-title {
        font-size: 1.25rem;
    }
    
    .masonry-item--large .masonry-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .calculator-inputs,
    .calculator-results {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .articles-masonry {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .masonry-item {
        min-height: 350px;
    }
    
    .masonry-content {
        padding: 1.5rem;
    }
    
    .tco-calculator {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .newsletter-title {
        font-size: 1.5rem;
    }
    
    .disclaimer-box {
        flex-direction: column;
        text-align: center;
    }
}