/* Tous les prix en noir dans toutes les sections */

p.price {
    color: #111 !important;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.book-card p {
    font-family: Arial, sans-serif;
}

.book-card p:has(> em),
.book-card em>p {
    /* Pour compatibilité, mais la vraie cible est ci-dessous */
}

.book-card p:contains('Prix:') {
    color: #111;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

p {
    color: black;
    font-weight: bold;
}


/* Sélecteur compatible pour la plupart des navigateurs : cibler le <em> qui contient Prix */

.book-card em p {
    color: #111;
    font-family: Arial, sans-serif;
    font-weight: bold;
}


/* --- NAVBAR RESPONSIVE --- */

.navbar {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 36px;
    height: 36px;
    cursor: pointer;
    margin-left: 16px;
    z-index: 1001;
}

.nav-toggle span {
    height: 4px;
    width: 100%;
    background: #7c5cff;
    margin: 5px 0;
    border-radius: 2px;
    transition: 0.3s;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c5cff 0%, #5b9dff 100%);
    transition: background 0.2s, color 0.2s;
}

.nav-links li a:hover {
    background: linear-gradient(90deg, #17BEBB 0%, #79ffd5 100%);
    color: #022027;
}

@media (max-width: 800px) {
    .nav-links {
        position: absolute;
        top: 60px;
        right: 0;
        background: #0b1220;
        flex-direction: column;
        width: 200px;
        align-items: flex-start;
        gap: 0;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
        border-radius: 0 0 12px 12px;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease;
    }
    .nav-links.open {
        max-height: 400px;
        padding-bottom: 10px;
    }
    .nav-links li {
        width: 100%;
    }
    .nav-links li a {
        display: block;
        width: 100%;
        border-radius: 0;
        background: none;
        padding: 14px 24px;
        border-bottom: 1px solid #222c3c;
    }
    .nav-toggle {
        display: flex;
    }
}


/* Hamburger animation */

.nav-toggle.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

body {
    font-family: Arial, sans-serif;
    background-color: #0b1220;
    color: #f5f5f5;
    margin: 0;
    padding: 0;
}

h3 {
    display: inline-block;
    color: #17BEBB;
    background: linear-gradient(135deg, rgba(23, 190, 187, 0.12), rgba(23, 190, 187, 0.06));
    padding: 8px 18px;
    border-radius: 24px;
    margin: 12px 0 24px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
    transform: translateY(-8px);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s;
}

h3:hover {
    transform: translateY(-12px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}


/* Books grid: consistent card heights and responsive columns */

.books {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    max-width: 100vw;
    margin: 18px auto;
    padding: 12px;
    align-items: stretch;
    align-content: start;
    grid-auto-rows: 1fr;
    box-sizing: border-box;
}

.book {
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.08);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.book:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.12);
}

.book img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.book .book-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    flex: 1 1 auto;
    /* allows book-info to stretch so button sits at bottom */
}


/* Consolidated layout and responsive rules (clean & professional grid) */

.books {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    justify-items: stretch;
    margin: 20px auto;
    max-width: 1200px;
    padding: 12px;
}

.book img {
    width: 100%;
    aspect-ratio: 3/4;
    max-width: 140px;
    max-height: 200px;
    min-height: 90px;
    min-width: 60px;
    margin: 18px auto 0 auto;
    display: block;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(23, 190, 187, 0.13), 0 1.5px 6px rgba(0, 0, 0, 0.10);
    background: linear-gradient(135deg, #e3f6f5 0%, #f7fafc 100%);
    transition: transform 0.18s, box-shadow 0.18s;
}

@media (max-width: 900px) {
    .books {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 14px;
        padding: 8px;
    }
    .book img {
        max-width: 110px;
        max-height: 150px;
        min-width: 50px;
        min-height: 70px;
    }
}

@media (max-width: 600px) {
    .books {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
        padding: 4px;
    }
    .book img {
        max-width: 90px;
        max-height: 110px;
        min-width: 40px;
        min-height: 50px;
    }
}

.book-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    flex: 1 1 auto;
}

.book-card {
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.08);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.book button:hover {
    background-color: #FF3B1F;
}

p.price {
    color: black;
    font-family: Arial, sans-serif;
    font-weight: bold;
}


/* Global book layout: compact cards */

.book {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 12px;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.18s ease;
    height: 100%;
    /* fill grid row height to avoid empty gaps */
    box-sizing: border-box;
}

.book img {
    width: 100%;
    aspect-ratio: 3/4;
    max-width: 120px;
    max-height: 170px;
    min-height: 120px;
    min-width: 80px;
    margin: 18px auto 0 auto;
    display: block;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(23, 190, 187, 0.13), 0 1.5px 6px rgba(0, 0, 0, 0.10);
    background: linear-gradient(135deg, #e3f6f5 0%, #f7fafc 100%);
    transition: transform 0.18s, box-shadow 0.18s;
}

.book:hover img {
    transform: scale(1.06) rotate(-2deg);
    box-shadow: 0 10px 32px rgba(23, 190, 187, 0.22), 0 4px 18px rgba(0, 0, 0, 0.18);
}

.book h5 {
    margin: 10px 0;
    color: #004E89;
}


/* Small, muted descriptions (override generic p color above) */

.book .desc {
    margin-top: 0.5rem;
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.3;
}

button {
    background-color: #FF6B35;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #FF3B1F;
}

input[type="search"] {
    width: 70%;
    min-width: 320px;
    max-width: 800px;
    padding: 12px 18px;
    border: 2px solid #004E89;
    border-radius: 25px;
    outline: none;
    margin: 30px auto 10px auto;
    display: block;
    font-size: 18px;
    background: #f8fafd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="search"]:focus {
    border-color: #FF6B35;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}


/* Responsive rules */

@media (max-width: 900px) {
    .book {
        width: 45%;
    }
}

@media (max-width: 768px) {
    .books {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .books {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .book {
        width: 95%;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .books {
        grid-template-columns: 1fr;
    }
}