.subtitle {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    font-size: 1.5rem;
    color: white;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

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

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

.article-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-title {
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.5rem;
    color: var(--color-charcoal);
}

.article-date {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.article-date i {
    margin-right: 0.5rem;
    color: var(--color-safran);
}

.article-excerpt {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-safran);
    color: white;
}

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

.btn-secondary {
    background-color: var(--color-azure);
    color: white;
}

.btn-secondary:hover {
    background-color: #0277BD;
    transform: translateY(-2px);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 0;
}

.modal-content {
    position: relative;
    background-color: white;
    width: 90%;
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.4s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: #777;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.modal-close:hover {
    color: var(--color-safran);
}

.article-full-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.article-full-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--color-charcoal);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.article-stats {
    display: flex;
    align-items: center;
}

.article-views, .article-likes {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
    color: #777;
}

.article-views i, .article-likes i {
    margin-right: 0.5rem;
    color: var(--color-safran);
}

.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #777;
    font-size: 1rem;
    transition: color 0.3s;
}

.like-btn:hover, .like-btn.active {
    color: var(--color-safran);
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.3s;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-facebook {
    background-color: #3b5998;
}

.share-twitter {
    background-color: #1DA1F2;
}

.share-linkedin {
    background-color: #0077B5;
}

.share-whatsapp {
    background-color: #25D366;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 1.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-full-title {
        font-size: 1.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-stats {
        justify-content: space-between;
        width: 100%;
    }
    
    .share-buttons {
        justify-content: center;
        width: 100%;
    }
}

/* Animation des boutons */
.btn, .share-btn, .like-btn {
    position: relative;
    overflow: hidden;
}

.btn::after, .share-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus::after, .share-btn:focus::after, .btn:active::after, .share-btn:active::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

 /* Styles pour les onglets de catégories */
/*.categories-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}*/

.categories-tabs.tag-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto; 
    gap: 1rem;
    padding: 10px 0;
    scroll-behavior: smooth;
    white-space: nowrap;
}

.categories-tabs.tag-scroll {
    display: flex;
    flex-wrap: wrap;
    overflow-x: auto;
    gap: 1rem;
    padding: 10px 0;
    scroll-behavior: smooth;
    white-space: nowrap;

    /* Cacher la scrollbar */
    scrollbar-width: none;         /* Firefox */
    -ms-overflow-style: none;      /* Internet Explorer/Edge */
}

.categories-tabs.tag-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}


.tab-btn {
    padding: 0.6rem 1.2rem;
    background-color: white;
    border: 2px solid var(--color-safran);
    border-radius: 30px;
    color: var(--color-charcoal);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 0 0 auto;
}

.tab-btn:hover {
    background-color: var(--color-safran-light);
}

.tab-btn.active {
    background-color: var(--color-safran);
    color: white;
}

/* Styles pour les badges de catégorie */
.article-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: var(--color-safran-light);
    color: var(--color-safran-dark);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.article-category-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: var(--color-safran);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Ajustements responsifs */
@media (max-width: 768px) {
    .categories-tabs {
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}