/* ================================================ */
/* STYLES POUR LA PAGE DES E-BOOKS (VERSION FINALE) */
/* ================================================ */

/* --- En-tête de la page --- */
.page-header-section {
    padding: 100px 0;
    text-align: center;
    color: white;
    position: relative;
    background-size: cover;
    background-position: center;
}
.page-header-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(13, 33, 73, 0.7);
    z-index: 1;
}
.page-header-section .container {
    position: relative;
    z-index: 2;
}
.page-header-section .page-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin: 0;
}
.page-header-section .page-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 16px auto 0 auto;
    opacity: 0.9;
}

/* --- Compteurs --- */
.ebooks-summary {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-m);
    font-size: 1.1rem;
}
#total-count, #filtered-count {
    font-weight: 600;
    color: var(--color-primary-dark);
}

/* --- Contrôles (Filtres et Recherche) --- */
.ebooks-controls {
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* --- Style des bulles de catégories --- */
.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: var(--spacing-l);
}
.category-filters button {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid #dee2e6; /* Bordure par défaut */
}
.category-filters button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.category-filters button.active {
    transform: translateY(0);
    box-shadow: none;
}

#ebook-search-input {
    width: 100%;
    padding: 14px 22px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    outline: none;
    transition: var(--transition);
    text-align: center;
}
#ebook-search-input:focus {
    border-color: var(--color-primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 90, 158, 0.15);
}

/* --- Grille et Cartes E-book --- */
.ebooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}
.ebook-card {
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    text-decoration: none;
    background-color: white;
}
.ebook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.ebook-card__cover {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.ebook-card__cover svg {
    width: 50px;
    height: 50px;
    opacity: 0.9;
}
.ebook-card__content {
    padding: var(--spacing-l);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.ebook-card__title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-primary-dark);
    margin: 0 0 var(--spacing-m) 0;
    line-height: 1.4;
    flex-grow: 1;
}
.ebook-card__download-btn {
    display: inline-block;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease-in-out;
    margin-top: auto;
}
.ebook-card__download-btn:hover {
    opacity: 0.85;
}