/* Styles spécifiques pour le blog */

/* Page liste des articles */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
}

.card-blog {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-blog:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.blog-image-container {
    overflow: hidden;
    height: 200px;
}

.blog-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-blog:hover .blog-image-container img {
    transform: scale(1.05);
}

.blog-meta {
    font-size: 0.9rem;
    color: #6c757d;
}

.blog-meta .separator {
    margin: 0 8px;
}

/* Page article individuel */
.article-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #212529;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #495057;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #212529;
}

.article-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid #007bff;
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e83e8c;
}

.article-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

/* Partage social */
.social-share {
    border-top: 2px solid #e9ecef;
    padding-top: 2rem;
    margin-top: 3rem;
}

.social-share .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Sidebar */
.blog-sidebar .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.blog-sidebar .card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
}

.recent-article {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.recent-article:last-child {
    border-bottom: none;
}

.recent-article-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.recent-article-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.recent-article-title a {
    color: #212529;
    text-decoration: none;
}

.recent-article-title a:hover {
    color: #007bff;
}

.recent-article-date {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Fil d'Ariane */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .blog-meta .separator {
        display: none;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 2px;
        align-items: stretch;
    }
    
    .btn-group .btn {
        width: 100%;
        text-align: center;
    }
}

/* Réduction de la taille des images d'illustration des articles du blog pour mobile */
@media (max-width: 770px) {
  .card-blog .card-image img,
  .card-blog .img.border-radius-lg {
    max-width: 120px;
    max-height: 120px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
  }
  .card-blog .card-image {
    text-align: center;
    padding: 0;
  }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-article-enter {
    animation: fadeInUp 0.6s ease-out;
}

/* Admin styles */
.admin-stats .card {
    border-left: 4px solid transparent;
}

.admin-stats .card:nth-child(1) {
    border-left-color: #007bff;
}

.admin-stats .card:nth-child(2) {
    border-left-color: #28a745;
}

.admin-stats .card:nth-child(3) {
    border-left-color: #ffc107;
}

.admin-stats .card:nth-child(4) {
    border-left-color: #17a2b8;
}

.admin-stats h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Status badges */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* TinyMCE customization */
.tox-tinymce {
    border-radius: 8px !important;
    border-color: #ced4da !important;
}

.tox-toolbar {
    background-color: #f8f9fa !important;
}

/* Form enhancements */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Admin table improvements */
.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.btn-group .btn {
    border-radius: 4px;
    margin-right: 2px;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* Améliorer l'affichage des boutons d'action */
.btn-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
}

.btn-group .btn {
    margin: 0;
    white-space: nowrap;
}

/* Icônes Font Awesome */
.fas {
    font-size: 14px;
}

/* DataTables responsive */
.table-responsive {
    border-radius: 8px;
}

/* Pagination native */
.pagination .page-link {
    color: #007bff;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Filtres et recherche */
.table-filters {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Tri des colonnes */
thead th[style*="cursor: pointer"]:hover {
    background-color: #e9ecef;
}

.fas.fa-sort,
.fas.fa-sort-up,
.fas.fa-sort-down {
    margin-left: 5px;
    font-size: 12px;
}

/* Responsive pour les filtres */
@media (max-width: 768px) {
    .mb-3.d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .mb-3.d-flex > div {
        width: 100% !important;
    }
    
    .mb-3.d-flex input,
    .mb-3.d-flex select {
        width: 100% !important;
    }
}
