/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* rating CSS from http://lea.verou.me/2011/08/accessible-star-rating-widget-with-pure-css/ */
.rating {
    float: left;
}

/* :not(:checked) is a filter, so that browsers that don’t support :checked don’t
   follow these rules. Every browser that supports :checked also supports :not(), so
   it doesn’t make the test unnecessarily selective */
.rating:not(:checked) > input {
    position: absolute;
    top: -9999px;
    clip: rect(0, 0, 0, 0);
}

.rating:not(:checked) > label {
    float: right;
    width: 1em;
    padding: 0 .1em;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    font-size: 200%;
    line-height: 1.2;
    color: #ccc;
}

.rating:not(:checked) > label:before {
    content: '★ ';
}

.rating > input:checked ~ label {
    color: #f70;
}

.rating:not(:checked) > label:hover,
.rating:not(:checked) > label:hover ~ label {
    color: gold;
}

.rating > input:checked + label:hover,
.rating > input:checked + label:hover ~ label,
.rating > input:checked ~ label:hover,
.rating > input:checked ~ label:hover ~ label,
.rating > label:hover ~ input:checked ~ label {
    color: #ea0;
}

.star {
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    font-size: 2rem;
    color: #ccc;
    text-align: center;
}

.star:before {
    content: "\2605";
}

.full-star {
    color: gold;
}

.rating > label:active {
    position: relative;
    top: 2px;
    left: 2px;
}

.clear {
    clear: both;
}

article .entry-header.entry-header {
    border-bottom: 1px solid #CCC;
    margin-bottom: 1em;
    padding-bottom: 1em;
}

.details-header a {
    text-decoration: none;
}

.product-details h2 {
    font-size: 1.8em;
    margin-bottom: 0;
}

.product-details h3 {
    margin-left: 1em;
    margin-bottom: 1em;
}

.details-header .stars {
    margin-right: 1em;
    display: inline-block;
}

.product-details #reviews {
    padding: 1em;
    background-color: #EEE;
}

.product-details #reviews hr {
    margin: 1em 0;
}

#primary.content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 40px;
}

.post-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

/* Book container */
.book-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 90%;
}

.book-card-container {
    background-color: #f7f7f7;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Roboto', sans-serif;
}

/* Book header */
.book-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 1rem;
}

/* Button style */
.book-toggle {
    background-color: transparent;
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Button hover style */
.book-toggle:hover {
    background-color: #999;
}

/* Button active style*/
.book-toggle:active {
    background-color: transparent;
}

/* Button focus style*/
.book-toggle:focus {
    background-color: transparent;
}

/* Arrow icon style */
.toggle-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: solid #333;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: all 0.2s ease;
}

/* Arrow icon animation for toggling */
.toggle-icon--hidden {
    transform: rotate(-135deg) !important;
}

.book-cards--hidden {
    display: none !important;
}

/* Book header title */
.book-header__title {
    font-size: 1.5rem;
    color: #333;
    font-weight: bold;
    margin: 0;
}

/* Book header link */
.book-header__link {
    font-size: 1rem;
    text-decoration: none;
    color: #666;
    transition: all 0.2s ease;
}

/* Book header link hover */
.book-header__link:hover {
    color: #333;
}

.book-cards {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
}

/* Hide scrollbar but keep functionality */
.book-cards::-webkit-scrollbar {
    height: 6px;
}

.book-cards::-webkit-scrollbar-track {
    background: transparent;
}

.book-cards::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.book-cards::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Book card */
.book-card {
    display: flex;
    flex-direction: column;
    flex: 0 0 220px;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.1);
    scroll-snap-align: start;
    min-height: 320px;
}

/* Book card a */
.book-card a:hover {
    text-decoration: none;
}

/* Book card hover */
.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.2);
}

/* Book card thumbnail */
.book-card__thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    min-height: 160px;
    overflow: hidden;
    background-color: #f3f4f6;
}

/* Book card thumbnail image */
.book-card__thumbnail img {
    width: 100%;
    object-fit: cover;
    transition: all 0.2s ease;
}

/* Book card thumbnail hover */
.book-card:hover .book-card__thumbnail img {
    transform: scale(1.05);
}

/* Book card info */
.book-card__info {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    flex: 1;
}

/* Book card title */
.book-card__title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    margin-top: 0.25rem;
    color: #333;
    text-decoration: none;
}


/* Book card author */
.book-card__author {
    margin-bottom: 0.25rem;
    margin-top: 0.25rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #ccc;
    font-size: 0.8rem;
    color: #666;
    text-decoration: none;
}

/* Book card description */
.book-card__description {
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
    color: #666;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    flex: 1;
}

/* Book card availability */
.book-card__availability {
    font-size: 0.6rem;
    background-color: green;
    color: #fff;
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    margin-top: auto;
}

/* Book card availability (out of stock) */
.book-card__availability.out-of-stock {
    background-color: red;
}

/* Single book card principal container */
.principal-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
    width: 100%;
}

/* Single book container */
.single-book-container {
    display: flex;
    flex-direction: column;
    background-color: #f7f7f7;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    justify-content: center;
    padding: 2rem;
}

/* Single book header */
.single-book-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #ccc;
}

/* Single book title */
.single-book-card__title {
    font-size: 1.4rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    margin-top: 1rem;
    color: #333;
    text-shadow: 2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff;
}

/* Single book card */
.single-book-card {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
}

/* Single book card thumbnail */
.single-book-card__thumbnail {
    flex: 0 0 20rem;
    height: 100%;
    overflow: hidden;
    border-radius: 5px;
    margin-right: 5rem;
}

.single-book-card__thumbnail img {
    max-height: 100%;
    width: 100%;
}

/* Single book card info */
.single-book-card__info {
    flex: 1;
    padding: 5rem 0;
}

/* Single book card author */
.single-book-card__author {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

/* Single book card genre */
/* Single book card year */
/* Single book card publisher */
.single-book-card__genre,
.single-book-card__year,
.single-book-card__publisher {
    font-size: 1rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
}


/* Single book card loan status */
.single-book-card__loan-status {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-start;
    flex-direction: row;
    align-items: center;
}

/* Single book card loan status success */
.status-success {
    padding: 1rem 3rem;
    color: #fff;
    border-radius: 40px;
    border: 1px solid #94aa2a;
    background-color: #94aa2a;
    font-size: 1rem;
}

.status-danger {
    padding: 1rem 3rem;
    color: #fff;
    background-color: #f0134d;
    border-radius: 40px;
    border: 1px solid #f0134d;
    font-size: 1rem;
}

.status-info {
    padding: 1rem 3rem;
    color: #fff;
    border-radius: 40px;
    border: 1px solid #64c4ed;
    background-color: #64c4ed;
    font-size: 1rem;
}


/* Single book card description */
.single-book-card__description {
    margin-top: 2rem;
    font-size: 1rem;
    line-height: 1.5;
    padding-bottom: 2rem;
    padding-top: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #ccc;
}

/* Similar books section */
.scwp-similar-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ccc;
}
.scwp-similar-section .book-header {
    border-bottom: 2px solid #dc2626;
}

/* Single book card description */
.single-book-card__buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Single book card back */
.single-book-card__back {
    font-size: 1.4rem;
    color: #494ca2;
    text-decoration: none;
}

/* Single book card back:hover */
.single-book-card__back:hover {
    color: #6063b8;
    text-decoration: none;
}

/* Single book card rent form */
.single-book-card__rent-form{
    height:100%;
    margin-left: 2rem;
}

/* Single book card rent */
.single-book-card__rent {
    display: block;
    padding: 1rem 3rem;
    font-size: 1.4rem;
    font-weight: 400;
    color: #fff;
    border: 1px solid #494ca2;
    border-radius: 40px;
    cursor: pointer;
    height: 100%;
    background-color: #494ca2;
}

/* Single book card reserve button */
.single-book-card__rent.scwp-reserve-btn {
    background-color: #2563eb;
    border: 1px solid #2563eb;
    color: #fff;
}

.single-book-card__rent.scwp-reserve-btn:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* Single book card reserve badge (inactive) */
.single-book-card__rent.scwp-reserve-badge {
    background-color: #93c5fd;
    border: 1px solid #93c5fd;
    color: #1e3a5f;
    cursor: default;
    display: inline-block;
    text-align: center;
}

/* Single book card rent blocked */
.single-book-card__rent.blocked {
    cursor: not-allowed;
    background-color: #bbb;
    border: 1px solid #bbb;
    color: #fff;
}

/* Single book card rent blocked */
.single-book-card__rent.blocked:hover {
    cursor: not-allowed;
    background-color: #bbb;
    border: 1px solid #bbb;
    color: #fff;
}

/* Single book card rent:hover */
.single-book-card__rent:hover {
    background-color: #6063b8;
}

/* Comment book card container */
.comment-container {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    background-color: #f7f7f7;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 2rem;
}

/* Comment book card title */
.comment-container__title {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ccc;
}

/* Comment book card form */
.comment-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 2rem;
}


/* Comment book card form group */
.form-group {
    width: 100%;
}

/* Comment book card form group label */
.form-group label {
    display: block;
    font-size: 1rem;
}

/* Comment book card form group textarea */
.form-group textarea{
    width: 50%;
    padding: 0.5rem;
    font-size: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Comment book card form group textarea:focus-visible */
.form-group textarea:focus-visible{
    border: 1px solid #8c8f94;
}

/* Comment book card buttons */
.comment__buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

/* Comment book card submit button */
.submit-btn {
    display: block;
    padding: 1rem 3rem;
    font-size: 1.4rem;
    font-weight: 400;
    background-color: #494ca2;
    color: #fff;
    border: none;
    border-radius: 40px;
    cursor: pointer;
}

/* Comment book card submit button hover */
.submit-btn:hover {
    background-color: #6063b8;
}

/* Comment book card submit button hover */
.comments {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-top: 1rem;
}

/* Comment book card item */
.comment {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ccc;
}

.comment__info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.comment__author {
    font-weight: 700;
    margin-right: 1rem;
    font-size: 1rem;
}

.comment__date {
    font-size: 1rem;
    color: #777;
}

.comment__text {
    font-size: 1rem;
    line-height: 1.5;
    margin-top: 1rem;
}

/* product list */
.scwp-item-list ul,
.scwp-item-list li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.scwp-item-list {
    padding: 10px 0;
}

.scwp-item-list .cat-item > a::before {
    color: #aaa;
    content: '[+] ';
}

.scwp-item-list .cat-item > a.active::before {
    content: '[-] ';
}

.scwp-item-list .cat-item .cat-item {
    margin-left: 75px;
}

.scwp-item-list .cat-item ul {
    padding-top: 10px;
    display: none;
}

.scwp-item-list li {
    margin-bottom: 25px;
}

.scwp-item-list li .thumbnail {
    display: inline-block;
    text-align: center;
    width: 75px;
    height: 75px;
    overflow: hidden;
    margin-right: 25px;
    vertical-align: middle;
    line-height: 75px;
}

.scwp-item-list li span {
    display: inline-block;
    vertical-align: middle;
}

.scwp-item-list li a {
    font-size: 120%;
    font-weight: bold;
    text-decoration: none;
    outline: none;
}

/* =============================================
   CAROUSEL
   ============================================= */

.scwp-carousel-section {
    margin-bottom: 2rem;
}

.scwp-carousel {
    position: relative;
    border-radius: 10px;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background-color: #000;
}

.scwp-carousel__track {
    position: relative;
    width: 100%;
}

.scwp-carousel__slide {
    display: none;
    position: relative;
    width: 100%;
}

.scwp-carousel__slide--active {
    display: block;
}

.scwp-carousel__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.scwp-carousel__image {
    display: block;
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.scwp-carousel__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 2.5rem 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: #fff;
}

.scwp-carousel__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.scwp-carousel__desc {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.scwp-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s ease;
    line-height: 1;
}

.scwp-carousel__arrow:hover {
    background: rgba(0, 0, 0, 0.6);
}

.scwp-carousel__arrow--prev {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.scwp-carousel__arrow--next {
    right: 0;
    border-radius: 4px 0 0 4px;
}

.scwp-carousel__dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.scwp-carousel__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
}

.scwp-carousel__dot--active {
    background: #fff;
}

/* =============================================
   FEATURED SECTIONS (Nouveautés, Populaires)
   ============================================= */

.scwp-featured-section .book-header {
    border-bottom: 2px solid #dc2626;
}

/* =============================================
   SEARCH SECTION
   ============================================= */

.scwp-search-section .book-header {
    border-bottom: 2px solid #dc2626;
}

.scwp-search-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.85rem center;
    box-sizing: border-box;
}

.scwp-search-input:focus {
    border-color: #dc2626;
}

.scwp-search-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.5rem;
}

.scwp-filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-family: inherit;
    border: 1.5px solid #ccc;
    border-radius: 20px;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.scwp-filter-btn:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.scwp-filter-btn--active {
    background-color: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.scwp-filter-btn--active:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.scwp-search-results {
    display: none;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.scwp-search-results--visible {
    display: flex;
}

.scwp-search-results .book-card {
    flex: 0 0 220px;
    scroll-snap-align: unset;
}

.scwp-search-empty {
    display: none;
    text-align: center;
    color: #999;
    font-size: 1rem;
    padding: 2rem 0;
    margin: 0;
}

.scwp-search-empty--visible {
    display: block;
}

.scwp-search-hint {
    text-align: center;
    color: #999;
    font-size: 0.95rem;
    padding: 1.5rem 0;
    margin: 0;
}

/* Loader / Spinner */
.scwp-loader {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.scwp-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: scwp-spin 0.7s linear infinite;
}

@keyframes scwp-spin {
    to { transform: rotate(360deg); }
}

/* "Voir plus" button */
.scwp-load-more {
    display: block;
    margin: 1.5rem auto 0;
    padding: 0.6rem 2rem;
    background: #fff;
    border: 2px solid #dc2626;
    color: #dc2626;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.scwp-load-more:hover {
    background: #dc2626;
    color: #fff;
}

/* =============================================
   RESPONSIVE / MOBILE STYLES
   ============================================= */

/* Tablet and smaller (max-width: 768px) */
@media screen and (max-width: 768px) {

    #primary.content-area {
        padding: 20px 15px;
    }

    /* Carousel */
    .scwp-carousel__image {
        height: 250px;
    }

    .scwp-carousel__caption {
        padding: 1.5rem 1.5rem 1rem;
    }

    .scwp-carousel__title {
        font-size: 1.2rem;
    }

    .scwp-carousel__desc {
        font-size: 0.9rem;
    }

    /* Archive page */
    .book-container {
        width: 100%;
    }

    .book-card-container {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .book-header {
        margin-bottom: 1rem;
    }

    .book-cards {
        gap: 1rem;
    }

    .book-card {
        flex: 0 0 180px;
    }

    /* Search section — horizontal scroll on tablet */
    .scwp-search-results--visible {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.5rem;
    }

    .scwp-search-results .book-card {
        flex: 0 0 180px;
        scroll-snap-align: start;
    }

    .scwp-search-results {
        gap: 1rem;
    }

    /* Single book page */
    .single-book-container {
        padding: 1rem;
    }

    .single-book-card {
        flex-direction: column;
    }

    .single-book-card__thumbnail {
        flex: none;
        width: 100%;
        max-width: 300px;
        margin-right: 0;
        margin-bottom: 1.5rem;
    }

    .single-book-card__info {
        padding: 1rem 0;
    }

    .single-book-card__title {
        font-size: 1.2rem;
    }

    .single-book-card__author {
        font-size: 1.1rem;
    }

    .single-book-card__description {
        margin-top: 1rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .single-book-card__buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .single-book-card__back {
        font-size: 1.1rem;
        text-align: center;
    }

    .single-book-card__rent-form {
        margin-left: 0;
    }

    .single-book-card__rent {
        width: 100%;
        text-align: center;
        padding: 0.8rem 2rem;
        font-size: 1.1rem;
    }

    /* Status badges - touch friendly */
    .status-success,
    .status-danger,
    .status-info {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Comments */
    .comment-container {
        margin-top: 1.5rem;
        padding: 1rem;
    }

    .comment-container__title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .form-group textarea {
        width: 100%;
    }

    .comment__buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .submit-btn {
        width: 100%;
        text-align: center;
        padding: 0.8rem 2rem;
        font-size: 1.1rem;
    }

    /* Rating stars - larger touch targets */
    .rating:not(:checked) > label {
        font-size: 250%;
        padding: 0 0.15em;
    }
}

/* =============================================
   MES EMPRUNTS PANEL
   ============================================= */

.scwp-panel {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Roboto', sans-serif;
}

.scwp-panel__login {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1rem;
}

.scwp-panel__login a {
    color: #dc2626;
    font-weight: 600;
    text-decoration: none;
}

.scwp-panel__login a:hover {
    text-decoration: underline;
}

.scwp-panel__tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.scwp-panel__tab {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    font-family: inherit;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
    margin-bottom: -2px;
}

.scwp-panel__tab:hover {
    color: #333;
}

.scwp-panel__tab.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
    font-weight: 600;
}

.scwp-panel__content {
    display: none;
    padding: 1rem 0;
}

.scwp-panel__content.active {
    display: block;
}

.scwp-panel__item {
    display: flex;
    flex-direction: row;
    gap: 16px;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
}

.scwp-panel__item:last-child {
    border-bottom: none;
}

.scwp-panel__thumb {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.scwp-panel__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.scwp-panel__title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.scwp-panel__title:hover {
    color: #dc2626;
    text-decoration: none;
}

.scwp-panel__author {
    font-size: 0.85rem;
    color: #888;
}

.scwp-panel__date {
    font-size: 0.85rem;
    color: #666;
}

.scwp-panel__badge {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    align-self: flex-start;
    margin-top: 4px;
}

.scwp-panel__badge--green {
    background-color: #dcfce7;
    color: #166534;
}

.scwp-panel__badge--orange {
    background-color: #fff7ed;
    color: #9a3412;
}

.scwp-panel__badge--red {
    background-color: #fef2f2;
    color: #991b1b;
}

.scwp-panel__badge--blue {
    background-color: #eff6ff;
    color: #1e40af;
}

.scwp-panel__empty {
    text-align: center;
    color: #999;
    padding: 2rem 0;
    font-size: 0.95rem;
}

.scwp-panel__stars {
    display: flex;
    gap: 2px;
    margin-top: 4px;
}

.scwp-panel__stars .star {
    width: auto;
    height: auto;
    font-size: 1.2rem;
}

.scwp-panel__review-text {
    font-size: 0.85rem;
    color: #555;
    margin: 4px 0 0;
    font-style: italic;
}

.scwp-panel__review {
    margin-top: 8px;
}

.scwp-panel__review .rating {
    margin-bottom: 4px;
}

.scwp-panel__review .rating:not(:checked) > label {
    font-size: 150%;
}

.scwp-panel__review textarea {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem;
    font-size: 0.85rem;
    font-family: inherit;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    box-sizing: border-box;
}

.scwp-panel__review textarea:focus {
    border-color: #dc2626;
    outline: none;
}

.scwp-panel__review-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 0.5rem 1.5rem;
    background-color: #dc2626;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.scwp-panel__review-btn:hover {
    background-color: #b91c1c;
}

/* Mobile phones (max-width: 480px) */
@media screen and (max-width: 480px) {

    /* Carousel */
    .scwp-carousel__image {
        height: 180px;
    }

    .scwp-carousel__caption {
        padding: 1rem;
    }

    .scwp-carousel__title {
        font-size: 1rem;
    }

    .scwp-carousel__desc {
        font-size: 0.8rem;
    }

    .scwp-carousel__arrow {
        font-size: 1.2rem;
        padding: 0.5rem 0.75rem;
    }

    .scwp-carousel__dot {
        width: 10px;
        height: 10px;
    }

    /* Archive page */
    .post-container {
        padding: 0;
    }

    .book-card-container {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border-radius: 8px;
    }

    .book-header__title {
        font-size: 1.2rem;
    }

    .book-cards {
        gap: 0.75rem;
        scroll-padding-left: 0.75rem;
    }

    .book-card {
        flex: 0 0 160px;
    }

    .book-card__thumbnail {
        height: 120px;
    }

    /* Disable hover transform on touch */
    .book-card:hover {
        transform: none;
    }

    /* Search section — horizontal scroll on mobile */
    .scwp-search-results--visible {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.5rem;
    }

    .scwp-search-results .book-card {
        flex: 0 0 160px;
        scroll-snap-align: start;
    }

    .scwp-search-results {
        gap: 0.75rem;
    }

    .scwp-search-input {
        font-size: 0.9rem;
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    }

    .scwp-filter-btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }

    /* Single book page */
    .single-book-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .single-book-card__thumbnail {
        max-width: 100%;
    }

    .single-book-card__title {
        font-size: 1.1rem;
    }

    .single-book-card__author {
        font-size: 1rem;
    }

    .single-book-card__genre,
    .single-book-card__year,
    .single-book-card__publisher {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
    }

    .single-book-card__loan-status {
        margin-top: 1rem;
    }

    .single-book-card__rent {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    /* Comments */
    .comment__info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .comment__author {
        margin-right: 0;
    }

    .submit-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    /* Panel responsive */
    .scwp-panel__tab {
        padding: 0.6rem 0.9rem;
        font-size: 0.8rem;
    }

    .scwp-panel__item {
        flex-direction: column;
        gap: 10px;
    }

    .scwp-panel__thumb {
        width: 50px;
        height: 65px;
    }

    .scwp-panel__review textarea {
        max-width: 100%;
    }
}