/* Styles pour la page de détail d'une nouvelle */

/* Layout principal */
.nouvelle-detail-section {
    padding: 40px 0;
    background: #f8f9fa;
    min-height: 60vh;
}

.nouvelle-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 40px;
}

.nouvelle-detail-main {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Header de l'article */
.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

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

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item i {
    color: #009FDA;
}

/* Image de l'article */
.article-image {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Contenu de l'article */
.article-content {
    margin: 30px 0;
    font-size: 17px;
    line-height: 1.8;
    color: #333;
}

.article-content p {
    margin-bottom: 20px;
}

.content-description {
    font-size: 18px;
}

.content-description .lead {
    font-size: 20px;
    line-height: 1.6;
    color: #555;
}

/* Catégories */
.article-categories {
    margin: 40px 0 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
}

.categories-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.categories-title i {
    color: #009FDA;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-badge {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #009FDA 0%, #00587C 100%);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 159, 218, 0.3);
}

/* Actions */
.article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.article-actions .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.article-actions .btn-primary {
    background: linear-gradient(135deg, #009FDA 0%, #0088cc 100%);
    color: white;
}

.article-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 159, 218, 0.4);
}

.article-actions .btn-secondary {
    background: #7AC142;
    color: white;
}

.article-actions .btn-secondary:hover {
    background: #6AB132;
    transform: translateY(-2px);
}

.article-actions .btn-outline {
    background: white;
    color: #666;
    border: 1px solid #dee2e6;
}

.article-actions .btn-outline:hover {
    background: #f8f9fa;
}

/* Sidebar */
.nouvelle-detail-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #009FDA;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: #009FDA;
}

/* Articles reliés avec miniatures */
.related-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.related-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-item-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.related-item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

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

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

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 18px;
}

.related-item-text {
    flex: 1;
    min-width: 0;
}

.related-item h4 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.related-item h4 a:hover {
    color: #009FDA;
}

.related-item time {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

.no-related {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

/* Articles populaires */
.popular-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-rank {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #009FDA 0%, #00587C 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.popular-content {
    flex: 1;
}

.popular-content h4 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.popular-content h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.popular-content h4 a:hover {
    color: #009FDA;
}

.popular-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #999;
}

/* Responsive */
@media (max-width: 991px) {
    .nouvelle-detail-layout {
        grid-template-columns: 1fr;
    }

    .nouvelle-detail-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 24px;
    }

    .article-content {
        font-size: 16px;
    }

    .nouvelle-detail-main {
        padding: 20px;
    }

    .article-actions {
        flex-direction: column;
    }

    .article-actions .btn {
        width: 100%;
        justify-content: center;
    }
}