/* Optimisation de l'espacement et réduction des espaces blancs */

/* News Slider Section */
.news-slider-section {
    overflow: hidden;
}

.main-carousel {
    height: 450px !important;
}

.secondary-articles-grid {
    height: 450px !important;
    overflow: hidden;
}

.secondary-articles-grid .row {
    height: 100% !important;
}

.secondary-articles-grid .col-md-6 {
    height: 50% !important;
    display: flex;
    flex-direction: column;
}

.secondary-articles-grid .position-relative {
    height: 100% !important;
    flex: 1;
}

/* Ensure equal heights for news slider */
.news-slider-container {
    display: flex;
    align-items: stretch;
}

.news-slider-left,
.news-slider-right {
    height: 450px !important;
}

/* Grid improvements for secondary articles */
.secondary-grid-item {
    height: calc(50% - 1px) !important;
    margin-bottom: 2px;
}

.secondary-grid-item:nth-child(3),
.secondary-grid-item:nth-child(4) {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-carousel,
    .secondary-articles-grid,
    .news-slider-left,
    .news-slider-right {
        height: auto !important;
    }
    
    .secondary-articles-grid .col-md-6 {
        height: auto !important;
    }
    
    .secondary-grid-item {
        height: 250px !important;
        margin-bottom: 1rem;
    }
}
.breaking-news {
    padding: 8px 0;
    margin-bottom: 0;
}

.breaking-news-content {
    padding: 6px 0;
}

.breaking-badge {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.breaking-text {
    font-size: 0.85rem;
}

/* Section Titles */
.section-title {
    margin-bottom: 15px !important;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}

.section-title h4 {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Container spacing */
.container-fluid {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

.container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Cards Layout */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border-radius: 8px;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.card-img-top {
    border-radius: 8px 8px 0 0;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.03);
}

.card-body {
    flex: 1 1 auto;
}

.card-footer {
    background: transparent !important;
    border-top: none !important;
}

/* Grid Layout Improvements */
.row {
    margin-bottom: 0;
}

.col-lg-3, .col-lg-4, .col-md-6 {
    margin-bottom: 1.5rem;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Featured Articles Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Badges */
.badge {
    padding: 3px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
}

/* Text content */
.h2, .h4, .h5, .h6 {
    line-height: 1.3;
    margin-bottom: 10px !important;
}

.text-muted {
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Button Improvements */
.btn-outline-info {
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.btn-outline-info:hover {
    transform: translateY(-1px);
}

/* Alert boxes */
.alert {
    padding: 15px !important;
    margin-bottom: 20px !important;
    border-radius: 8px;
}

/* Overlay improvements */
.overlay {
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 70%);
    padding: 15px;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (max-width: 992px) {
    .col-lg-3, .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .article-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .container-fluid {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    
    .section-title {
        margin-bottom: 10px !important;
    }
    
    .col-lg-3, .col-lg-4, .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .h2 {
        font-size: 1.3rem;
    }
    
    .h4 {
        font-size: 1.1rem;
    }
    
    .h5, .h6 {
        font-size: 1rem;
    }
}

/* Equal Height Cards */
.equal-height {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.equal-height .card-body {
    flex-grow: 1;
}

/* Compact spacing utilities */
.compact-spacing {
    margin-bottom: 0.5rem !important;
}

.tight-padding {
    padding: 8px !important;
}

.reduced-margin {
    margin-bottom: 0.75rem !important;
}

/* Category Section Spacing */
.category-section {
    margin-bottom: 2rem;
}

.category-section:last-child {
    margin-bottom: 1rem;
}
