:root {
    --bg: #f5f7fb;
    --surface: rgba(255,255,255,.72);
    --surface-strong: rgba(255,255,255,.92);
    --text: #101828;
    --muted: #667085;
    --line: rgba(16,24,40,.12);
    --accent: #0A84FF;
    --accent-2: #5E5CE6;
    --success: #1DA860;
    --error: #E5484D;
    --warning: #E8A317;
    --shadow: 0 20px 50px rgba(16,24,40,.12);
    --radius: 24px;
    --radius-sm: 14px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #090b10;
        --surface: rgba(28,30,35,.72);
        --surface-strong: rgba(28,30,35,.92);
        --text: #f5f7fb;
        --muted: #aab1c0;
        --line: rgba(255,255,255,.12);
        --shadow: 0 20px 50px rgba(0,0,0,.35);
    }
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(10,132,255,.18), transparent 35%),
        radial-gradient(circle at 90% 10%, rgba(94,92,230,.14), transparent 36%),
        var(--bg);
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.65);
    color: var(--text);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    outline: none;
}
textarea { min-height: 110px; resize: vertical; }
label { display: grid; gap: 7px; font-weight: 650; color: var(--text); }
.shell { max-width: 1180px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.glass {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
}
.topbar {
    margin-top: 14px;
    border-radius: 999px;
    padding-top: 12px;
    padding-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 12px;
    z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 15px;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 900;
}
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 14px; }
.nav a, .link-button {
    border: none; background: transparent; color: var(--muted);
    cursor: pointer; font-weight: 650;
}
.nav a:hover, .link-button:hover { color: var(--text); }
.pill, .badge, .chip {
    display: inline-flex; align-items: center; gap: 4px;
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(10,132,255,.1);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}
.badge.success, .notice.success { background: rgba(29,168,96,.12); color: var(--success); }
.notice.error { background: rgba(229,72,77,.12); color: var(--error); }
.notice.info { background: rgba(10,132,255,.12); color: var(--accent); }
.main { padding-top: 28px; padding-bottom: 100px; }
.hero, .page-title, .panel, .empty {
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
}
.hero {
    display: grid;
    grid-template-columns: 1fr 230px;
    gap: 22px;
    align-items: center;
}
.hero h1, .page-title h1 { font-size: clamp(34px, 6vw, 68px); line-height: .95; margin: 0 0 14px; letter-spacing: -.05em; }
.hero p, .page-title p { color: var(--muted); font-size: 18px; max-width: 750px; }
.eyebrow { color: var(--accent)!important; text-transform: uppercase; font-size: 12px!important; font-weight: 900; letter-spacing: .12em; }
.hero-actions, .card-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 42px; padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    cursor: pointer;
    font-weight: 850;
    transition: transform .18s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; border: none; }
.btn.secondary { background: var(--surface-strong); color: var(--text); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.small { min-height: 34px; padding: 7px 12px; font-size: 13px; }
.stat-card, .kpi {
    border-radius: var(--radius);
    padding: 22px;
    background: linear-gradient(145deg, rgba(10,132,255,.12), rgba(94,92,230,.10));
}
.stat-card strong, .kpi strong { font-size: 44px; display: block; }
.section { margin: 30px 0; }
.section-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.grid { display: grid; gap: 16px; }
.vertical-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-links { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.vertical-card, .listing-card {
    border-radius: var(--radius);
    padding: 20px;
    min-height: 145px;
}
.vertical-card { display: grid; gap: 10px; }
.vertical-card .icon { font-size: 28px; }
.vertical-card small, .muted { color: var(--muted); }
.listing-card { padding: 0; overflow: hidden; }
.listing-photo {
    min-height: 170px;
    display: flex; align-items: flex-end;
    padding: 16px;
    background: linear-gradient(145deg, rgba(10,132,255,.22), rgba(94,92,230,.18)), var(--surface);
}
.listing-photo span {
    background: rgba(255,255,255,.78);
    color: #101828;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 800;
}
.listing-body { padding: 16px; display:grid; gap: 10px; }
.listing-body h3 { margin: 0; font-size: 18px; }
.listing-body p { margin: 0; color: var(--muted); }
.price { font-size: 20px; color: var(--accent); }
.price.big { font-size: 34px; display: block; margin: 12px 0; }
.badges, .chip-list { display:flex; flex-wrap: wrap; gap: 8px; }
.layout-two { display:grid; grid-template-columns: 300px 1fr; gap: 20px; align-items:start; }
.form-stack { display:grid; gap: 14px; }
.form-grid { display:grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items:end; }
.narrow { max-width: 560px; margin-left:auto; margin-right:auto; }
.two { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display:flex; align-items:center; gap: 8px; }
.check input { width:auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: var(--radius);
}
.table th, .table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align:left; }
.table th { color: var(--muted); font-size: 13px; }
.detail-grid { display:grid; grid-template-columns: 1fr 460px; gap: 20px; align-items:start; }
.media-hero { min-height: 480px; border-radius: var(--radius); display:flex; align-items:flex-end; padding: 22px; background: linear-gradient(145deg, rgba(10,132,255,.24), rgba(94,92,230,.18)); }
.media-hero span { font-size: 24px; font-weight: 900; }
.attribute-list { display:grid; gap: 8px; margin: 14px 0; }
.attribute-list div, .row-card, .message {
    border: 1px solid var(--line);
    background: rgba(255,255,255,.35);
    border-radius: 16px;
    padding: 12px;
}
.attribute-list div { display:flex; justify-content:space-between; }
.row-card { display:flex; justify-content:space-between; gap: 12px; align-items:center; margin-bottom: 10px; }
.auth-grid { display:grid; grid-template-columns: 1fr 420px; gap: 20px; align-items:stretch; }
.demo-box { display:grid; gap: 6px; margin-top: 20px; padding: 16px; border-radius: 18px; background: rgba(10,132,255,.1); }
.kpi-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi span { color: var(--muted); font-weight: 700; }
.inline { display:inline-flex; gap: 8px; align-items:center; }
.notice { padding: 12px 16px; border-radius: 16px; margin-bottom: 16px; font-weight: 750; }
.mobile-tab { display:none; }
.validation { color: var(--error); font-weight: 700; }
.dynamic-attrs { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.total-box { display:flex; justify-content:space-between; align-items:center; }
@media (max-width: 900px) {
    .topbar .nav { display:none; }
    .hero, .detail-grid, .auth-grid, .layout-two { grid-template-columns: 1fr; }
    .vertical-grid, .listing-grid, .admin-links, .kpi-grid { grid-template-columns: 1fr; }
    .form-grid, .dynamic-attrs { grid-template-columns: 1fr; }
    .hero h1, .page-title h1 { font-size: 40px; }
    .mobile-tab {
        position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
        display:flex; justify-content:space-around; align-items:center;
        border-radius: 999px; padding: 10px;
    }
    .mobile-tab a { font-size: 12px; color: var(--muted); font-weight: 800; }
    .mobile-tab .plus {
        width: 44px; height: 44px; display:grid; place-items:center;
        background: linear-gradient(135deg, var(--accent), var(--accent-2));
        color:white; border-radius: 999px; font-size: 24px;
    }
}


/* =========================================================
   BAZARI MARKETPLACE — Modèle Amazon-like + Apple UX
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8, 16, 28, .94);
    color: #fff;
    box-shadow: 0 10px 35px rgba(0,0,0,.18);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.header-row {
    min-height: 76px;
    display: grid;
    grid-template-columns: 240px minmax(280px, 1fr) auto;
    align-items: center;
    gap: 18px;
}
.site-header .brand { color: #fff; }
.site-header .brand small { color: rgba(255,255,255,.7); }
.header-search {
    display: grid;
    grid-template-columns: 1fr 54px;
    min-width: 0;
}
.header-search input {
    border-radius: 16px 0 0 16px;
    border: 2px solid transparent;
    background: #fff;
    color: #101828;
    min-height: 48px;
}
.header-search input:focus { border-color: #7dd3fc; }
.header-search button {
    border: 0;
    border-radius: 0 16px 16px 0;
    background: linear-gradient(135deg, #0A84FF, #5E5CE6);
    color: #fff;
    font-size: 25px;
    cursor: pointer;
}
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}
.header-actions > a {
    display: grid;
    gap: 1px;
    color: #fff;
    white-space: nowrap;
}
.header-actions small {
    color: rgba(255,255,255,.72);
    font-size: 11px;
}
.header-actions strong { font-size: 13px; }
.cart-link {
    grid-template-columns: auto auto auto !important;
    align-items: center;
    gap: 6px !important;
}
.cart-link b {
    min-width: 21px;
    height: 21px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #ffb703;
    color: #111827;
}
.category-bar {
    background: rgba(17, 31, 49, .97);
    border-top: 1px solid rgba(255,255,255,.08);
}
.category-bar .shell {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 42px;
    overflow-x: auto;
    scrollbar-width: none;
}
.category-bar a,
.category-link-button {
    color: rgba(255,255,255,.9);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.category-bar a:hover,
.category-link-button:hover { color: #fff; text-decoration: underline; }

.market-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 28px;
    align-items: center;
    border-radius: 32px;
    padding: 38px;
    overflow: hidden;
    position: relative;
}
.market-hero::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    right: -140px;
    top: -180px;
    background: radial-gradient(circle, rgba(10,132,255,.28), transparent 65%);
    pointer-events: none;
}
.market-hero h1 {
    max-width: 820px;
    margin: 0 0 14px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: .98;
    letter-spacing: -.055em;
}
.market-hero p { color: var(--muted); }
.market-search {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 10px;
    margin: 22px 0 14px;
}
.market-search.compact { margin: 0; min-width: min(620px, 100%); }
.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.hero-promise {
    min-height: 210px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    text-align: center;
    color: #fff;
    background: linear-gradient(145deg, #0A84FF, #5E5CE6);
    box-shadow: 0 24px 60px rgba(10,132,255,.3);
}
.promise-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: rgba(255,255,255,.18);
    font-size: 26px;
    font-weight: 900;
}
.hero-promise small { max-width: 170px; opacity: .82; }

.product-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 290px);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
}
.product-rail > * { scroll-snap-align: start; }

.listing-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.listing-photo {
    position: relative;
    min-height: 210px;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 70% 25%, rgba(255,255,255,.48), transparent 28%),
        linear-gradient(145deg, rgba(10,132,255,.26), rgba(94,92,230,.2)),
        var(--surface);
}
.listing-photo-brand {
    font-size: 22px;
    letter-spacing: -.02em;
}
.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e5484d !important;
    color: #fff !important;
}
.badge.plus {
    background: linear-gradient(135deg, rgba(10,132,255,.15), rgba(94,92,230,.15));
    color: #5E5CE6;
}
.rating-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.rating-line.large { font-size: 15px; }
.stars { color: #e8a317; font-weight: 900; }
.seller-line a { color: var(--accent); font-weight: 750; }
.price-block {
    display: flex;
    gap: 9px;
    align-items: baseline;
    flex-wrap: wrap;
}
.old-price {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 13px;
}
.delivery-note {
    font-size: 13px;
    color: var(--success) !important;
    font-weight: 750;
}
.card-actions form { margin: 0; }

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 13px;
}
.breadcrumbs a:hover { color: var(--accent); }

.product-detail {
    display: grid;
    grid-template-columns: minmax(300px, .9fr) minmax(320px, 1fr) 330px;
    gap: 22px;
    align-items: start;
}
.product-gallery,
.buy-box {
    border-radius: var(--radius);
    padding: 18px;
}
.product-image-main {
    min-height: 500px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background:
        radial-gradient(circle at 65% 25%, rgba(255,255,255,.5), transparent 25%),
        linear-gradient(145deg, rgba(10,132,255,.26), rgba(94,92,230,.18));
    font-size: 32px;
    font-weight: 900;
}
.product-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.product-thumbs button {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
}
.product-information h1 {
    margin: 6px 0 12px;
    font-size: clamp(32px, 4vw, 54px);
    line-height: 1.02;
    letter-spacing: -.045em;
}
.offers-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent);
    font-weight: 800;
}
.buy-box {
    position: sticky;
    top: 138px;
    display: grid;
    gap: 12px;
}
.delivery-strong { color: var(--success); font-weight: 850; }
.stock { font-weight: 850; }
.in-stock { color: var(--success); }
.out-stock { color: var(--error); }
.wide { width: 100%; }
.seller-summary {
    display: grid;
    gap: 9px;
    margin: 10px 0;
}
.seller-summary div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}
.seller-summary dt { color: var(--muted); }
.seller-summary dd { margin: 0; text-align: right; font-weight: 700; }
.offers-table { overflow: hidden; border-radius: var(--radius); }
.offer-row {
    display: grid;
    grid-template-columns: 150px minmax(220px,1fr) minmax(160px,.7fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}
.offer-row:last-child { border-bottom: 0; }
.offer-row > div { display: grid; gap: 4px; }
.offer-row small { color: var(--muted); }
.reviews-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 18px;
}
.rating-summary,
.review-list { border-radius: var(--radius); padding: 24px; }
.rating-summary {
    display: grid;
    align-content: start;
    gap: 10px;
}
.rating-summary strong { font-size: 38px; }
.review-list { display: grid; gap: 16px; }
.review { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review p { margin-bottom: 8px; }

.store-hero,
.seller-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    border-radius: var(--radius);
    padding: 30px;
}
.store-hero { justify-content: flex-start; }
.store-avatar {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 38px;
    font-weight: 900;
}
.store-hero h1,
.seller-hero h1 { margin: 4px 0 8px; font-size: 42px; }

.search-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}
.search-heading h1 { margin: 0; }
.search-layout {
    display: grid;
    grid-template-columns: 270px minmax(0,1fr);
    gap: 20px;
    align-items: start;
}
.facets {
    position: sticky;
    top: 138px;
    border-radius: var(--radius);
    padding: 20px;
}
.facet-group {
    display: grid;
    gap: 8px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--line);
}
.facet-group h3 { margin: 0; font-size: 14px; }
.check-line {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 9px;
}
.check-line input { width: auto; }
.results-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}
.results-toolbar form,
.results-toolbar label { display: flex; align-items: center; gap: 8px; }
.results-toolbar select { width: auto; min-width: 180px; }

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 340px;
    gap: 22px;
    align-items: start;
}
.cart-groups { display: grid; gap: 18px; }
.cart-vendor {
    border-radius: var(--radius);
    overflow: hidden;
}
.cart-vendor > header,
.cart-vendor > footer {
    padding: 17px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: rgba(10,132,255,.05);
}
.cart-vendor h2 { margin: 2px 0 0; }
.cart-line {
    display: grid;
    grid-template-columns: 58px minmax(180px,1fr) 130px 90px 130px auto;
    gap: 14px;
    align-items: center;
    padding: 18px 20px;
    border-top: 1px solid var(--line);
}
.cart-thumb {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 900;
}
.cart-description { display: grid; gap: 5px; }
.cart-description small { color: var(--muted); }
.quantity-form select { width: 72px; }
.free-delivery { color: var(--success); }
.order-summary {
    position: sticky;
    top: 138px;
    border-radius: var(--radius);
    padding: 22px;
}
.order-summary h2 { margin-top: 0; }
.order-summary dl { display: grid; gap: 10px; }
.order-summary dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.order-summary dd { margin: 0; text-align: right; }
.grand-total {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 19px;
    font-weight: 900;
}
.secure-note {
    margin-top: 12px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}
.checkout-steps {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 6px 0 22px;
}
.checkout-steps span {
    color: var(--muted);
    font-weight: 800;
}
.checkout-steps .active { color: var(--accent); }
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 360px;
    gap: 22px;
    align-items: start;
}
.delivery-options {
    border: 0;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.choice-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
}
.choice-card input { width: auto; margin-top: 3px; }
.choice-card span { display: grid; gap: 3px; }
.choice-card small { color: var(--muted); }
.checkout-line {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.orders-list,
.vendor-orders { display: grid; gap: 18px; }
.order-card,
.vendor-order-card {
    border-radius: var(--radius);
    overflow: hidden;
}
.order-card > header,
.vendor-order-card > header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    background: rgba(10,132,255,.06);
}
.order-card > header > div { display: grid; gap: 3px; }
.order-card small,
.vendor-order-card small { color: var(--muted); }
.order-body,
.vendor-order-body {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.order-status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(10,132,255,.1);
    color: var(--accent);
    font-size: 12px;
    font-weight: 850;
}
.tracking {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 22px;
}
.tracking-step {
    position: relative;
    display: grid;
    place-items: center;
    gap: 8px;
    text-align: center;
    color: var(--muted);
}
.tracking-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 58%;
    right: -42%;
    top: 17px;
    height: 3px;
    background: var(--line);
}
.tracking-step span {
    position: relative;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--surface-strong);
    border: 2px solid var(--line);
}
.tracking-step.done { color: var(--success); }
.tracking-step.done span {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}
.tracking-step.done:not(:last-child)::after { background: var(--success); }
.order-details-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 340px;
    gap: 22px;
    align-items: start;
}
.order-item-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 13px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.order-item-row small { display: block; color: var(--muted); margin-top: 5px; }
.timeline { display: grid; gap: 14px; }
.timeline > div {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 12px;
}
.timeline > div > span {
    width: 12px;
    height: 12px;
    margin-top: 5px;
    border-radius: 999px;
    background: var(--accent);
}
.timeline p { margin: 4px 0; color: var(--muted); }

.seller-dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 18px;
}
.seller-offer-list,
.simple-list { display: grid; }
.seller-offer-list article {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto 170px;
    gap: 15px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}
.seller-offer-list article > div { display: grid; gap: 4px; }
.seller-offer-list small { color: var(--muted); }
.stock-form { display: flex; gap: 8px; }
.stock-form input { min-width: 0; }
.simple-list a {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}
.simple-list span { display: grid; gap: 3px; }
.simple-list small { color: var(--muted); }
.payout-summary {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 14px;
}
.payout-summary div {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(10,132,255,.06);
}
.payout-summary span { color: var(--muted); }

.form-section {
    display: grid;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}
.form-section:first-child { padding-top: 0; }
.form-section:last-of-type { border-bottom: 0; }
.three { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.check-stack { display: grid; align-content: center; gap: 10px; }
.validation-summary { color: var(--error); }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.toast {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 100;
    max-width: min(390px, calc(100vw - 40px));
    padding: 14px 18px;
    border-radius: 16px;
    color: #fff;
    background: rgba(16,24,40,.94);
    box-shadow: 0 18px 50px rgba(0,0,0,.24);
    transform: translateY(30px);
    opacity: 0;
    pointer-events: none;
    transition: .22s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.site-footer {
    background: #101828;
    color: rgba(255,255,255,.82);
    padding: 48px 0 90px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3,1fr);
    gap: 30px;
}
.footer-grid > div { display: grid; align-content: start; gap: 9px; }
.footer-grid strong { color: #fff; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }

@media (prefers-reduced-transparency: reduce) {
    .glass,
    .site-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--surface-strong);
    }
    .site-header { background: #08101c; }
}

@media (max-width: 1100px) {
    .header-row { grid-template-columns: 190px 1fr; }
    .header-actions { grid-column: 1 / -1; justify-content: flex-end; padding-bottom: 10px; }
    .product-detail { grid-template-columns: 1fr 1fr; }
    .buy-box { grid-column: 1 / -1; position: static; }
    .cart-line { grid-template-columns: 54px minmax(180px,1fr) 110px 80px; }
    .cart-line > :nth-child(5),
    .cart-line > :nth-child(6) { justify-self: end; }
}

@media (max-width: 900px) {
    .site-header { position: static; }
    .header-row { grid-template-columns: 1fr auto; padding-top: 12px; padding-bottom: 12px; }
    .header-search { grid-column: 1 / -1; grid-row: 2; }
    .header-actions > a:not(.cart-link) { display: none; }
    .category-bar .shell { min-height: 46px; }
    .market-hero,
    .product-detail,
    .search-layout,
    .cart-layout,
    .checkout-layout,
    .order-details-layout,
    .seller-dashboard-grid,
    .reviews-layout {
        grid-template-columns: 1fr;
    }
    .market-hero { padding: 24px; }
    .hero-promise { min-height: 150px; }
    .product-image-main { min-height: 340px; }
    .facets,
    .order-summary,
    .buy-box { position: static; }
    .search-heading,
    .store-hero,
    .seller-hero { align-items: stretch; flex-direction: column; }
    .offer-row { grid-template-columns: 1fr 1fr; }
    .cart-line {
        grid-template-columns: 52px minmax(0,1fr);
        align-items: start;
    }
    .cart-line > *:not(.cart-thumb):not(.cart-description) { grid-column: 2; justify-self: start !important; }
    .tracking { overflow-x: auto; grid-template-columns: repeat(5,150px); }
    .three,
    .footer-grid,
    .payout-summary { grid-template-columns: 1fr; }
    .seller-offer-list article { grid-template-columns: 1fr; }
    .site-footer { padding-bottom: 120px; }
}

@media (max-width: 620px) {
    .shell { padding-left: 14px; padding-right: 14px; }
    .header-row { grid-template-columns: 1fr auto; }
    .brand small { display: none; }
    .market-search { grid-template-columns: 1fr; }
    .market-search button { width: 100%; }
    .market-hero h1 { font-size: 38px; }
    .product-information h1 { font-size: 34px; }
    .vertical-grid { grid-template-columns: 1fr 1fr; }
    .listing-grid { grid-template-columns: 1fr; }
    .offer-row { grid-template-columns: 1fr; }
    .cart-vendor > header,
    .cart-vendor > footer,
    .order-card > header,
    .order-body,
    .vendor-order-card > header,
    .vendor-order-body,
    .results-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .results-toolbar form,
    .results-toolbar label { width: 100%; }
    .results-toolbar select { width: 100%; }
    .two { grid-template-columns: 1fr; }
}


/* =========================================================
   BAZARI — LP2M APP / MICROSOFT 365 (FLUENT 2)
   Navigation inspirée de GestionBar : barre latérale par modules,
   barre de commandes, zones par rôle et badges contextuels.
   ========================================================= */

:root {
    --m365-brand: #0f6cbd;
    --m365-brand-hover: #115ea3;
    --m365-brand-pressed: #0c3b5e;
    --m365-brand-light: #ebf3fc;
    --m365-bg: #f5f5f5;
    --m365-surface: #ffffff;
    --m365-surface-muted: #fafafa;
    --m365-text: #242424;
    --m365-text-secondary: #616161;
    --m365-border: #e0e0e0;
    --m365-border-strong: #c7c7c7;
    --m365-success: #107c10;
    --m365-warning: #8a6d00;
    --m365-danger: #c50f1f;
    --m365-info: #0f6cbd;
    --m365-shadow-2: 0 1px 2px rgba(0,0,0,.08);
    --m365-shadow-4: 0 2px 4px rgba(0,0,0,.10);
    --m365-shadow-8: 0 4px 8px rgba(0,0,0,.12);
    --m365-radius-sm: 4px;
    --m365-radius: 8px;
    --m365-radius-lg: 12px;

    --bg: var(--m365-bg);
    --surface: var(--m365-surface);
    --surface-strong: var(--m365-surface);
    --text: var(--m365-text);
    --muted: var(--m365-text-secondary);
    --line: var(--m365-border);
    --accent: var(--m365-brand);
    --accent-2: var(--m365-brand-hover);
    --success: var(--m365-success);
    --error: var(--m365-danger);
    --warning: var(--m365-warning);
    --shadow: var(--m365-shadow-4);
    --radius: var(--m365-radius-lg);
    --radius-sm: var(--m365-radius);
}

html {
    color-scheme: light;
    background: var(--m365-bg);
}

body.m365-body {
    margin: 0;
    min-height: 100vh;
    color: var(--m365-text);
    background: var(--m365-bg);
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

body.m365-body::before,
body.m365-body::after {
    display: none;
}

.m365-app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    transition: grid-template-columns 160ms cubic-bezier(.33,0,.67,1);
}

.m365-sidebar {
    position: sticky;
    top: 0;
    z-index: 70;
    height: 100vh;
    min-width: 0;
    display: grid;
    grid-template-rows: 64px minmax(0,1fr) auto;
    overflow: hidden;
    color: var(--m365-text);
    background: var(--m365-surface);
    border-right: 1px solid var(--m365-border);
}

.m365-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 10px 10px 12px;
    border-bottom: 1px solid var(--m365-border);
}

.m365-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--m365-text);
}

.m365-brand-mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--m365-brand);
    box-shadow: var(--m365-shadow-2);
    font-size: 18px;
    font-weight: 700;
}

.m365-brand-copy {
    min-width: 0;
    display: grid;
    line-height: 1.1;
}

.m365-brand-copy strong {
    font-size: 16px;
    letter-spacing: .01em;
}

.m365-brand-copy small {
    margin-top: 3px;
    color: var(--m365-text-secondary);
    font-size: 11px;
}

.m365-icon-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--m365-text);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    text-decoration: none;
}

.m365-icon-button:hover {
    background: #f0f0f0;
    border-color: #ededed;
}

.m365-icon-button:focus-visible,
.m365-nav-link:focus-visible,
.m365-cart-button:focus-visible,
.m365-profile-button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--m365-brand);
    outline-offset: 2px;
}

.m365-nav {
    min-height: 0;
    overflow-y: auto;
    padding: 8px 8px 16px;
    scrollbar-width: thin;
    scrollbar-color: #c8c8c8 transparent;
}

.m365-nav-group {
    display: grid;
    gap: 2px;
    padding: 8px 0;
}

.m365-nav-group + .m365-nav-group {
    border-top: 1px solid #ededed;
}

.m365-nav-label {
    margin: 6px 10px 5px;
    color: #707070;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
}

.m365-nav-link {
    position: relative;
    min-height: 40px;
    display: grid;
    grid-template-columns: 32px minmax(0,1fr) auto;
    align-items: center;
    gap: 4px;
    padding: 4px 10px 4px 6px;
    border-radius: 6px;
    color: var(--m365-text);
    font-weight: 500;
    transition: background 100ms ease, color 100ms ease;
}

.m365-nav-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 2px;
    background: transparent;
}

.m365-nav-link:hover {
    background: #f5f5f5;
}

.m365-nav-link.is-active {
    color: var(--m365-brand-pressed);
    background: var(--m365-brand-light);
    font-weight: 600;
}

.m365-nav-link.is-active::before {
    background: var(--m365-brand);
}

.m365-nav-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #424242;
    font-size: 18px;
    line-height: 1;
}

.m365-nav-link.is-active .m365-nav-icon {
    color: var(--m365-brand);
}

.m365-nav-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.m365-nav-badge {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 10px;
    color: #fff;
    background: var(--m365-brand);
    font-size: 11px;
    font-weight: 700;
}

.m365-sidebar-account {
    min-height: 64px;
    display: grid;
    grid-template-columns: 36px minmax(0,1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border-top: 1px solid var(--m365-border);
    background: var(--m365-surface-muted);
}

.m365-avatar,
.m365-profile-avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #5b5fc7;
    font-weight: 700;
}

.m365-avatar {
    width: 34px;
    height: 34px;
}

.m365-account-copy,
.m365-profile-copy {
    min-width: 0;
    display: grid;
    line-height: 1.2;
}

.m365-account-copy strong,
.m365-profile-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.m365-account-copy small,
.m365-profile-copy small {
    margin-top: 2px;
    color: var(--m365-text-secondary);
    font-size: 11px;
}

.m365-workspace {
    min-width: 0;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto minmax(0,1fr) auto;
}

.m365-commandbar {
    position: sticky;
    top: 0;
    z-index: 60;
    min-height: 64px;
    display: grid;
    grid-template-columns: minmax(190px,auto) minmax(280px,680px) minmax(260px,auto);
    align-items: center;
    gap: 18px;
    padding: 8px 20px;
    border-bottom: 1px solid var(--m365-border);
    background: rgba(255,255,255,.96);
    box-shadow: var(--m365-shadow-2);
    backdrop-filter: blur(10px);
}

.m365-commandbar-left,
.m365-command-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-menu-button {
    display: none;
}

.m365-page-context {
    min-width: 0;
    display: grid;
    line-height: 1.15;
}

.m365-page-context span {
    color: var(--m365-text-secondary);
    font-size: 11px;
}

.m365-page-context strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
}

.m365-global-search {
    min-width: 0;
    min-height: 38px;
    display: grid;
    grid-template-columns: 24px minmax(0,1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid #c7c7c7;
    border-radius: 6px;
    background: #fff;
}

.m365-global-search:focus-within {
    border-color: var(--m365-brand);
    box-shadow: inset 0 0 0 1px var(--m365-brand);
}

.m365-global-search input {
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.m365-global-search input:focus-visible {
    outline: none;
}

.m365-global-search kbd {
    padding: 2px 6px;
    border: 1px solid #d1d1d1;
    border-radius: 4px;
    color: #707070;
    background: #f5f5f5;
    font-family: inherit;
    font-size: 10px;
}

.m365-command-actions {
    justify-content: flex-end;
}

.m365-cart-button,
.m365-profile-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--m365-text);
    background: transparent;
    font-weight: 500;
}

.m365-cart-button:hover,
.m365-profile-button:hover {
    background: #f0f0f0;
}

.m365-cart-button b {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 10px;
    color: #fff;
    background: var(--m365-brand);
    font-size: 11px;
}

.m365-profile-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}

.m365-signin {
    min-height: 36px !important;
}

.m365-content {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px 28px 88px;
}

.m365-footer {
    min-height: 48px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 10px 28px;
    border-top: 1px solid var(--m365-border);
    color: var(--m365-text-secondary);
    background: var(--m365-surface);
    font-size: 11px;
}

.m365-sidebar-backdrop {
    display: none;
}

.m365-mobile-tab {
    display: none;
}

/* Mode réduit, proche des applications métier LP2M. */
.m365-app-shell.is-collapsed {
    grid-template-columns: 72px minmax(0,1fr);
}

.m365-app-shell.is-collapsed .m365-brand-copy,
.m365-app-shell.is-collapsed .m365-nav-label,
.m365-app-shell.is-collapsed .m365-nav-text,
.m365-app-shell.is-collapsed .m365-nav-badge,
.m365-app-shell.is-collapsed .m365-account-copy {
    display: none;
}

.m365-app-shell.is-collapsed .m365-sidebar-header {
    justify-content: center;
    padding-inline: 8px;
}

.m365-app-shell.is-collapsed .m365-brand {
    justify-content: center;
}

.m365-app-shell.is-collapsed .sidebar-collapse-button {
    position: absolute;
    right: 8px;
    bottom: -44px;
    transform: rotate(180deg);
}

.m365-app-shell.is-collapsed .m365-nav-link {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 4px;
}

.m365-app-shell.is-collapsed .m365-sidebar-account {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-inline: 8px;
}

.m365-app-shell.is-collapsed .m365-sidebar-account form {
    display: none;
}

/* Fluent controls */
body.m365-body input,
body.m365-body select,
body.m365-body textarea {
    width: 100%;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--m365-border-strong);
    border-radius: 4px;
    color: var(--m365-text);
    background: #fff;
}

body.m365-body textarea {
    min-height: 108px;
}

body.m365-body input:hover,
body.m365-body select:hover,
body.m365-body textarea:hover {
    border-color: #8a8a8a;
}

body.m365-body label {
    gap: 5px;
    color: var(--m365-text);
    font-weight: 600;
}

body.m365-body .btn {
    min-height: 36px;
    padding: 7px 14px;
    border: 1px solid var(--m365-border-strong);
    border-radius: 4px;
    color: var(--m365-text);
    background: #fff;
    box-shadow: none;
    font-weight: 600;
    transition: background 100ms ease, border-color 100ms ease;
}

body.m365-body .btn:hover {
    transform: none;
    background: #f5f5f5;
    border-color: #adadad;
}

body.m365-body .btn.primary {
    color: #fff;
    background: var(--m365-brand);
    border-color: var(--m365-brand);
}

body.m365-body .btn.primary:hover {
    background: var(--m365-brand-hover);
    border-color: var(--m365-brand-hover);
}

body.m365-body .btn.secondary {
    color: var(--m365-brand-pressed);
    background: #fff;
    border-color: #b4b4b4;
}

body.m365-body .btn.ghost {
    border-color: transparent;
    color: var(--m365-brand);
    background: transparent;
}

body.m365-body .btn.small {
    min-height: 30px;
    padding: 4px 10px;
    font-size: 12px;
}

body.m365-body .glass,
body.m365-body .panel,
body.m365-body .empty,
body.m365-body .page-title,
body.m365-body .hero,
body.m365-body .listing-card,
body.m365-body .vertical-card,
body.m365-body .stat-card,
body.m365-body .kpi,
body.m365-body .buy-box,
body.m365-body .product-gallery,
body.m365-body .rating-summary,
body.m365-body .review-list,
body.m365-body .facets,
body.m365-body .search-heading,
body.m365-body .cart-vendor,
body.m365-body .cart-summary,
body.m365-body .store-hero,
body.m365-body .seller-hero {
    border: 1px solid var(--m365-border);
    border-radius: var(--m365-radius);
    background: var(--m365-surface);
    box-shadow: var(--m365-shadow-2);
    backdrop-filter: none;
}

body.m365-body .panel,
body.m365-body .empty,
body.m365-body .page-title,
body.m365-body .hero {
    padding: 20px;
    margin-bottom: 18px;
}

body.m365-body .page-title h1,
body.m365-body .hero h1 {
    margin: 0 0 8px;
    color: var(--m365-text);
    font-size: clamp(28px,4vw,42px);
    line-height: 1.08;
    letter-spacing: -.025em;
}

body.m365-body .page-title p,
body.m365-body .hero p {
    color: var(--m365-text-secondary);
    font-size: 15px;
}

body.m365-body .eyebrow {
    color: var(--m365-brand) !important;
    font-size: 11px !important;
    letter-spacing: .07em;
}

body.m365-body .notice {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.m365-messagebar {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid currentColor;
}

body.m365-body .notice.success {
    color: #0e700e;
    background: #f1faf1;
}

body.m365-body .notice.error {
    color: #a4262c;
    background: #fdf3f4;
}

body.m365-body .notice.info {
    color: #0f548c;
    background: #f0f6fc;
}

body.m365-body .pill,
body.m365-body .badge,
body.m365-body .chip {
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 3px;
    color: #0f548c;
    background: #eff6fc;
    font-size: 11px;
    font-weight: 600;
}

body.m365-body .table {
    border: 1px solid var(--m365-border);
    border-radius: 6px;
    background: #fff;
}

body.m365-body .table th {
    color: #424242;
    background: #fafafa;
    font-size: 12px;
    font-weight: 600;
}

body.m365-body .table th,
body.m365-body .table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ededed;
}

body.m365-body .table tr:hover td {
    background: #fafafa;
}

body.m365-body .section {
    margin: 22px 0;
}

body.m365-body .section-head {
    margin-bottom: 12px;
}

body.m365-body .section-head h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

body.m365-body .section-head a {
    color: var(--m365-brand);
    font-weight: 600;
}

/* Accueil marketplace au format tableau de bord Microsoft 365 */
body.m365-body .market-hero {
    min-height: 240px;
    grid-template-columns: minmax(0,1fr) 230px;
    gap: 20px;
    padding: 28px;
    border: 1px solid #cfe4fa;
    border-radius: 12px;
    background:
        linear-gradient(110deg, #ffffff 0%, #f5f9fe 65%, #eaf3fc 100%);
    box-shadow: var(--m365-shadow-2);
}

body.m365-body .market-hero::after {
    display: none;
}

body.m365-body .market-hero h1 {
    max-width: 760px;
    margin: 0 0 10px;
    color: #242424;
    font-size: clamp(34px,5vw,56px);
    line-height: 1;
    letter-spacing: -.035em;
}

body.m365-body .market-search {
    max-width: 760px;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
    margin: 18px 0 12px;
}

body.m365-body .hero-promise {
    min-height: 176px;
    border-radius: 8px;
    color: #fff;
    background: var(--m365-brand);
    box-shadow: none;
}

body.m365-body .promise-icon {
    border-radius: 8px;
    background: rgba(255,255,255,.16);
}

body.m365-body .vertical-grid {
    grid-template-columns: repeat(5,minmax(0,1fr));
}

body.m365-body .vertical-card {
    min-height: 124px;
    padding: 16px;
    box-shadow: none;
}

body.m365-body .vertical-card:hover {
    border-color: #b4b4b4;
    box-shadow: var(--m365-shadow-4);
}

body.m365-body .vertical-card .icon {
    color: var(--m365-brand);
    font-size: 24px;
}

body.m365-body .listing-grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
}

body.m365-body .listing-card {
    min-height: 100%;
    overflow: hidden;
    box-shadow: none;
    transition: box-shadow 120ms ease, border-color 120ms ease;
}

body.m365-body .listing-card:hover {
    border-color: #b4b4b4;
    box-shadow: var(--m365-shadow-8);
}

body.m365-body .listing-photo {
    min-height: 190px;
    background:
        linear-gradient(145deg, rgba(15,108,189,.10), rgba(91,95,199,.08)),
        #f7f7f7;
}

body.m365-body .listing-photo span {
    border-radius: 4px;
    color: #242424;
    background: rgba(255,255,255,.92);
    font-weight: 600;
}

body.m365-body .discount-badge {
    color: #fff !important;
    background: #c50f1f !important;
}

body.m365-body .badge.plus {
    color: #0f548c;
    background: #eff6fc;
}

body.m365-body .price,
body.m365-body .price.big {
    color: #242424;
    font-weight: 700;
}

body.m365-body .product-detail {
    grid-template-columns: minmax(300px,.9fr) minmax(320px,1fr) 330px;
}

body.m365-body .product-image-main,
body.m365-body .media-hero {
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(15,108,189,.10), rgba(91,95,199,.08)),
        #f7f7f7;
}

body.m365-body .buy-box,
body.m365-body .facets {
    top: 80px;
}

body.m365-body .offer-row,
body.m365-body .cart-line,
body.m365-body .row-card,
body.m365-body .message,
body.m365-body .attribute-list div {
    border-color: var(--m365-border);
    border-radius: 6px;
    background: #fff;
}

body.m365-body .kpi-grid {
    gap: 12px;
}

body.m365-body .kpi,
body.m365-body .stat-card {
    min-height: 124px;
    padding: 16px;
    border-left: 4px solid var(--m365-brand);
    background: #fff;
    box-shadow: none;
}

body.m365-body .kpi strong,
body.m365-body .stat-card strong {
    margin-top: 7px;
    font-size: 32px;
    font-weight: 600;
}

body.m365-body .admin-links {
    grid-template-columns: repeat(4,minmax(0,1fr));
}

body.m365-body .auth-grid {
    grid-template-columns: minmax(0,1fr) 420px;
}

body.m365-body .demo-box {
    border: 1px solid #cfe4fa;
    border-radius: 6px;
    background: #f5f9fe;
}

/* Actions rapides, proches du tableau de bord GestionBar. */
.m365-quick-actions {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 12px;
    margin: 18px 0 24px;
}

.m365-quick-action {
    min-height: 96px;
    display: grid;
    grid-template-columns: 40px minmax(0,1fr);
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--m365-border);
    border-radius: 8px;
    color: var(--m365-text);
    background: #fff;
    box-shadow: var(--m365-shadow-2);
}

.m365-quick-action:hover {
    border-color: #b4b4b4;
    box-shadow: var(--m365-shadow-4);
}

.m365-quick-action-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--m365-brand);
    font-size: 20px;
    font-weight: 600;
}

.m365-quick-action-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.m365-quick-action-copy strong {
    font-size: 14px;
    font-weight: 600;
}

.m365-quick-action-copy small {
    color: var(--m365-text-secondary);
    font-size: 12px;
}

/* Toast Fluent */
body.m365-body .toast {
    right: 18px;
    bottom: 18px;
    max-width: 420px;
    padding: 11px 14px;
    border-radius: 6px;
    box-shadow: var(--m365-shadow-8);
    font-weight: 500;
}

@media (max-width: 1280px) {
    .m365-commandbar {
        grid-template-columns: minmax(160px,auto) minmax(260px,1fr) auto;
    }

    .m365-profile-copy {
        display: none;
    }

    body.m365-body .listing-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }

    .m365-quick-actions {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 1024px) {
    .m365-app-shell,
    .m365-app-shell.is-collapsed {
        grid-template-columns: 1fr;
    }

    .m365-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(296px,88vw);
        transform: translateX(-102%);
        transition: transform 160ms cubic-bezier(.33,0,.67,1);
        box-shadow: 8px 0 32px rgba(0,0,0,.18);
    }

    .m365-app-shell.is-sidebar-open .m365-sidebar {
        transform: translateX(0);
    }

    .m365-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 65;
        display: block;
        visibility: hidden;
        opacity: 0;
        border: 0;
        background: rgba(0,0,0,.34);
        transition: opacity 160ms ease, visibility 160ms ease;
    }

    .m365-app-shell.is-sidebar-open .m365-sidebar-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .sidebar-collapse-button {
        display: none;
    }

    .mobile-menu-button {
        display: inline-grid;
    }

    .m365-commandbar {
        grid-template-columns: auto minmax(220px,1fr) auto;
        padding-inline: 12px;
    }

    .m365-page-context {
        display: none;
    }

    body.m365-body .product-detail,
    body.m365-body .detail-grid,
    body.m365-body .auth-grid,
    body.m365-body .layout-two,
    body.m365-body .search-layout,
    body.m365-body .cart-layout,
    body.m365-body .reviews-layout {
        grid-template-columns: 1fr;
    }

    body.m365-body .buy-box,
    body.m365-body .facets {
        position: static;
    }

    body.m365-body .vertical-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

@media (max-width: 760px) {
    .m365-commandbar {
        min-height: 56px;
        grid-template-columns: auto minmax(0,1fr) auto;
        gap: 8px;
    }

    .m365-global-search {
        min-height: 36px;
    }

    .m365-global-search kbd,
    .m365-command-actions > .m365-icon-button,
    .m365-profile-button,
    .m365-cart-button span:not(:first-child),
    .m365-signin {
        display: none;
    }

    .m365-cart-button {
        width: 38px;
        min-width: 38px;
        justify-content: center;
        padding: 0;
    }

    .m365-cart-button b {
        position: absolute;
        transform: translate(13px,-12px);
    }

    .m365-content {
        padding: 16px 14px 96px;
    }

    .m365-footer {
        display: none;
    }

    .m365-mobile-tab {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: max(8px,env(safe-area-inset-bottom));
        z-index: 75;
        display: grid;
        grid-template-columns: repeat(5,1fr);
        align-items: end;
        padding: 7px 6px;
        border: 1px solid #d6d6d6;
        border-radius: 10px;
        background: rgba(255,255,255,.98);
        box-shadow: 0 8px 28px rgba(0,0,0,.20);
    }

    .m365-mobile-tab a {
        position: relative;
        min-width: 0;
        min-height: 44px;
        display: grid;
        place-items: center;
        align-content: center;
        gap: 1px;
        border-radius: 6px;
        color: #616161;
        font-weight: 500;
    }

    .m365-mobile-tab a.is-active {
        color: var(--m365-brand);
        background: var(--m365-brand-light);
    }

    .m365-mobile-tab span {
        font-size: 18px;
    }

    .m365-mobile-tab small {
        font-size: 10px;
    }

    .m365-mobile-tab b {
        position: absolute;
        top: 2px;
        right: 12px;
        min-width: 17px;
        height: 17px;
        display: grid;
        place-items: center;
        padding: 0 4px;
        border-radius: 9px;
        color: #fff;
        background: var(--m365-brand);
        font-size: 9px;
    }

    .m365-mobile-tab .m365-mobile-primary {
        color: #fff;
        background: var(--m365-brand);
    }

    body.m365-body .market-hero {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    body.m365-body .market-hero h1 {
        font-size: 36px;
    }

    body.m365-body .hero-promise {
        min-height: 120px;
    }

    body.m365-body .market-search {
        grid-template-columns: 1fr;
    }

    body.m365-body .vertical-grid,
    body.m365-body .listing-grid,
    body.m365-body .admin-links,
    body.m365-body .kpi-grid,
    .m365-quick-actions {
        grid-template-columns: 1fr;
    }

    body.m365-body .product-rail {
        grid-auto-columns: minmax(220px,80vw);
    }

    body.m365-body .form-grid,
    body.m365-body .dynamic-attrs,
    body.m365-body .two {
        grid-template-columns: 1fr;
    }

    body.m365-body .offer-row {
        grid-template-columns: 1fr;
    }

    body.m365-body .cart-line {
        grid-template-columns: 46px minmax(0,1fr);
    }

    body.m365-body .cart-line > *:not(:first-child):not(:nth-child(2)) {
        grid-column: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
