@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --primary: #ff7733;
    --primary-light: #ffefe6;
    --primary-dark: #e66019;
    --secondary: #2d3436;
    --accent: #00cec9;
    --bg-light: #fdfdfd;
    --bg-alt: #f1f3f5;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --max-width: 1200px;
}

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

.mobile-only {
    display: none !important;
}

.desktop-only {
    display: block;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: var(--bg-light);
    line-height: 1.6;
}

h1,
h2,
h3,
.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

a {
    transition: all 0.3s ease;
}

.conteneurHeader {
    position: sticky;
    top: 0;
    z-index: 1100;
    transition: transform 0.3s ease;
}

/* Masqué au défilement vers le bas (voir script dans layouts/base.html) */
.conteneurHeader.header-hidden {
    transform: translateY(-100%);
}

.limite {
    max-width: var(--max-width);
    width: 90%;
    margin: 0 auto;
}

/* TOP BAR */
.top-bar {
    background: var(--primary-light);
    color: var(--primary);
    padding: 3px 0px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--primary-light);
}

.top-bar .limite {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar .social-icons {
    display: flex;
    gap: 15px;
}

.top-bar .social-icons a {
    color: var(--primary);
    opacity: 0.8;
    text-decoration: none;
    font-size: 1rem;
}

.top-bar .social-icons a:hover {
    color: var(--primary-dark);
    opacity: 1;
}

.top-bar .auth-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-bar .auth-links a {
    color: var(--primary);
    text-decoration: none;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar .auth-links a:hover {
    color: var(--primary-dark);
    opacity: 1;
}

/* Mobile Menu Sections */
.mobile-menu-section {
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
}

.mobile-menu-section:last-child {
    border-bottom: none;
}

.mobile-menu-section h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.mobile-menu-section a {
    display: block;
    padding: 10px 0;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.mobile-menu-section a.logout-link {
    color: #e55353;
}

/* HEADER */
.header {
    padding: 10px 0px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.header .limite {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.logo span {
    color: var(--primary);

}

.search {
    flex: 0 1 550px;
    display: flex;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 30px;
    overflow: hidden;
    transition: all 0.3s;
}

.search:focus-within {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.search .category-select,
.search .search-type-select {
    padding: 10px 15px;
    border: none;
    background: transparent;
    border-right: 1px solid #eee;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
    cursor: pointer;
    min-width: 100px;
    transition: all 0.2s;
}

.search .search-type-select {
    color: var(--primary);
    background: var(--primary-light);
    border-right: 1px solid rgba(255, 119, 51, 0.1);
}

.search .category-select:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.search input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
}

.search-btn {
    padding: 0 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.1rem;
}

.search-btn:hover {
    color: var(--primary);
}

/* SEARCH DROPDOWN (Live Search) */
.search-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1050;
    overflow: hidden;
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

.search-dropdown.hidden {
    display: none;
}

.search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    max-height: 350px;
    flex: 1 1 auto;
    min-height: 0;
}

/* Le lien "Voir tous..." reste visible sous la liste scrollable */
.search-dropdown .search-result-all {
    flex: 0 0 auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: var(--text-main);
}

.search-result-item:hover {
    background-color: var(--primary-light);
}

.search-result-image {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.search-result-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

.search-result-all {
    padding: 12px 20px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    background-color: #fcfcfc;
    border-top: 1px solid #f1f1f1;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-all:hover {
    background-color: var(--primary-light);
}

.search-result-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.95rem;
}


.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.nav a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    color: var(--secondary) !important;
}

.cart-icon:hover {
    color: var(--primary) !important;
}

.cart-count {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    top: -5px;
    right: 2px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(255, 119, 51, 0.3);
}

/* CAROUSEL */
.carousel-container {
    position: relative;
    max-width: var(--max-width);
    margin: 2rem auto;
    height: 450px;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.carousel-slide {
    display: none;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    animation: fadeEffect 0.8s ease-out;
}

@keyframes fadeEffect {
    from {
        opacity: 0.4;
    }

    to {
        opacity: 1;
    }
}

.carousel-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
    color: var(--white);
}

.carousel-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    max-width: 500px;
}

.carousel-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 450px;
    opacity: 0.9;
}

.carousel-btn {
    align-self: flex-start;
    padding: 15px 35px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 119, 51, 0.4);
}

.carousel-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.carousel-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.dot.active {
    background: var(--primary);
    width: 30px;
    border-radius: 10px;
}

/* PRODUCTS GRID */
.products {
    max-width: var(--max-width);
    margin: 4rem auto;
    padding: 0 20px;
}

.products h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
    position: relative;
    padding-bottom: 10px;
}

.products h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 15px;
    transition: all 0.3s ease;
    border: 1px solid #f1f1f1;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--secondary);
}

.price {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 15px;
}

.btn-secondary {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    background: var(--bg-alt);
    color: var(--secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-top: auto;
}

.product-card:hover .btn-secondary {
    background: var(--primary);
    color: white;
}

/* FOOTER */
.footer {
    background: var(--secondary);
    color: var(--white);
    padding: 4rem 5% 2rem;
    margin-top: 5rem;
    text-align: center;
}

.footer p {
    opacity: 0.6;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .header .limite {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
        align-items: center;
    }

    .top-bar .limite {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
        text-align: left;
        padding: 5px 0;
        align-items: center;
    }

    .search-container {
        width: 100%;
        margin: 0 !important;
        padding: 0 10px;
    }

    .search {
        width: 100%;
        flex-wrap: wrap;
        border-radius: 20px;
        background: #f1f3f5;
    }

    .search .search-type-select,
    .search .category-select {
        flex: 1 1 50%;
        border-bottom: 1px solid #e0e0e0;
        border-right: none;
        height: 45px;
        font-size: 0.8rem;
    }

    .search .category-select {
        border-left: 1px solid #e0e0e0;
    }

    .search input {
        flex: 1;
        height: 45px;
        padding: 0 15px;
        font-size: 0.9rem;
    }

    .search-btn {
        width: 50px;
        height: 45px;
    }

    .nav {
        justify-content: center;
        gap: 15px;
    }

    .logo {
        margin-top: 0;
    }

    .logo img {
        max-width: 150px;
    }

    /* Mobile Only / Desktop Only overrides */
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    /* Top Bar Mobile Menu */
    .mobile-menu-toggle {
        background: transparent;
        border: 1.5px solid var(--primary);
        color: var(--primary);
        padding: 5px 15px;
        border-radius: 20px;
        font-weight: 700;
        font-size: 0.85rem;
        cursor: pointer;
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .top-menu-mobile-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column !important;
        padding: 10px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        display: none !important;
        z-index: 1000;
        border-bottom: 2px solid var(--primary);
    }

    .top-menu-mobile-dropdown.open {
        display: flex !important;
    }

    .top-menu-mobile-dropdown a {
        padding: 12px 20px !important;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .top-menu-mobile-dropdown .user-profile-wrapper {
        padding: 10px 0px;
    }

    /* Mobile Search Toggle */
    .search-toggle-btn {
        background: transparent;
        border: none;
        color: var(--secondary);
        font-size: 1.2rem;
        cursor: pointer;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        transition: background 0.3s;
    }

    .mobile-hidden-search {
        display: none !important;
        width: 100%;
        order: 3;
        background: #f8fafc;
        padding: 15px !important;
        margin: 0 !important;
        border-top: 1px solid #eee;
        animation: slideDownIn 0.3s ease-out;
    }

    @keyframes slideDownIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .mobile-hidden-search.open {
        display: block !important;
    }

    /* Adjust nav for mobile icons */
    .nav {
        display: flex;
        align-items: center;
        gap: 5px;
        order: 2;
        height: 40px;
    }

    .cart-wrapper {
        display: flex;
        align-items: center;
        height: 40px;
    }

    .cart-icon {
        height: 40px;
        display: flex !important;
        align-items: center;
        padding: 0 10px;
    }

    .header .limite {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 0 !important;
    }

    .logo {
        flex: 0 0 auto;
        order: 1;
    }

    .carousel-container {
        height: 350px;
    }

    .carousel-content h2 {
        font-size: 2rem;
    }
}

/* AUTH FORMS */
.auth-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: radial-gradient(ellipse at top right, var(--primary-light) 0%, transparent 60%),
        radial-gradient(ellipse at bottom left, #e8edf2 0%, transparent 60%),
        var(--bg-alt);
}

.auth-container {
    background: var(--white);
    padding: 3rem 3.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(255, 119, 51, 0.08);
    width: 100%;
    max-width: 480px;
    text-align: center;
    border: 1px solid rgba(255, 119, 51, 0.12);
    animation: authFadeIn 0.4s ease-out;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container h2 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 0.4rem;
}

.auth-container>p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-main);
    letter-spacing: 0.01em;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e0e4ea;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    outline: none;
    font-family: 'Inter', sans-serif;
    background: #fafafa;
    color: var(--text-main);
}

.form-group input::placeholder {
    color: #b0b7c0;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    background: var(--white);
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(255, 119, 51, 0.3);
    letter-spacing: 0.02em;
    text-decoration: none;
    text-align: center;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 119, 51, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(255, 119, 51, 0.3);
}

.btn-resell {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-resell:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 119, 51, 0.3);
}

.btn-resell2 {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-resell2:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 119, 51, 0.3);
}

.auth-footer {
    margin-top: 1.8rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.alert-danger {
    background: #fff5f5;
    color: #c92a2a;
    border: 1px solid #ffa8a8;
}

.alert-success {
    background: #f0fff4;
    color: #2f9e44;
    border: 1px solid #8ce99a;
}

/* Notifications — bloc fixe au-dessus du flux */
.site-flash-stack {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10050;
    width: min(520px, calc(100vw - 24px));
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.site-flash {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-main);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.06);
    opacity: 0;
    transform: translateY(-10px);
    animation: siteFlashIn 0.28s ease forwards;
}

.site-flash.show {
    opacity: 1;
}

.site-flash.hiding {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

@keyframes siteFlashIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-flash > i {
    flex-shrink: 0;
    font-size: 1.15rem;
}

.site-flash > div {
    flex: 1;
}

.site-flash-success {
    background: #f0fff4;
    color: #166534;
    border-color: #bbf7d0;
}

.site-flash-success > i {
    color: #16a34a;
}

.site-flash-danger {
    background: #fff5f5;
    color: #991b1b;
    border-color: #fecaca;
}

.site-flash-danger > i {
    color: #dc2626;
}

.site-flash-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.site-flash-warning > i {
    color: #d97706;
}

.site-flash-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.site-flash-info > i {
    color: #2563eb;
}

.site-flash-close {
    margin-left: auto;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.45;
    border-radius: 8px;
}

.site-flash-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

/* USER PROFILE DROPDOWN */
.user-profile-wrapper {
    position: relative;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.user-profile-trigger:hover {
    background: rgba(255, 119, 51, 0.1);
}

.user-initial-circle {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.user-profile-trigger i {
    font-size: 0.8rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.user-profile-wrapper.active .user-profile-trigger i {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: none;
    z-index: 1001;
    animation: slideDown 0.3s ease-out;
}

.user-dropdown.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f3f5;
    margin-bottom: 15px;
}

.initial-circle-lg {
    width: 65px;
    height: 65px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0 auto 12px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(255, 119, 51, 0.3);
}

.user-info .user-name {
    display: block;
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.user-info .user-role {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.user-dropdown-menu {
    list-style: none;
}

.user-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.user-dropdown-menu li a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.user-dropdown-menu li a i {
    width: 20px;
    font-size: 1rem;
    color: var(--text-muted);
}

.user-dropdown-menu li a:hover i {
    color: var(--primary);
}

.user-dropdown-menu .logout-link {
    color: #e03131;
    margin-top: 5px;
}

.user-dropdown-menu .logout-link:hover {
    background: #fff5f5;
    color: #e03131;
}

.user-shops-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 100px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.user-shops-list::-webkit-scrollbar {
    width: 6px;
}

.user-shops-list::-webkit-scrollbar-track {
    background: transparent;
}

.user-shops-list::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 20px;
}

/* ARTICLE CARD ACTIONS (Global) */
.article-card {
    position: relative;
}

.article-card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.card-action-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    font-size: 0.85rem;
}

.card-action-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 6px 15px rgba(255, 119, 51, 0.3);
}

.card-action-icon i {
    pointer-events: none;
}

.user-dropdown-menu .logout-link i {
    color: #e03131;
}

/* AUTH SOCIAL */
.auth-separator {
    text-align: center;
    margin: 1.5rem 0 1.2rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-separator::before,
.auth-separator::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: #e4e8ef;
}

.auth-separator::before {
    left: 0;
}

.auth-separator::after {
    right: 0;
}

.auth-separator span {
    background: var(--white);
    padding: 0 12px;
    position: relative;
    z-index: 1;
}

.social-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.btn-social {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: 1.5px solid #e0e4ea;
    font-family: 'Inter', sans-serif;
    background: var(--white);
}

.btn-social:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 20px;
    text-decoration: none;
    color: #3c4043;
}

.btn-social i {
    font-size: 1.15rem;
}

/* Google */
.btn-social.google {
    background: var(--white);
    color: #3c4043;
    border-color: #dadce0;
    /* Le bouton est lui-même le lien (connexion) ou un <button> (inscription) :
       le padding de « .btn-social a » ne s'applique pas. */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    line-height: 1.5;
    text-decoration: none;
}

.btn-social.google i {
    color: #ea4335;
}

.btn-social.google:hover {
    background: #f8f9fa;
    border-color: #c9cdd4;
}

/* Facebook */
.btn-social.facebook {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.btn-social.google:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-social.facebook a {
    color: #fff;
}

.btn-social.facebook i {
    color: #fff;
}

.btn-social.facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.35);
}

/* AUTH RESPONSIVE */
@media (max-width: 520px) {
    .auth-container {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .auth-container h2 {
        font-size: 1.65rem;
    }

    .social-auth-buttons {
        gap: 10px;
    }
}

/* AUTH PARTIALS — styles des blocs réutilisables _login_form & _register_form */

/* Titre et sous-titre dans les partials */
.auth-partial-title {
    font-size: 1.6rem;
    color: var(--secondary);
    margin-bottom: 0.3rem;
    text-align: center;
    font-family: 'Outfit', sans-serif;
}

.auth-partial-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1.8rem;
}

/* Sur les pages dédiées (auth-container), les titres des partials
   se fondent dans le conteneur — on masque la redondance visuelle */
.auth-container .auth-partial-title {
    font-size: 2rem;
    margin-bottom: 0.4rem;
}

/* Conteneur des partials dans l'onglet boutique */
.auth-choice {
    max-width: 440px;
    margin: 0 auto;
}

/* Lien footer dans l'onglet boutique */
.auth-choice .auth-footer {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-choice .auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-choice .auth-footer a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* Auth — état connecté (page inscription / connexion) */
.auth-status {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.user-avatar-large {
    width: 100px;
    height: 100px;
    background: var(--primary);
    color: white;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(255, 119, 51, 0.2);
}

.logout-link {
    color: var(--primary);
    margin-top: 5px;
    text-decoration: none;
}

.logout-link:hover {
    color: #e03131;
}

/* Indicatif + téléphone */
.auth-phone-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.auth-phone-prefix {
    flex: 0 0 120px;
    padding: 10px;
    border: 1.5px solid #e0e0e0;
    border-radius: var(--radius-sm, 8px);
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-main, #2d3436);
    background: var(--bg-alt, #f8f9fa);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-phone-prefix:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.auth-phone-row input[type="tel"] {
    flex: 1;
}

.auth-phone-hint {
    font-size: 0.77rem;
    color: var(--text-muted);
}

/* Consentement CGU */
.consent-group {
    margin-top: 4px;
    margin-bottom: 6px;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    cursor: pointer;
    font-weight: 400;
    line-height: 1;
}

.consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
}

.consent-text {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.consent-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.consent-text a:hover {
    border-bottom-color: var(--primary);
}

.consent-error {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    margin-left: 29px;
    font-size: 0.81rem;
    color: #e55353;
}

.consent-error i {
    font-size: 0.78rem;
}

.btn-primary:disabled,
.btn-social:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* VENDOR DASHBOARD LAYOUT */
.vd-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-alt);
}

.vd-sidebar {
    width: 280px;
    background: var(--secondary);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1050;
    transition: all 0.3s ease;
}

.vd-sidebar__brand {
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vd-sidebar__logo {
    color: var(--white);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vd-sidebar__logo a {
    color: var(--white);
    text-decoration: none;
}

.vd-sidebar__logo i {
    color: var(--primary);
}

.vd-sidebar__toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
}

.vd-sidebar__user {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vd-sidebar__avatar {
    width: 45px;
    height: 45px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.vd-sidebar__user-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.vd-sidebar__user-role {
    display: block;
    font-size: 0.75rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vd-sidebar__nav {
    flex: 1;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vd-sidebar__nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    position: relative;
    transition: all 0.2s ease;
}

.vd-sidebar__nav-item i {
    width: 20px;
    font-size: 1.1rem;
    text-align: center;
}

.vd-sidebar__nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.vd-sidebar__nav-item.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 119, 51, 0.3);
}

.vd-sidebar__active-indicator {
    position: absolute;
    right: 15px;
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
}

.vd-sidebar__footer {
    padding: 20px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.vd-sidebar__footer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
}

.vd-sidebar__footer-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.vd-sidebar__footer-link--logout:hover {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

/* MAIN CONTENT AREA */
.vd-main {
    flex: 1;
    padding: 30px 20px;
    overflow-y: auto;
}

.vd-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 15px;
}

@media (max-width: 768px) {
    .vd-content-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .vd-content-header .vd-actions {
        width: 100%;
        display: flex;
        gap: 10px;
    }

    .vd-content-header .vd-actions .btn {
        flex: 1;
        justify-content: center;
    }
}

.vd-title {
    font-size: 1.8rem;
    color: var(--secondary);
}

/* STATS CARDS */
.vd-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.vd-stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
}

.vd-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.vd-stat-icon--blue {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.vd-stat-icon--green {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.vd-stat-icon--purple {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b2;
}

.vd-stat-icon--orange {
    background: rgba(230, 126, 34, 0.1);
    color: #e67e22;
}

.vd-stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.vd-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    font-family: 'Outfit', sans-serif;
}

/* CARDS AND LISTS */
.vd-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.vd-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.vd-section-header h2 {
    font-size: 1.25rem;
}

.vd-link,
.vd-preset-link,
.vd-action-btn,
.vd-info-whatsapp,
.vd-back-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.vd-link:hover,
.vd-preset-link:hover,
.vd-action-btn:hover,
.vd-info-whatsapp:hover,
.vd-back-link:hover {
    text-decoration: underline;
}

.vd-shop-card {
    display: flex;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid #eee;
    box-shadow: var(--shadow-sm);
    flex-direction: column;
}

.vd-shop-card__bg {
    height: 80px;
    width: 100%;
    background-color: #f1f3f5;
    background-size: cover;
    background-position: center;
}

.vd-shop-card__content {
    flex: 1;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.vd-shop-card__logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
}

.vd-shop-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vd-shop-card__info h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.vd-shop-card__info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

.vd-shop-card__actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

/* TABLES */
.vd-table-container {
    overflow-x: auto;
}

.vd-table {
    width: 100%;
    border-collapse: collapse;
}

.vd-table th {
    text-align: left;
    padding: 15px;
    border-bottom: 2px solid var(--bg-alt);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.vd-table td {
    padding: 15px;
    border-bottom: 1px solid var(--bg-alt);
}

.vd-table-empty {
    text-align: center !important;
    padding: 60px !important;
    color: var(--text-muted);
}

.vd-table-empty i {
    font-size: 3rem;
    opacity: 0.2;
    margin-bottom: 15px;
}

/* PROFILE */
.vd-profile-card {
    max-width: 800px;
    margin: 0 auto;
}

.vd-profile-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--bg-alt);
}

.vd-profile-avatar {
    width: 100px;
    height: 100px;
    background: var(--primary);
    color: white;
    font-size: 3rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(255, 119, 51, 0.3);
}

.vd-profile-meta h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.vd-form {
    display: grid;
    gap: 20px;
}

.vd-form-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

/* SHOPS GRID */
.vd-shops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.vd-shop-list-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    transition: all 0.2s ease;
    overflow: hidden;
}

.vd-shop-list-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.vd-shop-list-item__banner {
    height: 100px;
    width: 100%;
    background-color: #f1f3f5;
    background-size: cover;
    background-position: center;
}

.vd-shop-list-item__content {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.vd-shop-list-item__logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.vd-shop-list-item__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vd-shop-list-item__logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.vd-shop-list-item__info {
    flex: 1;
}

.vd-shop-list-item__info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.vd-shop-list-item__info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.vd-shop-list-item__actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* ARTICLE AND CLIENT INFO IN TABLES */
.vd-article-info,
.vd-client-info {
    display: flex;
    flex-direction: column;
}

.vd-article-name,
.vd-client-name {
    font-weight: 600;
    color: var(--secondary);
}

.vd-article-cat,
.vd-client-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.vd-article-img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-alt);
}

.vd-article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vd-actions {
    display: flex;
    gap: 10px;
}

.vd-table-actions {
    display: flex;
    gap: 8px;
}

.vd-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.vd-empty-state i {
    font-size: 4rem;
    opacity: 0.1;
    margin-bottom: 20px;
    display: block;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .vd-sidebar {
        position: fixed;
        left: -280px;
        z-index: 1000;
    }

    .vd-sidebar.active {
        left: 0;
    }

    .vd-sidebar__toggle {
        display: block;
    }

}

/* MODALS */
.modal {
    display: none;
    position: fixed;
    z-index: 6000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* VARIANT TABLE (for variant modal) */
.variant-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9rem;
}

.variant-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--bg-alt);
    color: var(--text-muted);
}

.variant-table td {
    padding: 12px;
    border-bottom: 1px solid var(--bg-alt);
}

/* RICH EDITOR */
.rich-editor-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.rich-editor-toolbar button {
    padding: 5px 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.rich-editor-toolbar button:hover {
    background: #eee;
}

.modal-content .form-group {
    margin-bottom: 20px;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary);
}

.modal-content .form-control,
.modal-content input[type="text"],
.modal-content input[type="number"],
.modal-content select {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #e1e4e8;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fcfcfc;
}

.modal-content .form-control:focus,
.modal-content input:focus,
.modal-content select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Custom styling for select to make it look premium */
.modal-content select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ff7733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 18px !important;
    padding-right: 45px !important;
    cursor: pointer !important;
    background-color: #fcfcfc !important;
    color: var(--secondary) !important;
    border: 1.5px solid #e1e4e8 !important;
}

.modal-content select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--primary-light) !important;
    background-color: #fff !important;
}

.rich-editor {
    min-height: 150px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    background: white;
    outline: none;
}

/* CART DROPDOWN */
.cart-wrapper {
    position: relative;
}

.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    max-height: 500px;
    display: flex;
    flex-direction: column;
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 10px;
}

.cart-dropdown.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.cart-dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-dropdown-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

.close-cart-dropdown {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
}

.close-cart-dropdown:hover {
    color: var(--text-main);
}

.cart-dropdown-content {
    flex: 1;
    overflow-y: auto;
    min-height: 150px;
}

.cart-items {
    padding: 15px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fafafa;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 28px;
    background: white;
    flex-shrink: 0;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.qty-btn:hover {
    color: var(--primary);
}

.qty-value {
    width: 30px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
}

.cart-item-total {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
    min-width: 50px;
    text-align: right;
    flex-shrink: 0;
}

.cart-item-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: #ffe8e0;
    color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove:hover {
    background: var(--primary);
    color: white;
}

.cart-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.cart-empty i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 10px;
}

.cart-empty p {
    margin: 0;
    font-size: 0.95rem;
}

.cart-error {
    padding: 20px;
    text-align: center;
    color: #e74c3c;
    font-size: 0.9rem;
}

.cart-loading {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.cart-loading i {
    margin-right: 8px;
}

.cart-summary {
    padding: 15px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.cart-dropdown-footer {
    padding: 15px;
    border-top: 1px solid #eee;
}

.btn-view-cart {
    display: block;
    text-align: center;
    background: var(--primary);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-view-cart:hover {
    background: var(--primary-dark);
}

@media (max-width: 480px) {
    .cart-dropdown {
        position: fixed;
        width: auto;
        left: 15px;
        right: 15px;
        top: 100px;
        max-width: none;
        max-height: 70vh;
    }

    .vd-section {
        padding: 0px;
    }
}

/* NOTIFICATIONS */
.notifications-wrapper {
    position: relative;
    display: inline-block;
}

.notifications-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notifications-icon:hover {
    color: var(--primary);
}

.notifications-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    max-height: 500px;
    display: flex;
    flex-direction: column;
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 10px;
}

.notifications-dropdown.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.notifications-dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-dropdown-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

.close-notifications {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
}

.close-notifications:hover {
    color: var(--text-main);
}

/* Alerte commissions impayées (épinglée en tête, ne se marque pas comme lue) */
.notification-item.notification-alert,
.notification-item.notification-alert.unread {
    background: #fff1f0;
    border-left: 3px solid #e53e3e;
}

.notification-item.notification-alert .notification-icon {
    background: #fed7d7;
    color: #c53030;
}

.notification-item.notification-alert .notification-title {
    color: #c53030;
    white-space: normal;
}

.notification-item.notification-alert .notification-message {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.notifications-read-all {
    margin-left: auto;
    margin-right: 10px;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8rem;
    color: var(--primary, #ff7733);
    cursor: pointer;
}

.notifications-read-all:hover {
    text-decoration: underline;
}

.notifications-dropdown-footer {
    display: flex;
    gap: 8px;
}

.notifications-dropdown-footer .btn-view-all-notifications {
    flex: 1;
}

.notifications-dropdown-content {
    flex: 1;
    overflow-y: auto;
    min-height: 150px;
}

.notifications-list {
    padding: 0;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background: var(--bg-alt);
}

.notification-item.unread {
    background: var(--primary-light);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.notification-info {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.75rem;
    color: #aaa;
}

.notification-link {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: color 0.2s;
}

.notification-link:hover {
    color: var(--primary);
}

.notifications-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.notifications-empty p {
    margin: 0;
}

.notifications-error {
    padding: 20px;
    text-align: center;
    color: #e74c3c;
    font-size: 0.9rem;
}

.notifications-loading {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.notifications-loading i {
    margin-right: 8px;
}

.notifications-dropdown-footer {
    padding: 15px;
    border-top: 1px solid #eee;
}

.btn-view-all-notifications {
    display: block;
    text-align: center;
    background: var(--bg-alt);
    color: var(--text-main);
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-view-all-notifications:hover {
    background: #e0e0e0;
}

@media (max-width: 480px) {
    .notifications-dropdown {
        position: fixed;
        width: auto;
        left: 15px;
        right: 15px;
        top: 100px;
        max-width: none;
        max-height: 70vh;
    }
}

/* MEMBER ORDER MANAGEMENT */
.client-orders-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.vd-table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    -webkit-overflow-scrolling: touch;
}

.vd-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

@media (max-width: 768px) {
    .vd-table-responsive {
        border-radius: 8px;
    }

    .vd-table {
        min-width: 700px;
    }
    
    .vd-table th, .vd-table td {
        padding: 10px !important;
        font-size: 0.8rem !important;
    }
}

.vd-table th {
    background: #f8f9fa;
    padding: 15px 20px;
    text-align: left;
    font-weight: 700;
    color: #2c3e50;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #eee;
}

.vd-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.vd-order-id {
    font-weight: 700;
    color: var(--primary);
}

.vd-order-date {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.vd-shop-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
}

.vd-shop-logo-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.vd-status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.vd-status-attente {
    background: #fff3cd;
    color: #856404;
}

.vd-status-livrée {
    background: #d4edda;
    color: #155724;
}

.vd-status-annulée,
.vd-status-rejetée {
    background: #f8d7da;
    color: #721c24;
}

.vd-status-traitementencours {
    background: #cce5ff;
    color: #004085;
}

.vd-status-livraisonencours {
    background: #e2e3e5;
    color: #383d41;
}

.vd-status-commandereceptionnée {
    background: #d1ecf1;
    color: #0c5460;
}

.vd-actions {
    display: flex;
    gap: 10px;
}

.vd-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.vd-btn-confirm {
    background: #27ae60;
    color: white;
}

.vd-btn-confirm:hover {
    background: #219150;
    transform: translateY(-1px);
}

.vd-btn-cancel {
    background: #e74c3c;
    color: white;
}

.vd-btn-cancel:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.vd-btn-cancel:disabled {
    background: #ecf0f1;
    color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.vd-btn-outline {
    background: white;
    border: 1px solid #ddd;
    color: #666;
}

.vd-btn-outline:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

/* Star Rating System */
.rating-group {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.rating-group input {
    display: none;
}

.rating-group label {
    font-size: 2.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.rating-group label:hover,
.rating-group label:hover~label,
.rating-group input:checked~label {
    color: #f1c40f;
}

.rating-group label:hover {
    transform: scale(1.1);
}

.rating-textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    margin-top: 15px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.rating-textarea:focus {
    border-color: var(--primary);
}

/* Modal Enhancements */
.vd-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
}

.vd-modal-dialog {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: vdModalSlideIn 0.3s ease-out;
}

@keyframes vdModalSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.vd-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.vd-modal-footer {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.vd-modal-footer .vd-btn {
    flex: 1;
    padding: 12px;
}

/* ORDER DETAILS MODAL CONTENT */
.details-items-list {
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.details-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.details-item:last-child {
    border-bottom: none;
}

.details-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f8f9fa;
}

.details-item-info {
    flex: 1;
}

.details-item-name {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2px;
    font-size: 0.95rem;
}

.details-item-variant {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.details-item-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.details-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.summary-row:last-child {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
    font-weight: 800;
    font-size: 1.1rem;
    color: #2c3e50;
}

.details-modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.details-modal-actions .vd-btn {
    flex: 1;
    padding: 14px;
    font-size: 0.95rem;
}

@media (max-width: 480px) {
    .notifications-dropdown {
        width: calc(100vw - 30px);
        right: 15px;
        max-width: 100%;
    }

    .vd-modal-dialog {
        padding: 20px;
        border-radius: 15px;
    }

    .vd-modal-title {
        font-size: 1.25rem;
    }

    .vd-modal-footer, 
    .details-modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .vd-modal-footer .vd-btn,
    .details-modal-actions .vd-btn {
        width: 100%;
    }

    .rating-group label {
        font-size: 2rem;
    }
}

/* VENDOR PANEL PREMIUM STYLES */
.vd-content-header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.vd-title {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
}

.vd-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 500;
}

.vd-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.vd-table-container {
    overflow-x: auto;
}

.vd-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.vd-table th {
    background: #f8fafc;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid #f1f5f9;
}

.vd-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--text-main);
    font-size: 0.95rem;
}

.vd-table tr:last-child td {
    border-bottom: none;
}

.vd-table tr:hover td {
    background: #fcfcfc;
}

.vd-badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
}

.status-processing {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
}

.status-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #dcfce7;
}

.status-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

.vd-action-group {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.btn-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.btn-view {
    background: #f1f5f9;
    color: #475569;
}

.btn-view:hover {
    background: var(--secondary);
    color: white;
}

.btn-accept {
    background: #f0fdf4;
    color: #16a34a;
}

.btn-accept:hover {
    background: #16a34a;
    color: white;
}

.btn-reject {
    background: #fef2f2;
    color: #dc2626;
}

.btn-reject:hover {
    background: #dc2626;
    color: white;
}

.btn-edit {
    background: #eff6ff;
    color: #2563eb;
}

.btn-edit:hover {
    background: #2563eb;
    color: white;
}

.btn-deliver {
    background: #faf5ff;
    color: #9333ea;
}

.btn-deliver:hover {
    background: #9333ea;
    color: white;
}

/* Modal Refined */
.vd-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.vd-modal-content {
    background: white;
    border-radius: 28px;
    width: 550px;
    max-width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    animation: modalScaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes modalScaleUp {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(30px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.vd-modal-header {
    padding: 24px 35px;
    background: #fcfdfe;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vd-modal-header h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    font-family: 'Outfit', sans-serif;
}

.close-modal {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s;
}

.close-modal:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

.vd-modal-body {
    padding: 35px;
    overflow-y: auto;
}

.vd-modal-footer {
    padding: 20px 35px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

.vd-select,
.vd-textarea {
    width: 100%;
    padding: 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1rem;
    transition: all 0.2s;
    outline: none;
    font-family: inherit;
}

.vd-select:focus,
.vd-textarea:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.vd-input-code {
    width: 100%;
    padding: 25px;
    background: #f8fafc;
    border: 3px dashed #cbd5e1;
    border-radius: 20px;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.6rem;
    text-align: center;
    color: #0f172a;
    transition: all 0.3s;
}

.vd-input-code:focus {
    border-color: var(--primary);
    background: white;
    border-style: solid;
    box-shadow: 0 15px 30px rgba(255, 119, 51, 0.15);
}

.order-summary-header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    background: #f8fafc;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid #f1f5f9;
}

.summary-stat .label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.summary-stat .value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.summary-stat .valueHighlight {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--primary);
}

.details-items-container {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 15px;
}

.detail-item-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid #f1f5f9;
}

.item-thumb {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    object-fit: cover;
    background: white;
    border: 1px solid #f1f5f9;
}

.item-info {
    flex: 1;
}

.item-name {
    display: block;
    font-weight: 750;
    color: #0f172a;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.item-variant {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 6px;
    display: inline-block;
}

.item-price {
    text-align: right;
}

.item-price .qty {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 800;
}

.item-price .price {
    font-weight: 850;
    color: #0f172a;
    font-size: 1.1rem;
}

.empty-state {
    text-align: center;
    color: #94a3b8;
    padding: 40px;
}

.loading-spinner {
    padding: 60px;
    text-align: center;
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
}

/* REFINED PREMIUM MODAL SYSTEM */
.vd-modal-header--details {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border-bottom: 2px solid #3b82f620;
}

.vd-modal-header--success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-bottom: 2px solid #22c55e20;
}

.vd-modal-header--danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-bottom: 2px solid #ef444420;
}

.vd-modal-header--purple {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-bottom: 2px solid #a855f720;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.vd-modal-header--details .header-icon {
    color: #3b82f6;
}

.vd-modal-header--success .header-icon {
    color: #22c55e;
}

.vd-modal-header--danger .header-icon {
    color: #ef4444;
}

.vd-modal-header--purple .header-icon {
    color: #a855f7;
}

.header-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 2px;
    font-weight: 500;
}

.details-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 30px 0 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.details-section-title i {
    color: #94a3b8;
    font-size: 1.1rem;
}

.details-section-title h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.item-count-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
}

.item-img-container {
    position: relative;
}

.item-img-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.info-alert,
.warning-alert {
    display: flex;
    gap: 15px;
    padding: 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 20px;
}

.info-alert {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #dbeafe;
}

.info-alert i {
    color: #3b82f6;
    margin-top: 2px;
}

.warning-alert {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #ffedd5;
}

.warning-alert i {
    color: #f97316;
    margin-top: 2px;
}

.btn-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 30px;
    border-radius: 16px;
    border: none;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: inherit;
    width: 100%;
}

.btn-premium:active {
    transform: scale(0.96);
}

.btn-premium--success {
    background: #22c55e;
    color: white;
    box-shadow: 0 10px 20px -5px rgba(34, 197, 94, 0.4);
}

.btn-premium--success:hover {
    background: #16a34a;
    box-shadow: 0 15px 25px -5px rgba(34, 197, 94, 0.5);
    transform: translateY(-2px);
}

.btn-premium--danger {
    background: #ef4444;
    color: white;
    box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.4);
}

.btn-premium--danger:hover {
    background: #dc2626;
    box-shadow: 0 15px 25px -5px rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

.btn-premium--purple {
    background: #a855f7;
    color: white;
    box-shadow: 0 10px 20px -5px rgba(168, 85, 247, 0.4);
}

.btn-premium--purple:hover {
    background: #9333ea;
    box-shadow: 0 15px 25px -5px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.error-state {
    padding: 40px;
    text-align: center;
    color: #ef4444;
}

.error-state i {
    font-size: 3rem;
    margin-bottom: 15px;
}

@media (max-width: 640px) {
    .vd-modal-header {
        padding: 20px 25px;
    }

    .vd-modal-body {
        padding: 25px;
    }

    .header-icon {
        display: none;
    }

    .vd-section {
        padding: 0px;
    }
}

/**********/
/* Article Card - Position relative pour le contexte */
.article-card {
    position: relative;
    overflow: visible !important;
    z-index: 1;
    transition: all 0.3s ease;
    background: var(--white);
    border-radius: var(--radius);
    padding: 15px;
    border: 1px solid #f1f1f1;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
    /* Au-dessus du header sticky (.conteneurHeader, z-index 1100) pour que le panneau des variantes le recouvre */
    z-index: 1101;
}

/* Image de l'article */
.article-image {
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.article-image-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.article-image-placeholder i {
    font-size: 3rem;
    color: #dee2e6;
}

/* Contenu de l'article */
.article-content {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    margin: 0 0 2px 0;
    font-size: 1.1rem;
    min-height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    cursor: pointer;
    color: var(--secondary);
    transition: color 0.2s ease;
    line-height: 1.3;
}

.article-title:hover {
    color: var(--primary);
}

/* Nom de la boutique */
.shop-name {
    margin-bottom: 3px;
    font-size: 0.85rem;
}

.shop-name a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.shop-name a:hover {
    color: var(--primary);
}

/* Localisation de la boutique */
.shop-location {
    font-size: 0.72rem;
    color: #888;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.shop-location i {
    font-size: 0.7rem;
    color: var(--primary);
    opacity: 0.7;
}

.shop-name i {
    font-size: 0.75rem;
}

/* Prix */
.article-price {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 15px;
}

/* Actions card */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary {
    flex: 1;
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--bg-alt);
    color: var(--secondary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 119, 51, 0.2);
}

.btn-secondary[data-has-variants="true"] {
    position: relative;
}

.btn-secondary[data-has-variants="true"]::after {
    content: '+';
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(255, 119, 51, 0.3);
}

.btn-whatsapp {
    width: 40px;
    height: 40px;
    background: #25D366;
    color: white;
    border-radius: 8px;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-details {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
}

.btn-details:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 119, 51, 0.3);
}

/* Cartes article / pack : l'ajout au panier est l'action principale
   (couleur principale), « Voir détails » passe en gris. */
.card-actions .action-btn.btn-cart {
    background: var(--primary);
    color: #fff;
}

.card-actions .action-btn.btn-cart:hover,
.product-card:hover .card-actions .action-btn.btn-cart:hover {
    background: var(--primary-dark);
    color: #fff;
}

.product-card:hover .card-actions .action-btn.btn-cart {
    background: var(--primary);
    color: #fff;
}

.card-actions .action-btn.btn-details {
    background: var(--bg-alt);
    color: var(--secondary);
}

.card-actions .action-btn.btn-details:hover {
    background: #e2e5e9;
    color: var(--secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Variants Hover Panel - Positionné au-dessus */
.article-variants-hover {
    position: absolute;
    bottom: 50%;
    right: 100px;
    background: white;
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 119, 51, 0.15);
    border-bottom: 3px solid var(--primary);
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 5px;
}

.article-card:hover .article-variants-hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Variants hover header */
.variants-hover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f3f5;
}

.variants-hover-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0;
}

.variants-count {
    font-size: 0.75rem;
    background: var(--primary-light);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 30px;
    font-weight: 600;
}

/* Variants list */
.variants-hover-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Variant item */
.variant-hover-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: #fcfcfc;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    animation: variantSlideIn 0.2s ease-out forwards;
    opacity: 0;
}

.variant-hover-item:nth-child(1) {
    animation-delay: 0.05s;
}

.variant-hover-item:nth-child(2) {
    animation-delay: 0.1s;
}

.variant-hover-item:nth-child(3) {
    animation-delay: 0.15s;
}

.variant-hover-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateX(3px);
}

/* Variant image */
.variant-hover-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #eee;
}

.variant-hover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.variant-hover-image i {
    font-size: 1rem;
    color: #adb5bd;
}

/* Variant info */
.variant-hover-info {
    flex: 1;
    min-width: 0;
}

.variant-hover-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.variant-hover-price {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
}

/* Variant actions */
.variant-hover-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.variant-hover-cart,
.variant-hover-whatsapp {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.8rem;
}

.variant-hover-cart {
    background: var(--bg-alt);
    color: var(--secondary);
}

.variant-hover-cart:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.variant-hover-whatsapp {
    background: #25D366;
    color: white;
}

.variant-hover-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.05);
}

/* Footer with view all link */
.variants-hover-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f1f3f5;
    text-align: center;
}

.view-all-variants {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.view-all-variants:hover {
    background: var(--primary-light);
    gap: 12px;
}

.view-all-variants i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.view-all-variants:hover i {
    transform: translateX(3px);
}

/* Animation */
@keyframes variantSlideIn {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mobile-break {
    display: inline;
}

.mobile-break2 {
    display: none;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .article-variants-hover {
        display: none;
        /* Cacher sur mobile */
    }

    .article-card:hover .article-variants-hover {
        display: none;
    }

    .card-actions {
        flex-wrap: wrap;
    }

    .btn-secondary {
        flex: 1 1 100%;
        order: 1;
    }

    /* Ajout au panier seul sur la première ligne, les autres boutons dessous */
    .card-actions .action-btn.btn-cart {
        flex: 1 1 100%;
        order: -1;
    }

    .btn-whatsapp,
    .btn-facebook,
    .btn-details {
        flex: 1;
    }

    .mobile-break {
        display: none;
    }

    .mobile-break2 {
        display: block;
    }

    .vd-section {
        padding: 0px;
    }
}

/* Scrollbar styling */
.article-variants-hover::-webkit-scrollbar {
    width: 5px;
}

.article-variants-hover::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.article-variants-hover::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.article-variants-hover::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Badges sur les articles */
.article-image {
    position: relative;
    overflow: hidden;
}

.article-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 5;
    pointer-events: none;
}

.article-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
    animation: badgeAppear 0.3s ease-out;
}

.article-badge i {
    font-size: 0.65rem;
}

@keyframes badgeAppear {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation au survol */
.article-card:hover .article-badge {
    transform: scale(1.05);
    transition: transform 0.2s;
}

/* ═══════════════════════════════════════
   INFINITE SCROLL — LOADERS GLOBAUX
   ═══════════════════════════════════════ */
.scroll-loader {
    text-align: center;
    padding: 28px 16px;
    display: none;
}

.scroll-loader i {
    color: var(--primary);
    font-size: 1.8rem;
}

.scroll-loader p {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.scroll-end-msg {
    text-align: center;
    padding: 18px 16px;
    color: var(--text-muted);
    font-size: 0.82rem;
    display: none;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.scroll-end-msg::before,
.scroll-end-msg::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
    max-width: 80px;
}

.scroll-trigger {
    height: 20px;
    pointer-events: none;
}

/* Commissions Alert Banner */
.commissions-alert-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1.5px solid #fb923c;
    border-radius: 12px;
    padding: 16px 22px;
    margin-bottom: 22px;
    animation: slideInBanner .35s ease;
}

@keyframes slideInBanner {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.commissions-alert-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.commissions-alert-icon {
    width: 44px;
    height: 44px;
    background: #fb923c;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.commissions-alert-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: .9rem;
    color: #92400e;
}

.commissions-alert-text strong {
    font-size: 1rem;
    color: #7c2d12;
}

.commissions-alert-amount {
    color: #b45309;
    font-size: 1rem;
}

.commissions-pay-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #ea580c;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    transition: background .2s, transform .15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.commissions-pay-btn:hover {
    background: #c2410c;
    transform: translateY(-1px);
}

/* SPINNER VARIANT */
.spinner-icon {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Adjustments for Shops List */
@media (max-width: 768px) {
    .vd-shops-grid {
        gap: 0 !important;
    }

    .vd-shop-list-item {
        flex-direction: column;
        text-align: center;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        padding: 20px 10px !important;
    }

    .vd-shop-list-item__logo {
        margin: 0 auto 10px;
    }

    .vd-shop-list-item__actions {
        flex-direction: row !important;
        justify-content: center;
        width: 100%;
        margin-top: 15px;
        gap: 10px !important;
    }

    .vd-shop-list-item__actions .btn {
        flex: 1;
        display: flex;
        justify-content: center;
        padding: 10px;
    }

    .vd-section {
        padding: 0px;
        background: transparent;
        box-shadow: none;
    }

    .vd-shop-card__content {
        flex-direction: column;
        margin: auto;
    }

    .vd-shop-card__actions {
        margin: auto;
    }

    .vd-profile-header {
        flex-direction: column;
    }

    .vd-profile-header .vd-profile-meta {
        text-align: center;
    }

    .vd-title {
        text-align: center;
        align-items: center;
        margin: 0px;
        padding: 0px;
    }
}

/* ═══════════════════════════════════════
   MODALS & FORM GRIDS (GLOBAL REFACTO)
   ═══════════════════════════════════════ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2500;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    width: 95%;
    max-width: 700px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.form-grid-variant {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* Rich Editor */
.rich-editor {
    border: 1.5px solid #eee;
    border-radius: var(--radius-sm);
    min-height: 120px;
    padding: 12px;
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.rich-editor:focus {
    border-color: var(--primary);
}

.rich-editor-toolbar {
    background: #f8f9fa;
    border: 1.5px solid #eee;
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding: 6px;
    display: flex;
    gap: 5px;
}

.rich-editor-toolbar button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s;
}

.rich-editor-toolbar button:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* Variant table styles */
.variant-table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #eee;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.variant-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.variant-table th,
.variant-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.variant-table th {
    background: #f8f9fa;
    color: var(--secondary);
    font-weight: 700;
}

.variant-action-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f5;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.variant-action-btn:hover {
    transform: scale(1.1);
}

.btn-edit-v:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-delete-v:hover {
    background: #fff5f5;
    color: #dc3545;
}

.article-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 200px;
    padding: 8px 0;
    border: 1px solid #eaecef;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem 1.2rem;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .form-grid-2,
    .form-grid-3,
    .form-grid-variant {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-grid-variant>div:last-child {
        margin-top: 10px;
    }

    .article-dropdown-menu {
        right: 0px;
        top: 100%;
    }
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1200;
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.search-dropdown.hidden { display: none; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid #f1f3f5;
}
.search-result-item:hover { background: var(--bg-alt); }
.search-result-image {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    background: var(--bg-alt);
    overflow: hidden;
    border-radius: 6px;
}
.search-result-image img { width: 100%; height: 100%; object-fit: cover; }
.search-result-info { display: grid; gap: 2px; text-align: left; }
.search-result-info small { color: var(--text-muted); }
.search-result-all, .search-result-empty {
    display: block;
    width: 100%;
    padding: 12px 14px;
    text-align: left;
    color: var(--primary);
    background: var(--white);
    border: 0;
}
.search-loading {
    padding: 16px 14px;
    color: var(--text-muted);
    text-align: center;
}
.search-loading i { margin-right: 8px; color: var(--primary); }
.search-result-all { cursor: pointer; font-weight: 600; text-align: center; }

/* ── Packs (cartes parmi les articles + fiche pack) ── */
.pack-card-badge {
    position: absolute; top: 22px; left: 22px; z-index: 3;
    background: #7c3aed; color: #fff; font-size: 0.72rem; font-weight: 700;
    padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.4px;
    display: inline-flex; align-items: center; gap: 5px;
}
.pack-card-items { font-size: 0.8rem; color: var(--text-muted); margin: 4px 0; display: flex; align-items: center; gap: 6px; }
.pack-card-old-price { font-size: 0.8rem; color: var(--text-muted); text-decoration: line-through; font-weight: 400; margin-left: 6px; }
.pack-card-soldout { font-size: 0.78rem; font-weight: 700; color: #b91c1c; padding: 6px 10px; background: #fef2f2; border-radius: 6px; }

.pack-detail { padding: 2rem 0 3rem; }
.pack-detail-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); margin-bottom: 1.2rem; text-decoration: none; }
.pack-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.pack-detail-image { position: relative; border-radius: var(--radius); overflow: hidden; background: #fff; }
.pack-detail-image img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pack-detail-image .pack-card-badge { top: 14px; left: 14px; }
.pack-detail-placeholder { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 5rem; color: #fff; background: linear-gradient(145deg, #ffe0cc, #ff7733); }
.pack-detail-info h1 { font-size: 1.8rem; margin: 0 0 6px; }
.pack-detail-shop { color: var(--primary); text-decoration: none; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.pack-detail-price { margin: 1rem 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.pack-detail-price strong { font-size: 1.8rem; color: var(--primary); }
.pack-detail-saving { background: #dcfce7; color: #166534; font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.pack-detail-description { color: var(--text-muted); line-height: 1.6; }
.pack-detail-subtitle { font-size: 1.05rem; margin: 1.4rem 0 0.6rem; }
.pack-detail-items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pack-detail-items li { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #f1f1f1; border-radius: 10px; padding: 8px 12px; }
.pack-detail-items img, .pack-detail-item-ph { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.pack-detail-item-ph { display: flex; align-items: center; justify-content: center; background: var(--bg-alt); color: var(--text-muted); }
.pack-detail-items li > div { flex: 1; min-width: 0; }
.pack-detail-items a { color: inherit; font-weight: 600; text-decoration: none; }
.pack-detail-variant { color: var(--text-muted); font-size: 0.85rem; }
.pack-detail-qty { font-weight: 700; color: var(--text-muted); }
.pack-detail-meta { font-size: 0.9rem; color: var(--text-muted); margin: 1rem 0 0; display: flex; gap: 8px; align-items: center; }
.pack-detail-stock { color: #166534; }
.pack-detail-soldout { color: #b91c1c; font-weight: 600; }
.pack-detail-actions { display: flex; gap: 10px; margin-top: 1rem; }
.pack-detail-qty-input { width: 80px; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; }
.pack-detail-add { width: auto; display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; }
@media (max-width: 768px) {
    .pack-detail-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
.pack-detail-resell { margin-top: 1rem; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 8px; border: 1.5px dashed var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; cursor: pointer; }
.pack-detail-resell:hover { background: #fff; }
.search-pack-tag { display: inline-block; background: #7c3aed; color: #fff; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 10px; margin-right: 4px; vertical-align: middle; }
.pack-detail-whatsapp { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 8px; background: #25D366; color: #fff; font-weight: 600; text-decoration: none; }
.pack-detail-whatsapp:hover { background: #128C7E; color: #fff; }

/* Partage Facebook (cartes article/pack + fiche pack) */
.btn-facebook { width: 40px; height: 40px; background: #1877F2; color: #fff; border-radius: 8px; flex-shrink: 0; }
.btn-facebook:hover { background: #0d65d9; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3); }
.pack-detail-facebook { margin-top: 12px; margin-left: 6px; display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 8px; background: #1877F2; color: #fff; font-weight: 600; text-decoration: none; }
.pack-detail-facebook:hover { background: #0d65d9; color: #fff; }
