/* =========================================================
   ROOT
========================================================= */

:root {
    --primary: #00AEEF;
    --accent: #F37021;
    --dark: #1F2933;
    --light: #F4F7FA;
    --text: #374151;
    --muted: #6B7280;
    --border: #E5E7EB;
}

/* =========================================================
   BASE
========================================================= */

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #ffffff; /* fond neutre */
    color: var(--text);
    font-weight: 400;
}

h1, h2, h3 {
    margin: 0;
    font-weight: 500;
    color: var(--dark);
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================================
   HEADER
========================================================= */

.topbar {
    background: var(--primary);
    padding: 14px 30px;
}

.topbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.logo span {
    color: var(--accent);
}

.search-form {
    display: flex;
}

.search-form input {
    padding: 9px 12px;
    width: 260px;
    border: none;
    border-radius: 6px 0 0 6px;
    outline: none;
}

.search-form button {
    padding: 9px 14px;
    border: none;
    background: var(--accent);
    color: white;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-weight: 500;
}

.search-form button:hover {
    opacity: 0.9;
}

/* =========================================================
   LAYOUT
========================================================= */

.layout {
    display: flex;
    align-items: flex-start;
    background: var(--light); /* fond unique ici */
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 250px;
    padding: 25px 20px;
    background: transparent; /* important */
}

.content {
    flex: 1;
    padding: 40px;
    background: transparent; /* important */
}

/* =========================================================
   SIDEBAR
========================================================= */

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 18px;
}

.category-list,
.subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 6px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-link {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: 0.2s;
}

.category-link:hover {
    background: var(--light);
    color: var(--accent);
}

.category-link.active {
    background: var(--primary);
    color: white;
}

.subcategory-list {
    padding-left: 14px;
    border-left: 2px solid #F3F4F6;
    margin-top: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.subcategory-list.open {
    max-height: 1000px;
}

.subcategory-list .category-link {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}

.toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: #9CA3AF;
}

.count {
    font-size: 11px;
    color: var(--dark);
    margin-left: 4px;
}

/* =========================================================
   PRODUCT GRID
========================================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 28px;
    align-items: stretch;
}

/* CARD */

.product-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    transition: 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-image {
    padding: 20px;
    text-align: center;
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

/* INFO */

.product-info {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* TITRE FIXE SUR 2 LIGNES */

.product-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* MARQUE */

.brand {
    font-size: 12px;
    color: var(--primary);
    margin: 6px 0 12px;
    font-weight: 500;
}

/* PRIX */

.price-block {
    margin-top: auto;
}

.current-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
}

.price-label {
    font-size: 11px;
    color: #9CA3AF;
}

/* BOUTON */

.btn-product {
    margin-top: 14px;
    padding: 9px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: 0.2s;
}

.btn-product:hover {
    opacity: 0.9;
}

/* =========================================================
   PRODUCT PAGE
========================================================= */

.product-page {
    max-width: 1100px;
    margin: 0 auto;
}

.product-header {
    margin-bottom: 30px;
}

.product-header h1 {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 6px;
}

.brand-link {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}

.brand-link:hover {
    text-decoration: underline;
}

/* IMAGE */

.product-image-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 35px;
}

.product-image-box {
    background: white;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.product-image-box img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
}

/* OFFERS */

.offers-section h2 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
}

.offer-line {
    display: grid;
    grid-template-columns: 1fr 120px 140px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.offer-line:last-child {
    border-bottom: none;
}

.offer-site {
    font-weight: 500;
}

.offer-price {
    text-align: right;
    font-weight: 600;
    color: var(--accent);
}

.offer-action {
    text-align: right;
}

.btn-offer {
    background: var(--primary);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
    transition: 0.2s;
}

.btn-offer:hover {
    opacity: 0.9;
}

.best-offer {
    background: #F0F9FF;
    border-radius: 8px;
    padding-left: 10px;
}

/* =========================================================
   PAGINATION
========================================================= */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
}

.pagination .page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    background: #ffffff;
    color: var(--dark);
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.pagination .page:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.pagination .active {
    background: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(0, 174, 239, 0.3);
}

.pagination .disabled {
    opacity: 0.35;
    pointer-events: none;
    box-shadow: none;
}
/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border);
    padding: 20px 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    font-size: 13px;
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    transition: 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}