/* /assets/css/catalogue.css */

/* --- SECTION HERO COMMUNE AUX CATALOGUES --- */
.catalogue-hero {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}
.catalogue-hero .page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.catalogue-hero .page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 1.5rem;
}

/* --- CONTENEUR PRINCIPAL (FILTRES + GRILLE) --- */
.catalogue-main {
    padding: 2rem 0 4rem 0;
    background-color: #f4f7f9;
}

/* --- Filtres --- */
.filters-container {
    margin-top: -6rem;
    position: relative;
    z-index: 10;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.search-container { max-width: 500px; margin: 0 auto; width: 100%; }
.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.search-input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2); }

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}
.category-filters button {
    padding: 0.6rem 1.2rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}
.category-filters button:hover { background: #f0f3f9; }
.category-filters button.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* NOUVELLE RÈGLE POUR ALIGNER LE TRI */
.sort-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}
.sort-container label {
    color: #555;
    font-weight: 500;
}
.sort-container select {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-weight: 500;
}

/* --- GRILLES (COMMUNES AUX JEUX, BLOG, RESSOURCES) --- */
.games-grid, .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* --- STRUCTURE DE CARTE COMMUNE --- */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.card-base {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* Important pour que l'image ne dépasse pas */
}
.card-link:hover .card-base {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}
.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}
.card-link:hover .card-title {
    color: #667eea;
}
.card-excerpt, .game-card-description {
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    color: #555;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}
.game-card-description { -webkit-line-clamp: 2; }

/* --- STYLES SPÉCIFIQUES AUX EN-TÊTES DE CARTES --- */
.card-header-image {
    width: 100%;
    height: 200px;
    background-color: #f4f7f9;
    overflow: hidden;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.card-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease; /* Transition douce */
}
/* Au survol de la carte, l'image zoome légèrement */
.card-link:hover .card-header-image img {
    transform: scale(1.1);
}
.card-header-icon {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7f9;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.card-header-icon img {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}
.card-header-icon .icon-placeholder {
    font-size: 4rem;
}

/* --- ÉTIQUETTES (BÊTA, CATÉGORIES) --- */
.card-header {
    min-height: 24px;
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.beta-tag {
    display: inline-block;
    background-color: #ffc107;
    color: #333;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.card-category-tag {
    display: inline-block;
    background-color: #eef2f7;
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

/* --- FOOTER DE CARTE SPÉCIFIQUE AUX JEUX --- */
.game-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #777;
}
.game-card-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}
.game-card-rating .star-icon { color: #f9ca24; font-size: 1.1rem; }

/* --- NOUVEAU LAYOUT BLOG (MAGAZINE) --- */

.blog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 992px) {
    .blog-layout {
        grid-template-columns: 2fr 1fr; /* 2/3 contenu, 1/3 sidebar */
    }
}

/* Style des cartes Horizontales (Liste principale) */
.posts-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-card-horizontal {
    display: flex;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-direction: column; /* Mobile d'abord */
}

@media (min-width: 600px) {
    .blog-card-horizontal {
        flex-direction: row;
        height: 220px;
    }
    .blog-card-img {
        width: 35%;
        height: 100%;
    }
    .blog-card-content {
        width: 65%;
    }
}

.blog-card-horizontal:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.blog-card-horizontal:hover .blog-card-img img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.blog-card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    color: #2c3e50;
}

.blog-card-content p {
    font-size: 0.95rem;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Max 2 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.read-more {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- SIDEBAR --- */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.sidebar-widget h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 0.5rem;
    color: #333;
}

/* Recherche Sidebar */
.search-widget-blog {
    position: relative;
    padding: 0;
    box-shadow: none;
    background: transparent;
}
.search-widget-blog input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.5rem;
    border-radius: 50px;
    border: 1px solid #ddd;
    font-size: 1rem;
}
.search-widget-blog .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

/* Liste Catégories */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    transition: color 0.2s;
    font-weight: 500;
    color: #555;
}
.category-list li:last-child { border-bottom: none; }
.category-list li:hover { color: #667eea; transform: translateX(5px); }
.category-list li.active { color: #667eea; font-weight: 700; }

/* Articles Populaires (Miniature) */
.popular-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.popular-post-item {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    align-items: center;
}
.popular-post-item:hover h5 { color: #667eea; }
.pp-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}
.pp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pp-info h5 {
    margin: 0 0 0.2rem 0;
    font-size: 0.95rem;
    line-height: 1.3;
    color: #333;
}
.pp-info small {
    color: #888;
    font-size: 0.8rem;
}