/* Extrait automatiquement de livres.php */
* { box-sizing: border-box; }

        body {
            margin: 0;
            font-family: Arial, sans-serif;
            background: #f5f1ea;
            color: #2b2b2b;
        }

        .search-zone {
            background: #3e2f23;
            padding: 12px 16px;
        }

        .search-bar {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: auto auto 1fr auto auto auto;
            gap: 12px;
            align-items: center;
        }

        .search-form {
            display: block;
            width: 100%;
        }

        .search-box {
            width: 100%;
            background: #fff;
            border-radius: 30px;
            padding: 6px 8px 6px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            color: #777;
            font-size: 15px;
            min-height: 48px;
            gap: 10px;
        }

        .search-box input {
            border: none;
            outline: none;
            width: 100%;
            font-size: 15px;
            background: transparent;
            color: #333;
        }

        .search-box button {
            border: none;
            background: #3e2f23;
            color: #fff;
            border-radius: 22px;
            padding: 10px 14px;
            cursor: pointer;
            font-weight: bold;
        }

        .top-action,
        .top-select {
            background: #fff;
            color: #3e2f23;
            border: none;
            border-radius: 30px;
            min-height: 48px;
            padding: 0 16px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            min-width: 120px;
        }

        .top-select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: linear-gradient(45deg, transparent 50%, #3e2f23 50%), linear-gradient(135deg, #3e2f23 50%, transparent 50%);
            background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
            background-size: 6px 6px, 6px 6px;
            background-repeat: no-repeat;
            padding-right: 32px;
        }

        .top-menu-button {
            background: rgba(0, 0, 0, 0.55);
            color: #fff;
            border: none;
            border-radius: 8px;
            padding: 10px 12px;
            font-size: 22px;
            cursor: pointer;
            min-height: 48px;
            min-width: 48px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .topbar {
            background: #3e2f23;
            color: #fff;
            padding: 16px 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .page-title {
            margin: 0;
            font-family: 'Oswald', sans-serif;
            font-size: 30px;
        }

        .sidebar {
            position: fixed;
            top: 0;
            left: -290px;
            width: 290px;
            height: 100%;
            background: #3e2f23;
            color: white;
            z-index: 9999;
            padding: 20px;
            transition: left 0.3s ease;
            overflow-y: auto;
        }

        .sidebar.open {
            left: 0;
        }

        .sidebar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
        }

        .sidebar-title {
            font-family: 'Oswald', sans-serif;
            font-size: 24px;
        }

        .close-btn {
            background: none;
            border: none;
            color: white;
            font-size: 28px;
            cursor: pointer;
        }

        .sidebar a {
            display: block;
            color: white;
            text-decoration: none;
            padding: 14px 0;
            border-bottom: 1px solid rgba(255,255,255,0.15);
            font-weight: bold;
        }

        .sidebar-group-title {
            margin-top: 18px;
            margin-bottom: 8px;
            font-size: 13px;
            text-transform: uppercase;
            opacity: 0.75;
            letter-spacing: 1px;
        }

        .overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.35);
            z-index: 9998;
            display: none;
        }

        .overlay.show {
            display: block;
        }

        .intro {
            max-width: 1100px;
            margin: 0 auto;
            padding: 28px 20px 10px 20px;
        }

        .intro h2 {
            margin: 0 0 10px 0;
            font-family: 'Montserrat', sans-serif;
            font-size: 34px;
            font-weight: 800;
        }

        .intro p {
            margin: 0;
            font-size: 17px;
            line-height: 1.7;
            color: #4b4037;
        }

        .products-section {
            max-width: 1100px;
            margin: 0 auto;
            padding: 25px 20px 40px 20px;
        }

        .products-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 18px;
        }

        .product-card {
            background: #fff;
            border-radius: 18px;
            overflow: hidden;
            box-shadow: 0 5px 14px rgba(0,0,0,0.08);
        }

        .product-card img {
            width: 100%;
            height: 260px;
            object-fit: cover;
            display: block;
        }

        .product-info {
            padding: 14px;
        }

        .product-info h3 {
            margin: 0 0 8px 0;
            font-size: 18px;
        }

        .product-info p {
            margin: 0 0 12px 0;
            font-size: 14px;
            line-height: 1.5;
            color: #666;
        }

        .price {
            font-weight: bold;
            font-size: 18px;
            color: #3e2f23;
            margin-bottom: 12px;
        }

        .buy-btn {
            display: inline-block;
            background: #3e2f23;
            color: #fff;
            text-decoration: none;
            padding: 11px 16px;
            border-radius: 24px;
            font-size: 14px;
            font-weight: bold;
        }

        .stock-out {
            display: inline-block;
            background: #b3261e;
            color: #fff;
            padding: 11px 16px;
            border-radius: 24px;
            font-size: 14px;
            font-weight: bold;
        }

        .empty-products {
            background: #fff;
            border-radius: 18px;
            padding: 24px;
            box-shadow: 0 5px 14px rgba(0,0,0,0.08);
            text-align: center;
            font-size: 16px;
            color: #4b4037;
        }

        footer {
            background: #3e2f23;
            color: #fff;
            text-align: center;
            padding: 18px;
        }

        @media (max-width: 1000px) {
            .search-bar {
                grid-template-columns: 1fr 1fr;
            }

            .products-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 640px) {
            .search-bar {
                grid-template-columns: 1fr;
            }

            .products-grid {
                grid-template-columns: 1fr;
            }

            .page-title {
                font-size: 24px;
            }

            .intro h2 {
                font-size: 28px;
            }
        }