:root {
    --bg-dark: #0b0c10;
    --bg-card: #12141d;
    --accent-purple: #7928ca;
    --accent-cyan: #00f2fe;
    --accent-pink: #ff0080;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --glow-purple: 0 0 15px rgba(121, 40, 202, 0.4);
    --radius-sm: 8px;
    --radius-lg: 24px;
    --font-heading: 'Orbitron', sans-serif;
    --font-sub: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
    --sidebar-width: 240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- HEADER & NAVBAR SUPERIEURE --- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 12, 16, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-menu-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--accent-cyan);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.toggle-menu-btn:hover {
    background: rgba(0, 242, 254, 0.15);
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  display: inline-block;
  margin-right: 8px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    white-space: nowrap;
}

.logo-text span {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.account-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sub);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.account-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.cart-btn {
    background: linear-gradient(135deg, rgba(121,40,202,0.2), rgba(0,242,254,0.2));
    border: 1px solid rgba(0,242,254,0.3);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sub);
    font-weight: 700;
}

.cart-badge {
    background: var(--accent-pink);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
}

/* --- MENU MOBILE LATÉRAL (GAUCHE) --- */
.mobile-overlay {
    position: fixed; inset: 0;
    background: rgba(5, 6, 10, 0.75);
    backdrop-filter: blur(6px);
    z-index: 150; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay.open { opacity: 1; pointer-events: auto; }

.mobile-drawer {
    position: fixed; top: 0; left: -280px;
    width: 280px; height: 100%;
    background: #0f111a;
    border-right: 1px solid var(--border-color);
    z-index: 151; display: flex; flex-direction: column;
    padding: 1.5rem 1rem; gap: 1.5rem;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.open { left: 0; }

.mobile-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 1rem; border-bottom: 1px solid var(--border-color);
}

.nav-link-btn {
    display: flex; align-items: center; gap: 12px;
    background: transparent; border: none; color: var(--text-muted);
    padding: 0.8rem 1rem; border-radius: var(--radius-sm);
    cursor: pointer; font-family: var(--font-sub); font-weight: 600;
    font-size: 1rem; text-decoration: none; transition: all 0.2s ease;
    width: 100%; text-align: left;
}

.nav-link-btn:hover, .nav-link-btn.active {
    color: #fff; background: rgba(0, 242, 254, 0.12);
}

.nav-link-btn svg { width: 20px; height: 20px; stroke: currentColor; flex-shrink: 0; }

/* --- LAYOUT GLOBAL & SIDEBAR PC --- */
.app-layout { display: flex; width: 100%; flex: 1; }

.sidebar-menu {
    width: var(--sidebar-width);
    background: rgba(18, 20, 29, 0.95);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    padding: 1.2rem 0.8rem; gap: 1rem;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: sticky; top: 61px; height: calc(100vh - 61px);
    z-index: 90; flex-shrink: 0;
}

.sidebar-menu.collapsed { --sidebar-width: 70px; }

.sidebar-links { display: flex; flex-direction: column; gap: 0.5rem; }

.sidebar-text { transition: opacity 0.2s ease; opacity: 1; }
.sidebar-menu.collapsed .sidebar-text { opacity: 0; pointer-events: none; }

.main-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* --- CARROUSEL AVEC VIGNETTES DROITE ET GAUCHE --- */
.hero { padding: 1.5rem 1.5rem 0.5rem 1.5rem; }

.carousel-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-card {
    position: relative;
    width: 100%;
    height: 460px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
    cursor: grab;
}

.main-card:active {
    cursor: grabbing;
}

.main-card img.bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease-in-out;
    pointer-events: none;
}

.main-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(11, 12, 16, 0.9) 0%, rgba(11, 12, 16, 0.3) 60%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
}

.slide-info {
    position: absolute;
    bottom: 25px;
    left: 30px;
    max-width: 500px;
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-tag {
    align-self: flex-start;
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-sub);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 3px 8px;
    border-radius: 4px;
}

.slide-info h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    font-weight: 900;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.slide-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

/* VIGNETTES DE PRÉVISUALISATION GAUCHE & DROITE */
.preview-card {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 130px;
    height: 110px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease, border-color 0.3s ease;
    z-index: 3;
}

.preview-card:hover {
    transform: translateY(-50%) scale(1.05);
    border-color: var(--accent-cyan);
}

.preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.prev-preview-card { left: 25px; }
.next-preview-card { right: 25px; }

.buttons-overlay {
    position: absolute;
    bottom: 25px;
    right: 25px;
    display: flex;
    gap: 10px;
    z-index: 4;
}

.carousel-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(18, 20, 29, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.carousel-btn:hover {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #0d1117;
    transform: scale(1.08);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.bar {
    width: 24px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.bar.active {
    background-color: var(--accent-cyan);
    width: 42px;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

/* --- CATALOGUE & PANIER --- */
.main-container { padding: 1.5rem 1.5rem 2rem; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.2rem;
}

.cart-overlay {
    position: fixed; inset: 0; background: rgba(5, 6, 10, 0.75);
    backdrop-filter: blur(6px); z-index: 200; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
    position: fixed; top: 0; right: -400px; width: 380px; max-width: 85vw;
    height: 100%; background: #0f111a; border-left: 1px solid rgba(0, 242, 254, 0.2);
    z-index: 201; display: flex; flex-direction: column;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer.open { right: 0; }

.cart-header {
    padding: 1.2rem 1.5rem; background: rgba(18, 20, 29, 0.95);
    border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}

.cart-body {
    flex: 1; overflow-y: auto; padding: 1.5rem;
    display: flex; flex-direction: column; justify-content: center;
}

.empty-cart-view {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: 1rem; color: var(--text-muted);
}

.empty-cart-icon {
    width: 64px; height: 64px; background: rgba(0, 242, 254, 0.05);
    border: 1px dashed var(--accent-cyan); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--accent-cyan);
}

.cart-footer {
    padding: 1.2rem 1.5rem; border-top: 1px solid var(--border-color);
    background: rgba(12, 14, 22, 0.95); display: flex; flex-direction: column; gap: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #fff;
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: var(--glow-purple);
}

footer {
    background: #06070a; border-top: 1px solid var(--border-color);
    padding: 1.5rem; margin-top: auto; text-align: center;
}

.footer-text { color: var(--text-muted); font-size: 0.85rem; }

/* RESPONSIVE MOBILE */
@media (max-width: 900px) {
    .sidebar-menu { display: none; }
    .cart-btn .cart-text { display: none; }
    .cart-btn, .account-btn { padding: 0.6rem; }
    .account-btn span { display: none; }

    .hero { padding: 1rem; }
    .main-card {
        height: 320px;
        border-radius: 16px;
    }

    .prev-preview-card { display: none; } /* Masqué sur mobile pour garder l'interface claire */

    .preview-card {
        width: 95px;
        height: 85px;
        right: 12px;
    }

    .slide-info {
        bottom: 15px;
        left: 15px;
        max-width: 65%;
    }

    .slide-info h2 { font-size: 1.1rem; }
    .slide-info p { font-size: 0.75rem; }

    .buttons-overlay {
        bottom: 15px;
        right: 12px;
    }

    .carousel-btn {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
    .main-container { padding: 1rem; }
    .header-container { padding: 0.7rem 1rem; }
}