
.book-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.book-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}
.book-year {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.read-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.2s;
}
.read-button:hover {
    background-color: #2980b9;
}

:root {
    --primary: #2c3e50;
    --accent: #3498db;
    --bg: #f4f7f6;
    --card: #ffffff;
}

body { 
    font-family: system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--primary);
    margin: 0;
    padding: 40px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}
h1 { text-align: center; margin-bottom: 40px; font-size: 2.5rem; letter-spacing: -1px; }

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 30px; 
}

/* Style des cartes avec image */
.card { 
    background-color: var(--card); 
    border-radius: 12px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden;
    text-decoration: none; /* Le lien englobe toute la carte */
    color: inherit;
}
.card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 12px 20px rgba(0,0,0,0.15); 
}

/* Gestion de l'image de couverture */
.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 150%; /* Ratio 2:3 classique pour les livres */
    background-color: #e0e6ed;
    overflow: hidden;
}
.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-placeholder {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    font-weight: bold;
    color: #bdc3c7;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

/* Contenu sous l'image */
.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.serie-title { 
    font-size: 1.2rem; 
    font-weight: 700; 
    margin: 0 0 5px 0; 
    line-height: 1.3;
}
.serie-meta { 
    color: var(--accent); 
    font-size: 0.9rem; 
    font-weight: 600; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.error-message { background-color: #ffeaa7; color: #d63031; padding: 15px; border-radius: 8px; text-align: center; }