/* --- DESIGN SYSTEM --- */
:root {
    --bg: #F9F7F2;
    --text: #1A1A1A;
    --text-muted: #666;
    --accent: #D67066;
    --accent-dark: #B5564D;
    --white: #FFFFFF;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.05);
    --card-shadow-hover: 0 20px 40px rgba(0,0,0,0.1);
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    margin: 0;
    line-height: 1.6;
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section { padding: 40px 0; }
.section-soft { background-color: #F0EDE6; }

/* --- TYPOGRAPHIE --- */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; margin: 0; }
h1 { font-size: clamp(2.5rem, 8vw, 4rem); line-height: 1.1; }
h2 { font-size: 2.5rem; }
.text-accent { color: var(--accent); }
.muted { color: var(--text-muted); font-size: 0.95rem; }

/* --- HEADER / NAV --- */
header {
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
header nav {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 16px 0;
}
.logo {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    margin-right: auto;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-search {
    display: flex;
    align-items: center;
    background: #F0EDE6;
    border-radius: 50px;
    padding: 6px 8px 6px 16px;
    gap: 6px;
}
.nav-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    width: 160px;
    color: var(--text);
}
.nav-search button {
    border: none;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.nav-search button:hover { background: var(--accent-dark); }

/* --- BOUTONS --- */
.btn-buy, .btn-search, .btn {
    display: inline-block;
    background-color: var(--accent);
    color: var(--white) !important;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.btn-buy:hover, .btn-search:hover, .btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 112, 102, 0.3);
}
.btn-search { padding: 10px 25px; border-radius: 10px; }

/* --- HERO SECTION --- */
.hero {
    padding: 80px 0 40px;
    text-align: center;
    background: radial-gradient(circle at top, #FDFCFB 0%, #F9F7F2 100%);
}
.hero-title { margin-bottom: 16px; }
.hero-lead { font-size: 1.15rem; max-width: 700px; margin: 0 auto 24px; color: var(--text-muted); }

.badge-premium {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(214, 112, 102, 0.1);
    color: var(--accent);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

/* --- RECHERCHE HERO --- */
.search-container {
    max-width: 600px;
    margin: 0 auto;
}
.search-form {
    display: flex;
    background: var(--white);
    padding: 6px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}
.search-form input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

/* --- BENTO GRID --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.bento-item {
    background: transparent;
    padding: 40px;
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.05);
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}
.bento-item:hover {
    border-color: var(--accent);
    background: var(--white);
    transform: translateY(-5px);
}
.bento-item h3 { font-size: 1.5rem; margin-bottom: 10px; }

/* --- BOOK CARDS --- */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}
.book-card-premium, .book-card {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 10px;
    transition: 0.3s;
}
.book-card-premium:hover {
    border-color: var(--accent);
    background: rgba(255,255,255,0.5);
}
.book-cover-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 2/3;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    margin-bottom: 15px;
}
.book-cover-wrapper img { width: 100%; height: 100%; object-fit: contain; background: #f7f6f2; transition: 0.5s; }
.book-card-premium:hover img { transform: scale(1.05); }

.book-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
    color: white;
    font-weight: 600;
}
.book-card-premium:hover .book-overlay { opacity: 1; }

.book-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 700;
}
.book-title { font-size: 1.2rem; margin: 5px 0; }
.book-author { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 4px; }

/* --- STAR RATINGS --- */
.book-rating { display: flex; align-items: center; gap: 4px; margin: 2px 0 8px; font-size: 0.82rem; }
.stars { color: #e6a817; letter-spacing: 0.5px; line-height: 1; }
.star-half { opacity: 0.55; }
.star-empty { color: #d0cfc8; }
.rating-score { font-weight: 600; color: var(--text); font-size: 0.82rem; }
.rating-count { color: var(--text-muted); font-size: 0.78rem; }

.book-header .book-rating { font-size: 1rem; margin: 8px 0 16px; gap: 6px; }
.book-header .stars { font-size: 1.2rem; }
.book-header .rating-score { font-size: 1rem; }
.book-header .rating-count { font-size: 0.9rem; }

/* --- AUTHOR PROFILE --- */
.tag {
    display: inline-block;
    background: #f5f3ee;
    color: #666;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.85rem;
    margin: 4px;
}
.btn-outline-sm {
    display: inline-block;
    padding: 8px 18px;
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}
.btn-outline-sm:hover {
    background: var(--accent);
    color: white;
}

.author-about-sections {
    max-width: 800px;
    margin: 60px auto 0;
    padding-bottom: 60px;
}
.author-about-block {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.author-about-block:last-child { border-bottom: none; }
.author-about-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 14px; color: #222; }
.author-about-block p { line-height: 1.8; color: #444; }

.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}
.author-card {
    display: flex;
    align-items: center;
    background: transparent;
    padding: 20px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.05);
    transition: 0.3s;
}
.author-card:hover { border-color: var(--accent); background: var(--white); }
.author-avatar {
    width: 50px; height: 50px;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

/* --- BOOK DETAIL PAGE --- */
.breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 30px;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--accent); text-decoration: none; }

.book-detail-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 60px;
    margin-top: 20px;
}
.book-sidebar { position: sticky; top: 20px; height: fit-content; }
.book-main-cover {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}
.book-main-cover img { width: 100%; display: block; }
.book-placeholder { aspect-ratio: 2/3; background: #ddd; display: flex; align-items: center; justify-content: center; }

.purchase-box {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    text-align: center;
}
.price-label { font-weight: 600; margin-bottom: 15px; }

/* AJOUT : Fiche technique sidebar */
.book-tech-specs {
    margin-top: 20px;
    padding: 20px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
}
.book-tech-specs h3 { font-size: 1.1rem; margin-bottom: 12px; }
.book-tech-specs ul { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.book-tech-specs li { margin-bottom: 8px; color: var(--text-muted); }
.book-tech-specs li strong { color: var(--text); }

.book-main-title { font-size: 3rem; margin-bottom: 10px; }

/* AJOUT : Sous-titre */
.book-subtitle {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.3;
}

.book-author-name { font-size: 1.5rem; color: var(--text-muted); margin-bottom: 20px; }
.book-author-name a { color: var(--accent); text-decoration: none; }

/* Ajustement pour le bloc auteur simple */
.book-author { 
    font-size: 1.2rem; 
    margin-bottom: 10px; 
    display: block;
}
.book-author a { color: var(--accent); text-decoration: none; font-weight: 600; }

.book-meta { display: flex; gap: 20px; margin-bottom: 40px; font-size: 0.9rem; border-bottom: 1px solid #ddd; padding-bottom: 20px; }

/* AJOUT : Section "Pour qui" */
.book-for-who {
    margin-bottom: 40px;
    padding: 25px;
    background: #F0EDE6;
    border-radius: 15px;
    border-left: 6px solid var(--accent);
}
.book-for-who h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}
.target-audience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.audience-tag {
    background: var(--white);
    color: var(--text);
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.book-description h2, .book-highlights h2, .detail-block h3 {
    font-family: var(--font-serif);
    margin: 40px 0 20px;
}
.lead { font-size: 1.2rem; line-height: 1.8; color: #333; }

.book-highlights ul { list-style: none; padding: 0; }
.book-highlights li {
    padding: 10px 0 10px 30px;
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.book-highlights li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.book-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}
.detail-block ul { padding-left: 20px; }
.detail-block li { margin-bottom: 8px; }

.book-info-box {
    background: #EAE7DF;
    padding: 30px;
    border-radius: 12px;
    margin-top: 50px;
}

/* --- BLOG SECTION --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
/* --- BLOG CARDS PREMIUM --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    position: relative; /* INDISPENSABLE pour que le lien étiré fonctionne */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.8rem;
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    cursor: pointer; /* Indique à l'utilisateur que c'est cliquable */
}

.blog-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--accent);
}

/* Le lien étiré : La magie est ici */
.main-link::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1; /* Couvre toute la carte */
}

.blog-card img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
    border-radius: 16px; 
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2; /* L'image reste au dessus pour ne pas bloquer le clic si besoin */
}

.blog-card-title {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    line-height: 1.1;
    position: relative;
    z-index: 2; /* Le titre doit rester au dessus de la couche invisible */
}

.blog-card-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card:hover .blog-card-title a {
    color: var(--accent);
}

.blog-card .date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

.blog-card .summary {
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 2;
}
.blog-card:hover { transform: translateY(-5px); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; border-radius: 4px; }
.article-single { max-width: 800px; margin: 0 auto; line-height: 1.8; }
.article-header h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.article-content { font-size: 1.1rem; color: #333; }

/* Blog Tags spécifiques pour éviter le conflit avec les tags auteurs */
.blog-tag { 
    background: #f0f0f0; 
    padding: 4px 8px; 
    border-radius: 4px; 
    margin-right: 5px; 
    font-size: 0.9rem; 
    display: inline-block;
}

/* Bannière dynamique de l'article */
.featured-banner {
    background-color: #FF7F50;
    width: 100%;
    min-height: 300px;
    max-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 2rem;
    padding: 2rem;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.banner-text {
    color: white;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    max-width: 80%;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* --- ANIMATIONS --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- MOBILE & TABLET ADAPTATION --- */
@media (max-width: 900px) {
    .book-detail-container { grid-template-columns: 1fr; }
    .book-sidebar { position: static; }
    .book-main-title { font-size: 2rem; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .bento-grid { grid-template-columns: 1fr; }
    .section { padding: 24px 0; }
    .featured-banner { min-height: 200px; }
    .banner-text { font-size: 1.8rem; }
}