/* Styles pour la page blog */

/* Bannière */
.page-banner {
    position: relative;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 1.5rem;
}

.page-banner .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7));
}

.page-banner-inner {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    z-index: 1;
    padding: 0 1rem;
}

.page-banner h1 {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

/* Grille d'articles */
.card {
    border: none;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

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

.card-img-container {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* Ratio 3:2 */
    overflow: hidden;
    background-color: #f8f9fa;
}

.card-img-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.card-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #007bff;
}

.card-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.post-meta {
    margin-top: auto;
    font-size: 0.9rem;
    color: #888;
}

/* Badges et étiquettes */
.badge-primary {
    background-color: #007bff;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.badge-primary:hover {
    background-color: #0056b3;
    color: #fff;
    text-decoration: none;
}

.badge-pill {
    min-width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    padding: 0 8px;
}

/* Sidebar */
.sidebar-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.sidebar-card .card-title {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

/* Formulaire de recherche */
.search-form .input-group {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-form .form-control {
    border: 1px solid #e9ecef;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
}

.search-form .form-control:focus {
    box-shadow: none;
    border-color: #007bff;
}

.search-form .btn-primary {
    padding: 0.75rem 1.5rem;
    border: none;
    background-color: #007bff;
    transition: background-color 0.3s ease;
}

.search-form .btn-primary:hover {
    background-color: #0056b3;
}

/* Liste des catégories */
.category-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-list li {
    margin-bottom: 0.75rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-list a:hover {
    color: #007bff;
}

/* Articles récents */
.recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.recent-posts li:last-child {
    border-bottom: none;
}

.recent-posts a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.recent-posts a:hover {
    color: #007bff;
}

.recent-posts .text-muted {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Pagination */
.pagination {
    margin-top: 3rem;
}

.pagination .page-link {
    border: none;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    color: #2c3e50;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #007bff;
    color: #fff;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    color: #fff;
}

/* Message "Aucun article" */
.alert-info {
    background-color: #e3f2fd;
    border: none;
    color: #0c5460;
    border-radius: 12px;
    padding: 1rem 1.5rem;
}

/* Responsive */
@media (max-width: 992px) {
    .page-banner {
        height: 140px;
    }

    .page-banner h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .page-banner {
        height: 120px;
    }

    .page-banner h1 {
        font-size: 1.5rem;
    }

    .card-img-container {
        padding-top: 75%; /* Ratio 4:3 pour les écrans plus petits */
    }
}

@media (max-width: 576px) {
    .page-banner {
        height: 100px;
    }

    .page-banner h1 {
        font-size: 1.25rem;
    }
    
    .card-img-container {
        padding-top: 56.25%; /* Ratio 16:9 pour les très petits écrans */
    }
} 