/* ============================= */
/* STYLES POUR LES ARTICLES */
/* ============================= */

/* PAGE ARTICLE INDIVIDUEL */
.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.article-header {
    margin-bottom: 3rem;
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    color: #6c757d;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta-item i {
    color: var(--bg-kergus);
}

.article-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.article-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    line-height: 1.8;
    font-size: 1.1rem;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h2 {
    font-size: 1.8rem;
    border-left: 4px solid var(--bg-kergus);
    padding-left: 1rem;
}

.article-content h3 {
    font-size: 1.4rem;
    color: var(--bg-kergus);
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-content blockquote {
    border-left: 4px solid var(--bg-kergus-secondary);
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 10px 10px 0;
    font-style: italic;
}

.article-content ul,
.article-content ol {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* SIDEBAR DROITE */
.article-sidebar {
    position: sticky;
    height: fit-content;
}

/* Responsive: marge en mobile, pas en desktop */
@media (max-width: 991.98px) {
    .article-sidebar {
        margin-top: 1rem;
    }
}

@media (min-width: 992px) {
    .article-sidebar {
        margin-top: 0;
        top: 6rem;
    }
}

.sidebar-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--bg-kergus-secondary);
}

.sidebar-card h4 {
    color: var(--bg-kergus);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-card h4 i {
    font-size: 1.1rem;
}

/* DOCUMENTS JOINTS */
.document-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.document-item:hover {
    background-color: #f8f9fa;
    border-color: var(--bg-kergus);
    transform: translateX(5px);
}

.document-item a {
    text-decoration: none;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.document-item a:hover {
    color: var(--bg-kergus);
}

.document-icon {
    font-size: 1.5rem;
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.document-info {
    flex: 1;
    min-width: 0;
}

.document-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-size {
    font-size: 0.8rem;
    color: #6c757d;
}

/* ARTICLES SUGGÉRÉS */
.suggested-article {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.suggested-article:hover {
    color: inherit;
    background-color: #f8f9fa;
    border-color: var(--bg-kergus);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.suggested-article-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    line-height: 1.3;
}

.suggested-article-excerpt {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.suggested-article-date {
    font-size: 0.8rem;
    color: var(--bg-kergus);
    font-weight: 500;
}

/* BOUTON RETOUR */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bg-kergus);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 2px solid var(--bg-kergus);
    transition: all 0.3s ease;
}

.back-button:hover {
    color: white;
    background-color: var(--bg-kergus);
    transform: translateX(-5px);
}

/* PAGE LISTE DES ARTICLES */
.articles-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.articles-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.articles-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.articles-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f3f4;
}


.article-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-kergus) 0%, var(--bg-kergus-light) 100%);
}

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

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

.article-card-date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--bg-kergus);
}

.article-card-body {
    padding: 1.5rem;
}

.article-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.article-card-category {
    background: var(--bg-kergus-secondary-light);
    color: var(--bg-kergus);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more-btn {
    color: var(--bg-kergus);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    color: var(--bg-kergus-light);
    transform: translateX(5px);
}

.article-attachments {
    color: #6c757d;
    font-size: 0.85rem;
}

/* PAGINATION */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination-container {
    width: 100%;
}

.pagination-info {
    margin-bottom: 1rem;
}

.pagination-info p {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Styles personnalisés pour la pagination Bootstrap */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    color: var(--bg-kergus);
    background-color: #fff;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination .page-link:hover {
    color: #fff;
    background-color: var(--bg-kergus);
    border-color: var(--bg-kergus);
    transform: translateY(-2px);
}

.pagination .page-link:focus {
    color: var(--bg-kergus);
    background-color: #f8f9fa;
    border-color: var(--bg-kergus);
}

.pagination .page-item.active .page-link {
    color: #fff;
    background-color: var(--bg-kergus);
    border-color: var(--bg-kergus);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.pagination .page-item.disabled .page-link:hover {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transform: none;
    box-shadow: none;
}

/* Style pour les boutons Précédent/Suivant */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.pagination .page-item:first-child .page-link i,
.pagination .page-item:last-child .page-link i {
    font-size: 0.85rem;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .article-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .article-sidebar {
        position: static;
        order: 1;
    }

    .sidebar-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {

    .article-container,
    .articles-container {
        padding: 1rem;
    }

    .article-title,
    .articles-title {
        font-size: 2rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .article-content {
        padding: 1.5rem;
    }

    .sidebar-card {
        padding: 1rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .article-card-body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {

    .article-title,
    .articles-title {
        font-size: 1.8rem;
    }

    .article-content {
        padding: 1rem;
        font-size: 1rem;
    }

    .article-meta {
        font-size: 0.9rem;
    }
}