/* ==========================================================================
   AliDja Market — Design system
   Palette issue du logo (cahier des charges, annexe A)
   ========================================================================== */
:root {
    --ad-primary: #1D4ED8;
    --ad-primary-600: #1E40AF;
    --ad-primary-700: #1E3A8A;
    --ad-cyan: #0EA5E9;
    --ad-sky: #38BDF8;
    --ad-navy: #0B1B3F;
    --ad-navy-2: #17365D;
    --ad-light: #DBEAFE;
    --ad-lighter: #EFF6FF;
    --ad-bg: #F8FAFC;
    --ad-surface: #FFFFFF;
    --ad-text: #172033;
    --ad-muted: #64748B;
    --ad-border: #E2E8F0;
    --ad-success: #16A34A;
    --ad-warning: #D97706;
    --ad-danger: #DC2626;
    --ad-gradient: linear-gradient(135deg, #1D4ED8 0%, #2563EB 45%, #0EA5E9 100%);
    --ad-gradient-dark: linear-gradient(135deg, #0B1B3F 0%, #17365D 55%, #1E3A8A 100%);
    --ad-radius: 16px;
    --ad-radius-sm: 10px;
    --ad-radius-lg: 24px;
    --ad-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
    --ad-shadow: 0 4px 6px -1px rgba(15, 23, 42, .06), 0 10px 24px -4px rgba(15, 23, 42, .08);
    --ad-shadow-lg: 0 20px 50px -12px rgba(29, 78, 216, .28);

    --bs-primary: #1D4ED8;
    --bs-primary-rgb: 29, 78, 216;
    --bs-link-color: #1D4ED8;
    --bs-link-color-rgb: 29, 78, 216;
    --bs-link-hover-color: #1E40AF;
    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: #172033;
    --bs-body-bg: #F8FAFC;
    --bs-border-color: #E2E8F0;
    --bs-border-radius: 10px;
    --bs-border-radius-lg: 16px;
    --bs-secondary-color: #64748B;
    --bs-success-rgb: 22, 163, 74;
    --bs-info-rgb: 14, 165, 233;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--bs-body-font-family);
    background: var(--ad-bg);
    color: var(--ad-text);
    -webkit-font-smoothing: antialiased;
    font-size: .95rem;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 800; letter-spacing: -.02em; color: var(--ad-text); }
a { text-decoration: none; }
.text-muted { color: var(--ad-muted) !important; }
.fw-extrabold { font-weight: 800; }
.text-gradient {
    background: var(--ad-gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-primary { color: var(--ad-primary) !important; }
.bg-primary-subtle { background: var(--ad-lighter) !important; }
.small-caps { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; }
::selection { background: var(--ad-light); }

/* ---------- Boutons ---------- */
.btn { font-weight: 600; border-radius: 12px; padding: .6rem 1.15rem; transition: all .2s ease; }
.btn-sm { padding: .4rem .8rem; border-radius: 9px; font-size: .84rem; }
.btn-lg { padding: .85rem 1.6rem; border-radius: 14px; font-size: 1rem; }
.btn-primary {
    --bs-btn-bg: var(--ad-primary); --bs-btn-border-color: var(--ad-primary);
    --bs-btn-hover-bg: var(--ad-primary-600); --bs-btn-hover-border-color: var(--ad-primary-600);
    --bs-btn-active-bg: var(--ad-primary-700); --bs-btn-active-border-color: var(--ad-primary-700);
    --bs-btn-disabled-bg: #93C5FD; --bs-btn-disabled-border-color: #93C5FD;
    box-shadow: 0 6px 16px -6px rgba(29, 78, 216, .55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(29, 78, 216, .6); }
.btn-gradient {
    background: var(--ad-gradient); color: #fff; border: 0;
    box-shadow: 0 8px 20px -8px rgba(14, 165, 233, .7);
}
.btn-gradient:hover { color: #fff; filter: brightness(1.07); transform: translateY(-1px); }
.btn-outline-primary {
    --bs-btn-color: var(--ad-primary); --bs-btn-border-color: #BFDBFE;
    --bs-btn-hover-bg: var(--ad-lighter); --bs-btn-hover-color: var(--ad-primary-600); --bs-btn-hover-border-color: #93C5FD;
    --bs-btn-active-bg: var(--ad-light); --bs-btn-active-color: var(--ad-primary-700);
}
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--ad-border); --bs-btn-hover-bg: var(--ad-lighter); --bs-btn-hover-border-color: #BFDBFE; }
.btn-soft { background: var(--ad-lighter); color: var(--ad-primary); border: 0; }
.btn-soft:hover { background: var(--ad-light); color: var(--ad-primary-600); }
.btn-white { background: #fff; color: var(--ad-primary); border: 0; }
.btn-white:hover { background: var(--ad-lighter); color: var(--ad-primary-600); }
.btn-icon { width: 42px; height: 42px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; }

/* ---------- Formulaires ---------- */
.form-control, .form-select {
    border-radius: 12px; border-color: var(--ad-border); padding: .65rem .95rem; font-size: .93rem;
    background-color: #fff; transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus { border-color: #60A5FA; box-shadow: 0 0 0 4px rgba(59, 130, 246, .15); }
.form-label { font-weight: 600; font-size: .85rem; margin-bottom: .4rem; color: #334155; }
.form-text { color: var(--ad-muted); font-size: .8rem; }
.form-check-input:checked { background-color: var(--ad-primary); border-color: var(--ad-primary); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(59, 130, 246, .15); }
.input-group-text { border-radius: 12px; background: var(--ad-bg); border-color: var(--ad-border); color: var(--ad-muted); }
.invalid-feedback { font-weight: 500; }

/* ---------- Cartes génériques ---------- */
.card-ad {
    background: var(--ad-surface); border: 1px solid var(--ad-border); border-radius: var(--ad-radius);
    box-shadow: var(--ad-shadow-sm);
}
.card-ad .card-ad-header { padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--ad-border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-ad .card-ad-body { padding: 1.35rem; }
.card-ad-title { font-size: 1rem; font-weight: 800; margin: 0; }
.hover-lift { transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--ad-shadow); border-color: #BFDBFE; }

/* ---------- Badges ---------- */
.badge { font-weight: 700; border-radius: 999px; padding: .38em .75em; letter-spacing: .01em; }
.badge-soft-success { background: #DCFCE7; color: #166534; }
.badge-soft-warning { background: #FEF3C7; color: #92400E; }
.badge-soft-danger { background: #FEE2E2; color: #991B1B; }
.badge-soft-info { background: #E0F2FE; color: #075985; }
.badge-soft-primary { background: var(--ad-light); color: var(--ad-primary-700); }
.badge-soft-secondary { background: #F1F5F9; color: #475569; }

/* ---------- Topbar & navigation ---------- */
.topbar { background: var(--ad-navy); color: #CBD5E1; font-size: .78rem; }
.topbar a { color: #E2E8F0; }
.topbar a:hover { color: #fff; }
.topbar .sep { opacity: .35; margin: 0 .6rem; }

.site-header { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--ad-border); position: sticky; top: 0; z-index: 1030; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ad-text); }
.brand img { height: 42px; width: auto; }
.brand-name { font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em; line-height: 1; color: var(--ad-primary-700); }
.brand-name span { color: var(--ad-cyan); }
.brand-tag { display: block; font-size: .58rem; font-weight: 700; letter-spacing: .38em; color: var(--ad-cyan); margin-top: 3px; }

.search-bar { display: flex; background: var(--ad-bg); border: 1.5px solid var(--ad-border); border-radius: 14px; overflow: hidden; transition: all .2s; }
.search-bar:focus-within { border-color: #60A5FA; background: #fff; box-shadow: 0 0 0 4px rgba(59, 130, 246, .12); }
.search-bar select { border: 0; background: transparent; padding: 0 .9rem; font-size: .85rem; font-weight: 600; color: #334155; max-width: 170px; border-right: 1px solid var(--ad-border); outline: none; }
.search-bar input { flex: 1; border: 0; background: transparent; padding: .7rem 1rem; outline: none; font-size: .93rem; min-width: 0; }
.search-bar button { border: 0; background: var(--ad-gradient); color: #fff; padding: 0 1.25rem; font-weight: 700; }

.header-action { display: flex; flex-direction: column; align-items: center; color: #334155; font-size: .72rem; font-weight: 600; position: relative; padding: .25rem .6rem; border-radius: 12px; transition: background .15s; }
.header-action i { font-size: 1.35rem; line-height: 1.1; }
.header-action:hover { background: var(--ad-lighter); color: var(--ad-primary); }
.cart-badge { position: absolute; top: -2px; right: 2px; min-width: 19px; height: 19px; border-radius: 999px; background: #F43F5E; color: #fff; font-size: .68rem; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 5px; border: 2px solid #fff; }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--ad-gradient); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; flex-shrink: 0; }
.avatar-lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.3rem; }

.cat-nav { background: #fff; border-bottom: 1px solid var(--ad-border); }
.cat-nav-inner { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; padding: .45rem 0; }
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav a { white-space: nowrap; color: #475569; font-weight: 600; font-size: .84rem; padding: .42rem .85rem; border-radius: 10px; display: inline-flex; align-items: center; gap: .4rem; transition: all .15s; }
.cat-nav a:hover, .cat-nav a.active { background: var(--ad-lighter); color: var(--ad-primary); }

.dropdown-menu { border: 1px solid var(--ad-border); border-radius: 14px; box-shadow: var(--ad-shadow); padding: .45rem; }
.dropdown-item { border-radius: 9px; padding: .5rem .8rem; font-weight: 500; font-size: .9rem; display: flex; align-items: center; gap: .6rem; }
.dropdown-item i { color: var(--ad-muted); width: 18px; }
.dropdown-item:hover { background: var(--ad-lighter); color: var(--ad-primary); }
.dropdown-item:hover i { color: var(--ad-primary); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--ad-gradient-dark); color: #fff; border-radius: 0 0 36px 36px; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.hero::before { width: 520px; height: 520px; background: #2563EB; top: -180px; right: -120px; }
.hero::after { width: 420px; height: 420px; background: #0EA5E9; bottom: -220px; left: -120px; opacity: .4; }
.hero .grid-pattern { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%); }
.hero-content { position: relative; z-index: 2; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.05; letter-spacing: -.035em; }
.hero h1 .hl { background: linear-gradient(90deg, #7DD3FC, #38BDF8, #A5F3FC); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-lead { color: #BFDBFE; font-size: 1.1rem; max-width: 540px; }
.hero-pill { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #E0F2FE; padding: .4rem .9rem; border-radius: 999px; font-size: .8rem; font-weight: 600; backdrop-filter: blur(6px); }
.hero-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .25); }
.hero-search { background: #fff; border-radius: 18px; padding: .45rem; display: flex; gap: .4rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,.45); max-width: 580px; }
.hero-search input { border: 0; outline: none; flex: 1; padding: .6rem .9rem; font-size: 1rem; min-width: 0; color: var(--ad-text); }
.hero-search i { color: var(--ad-muted); align-self: center; padding-left: .7rem; font-size: 1.1rem; }
.hero-stats .num { font-size: 1.7rem; font-weight: 800; color: #fff; line-height: 1; }
.hero-stats .lbl { color: #93C5FD; font-size: .8rem; font-weight: 500; }
.hero-visual { position: relative; height: 430px; }
.hero-logo-glow { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 260px; height: 260px; border-radius: 60px; background: rgba(255,255,255,.96); display: flex; align-items: center; justify-content: center; box-shadow: 0 40px 80px -20px rgba(14, 165, 233, .55), inset 0 0 0 1px rgba(255,255,255,.6); animation: float 6s ease-in-out infinite; }
.hero-logo-glow img { width: 78%; }
.float-card { position: absolute; background: rgba(255,255,255,.97); color: var(--ad-text); border-radius: 18px; padding: .8rem 1rem; box-shadow: 0 20px 40px -12px rgba(0,0,0,.35); display: flex; align-items: center; gap: .75rem; font-size: .85rem; }
.float-card .ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.float-card strong { display: block; font-size: .9rem; }
.float-card small { color: var(--ad-muted); }
.fc-1 { top: 6%; left: 0; animation: float 7s ease-in-out infinite; }
.fc-2 { top: 18%; right: 0; animation: float 8s ease-in-out infinite .8s; }
.fc-3 { bottom: 10%; left: 6%; animation: float 6.5s ease-in-out infinite .4s; }
.fc-4 { bottom: 4%; right: 4%; animation: float 7.5s ease-in-out infinite 1.2s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.section-title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 0; }
.section-kicker { color: var(--ad-primary); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: .35rem; display: inline-flex; align-items: center; gap: .4rem; }
.link-arrow { font-weight: 700; display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.link-arrow i { transition: transform .2s; }
.link-arrow:hover i { transform: translateX(4px); }

/* ---------- Catégories ---------- */
.cat-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .7rem; padding: 1.4rem .8rem 1.2rem; background: #fff; border: 1px solid var(--ad-border); border-radius: var(--ad-radius); color: var(--ad-text); height: 100%; transition: all .25s ease; }
.cat-tile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 35%, transparent); box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--c) 55%, transparent); color: var(--ad-text); }
.cat-icon { width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); transition: all .25s; }
.cat-tile:hover .cat-icon { background: var(--c); color: #fff; transform: scale(1.06) rotate(-4deg); }
.cat-tile .name { font-weight: 700; font-size: .88rem; line-height: 1.25; }
.cat-tile .count { font-size: .75rem; color: var(--ad-muted); }

/* ---------- Carte produit ---------- */
.product-card { background: #fff; border: 1px solid var(--ad-border); border-radius: var(--ad-radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: all .25s ease; position: relative; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 22px 40px -18px rgba(29, 78, 216, .35); border-color: #BFDBFE; }
.product-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #F1F5F9; display: block; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .product-media img, .product-card:hover .ph-icon { transform: scale(1.06); }
.ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
    background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 22%, #fff) 0%, color-mix(in srgb, var(--c) 8%, #fff) 55%, #fff 100%); position: relative; }
.ph::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--c) 18%, transparent) 1px, transparent 1px); background-size: 16px 16px; opacity: .6; mask-image: linear-gradient(to bottom, transparent, #000); }
.ph-icon { font-size: 3.2rem; color: var(--c); transition: transform .5s ease; position: relative; z-index: 1; filter: drop-shadow(0 10px 14px color-mix(in srgb, var(--c) 35%, transparent)); }
.ph-label { position: relative; z-index: 1; font-size: .7rem; font-weight: 700; color: color-mix(in srgb, var(--c) 80%, #000); text-transform: uppercase; letter-spacing: .12em; opacity: .7; padding: 0 1rem; text-align: center; }
.ph-lg .ph-icon { font-size: 7rem; }
.product-badges { position: absolute; top: .7rem; left: .7rem; display: flex; flex-direction: column; gap: .3rem; z-index: 2; }
.badge-discount { background: #F43F5E; color: #fff; font-weight: 800; font-size: .72rem; border-radius: 8px; padding: .3rem .5rem; box-shadow: 0 4px 10px -2px rgba(244, 63, 94, .5); }
.badge-low { background: #FEF3C7; color: #92400E; font-weight: 700; font-size: .7rem; border-radius: 8px; padding: .28rem .5rem; }
.badge-out { background: rgba(15, 23, 42, .78); color: #fff; font-weight: 700; font-size: .7rem; border-radius: 8px; padding: .28rem .5rem; }
.product-body { padding: .95rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.product-shop { font-size: .74rem; color: var(--ad-muted); font-weight: 600; display: flex; align-items: center; gap: .3rem; margin-bottom: .3rem; }
.product-shop i { color: var(--ad-cyan); }
.product-name { font-weight: 700; font-size: .92rem; color: var(--ad-text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.product-name:hover { color: var(--ad-primary); }
.price { font-weight: 800; color: var(--ad-primary-700); font-size: 1.08rem; letter-spacing: -.01em; white-space: nowrap; }
.price-old { color: #94A3B8; text-decoration: line-through; font-size: .8rem; font-weight: 500; white-space: nowrap; }
.btn-add { width: 40px; height: 40px; border-radius: 12px; background: var(--ad-lighter); color: var(--ad-primary); border: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: all .2s; flex-shrink: 0; }
.btn-add:hover { background: var(--ad-gradient); color: #fff; transform: scale(1.07); }

/* ---------- Bandeaux ---------- */
.value-item { display: flex; gap: .9rem; align-items: flex-start; }
.value-icon { width: 50px; height: 50px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; background: var(--ad-lighter); color: var(--ad-primary); }
.value-item h6 { margin: 0 0 .15rem; font-size: .95rem; }
.value-item p { margin: 0; color: var(--ad-muted); font-size: .84rem; }
.promo-banner { position: relative; overflow: hidden; border-radius: var(--ad-radius-lg); background: var(--ad-gradient); color: #fff; padding: 2.6rem; }
.promo-banner::before { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.1); right: -100px; top: -140px; }
.promo-banner::after { content: ''; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.08); right: 140px; bottom: -150px; }
.promo-banner > * { position: relative; z-index: 1; }
.promo-banner h2, .promo-banner h3 { color: #fff; }
.promo-dark { background: var(--ad-gradient-dark); }

.shop-card { background: #fff; border: 1px solid var(--ad-border); border-radius: var(--ad-radius); padding: 1.3rem; display: flex; gap: 1rem; align-items: center; color: var(--ad-text); height: 100%; transition: all .25s; }
.shop-card:hover { color: var(--ad-text); transform: translateY(-3px); box-shadow: var(--ad-shadow); border-color: #BFDBFE; }
.shop-logo { width: 60px; height: 60px; border-radius: 16px; object-fit: cover; flex-shrink: 0; background: var(--ad-gradient); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.15rem; }
.shop-logo-xl { width: 104px; height: 104px; border-radius: 26px; font-size: 2rem; border: 5px solid #fff; box-shadow: var(--ad-shadow); }
.verified { color: var(--ad-cyan); }

/* ---------- Pages internes ---------- */
.page-hero { background: var(--ad-gradient-dark); color: #fff; padding: 2.6rem 0 2.4rem; position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: #2563EB; filter: blur(90px); opacity: .45; right: -100px; top: -200px; }
.page-hero > .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0; }
.page-hero p { color: #BFDBFE; margin: .4rem 0 0; }
.breadcrumb { font-size: .8rem; margin-bottom: .6rem; }
.page-hero .breadcrumb-item a { color: #93C5FD; }
.page-hero .breadcrumb-item.active, .page-hero .breadcrumb-item + .breadcrumb-item::before { color: #CBD5E1; }

.filter-card { position: sticky; top: 140px; }
.filter-group + .filter-group { border-top: 1px solid var(--ad-border); padding-top: 1.1rem; margin-top: 1.1rem; }
.filter-title { font-weight: 800; font-size: .85rem; margin-bottom: .7rem; }
.filter-cat { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 10px; color: #334155; font-weight: 500; font-size: .88rem; }
.filter-cat:hover { background: var(--ad-bg); color: var(--ad-primary); }
.filter-cat.active { background: var(--ad-lighter); color: var(--ad-primary); font-weight: 700; }
.filter-cat i { color: var(--c, var(--ad-muted)); }

.gallery-main { aspect-ratio: 1/1; border-radius: var(--ad-radius-lg); overflow: hidden; background: #F1F5F9; border: 1px solid var(--ad-border); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb { width: 74px; height: 74px; border-radius: 14px; overflow: hidden; border: 2px solid transparent; cursor: pointer; opacity: .7; transition: all .2s; padding: 0; background: none; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--ad-primary); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.price-xl { font-size: 2.1rem; font-weight: 800; color: var(--ad-primary-700); letter-spacing: -.03em; }
.qty-input { display: inline-flex; align-items: center; border: 1.5px solid var(--ad-border); border-radius: 12px; overflow: hidden; background: #fff; }
.qty-input button { border: 0; background: transparent; width: 40px; height: 44px; font-size: 1.1rem; color: #334155; }
.qty-input button:hover { background: var(--ad-lighter); color: var(--ad-primary); }
.qty-input input { width: 52px; border: 0; text-align: center; font-weight: 700; outline: none; -moz-appearance: textfield; }
.qty-input input::-webkit-outer-spin-button, .qty-input input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-input.sm button { width: 32px; height: 36px; }
.qty-input.sm input { width: 38px; }
.info-list li { display: flex; gap: .7rem; padding: .55rem 0; font-size: .88rem; }
.info-list li + li { border-top: 1px dashed var(--ad-border); }
.info-list i { color: var(--ad-primary); font-size: 1.05rem; }
.prose { line-height: 1.75; color: #334155; }
.prose h2 { font-size: 1.25rem; margin-top: 2rem; }

/* ---------- Panier & commande ---------- */
.cart-line { display: flex; gap: 1rem; padding: 1.1rem 0; }
.cart-line + .cart-line { border-top: 1px solid var(--ad-border); }
.cart-thumb { width: 84px; height: 84px; border-radius: 14px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--ad-border); }
.cart-thumb .ph-icon { font-size: 1.8rem; }
.cart-thumb .ph-label { display: none; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.summary-card { position: sticky; top: 140px; }
.summary-row { display: flex; justify-content: space-between; padding: .4rem 0; font-size: .92rem; }
.summary-total { border-top: 1px solid var(--ad-border); margin-top: .5rem; padding-top: .9rem; font-weight: 800; font-size: 1.15rem; }
.summary-total .amount { color: var(--ad-primary-700); font-size: 1.35rem; }
.option-card { display: block; border: 1.5px solid var(--ad-border); border-radius: 14px; padding: .9rem 1rem; cursor: pointer; transition: all .15s; background: #fff; position: relative; height: 100%; }
.option-card:hover { border-color: #93C5FD; }
.option-card:has(input:checked) { border-color: var(--ad-primary); background: var(--ad-lighter); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card .check { position: absolute; top: .8rem; right: .8rem; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #CBD5E1; transition: all .15s; }
.option-card:has(input:checked) .check { border-color: var(--ad-primary); background: var(--ad-primary); box-shadow: inset 0 0 0 3px #fff; }
.steps { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: .5rem; color: #94A3B8; font-weight: 600; font-size: .85rem; }
.step .n { width: 28px; height: 28px; border-radius: 50%; border: 2px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800; }
.step.done, .step.current { color: #fff; }
.step.current .n { background: #fff; color: var(--ad-primary); border-color: #fff; }
.step.done .n { background: rgba(255,255,255,.2); border-color: transparent; }
.step-sep { width: 34px; height: 2px; background: rgba(255,255,255,.25); border-radius: 2px; }
.shop-group-head { display: flex; align-items: center; gap: .7rem; padding-bottom: .9rem; border-bottom: 1px solid var(--ad-border); }

/* Timeline commande */
.tracker { display: flex; justify-content: space-between; position: relative; margin: .5rem 0 .2rem; }
.tracker::before { content: ''; position: absolute; top: 17px; left: 8%; right: 8%; height: 3px; background: var(--ad-border); border-radius: 3px; }
.tracker .progress-line { position: absolute; top: 17px; left: 8%; height: 3px; background: var(--ad-gradient); border-radius: 3px; transition: width .6s; }
.tracker-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; flex: 1; text-align: center; font-size: .74rem; font-weight: 600; color: #94A3B8; }
.tracker-step .dot { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 3px solid var(--ad-border); display: flex; align-items: center; justify-content: center; font-size: .95rem; }
.tracker-step.done { color: var(--ad-text); }
.tracker-step.done .dot { background: var(--ad-primary); border-color: var(--ad-primary); color: #fff; }
.tracker-step.current .dot { box-shadow: 0 0 0 6px rgba(29, 78, 216, .15); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1.1rem 1.8rem; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: var(--ad-border); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--ad-primary); }
.timeline .t-title { font-weight: 700; font-size: .88rem; }
.timeline .t-meta { font-size: .76rem; color: var(--ad-muted); }

/* ---------- Authentification ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 992px) { .auth-wrap { grid-template-columns: 1.05fr 1fr; } }
.auth-aside { background: var(--ad-gradient-dark); color: #fff; padding: 3rem; position: relative; overflow: hidden; display: none; }
@media (min-width: 992px) { .auth-aside { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-aside::before { content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%; background: #2563EB; filter: blur(100px); opacity: .5; top: -150px; right: -150px; }
.auth-aside::after { content: ''; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: #0EA5E9; filter: blur(100px); opacity: .35; bottom: -120px; left: -80px; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside h2 { color: #fff; font-size: 2.3rem; line-height: 1.12; }
.auth-aside .lead { color: #BFDBFE; }
.auth-feature { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; color: #E0F2FE; }
.auth-feature i { width: 44px; height: 44px; border-radius: 13px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; background: #fff; }
.auth-box { width: 100%; max-width: 440px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ad-navy); color: #94A3B8; margin-top: 4rem; position: relative; overflow: hidden; }
.site-footer::before { content: ''; position: absolute; width: 600px; height: 300px; background: #1D4ED8; filter: blur(140px); opacity: .25; top: -150px; left: 30%; }
.site-footer > * { position: relative; }
.site-footer h6 { color: #fff; font-size: .9rem; margin-bottom: 1rem; }
.site-footer a { color: #94A3B8; font-size: .88rem; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.footer-brand { background: #fff; border-radius: 16px; padding: .5rem .8rem; display: inline-flex; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); font-size: .8rem; }
.pay-chip { display: inline-flex; align-items: center; gap: .35rem; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #E2E8F0; border-radius: 10px; padding: .35rem .7rem; font-size: .76rem; font-weight: 600; }
.social { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; color: #fff !important; transition: all .2s; }
.social:hover { background: var(--ad-primary); transform: translateY(-2px); }

/* ---------- Alertes / toasts ---------- */
.alert { border: 0; border-radius: 14px; font-weight: 500; display: flex; gap: .7rem; align-items: flex-start; }
.alert i { font-size: 1.1rem; line-height: 1.3; }
.alert-success { background: #DCFCE7; color: #14532D; }
.alert-danger { background: #FEE2E2; color: #7F1D1D; }
.alert-warning { background: #FEF3C7; color: #78350F; }
.alert-info { background: #E0F2FE; color: #0C4A6E; }
.toast-zone { position: fixed; top: 90px; right: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .6rem; max-width: 380px; }
.toast-ad { background: #fff; border-radius: 16px; box-shadow: 0 20px 40px -12px rgba(15,23,42,.3); padding: .9rem 1rem; display: flex; gap: .8rem; align-items: center; border: 1px solid var(--ad-border); animation: toastIn .35s cubic-bezier(.2,.9,.3,1.2); }
.toast-ad .ic { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: 3.5rem 1.5rem; }
.empty-state .ic { width: 88px; height: 88px; border-radius: 28px; background: var(--ad-lighter); color: var(--ad-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 2.3rem; margin-bottom: 1.1rem; }

/* ---------- Pagination ---------- */
.pagination { gap: .3rem; }
.page-link { border-radius: 10px !important; border: 1px solid var(--ad-border); color: #334155; font-weight: 600; min-width: 40px; text-align: center; }
.page-item.active .page-link { background: var(--ad-primary); border-color: var(--ad-primary); }

/* ==========================================================================
   Tableaux de bord (vendeur / admin)
   ========================================================================== */
.dash { display: flex; min-height: 100vh; }
.dash-sidebar { width: 270px; flex-shrink: 0; background: var(--ad-navy); color: #94A3B8; position: fixed; top: 0; bottom: 0; left: 0; z-index: 1040; display: flex; flex-direction: column; transition: transform .3s ease; }
.dash-sidebar::before { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: #1D4ED8; filter: blur(110px); opacity: .35; top: -100px; left: -100px; pointer-events: none; }
.dash-brand { padding: 1.3rem 1.4rem; display: flex; align-items: center; gap: .6rem; position: relative; }
.dash-brand .logo-box { background: #fff; border-radius: 12px; padding: 5px; display: flex; }
.dash-brand img { height: 32px; }
.dash-brand .name { color: #fff; font-weight: 800; font-size: 1.1rem; line-height: 1; }
.dash-brand .role { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ad-sky); font-weight: 700; }
.dash-nav { padding: .5rem .9rem; overflow-y: auto; flex: 1; position: relative; }
.dash-nav .label { font-size: .66rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: #64748B; padding: 1rem .7rem .45rem; }
.dash-nav a { display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 11px; color: #CBD5E1; font-weight: 500; font-size: .9rem; margin-bottom: 2px; transition: all .15s; }
.dash-nav a i { font-size: 1.08rem; width: 20px; color: #64748B; transition: color .15s; }
.dash-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.dash-nav a:hover i { color: var(--ad-sky); }
.dash-nav a.active { background: linear-gradient(90deg, rgba(29, 78, 216, .9), rgba(14, 165, 233, .55)); color: #fff; font-weight: 600; box-shadow: 0 8px 20px -10px rgba(14, 165, 233, .8); }
.dash-nav a.active i { color: #fff; }
.dash-nav .count { margin-left: auto; background: #F43F5E; color: #fff; font-size: .68rem; font-weight: 800; border-radius: 999px; padding: .1rem .5rem; }
.dash-user { padding: 1rem 1.2rem; border-top: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: .7rem; position: relative; }
.dash-user .n { color: #fff; font-weight: 700; font-size: .86rem; line-height: 1.2; }
.dash-main { flex: 1; margin-left: 270px; min-width: 0; }
.dash-topbar { height: 70px; background: rgba(248, 250, 252, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--ad-border); display: flex; align-items: center; padding: 0 1.75rem; gap: 1rem; position: sticky; top: 0; z-index: 1020; }
.dash-content { padding: 1.75rem; }
.dash-title { font-size: 1.5rem; margin: 0; }
.dash-sub { color: var(--ad-muted); margin: .2rem 0 0; font-size: .9rem; }
@media (max-width: 991.98px) {
    .dash-sidebar { transform: translateX(-100%); }
    .dash-sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .45); }
    .dash-main { margin-left: 0; }
    .dash-content { padding: 1.1rem; }
    .dash-topbar { padding: 0 1rem; }
}

.stat-card { background: #fff; border: 1px solid var(--ad-border); border-radius: var(--ad-radius); padding: 1.25rem 1.3rem; height: 100%; position: relative; overflow: hidden; }
.stat-card .ic { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.stat-card .val { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: .9rem; }
.stat-card .lbl { color: var(--ad-muted); font-size: .82rem; font-weight: 500; }
.stat-card.featured { background: var(--ad-gradient); color: #fff; border: 0; box-shadow: var(--ad-shadow-lg); }
.stat-card.featured .lbl { color: #DBEAFE; }
.stat-card.featured .ic { background: rgba(255,255,255,.18); color: #fff; }
.stat-card.featured::after { content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.1); right: -50px; bottom: -70px; }
.ic-blue { background: var(--ad-lighter); color: var(--ad-primary); }
.ic-green { background: #DCFCE7; color: #16A34A; }
.ic-amber { background: #FEF3C7; color: #D97706; }
.ic-rose { background: #FFE4E6; color: #E11D48; }
.ic-violet { background: #EDE9FE; color: #7C3AED; }
.ic-cyan { background: #CFFAFE; color: #0891B2; }

.table-ad { margin: 0; font-size: .88rem; }
.table-ad thead th { background: var(--ad-bg); color: var(--ad-muted); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--ad-border); padding: .8rem 1rem; white-space: nowrap; }
.table-ad td { padding: .85rem 1rem; vertical-align: middle; border-color: var(--ad-border); }
.table-ad tbody tr { transition: background .12s; }
.table-ad tbody tr:hover { background: #F8FAFF; }
.table-thumb { width: 46px; height: 46px; border-radius: 11px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--ad-border); }
.table-thumb img { width: 100%; height: 100%; object-fit: cover; }
.table-thumb .ph-icon { font-size: 1.15rem; }
.table-thumb .ph-label { display: none; }
.tabs-pill { display: flex; gap: .35rem; flex-wrap: wrap; }
.tabs-pill a { padding: .45rem .9rem; border-radius: 10px; color: #475569; font-weight: 600; font-size: .85rem; background: #fff; border: 1px solid var(--ad-border); display: inline-flex; align-items: center; gap: .4rem; }
.tabs-pill a:hover { border-color: #93C5FD; color: var(--ad-primary); }
.tabs-pill a.active { background: var(--ad-primary); border-color: var(--ad-primary); color: #fff; }
.tabs-pill .c { background: rgba(15, 23, 42, .08); border-radius: 999px; padding: 0 .45rem; font-size: .72rem; }
.tabs-pill a.active .c { background: rgba(255,255,255,.25); }

.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 1rem; }
.chart-bars .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; height: 100%; justify-content: flex-end; min-width: 0; }
.chart-bars .bar { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #38BDF8, #1D4ED8); min-height: 4px; position: relative; transition: filter .15s; }
.chart-bars .bar.zero { background: var(--ad-border); }
.chart-bars .bar:hover { filter: brightness(1.12); }
.chart-bars .bar:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ad-navy); color: #fff; font-size: .72rem; padding: .3rem .55rem; border-radius: 7px; white-space: nowrap; font-weight: 600; z-index: 3; }
.chart-bars .x { font-size: .64rem; color: #94A3B8; white-space: nowrap; }

.checklist-item { display: flex; gap: .8rem; align-items: center; padding: .8rem 0; }
.checklist-item + .checklist-item { border-top: 1px solid var(--ad-border); }
.checklist-item .ck { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.image-uploader { border: 2px dashed #BFDBFE; border-radius: var(--ad-radius); background: var(--ad-lighter); padding: 1.6rem; text-align: center; cursor: pointer; transition: all .2s; display: block; }
.image-uploader:hover { border-color: var(--ad-primary); background: var(--ad-light); }
.image-uploader i { font-size: 2rem; color: var(--ad-primary); }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .6rem; }
.preview-grid .pv { aspect-ratio: 1; border-radius: 12px; overflow: hidden; position: relative; border: 1px solid var(--ad-border); }
.preview-grid .pv img { width: 100%; height: 100%; object-fit: cover; }
.preview-grid .pv form { position: absolute; top: 4px; right: 4px; }
.preview-grid .pv button { width: 26px; height: 26px; border-radius: 8px; border: 0; background: rgba(15,23,42,.7); color: #fff; font-size: .8rem; }

.kbd-demo { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--ad-bg); border: 1px solid var(--ad-border); border-radius: 8px; padding: .1rem .45rem; font-size: .8rem; }
.status-banner { border-radius: var(--ad-radius-lg); padding: 2rem; text-align: center; }

/* ---------- Utilitaires responsive ---------- */
@media (max-width: 767.98px) {
    .section { padding: 2.6rem 0; }
    .hero { border-radius: 0 0 24px 24px; }
    .promo-banner { padding: 1.8rem; }
    .price { font-size: .98rem; }
    .product-body { padding: .75rem .8rem .85rem; }
    .product-name { font-size: .85rem; }
    .btn-add { width: 36px; height: 36px; }
    .tracker-step span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
.min-w-0 { min-width: 0; }
.preview-grid .pv > button { position: absolute; top: 4px; right: 4px; }

/* Sélecteur de langue */
.lang-switch { display: inline-flex; border: 1px solid var(--ad-border); border-radius: 999px; padding: 2px; background: #fff; }
.lang-switch a { font-size: .72rem; font-weight: 700; color: #64748B; padding: .2rem .55rem; border-radius: 999px; line-height: 1.4; }
.lang-switch a:hover { color: var(--ad-primary); }
.lang-switch a.active { background: var(--ad-primary); color: #fff; }
.topbar .lang-switch { background: transparent; border-color: rgba(255, 255, 255, .35); }
.topbar .lang-switch a { color: inherit; opacity: .8; }
.topbar .lang-switch a.active { background: #fff; color: var(--ad-primary); opacity: 1; }
